Remix.run Logo
Writes large correct programs (2008)(johndcook.com)
141 points by gavinhoward 7 days ago | 109 comments
devjab 2 days ago | parent | next [-]

I’ve worked on and finished some extremely large programs over my years in non-tech enterprise. I’m also an external examiner for CS students, and I’ve regularly talked about how I think the curriculum is outdated. In Denmark where I’m from it’s rare to get a programming application from someone without a related degree. It wasn’t so rare 20 years ago, but I can’t remember when I saw one last. I agree that degrees, and especially CS, doesn’t guarantee that people can code. We use them mostly as a “safety net” in our hiring processes here in my region of the world. Basically you can view hiring the wrong person as the most expensive mistake you can make as a manager, and educations are a sort of risk management. You might think that the “can this person actually program” risk is worst for people who are fresh out of their education but there are a lot of factors which can play into it. Older devs may be set in their ways, maybe even religious about some sort of programming philosophy. On the flip side they will start producing value right away.

Anyway, by far I think the biggest hurdle in our industry right now is pseudo-jobbers like project managers, business process owners, scrum masters, various architects and what not. Not everyone is a waste of time, some of them do excellent work and function as exponential productivity catalysts. The vast majority of them, however, spend so much time engineering the process, architecture, whatever that their teams never ship on time or within budget. In this sense I think “correct programs” is hard to value. Because often the “incorrect large program” that doesn’t scale, will be much more valuable for a business than a “correct program” which never even gets the chance because it took to long to get out there.

globnomulous 2 days ago | parent | next [-]

> pseudo-jobbers like project manager

Just want to share my experience at the large, well-known tech company where I work: good product/project managers are worth their weight in gold, and I've never worked with a bad one.

Ours work at the intersection of backend, frontend, design, and product and help those of us who work in just one of those areas to coordinate, cooperate, and collaborate. I can't imagine trying to build such an enormous product or suite of products without them.

God bless them, every one.

intelVISA 2 days ago | parent | prev [-]

Those pseudo-jobs are a necessary evil in lieu of some sort of UBI imo.

Plus they're useful for sabotaging your competitors' TTM.

RealityVoid 2 days ago | parent | next [-]

I believe we're not at the productivity level that UBI requires, and those "pseudo-jobs" are a waste that could be redirected to some more constructive endeavor.

Even if you oppose consumerism and building stuff or whatnot, that wasted effort could be directed towards making products more sustainable or making better recycling supply chains or building nuclear power plants or whatnot.

2 days ago | parent | next [-]
[deleted]
bee_rider 2 days ago | parent | prev [-]

If we’re productive enough to pay them to construct roadblocks, surely we’re productive enough to pay them to do nothing.

Nevermark 2 days ago | parent [-]

I do believe that a tiny uncomfortable UBI would increase the overall economy, and benefit individual businesses by pre-weeding out a lot of posers.

If someone can get by on $500/month, and not feel the need to make the effort to live better, it would be a service to all to give that to them.

And on the other hand, a small fallback that makes it easier for individuals going through a rough spot to come back also helps the overall economy and individual businesses.

Finally, if we had a basic program like this started, the number could go up with overall economic productivity. Slow at first, but as the AI/machine economy takes off, especially with practical accessibility to off planet resources, a tiny fraction of the economic output would make everyone rich by today's standards, just at the time when human labor's economic value heads to zero.

jart 2 days ago | parent [-]

The US already spends $1000/month per citizen on entitlements. If you just give everyone $500/month instead, you'd eliminate the deficit and have a few hundred billion leftover to spend on colonizing planets.

andai 2 days ago | parent | prev | next [-]

I think UBI will actually lead to the mass adoption of pseudo jobs, at least for a while.

bee_rider 2 days ago | parent | prev [-]

I think this is true. At the time I’m writing this comment, yours is unfortunately getting downvoted, and I wonder if it is a wording issue or something.

There definitely exist some people who do these sort of jobs in a way provides a negative/roadblock only type of contribution. This isn’t to say nobody produced a positive contribution in these jobs. And it isn’t to say these people who produce negative value are, like, bad (everybody needs to eat and they didn’t ask to get born into a capitalist society).

But, there are definitely some folks who we’d be better off paying to not do anything.

aleph_minus_one 2 days ago | parent [-]

> But, there are definitely some folks who we’d be better off paying to not do anything.

An even better idea: simply don't hire such people.

bee_rider 2 days ago | parent [-]

They are motivated to be hired (the alternative is no money, possibly no home or good).

They aren’t dumber than the folks who really want to do engineering and make neat stuff, just differently motivated. And if those two groups get in an office politics battle, the group that isn’t distracted as much by engineering wins, right?

Terretta a day ago | parent | next [-]

> And if those two groups get in an office politics battle, the group that isn’t distracted as much by engineering wins, right?

Wiser than the average wisecrack.

aleph_minus_one 2 days ago | parent | prev [-]

> They are motivated to be hired

I am also very motivated to convince you to give me, say, 10,000 EUR or USD, will you hand me over the money? ;-)

Seriously: if you see no value in giving me this money, you clearly won't do that. Also: if the person you could hire does not bring more value for the company than he/she costs you, you won't hore the person, no matter if he/she is motivated or not.

