Hacker News new | past | comments | ask | show | jobs | submit login

"It's true that for some problems (web development being a good example) there are better tools (scripting languages, databases)..."

most likely implemented in C.




It's implemented in machine language somewhere. Programmers should know what a register is. It's implemented in electrons, too. And, some of the best programmers I've known were EE majors.

Don't get me wrong, it's wise to know your craft. That's never a bad thing. But it's foolish to use a tool that is, frankly, not as powerful.

Saying a tool is "powerful" doesn't mean "you can do lots of stuff with it." You CAN saw down a tree with a screwdriver. But a chainsaw is a much more powerful tool for that job. Yes, a screwdriver can do lots of things that a chainsaw can't, which only proves that it's a more versatile tool. The power of a tool depends on the context of the problem you're trying to solve.

I'm guessing that screwdrivers are used in the assembly of chainsaws. They still suck for cutting down trees. Same with C vs just about every other language. C is a fairly small step up from assembly. An important step, no doubt, but for most tasks that software developers face, especially on the web, it's not appropriate.


I'm going to go out on a limb and guess that you've never actually worked seriously in C. You probably had to maintain someone else's code at some point, got confused by the linker or debugger semantics, and decided you hated it. [disclosure: I peeked at your blog and resume, and it seems I'm broadly correct.] That's fine: work in C is grounded deeper than web development. You don't have the scaffolding around you to provide a fallback for changes. Sometimes you need to fix bugs from first principles, and that takes a lot more knowledge up front than web work does.

But that's not the same as saying that someone who has that background is as unproductive in C as you are. Seriously: spend some time writing something serious in C, you might like it better. It will certainly seem more powerful than it does to you right now.


You're "broadly correct" in the sense that the Republican Party is "broadly libertarian."

I spent 5 years writing almost 100% C and C++ in college, with detours into Lisp, Java, VB, and Ada. (Actually, I'd grown up on Basic, so VB wasn't a detour, really.) After school, I worked at a VB shop, but built a few side-projects in C++. I've had to fix things that were broken, and I don't have a problem with the linker or debugger semantics. I've used templates, and both has-a and is-a object extension. I am certainly not an world-class expert in it, but it's not like I tried it once, got burned, and decided I hated it.

I'm a web developer because I like web development better. For a variety of reasons, not the least of them the challenge of building code that is so portable it will run on 12 different browser/os combinations, and the opportunity to work in many different languages, I find front-end development much more rewarding.

My aversion to C is based on a simple rule of thumb:

  (usefulness of a feature) / (tokens required to implement it)
Lines of code is a pretty good fill-in for "tokens", but I had to change the rule when someone pointed out that a 500 character regex in Perl is hardly an elegant or maintainable program :)

Another way to express this is that the elegance of a solution is the number of tokens that are not essential to the solution and do not aid in understanding the intent of the code. For example, compare Javascript's closures with Lisp's or Erlang's syntax. On the other side, compare any of those with the mess of class and object boilerplate in C++ or Java or PHP.

Conceptual cruft is even more pervasive. If encapsulation requires class/object constructs, then there is no way to get past that.

Some programmers will be able to create more elegant solutions than others, of course. But without changing languages, you can't get past the cruft that is built into language. (Or, in the case of C, the cruft that was not removed from the language.)

Again, "power" does not mean "you can do anything with it." C can be used to tell a computer to do anything that computer can do. But I'd argue that that's a naive view of the power of a programming language. There are things that are trivial to express in other languages, and require several lines to do in C. Just something as simple as comparing that two strings hold the same value requires about half as much conceptual overhead in almost any other language.

Or is there a version C with lexical closures, first-order functions and strings, and a garbage collector that I'm not familiar with?

I'm not sure what you mean by You don't have the scaffolding around you to provide a fallback for changes.

The claim that C programming takes more knowledge up front than web work does is frankly presumptuous and a bit misguided. I've seen the Javascript that C experts write. It's terrible. In fact, I'd argue that since quality web work requires an understanding of semantic HTML, CSS, Javascript, maybe some Flash and/or Canvas chops, and probably at least one kind of server-side language like PHP or Java, it requires much more knowledge up front than almost anything else out there.




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

Search: