Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As a first reaction I thought, well, more than 50% of HNers fluent with C, the average age should be pretty high probably. But then I realized that actually the average HN age is probably around 25 (from other pools I saw here), so I guess, there are still a lot of fresh programmers learning C. I really hope so. I love higher level programming languages and spent a lot of time with Tcl, Scheme, FORTH, Joy, Ruby, and other languages, but I really hope that the next generations of programmers will still be able to stay near the metal when needed.


I'm 30, and from Googling you seem to be 3 years older than me, but I don't think the use case for learning C has changed all that much over the course of my time as a programmer.

Already around '95 or so Perl was widely used, GUIs could be done in things like Tcl/Tk, basic apps were starting to move onto the web, desktop stuff was mostly in C++.

You learned C when you wanted to work on things like kernels or databases or high-performance daemons and whatnot. That's still mostly the case. Java has eaten into that a little bit, but that's not even a new phenomenon.

The things that people used C for 15 years ago are still the same things that it's used for today, and similarly, you didn't have to write stuff in C 15 years ago if you just wanted to bang out some little utility or "CGI script". I expect things to stay that way until there's some language which could reasonably replace C in its niche. Thusfar one has not emerged.


I don't know if you remember, but in 1995, Serious Software was still Not Written in "Scripting Languages". Things like SATAN and HotJava were avant-garde exceptions, and Emacs Lisp was a holdover from another era (and we often used vi instead because it was noticeably faster).

Today, I regularly use an email client written mostly in JS, message boards written entirely in Python, a chat client written in Python, a high-performance file transfer program written in Python, a music player written in C#, system monitoring tools (iotop, htop, dstat) written in Python, a version-control system written in Python, and so on. In 1995, I used an email client written in C, a newsreader written in C talking to a netnews server written in C (although early netnews servers had been partly written in sh, they were rewritten in C for performance), an IRC client written in C, file-transfer programs written in C, music players implemented in hardware, "top" written in C, version-control systems written in C (although, again, the first version of CVS was a shell script), and so on.

I don't think it's true that "basic apps were starting to move onto the web" in 1995. Web sites that were really programs with HTML user interfaces didn't really start to take off until around 1997, by my recollection. I joined eBay's AuctionWeb in 1996, but it was quite unusual (and it was promptly rewritten in, I assume, C++, as eBayISAPI.dll).

GUIs could be done in Tk, or for that matter PowerBuilder or Visual Basic, but that was thought to be "for amateurs". It became technically possible to do this kind of stuff in high-level languages then, but it took a few years for people to notice that.


Tcl was driving oil extractions plants in 1995... just an example, also there were bit perl programs in production, so for sure now the acceptance is higher but was not impossible to have sensible code written in scripting languages back then.


It wasn't impossible in 1985, either, when GNU Emacs came out; but the now-common AlternateSoftAndHardLayers approach won Emacs a reputation for being a slow memory hog.

My point, though, is that much of C's 1995 or 1996 niche is now occupied by "scripting languages", and in 1995 or 1996, that niche was occupied by C.


C is the scripting language of the Unix kernel.


Tcl was being used for all manner of "serious" stuff in 1995 - including EPOS systems.


Very good point, I'm 34, and actually probably the average HNers is on average ten years younger than me, but well, it is pretty shocking that what you said is so true. No big shift in the latest 10/15 years, there were already good alternatives for all the higher level stuff. Thanks for opening my eyes about that!


Nit-picking time: there's probably a difference between the average age of a HNer and the average age of an HNer that knows C. Conditional probabilities and all that.

That being said, I'm an "average age" HNer that has worked with (and loved working with) C. I'm looking for excuses to work with it more, although it doesn't really intersect with my type of work (statistics).

Maybe I should contribute to Redis or other OSS...any suggestions?


> Maybe I should contribute to Redis or other OSS...any suggestions?

The core of R is written in C, I think. Might be worth a look?

https://svn.r-project.org/R/trunk/src/main/


I think that CLIPS (a tool for building expert systems) needs an update, including a shift to a more Redis-like interface and philosophy. The core of CLIPS is still pretty nice, but the project seems to have grown well beyond its natural borders.

http://clipsrules.sourceforge.net/


