Live data from Hacker News

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

news.ycombinator.com

41–50 of 74 posts

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

#41
post #17

I inherited an internal tool from someone who left the company. They weren't a software developer. Everything had comments (not function comments/XML headers), behavior comments. Some were "someone who knows how to code should clean this up", "I want to do x but couldn't figure it out, this is close". It lacked clear abstractions, it was mostly one file. It wasn't even in a repository. The program was however purpose…

There's a saying about how it's easier to bring design to something without design than bring good design to something with bad design.

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

#42

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.

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

#43
use a language that prioritizes maintenance and correctness instead of prioritizing speed-to-develop-a-prototype and brittle abstractions tailored for onboarding users who expect familiarity, and there will be a lot less expletives involved. These are real tradeoffs involved here. Without tradeoffs, there would be no need for choice and thus no need for strategy. Once those tradeoffs are determined, the crux of a strong strategy is how the chosen activities reinforce one and other to drive an unfair advantage.

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

#44
post #36

Earlier quoted context omitted.

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.

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

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

#45
I once "inherited" an Adobe ColdFusion codebase that hadn't been touched in about 15 years. I guess the reason it hadn't been touched in so long was because it simply worked. It was a well structured project and easy to get in to. Implementing some minor new features was straight forward and thanks to an existing test suite easy to test.

Needless to say I was pleasantly surprised by that.

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

#47

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?

Actually when I have to modify my old codebase I am usually pleasantly surprised and it is much more tidy than I am expecting it to be. It's an amazing feeling when you read your own code and go "wow, I wrote that, what a nice way of doing that".

I am not really sure what that says about me... maybe my expectations are too pessimistic on average...

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

#49

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?

Actually never. The reverse actually happened: I looked at some code and thought "a wizard must have written this", and then realised I am looking at my own code. :-)

No, seriously: I could immediatelly reconstruct my intentions that I had for code that I wrote 15 years ago and never touched afterwards. For this reconstruction process, the emotions that went into the code lines provide a strong mnemonic. This is also the reason why I actually need very few comments in my own code if it is just for me (of course, if other authors want to contribute, these are very important - but in this case, I prefer to ask them directly what kind of guidance they actually need).

What is much harder is to get into a foreign codebase. Even if it is of high quality (it often isn't), it takes a lot of time to get deeply into the thought process on which the original authors based their code structure.

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

#50

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?

If I reveal the name, then I must also admit it has plenty of bugs.

And I haven't kept up with merging PRs because it is a lot of work to test and integrate code. (Help welcome!)

With that out of the way: it's dc.js

Post reply on HN