Programmers, does this make sense?
Dec. 24th, 2007 10:10 amhttp://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html
The general argument is that the mere size of a big program is a problem in itself, and considerable efforts, in particular choosing a low-bloat language, are definitely worth the trouble.
I'm not qualified to judge it--it sounds plausible, but I'm guessing at what a lot of the words mean.
Here's a cute quote:
The general argument is that the mere size of a big program is a problem in itself, and considerable efforts, in particular choosing a low-bloat language, are definitely worth the trouble.
I'm not qualified to judge it--it sounds plausible, but I'm guessing at what a lot of the words mean.
Here's a cute quote:
Java is like a variant of the game of Tetris in which none of the pieces can fill gaps created by the other pieces, so all you can do is pile them up endlessly.
no subject
Date: 2007-12-24 05:11 pm (UTC)no subject
Date: 2007-12-24 05:19 pm (UTC)The IDEs march on
Date: 2007-12-24 05:24 pm (UTC)Google, "define:IDE".
I'm afraid I can't do that, Dave.Nope.
No.
Still not that.
Uh-uh.
Ah ha!
OK, got the picture now. Thanks, Google.
Re: The IDEs march on
Date: 2007-12-24 05:47 pm (UTC)The other thing I looked up was unit test.
Re: The IDEs march on
Date: 2007-12-24 07:41 pm (UTC)no subject
Date: 2007-12-24 05:34 pm (UTC)I read only about the first 20% of the article; it's rather long. But I'm not very impressed from that much. Code size as such is not the problem. Uncontrolled interconnectivity is the problem. Code can get arbitrarily large; what makes it go out of control is having to deal with too much at a time. In a successful large software design, there are black boxes within black boxes. From outside the box, you should only need to know how to talk to it, not how it works. (Non-software analogy: You don't need to know what happens mechanically when you step on the gas pedal of your car. You just need to know that it feeds fuel to the engine and makes it go.)
The size of each component is important. I've dealt with functions that were 500 lines long. They're impossible for a human mind to comprehend. If I need to deal with it extensively, it's worth taking the time to do what Stevey despises: I refactor it. This actually makes the code slightly longer in many cases, though it can also eliminate duplicate code. That doesn't make it worse, it makes it better, because I don't have to deal with as much code at a time.
a couple nits
Date: 2007-12-24 08:26 pm (UTC)I think it's inconsistent to say large codebases are fine as long as they have low coupling, but a large function is bad no matter what. The typical 500-line function in the wild should be exterminated, though, yeah.
Re: a couple nits
Date: 2007-12-24 09:24 pm (UTC)There are a few cases where a 500-line function might be OK -- for instance, if it's 500 initializers in a simple sequence and there's really no logic within the function.
Re: a couple nits
Date: 2007-12-24 11:03 pm (UTC)I'm going offline now -- happy holidays.
no subject
Date: 2007-12-24 08:19 pm (UTC)Another background check: I was employee #6 at a startup making a new Java IDE (over 10 years ago when the market for such was relatively wide open). They already had around 100,000 lines of Java code then; it was already a drag on their progress and on me getting up to speed. (They were all excellent programmers in different ways.) I've done some other Java work, but I've always preferred other languages with fewer compromises for popularity.
Sometimes big is wonderful: Paradigms of AI Programming (http://norvig.com/paip.html) has over 900 pages of superlative code to learn from (divided about half and half between English and actual code). But it's as concise as the author could make it, and I'm in favor of more in sort of the same way I'd welcome more Beethoven sonatas. The author considered (http://www.norvig.com/python-lisp.html) translating it to Java -- this file (http://norvig.com/paip/search.lisp) is roughly equivalent to this directory (http://www.cs.berkeley.edu/~russell/aima-java/src/aima/search/). So that didn't fly.
I agree that a lot of the time, if you're good, someone needing to deal with your code will only need to deal with a bit of it. But life always throws curves, things that don't fit in your framework; what happens then, well, are you talking about revising a short story, a novel, or a shared-world series of dozens of books? Of course it makes a difference.
no subject
Date: 2007-12-24 08:30 pm (UTC)no subject
Date: 2007-12-25 05:43 pm (UTC)no subject
Date: 2007-12-25 10:19 pm (UTC)