Live data from Hacker News

Ask HN: Have you ever inherited a code base you thought was well done?

news.ycombinator.com

11–20 of 151 posts

Re: Ask HN: Have you ever inherited a code base you thought was well done?

#11
Maybe "inherited" is a strong word, but some of the open source projects I contributed to were beautifully crafted. Django is one such example, on all fronts — docs are great, there are tests, and so on.

At work, not so much, as it's mostly very rushed, badly designed software.

Re: Ask HN: Have you ever inherited a code base you thought was well done?

#12

Not even my own.

At least I profusely apologise to my future self in the comments and checkins.

Past me however, is a total c##t that seems to take joy in solving their problems by making them a massive problem for me when the chewingum and dollar store masking tape inevitably fall off.

Re: Ask HN: Have you ever inherited a code base you thought was well done?

#13
I've worked on good (enough) code: good code coverage in tests, relatively fast tests, easy setup to develop (integrated DB, mail server, LDAP server), consistent formatting, no useless comments, good naming, code organization that was logical, even if it required some time to get accustomed to it, some good documentation as READMEs.

Not everything was perfect, but it was much better than the code changed by future generations which tried to mess it up with almost every commit, in the name of "it's good enough", "consistent style is not needed as I can still read the code", "what tests?", "we can refactor later"...

Re: Ask HN: Have you ever inherited a code base you thought was well done?

#14
I worked on some ancient FORTRAN for CommBank (formerly Commonwealth Bank of Australia). Most of the details are still under NDAs, but the project was amazing.

Every variable and function was explained in a series of physical manuals in excruciating, and up-to-date, detail. The manuals had index lists by name, function, type and concept, making it ridiculously easy to find exactly what you were looking for. The documentation felt almost like reading Knuth's Art of Programming. It explained not just how a function worked, but also the dependencies and how they worked on that particular hardware, including pieces of the FORTRAN standard library.

On top of that nugget of most people's fantasies, there was actually a test suite! It wasn't written by the original authors, and had been pieced together over the years. But it was a testsuite for code running on a mainframe the size of a small room. Since when do you ever get tests for code written in the 70s!?

Working for CommBank was hard - the standards for absolutely everything that they have and do are A-grade. A single complaint from a coworker or customer can land you in front of a review board. But the work they produced, at least what I saw, is absolutely worth it.

Re: Ask HN: Have you ever inherited a code base you thought was well done?

#15

Maybe "inherited" is a strong word, but some of the open source projects I contributed to were beautifully crafted. Django is one such example, on all fronts — docs are great, there are tests, and so on. At work, not so much, as it's mostly very rushed, badly designed software.

> as it's mostly very rushed, badly designed software

What's stopping you in improving the situation? Time pressure or unwilling colleagues?

Re: Ask HN: Have you ever inherited a code base you thought was well done?

#16
Surprisingly the best codebase I've taken over was written by a uni student. Everything was strikingly simple to comprehend and yet perfectly abstracted.

I think their inexperience and lack of hubris made them go to a lot of effort to be idiomatic in a language they were using for the first time.

Re: Ask HN: Have you ever inherited a code base you thought was well done?

#19
The two best:

1) Working (professionally) on a project that happens to be open source: https://github.com/metabase/metabase/

2) Coming to a Rails project mostly written by a very senior 7-person team. There was still a fair amount of jank (mostly from seed-round assumptions that weren't holding up when I joined after the Series A) but it still followed The Rails Way and nothing was too gross. It also helped that everyone important was still at the company and available for questions.

PS on (2): Seven of those original eight dev are now gone, including me; the median years of experience has gone from 8-10 to 0-3; the team size is at least 40 and I think more; and my understanding from friends still at the company is that the codebase is in general a flaming mess.

Re: Ask HN: Have you ever inherited a code base you thought was well done?

#20
I got to work on a (very) brief project -- I had two weeks to add features to a product to demo at a trade show. The person who had written the code I inherited had done a really good job of setting up a nice architecture, and used a library I had not encountered before, but which turned out to be really nice. So extending it was (nigh) trivial, and changing things was really straightforward.

The project lead was incredibly impressed that I was able to make a solid contribution check-in on my first day :-)

Post reply on HN