immibis 2 days ago | parent [-]

Have you ever watched a scam in action? It's in my best interests to convince you (a boss) that I'll bring lots of value, and then not bring it, and continue convincing you that I am bringing it.

aleph_minus_one 2 days ago | parent [-]

If the boss or HR falls for such a scam, I clearly opine that they are not suitable for their job.

kaashif a day ago | parent [-]

I agree, but the incentives are lopsided. The prospective hire has a huge incentive: they get the money. But the hiring manager doesn't have any such incentive: it's not their money they're spending.

Even worse, they may in some way be compensated based on the number of people or teams they manage, in which case the incentives of useless hires and hiring managers are unfortunately all too aligned.

tsujamin 2 days ago | parent | prev | next [-]

This reminds me strongly of reaching the final year industry projects in my software engineering degree, and seeing a significant portion of my colleagues unable to develop software in any meaningful way.

There was a curriculum correction in the years afterwards I think, but so many students had zero concept of version control, of how to start working on a piece of software (sans an assignment specification or scaffold), or how to learn and apply libraries or frameworks in general. It was unreal.

ninkendo 2 days ago | parent | next [-]

In my senior design project in college, we were the only team that decided to use version control. I pushed for it, and set up a CVS server, mostly because I was the team lead and thought it was an easy way to feel like I was making a difference on the team. This was around 2005 or so, git didn’t really exist yet, svn was the new kid on the block and cvs was the established player.

I had never used any vcs before and neither had anyone on any team, but man was it worth it. The ability to have one place with the latest code and not emailing zip files around was great, but so was being able to easily roll back to a known good version if we caused an issue, compare changes, etc. By the end of it we all agreed it would have been impossible to do as well as we did if we didn’t do version control.

(This was a cross disciplinary engineering curriculum with ME/CE/CS, ours was slightly more software-heavy than other teams but everyone had some amount of software. Version control wasn’t taught and most teams just didn’t even consider it. It was a very different time from today.)

compootr 2 days ago | parent [-]

That seems pretty crazy to me (18M)

even for one-off scripts, I'll often throw them into a VCS because why not!

ninkendo 2 days ago | parent [-]

It was quite a bit harder back then to set up CVS. You had to have a cvs server running, there was no way to just “git init” and commit as you go and worry about pushing later. (At least not that I knew about then, I was pretty green.) Public hosting services were hard to come by, so it meant setting up a real server on the internet for your colleagues to use, figuring out auth, etc.

Nowadays version control is just so easy it’s easy to forget how good we have it. Not just in getting started locally but pushing to a public service that everyone can share (even private repos are free on GitHub nowadays, it’s a complete no brainer.)

bdndndndbve 2 days ago | parent | prev | next [-]

At the end of my 5 year computer engineering degree, one of the groups had nothing to show for their industry project. They had written an Android app with MySQL credentials hard-coded into it, and on the school's network they couldn't connect to port 3306. They could have changed the MySQL port, or they could have written a REST API, but instead they just gave up and it didn't matter.

I was already pretty disillusioned with my undergrad program but that was really the icing on the cake.

intelVISA 2 days ago | parent | prev | next [-]

Is that unique to software though? Plenty of people can follow a plan but still find it tough to start from first principles, I would think.

SkiFire13 2 days ago | parent [-]

I've worked for a bit in an engineering company and I was surprised at how bad they were at versioning their documents.

codazoda 2 days ago | parent [-]

Do you have any examples of correctly versioned documents?

SkiFire13 a day ago | parent | next [-]

Some big issues were:

- they were manually tracking the "versions" of documents by copy-pasting them in some folders - and even this was only done for each "release" of each document; inbetween two releases all the changes were made to files shared on Onedrive (possibly concurrently by two people, sometimes leading to conflicts with the loss of days of work) - at every release the changes since the last release had to be looked up manually every time and included in a document; this was very time consuming. - informations were duplicated in multiple documents, with no way to relate them; every change to one of them had to be manually replicated to the others.

I would argue that a correctly versioned document should not have these issue. A dedicated software should track all the changes, including individual ones inbetween releases. It should also provide a way to list them, possibly relative to some milestore (like the last release). Data should be kept in a format that's easy to automatically compare for changes, and hopefully in a deduplicated way so that changes need to be made only in one place. If that's not possible I would argue there should be a software that checks for inconsistent informations and prompts for them to be synchronized.

In the software development world this has mostly been solved by version control systems like git and continuous integration to ensure that the codebase is in a consistent state after every change.

josephg 2 days ago | parent | prev [-]

I mean, I’d say a markdown / latex / typst document in a Git repository would fit the bill.

I’m working on a history project at the moment which has reconstructed the version history of the US constitution based on the secretarial records and various commentaries written during the drafting process. At the moment we’re working on some US state constitutions, the Indian constitution, Irish peace process and the Australian constitutional process. We only have so many historical records of the committee processes, but it turns out to be more than enough to reconstruct the version history of the text.

andai 2 days ago | parent [-]

Fascinating, what tools are you using to keep track of all that? (Also, are there any interesting practices involved here?)

josephg a day ago | parent [-]

