Live data from Hacker News

Writes large correct programs (2008)

johndcook.com

61–70 of 114 posts

Re: Writes large correct programs (2008)

#61
post #4

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 scaffo…

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…

That seems pretty crazy to me (18M)

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

Re: Writes large correct programs (2008)

#62
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

Re: Writes large correct programs (2008)

#63
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.

Re: Writes large correct programs (2008)

#64

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…

[deleted]

Re: Writes large correct programs (2008)

#65
post #35

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, a…

Those pseudo-jobs are a necessary evil in lieu of some sort of UBI imo. Plus they're useful for sabotaging your competitors' TTM.

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.

Re: Writes large correct programs (2008)

#66
post #35

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, a…

Those pseudo-jobs are a necessary evil in lieu of some sort of UBI imo. Plus they're useful for sabotaging your competitors' TTM.

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

Re: Writes large correct programs (2008)

#67

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

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 co…

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.

Re: Writes large correct programs (2008)

#68

Earlier quoted context omitted.

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…

That seems pretty crazy to me (18M) even for one-off scripts, I'll often throw them into a VCS because why not!

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.)

Re: Writes large correct programs (2008)

#69

Earlier quoted context omitted.

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 the…

> 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…

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.

Re: Writes large correct programs (2008)

#70
post #35

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, a…

Those pseudo-jobs are a necessary evil in lieu of some sort of UBI imo. Plus they're useful for sabotaging your competitors' TTM.

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.

Post reply on HN