5 ms·
I find it hard to believe Sally is so advanced if she writes code that others have difficultly reading. It shouldn't take a year to find someone who writes unm
by DanWaterworth 10y ago
I find it hard to believe Sally is so advanced if she writes code that others have difficultly reading.
It shouldn't take a year to find someone who writes unmaintainable soup.
- kctess5 10y agoCorrect, fast, and maintainable C code is a very tall order. Good luck finding ANYONE who can do that consistently for a reasonable paycheck.
- DanWaterworth 10y agoApparently it didn't have to be C or blazing fast.
- vvanders 10y agoHuh, it's almost as if the foundation of all the devices we use on a daily basis are written in some language that apparently isn't possible to write correctly.
- DanWaterworth 10y agoThat's basically true.
- pshc 10y agoThey are mostly reliable (though probably still full of security holes) despite C—made possible by the millions of person-hours thrown at the problem of maintaining large C codebases. Back then, we had no choice. We can do better.
- DanWaterworth 10y agoEssentially all but the most used code-paths with be bug riddled. This paper [1] on finding bugs in C compilers by fuzzing is an interesting case-study. [1] http://lambda-the-ultimate.org/node/4241 http://lambda-the-ultimate.org/node/4241
- astrange 10y agoServer programming isn't even that hard. You could do it in C all day. (Just have good sandboxing for when someone finds an exploit...) Millions of people have been writing C for games, firmware, computer systems without Internet since the 80s on, and they didn't even get software updates. If your server crashes you get a coredump and you can update anytime you want.
- ssalazar 10y agos/isn't possible to write correctly/is difficult to write correctly cheaply in non-trivial applications/ and you pretty much have it. Building higher-level abstractions has historically been a good thing, unless your day job is punching in opcodes.
- vvanders 10y agoI was more poking fun at the hyperbole that it's not possible to hire anyone who writes C at a reasonable rate.
- zamalek 10y agoIf you had me on an IRC server that had to service the numbers that Twitch is talking about; I would use every single server coding practice I am aware of. Someone else comes along. Maybe his first refactor would be to remove the buffer pooling. Maybe he'd change a data structure specifically designed to prevent false sharing, cutting throughput. Good code doesn't always mean approachable code, writing a decent socket server in C assumes a ton of advanced knowledge. If Sally had to write, say, a C logging library it would be a masterpiece of simplicity. These days your code has an audience, and those audiences can vary quite greatly.
- DanWaterworth 10y agoI consider myself an "advanced coder", whatever that means and so I know that an IRC server is likely to be IO bound. I also know to avoid C, especially multithreaded C. Not because I would be unable to write correct multithreaded C, but because I probably don't have to to solve the problem adequately. My experience means I know to pick my battles.
- rantanplan 10y agoOT: why is an IRC server I/O bound? That really piqued my interest.
- Terribledactyl 10y agoI've never made an IRC server but I share a similar feel for I/O (Network) being the limiting factor. Have one user write a message and then you need to send out potentially hundreds of thousands of messages. (At twitch scale) The actual CPU computation going on per event is minimal (process maybe a few kb of text), and if we're only dealing with text, probably not memory (capacity or throughput) bound and certainly not disk bound.
- zamalek 10y agoDisclaimer: despite all my praises for Go, I don't actually use it for real problems. Would I like to use Go? Definitely! Is there a problem that I'm trying to solve that needs Go? Certainly not. In many cases I'd objectively pick Rust over Go, but when it comes to threading primitives, Go is somewhat unmatched. > pick my battles Exactly my point. A good coder will choose the tool that expresses the solution correctly. C is a very good choice, it always will be, there are sometimes better choices. Ultimately it seems as though we are in agreement; cheers!
- justicezyx 10y agoI think this is why 'advanced' is used of 'better'. :)
- DanWaterworth 10y agoI think that's true, but I don't like that it's true. What does that say about programming as a profession? Yuck.