All custom tooling. I should write it up at some point - there's an awful lot to say about the whole thing, both technically and historically. And the data shows that there are several things apparently taught in American schools (like the idea that the final text is a compromise between the Virginia plan and New Jersey plan) that are simply wrong.

MrMcCall 2 days ago | parent | prev | next [-]

Our final CS course, Operating Systems, was in C, after all the previous courses were in Pascal. Luckily, I had already gotten access to various Unix systems and had taught myself C (thanks, K&R !!). And I say luckily because it was expecially lucky for my SWE group members who would otherwise have not graduated. I was already 10x at that point because of early access and passion for the craft. Most if not all of them had already decided that programming was not their career path, so it was in everyone's benefit and happiness.

Funny enough, there was no version control at our uni (a pretty good one, but not primarily technical), and that OS we tweaked for the course was the current version of Tanenbaum's Minix that Linus transformed into Linux. 20 minutes for a recompile and test loop to fix that stupid mistake in the semaphore logic was painful, but that's life on a 286.

It took real passion to want to bang through that learning curve. It really weeded out the folks who were just looking for an engineering job, at least for the handful (4) of people I knew in the program.

aleph_minus_one 2 days ago | parent | next [-]

> It really weeded out the folks who were just looking for an engineering job

Wanting an engineering job means that engineering is such an important part of your life that you desire that your job (i.e. many hours each day) centers around it.

The breed of people that you mentioned to be weeded out were not looking for an engineering job, but for some well-paid (often management) job that formally requires engineering qualifications, but where the daily business has barely to do anything related to engineering.

MrMcCall 2 days ago | parent [-]

In this ~40yo case, I'm guessing it was more of a "I got into a very prestigious state university because I busted my butt in high school and I've learned that CS is a high growth industry."

The talented and hard working folks got in and found that studying algorithms at the beginning of the 3rd year from a textbook was doable, but designing and implementing a significant software system (or tweaking an operating system) in the 4th year is a whole other level.

It's just that software design and engineering is really a unique beast. I mean, it is the most difficult engineering on the planet, because every single other industry and discipline depends upon it.

ninkendo 2 days ago | parent [-]

It certainly should be the most difficult engineering on the planet, yes… but IME the standards for quality are so low that it’s a pretty easy gig. You’re expected to slap together stuff that barely works and fix things later. That’s now how any other engineering discipline works, or at least not nearly to the same degree. Also it’s hard to observe how hacky software is from the outside, so it’s easy to get away with a terrible mess of code that would nauseate anyone who looked at it. Most of the time management doesn’t even care.

Watching Practical Engineering on YouTube is a pretty illuminating experience for me as it as it shows the extreme care that goes into projects from the outset, how much planning is involved, how much we’ve learned from centuries of experience building things, and how even despite all of this, things can still fail spectacularly. And when it does, there are independent reports done by thorough investigators, who find the real root causes and carry the knowledge forward for future projects. It makes me sad that Software isn’t treated this way. Yes, we get things off the ground fast, but we don’t learn from our mistakes, we don’t conduct thorough investigations into failures, and often people just release things and move on to the next job.

Software may be a more complicated and “difficult” discipline but it sure isn’t treated like it.

MrMcCall 2 days ago | parent | next [-]

Its difficulty and uniqueness is why it just hasn't been 'engineerized' or 'engineerified' yet. It's still a craft, as opposed to an engineering discipline. As such, that means the quality of the software produced by any shop is going to vary according to the organization's standards, which is their combination of management and engineers. Sometimes management is very business-schooly in their perspective, sometimes more engineery. That boundary layer and how it is treated by the top of the hierarchy makes all the difference.

I was summer programming in an IT department in the late 80's; it was under the auspices of the comptroller, simply because the org didn't know where else to put it. Management was still figuring out which department would have the budget/cost stuff allocated to it. You can forget about engineering excellence or even semblance of IT knowledge.

Everything since then has been the (in)organic growth of IT in the situation that, for the vast majority of companies, IT is simply a cost whose benefit is hard to quantify, especially to the money guys, who are always the ones in charge.

jart 2 days ago | parent | prev [-]

Planning and "extreme care" makes sense if you're building a bridge. Professional software engineering is more like a demolition derby. If you want to be successful you should focus on building fast and breaking things. It wouldn't make sense to blow up a bridge right after you've constructed it, but with software you can do just that. For example, I was just using American Fuzzy Lop a moment ago to break my symbol demangler. It was able to find eight ways to make it crash in a minute. So I fixed all those and let it run for a couple hours and it found another. Tools like this are a superpower. It's also fun to write torture tests and DDOS your own infrastructure. If you don't break it then someone else will.

jart 2 days ago | parent | prev [-]

With that kind of build latency, you're weeding out people who don't want to spend their whole day on coffee break.

MrMcCall a day ago | parent [-]

Yeah, I guess. I rather enjoyed those days but was always craving more power to just get on with it.

And those build times were nothing compared to waiting for a long SQL process.

It's all really just determining whether the data flowed properly or not. From a C64 BASIC program to an OS component to a database's tables, it's all just data flowing from one place/form to another.

neerajsi 2 days ago | parent | prev [-]

I was an EE undergrad. The formative project for me was a competition to see who could make the fastest digitally controlled maze solving robot.

