Live data from Hacker News

Ask HN: Bottom Up Programming Question

news.ycombinator.com

21–28 of 28 posts

Re: Ask HN: Bottom Up Programming Question

#21
The biology analogy immediately starts you off on the wrong foot. That has nothing to do with code.

In code, a function to trim whitespace from a string is perfectly functional on its own. When you actually try to write code this way, a rather large number of things can be written, larger than you may think.

Rather than write a lengthy explanation, my suggestion is to write a non-trivial program in Haskell. After that you'll better understand how it is possible to have many functions that can stand on their own, and I think this will help clarify the situation in your mind.

You can do this in any other language, but most languages make it relatively easy to reach out and touch lots and lots of state. Real-world evolved systems tend to do the biological equivalent all over the place, to a level even the worst spaghetti code ever written doesn't even come close to aspiring to, and do not resemble human-engineered code in the slightest. The Haskell advantage here is that it won't let you. Achieving this in other languages right now is a chicken-and-egg problem; if you knew how to do that you wouldn't be using the metaphor you cited.

(BTW, just to state it explicitly: No, I didn't directly answer your question. As others point out, it's not a very informative question. I'm going for the root of the problem, how you are conceiving of functional units in a program.)

Re: Ask HN: Bottom Up Programming Question

#22
post #17
post #5

Earlier quoted context omitted.

And if you think that is at all unrealistic, you're talking to the guy who wrote a program to print bingo cards whose 1.0 version, among numerous other faults, could not accommodate any printer but the default one ;)

You're an okay guy, but please stop mentioning bingo software constantly in almost every post you make. It's getting quite annoying. We know you write a bingo software, but please stop marketing it all the time. It's like being at a party and there is a mattress salesman who always brings the conversation back to mattresses and how he got started, and how he found good deals and so on. At the party, one can walk away…

My apologies, that wasn't my intention. For one it would be rude. For two it would be stupid -- it is highly probable that precisely none of you are in my market.

I am, typically, neither rude nor stupid.

I am also typically surrounded by people who care very little about startups, software, and the like. So when I'm around other people who care about software, startups, and the like, I tend to mention our point of commonality a bit. The one I bring up most often is my own because a) I'm intimately acquainted with it and b) unlike my day job, I can talk about it without getting fired if I say too much.

But I try to be a good citizen here. You may feel that I mention my software in almost every post. Memory plays funny tricks with us. I don't trust mine with anything important, so I checked with the indispensable external memory of searchyc.com, and it turns out that I've mentioned it about 18 times in the last 255 comments, which is about 7% or so. (Throw another 6 on the tally for other people referring to my software, if you care to.) Now I might be counting wrong, as I suck at it almost as bad as I do at remembering things, but I don't suck quite so badly that 7% is "almost every post".

(Sidenote: this is my 256th comment? There should be a geekiversary for that.)

Now I do try to keep my contributions to the community worth having me here. If you are to believe the last ~1800 ish times people pushed the "More comments like this one please!" button, I like to think I'm doing a halfway decent job. But I'll try to recalibrate due to your feedback.

Say, what would it take to get you behind the controls of your very own gliding duck?

Re: Ask HN: Bottom Up Programming Question

#23
post #17
post #5

Earlier quoted context omitted.

And if you think that is at all unrealistic, you're talking to the guy who wrote a program to print bingo cards whose 1.0 version, among numerous other faults, could not accommodate any printer but the default one ;)

You're an okay guy, but please stop mentioning bingo software constantly in almost every post you make. It's getting quite annoying. We know you write a bingo software, but please stop marketing it all the time. It's like being at a party and there is a mattress salesman who always brings the conversation back to mattresses and how he got started, and how he found good deals and so on. At the party, one can walk away…

Lighten up. He wasn't marketing. He was illustrating his point with his own experience.

Re: Ask HN: Bottom Up Programming Question

#25
post #22
post #17

Earlier quoted context omitted.

You're an okay guy, but please stop mentioning bingo software constantly in almost every post you make. It's getting quite annoying. We know you write a bingo software, but please stop marketing it all the time. It's like being at a party and there is a mattress salesman who always brings the conversation back to mattresses and how he got started, and how he found good deals and so on. At the party, one can walk away…

My apologies, that wasn't my intention. For one it would be rude. For two it would be stupid -- it is highly probable that precisely none of you are in my market. I am, typically, neither rude nor stupid. I am also typically surrounded by people who care very little about startups, software, and the like. So when I'm around other people who care about software, startups, and the like, I tend to mention our point of c…

Also factor in the times you say stuff like "in my business", or "in my area" without explicitely mentioning your software. Such statements seem to be you begging us to check your profile to see what your business is.

Maybe just 7% of your comments are about your business, but imagine you are talking to a mattress salesman, and every 10th sentences he says is about mattresses or about his business. Is that not a bit annoying?

I'm not saying what you are doing is wrong or that it does not fit the standards of the community. I'm just saying it annoys me personally. Nobody else maybe, just me. So I'm pointing it out to you, because it may also be annoying someone else, and if nobody mentions it, you won't be aware of this.

For example, you original comment on this thread was funny and insightful. The followup comment about bingo software was not, it just seemed like marketing.

Re: Ask HN: Bottom Up Programming Question

#26
post #17

Earlier quoted context omitted.

You're an okay guy, but please stop mentioning bingo software constantly in almost every post you make. It's getting quite annoying. We know you write a bingo software, but please stop marketing it all the time. It's like being at a party and there is a mattress salesman who always brings the conversation back to mattresses and how he got started, and how he found good deals and so on. At the party, one can walk away…

Lighten up. He wasn't marketing. He was illustrating his point with his own experience.

I'd love to, but I love my donuts!

Re: Ask HN: Bottom Up Programming Question

#27
You're always thinking top-down, even if "top" is just the next level up, as patio11's example shows.

I'd start with the "outside" of the program and work inwards. This forces you to categorize features as greatest to least important.

Refactoring can be significant -- much more than top-down. When used poorly, this can lead to the "design a 747 by building a wheel first" mentality, however. In other words, like everything else there's a place for it in the toolbelt.

You know, you can always model the problem domain first and still code bottom-up. The structure of the data is probably the most important factor anyhow, no matter how you code or what the qualities of the language are.

Re: Ask HN: Bottom Up Programming Question

#28
It's not that bottom up is good - it's that top down is simply impossible. Try to design a duck this way. It sounds very sensible, and you'll get a sketch in about two minutes. Not detail it: a couple of hours and 5 pages. Now continue to do this until you no longer have to backtrack: i.e. until what you discover about the duck in the current level of detail does not change at all what you have designed so far.

This will have two effects: first, the complexity of the design is equal to the complexity of the duck. That's A LOT of paper. And second, most mistakes in the design will cause the duck to fail spectacularly.

On the other hand, with bottom-up design you start with something which eats and reproduces, and improve it constantly until it has a beak and feathers and quacks. It will certainly not look anything like a duck at fist, but it is very likely that from the second or third iteration it will solve 80% of the client's problems. Sometimes even from the first, but that's just luck. It's messy, but it's at least doable.

Post reply on HN