Whatever Happened To Programming?
Mirk writes "In a recent interview, Don Knuth wrote: 'The way a lot of programming goes today isn't any fun because it's just plugging in magic incantations — combine somebody else's software and start it up.' The Reinvigorated Programmer laments how much of our 'programming' time is spent pasting not-quite-compatible libraries together and patching around the edges." This 3-day-old article has sparked lively discussions at Reddit and at Hacker News, and the author has responded with a followup and summation.
Programming is becoming nothing more than cutting and pasting, especially with languages like java, that provide libraries that do "the hard stuff" and let programmers concentrate on "programming".
Programmers are now a dime a dozen. I can find 10 people who can cut and paste available on the internet and modify it to do what they want.
Good programmers on the other hand, are few and far between.
It seems everyone wants to be a "software engineer", but nobody wants to focus on the "hard stuff", and instead chant "let java/X do it for you".
Go ahead. It won't bite. Some things are over-engineered.
Long live the BSD license
There's still lots of interesting programming going on, and lots of interesting new languages. The ''Magic Incantations' are the same frameworks you used to have to write yourself, and even then you generally only did it once. It's gotten a lot easier to share the common solutions now, and we're free to do the real work.
I think a better analogy would be to say that today's programmers are more like a Cargo Cult.
I'm already at the gunpowder stage. My code has been blowing up for years.
slashdot. where don knuth is an idiot because he cant grasp the awesome power of php
Do you mean the cretans that pass for programmers by banging together some JavaScript and PHP code snippets found by googling things like "JavaScript menus" to produce a website, or do you mean actual programmers? If the former, I agree, if the latter, well, no.
My blog
Reminds me of what Chuck Moore wrote once... that one needs to rewrite things from the start, to be near to the problem -- so near, in fact, that incredible savings in code -- and thinking -- can be accomplished, as well as new horizons discerned...
THE DUMBING-DOWN OF PROGRAMMING (1998): "My programming tools were full of wizards. Little dialog boxes waiting for me to click "Next" and "Next" and "Finish."...Dumbing-down is trickling down. Not content with infantilizing the end user, the purveyors of point-and-click seem determined to infantilize the programmer as well."
"Don't even try reinventing the wheel. This is not an assignment. Just use whatever code you can find."
In soviet Russia, God creates you!
It would seem to me that the argument is based on whether or not the wheel should have to be re-invented for each programming project. If the code is good, why not reuse it as a module?
Life is not for the lazy.
The article states that, no matter how important are things like unit tests, they are fundamentally in a supporting role to programming proper.
As someone who practices test-driven development and programming-by-contract, I fundamentally disagree. Tests, for me, is what defines the requirements and interfaces. The code itself is just the implementation. From the business logic perspective, HOW a program does something is secondary to WHAT it does.
Car analogy: imagine a programmer as a truck driver, and the project manager as the one who has his goods shipped. The programmer doesn't care much about what he ships (as long as it's not explosives or something like this) -- he cares about the route he's going to take to deliver those goods as fast and efficient as possible. That's all great. But the project manager doesn't care, nor should he. For him, the goods are the primary value, and the route the truck takes is the supporting value. As long as the goods arrive undamaged and on time, nobody other than the driver cares what route they went through.
We have a basic conflict of perspectives here. Programmers think it's all about how good their code is internally, and think that the coding is the most important part of the application, arguing that without that, the application obviously wouldn't work. But users and payers for that code do not care about those matters, they see a white-box perspective only. Just like the goods shipper, they care more about the goods than how they are delivered. And if the truck driver gets too bitchy about how and what goods he wants to deliver, it's usually easier to get a new truck driver than change your goods or shipping schedule.
I'm currently a J2EE (and C, but predominately Java J2EE) programmer, familiar with Hibernate, Spring, as well as the old school EJB 2 mess. I wasn't always a Java programmer. I've taught C and coded with it commercial. I also have commercially used a variety of other platforms from VB and Delphi, to Smalltalk, to C++.
Here's the core of the problem: The web is a horrible platform. I went from Rapid development drag and drop screen design in the late 90s to the abomination that is hand crafted JSP against shitty state based environments. Sure our applications are more scalable now, but I'm still hand crafting code to talk to a database object. There are tools out there that spit out mediocre code (hibernate tools come to mind). But nothing that I'm aware of spits out a good set of CRUD classes with corresponding unit tests. Why do we ever have to hand write this shit? (I haven't used Grails and Groovy extensively but I understand scaffolding has similar issues and not being as mature the people I've worked with have had to work around issues with transactionality)
Then you take a look at the GUI layer. Hand writing CSS and JSP? Really? In 2010? SHIT. Hand writing code for simple controllers. Never mind if you do actually end up doing anything non-standard in which case good luck getting into the guts of the documentation for Spring MVC or Struts or similar. And then you have to deal with having to redeploy your application to see simple changes OR using exploded views that don't update properly and leave you debugging a problem for 4 hours that should take 4 minutes.
It's a complete mess. It's WAY more complicated than it should be. I should be focused on the business problems - modelling the backend, getting the algorithms right for complex transactions etc. Instead there are people arguing that such simplicity leads to sloppy programming (usually mentioning VB as if the same programmers wouldn't have made a mess with something more complex). Well if you have nothing better to do than some stupid little dance just to get a web page up, that's your issue. For me that is a stupid statement. There's always a genuinely complex issue to solve without inventing one.
These posts express my own personal views, not those of my employer
"Knuth had his day."
Wow. Just wow.
First, I want you to write a work that tops TAOCP. Or at the very least show your check from Knuth for finding an error. Oh, wait, I highly doubt you've done either. It can be how you can express your imagination in ways that are beyond TAOCP if you like.
Next, write some software at least as useful as TeX.
Then, and only then, can you call Knuth an idiot.
I am officially gone from
Warning! Before you read the linked article or its followup too deeply, be aware they are not by Donald Knuth. Instead, the author has a brief quote from Donald Knuth in his first blog, and the other link is a followup story. So, "the author" referenced in the Slashdot summary is NOT Donald Knuth. I made the mistake of reading the followup article first, and then when I read the original, I found a brief quote from Donald Knuth which tipped me off to the fact that the author was not Donald Knuth, and as far as I can tell, Donald Knuth doesn't even know this author.
If I can be modded down for being a troll, can I be modded up for being an orc, or a balrog?
excellent programmers steal excellent code."
I stole this, and I don't know where it is stolen from!
One generation plants a tree...The next one gets the shade.
Then the squirrels show up and try to mine the bird feeders for freebies. Meanwhile the birds are ducking the guys who are learning to use blowguns.
I think the difference is like that between mathematics and engineering. Programming used to be more of a math, you were basically writing an executable form of a proof. Now programming is more about assembling all the previously developed tools to produce a useful result in the same way that engineers use a bunch of mathematical tools (that they may not necessarily know how to derive--and for that matter don't need to) to build a bridge. For a mathematical guy like Knuth, the engineering bit is a drag (for me as well) and the act of problem solving is the interesting part. I would even wager that to such a person the means (or methods of solving) are more important than the end result. The beauty is in the elegance of the solution, not in the fact that we now have a solution. Now programming is much more of an engineering task. The tools might as well be black boxes that we assemble in different ways to produce results. Another type of person likes this sort of thing (not me). These people are more interested in the ends, not the means. They are more driven to produce something cool rather than to produce something in a cool way. (Am I making any sense?)
Neither of these groups is better or worse than the other, just different. Both are needed for progress. There will always be mathematical problems to solve, and there will always be a need to apply the toolbox created by such mathematics to practical tasks with an emphasis on results rather than methods.
I've dealt with Chinese and Indian outsourced code before - it's rather interesting. They take fragments of code they find via Google, paste them together, and do the bare minimum of editing to make it compile and say 'okay, we've fulfilled our contract, ship it.' This is what suffices for 'programming'.
On the other hand, I am still solving interesting problems with real programming at my current company, so I still think it's a lot of fun. The key point is that the programming is part of the /problem solving/. Code pigs have no concept of problem solving, just making the program work (by which they mean compile, or matching the sample screens). Engineers are solving problems, and the program is just a part of that. At my present job they really don't care what language I do things in as long as the job gets done, because solving the problem in the most practical manner is the most important thing. In practice this means I use C for things that actually do require high performance and minimal memory usage (this is still an issue in embedded programming), Python for everything else that I can, and domain specific languages for things like servo controllers or FGPAs.
The 'pasting not quite compatible libraries together' approach is a Java/COBOL thing of minimizing the damage incompetent consultants can do. I've seen it time and time again - once an Enterprisey Java programmer encounters sufficient complexity, a hormone kicks in and they create a framework to simplify this complexity. It does so, initially, but eventually ends up being 2-10x as complex as the original problem they were trying to simplify. But they see this as a net positive because they have a new acronym to put on their resume.
So basically, like every single damn post I've seen on here lamenting the state of programming, and repeating every damn comment I've made again and again, it boils down to 'solve problems as efficiently as you can'. Absolute rules, in programming or religion, are for people who are too simple to handle complexity. This is the difference between an engineer and a code pig.
Not to mention that he can't grasp the awesome power of 300 APIs (sorry, "technologies") each with three letter abbreviation names starting with J that make up the resume of a typical Java programmer.
Agreed, but the problem is that most of those "technologies" are bloated, designed by committee, buzzword-loaded crap. The problem is *not* that we have found better ways to share code than we used to. I mean, I'm all for crafting beautiful, optimally efficient snippets of code that do one thing perfectly. But have you ever noticed that you can do things in a couple of hours now that 10 years ago would have taken weeks? Being able to cobble together a prototype fast is *hugely* useful and important. Now who was it again who said that premature optimization is the root of all evil? Hmmm...
I wish I could agree, but that's basically what is wanted today: Cheap people who can somehow slap together a program that kinda-sorta does what the boss wants.
At least in application programming you're seeing a trend that runs in this direction. You have a lot of RAD tools for instant webpages, instant databases, instant office applications. Of course there will always be room for "real" programmers in areas that either move too quickly to give RAD tools a chance to get a footing or where the problems cannot easily be split into neat little building blocks that can be slapped together with a construction kit.
But for most office applications, you don't even need a "real" programmer anymore today. Well, you'd need one to make it a sensible, fast and secure application, but let's face it, who needs that? Ok, they'd probably need that. But they don't want to pay the price.
We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
How many unique programming problems are there? The first guy that designs an efficient steam engine is a great engineer. What about the 100 guys after him that vary on his theme? What about the next 1000 or 10,000? Seems to me this is a complaint about no one inventing something as revolutionary as the wheel. Hey author - you can't, it has been done already! And as someone has already pointed out this is *not* from Knuth. This might as well get the 'Get off my lawn' argument then.
Slashdot, where armchair scientists get shouted down and armchair theologians get modded up.
"I think a better analogy would be to say that today's programmers are more like a Cargo Cult."
Responses to the recent MS-random-browser thread ("the faulty shuffle is close enough", "this guy's being pedantic", "knowing algorithms is a bad use of company time") are pretty good evidence of that.
http://developers.slashdot.org/article.pl?sid=10/02/28/1837223
We know where leadership by an anti-intellectual "strongman" who scapegoats minorities and likes boisterous rallies goes
The difference is maybe that you actually have to know why and how those theorems work. Because else you could not use them. Not knowing why a certain mathematical rule is applicable means that you cannot apply it, not knowing whether its use would be "legal" from within the mathematical ruleset.
This is not the case with library functions. All you have to know is what you want to accomplish, you drop that info into the help file, it spits out a function (most of the time not really the best one, but one that will more or less do the trick) and it will also tell you what you have to drop into that function to make the magic happen.
Now, math has been a while ago for me, but I cannot remember it being THAT easy.
We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
Machines today are fast. Much, much faster than what we need for programs to run.
Until you get slashdotted. Having a sharp increase in number of runs per second can show just how fast your program isn't. And look at all the fail-whales soon after Twitter caught on.
Memory amounts today mean that it is pointless to ponder whether you really need double linked lists or whether you get by with single linked ones. Or that you use variables smaller than DWords to store integers.
Until you try to shave pennies from a mass-manufactured part.
As a Presentation Layer guy I can tell you that I’m seeing a shift of the types of successful developers out there in the field. Those developers that can bounce around between different API’s and syntaxes are the ones that are in demand and those developers that know one technology or platform well aren’t.
I personally think it’s because of the fragmented nature of our target platforms. Programming for one platform is a luxury most programmers don’t have nowadays. This is why frameworks came to be and are used so heavily. Just abstracting the differences between platforms is enough for most developers to ditch “hand coding” and deal with the integration issues. Look at the popularity of Javascript frameworks like jQuery. Nobody coded in the way jQuery works before jQuery (the whole chaining thing, and anonymous functions), yet now more than 50% of websites (made up number) use jQuery.
To become a successful developer in the next decade, you must be a generalist. It’s a completely different way of thinking. You have to actively try NOT to learn too much of one platform for fear that it’ll bias you against all the other languages you’ll have to work in. For example, coming from more structured languages, seeing the jQuery chaining and use of anonymous functions would turn off most developers and they’d shy away from using it. However, it’s the best tool for the job currently, and not using it based on it’s weird syntax would be a mistake. Same thing applies to MXML, WPF, LINQ, C#’s var, etc and all sorts of new improvements to languages that people don’t use because they’re “different” and give you “less control”.
From the article: "...it’s a tedious exercise in impedance-matching, requiring lots of time spent grubbing around in poorly-written manuals that tell you everything the code already told you (because it was generated with JavaDoc or Rdoc or whatever), and none of the high-level stuff that you actually need to be told."
Ah, so the real problem is poor documentation.
I work all day in a programming language written by one of the biggest software companies in the world. The documentation is complete, detailed, and accurate. For large things, there's an accompanying "concepts" doc. While I have (very rarely) run into something that needs clarification in some sort of corner case, I've never come across any part of their language, libraries, or objects that wasn't thoroughly documented, with examples.
On the other hand, I don't think I've ever come across an open source product that had barest minimum of documentation. What does exist is typically out of date (and observations of such are met with "read the changelog!" - lame). There's certainly nothing that explains the major concepts in the code - at best, there's some guide to functions or objects, and usually that only because it can be autogenerated. Sometimes there are examples - though more typically, a few mini examples are the only documentation.
Documentation writing sucks. Programmers don't enjoy it. It's highly amusing to me that the two areas that are the least fun for programmers - GUI design and documentation - are the two worst parts of open source projects.
BTW, in the 80s, programmers were excited about OOP because it promised rich object libraries. Someone would create objects to do X and we'd never have to code X again - no one, ever! And now everyone complains programming is just stringing together libraries.
Advice: on VPS providers
Whining about "infantilizing" the end user? WTF? I get really tired of the elitist attitude that some computer types have that computers should be hard. They seem to think it should be some sort of almost mystical priesthood that you have to work at for many years to be allowed in.
Bullshit.
Computers are tools, nothing more. they exist to allow humans to do tasks that we otherwise can't do, or at least can't do easily. As such they should be as easy and accessible for an average person to use. Ideally they would require no training and be usable by even extremely mentally challenged individuals. The more we can simplify them, the better. They should be adapted to work how we want, we should not have to adapt to them.
Well guess what? Programming is another part of that. Ideally, we'd have computers that could more or less program themselves. People would tell the computer what they wanted it to do in plain English (or other natural language) and it would figure out how to make that happen. Obviously we are a very long way away from this, but the easier we can make it, the better.
Even as it stands currently, where you do need training/practice to be a good programmer, there's a lot to be said for easy tools to make parts of development quicker and more robust. The user interface would be a good example. If all UI elements have to be coded in C++ and then compiled to see how it works, it is going to take a long time to develop and change. Goes double if others (like artists usability experts) are working on it as well. You write it, compile it, send it to them, they test it, write up problems, send it back, etc.
Much better to have a simple GUI interface for laying out the GUI. You can make changes much quicker and easier, and see what you are doing to confirm it is what you want. Also, should the design change, a redesign is much faster and easier.
I really get tired of this idea that computers and programming should be hard, that we don't want it accessible. Bullshit. You should want that in general, because it makes it available to more people, and even for you, because the ease of use can save you time. Yes, it allows for people to write programs that don't understand it. Deal with it. The microwave allows geeks everywhere to easily prepare food without understanding how to do it. Doesn't mean we should demand everyone become a master chef and cook all their food from only elementary ingredients. That will give you tastier food, but there's something to be said for having a meal ready in 5 minutes with 0 effort.
Programming is becoming nothing more than cutting and pasting, especially with languages like java, that provide libraries that do "the hard stuff" and let programmers concentrate on "programming".
I really need to worry about opening and closing JDBC connections, parsing SOAP calls by hand or writing socket listeners. Sure its interesting, the first 4 or 5 times you do it. But I have better things to do with my time that rewriting the wheel for every fucking application. That shit is already there; learn to fucking us it.
And sure this crap boils down to pushing tokens between multiple apps, and CRUD database apps. The banging out of code is rarely the tough part.
The tough part squeezing the requirements out some dumb-ass business analyst, who can barely speak the language, much less actually put something in writing and doesn't even know or care about the fucking applications they're writing requirements against.
Or perhaps you don't care about getting your airline reservations, airfare and seat assignments correct when you book them.
If someone is passing you on the right, you are an asshole for driving in the wrong lane.
It seems everyone wants to be a "software engineer", but nobody wants to focus on the "hard stuff", and instead chant "let java/X do it for you".
I don't see the problem there.
Not every programmer you're going to run into is going to be a brilliant assembly level kernel hacker. Some of them (these days anyway) are going to be mediocre. Using libraries that a lot of people have looked at, found the bugs for, and documented so that the "hard stuff" works reliably gives these people a chance at success. Not everyone coding these days is some uberhacker. Code that works is really the bottom line here.
Reason being - programming has moved from a small niche position to an industry. And the demand for programming is large. And the number of people who can perform difficult tasks like coding in assembly is small. Wizards are rare and demand is larger than that. So how do you bridge that gap? Easy languages and tools and lots of libraries to increase the number of available programmers that can meet the demand. Let the gurus stick to the heavy stuff and let the mediocre programmers spend their time solving tasks in their ability range.
It's simply market pressure.
Weaselmancer
rediculous.
for some people it may seem less fun, if so nobody is stopping you for writing libraries yourself (except for maybe employers who are concerned about something called 'return on investment') however another take is that programmer's don't get stuck with writing mundane functions that have already been written 1,000s of times. the use of libraries can deliver more reliable applications in less time. library developers can specialize in a particular function and good libraries do functions much better than 'write it yourself' a classic example is encryption libraries...although easy to write your own encryption library, there are so many ways security can be weakened that you may not realize unless you are specializing in this field. in the end programmers are developing better applications, and delivering them more quickly use of libraries live on...
But, you realize, that's entirely true. Here's a vaulted car analogy:
American cars were historically bolted together, or welded together from standard parts supplied by thousands of different suppliers. If you wanted to, you can take an old American truck, completely disassemble it, replace almost any piece and re-build it from the ground up. That business model worked when the design costs of a car were vastly greater than the manufacturing costs. By using standard parts, those costs were spread out over many years and many models. Each part was not optimized to each car, but it was cheaper to manufacture and maintain regardless. American car manufacturers stuck with this, due to several factors, even in the face of superior competitors with vastly different processes. We all know how that turned out.
Today, almost every piece of a car is custom-designed, not shared with other models. Robots weld auto bodies into a single piece. People spend more time working in the design phase, not as much in the manufacturing. Trimming excess materials from the design is nearly a science. The cost of repairing or rebuilding a car is prohibitive compared to the cost of simply buying a new one. American car companies that failed to adapt, along with their parts suppliers, are going bankrupt.
Now, is one model superior to the other? No. They each have strengths and weaknesses. Asian workers were not necessarily better-off than American workers, despite their technological advantages. Asian automotive companies evolved in an environment rich in talented labor and poor in natural resources. They used design and lots of mental "work" to conserve natural resources. American automotive companies evolved in the opposite environment, poor in skilled labor and rich in unskilled labor and natural resources. They used natural resources and unskilled labor to make up for lack of skilled design work.
Ideally we would all be best off if we lived in an environment rich in natural resources and talented labor, while still conserving both. Technology, correctly applied, can help us achieve this. But only if the advances of technology are not negated by the proliferation of unskilled labor or wasteful resource consumption.
"I assumed blithely that there were no elves out there in the darkness"
The probability that a theory predicts correctly, gets higher when the theory gets simpler.
The probability that a program is useful in new situations, gets higher when the program gets smaller.
This has been proven mathematically with algorithmic information theory.
However, Keeping It Simple, Stupid, is very hard and costly, and most people have an instinct for hoarding that gets in the way.
Kim0
As another writer of crappy code:
:).
The advantage of using libraries is it means you write less code.
The less code you write, the fewer bugs you create, and less code you are directly responsible for fixing and documenting.
Yes the libraries won't be perfect, but in general they should be less crap than your code (especially if used and fixed by many others).
People who like "writing everything" themselves should use stuff like Lisp- programming languages that are powerful because they allow a programmer to personally write all sorts of stuff.
The rest of us should use languages that are powerful because they allow the programmer to NOT have to personally write all sorts of stuff
The "real programmers" can sneer at us, but we'll have completed the project way before they have finished writing the BIOS, bootloader, operating system, libraries and editor so that they can actually start writing the "real program"...
They're probably right; it probably would be better if they re-wrote it.
It's not because of what badasses they are or what terrible programmers their predecessors were, contrary to what most people believe in their heads. It's because it's easy to see what a program is supposed to do once it's done.
The reality is hardly any software is finished as the exact same project it started as. Requirements get changed at the worst possible times, the scope redefined, the timelines shortened. And yeah, at that point getting a working product out is the most important thing. Rewriting it probably WOULD result in better code, which may or may not be justification enough for doing it.
And hey, there's also a good chance those same things happen to them on their rewrite. Oops.
I think the guy's point was that Knuth wrote that in the 70s, and it's now the 10s - a gap of forty years in which he has capitalised off his earlier work but not really brought anything that revolutionary to the table since. His original work stands as a classic, bring together a vast amount of highly relevant information and algorithms for the programmers of the 70s/80s. It has a lot less relevance in this age because most of his work is now part of some standard library or framework.
I've written plenty of things as useful as TeX but that doesn't mean I'd call Knuth an idiot.
All those moments will be lost in time, like tears in rain.
My main point here is that I have seen WAAAAAAAAAYYYYY too many arrogant programmers talking from their bum about how much better THEIR code would be if only THEY had a chance to rewrite it.
The same is true for everyone from novelists to plumbers to aircraft designers. The second time through generally yields a better result; it's just frequently not an option. This doesn't make anyone arrogant, it's just life.
Crappy code is code that people other than the original developer(s) can't maintain. Some degree of elegance is implied therein.
Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
The arrogance stems from the emphasize on THEIR code, which THEY are rewriting.
Yes, people learn from other people's experiences. But some seem to think it's only them that do..
Truth arises more readily from error than from confusion. -Francis Bacon
"Now, math has been a while ago for me, but I cannot remember it being THAT easy."
The whole problem of modern mathematics is exactly this. It is not organized in an efficient manner. Programmers are not algorithm writers. Programmers are organizers -- and this is very important to understand. If one of my programmers would produce code that is that badly documented, that badly organized as mathematicians -- I would fire him.
And this is the main misunderstanding that TFA has. Writing algorithms is just a minor part of our job.
The "real programmers" can sneer at us, [...]
That's not about it.
As long as you understand what you write, it's fine.
The problem is with the newer generation of Java/C# who: can't write their own algorithms thus inevitably depend on libraries, manage to have problems integrating the libraries together and (worst) do not understand how/why the stuff works.
the BIOS, bootloader, operating system, libraries and editor
That's a misconception about the "real programmers".
The difference between the "new programmers" and the "real programmers" is that later were still taught math and computer architecture - former were taught only syntax of a sandboxed programming language. Later know why/how software/hardware works at least in general, former have to rely on book which tell them that it would works.
Those who are actually try to reinvent "the BIOS, bootloader, operating system, libraries and editor" are not "real programmers": those are last remaining artifacts of the DOS times, the times when it all fit 64K.
All hope abandon ye who enter here.
The code base I work on would be improved by a rewrite. But in doing so it would actually be a matter of putting more effort into using the libraries (they do too much manual string manipulation for example that could be done using existing library calls; it's Qt based stuff).
At the same time it would cut lines of application code and make seeing the algorithm easier. I've just swapped 2500 lines for 850 lines whilst increasing functionality.
Cost benefit wise it's impossible to say in advance was it worth it.
I agree from a different view that goes like this. Good programmers/software engineers are expensive so companies like to pay cheaper people. To enable use of cheaper people tools and processes are introduced.
One such tool is languages that have buckets of libraries or core tools that the new people merely have to extend or tweak.
Knuth is lucky that most things he needed didn't exist then so using libraries wasn't an option. If everything he needed already existed he'd have picked a different area to work in.
You presume that a month or twenty down the line the original author can still maintain it. Most crappy code that doesn't holds as true.
The thing is, most people want to rewrite the code because it is too hard to understand. In which case they probably don't understand it when they do the rewrite and end up making at least as bad mistakes as the original authors.
_If_ they fully understood it, in most cases it wouldn't be so hard to just attack the most problematic parts and improve them - for example in quickly written code there is often a lot of cruft where only a few lines can be changed to make the code simple, smaller and overall better while being almost certain that it still does _exactly_ the same thing (if necessary under a few assumptions documented with asserts).
Admittedly this might end up with everything being rewritten, but with an understanding of the old code and the new code, with change control, and a way to do regression testing where you can say: the bug is in these at most 100 lines of code, which reduces greatly the debugging costs of the rewrite.
The difference is maybe that you actually have to know why and how those theorems work. Because else you could not use them. Not knowing why a certain mathematical rule is applicable means that you cannot apply it, not knowing whether its use would be "legal" from within the mathematical ruleset.
This is not the case with library functions. All you have to know is what you want to accomplish, you drop that info into the help file, it spits out a function (most of the time not really the best one, but one that will more or less do the trick) and it will also tell you what you have to drop into that function to make the magic happen.
Now, math has been a while ago for me, but I cannot remember it being THAT easy.
Except that there's a little issue with that nice theoretical model: leaky abstractions.
If you blindly use functions (actually methods) without an understanding of what they do internally, you will get burned.
This is why crap code deadlocks. This is why crap code leaks memory. This is why crap code can't run on anything except a specific version of Windows with a specific version of IE.
I'd mod you up if I had points.
Most of the code I call "crappy code" is stuff I'm asked to look at because somebody found a reproducible defect, I look at the code, blink twice, and wonder how we haven't had a "oops, all of our data is gone" scenario yet. Fortunately I keep daily backups around...
And, of course, when I ask the original developer to "fix it", they can't seem to figure it out, even when giving step-by-step instructions how to reproduce the defect, over, and over, and over, and over.
I've looked at some of these CGI apps "web developers" put out, and I wonder if they have any brain cells between their two ears. Just using some sort of MVC architecture would be a good start to fixing 99% of the problems I see with shitty web code, and at least keep things somewhat more organized (if only just slightly)
I've spent most of my career on embedded projects, and I'm still doing real programming, from bit banging an I2C or Dallas onewire bus, writing a custom assembly routine to provide a uC-OS-II task switch on an ethernet chip interrupt, or interfacing with some higher level Tcl stuff. To get the whole thing working mix in some shell, awk, python xslt, stir well, and get space qualified software. Oh and when all that starts to get boring, throw in some FPGA programming for a completely new way of doing things. I love my jobs!
Really, I think embedded software is often more interesting than most web-, gui- or server apps. The disadvantage is that you pretty much need an electronics degree (which I do), to be able to do it effectively.
Last but not least, it often pays pretty good, and the quality requirements are high, which means that there is time allocated to make something good. Google for 'Declic' on linuxjournal.com if you want to see what I'm talking about.
In programming the best version is generally the third.
The first is the "I don't know what I'm doing" version, which gets written by trying without much thought, ugly hacks, and without a decent design. Sometimes it does work quite well however, as despite not being very pretty it does what it's supposed to.
The second is "V1 is crap, but now that I have figured it all out I can do better!". Often a horrible mess, due to things like wanting to make everything modular, adding every feature possible, and using the latest cool tech and design patterns where they don't belong. Turns out to be slow, huge, buggy and overly complicated to use. There's even a name for this: "second system effect".
Based on the lessons learned from the lack of planning in the first and the excesses of the second, the third version has a good chance of being actually decent.
Few programmers start to write a program by designing a new OS, etc., so your analogy is simply a strawman. How about this car analogy: when designing a new car you are allowed to use only already existing auto parts; you are not allowed to custom design hardly any part on the "new" automobile. This is the real analogy with patching together existing library routines to build a new program: connecting together a set of already existing auto parts to make a "new" car. Does this better analogy still sound just fine? Obviously depends on what one is reusing and how complicated that was to engineer.
You know Programming is in trouble when being "the goto guy" has become a compliment, rather than an insult.
"My country, right or wrong; if right, to be kept right; and if wrong, to be set right." --Senator Carl Schurz (1872)
In embedded programming there's still plenty of opportunity for ground-up design. Eg. writing a new driver for custom or unsupported hardware, creating custom applications to do whatever unique thing your widget does, etc.
Yes, you tend to get into framework-hell on the GUI side, and occasionally in other areas as well. But even then I get a sense of pride knowing that I made these things work on a platform they were never designed for.
Do you mean the cretans that pass for programmers ...
What do you have against people from Crete?
... I'll leave peacefully.
Okay, okay
The higher the technology, the sharper that two-edged sword.