Live data from Hacker News

What was the nicest codebase you've inherited without the original author(s)?

news.ycombinator.com

51–60 of 74 posts

Re: What was the nicest codebase you've inherited without the original author(s)?

#51
post #44
post #36

Earlier quoted context omitted.

This is a great summation, and could well be one of the great quotes of software engineering.

But remember that debugging is twice as hard as programming so if you build a system as complex as you are able to build it will be too complicated to debug. :-)

This is where I'll just modify a quote attributed to Einstein as a reply: "Software should be as simple as possible, but not simpler."

The complexity of software should not be dictated by anybody's skill at creating and navigating complex designs, but by the complexity of the problem. Second system syndrome comes from youngsters not heeding this advice. Somehow it takes an inordinate amount of experience to know what you don't need.

Re: What was the nicest codebase you've inherited without the original author(s)?

#52

19 upvotes, 1 hour, no answers... How often do you look at some code and think "an idiot wrote this", and then realise you're looking at your own code? Maybe all code is technical debt? That is, maybe every piece of code you inherit is bad because you now have more to learn and understand, no matter how nicely structured/documented/tested it is. Sorry OP, I got nothing positive!

There was a time when I'd read some code and think, that's the way I'd do it, then the variable names look like ones I'd use... and turns out I was reading my own code that wasn't more than a week or two old--I used to do all-nighters in the office at the start of my career. It was pretty cool, some days I'd find code done and it was like having magic helper elves.

The night my CS final project was due, I went out drinking. I don't recall coming home and I don't recall working on the project. But I do recall getting very, very, very intoxicated.

The next morning, I woke up late in a panic. I was gonna email some excuse to the prof in a last ditch attempt to salvage a decent grade in the class. I ran to my computer desk in the corner and turned on my ginormous CRT monitor to find... the confirmation for my final project in my email inbox! I had somehow scored 100% on the project, despite having no memory of what must have been several hours of intense programming and debugging.

Perusing the code later that morning, I was stunned at how clever, clear, and concise it was. It was, at that time, the best code I had ever written. Were it not for a few telltale grammatical peculiarities, I wouldn't have believed I was its author.

That was the first and last time I ever got blackout drunk, but it made me a firm believer that the Ballmer curve exists.

Re: What was the nicest codebase you've inherited without the original author(s)?

#53
Believe it or not, it was a large (~1M lines) in-house "CMS-generator for different clients" type of thing written in perl, this was right around the time 2nd-gen rails clones were starting to be a thing, a fair bit after perl was the popular weblang of choice.

The people who wrote it were competent at writing maintainable software. It was well thought out in terms of design and discoverability and tooling, it was well tested, and the authors cared a lot about not obfuscating purpose.

It had good dev ramp-up docs and a pretty clean commit history.

I think probably the largest differentiating factor for this particular codebase was that it wasn't developed under duress of time-pressure and the previous authors were past the point in their programming careers where they learned how to not overestimate their own ability or underestimate unknowns in their domain. The company was relatively small, technically competent at the top, and culturally less concerned with inflating profits than making enough money to live comfortably and do their thing.

Re: What was the nicest codebase you've inherited without the original author(s)?

#54
Deis Workflow is a really nice codebase, and I like to talk about it. "Team Hephy" we committed to maintain Workflow and support newer versions of Kubernetes when Deis went to Microsoft. Their release architecture and testing framework were just really top-notch. The number of things that just haven't gone wrong in 2 years since they stopped committing and we took over, is itself probably the biggest testament.

There are over 100 repositories with code in different languages, and I can honestly say that each time I've ever needed to go in and work on something, usually from a position of little or no knowledge about the code or internals other than as a black box, I just find really well-organized code that seems like it was thoughtfully put together by a bunch of people that assumed they were always going to be the ones who would be stuck dealing with the consequences of whatever decisions they made every day.

https://github.com/teamhephy/workflow (from https://github.com/deis/workflow)

If you're looking for some training wheels for your beginner Kubernetes experience, you could do a lot worse! The product itself is basically a "Bring-your-own-Infrastructure" open source Heroku work-alike.

https://web.teamhephy.com / https://blog.teamhephy.info / https://docs.teamhephy.info

Re: What was the nicest codebase you've inherited without the original author(s)?

#55

