Live data from Hacker News

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

news.ycombinator.com

31–40 of 74 posts

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

#31

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!

Anytime I spend a ton of time making code pristine, it takes so long that I never accomplish anything useful. What's better, a polished half turd or a stinky full turd? As a user, a full turd. As a developer looking to fantasize over having time to finish something, a polished half turd. As someone who wants to be productive on a team without getting murdered, probably neither.

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

#32
PHP dev who inherited a Java Spring Boot application. Sooooo much hidden magic going on. This was a about a year ago and since then I've become more comfortable with the Spring way but I still feel a little uncomfortable with it, even though it's the cleanest codebase I own.

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

#33
It wasn't technically inherited software, since no one imposed it on me, but when I shop around for open source libraries I tend to prefer those that some in-code docs and a few high level tests to check that the APIs keep working from a version to the next.

The worst code bases I inherited, on the other hand, are a lot memorable. The absolute worse was a ~500k-ish line of code WordPress/BuddyPress mess of undocumented spaghetti, complete with a slew of modifications to WP and BP core files. It took me weeks to put the latter in separate plugins in order to upgrade the mess.

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

#34

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!

> How often do you look at some code and think "an idiot wrote this", and then realise you're looking at your own code?

Every single day. I am my own worst enemy.

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

#35
I inherited a well-unit tested JS MVC frontend written with classes using Resig's Simple JavaScript Inheritance and jQuery, it pretty much looks like modern React code with Pythonic style to match Python backend (self=this everywhere, snake-case etc), but written in 2009. Currently in process of migrating it to vanilla TypeScript with very few difficulties so far. A few months later and I could have be dealing with a coffeescript POC.

On the other hand I also inherited an angularjs frontend written by an ape.

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

#36

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!

The better we get, the more complicated problems become barely within our reach

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

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

#37

My current works codebase. I've never seemed to like other peoples code. Not even my own after 1 month But this code is very good. I would attribute it to the strong set of rules and design patterns everyone follows. All code/services are broken up into `unit` which all follow the same pattern, of how it's called, how the code is arranged etc. This means there is no ambiguity for any new starters trying to contribute…

Is it git hooks that run a linter before push?

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

#38
Back in the day I would inherit or have to work on large codebases written in Delphi/Pascal from several different authors. While there were a few eyerolls here and there, I never recall being overwhelmed or overworked trying to discover what I needed to know.

But then that's Delphi; a pure pleasure to work with. I only wish I had more use cases for it. I would put back in the lineup immediately if I did.

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

#39

I inherited a popular open source charting library. People like it because it has a data model - you can automatically brush and filter between charts. It is intentionally a leaky abstraction so that there is always a way to customize it if it doesn't work the way you want. There is only enough design to make it reusable, no claim to a "grammar" or other highfalutin abstractions. There have been dozens of contributor…

Name?

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

#40
post #4

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!

All code is technical debt. We should not write it unless it serves a purpose of high enough value.

I don't think that's true. If it's properly abstracted and implementation details are encapsulated, well written code can serve as documentation.
Post reply on HN