The key that gave my team an advantage was the humble ASSERT. If the robot got off track, it would stop in place, blink a light, and show a line number on a digital display.

I've been working in and around Windows for a long time, and I'd say asserts and crash dumps are the two things that allow us to improve our quality given that we're still mostly using C/C++.

herodotus 2 days ago | parent | prev | next [-]

When I was a prof (many years ago), I was working on a database for a political campaign. The code was a mess. I asked a couple of my colleagues (successful comp. sci. profs) to help out. It became clear very quickly that there are two kinds of comp. sci. profs: those who can program and those who cannot.

Thorrez 2 days ago | parent | next [-]

One of my computer science professors when his laptop wasn't connecting to the projector: "I hate computers."

saulpw 2 days ago | parent | next [-]

That's one of the ones who could program.

downut 2 days ago | parent [-]

Oh dear this hits way to close... Get deep enough into the machine and you come to expect the (in this case minor) disasters.

nickpeterson 2 days ago | parent | prev | next [-]

You enter the field with youthful exuberance, but long years fighting the war leaves you jaded.

coliveira 2 days ago | parent | prev | next [-]

Why do you think people become CS professors? One of the reasons is that they don't like working in the industry and maybe don't even know how to program.

cma 2 days ago | parent [-]

Don't most just straight track through undergrad/masters;phd/postdoc without ever entering industry?

cornel_io 2 days ago | parent | prev [-]

That sounds like the correct response if he knows anything about the field: shitty peripherals are an unsolvable problem from top to bottom. The hardware sucks, the software sucks more, there's absolutely nothing you can do to fix it as an end user (unplug it and try again is where "debugging" ends), and the production chain will never improve along the quality axis because the margins are tiny and people are very price sensitive.

almostgotcaught 2 days ago | parent | prev [-]

> those who can program and those who cannot.

Everyone in my PhD cohort that couldn't write code worth a shit stayed in academia and everyone the could went into industry because the money was way better. So it's quite natural.

spondylosaurus 2 days ago | parent [-]

Those who can't do... teach?

Terretta a day ago | parent [-]

Those who can't do... tech?

// See thread above about UBI vs. tech nonsense jobs. Any industry driving seven figures per head has room for a quite a few before people notice.

hnthrowaway0328 2 days ago | parent | prev | next [-]

Can absolutely relate and understand.

I taught myself C++ by writing games with SDL2.

The first game -- snake took about a couple of hundred lines and I put everything in one .CPP file. And I felt pretty good.

The second game, well, I forgot what it is, not Tetris nor Breakout, but it was complex enough that I realized that I need to put code into header files and source files.

The last game of that project was a Ultima-spinoff. I even used the same sprite sheet. The complexity completely drowned me. I was constantly asking myself how should I arrange things properly so I don't need a lot of global variables that every file can see, because naturally the Game class needs to see and know all other classes, and the Renderer class needs to see and know many other classes too, etc.

Eventually I dropped the project. A few years ago I picked it up again and figured out something that is close to Entity - System (not ECS just ES). I didn't complete the project but then firmly believe that it was the right architecture, and I was simply too burnt out to complete it.

This year I learned about ECS from pikuma. I think it's over complicated for small-medium games. Anyway I'm trying to say that I agree that writing a 10,000 line project is way more complicated than 10 1,000 line projects.

wavemode 2 days ago | parent | next [-]

Unrelated to the central point of your comment, but I've also found that a simple entity system is usually perferable to ECS for smaller games. ECS aids performance, but performance usually isn't what you're struggling with in a small indie game. You're mainly just struggling to organize your code, and just need something simple to help manage complexity.

randysalami an hour ago | parent | next [-]

I built an ECS from scratch back in 2019 using C#. It was my first programming project in earnest and I was 19 at the time. Fortunately, I committed to version control and sometimes I still look at it: https://github.com/randyselimi/ECSRogue

I came up with everything on my own and I don’t know how I was so inspired then. Most of the ECS code is in a folder tilted Partis (that was the name of the ECS system I wanted to develop)

randysalami an hour ago | parent [-]

Probably my favorite piece of code is in ECSRogue/Partis/Entities/EntityIndexManager.cs. I’d love if someone with more experience could critique this code and my implementation. Keep in mind, I just transferred from community college and hadn’t even taken a single programming/data structure course

LoganDark 2 days ago | parent | prev [-]

Minecraft is an entity system and it seems to work just fine. (Fun fact: Forge Mod Loader makes Minecraft an entity component system.)

immibis 13 hours ago | parent [-]

having things called entities and components isn't doing ECS. Minecraft is a traditional OOP class hierarchy of entities, which (with Forge) have a Map<String, Object> whose entities are called components.

In the technically superior Fabric ecosystem, you can add fields directly to the entity class using bytecode modification instead of having HashMap overhead on everything. Accessing them is a bit roundabout, but in a way the JIT compiler can optimize.

jart 2 days ago | parent | prev [-]

Adopting an existing well-established style guide is a good way to make these sorts of questions go away. https://google.github.io/styleguide/cppguide.html

harimau777 2 days ago | parent | prev | next [-]

It seems to me that in other areas of tech, companies generally hire electrical engineers, mechanical engineers, civil engineers, etc. On the other hand, software companies feel that they don't need to hire computer scientists.

