Linear code is more readable

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • SaaSHub - Software Alternatives and Reviews
  • Box2D

    Box2D is a 2D physics engine for games

    Why is 600 lines too long? How are you able to make that judgment call without first knowing what the algorithm is even doing? People setting arbitrary limits like this is what leads to convoluted spaghetti, instead of just taking things on a case by case basis. Here’s a function from the Box2D code running a particularly complex algorithm for solving contact velocities .

    It’s 310 lines long. It reads very well, and it looks very maintainable. It has very clear comments explaining the reasoning behind the harder parts of the code. Would you reject this code because it’s pretty long? I wouldn’t.

    There is no such thing as too long or too short. There’s overengineered and there’s underengineered and there’s a sweet spot in the middle that has the perfect amount of engineering with the least amount of complexity (preferably no additional complexity than the original problem warranted). Sometimes, the problem at hand is inherently a large algorithm and requires many lines of code. Don’t split it up! It just makes it harder for future maintainers who now have to figure out if the additional functions are actually being used elsewhere or if they’re just there to make the code “pretty”.

  • advent-of-code-jq

    Solving Advent of Code with jq

    I realize this is tongue in cheek, but really: Read code!

    If you ever start plateauing in your code skills, start digging into the code of your favorite open source project. Accept that things have been done in another way than you would for a reason and try to understand that reason.

    Try joining advent of code[0], and make sure to spend half you time block on reading and understanding alternative solutions.


  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at

  • putty

    mirror of git://, used for client testing

    This function is 1830 lines long. It's reasonably well structured I think. Although the #if 0 are maybe not so good.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts