What makes programming hard? What makes building s...
# thinking-together
n
What makes programming hard? What makes building systems hard? I think we all have some of the "obvious" answers in our minds but I've never seen a list all in one place. I'm interested in hearing everyone's perspectives. Humour me! 😇
❤️ 3
I'll start. Assertion: A lack of feedback (or an "immediate connection", as Bret Victor would say) makes it difficult to reason about how a program will behave as it is being written or changed.
Assertion: Most programming languages give users too much "freedom" over how a program can be architected, and when many poor choices are possible, poor decisions are easily made.
Assertion: Text-based programming tools are an inappropriate foundation for the kinds of GUI apps that people often need to write!
Etc. Feel free to challenge any of these assertions or add your own.
k
It depends on what kinds of programming. For infrastructure the world relies on, I think your assertions are "first world problems". A more urgent list: http://akkartik.name/about
n
The problems listed on your site seem to be centred around making programs easy to understand, and easy to change. So are the ones I listed. I'd say they fit into the same picture 🤷
and I do agree with the significance of the problems you've listed
k
Yeah I think we have the same intent. My claim is that my focus is a bit tighter 😇 For example, Bret Victor style immediate feedback would be very nice to have if that UI didn't cost any code itself. But it seems more cost-effective to just use traces and provide some simple tools[1][2] to make browsing traces a little nice. Nowhere near the ergonomics of Bret Victor demos, but still huge power/weight ratio. In similar vein, a compile/debug cycle is totally fine. Text is totally fine. I still hanker after Bret Victor's ideas. And visual programming may well be the way of the future. But I think there's lots of low-hanging fruit that can provide more immediate gains and prepare the ground (for someone else, most likely) to build those great programming interfaces. Your point about 'freedom' I feel philosophically diametrically opposed to. I think languages and their eco-systems take away too much freedom these days. Freedom to modify the language, the compiler, to fork libraries in incompatible ways. Yes, if we give more freedom people will make more bad decisions. But I believe they'll also learn from those bad decisions, and so the average programmer will be stronger. Even better, their sense of taste will be grounded in real experience rather than cargo-culted rules about what not to do. [1] https://news.ycombinator.com/item?id=11854319#11855294 [2] https://mastodon.social/@akkartik/101401162367985540
Draft #2 of my argument 1. The way programs are written affects their trajectory as projects. If they're written poorly then they die sooner, or at least they grow senescent sooner, unable to react quickly in response to changes in their environment. (People who disagree with this will assume everything we talk about is just pointless yak-shaving.) 2. If you want to come up with a new way to write programs that gives them better trajectories, it still has to be written in today's context. So it doesn't have access to itself. So it is liable to turn into a mess itself, to not last long enough to change people's minds. (Because changing people's minds will take time. Maybe a generation.) As a consequence of these two assertions, I think before we can run we need to take some baby steps. We need to gradually minimize our dependency on -- and eventually wean ourselves from -- the current stack. We have to keep our new stack easy to rewrite. Keeping it rewrite-friendly requires first that we encode all design choices, so we (or those following us) are never wondering what will break if they change this into that. This seems far more important than whether they get immediate feedback on making the change once they've decided it's worth doing. Once we have a stack that is supple and rewrite-friendly arbitrarily deep into its life, I think it'll be far easier to layer on new interfaces that give us immediate feedback, try to move past text, and so on. It'll still take a lot of code, but we'll have the primitives to do a far better job managing large codebases. (Every month or two I daydream about an immediate-feedback text-mode UI for developing both an OS and an application atop it. So far I've successfully resisted the temptation to get side-tracked into that project.)
n
Bret Victor style immediate feedback would be very nice to have if that UI didn't cost any code itself
You're arguing that the problem with better programming tools is that there is too much code to write? I don't think that's true. Writing code is easy, the hard part is knowing what needs to be written... i.e. figuring out what the right design is.
I generally disagree with your assertion that to improve programming tools we need to iterate on the status quo. People have been doing that for decades now. Even if the intentions are pure, it seems likely that no revolutionary ideas will end up being realised, in the name of "pragmatism". I feel a better route is to start by inventing something revolutionary, and try to make it compatible with the status quo.
Aside: I think this is another example of where Slack's threading model is insufficient. We're (fairly) derailing the conversation away from the original prompt I've given.
👍 1
y
Some of what makes programming hard cultural reasons. Like what Jonathan Edwards calls “Hackocracy” - where it’s cool to succeed making stuff even though it is hard (“look I made a Wolfenstein 3d clone in Excel”) and the mainstream programmers don’t questions whether things really should be done the hard way.
👍 2
k
@Nick Smith 😔 that what you got out of my two long comments was "iterating on the status quo." I'm just emphasizing other dimensions besides visual programming and immediate visual feedback. I'm trying to explicitly encode every single design choice in a codebase so that it can be questioned by someone else at a later time. Because if you don't have that your visual infrastructure needs to be perfect and timeless, and it won't be. But I'll stop here. I haven't magically become a better writer overnight.
d
I love the distinction of essential and accidental complexity in “Out of the tar pit” (http://curtclifton.net/papers/MoseleyMarks06a.pdf). Seems like a lot that makes programming hard has nothing to do with the problems per se
💯 1
w
One inversion of this question is to ask: what kinds of programming models make building applications easy? In general, I think the big issue here is: does a system allow you to think at the level of the domain? A basic example is Matplotlib vs. Tableau. If you’ve ever made a chart, you know how onerous Matplotlib’s programming model is, how manually you have to specify a lot of that seems obvious or inferrable. It’s so much friction that making charts seems like a chore, and exploring data is instead done through printing out data points and other easier visualizations. By contrast, a tool like Tableau gives you the vocabulary to think at the level of the domain (i.e. data visualization). “Ok, I need to plot these two rows against this column.” Done. Tableau picks the right chart type and axis bounds+labels. It autogenerated the SQL query that’s needed to join all the tables together and select your data. And importantly, small changes to the plot are easy. “Hmm, I wonder what happens if we remove this class of data points?” Quick filter done.
It’s really effective (and a multibillion dollar company) because, I would claim, that is the level at which people think about visualization, and it’s a programming model that matches that level of abstraction. That’s why systems like Spark have won out over traditional HPC systems like OpenMPI as well, since they provide primitives that better match the language of the domain (distributed list processing).
n
Yeah I guess it's not always really clear what's "hard" until an "easy" alternative is presented
e
What makes programming hard for the average person is that it requires extreme levels of patience; the kind of patience that can do a 7000 piece jigsaw puzzle. The primary difficulty is caused by the 1 out of 500 or 1 out of 1000 word errors that are inevitably in the code. This tiny percentage of the total number of words represents the majority - if not 85% by some peoples' estimates - of the total effort of the project. So it is the flies in the ointment that are the hard part. If people could type in their programs, run it a few times to shake down the rough spots, and be done, it would be a fun occupation and hobby. These errors in the code are not caused by the computer but by the inhuman level of perfection that one must rise to, to match the computer. We need a more protective and assistive toolset. Error is the enemy to be conquered. My mentor at JPL, Prentiss Knowlton, wrote out his programs in longhand, and after bench checking them, put them on to punch cards and ran the program. For him, Fortran was like prose.
👍 1