Then periodically there is a discussion on Hacker News that boils down to "all of the other engineering disciplines can make reliable predictions and deadlines; why can't software?" or "why is this company's code so shoddy?" or "why are we drowning in technical debt?".

Perhaps the these are all related?

bckr 2 days ago | parent | next [-]

Is your working definition of a computer scientist similar to a civil or electrical engineer?

To me, a computer scientist is someone who studies computation. They probably have the skills to figure out the run times of algorithms, and probably develop algorithms for solving arbitrary problems.

A software engineer is what I would call someone who can estimate and deliver a large software application fit for purpose.

harimau777 2 days ago | parent | next [-]

Theoretically, I think that the ideal situation would be for a Computer Scientist to be someone who performs fundamental research in computation while a Software Engineer (I think that something like Computer Engineer would be a better term) applies computation research. Analogous to the relationship between a Physicist and an Electrical Engineer.

However, as the terms are currently used, I see Computer Scientist as analogous to Electrical Engineer. On the other hand, it seems to me that Software Engineer is used to suggest that developers don't need to know the theory behind computation.

Therefore, I currently think that the way "Software Engineer" is used respresents a lot of what's wrong with current software development.

jdougan 2 days ago | parent [-]

What would be the computing equivalent of an Engineering Physicist?

pphysch 2 days ago | parent | prev [-]

I agree with this. A reason there is so much crappy software is because companies are hiring fresh CS grads expecting them to do real software engineering work. And they end up hacking it like they hacked it through school.

CS programs have gotten better at teaching real SWE skills, but the median CS grad still has ~zero real SWE experience.

chamomeal 2 days ago | parent | prev | next [-]

The definition of “software engineer” is SO broad though. If you’re maintaining a database/flight controller/cloud service, etc, you probably need real comp sci knowledge.

Hacking together an internal tool with laravel? Doing vanilla CRUD for a client’s web app? Probably not! No amount of comp sci knowledge will help you configure the millionth nested layer of Wordpress plugins.

So much “software engineering” is just plumbing. Connecting things to other things with a little bit of business logic in between. Honestly my job is plumbing, most of the time.

Terretta a day ago | parent | prev | next [-]

> [P]eriodically there is a discussion on Hacker News that boils down to "all of the other engineering disciplines can make reliable predictions and deadlines; why can't software?" or "why is this company's code so shoddy?" or "why are we drowning in technical debt?".

You'd find those also have more trouble with predictions when machinery needed for the goal hasn't been delivered before.

While most software jobs today are a bespoke configuration of a solved problem, the practice of software development is new enough to remember when most software was to solve a physical problem in a new digital way. Discovering/inventing are predicted on the search space being unknown in advance, making discovery and invention unlikely to be estimated accurately.

Note, though, most software today has already been writting, and the lack of predictable delivery is because the process doesn't rigorously enforce a "first, apply known/solved software" approach.

If, in software, materials use was third party inspected and certified as it is in physical or electrical engineering, you'd find software get more predictable.

2 days ago | parent | prev | next [-]
[deleted]
AnimalMuppet 2 days ago | parent | prev | next [-]

In other areas of tech, companies hire electrical, mechanical, and civil engineers, and not, say, physicists.

Software engineers are analogous to the other engineers. Computer scientists are analogous to the physicists.

Or take chemicals. When the question is "how are the outer-shell electrons distributed", you hire a chemist. When the question is "how do we make the stuff in multi-ton quantities without blowing up downtown", you hire a chemical engineer.

Part of the answer to your question is that schools are producing computer scientists and not software engineers. (It's not the whole answer, but it's part of it.)

harimau777 2 days ago | parent [-]

The difference as I see it is that electrical engineers are expected to have a deep knowledge of advanced mathematics, EM fields, semiconductors, control theory, electronics, etc. However, software engineers are not expected to have a deep knowledge of algorithms, category theory, formal languages, etc.

Effectively, companies treat Software Engineers like Electricians not like Electrical Engineers.

ahartmetz 2 days ago | parent [-]

More like they hire electricians but expect them to do electrical engineering. In a way, despite the name, a rigorous discipline of software engineering doesn't really exist yet. Or it does (cf. "The Right Stuff", Space Shuttle software), but the tradeoffs for that kind of rigor are not or don't seem favorable.

ahartmetz 2 days ago | parent | prev [-]

They are related to the discipline being quite new, I think.I have seen little correlation between studying computer science and being able to program well. That might also have something to do with the generally atrocious quality of CS teaching in Germany. Professors try so hard to avoid "dirty practice" in favor of doing quasi-mathematics that they ignore interesting and fruitful fields because (get this!) not only does practice follow theory, but vice versa as well, maybe even more so.

PaulHoule 2 days ago | parent | prev | next [-]

Computer scientists advance in their careers by writing papers, software developers do by writing programs. Some CS grad students and profs are genius programmers, but mostly CS researchers write a program that at best lacks the polish of a real product and at worst almost works.

