Live data from Hacker News

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

news.ycombinator.com

61–70 of 74 posts

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

#61
post #26

Code written in Haskell is often really easy to pick up. Due to it's pure functions it can easily be picked up function by function and the GHC repl gives you an easy but powerful way to poke around. Of course there are also the crazy type level EDSL libs which are hard to disect, but in general Haskell has been the best language for me to pick up code written by others.

Maybe, I'm a bit skeptical, but I'm not a very good Haskell programmer.

I see too much symbol soup and point-free style makes it tougher to understand the code.

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

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

Maybe you are not growing as a developer? ;)

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

#63
post #51
post #44

Earlier quoted context omitted.

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…

[deleted]

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

#64

Earlier quoted context omitted.

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

DC.js is the greatest most customizable charting library I've ever used. Thank you for that.

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

#65

Well, I'm only a lowly WordPress developer, but I'll say that most WordPress plugins are a PITA to extend the functionality of, but that the WP Store Locator plugin was very nice to work with. Just sensibly implemented object-oriented programming and extensive use of WordPress hooks.

Hey another fellow WordPress developer!

Another great plugin is Metorik's helper plugin! Bryce is amazing and he's so responsive and helpful. If you're looking for a tool to extend Woocommerce functionality, definitely check it out.

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

#66
Inherited https://broadbandmap.nz/ the frontend was done by a external contracting company, the frontend looked like it should once i got it to run.

They gave us a stock rails CMS/static site generator that did the frontend part.

almost full rewrite as we where a Python shop and there was a mess of JQuery pubsub involved so you wouldn't know what was happening in what order or if there would be a bug because something wasn't subscribed to this event bus in time. almost goto level.

We met with the external company a few times and they made it clear to us they wheren't getting paid to fix tech debt or make the handover process smooth for us just that they where getting paid to make it look like the design.

This is actually a better state than the other projects i can think of, more because its a small project and the levels of technical debt are thus lower because theres not as much code/complexity, not that the code that is there was good.

All the tests where failing (very flaky by design, using browser driving to check for very specific parts of text on the page that had long been replaced), we also deleted all their tests/writ our own aswell as the almost full rewrite.

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

#67

I needed to extend a framework on which a thesis was written about. The thesis explained all the high level concepts. And every line of code was commented. It made it quite easy to understand why and how he was doing things.

Comments go a long way to help people. Despite the "only code is the documentation" dogma.

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

#68

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!

[deleted]

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

#69

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?

Yup

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

#70

Rails codebases I've looked at are usually in pretty good shape. I attribute it to the conventions that are fairly strongly enforced.

I have inherited many rails codebases and do not share this experience. I have found that often teams end up not using typical conventions and start re-inventing things well before it was necessary.

To be fair, I usually seem to find myself given rails 2.x and 3.x codebases which have sometimes been in production for close to a decade. That is a lot of time to build serious technical debt.

Post reply on HN