Live data from Hacker News

Should every programmer learn C as their first programming language?

guidena2codes.com

51–60 of 67 posts

Re: Should every programmer learn C as their first programming language?

#51
post #44

C was the first language I learnt when I was at university. Honestly the teacher was bad and I found it difficult. It almost put me off programming. Fortunately, I later took a mandatory course in Java and Haskell. We learnt both languages in parallel to learn the difference between OO and FP. We were set tasks where we had to write programs in both languages. I loved this course and the lecturers were amazing. I am…

Maybe its just that the Java+Haskell one was simply a good teacher. Imagine you had them switched, so you would've had a bad teacher showing you how to program in Haskell and Java at the same time. Still to this day, your worst nightmares would be slow to load and express in terms of monads.

Agreed. A good teacher is important.

However I still feel like C may not be the best first language as it's low level. This means there's a lot going on and more to learn for the average user so they end up getting stuck more often then if they used a language with memory management. This is based off the premise that the user is of average intelligence and you don't want to to put them off programming.

Re: Should every programmer learn C as their first programming language?

#52
post #43

Earlier quoted context omitted.

> You can spend weeks segfaulting in C before you get things actually working This seems like an overstatement. The first programming class I ever took was "Introduction to Programming with C" where the textbook was K&R and we were writing and compiling programs from day one. If you can't figure out how to manage memory (one dimensional data structure) in C jumping into a language that immediately allows you to abstr…

Depends on the type of thinker someone is. Everyone thinks best at a particular level. While a certain data structure might be complex, it’s use might be simple. If I show someone a list of lists in C# the semantics of that will be very easy for them to grasp. The same data structure in C might defeat them altogether.

> The same data structure in C might defeat them altogether

I agree with this, but my point is that to get started in C all you need to work with is strings/arrays.

> While a certain data structure might be complex, it’s use might be simple

I would argue that in most cases the use only appears to be simple and in reality the correct use is just as complex as the data structure.

Re: Should every programmer learn C as their first programming language?

#53

The article's main point is that learning C first makes it easier to learn the language a programmer will actually use, be it Javascript or something else. In my experience, the best course of action is to learn whatever you need first. For those considering programming as a hobby/occupation, being told to learn a relatively complex and unpractical language would raise the bar of entry.

C is a very simple language. much simpler than js you can write a C compiler in just a few thousand lines.

ok, sarcasm, got it

Re: Should every programmer learn C as their first programming language?

#55
post #50

Earlier quoted context omitted.

I definitely agree. I took C first then Python. Where I took the courses, the C course was an intermediate programming course while the Python course was an introductory to programming course (I think this the case for many colleges, not entirely certain). Python, personally, seems like such a good introduction to programming language because the syntax seems so English-like. But otherwise, at my community college, a…

> [...] I still don't feel like a programmer though. I mean you could give me a basic problem and I can probably write a simple, elegant solution in five hours or so but I'm going to have to look at the documentation or Google how to do some specific task. It might be that I've only taken lower division courses or only built stuff following tutorials online (Treehouse, etc), but I still don't feel competent [...] Wha…

You're right. It's just, from an outsider's perspective that has only worked blue-collared jobs (think meat clerk, greenskeeper), the technology industry's interview or working in technology as programmer seems a bit daunting, even especially as a minority. I'm still an undergraduate (spending a fourth year taking interesting lower division courses at my community college) but it might be a combination of imposter syndrome on my part and not feeling I know enough. I mean, again for instance, I can tell you off the top of my head how six sorting algorithms work and their respective o-notations. But if I had to write them? I would probably need the entire day and no one looking over my shoulder. I can write a fizz buzz program in ten minutes or so but I can't tell you off the top of my head how pointers work or how polymorphism works, I would have to look it up.

I just feel if I ever get a software engineering internship one of these summers, I will ask myself: what am I doing here? After all, I take a long time to write good piece of code. I'll think I'm holding my team back. If I'm building stuff on my own, in my own time, I'm fine and dandy. But otherwise, I'll be stressed and nervous.

Re: Should every programmer learn C as their first programming language?

#56
post #44

Earlier quoted context omitted.

Maybe its just that the Java+Haskell one was simply a good teacher. Imagine you had them switched, so you would've had a bad teacher showing you how to program in Haskell and Java at the same time. Still to this day, your worst nightmares would be slow to load and express in terms of monads.

Agreed. A good teacher is important. However I still feel like C may not be the best first language as it's low level. This means there's a lot going on and more to learn for the average user so they end up getting stuck more often then if they used a language with memory management. This is based off the premise that the user is of average intelligence and you don't want to to put them off programming.

I agree. In the first few months of my CS degree, first exposition to programming languages ever, and it was Pascal. Then they quickly moved to C, but at least that first impression was done with a leaner language that allowed us to concentrate on what is programming, what are common imperative language constructs, etc. without worrying much about fine details of the machine. I don't think I'd have grasped too well all that new information if I also had to be distracted with understanding all subtle gotchas and details of the C language.

Re: Should every programmer learn C as their first programming language?

#58
post #57

> Should every programmer learn C as their first programming language? No. > Should every programmer learn C? Yes.

Agree even if you are already a programming, in other language, it may came a day that you'll want to learn C

Re: Should every programmer learn C as their first programming language?

#59

The article's main point is that learning C first makes it easier to learn the language a programmer will actually use, be it Javascript or something else. In my experience, the best course of action is to learn whatever you need first. For those considering programming as a hobby/occupation, being told to learn a relatively complex and unpractical language would raise the bar of entry.

C is great language specially if you learn programming as a hobby

Re: Should every programmer learn C as their first programming language?

#60
post #50

Earlier quoted context omitted.

> [...] I still don't feel like a programmer though. I mean you could give me a basic problem and I can probably write a simple, elegant solution in five hours or so but I'm going to have to look at the documentation or Google how to do some specific task. It might be that I've only taken lower division courses or only built stuff following tutorials online (Treehouse, etc), but I still don't feel competent [...] Wha…

You're right. It's just, from an outsider's perspective that has only worked blue-collared jobs (think meat clerk, greenskeeper), the technology industry's interview or working in technology as programmer seems a bit daunting, even especially as a minority. I'm still an undergraduate (spending a fourth year taking interesting lower division courses at my community college) but it might be a combination of imposter sy…

Everyone starts somewhere. Take into account that you are just studying it from time to time. At work you will be actively doing things 5-8 hours a day, almost every day. Take your time, people generally expect even experienced programmers to take a month to catch up to speed on a new job. After month or two of such intensive training you will learn a lot too. Make sure that your learning is directed i.e. don't just solve problems, but figure out how and why they occurred etc. What approaches people took before you etc. In general, read a lot of relevant literature, especially articles and books. And after a year or two you will start hitting point of diminishing returns. There is really only so much that people need to know to do day to day work.

Then there is elusive experience, but that will come with time as you will observe first hand how silver bullets turn into legacy ;).

Post reply on HN