work on the python or ruby interpreters! Beautiful code, both of them.


I learned C in college classes, but never really learned it until after a "WTF PHP" moment, so I could dig into the interpreter source to figure out what was going on. Later experience with Python's interpreter and debugging pyrex reinforced my knowledge.

I mention this just to say why I think "modern" very-high-level language hackers still end up learning C; the base layer is all written in it, and eventually you've either got to fix something or write something fast.

(I'm 28)


I find it more than a little disturbing that the first time you really used C was to figure out the PHP interpreter. It's among the worst C code I've ever seen (aside from code I've seen on dailywtf). After I had to debug something in the PHP interpreter, I refused to have anything to do with PHP ever again.

Anyway I hope for your sake looking at the Python interpreter did more than reinforce your knowledge. It's no stroke of genius, but it's much better written than PHP.


> It's among the worst C code I've ever seen

I already hated the interpreter before I dug into it, and my expectations were reinforced. I was a college intern, I didn't choose PHP!


Well, it seems the old stigma against multi-language systems is fading. Even 5 years ago, it was more or less "the rule" that you chose one language for a project and you had to live with whatever trade-offs that choice left you with. Now, people are more willing to accept that you can write much of your system in a language designed for programmer convenience and only write the bottlenecks in a more performance-oriented language.


This is true, but if you use C for the right use cases it is possible that actually higher level programming languages will not be a less time expensive pick, as if the use case is right you'll end spending a lot of time into optimizing performances, OS low level access, memory usage, ...


Web applications which rich client-side interfaces might be the reason for the change in thinking. In a web application, you anyway have JavaScript to deal with; and until a few years ago, the server-side code was written in some other language.


I'm 25 and consider myself very well-versed in C (though I still have to consult the C99 spec from time to time). When I was learning to program modern computers around the turn of the century, it was the only "serious" language for writing desktop apps (I had recently "graduated" from VB4). I then refined my skills over the course of my electrical & computer engineering degree and a short stint in the EE industry, where it's very much alive as THE language for microcontrollers (and last I heard, a variant called SystemC was (sadly) replacing Verilog and VHDL for use in ASIC/FPGA design).


FPGA designer here. I don't think it's accurate to claim that SystemC is replacing VHDL and Verilog for ASIC/FPGA design. I view SystemC as a niche tool to allow software engineers to dabble in hardware design. I use C for embedded software, but would never dream of designing hardware in anything else except pure HDL. It's a bit like trying to write a letter in a foreign language using Google Translate-- the results are non-optimal and often comical.


While trying to learn HDL I felt like Verliog was more naturaly than VHDL. I didn't bother trying to learn SystemC or anything, organizing a project on Quartus or ISE is hard enough as it is with Verilog.

I need to go back to dabbling with my little Spartan3E board though.


Ah, that's good to hear. And here I was thinking HDL was going to hell in a handbasket :)


SystemC was about (co)simulation - for building models of hardware. ALthough there were some tools for converting SystemC into HDLs, I don't think they ever really took off.


Most people are not learning that anymore. I see most universities moving those courses to choice instead of mandatory courses. When I talk to 'young programmers' it always scares me that most don't even know how a computer works at a low level. Which is reflected by the weird things they try to do with Java etc.


I'm 29. I started programming C when I was 12 or 13 and I really think that C is probably the best language to learn to program with. In fact I made that recommendation to a friend who recently took his first programming class using Processing and he thought I was crazy. I think it's important to understand memory management, pointers, pointer arithmetic and such.


My advisor (I'm a senior in college now) does pretty much everything in C. I've written a compiler, large parts of a couple distributed systems, and various Linux kernel hacks. C certainly isn't my favorite language, but I like it a lot. Well-written C is pretty beautiful in its own way.


I'm 26 and know C very well. I use it at work and for hobby projects. Still, Python is my main language.


I'm 23, self-taught (though not asking for pats on the back), and fairly proficient in QBASIC (hahaha), Haskell, Python, JS, Prolog, and I am learning Scheme and Erlang, but there's something mythical about programming in C, and I try to read C (linux kernel, etc) regularly.


They teach C at many top colleges for any number of degrees (Computer Science, Computer Engineering, Electrical Engineering).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: