| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Browse archives
|
Coding on stilts
Submitted by reeses on Thu, 2003-02-27 03:13. | programming
One of my imaginary friends and I were talking this evening, and he showed me a particularly amusing bit of perl. It was something along the lines of
Pursuant to this lovely example, I will say that, early in my career, I thought I was the only bad programmer. Everyone around me was competent and knew what they were doing, and I was inept. At least half of that was true. After I learned enough to have the ability to recognise bad code, I realised that whilst I was still inept, other people were inept, too. Even those people who were competent and knew what they were doing, their code was dogslop also. After a while, when I learned to write less crappy code, I could see that everyone's code was poo. So, I thought some more about why code sucks, and I came to a very common conclusion. That is, good code takes time. It's like getting from LA to NYC by land. You can walk, and that takes a few months. (Rough estimate, distance = 3000 miles, average walking speed = 3 mph, average time walked per day = 10h) You can ride a bike, and that takes a few weeks. You can drive, and that takes several days. The convenient analogy to be made is that each increase in velocity is a result of using increasing quantities of leverage. Your legs are very simple machines. Your bike is made up of several very simple machines. Your car is made up of thousands upon thousands of simple machines. Of course, you have abstractions, blah blah. The thing with coding, is that you have this remarkable dependence on some very unsophisticated simple machines -- your fingers. We're constrained at the outset by typing speed, and the ability to serialise these thoughts we have about the structure of programs, so that it takes a lot of time to write code. You're thinking about a fairly simple object model, comprising maybe a hundred classes, something you can understand in fullness. Now, how much bloody typing is involved in getting that into a computer? If you're using Java, and you're not using inner classes, that's a hundred files! How quickly can you manually name and create one hundred files? We have leverage available, sure. You can use a less retarded language to do your development. It might even target Java. You can use Smalltalk, which doesn't have any files, but you still have to name those classes. You could use Lisp/CLOS, and leverage macros, but part of my complaint about bad code is its portability among developers. I hate to say this, but Lisp is historically not so good among huge teams. Code is hard to read, and someone else's Lisp code reflects their inner thoughts so completely that their code is extra-difficult to understand. So. My brave assertion is that most programmers are actually good, but the environment of commercial software creates a temporal constraint on the production of decent code, such that its decency is compromised in almost every instance. A new kind of leverage is called for, that takes us from the landbound age to the age of air travel. Or, more honestly, from the age of walking or running (or even walking on stilts) to the age of bicycles. No, I don't have the answer yet. Sorry for wasting your time. ;> Post new comment |
SearchSimilar entriesUser login |