HNHacker News
TopNewBestAskShowJobs

toadpipe

69 karma · joined September 14, 2009

submissionscomments
toadpipe··on Programming: Choosing the right name is everything
If you think about it, this is basically outlining. You know, that thing your English teacher always bugged you to do because it would make your essays more coherent. If one insists on writing code before understanding the problem, this is probably one of the better ways to do it. Recognizing that function names are obviously correct because you know exactly what their purpose is in relation to the whole is a good sign.

When I first started programming I wrote a lot of code without much planning, and it was good because it allowed me to learn a language faster by interacting with it. When what should have been pretty straightforward programs started to get unwieldy, I realized that I had to do something different. Now I go at it with pencil and paper before writing any code, and I find it much more productive and fun because the level of understanding is better.

It's so easy to write code and it seems like it's so easy to change, but with any non-trivial problem I think that this is really an illusion. There are many times when it is useful to write exploratory code without much planning, but I think it's mostly useful for learning a new environment or banging out a minor variation of something you've done before. Otherwise it seems more useful to do some fairly systematic planning, even if it's for a prototype that may get completely reworked over a number of iterations where requirements are explored and may change.

toadpipe··on A Square Is Not A Rectangle
I note that every advantage of OOP you cite is a modularization feature (even subtyping, since OOP basically conflates modules with types).

Clearly you are not entertained by rants based on my experiences, so maybe I should just cut 'n paste pg:

"Object-oriented programming is exciting if you have a statically-typed language without lexical closures or macros. To some degree, it offers a way around these limitations. (See Greenspun's Tenth Rule.)

Object-oriented programming is popular in big companies, because it suits the way they write software. At big companies, software tends to be written by large (and frequently changing) teams of mediocre programmers. Object-oriented programming imposes a discipline on these programmers that prevents any one of them from doing too much damage. The price is that the resulting code is bloated with protocols and full of duplication. This is not too high a price for big companies, because their software is probably going to be bloated and full of duplication anyway.

Object-oriented programming generates a lot of what looks like work. Back in the days of fanfold, there was a type of programmer who would only put five or ten lines of code on a page, preceded by twenty lines of elaborately formatted comments. Object-oriented programming is like crack for these people: it lets you incorporate all this scaffolding right into your source code. Something that a Lisp hacker might handle by pushing a symbol onto a list becomes a whole file of classes and methods. So it is a good tool if you want to convince yourself, or someone else, that you are doing a lot of work."

http://www.paulgraham.com/noop.html

toadpipe··on What is the point of building a business?
Really thoughtful article about balancing money with other things, purposelessness and self-discovery as a path to creativity, and creativity as a business strategy. All the things he talks about that relate to my experiences are dead on. I've had similar thoughts about keeping any business I start private, and bootstrapping instead of seeking VC funding. Who wants to optimize for current needs, or short term profits? I would much rather give people something they can't even describe until they see it for the first time. If it weren't for mathematicians who were mostly motivated by aesthetics, we wouldn't even have computers.

It's interesting that he describes having a kid as a way of avoiding or delaying self-exploration. I've found that self-exploration has been one of the hardest things I've done, but by far the most helpful, although I think that outside of solving personal problems the line between self-exploration and other sorts of exploration starts to blur. It's really about the exploration of appealing ideas for reasons that one probably can't explain to anyone else.

toadpipe··on A Square Is Not A Rectangle
It isn't because programming is too young, it's because programming is commercial. OOP retardation is new thing, it's not something we've been trying to do forever are are just now realizing is problematic. It was pushed by manager types who just wanted as many reports as possible and something that let them divide arbitrarily simple jobs among all of them, and it was allowed to grow by a class of programmers who didn't know any better because they were taught just enough to churn out the sort of programs that industry figured it needed. Now it's everywhere and even people who known it's crap just have to deal with it to get anything done.
toadpipe··on A Square Is Not A Rectangle
> OOP abstractions can sometimes be masochistic!

You think?

The article is a train wreck of analysis piled on the train wreck of "OO Design", which is itself a train wreck of an attempt to promote reuse by modeling code with data types, which is itself a train wreck of an attempt to imagine what hypothetical programmers in some hypothetical universe might find "useful" as masturbatory aids, hypothetically speaking. (This is not actually true - OO[D] is really an attempt to commoditize programming.) Most of the comments here are just dumping more trains on the pile. The abstraction shitheap is so high at this point that we can barely even remember that we are supposed to be solving some kind of actual problem.

The best part of the article is when the author acknowledges that the code might not actually need to be thread safe and so avoids wasting his time with that particular assumption. There is nothing else to be salvaged. A square is not a rectangle? Goodbye mathematics - what is the point of a type system again? More to the point: what planet are the users of this API from? Obviously not this one, and just as obviously no one knows or cares. Not ONCE does the author stop to wonder what services the actual users actually need; it's only about what this guy thinks MIGHT comply with some random "design" rules. One wonders if the users even exist as anything other than just another abstraction, and wondering about what problems those users might actually be trying to solve is right out.

Object Oriented Design can be seen as a case of reusing a cliche and butchering it at the same time, with the cliche being the shooting of ones self in the foot, and the butchery being the placement of said foot squarely upon the face of beauty immediately before pulling the trigger.

← PreviousPage 2 of 2