Author Topic: C or Python?  (Read 3804 times)

0 Members and 1 Guest are viewing this topic.

PhantasmagoricalTech

  • Guest
C or Python?
« on: August 25, 2012, 09:52:51 am »
I am relatively new to programming, and am wondering if I should stick on my current path. I started with C language, but every time I look up code for it, I only get C++. Also, I've been hearing that Python is a way better starting language, and that it is very difficult to transition to most non-C based languages out of C.
I wouldn't have a problem with switching to Python or C++, but for some reason, unlike most others, I find C the easiest to understand... I really love the way it's working for me and would actually be kind of sad to have to leave it.... What do you guys think? Should i just forget about C for now because the cons are so high, or stick with it because i like and understand it more than the other languages?

Offline Huntondoom

  • Baron
  • ****
  • Posts: 856
  • Cookies: 17
  • Visual C# programmer
    • View Profile
Re: C or Python?
« Reply #1 on: August 25, 2012, 01:51:49 pm »
you're not leaving C, you're just adding a launguage to what you already know, it doesn't mean you'll directly abandon C
Aslong as you are connected to the internet, you'll have no privacy

Advanced Internet Search
Clean Up!

Offline Phage

  • VIP
  • Overlord
  • *
  • Posts: 1280
  • Cookies: 120
    • View Profile
Re: C or Python?
« Reply #2 on: August 25, 2012, 04:21:24 pm »
If you are so happy about C and find it easy, so why choose another language? I would say, stay with C and when you are ready proceed to another language.
"Ruby devs do, in fact, get all the girls. No girl wants a python, but EVERY girl wants rubies" - connection

"It always takes longer than you expect, even when you take into account Hofstadter’s Law."

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Re: C or Python?
« Reply #3 on: August 25, 2012, 11:24:06 pm »
and that it is very difficult to transition to most non-C based languages out of C.


I don't think this is true. Most people who code in C who I talk to say that learning C first, or C at all, is a good idea because most other languages after that you can pick up on easier because C is perhaps a bit harder than other languages. Python and C are very different languages and I think it is beneficial to learn both at some point.

However, as Phage said, if you like C and it works for you I'd say stick with it. C is arguably one of the most useful languages out there and I think every coder should know it.
"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python

Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
Re: C or Python?
« Reply #4 on: August 25, 2012, 11:40:20 pm »
Going from C to other languages is eaiser. With the exception of ASM. For example, you will  know the difference between strings and string literal. Plus knowing memory management and pointers is always a plus.

Learn Python after your comfortable with C. Because if you know Python, you'll be a parsletoung like Harry Potter.
>>>import this
-----------------------------

PhantasmagoricalTech

  • Guest
Re: C or Python?
« Reply #5 on: August 26, 2012, 04:22:06 am »
OK, thanks guys, i think i'll stick with C then. My only problem with it is that there seems to be very little source code out there for C. Are there any good resources for C? My favorite way to learn is to copy source code and then see how everything works by modifying it and such. However, whenever i look for things like that, I only get C++ source code... any ideas?

Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
Re: C or Python?
« Reply #6 on: August 26, 2012, 05:02:07 am »
OK, thanks guys, i think i'll stick with C then. My only problem with it is that there seems to be very little source code out there for C. Are there any good resources for C? My favorite way to learn is to copy source code and then see how everything works by modifying it and such. However, whenever i look for things like that, I only get C++ source code... any ideas?

http://www.daniweb.com/software-development/c/118
Also look at the snippets section on daniweb.

http://stackoverflow.com
Look for C tags.


http://evilzone.org/ebooks/o'reilly-secure-programming-cookbook-for-c-and-c/

http://evilzone.org/ebooks/c(not-)primer-plus/
« Last Edit: August 26, 2012, 05:03:54 am by techb »
>>>import this
-----------------------------


Offline hmm

  • Serf
  • *
  • Posts: 23
  • Cookies: 0
    • View Profile
Re: C or Python?
« Reply #8 on: August 28, 2012, 11:05:20 pm »
Also if you google Harvard CS50, they have video lectures on it.

Offline somegrass

  • /dev/null
  • *
  • Posts: 12
  • Cookies: 0
    • View Profile
Re: C or Python?
« Reply #9 on: November 13, 2012, 07:51:31 pm »
Take a look at an open source operating system. Your bound to find a ton amount of pure c.

Offline bluechill

  • Cybermancer
  • Royal Highness
  • ****
  • Posts: 682
  • Cookies: 344
  • I am the existence in these walls
    • View Profile
Re: C or Python?
« Reply #10 on: November 13, 2012, 08:22:44 pm »
Take a look at an open source operating system. Your bound to find a ton amount of pure c.

Yes that's because kernels are harder to write in C++ because you'll basically be using C until you implement the new and delete operators which requires malloc and free.  To get to that point requires a lot of work in C anyways..... basically C++ is great for everything but kernel level dev.  C has less run time support necessary.  This is why OSes are written in C.

@OP

My advice is learn C then learn C++.  Then move on to languages like Java, Python, PHP, etc. all of which copy heavily from C++ and C in one way or another.  C is the hardest language in that list and then C++ introduces all the concepts to C that you will find in all other modern day languages.  C++ also introduces concepts which are not found in every language, virtual objects, multiple inheritance etc. and so if you do decide to learn more languages later on it will be easier as C++ pretty much has every feature of all the other modern programming languages (at least C++11).
I have dreamed a dream, but now that dream has gone from me.  In its place now exists my own reality, a reality which I have created for myself by myself.

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
Re: C or Python?
« Reply #11 on: November 13, 2012, 08:25:01 pm »
The OP isn't here anymore -_-

Last activity: August 28, 2012, 11:05:20 PM

Bump old topic much?

</thread>
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry