63 comments

[ 3.3 ms ] story [ 140 ms ] thread
A confused meandering no-beef essay, if I ever read one.

"Is programming hard or not? Current evidence is not compelling nor diverse enough to answer this question in general."

Might as well read a shampoo ingredients list.

The repeatition and wording is also like trying to pad or stretch a homework essay to fit the required minimum length.

In conclusion, programming is a land of contrasts. Thank you.
Certainly not a good article. I'd really like studies that test the hypothesis that "programming is hard". Whenever this topic comes up there is a lot of anecdotes, usually about people who have positive experiences but that doesn't show anything about the population!

My personal hypothesis (if I may) is that programming is hard for a majority (>50%) of people. It starts with reading: Reading comprehension is hard for many people. And reading code is way harder than reading text, which means programming can only be easy for those who read well. And that's just the start. You also have to have a sense of logical thinking and finding solutions. Many people have trouble with that as well. So just from these two aspects (reading + logical thinking) I'd already say that programming is indeed hard. At least if we use the general population as reference.

Programming is hard because you need to have a lot of pre-acquired knowledge before you can even start to delve in the only interesting aspect of it, which is the logic solving.

Is like having to learn everything about how a lego brick is built (from the materials used, to the production processes used in the factories, to the composition of the houses where lego bricks are used) before being able to play with them. Everyone (aside from an very motivated subset of people) would find Legos "Hard" in that context.

Having to memorize a myriad of arcane incantations, software setups and a million "standards" will always make programming look "hard" and daunting, even for those who have an interest in logic problems, but not have an interest on babysitting a computer.

My first programming, instead of opening excel and making a plot I did (after setting up jupyter lab with anaconda):

    import pandas as pd
    
    data = pd.read_excel('my_excel_file.xlsx')
    data.boxplot()
Amazing! And then someone showed me a loop [1] and I was plotting the columns I needed from hundreds of Excel files. Crazy efficient! Programming clicked right away for me. It was exactly what I needed at that time. It helps tremendously that in Jupyter notebooks you can just type a variable (in this case `data`) and it shows you what it looks like, and it looks like... An Excel file (indeed, a table).

You know what is hard? Opening 20, roughly the same, Excel files and copying some of the data into a new Excel file without making any mistakes (and that includes Excel not reformating your data to something else, like a dd-mm-yyyy to mm-dd-yyyy or making a date out of your Gene names [0]).

[0] https://www.theverge.com/2020/8/6/21355674/human-genes-renam...

[1] The loop:

    excel_files = os.listdir('.')
    for excel_file in excel_files:
        data = pd.read_excel('excel_file.xlsx')
        data[['Column A', 'Column D', 'Column X']].boxplot()
The problem is that non-tech people have the exact opposite problem of what you experienced.

> copying some of the data into a new Excel file without making any mistakes (and that includes Excel not reformating your data to something else, like a dd-mm-yyyy to mm-dd-yyyy or making a date out of your Gene names

In your typical office environment, your regular analyst will run into issues where the date formatting is different between files, and there are one-off errors or issues here and there. In Excel, they are able to scan through and adjust as necessary. If you're asking them to figure out how to write the code to re-map and fix random issues in the data, that will be much more complicated to learn.

Yeah, this is probably true for many people. Still, I always offered people that click around in Excel all day a session with me to see what aspects we could automate. There is always a lot, but it never really sticks. Indeed, it is that dealing with edge case stuff.

I admit I did a lot of data.to_excel() -> fix some stuff and then -> pd.read_excel() again back in the day...

Everything is hard when one doesn't read the programming language manuals, or in this case, VBA, Lambda and PowerQuery.
> (after setting up jupyter lab with anaconda)

That right here is a very hard step for anyone who isn't an experienced software dev with some Python familiarity.

Anaconda gives you a UI where you can click Jupyter-lab and it will just start. That said, I'm not claiming the learning curve is not there. It takes some investing. But learning to work with Excel's PMT function to understand your mortgage and making some plots also presents a learning curve.
I'd argue that programming is relatively easy if you know what needs to be built. If you don't know what needs built or are unable to see the downstream effects of an implementation detail then you're in for a ride.
That isn't really true, software projects fails all the time even when everyone knows what to build. A recent well known example is Cyberpunk 2077, its engine couldn't handle anything less than the latest hardware causing tons of bugs.

If you know what to build and that thing is something trivial that many has already built before, then sure it isn't hard. But any time you try to push and deliver software doing things that other companies doesn't it will be hard. If your business suite covers more cases than all other business suites then that is impressive and hard, etc.

programming is easy until it's not.

when does it become not easy?

1. when something doesn't work the way it is documented as working.

2. when there isn't actually any documentation on how to do the thing you've been told to do.

3. when you don't know everything that was decided going into a bit of code that you're looking at someone else wrote and not understanding why it is like that.

4. when you are required to do something with the wrong tools for the job.

5. when to fix a problem you need to come to grips with some concept you are unfamiliar with and maybe nobody else you know is familiar with it either.

on edit: of course I forgot cache invalidation and naming things.

> The commonly held belief that programming is inherently hard lacks sufficient evidence

When was "The Mythical Man Month" published, again?

Programming is harder than most people, including programmers, realize. Unless, of course, you're talking trivial programs and don't care about defects.

Or put another way, programming is just as easy as bridge building. Just throw a plank over a stream. Don't mention Tacoma Narrows or other disasters.

But joke aside, trivial programming is harder than trivial bridge building. Anyone can move a plank. Many people have trouble understanding basic concepts such as mutability. I remember reading a paper by someone who tried to teach programming to unemployed adults, surprisingly many were stumped by something as simple as:

    a = 1
    a = 2
    print(a)
And that was after a few weeks of training. (Sorry, couldn't find the paper)
There's programming and programming at scale.

The latter is hard. The former doesn't need to be. Plenty of 8 year olds like me learned it on our own from magazines and math textbooks and manuals in the 80s and 90s with computers that got out of the way and let us use their BASIC interpreters or whatever was available.

A major reason programming at scale, a lot of what Mythical Man Month is about, is hard is the complexity of the system being created (it's too much for one person to keep in their head) and the inherent collaboration problem that follows from that.

Program complexity does not grow linearly. In fact, it theoretically grows faster than exponential; just consider the halting problem. Of course we use tricks and abstractions to reduce complexity and get stuff done.
Did I say it grows linearly? What’s your point here?
Let's look at who the author is: X is an assistant professor in the School of Computer Science, University College Dublin, Dublin, Ireland.

Oh, that explains it.

Programming may not be hard until you have to:

- work on a sufficiently large project,

- with actual clients,

- with actual deadlines,

- with a lot of people that have low level of knowledge and/or little incentive to do their job well (basically, they just want a check),

- with management that tries to optimize you as much as possible (ie get the project done with as little cost as possible),

- with management that does not care if your programming is correct, but cares only to hit their financial KPIs.

So if you want to compare it to construction, imagine that construction companies are not penalized for buildings toppling and people dying but only for the lost revenue from (now) missing tenants.

Then the construction company management tells you to build as fast and cheap as possible to crank as many buildings and be faster than competition, because that's what is going to bring in new clients to replace the ones that have died in toppling buildings.

You need to learn more about construction. Bridges are built for decades, hopefully centuries. What happens to rebars encased in concrete over that timespan is not obvious to anyone, otherwise inspectors would not have to purchase expensive equipment and condos in Florida would not be collapsing.
There are hundreds of thousands buildings like that. The threat of potential consequences causes construction companies to mostly do a good job, so that out of those hundreds of thousands of buildings we rarely see any toppling with people in it.

On the other hands developers are disincentivized to ship perfect working code. It happens every time they are told "Just fucking ship it!" and when they colleagues are rewarded for delivering imperfect code on time.

I myself think programming is more like tailoring. Art, science and skill all in one. And allowance for adjustments to get the perfect product.
Except you usually know how much it is going to take to tailor a shirt, a pair of trousers, a jacket, so on. It is vary rare that it suddenly blows up on you and takes way more time than it should.

And then the clients aren't usually changing half of the project as you go.

Or ask you to start "tailoring" before they know whether they want a leather bomber jacket or historical ball dress.

I'm sure there a quite a few seamstresses that would disagree with you on that one.
Tailor a business suit, and what you're saying is reasonably correct. Most of the decisions are made up-front. The primary concern is fit. Tailor a wedding dress, and the the process could end up looking much more like a software development project where things are changing as you go.

Of course, there are other issues at play. The software development project may blow up when unexpected issues pop up with the design or implementation. That is where the ideas behind software engineering come into the picture. You don't build a bridge or a dam without having a clear specification and you don't create that specification without doing considerable research first. (You also don't throw a team of junior engineers at the problem, expecting them to know every facet of what has to be studied and how to design it.)

(comment deleted)
I think the concept of mutability conflicts with what was taught in mathematics.

In particular, the equal sign in programming is not the equal sign in math. We used == for that.

The hardest thing for me these days is writing code that is easy to use in the 90% case yet simple to extend, esp. at the architectural level.. code that has enough guardrails to prevent lazy mofos like me from copy pasting off a cliff, but is also flexible enough to allow for other devs to properly deal with the supposedly exceptional cases that seem to pop up with alarming consistency.

Bonus points if I somehow can also make it so that adding new features to said code doesn’t require a significant refactor or doesn’t result in other devs piling on yet another gross hack in order to meet their deadline, despite the mildly concerning interest we already pay on our existing tech debt.

I'm glad that people are finally starting to understand that "Programming" is not a binary "you can compile the linux kernel" vs "that excel formula is cute". Almost every job I can think of that involves a computer (which is almost every job) would improve from a basic understanding of how a computer thinks, and an interface to speak it's language. Scaring people off with "Do you even Rust" just further moves away the world where a checkout-employee can macro a common order.
Programming is unbounded, it spans the range from so easy, a child can do it untrained, to impossibly complex.

So "it's hard" is the natural outcome, given we always strive to optimize our efforts, therefore we keep pushing programming beyond "it's easy" right until "it's hard" but before "it's impossible".

Therefore programming is most typically "hard" for most people programming at any given moment.

So what does it say and about whom, seems like a wrong question. It only shows a property intrinsic to systems (including social, biological, artificial and so on) and how systems balance themselves.

Replace "programming" with "maths" or "physics". Does the article make no sense? Exactly.

All intellectual pursuits are indeed hard and require a large amount of dedication and some natural talent to reach any amount of ability. We are standing on the shoulders of giants that we must comprehend. It took thousands of years and some of the brightest minds humanity produced to invent Calculus, why would it be so easy and intuitive for others to grasp without putting in the work?

Craftsmen in the old ages were always highly prized, since learning a skill to a degree you're actually useful is always hard. Anyone can learn how to make Excel formulas, but only a tenth of those would ever be able to reach the skill level to make an Excel clone. We don't say building rockets is easy because people are able to build bottle rockets, do we?

I agree with you entirely, but I think this is an if-by-whisky.

That is, you justify a yes or no by defining "programming," or assuming a certain context. Or.. you justify yes or no by defining "hard." There can be a lot of insight in an if-by-whisky, but I think the insight is usually in the justifications than the position.

You're implying (I think) an "is it difficult to become a good programmer?" Totally reasonable interpretation, and I think you're right about the answer. To be useful at a profession is, generally, "hard." It takes time and effort and talent, so yes. The author implies an "will students feel/report that programming courses were hard." His answer is "no," or not compared to other subjects."

In some sense it's the same insight. Programming is not unlike everything else. It's hard to be good.

That said, there is a schoolhouse sense of "hard" vs not that's not evenly applied. Math is considered a "hard" subject. Art, generally, isn't. This isn't universally true, but for the most part, no one stresses about their child or student's level of art proficiency. Ministerial advisors aren't pouring over comparative attainment in art and pedagogical research to try and improve it. That does happen at the specialist end, but not broadly like with STEM.

Educations systems treat most people as prospective non specialists in art, that might benefit from some exposure at a young age. No one gets berated because they're painting below a 7th grade level. Meanwhile, STEM is treated as an essential, employable skill that students are expected to be good at.

So... Should some level of programming be a general skill, like writing or math, that most people need? Or, is it a craft that most people don't need at all. I think that's the question. In one sense, I think yes, because programming is such a part of the world. In a more practical sense, I'd say no, because there's not easy places to apply basic programming skills. Doing something useful with math, like balancing the proverbial checkbook, comes up regularly. It doesn't, for programming.

I came to say this albeit in a less coherent & eloquent fashion. Context matters. Creating a simple program in Scratch? Yeah, most people can write something that runs in the language. Heck, take any "Hello, World" example and you can conclude that programming is easy. Writing good, real-world code is an acquired skill that takes many hours of practice & study and, from my perspective, even natural talent. What happens when you have barriers preventing you from achieving proficiency such as a learning disability or mental health issues? Too many factors, in my opinion, to conclude it ISN'T difficult.
> In a more practical sense, I'd say no, because there's not easy places to apply basic programming skills.

I'd argue that the reason there aren't many places to apply programming skill is because most people don't know programming. If you know almost everyone knows basic programming then you can build out public API's for almost every service taking code, and that would deliver tremendous value to everyone and coding would suddenly become a must for all people to learn since it helps so much.

But as is we spend trillions of dollars worth of programmer man hours trying to build out non-programming API's for doing simple tasks and wouldn't be needed if the target audience just had minimal levels of programming knowledge.

Maybe so, but that's a different sort of problem.
The problem you see talked about in CACM over and over again is that admissions to undergraduate CS are unstable. Students hear it is a hot field one moment, the next they hear you will be age discriminated against at 29.

ACMers want student to be less fickle and don’t get that if they’d made alliances with working developers to advance our mutual interests they’d benefit too. (E.g. those students would hear better stories.)

As it is you get articles like this that miss the point over and over again.

- I think the article didn't really say all that much.

- A generic statement like "programming is hard" or "programming is easy" isn't useful to anyone.

- I personally find it very difficult to extrapolate to other people. If something comes easily to me, I probably wouldn't even notice or consider that it's difficult for other people.

I question the premise of this article:

> Why does it seem routinely acceptable—arguably fashionable—to make such a general and definitive statement [as "programming is hard"] ?

The implicit premise in ^^^^ is that people call programming "hard" more often than they call other fields "hard". I disagree.

Consider the following statements:

* teaching school is hard

* practicing law is hard

* playing the piano is hard

* playing baseball is hard

* painting is hard

* accounting is hard

* working retail is hard

* writing is hard

*none* of those statements strike me as less likely than "programming is hard". Pretty much everything (done decently) is fairly hard, and thus saying so does not seem remarkable.

Piano is the best analogy to me.

If you sit down at a piano for the first time, the idea of ever playing a Chopin prelude seems almost impossible.

Of course it takes years of practice to gain competency, just like everything else in life.

This seems like a cultural flaw we have almost. We love to pretend people have all this effortless talent that they never had to work towards instead of putting value on the effort that got them to their level of mastery.

Many, if not most, people would not call any of those fields hard unless they were forced to practice it. A classic example is teaching, where some people seem to believe that bad teachers are bad because they are lazy (not that it requires skill). Even with law, those who claim it is hard focus upon the environment rather than the practice. (Law school is hard.) Pianist, there is lack of jobs. Baseball player, some may regard the training as gruling but not the game itself. Painting, a common excuse is a lack the creativity. Accounting, is seen as boring. Working retail, is regarded as being below them. Writing. Well, many seem to think it is easy yet few follow up by getting published.

Contrast that to STEM disciplines. Not only is getting there seen as hard, in the you need to be inherently good at it sense, but the practice is seen as hard, in the it is not worth the effort sense. On top of that, that accountant may take up baseball or painting as a hobby recognizing they don't have the ability (nor need the ability) to work hard since they will never practice it professionally. The majority of people who pursue STEM as a hobby already seem to be in STEM professionally.

STEM is hard since we can test for it. There are tons of bad teachers out there because they can be bad and we can't do much about it. But someone being bad at STEM is obvious and therefore all the bad people will get filtered out. That filtering is what people refer to when they say STEM is hard, the hard part is to not get filtered out, fields without such filters are not hard.

Of course even fields without filters are hard to deliver a lot of value in, but that isn't what people mean. A person being a teacher doesn't tell you anything about how good they are at teaching, but a person being a mathematician or physicist tells you a great deal how good they are at mathematics or physics.

> Many, if not most, people would not call any of those fields hard unless they were forced to practice it.

That's interesting – and very different from my experience. As I said in the GP, among people I know, pretty much no one would bat an eye at any of those statements; I'd expect more responses of "well, of course" than of "I disagree".

Maybe that's (sub?) culturally specific, though? I reside in the US – do you mind saying where you've lived when observing that people would not call those fields hard?

Urban Canada, so I would be a bit surprised if the responses would be all that different from the US. I have spent most of my adult life in education and recreation though, so I wouldn't be surprised if I'm seeing particular biases.
Doing anything well is hard.
> Who Says Programming Is Hard?

I do—working professionally, cranking out performant mostly bug-free code with useful features is hard. Authoring high-quality applications? Hard. Designing good frameworks? Hard. Understanding the requests of confused business people and turning them into acceptable business logic? Hard.

Some circumstantial evidence that programming is hard: software engineering a very well paid profession (and IMO with regard to social status, engineering is pretty average, so I doubt that has much of an effect one way or the other).

I’m straining to think of any easy activity in which having someone break your concentration for a moment can shitcan a half hour of work or introduce a mistake you may not find for months.

I find ACM to have mostly excellent content; this is IMO not a great representation.

I would add to what you said by saying that coding (that is, actually writing the code) may be easy enough and you can even get useful stuff made easily enough, but as I said in the github copilot discussions, writing code is usually the least important aspect of my job as a programmer and only a small chunk of what I spend my time on.

So, writing code might not be hard, but its also a kinda mechanical process. Most of the coding effort comes from translating your thoughts into what the language understands. Teenage me managed just fine, many kids start even younger. Writing code that does interesting things isn't, for many people and definitely shouldn't be for a professional programmer.

However, as a programmer, I spend much more time on other tasks: figuring out what the requirements even are, refining them, figuring out what that even means in terms of code, figuring out the overall architecture, how it fits in with other systems or existing code, what data formats it uses, how it handles faults, persistence, scale, security. The data model (what data I have, what shape does it have, how can I transform it, where does it live/is it stored, who or what owns it, who or what is allowed to modify it/add to it/delete from it, what is its lifecycle, are there any legal requirements around storage or retention). How it interfaces with the outside world (UI or API).

Besides the application code itself, I also spend a lot of my time on writing tests and on writing documentation.

All of these tasks are, in my opinion, a lot harder and more time consuming than actually writing the code.

Programming is hard because you aren’t done until it works. With most creative endeavors (writing, painting, making music, etc) you’re done when you think it’s “good enough”.

But with programming it either works or it doesn’t.

There's definitely "good enough" in commercial run of the mill programming. You can always improve a feature, make your tests more robust, automate something more, improve the UI etc. At some point, you absolutely do need to ask yourself "Is this good enough to be acceptable to the customer?" If you don't do that you will be working on the project forever. Also I think you are being dismissive of the professionalism of artists, writers and musicians when implying that they stop working when they think it's good enough. I play guitar and I can't help but compare music with programming. Both are very deep and complex skills. In fact I find music much harder than programming (but that could be because I have done programming lot longer than music.)
I prefer to say that programming is boring (to most people). It’s not particularly hard - what is hard is keeping enough motivation to learn it.
> The commonly held belief that programming is inherently hard lacks sufficient evidence

Is the fact that every software ever made is full of bugs not enough?

> Stating this belief can send influential messages that can have serious unintended consequences including inequitable practices

A self-admitted fallacy of adverse consequences in the very second sentence? That's not a good start.

I'd say programming isn't easy (as opposed to being hard).

What is hard is "the context". Bad documentation, cryptic error messages, not quite ready for primetime tools, persistent bugs, untangling some former employees' bad code, project managers with no backbone, management / leadership with bizarre expectations, clients unwilling to focus, unnecessary interruptions, etc.

Maybe this is an unpopular opinion but "hard" is very defeatist. As yoda once said "there is no try, only do".

Hard is a relative concept - watch a one year old try to walk or a two year old try to climb over obstacles. Yet we take these tasks for granted.

Mandarin is "hard" I'm assured by many people I meet who try to learn it as a second language, and yet almost 2 billion people can speak it...

Take any <skill> that you have zero background experience in and it will feel hard. If don't have the prerequisite coordination, something like belly dancing will completely melt your brain just the same way programming will.

I happened to find programming relatively straightforward (compared to other people) but I spent a lifetime in front of computers and videogames and then studied hard STEM at college.

Just in the same way a gymnast would find snowboarding much easier than your average joe.

Personal development is an individual journey, measure your progress against yourself and approach things without ego and your progress will be so much faster.

Not to nitpick, but the quote is "do or do not, there is no try"
whoops I googled it and found some memes and just took that without looking deeper! Thanks for the correction, have always sucked with quotes
We call STEM hard since most people fail to learn it to a passable level even when enticed with tons of money.

You can try to explain away their failures to learn in many ways, but the fact is that most people fail to learn STEM well enough to get a job doing it and instead they go to other fields considered less hard. You could say "They just didn't try hard enough" or "they just went into it with the wrong mindset" or "they just need to spend more time doing it" etc, but all of those things are signs that the field is hard.

Maybe modern education sucks? Maybe money isn't the greatest motivator for learning something? Maybe earning decent money in return for your skill at a specific skill has a high bar. Have you seen how hard it is to make money as a musician or an athlete?

Skill acquisition for something you don't have a good foundation in is hard. I have the perspective of being very good at a few things and spend the rest of my time learning new things some of which I suck at. I also know people who are in the top 0.0001% at things. Interestingly they find certain adjacent things super easy and other "easy" things very hard.

It's all relative, but getting "pretty good" at something isn't as hard as much people realise in the grand scheme of things - I think the problem is not many people have ever gotten good at one thing: go deep to go broad

Why is the acm publishing a feelings paper?
Is mathematics hard?

Well it depends, are you doing high school level mathematics, or are you trying to solve highly complex mathematical problems and/or devise new theorems?

In general, the aspect of programming where you write the code is not especially hard, at least not that much more so than basic writing.

However, like trying to write a decent quality full length novel, competently programming a large complicated system as part of a large team is definitely quite hard.

Although there are occasionally some very hard algorithmic challenges in programming, for the vast majority of programmers, their projects tend to fail for project management reasons. So, while solo programming on a small scale is by and large quite easy compared to many things (such as mastering a musical instrument, being a world class athlete, understanding complex physics, etc), working on a large programming project is certainly very hard and failure is quite regular in our industry.

As I've gotten older, I've come to realize that any type of work which requires many people to complete (things such as large construction projects, feature length movies, television series, large aeronautical projects, etc) is hard to complete on time and within budget for the same general reasons, management of a lots of tasks and coordinating lots of people effectively. The most valued programmers in the industry tend to be those that manage to make large scale projects succeed.

Programming a little solo project is not "hard", but successfully programming large complex systems is absolutely "very hard".

> Well it depends, are you doing high school level mathematics, or are you trying to solve highly complex mathematical problems and/or devise new theorems?

Most people actually considers high school mathematics hard. It is easy to forget this when we are talking about how easy or hard things are for the average person.

"Programming is hard" means not everyone can do it, and those who do do it got there by dedicated learning and practice.

For a start, if you think everyone is capable of programming then you need to get outside of your bubble. Second, if you think even the most gifted programmers don't have to learn and practise, you are wrong.

"Playing guitar is hard" means the same thing. Not everyone can do it: some people just don't have a good ear or big enough hands. But even the most gifted, say Jimi Hendrix, practised for literally hours every single day.

Do other fields have articles like this one? Is there a music journal asking whether playing music is really hard and lamenting that there aren't more people playing in orchestras? I might be wrong, but I doubt there is. Why is this unique to programming?

You can pretty easily and effectively do parts of the work of a doctor by looking up symptoms online and buy off the shelf medicine, it doesn't solve all cases but it solves a lot of cases. Does that mean medicine is easy? No.

And the bar for delivering value via programming is way higher than medicine. Just knowing how to do a few loops and print statements doesn't take much, but also doesn't help basically anyone do their job. In a few jobs it helps, but most people doesn't need that kind of simple text processing in their jobs, and those who do are usually already automated by dedicated programmers.

Edit: With that I'd say, people will learn to program simple scripts once we build enough interfaces for such programs to be useful to the average person. But as is we are making programming harder and harder via tons of build scripts etc making just setting up a project properly often take hours to days. We are moving in the wrong direction here if we want average people to code.