Fixing the Pain of Programming
An anonymous reader writes "Light Table is a Kickstarted, open source IDE that's been trying to integrate real-time feedback into code creation. Part of their process has been figuring out how to improve the practice of programming, from top to bottom. They've put up a post about the troublesome aspects of programming that we've learned to deal with and take for granted, but which need solving if programming is to be made accessible for more people. 'Surprisingly, one of the most common difficulties we have heard from beginners is just running code. Even if we were to hand [a new programmer the whole source code] they would likely still struggle to actually use it. They have to install dependencies, compile code, start servers and open ports. At each step the errors are difficult to diagnose and time-consuming to fix.' But these problems extend to experienced coders, too: 'The simplest question we could ask about our application is "what is the current state." Bizarrely, very few programming environments give you any help on this front. Many programmers get by with nothing but print statements.' It's interesting to see somebody working on these issues, instead of accepting that they're the status quo and just part of the experience of programming."
I suppose this is addressed by the old quote "What is the best language for x?"
"I don't know. Which has the best debugger?"
I don't use mythology in a perjorative sense that this is all pretend or wishful nonsense. I use it in the best Joseph Campbell-Hero-With-Many-Faces sense, of a dim recollection of The Way Stuff Used to Be. This is a way of communicating an Underlying Truth about the Human Condition.
Apparently there was this era of things such as this Smalltalk that you allude to. Another version of this I hear from tales is Common Lisp. And Lisp Machines, specialized hardware and expensive workstations on which these "live images" would reside. So maybe these tales of direct, personal communication with the gods taking place with the Bronze Age Greek heros was not made up?
I guess there was this Barbarian Invasion of Bearded Men from the land called "New Jersey", especially a high place among the rolling plains they called "Murray Hill"? There is this piece of non-canonical scripture that our elders have been trying to supress known as the Unix Hater's Handbook explaining how we came to our present age and how this Golden Age entered into myth. Our elders warn against reading this heretical tract as dangerous to our souls.
As Jerry Pournelle describes the intervening Dark Age between now and that heroic or Golden Age, it isn't so much that people forgot how to develop and maintain a live image programming system such as Smalltalk or Common Lisp, it was that people forgot that such a thing could exist, and we attribute such things to gods or space aliens.
But then again, just as there is talk of ancient creatures in deep lakes in Scotland or in the remote sections of Zaire or Southeast Asia, there are accounts that Smalltalk or Common Lisp are still in use . . .
Yeah, but this perception of programming is the real problem.
Programming is not a "pain" if you do it right. Most of the times programming is a "pain" because you are working with code or frameworks written by mediocre programmers who probably shouldn't be programmers. The more accessible you try to make programming, the more mediocre programmers will be encouraged to write code and software that will be a pain to work with.
More than once I've seen the existing functionality of an IDE's automatic (or semi-automatic) compile, run and debug loop sabotaged by some (sometimes mandated) third party plugin which is supposed to make things "easier." I've watched as people poorly integrate Java Spring into a project and render it impossible to use Eclipse's debug button because of badly constructed project dependencies. ("Oh, if you want to run the project, just drop into the command-line terminal and type 'ant someobscurebuildproduct run'; it's pretty easy, why are you complaining?") I've seen people integrate Maven into a build process in ways which guarantee the project will stop compiling at some unspecified time in the future by improperly scoping the range of libraries that will be accepted. (And I'm not a fan of Maven or CocoaPods or other external dependency resolution tools anyway, as in part it presumes the external libraries we link against that are hosted outside of our source kits will honor their public interface contracts as minor revisions roll out, something which isn't always true.)
I've seen refactoring which adds code bloat (rather than simplifies the code). I've seen home-rolled configuration files which make code discovery functions break code discovery functions in Eclipse useless (do you really need to home-roll you own class loader, and specify Java classes in JSON?). I've seen plenty of 'voodoo stick waving' standing in for good coding practices. I've seen the lava flow anti-pattern obscure a simple Java RTL call in 20 discrete layers of classes, each added on by another refactoring that did nothing but make things more obscure.
I've seen weird blends of ant and makefile build processes which took a product that should have taken perhaps 5 minutes to build take over an hour, and build processes so broken that it was impossible to shoe-horn into an IDE without rewriting the entire project. ("Real programmers use 'vi.'" *shakes head*)
In fact, I have a working theory about programmers--and that is this: Most programmers think something should be a certain level of difficulty. And when a project turns out to be easier than they think it should be, they add artificial complexity until it reaches the expected level of difficulty. At some point, the project then needs to grow, making things organically more difficult--but the artificial difficulty added by the programmer who thought things were too easy before then simply sabotage the project. This is why quite a few projects I've worked on over the past 25 years have failed.
This is why I have no hope for any project that attempts to fix the problem. That's because the problem is cultural, not technological. We've had IDEs which had integrated debugging and one-button build + run processes going back to the 1980's--yet somehow we always glom to the next big thing, oh, and sorry about breaking your IDE--but this next big thing is SO important it'll totally compensate for the fact that we broke your edit/run/debug cycle.
Meaning I guarantee you the moment someone builds a fool-proof IDE which makes it brain-dead simple to edit, compile, run and debug an application, some damned brain-dead fool will come along, worried that things shouldn't be harder, and break the system.
When you spend 8 hours troubleshooting an open-source project to compile with a third party proprietary library it feels damn good to make it work. Coding is good because it's hard. The higher the stakes the more the accomplishment of that task will make me proud/happy.
Sorry, but no. If I have a known-working source tree that I want to work with just to tweak one tiny nuisance, I want to download it, open the project, make the change, then build/test/deploy.
In gaming, you have the concept of artificial vs natural hardness. When the game makes you do things just right with cheap tricks like an almost unavoidable trap right before boss / end of the level, when it requires pixel-perfect jumps, when it has insanely complex or tedious puzzles to solve, when it has time limits that require you to essentially memorize which buttons to mash and when, when it doesn't allow saves except at completely useless spots, the devs have made it artificially hard because they failed to make it challenging through more natural means.
In coding, we have the same problem, except we don't (usually) do it to ourselves intentionally - And you describe the most egregious example of it, configuring dependencies. I love a good challenge in writing actual code. Optimizing a tight loop cycle by cycle, importing useful numbers from a BOL file that everyone else has given up on, implementing a new (to me) algorithm in language X (I had a great time learning SQL for that reason, because most of my stock tricks from the C world don't translate well). Those all leave me feeling deeply satisfied at the end of the day. When, however, I can't even get the damned thing to build because I have to tweak 17 obscure dependencies:
"Oh yeah, it doesn't work with the newest 2.17.99 release of WidgetBlaster, you need to hunt down 2.17.94"
"Oh, you used the default build parameters for WidgetBlaster? Heh, you have to pass it the undocumented NoFleem flag at compile time"
"Yeah, NoFleem doesn't actually have any effect unless you install the not-obviously-required WidgetFleem library first"
"Well, you can't actually do it in one pass, since WidgetFleem has a circular dependency on WidgetBlaster - So build WidgetBlaster without NoFleem, then build WidgetFleem, then rebuild WidgetBlaster with the NoFleem option".
"Oh yeah, it only works in GCC 4.4.x, they changed the optimizer after that one and it breaks WidgetFleem."
"Did I mention you need to cross-compile it from an OS X machine because a critical buildtool doesn't exist on Windows?"
Shit like that drives me up the wall, I have zero patience for - or enjoyment of - trying to work around someone else's quirky build environment. If your code depends on obscure external packages, include them in your source tree, and include building them in your default project/makefile, period. I don't care if it makes your source tree 2.5GB, because I'll need to download them all anyway, and at least you know the right versions to include.