Hard Coded Limits Considered Harmful
"The user will never need more than n objects of type x". Sometimes this is unavoidable, but it is problematic.
The problem is a variant of the "magic constant" problem. In code, you should avoid using literals for constants because the meaning is obscured and the code is hard to change when the user collective wants to expand the software (I use "user collective" advisedly, as representative of my disbelief in the unary User).
But the "magic constant" problem also occurs at requirements and design time. I always get worried when developers use sentences of the form "this value will never be bigger than X" where X is a constant.
This is because the statement soon enough becomes a shibboleth, insider knowledge the possession of which tells the MIS people, at some level of their subconscious, that in the excess of the user collective, they are in possession of Knowledge.
The problem with this form of Knowledge is that the user collective is usually kept in the dark until its business or other activity expands past the point supported by the secret number, and boom.
Unfortunately, the MIS people then engage, often, in a *schadenfreude* festival, laughing at the clueless Users who don't know, as does the MIS community, that there are limits.
The expansion of the business becomes an annoyance and an indication of a sort of indiscipline to the MIS people.
A few years ago, I was talking to a friend, who does embedded software, who was all happy because the User had assured him that blocks of data for a new cellphone would never, ever, exceed 512 bytes, which meant for him that he could use a "simple" allocation algorithm.
I did not share his innocent joy, because IF the cellphone is a success, THEN the vendor has to come out with an even cooler phone, able to do more stuff, and this will expand the data block size...in all probability.
There is in fact a straightforward linked list method for allocating fixed-length blocks of arbitrary size, but assuming 512 bytes meant that the developer would be able to use a "simpler" (in the narcissism of equating simplicity with one's own capacities) array.
This is the sort of experience that makes me glad no longer to be an American programmer, because American programming praxis insists on this false pragmatism. And it's of a piece with Bush telling a dinner last night that he just can't understand why the Iraqis are so darn ungrateful for so pragmatically ruining their country with Rumsfeld's "simple", shitty, come-as-you-are, coalition of the willing, evil little war, another patch, another crude solution to a much larger problem.
Dijkstra asked, how do we tell truths that might hurt.
As far as I know we just tell them, but not like Cartman. We can tell the truth without saying, "hey buttmunch, you don't know SQL server!".
Or, like their teacher, without saying, mnghokay and annoying them and making them crazy.
Sorry you feel that way, but I stand by my original connection
WaterBreath, thanks for your contribution.
However, part of the problem is "expertise" and the willful failure to admit there are indeed connections.
Career-wise, the politically liberal programmer without a prestige background and prestige degree is forced through the insane pressure of the first job market to usually make compromises.
After an exhausting search, he's grateful to be hired into, let's say for example, a military contractor, or a corporation with a bad labor record.
I think that this is the source for the insistence I've heard over the years that one cannot, should not, make inferences from programming to anything else, or in the reverse direction.
My reasoning however, is as follows. As I get older, members of my "baby boom" generation have ascended within what President Eisenhower called a military industrial complex, and other members of my generational cohort have bailed out.
In a good society, the "best and brightest" would stay in the game, but in my personal experience this has not been the case. I mean, Bush is a dumbass and unqualified to be a notary public, and this is common knowledge.
Dilbert has "naturalized" an unnatural situation, and this was labeled years ago by Bill Gates in a 1986 interview. It is the "technical inversion" where the manager knows less about the technology than the programmer.
It is by no means a worldwide phenomenon; in my direct experience working for a software firm in China, the senior tech managers were also heavy tech hitters and (perhaps more important because perception is reality) viewed and respected as such by the programmers.
It would be quite a surprise if this were only a programming phenomenon and it's not. Furthermore, it's been generalized, in my direct experience over a thirty year career and according to my reading, into a wider inversion.
Managers in American society are consistently characterized not only by being nontechnical, they also have over time adopted stunningly anti-intellectual, aliterate, and at times amoral ways of looking at the world which they then try to mentor to people looking for advancement.
They continually factor human effort and dedication with cost metrics used at-will to let the human making the effort know that in the big picture, the point is really doing as little as possible while always looking good.
As a result, the cheap values promoted in TV "reality" shows like Donald Trump's The Apprentice, which is about being successful, preferably by having like Trump a successful daddy, or if necessary being appropriately smooth, preferably white, and a backstabber, have become common sense and their acceptance is pushed upon people as "maturity".
This was repeated on the grand scale by Donald Rumsfeld, who told senior military men to invade Iraq anyway after the Turkish parliament refused to allow a larger American force passage to the friendlier North.
Rumsfeld had already decided the outcome he wanted, and his decision was an isomorph to programming projects whose deadline is decided "on high", including the ruination of the careers of senior "technical" people (whether military professionals or software professionals) who won't shut the fuck up about the decision already made and the resources provided.
Bill Gates' "technical inversion" is part of a more toxic spiritual inversion, in which people at the bottom of American pecking orders are basically decent and their leaders so indecent we no longer trust men, like John McCain or Howard Dean, who look as if they might have some decency left.
We in fact look to these men for problems with anger management because our subconscious doesn't lie. Basically, our society has become so unequal (the income of people making 275K plus has increased an obscene 135% since Reagan took office, while ordinary people, including programmers, have to struggle to stay afloat) and so committed to false values domestically and internationally that we (like the Romans of the Roman decadence) don't trust decent men to lead us any more because we think they must be crazy if decent.
Phrases like "you were too honest with the user" can and do appear in this context in programmer performance reviews.
And in the final analysis, the indecent person DOESN'T UNDERSTAND good code and doesn't much like it either, because he knows that this code had a maker who worked a little extra to make it good for no reason, and this burns his ass.
This is in fact why there are explosions of infantile rage on usenet over "too long" identifiers and the use of Hungarian notation. A younger generation of programmers has grown up with self-indulgent parents who don't see the point of working hard unless you're being paid, and the very idea of a personal quality touch is an obscenity to at least some of the Generation Xers.
This is in fact why programming walkthrus are no longer conducted. Basically there are entirely too many programmers in their mid or early twenties who like me in 1975 decide they are real hot dogs but who unlike me have no decent Korean or WWII veterans as mentors who could as men break through the narcissistic bubble. All today's programmers have are Elder Brothers who have been playing the corporate game of self-aggrandizement, and who have for the most part lost this game, bigtime.
So this is why there is a connection, WaterBreath, and this is why I shall continue to interleave my coding recommendations with observations on the Big Picture.
Thanks for the clarification
I appreciate the time you took to write a thorough response. I understand, now having the explanation. I maintain that the short paragraph in the original post did seem like a non sequitur. With your extended explanation I see the connection you put forth is one of common cause, not necessarily cause and effect.
I don't really mind the political interleaving. But with all the backbiting these days, the abruptness of the statements in both your post and Joel's from a few weeks ago can easily come across as petty. Which, as your well-reasoned response shows, is not really the case, and is not a deserved label. I guess I think this facet of your point deserved more space than you originally gave it. I appreciate the Big Picture observations because few people in tech blogs are making them. But I think it does require deeper explanation, because so few people in the tech industry are thinking about the Big Picture.
I'm afraid I've possibly come across as a conservative or a Republican or whatever. For the record, I am neither. (Nor would I relish being called liberal or Democrat, however.) It was kind of a "last straw" response to the ubiquitous political "flamewar" we have here these days. I would have responded similarly had the interjection been anti-liberal or anti-Democrat. But I'd be hard-pressed to find an instance of that in any of the tech blogs I read regularly.
At any rate, thanks for taking the time to respond. And I apologize if I was overly hostile in my earlier comment. Maybe I could have elicited a satisfactory clarification simply by lending benefit of the doubt and asking for one.
Communication
I have read this exchange with much interest. My respect and appreciation goes out to both Edward, for always pushing the boundaries and going out on a limb, and WaterBreath, for engaging in a dialog in a calm and reasoned manner, attempting to meet Edward halfway even while taking issue with his post, instead of just flinging feces, which is so sadly the norm on the net (and of course Edward's response in kind should be acknowledged).
My real purpose for commenting, though, was to highlight the fact that I think WaterBreath hit on the root issue:
I don't really mind the political interleaving. But with all the backbiting these days, the abruptness of the statements in both your post and Joel's from a few weeks ago can easily come across as petty. Which, as your well-reasoned response shows, is not really the case, and is not a deserved label. I guess I think this facet of your point deserved more space than you originally gave it. I appreciate the Big Picture observations because few people in tech blogs are making them. But I think it does require deeper explanation, because so few people in the tech industry are thinking about the Big Picture.
I posit that a writer must go to extra effort to meet the reader halfway, or even more than halfway, if the purpose is to communicate and even persuade. This is doubly true when going out on a limb, or drawing connections and using analogies that won't be obvious to a lot of people, or when treading into potentially inflamatory territory. The connections between the dots won't always be obvious.
Anyways, I didn't mean for my comment to sound like a lecture. Cheers to both Edward and WaterBreath and everyone else out there trying to add some civility to the net conversation.
Thanks for reading,
Dan
For my part, I will be more careful...
to manage the transition from code to politics.
Crude XML tags with tagname politicalStuff is one geeky way of alerting the reader. A better way would be a gentle transition paragraph.
Some readers of Build Your Own .Net Language and Compiler have complained indeed about little political timebombs in the text (the CODE shipped is completely free of ANY hidden messages: I count it as a sacred obligation to avoid anything stronger than an Easter Egg, and the Easter Egg you get when you first run the code is fully documented in the book).
For example, to order events in my narrative of Fortran, I use the declarative syntax in the phrase "Nixon invaded Cambodia". This is what Nixon DID in May of 1970, but it is still impossible to say it in a technical environment, almost as if America were in some measure a Communist country in which certain propositions were unsayable.
Indeed, George Soros has said that life in contemporary America, and the use of language, reminds him of life in his native Hungary, under Communism.
Nixon invaded Cambodia. Rusty Calley and his men slaughtered innocent women and children at My Lai. But because you couldn't refer to these as facts at computer conferences or, God forbid, job interviews, a 14 year old girl was raped and murdered by United States Marines this year in Iraq. Those who do not learn, and speak, history are condemned to repeat it.
In signing on as a newbie programmer, I realized in 1975 that many of my managers, despite their fashionably long hair, the clownlike polyester suits of 1975, and their drug-addled lifestyles, drew the line, not so much against offtopic political speech, as against any real admission that America had killed 4 million Vietnamese (and 50,000 of its own) for "a bright shining lie".


Incompetent president != incompetent programmers
I'm no Bush fan. And I certainly won't argue that incompetent programmers aren't plentious in America (can't speak for elsewhere, myself). But I'm sorry I just don't see the link between them. Multiple people can very easily all be short-sited for very different reasons, many having nothing at all to do with politics or even general philosophy.
I have no gripes about the programming-related content of this entry. I just don't see why we must now drag international policy, and by unavoidable implication personal politics, into contexts where they just don't have any relevance. (Joel Spolsky, for all his wisdom, is unfortunately guilty of the same: http://www.joelonsoftware.com/items/2006/07/29.html ) I have to say, when you guys pull this stuff it kind of feels like a bait and switch. Even when I agree with your political views.
Incompetent software development was rampant before the Bush presidency, and it will continue to be rampant afterward. He has and will have little to no effect on the competency of programmers in America. Especially considering, in my personal experience, most of us programmers are liberal anyway.
My explanation is two-fold:
1) Demand for software-creation-related work is too high for the population of competent people to meet it. Incompetent people fill the copious gaps.
2) Incompetent managers (nearly ubiquitous now) couldn't identify a competent programmer if one slapped them in face with the stack of printed source they mandated.
Incompetent people are everywhere (incidentally, so are competent ones, though there seem to be fewer of them). And they aren't all republicans, conservatives, or Bush supporters.
It doesn't matter whether you intended to conflate these things to this extent. The way the entry was written, you did. That's my complaint.