19 upvotes, 1 hour, no answers... How often do you look at some code and think "an idiot wrote this", and then realise you're looking at your own code? Maybe all code is technical debt? That is, maybe every piece of code you inherit is bad because you now have more to learn and understand, no matter how nicely structured/documented/tested it is. Sorry OP, I got nothing positive!

>Maybe all code is technical debt?

I am still removing jQuery like dirty splinters.

But also I am using Vue.js... (es6 modules are awesome) BUT, I am designing everything I build with Vue to be easily replaced with web components down the road. No extra plugins, no complications that super specific to Vue if I can help it. (fool me twice... prototype.js, sigh)

I am expecting to get rid of Vue.js in a 5 years or less depending on how long it takes for web components to catch up. (or another framework to replace Vue)

That being said, some of the vanilla js code I wrote years ago still works great, no need to replace it.

So, maybe technical debt is a trade off we can _manage_ with our systems consciously instead of "by accident".

Re: What was the nicest codebase you've inherited without the original author(s)?

#56
I was new in development, had some notions about how to program, and stumbled upon sup (https://sup-heliotrope.github.io/), a mua written in Ruby that basically incorporated all Gmail wisdom into a local, curses client. I was hooked. Looking at the code everything was clearly defined and understandable, with boundaries set exactly where'd you expect them. I owe William Morgan, its creator, for my interest in programming and the reason I started this career. Maybe some of it is also due to Ruby itself ?

If you don't know wmorgan, he's the one who created trollop and the leveldb-ruby gem. Any Ruby practitioner should know what I'm talking about.

Re: What was the nicest codebase you've inherited without the original author(s)?

#57

19 upvotes, 1 hour, no answers... How often do you look at some code and think "an idiot wrote this", and then realise you're looking at your own code? Maybe all code is technical debt? That is, maybe every piece of code you inherit is bad because you now have more to learn and understand, no matter how nicely structured/documented/tested it is. Sorry OP, I got nothing positive!

> Maybe all code is technical debt? I am still removing jQuery like dirty splinters. But also I am using Vue.js... (es6 modules are awesome) BUT, I am designing everything I build with Vue to be easily replaced with web components down the road. No extra plugins, no complications that super specific to Vue if I can help it. (fool me twice... prototype.js, sigh ) I am expecting to get rid of Vue.js in a 5 years or les…

I often say prototype.js was the FormMail.PL of Javascript.

Re: What was the nicest codebase you've inherited without the original author(s)?

#58
Few years ago, I inherited the whole infrastructure for a fintech startup. It was few hundreds instances in AWS. The company was possibly the first to operate fully in the cloud and pass financial regulations for that.

At the heart of it, there was a short list of instances to run with their purposes. Most of everything was automated around that. You could add a line to order any resources in the world and have it running in the next 5 minutes. Instance provisioned with standard OS setup and patches, DNS and aliases up, permissions for developers and services deployed.

It was extremely efficient and well organized. I'm not sure who wrote it but I'm pretty sure it's the only guy in the world who figured out how to use AWS, accidentally.

While I worked there, I updated it to support provisioning in any region, EBS backups, automated firewall groups and a few other things. Everything was tagged consistently with purpose/team/environment for identification and billing.

It was neat. I doubt I will ever find again a company that can setup hardware or manage resources any decently.

To conclude this. A coworker told me that new guys were hired after I left and they undid most of it in the next 2 years.

Re: What was the nicest codebase you've inherited without the original author(s)?

#60

Earlier quoted context omitted.

There was a time when I'd read some code and think, that's the way I'd do it, then the variable names look like ones I'd use... and turns out I was reading my own code that wasn't more than a week or two old--I used to do all-nighters in the office at the start of my career. It was pretty cool, some days I'd find code done and it was like having magic helper elves.

The night my CS final project was due, I went out drinking. I don't recall coming home and I don't recall working on the project. But I do recall getting very, very, very intoxicated. The next morning, I woke up late in a panic. I was gonna email some excuse to the prof in a last ditch attempt to salvage a decent grade in the class. I ran to my computer desk in the corner and turned on my ginormous CRT monitor to fin…

As entertaining as your story is, I find it very hard to believe. If you were as drunk as you claim to be, there is no way that you're capable of writing "the best code I had ever written". A high level of intoxication severely impacts your attention span and ability to focus deeply. I speak from experience and I'd wager it would be the same for almost everyone.

If this story actually happened, I'd hazard a guess that someone else wrote that code, not you.

Post reply on HN