4 ms·
If you're a software developer who doesn't know C, then there's a whole class of software that you can't read - network programming, operating systems, language
by chadcmulligan 7y ago
If you're a software developer who doesn't know C, then there's a whole class of software that you can't read - network programming, operating systems, language tools all written in C. This puts you at an extreme disadvantage imho.
- axaxs 7y agoNot sure if I'd agree with extreme disadvantage, perhaps slight. I'd wager most even super competent C programmers rarely to never look under the hood at such things. That said, to me, while C the language is super simple and easy to write, I always find reading it a chore. Folks using 'clever' hacks, rarely using built in types, lack of nice standard library, and so on, make it a bit of a pain to follow unless you are prepared to invest a non-insignificant amount of time. I rarely dive into such things for this reason...
- aloknnikhil 7y agoAgreed. Some macros out there are unnecessarily obtuse. https://stackoverflow.com/questions/652788/what-is-the-worst-real-world-macros-pre-processor-abuse-youve-ever-come-across https://stackoverflow.com/questions/652788/what-is-the-worst...
- monoideism 7y ago> Not sure if I'd agree with extreme disadvantage, perhaps slight I disagree. Without knowledge of C, you're unlikely to have read low-level networking code, for example, which is pretty fundamental to an in-depth understanding of modern software. I do agree that C can be a pain to read, mostly because of the crazy macros that a lot of production code tends to use.
- axaxs 7y agoFair point. Personally, I learned far more about network programming from Beej's famous guide[1] than any code I dug into. Then again, it's one of those things where you don't know what you don't know. Even so, I think it should be required reading for every programmer! [1]: https://beej.us/guide/bgnet/html/ https://beej.us/guide/bgnet/html/
- monoideism 7y agoTotally agree about Beej's. But which language is Beej's tutorial in? C, of course! Another classic requiring C is "Unix Programming Environment" by Kernighan and Pike (old C, but still).
- pjmlp 7y agoWhile I agree that knowing C is relevant, from culture point of view, to be able to use libraries written in C, and specially to be aware of its flaws and when to use something better instead. Writing low level networking code does not require C per se, I have done it in several other languages, and given that the causes for the Morris worm remain in the language, ideally one should use something else.
- monoideism 7y ago> Writing low level networking code does not require C per se, Of course it doesn’t. I mentioned using Python to write low-level networking code above (it was painful for someone used to C). I’ve also used Lua for it (better than Python). And as I recall, you’re a fan of Ada and Rust, both of which I have used to write low-level networking code (packet parsers, network protocols, and whatnot). That said, those languages are not typically a well-traveled entry-point into low-level network coding. C is. I’d be as happy as the next guy on HN if we all just moved to Rust, but that’s not in the cards at the moment.
- detaro 7y agoWhat are you thinking of when you say "low-level networking code"? Because if you mean socket-API, I'd disagree, the C version doesn't teach much its bindings in higher-level languages (which often mirror it quite closely anyways) necessarily wouldn't, even if the languages also offer more abstracted APIs on top.
- monoideism 7y agoI'm thinking about network protocols and binary packets, specifically. To me, that stuff is pretty important to have a grasp of. It's very awkward to do packet parsing and generation in Python, for example (I've done it). Even working in front-end dev now, I benefit from understanding what's driving HTTP and WebSocket (High-Performance Browser Networking is also a great book for understanding this stuff).
- deleted 7y ago[deleted]
- yaitsyaboi 7y agoI feel like C and bash scripting are the last big chunks of fundamental knowledge I want to master. I think I'm more proficient with C only because it's basically Java + pointers - OOP and Java is my main professional language.
- ernst_klim 7y agoAgree, yet C is definitely a bad language to start. I knew a bunch of people who started with C and used to use inappropriate data structures and algorithms all the way because writing your own Tree-like or recursive data structure in C is damn hard. So they ended up using arrays or something like this all the way instead. It's better to start with a language which let to create and use any data structures without tensions. SML, OCaml, scheme, even Java is better than C in this regard.
- chadcmulligan 7y agoDefinitely - C is a very hard language to start with, but after you've learnt a couple, then C can definitely add to your understanding imho.
- gexla 7y agoExtreme disadvantage to what? A stupid example is that all other things being equal you likely will be even on your success on Tinder. Another stupid example. If you're learning to play hockey, then the person learning C would be at a severe disadvantage to the person practicing hockey. If you're the technical co-founder of a lean but fast moving startup then you'll likely be better off writing code than to learn C unless your product really needs to be written in C. That person might also be better off putting that time into interviewing, helping with sales or anything else which provides immediate feedback. Sorry for the dumb examples, but I see this as an issue all the time. We have limited hours in the day. Often people get sidetracked on similar distractions. Premature optimization is one often discussed example. There are endless more. We all have that friend who seems to get hopelessly bogged down in details before doing anything and ultimately giving up.
- chadcmulligan 7y agoI started the paragraph with "If you're a software developer who doesn't know C", so "This puts you at an extreme disadvantage to software developers who do know C imho"