When I was in physics grad school I had a job writing Java applets for education and did a successful demo of two applications at an CS conference in Syracuse and was congratulated for by bravery. I was not so brave, I expected these programs to work every time for people who came to our web site. (Geoff Fox, organizer of the conference, did an unsuccessful demo where two Eastern European twins tried to make an SGI supercomputer show some graphics and said “never buy a gigabyte of cheap RAM!”)

aleph_minus_one 2 days ago | parent [-]

> Computer scientists advance in their careers by writing papers, software developers do by writing programs.

Rather: Computer scientists advance in their careers by writing papers, software developers do advance in their careers by becoming managers.

:-(

readthenotes1 2 days ago | parent | prev | next [-]

I'd prefer maintainable programs of any size.

Other than non-trivial academic samples, the odds of a program needing to change over its lifetime or large, and it's current apparent correctness has little to do with someone else adapting it to the ever changing environment.

The number of times I've heard "it seems to work and we don't dare change it" is far too many

jffhn 2 days ago | parent | next [-]

>"it seems to work and we don't dare change it"

What they mean is: "we don't understand it and we don't have good tests, so there is a high probability that it doesn't work and that doing even the most trivial and seemingly harmless modification would cause an issue to surface, so we don't dare to change it else we wouldn't be able to pretend that it works anymore and might have to fix a lot of issues that we would have a hard time to even understand"

azeirah 2 days ago | parent [-]

Yeah.. The dumb thing is that it isn't even _that_ hard to fix this kind of stuff... It does take time and commitment though.

But _hard_? No.

riehwvfbk 2 days ago | parent | next [-]

But that is hard.

I think you (and many software developers) are using the word "hard" to mean "intellectually challenging", as in "Leetcode Hard". But things that require a lot of effort, time, and coordination of people are also hard, just in a different way.

Imagine a codebase with a wart. And yes, without enough tests. Let's say the wart annoys you and you want to fix it. But first you have to convince your employer to let you spend 6 months backfilling missing tests. In the meantime they will pay your salary but you will not work on the features they want. You will be working on fixing that wart. Convincing management: easy or hard?

OK, so you got them convinced! Now you can't just fix the wart. First you have to slog through a big refactor and write a bunch of tests. Staying positive while doing this for 6 months: easy or hard?

Do you stop other teams from writing more code in the meantime? No, so does the new code come with tests? How do you make sure it doesn't depend on the old "warty" interface? You need a compatibility layer. You need to convince other managers to spend their teams' cycles on this. Easy or hard?

OK, the refactoring is done. You release the new software. But, despite all your efforts you overlooked something. There's a bug in production, and when a post mortem is done - fingers point at you. The bug wasn't introduced in pursuit of a new feature. It was part of an effort to solve an obscure problem most people at the company don't even understand. To them, the software worked before, and it doesn't work now, and it's always those nerds tinkering with stuff and breaking things. Convincing these people to let you keep your job: easy or hard?

Perf review time. Your colleague shipped a new feature. You shipped... that thing that broke prod and nobody understands. Getting a raise: easy or hard?

And that is why these warts fester. The end.

polishdude20 2 days ago | parent [-]

The first easy or hard question should be "There is a wart that annoys you, is it really that bad?"

jffhn 2 days ago | parent | prev | next [-]

Some people learned to be fearful.

At some point I was working on a piece of software we knew inside out, had good tests for and often ran through hand curated stress tests for benches, analysis or just exploratory testing, so we had a high confidence in it and in our ability to modify it quickly and successfully.

Some day executives were visiting and we had to do a demo of our system interacting with another one. Until the last minutes we were happily modifying our code to make the demo better. A guy from other system's team saw that, freaked out, and went straight to our boss, who then laughed with us at how scared the guy was. It turned out his team was not at all that confident in their system.

marcosdumay 2 days ago | parent | prev | next [-]

Will you have time to commit to it?

If it's in a professional setting, it's most likely to not be a hard problem, but actually an impossible one.

dragonwriter 2 days ago | parent | prev [-]

It’s a hard social problem in many contexts, even if it is not a hard technical problem.

necrotic_comp 2 days ago | parent | prev [-]

I get this a bit at my job, and I think there's a difference between making changes (which I do a lot of) and being confident in the changes that you're making. The environment I'm in is completely fault-intolerant, and we're currently hamstrung by our hardware (e.g. no backups/no secondaries/etc.) so changes that we're making have to be well-reasoned and argued before they're put in.

Some people take that as being scared, but it's more like "you have to have made this work and tested it before putting it in."

brap 2 days ago | parent | prev | next [-]

One thing that’s missing: programs are mutable. A good programmer writes programs that are easy to maintain and extend.

alserio 2 days ago | parent | next [-]

Also, programs that are easy to extend will be extended until they are not. I don't remember the name of this Law.

billy-ilograph 2 days ago | parent | prev | next [-]

Agreed, a sign of good programming is that the program feels easy and natural to extend.

But there is a corollary, I think. A sign of good software development is that the program hasn't been extended in "unnatural" ways. That speaks to the developer's discipline and vision to create something that was fundamentally relevant to begin with.

andrewflnr 2 days ago | parent | prev [-]

Arguably, that's implicit in "large". A large program has most likely been extended several times, through its various stages of growth (the alternative being that it was written in a single pass, unlikely). This is tied to the author's point about managing complexity: complexity is the main enemy of maintainability.

PaulRobinson 2 days ago | parent | prev | next [-]

When choosing my degree back in the mid-1990s, I chose a BEng in Software Engineering, and not a BSc in Computer Science because I wanted to enter a career writing software, not a deep study of the theory of a branch of applied mathematics.

I was fortunate enough to have figured this out for myself, and whenever I met a CS grad in my early career it was obvious that the production of actual software terrified them.

Meanwhile I'd learned how to build (and how not to build), working programs in C including a simple OS on an M68k chip on a VME bus. I struggled with my final year project because it became too theoretical and CS-ish (trying to write a Prolog to SQL interpreter), so my grade took a hit, but I am really glad I entered industry with useful, practical skills that employers valued.

There's always going to be a place for pure CS, I'm glad it exists as a discipline, but more kids should understand the difference, and more colleges should be offering degrees that teach people how to software is built (and how to build software yourself), not just write papers.

ahartmetz 2 days ago | parent [-]

There is a problem insofar that software engineering somewhat exists, but it's more like CS for dummies. I think it's important that it actually teaches at a high intellectual level, just about something different. Let the students write an operating system, not some typical "manageable student task" bullshit. I've had an exchange semester in Oslo where they asked their students to do just that. First exercise: bootloader in assembly, second exercise: task switcher, third exercise: virtual memory, fourth exercise: filesystem - etc. It might have been one or two weeks per exercise, not sure. I actually failed most of the later exercises due to "other priorities", but I strongly felt that they were doing it right. The exercises were of course simplified, but a bootloader is a bootloader, task switching is task switching, virtual memory is virtual memory... no flourishes and some fixed buffer sizes etc, but the basics were there.

kleiba 2 days ago | parent | prev | next [-]

I graduated in CS at a renowned university over two decades ago. The faculty was very theory-oriented, basically every lecture was just theorem, proof, example - even the programming lectures.

As a matter of fact, there was only a single lecture I took (and which I didn't need to take) where we needed to use computers for the weekly exercises.

dang 20 hours ago | parent | prev | next [-]

Related:

Writes large correct programs - https://news.ycombinator.com/item?id=2556270 - May 2011 (32 comments)

brunoarueira 2 days ago | parent | prev | next [-]

When I was in the college, I'd made some consultancies to final students from CS degree which don't know how to program and even bad, the project was a simple copy and paste some classes, change attributes and manually test it. So, the main problem I'd seen was they don't have the ability to figures out the system and it's a basic expectation!

andrewaylett 2 days ago | parent | prev | next [-]

Computer Science is to Software Engineering as Physics is to Civil Engineering.

Software Engineering is to programming as Civil Engineering is to construction.

jdougan 2 days ago | parent | next [-]

Where does Engineering Physics fit?

cornel_io 2 days ago | parent | prev [-]

I don't think that's really true in practice, though at a competence level it absolutely is. Except at the biggest places, even low level programmers are both empowered and expected to make architectural decisions that have big impact on maintainability, testability, and performance. Addition of a bad-but-fast coder to a team is the worst possible outcome because they are really productive at screwing up the whole codebase in ways that will take even more time to peel apart. It's actually worse if their code is in the "functional but ugly" category, since PMs love those people as long as they're really fast, and they hate when other engineers complain about their work.

In construction, the random guy pulled in to swing a hammer may cut something wrong once or twice and waste a little time and money, but he's never going to be trusted to design the way the support beams hold up the whole house, so the damage is very limited. Software is not like that, we expect everyone to do some amount of design and engineering, whether or not they have any ability to do so. If as much software dev was driven by very low-level grunt work as is the case in construction, LLMs would already have revolutionized the field a lot more than they have; as it is, we've probably got another couple years to wait.

andrewaylett 2 days ago | parent [-]

This is true. Construction has had millennia to work out how to best organise its different disciplines, though -- I hope that it won't take software that long, nor that it'll need to be quite as stratified.

Software Engineers are usually quite capable programmers, while construction needs a lot more people _doing_ the construction than working as Civil Engineers, even if Civil Engineers wanted to join in.

That's not quite my point, though: we don't expect physicists to be good at Civil Engineering or construction, and we ought not expect Computer Scientists to be good at Software Engineering or programming. Having some understanding of physics makes a Civil Engineer better at their job, similarly for Computer Science and Software Engineering. And both construction and programming can be undertaken in isolation, but you're unlikely to be successful in your larger project unless you have Civil Engineering or Software Engineering expertise.

2 days ago | parent | prev | next [-]
[deleted]
jongjong 2 days ago | parent | prev | next [-]

My non-technical co-founder decided to teach himself coding in the past couple of years.

He can write quite complex logic but he tries to make everything as generic and flexible as it can possibly be and so his code is very hard to read as it invents a lot of concepts. He had to refactor it many times due to bugs or unforeseen technical limitations. Took him months to write. On the other hand, I wrote a script which does a similar thing as his but for a different environment (over a network with added latency, bandwidth limits, network instability) and only covers the essential cases but it only took me about a day to write and has been working without significant flaws since the beginning. Only had like 1 bug for a minor edge case. Also, my code is very short relative to his.

This experience reinforces a rule for coding that I've had since the past 5 years or so. It's basically:

"If you can't explain what your code does, from start to finish, in simple language to a non-technical person (who has the required business domain knowledge), and in a way which answers all questions they might have, then your code is not optimal."

Abstractions should always move you closer to the business domain, not towards some technical domain which you invented and only exists in your head.

The part about "start to finish" is important but doesn't mean "every line". You should have abstractions which may be beyond the non-technical person's understanding but you should be able to explain what each abstraction does at a high level without jumping into each function. You should be able to walk through any major feature by walking through your code, without having to jump around many files and without having to pause constantly to explain abstractions as

keybored 2 days ago | parent | prev | next [-]

I can definitely write a 1KLOC program to solve a 10-line problem.

Thorrez 2 days ago | parent [-]

>(When I talk about a program that is so many lines long, I mean a program that needs to be about that long. It’s no achievement to write 1,000 lines of code for a problem that would be reasonable to solve in 10.)

keybored 2 days ago | parent [-]

That is indeed the self-defeating/deprecation part.

MrMcCall 2 days ago | parent | prev | next [-]

The key observation about the Dunning-Kruger study is that humility, hard graft, and honest perseverance towards improving oneself are the three most important factors in achieving proficience in crafting large software data flow systems. How one designs and implements such systems is the art of any form of creative endeavor.

Designing and implementing large and correct systems is a matter of growing them, from small, trusted pieces into larger interconnected systems of systems, with ever greater care, knowing that the entire thing can collapse at any time if the wrong decisions are made or have been made.

PaulHoule 2 days ago | parent | prev | next [-]

There are many axes of complexity. Routine line of business systems, say an inventory management system for a car dealer, with a proper architecture costs should be additive instead of multiplicative, a certain cost to develop features such as “autocomplete control that draws values from a database row” and a certain cost to deploy that control. Double the number of screens using the same features and you double the cost but it feels like sub linear scaling because for the second tranche of forms you don’t have to redevelop the components and it can go much faster.

That ideal can be attained and you can be in control in application development but often we are not. When you are in control the conventional ideas anout project management apply.

As you get very big you start having new categories of problems, for instance a growing social system will have problem behaviors and you’d wish it was out of scope to control it but no, it is not out of scope.

Then there are projects which have a research component whether it is market research (iterate on ideas quickly) or research to develop a machine learning system or develop the framework for that big application above or radically improved tools.

A compiler book makes some of those problems look more regular like application programs but he project management model for research problems involves a run-break-fix trial of trying one thing and another thing which you will be doing even if you are planning to do something else.

Livingston, in Have fun at work says go along with the practices in the ocean you swim in (play planning poker if you must) but understand you will RBF are two knobs on run-break-fix: (a) how fast you can cycle and (b) the probability distribution of how many cycles it will take. Be gentle in schooling your manager and someday you might run your own team that speaks the language of RBF.

Unit tests put a ratchet in RBF and will be your compass in the darkest days. They enable the transition to routine operation (RBF in operations is the devil’s antipattern!)

They are not a religion. You do not write them because a book told you so, you write them for the same reason a mountain climber wears a rope and if you don’t feel that your tests are muda, waste as they say in Japan.

jongjong 2 days ago | parent | prev | next [-]

I think also, being able to write a minimal amount of code to implement any given feature is important.

However, your code should anticipate a range of possible future requirements changes... But then it shouldn't try to be a silver bullet either. Experience helps a lot as it allows you to see hurdles and limitations ahead of time so you know exactly how much silver you can put in your bullet for any given part of your code.

lincpa 11 hours ago | parent | prev | next [-]

[dead]

Missanna 2 days ago | parent | prev | next [-]

[flagged]

limit499karma 2 days ago | parent | prev [-]

> how to organize software so that the complexity remains manageable as the size increases

So John is missing the role of software architect here. Science, art, and development - 3 roles. Not all visits to the stratosphere are misadventures.

kosolam 2 days ago | parent | next [-]

Yet, some visits to the stratosphere are misadventures.

pphysch 2 days ago | parent | prev [-]

I think TFA is implying that good SWEs are good architects too, the skills go hand in hand.

I frankly don't believe in the "software architect" as a separate role. I've worked with "architects" who are clearly just BS artists because they know the jargon but have no skill to back it up and make difficult technical decisions regarding tradeoffs.

limit499karma 3 hours ago | parent | next [-]

Good SWE can do all 3. The three distinct skill sets are orthogonal to individuals' skills.

intelVISA 2 days ago | parent | prev [-]

How do you propose those "BS artists" feed their families in an alternate reality tech industry where only the roles that add value are deemed worthy of food and shelter coupons?

default-kramer 2 days ago | parent [-]

A good first step would be let them keep their jobs, but strip them of any authority. This already happens at some companies - the architects provide guidance which dev teams are not required to follow.

I think it's absolutely insane that we live in a world where many people with an "architect" title don't write code, and sometimes have never written code in their life! That would be like a world full of chess coaches who don't play chess! They just read BS articles like "Skewers are the new forks" or whatever.

BobbyTables2 2 days ago | parent [-]

It’s funny, the most effective “architects” only have “developer” in their title.

The ones with “architect” in the title move on to the next project as soon as the previous is started…