Skip to main content

Command Palette

Search for a command to run...

Code Design Inertia

Updated
1 min read
L

Senior Product Engineer, working in Ruby and Rails. Passionate about idea generation, creativity, and programming.

I curate the Short Ruby Newsletter.

Code Design Inertia:

The code that will be written in the future will follow the design of the code already written.

Inertia is stronger inside a file => the code added will follow the design of the code already written.

So going further with this metaphor, "consistency" is like gravity: the close you follow a guideline the harder will be to see the benefit of other ways to write code.

#code #design #shorts

C

like that thought! These days Rubocop enforce a lot of style and could be very opinionated :)

1
L

Yep, Rubocop is a fantastic tool for enforcing guidelines, and I think using it when working in a team is somehow a reasonable price to pay for writing code that looks similar. Thus when doing a code review or changing code written by a colleague, the mental model is similar; thus, the code is easily understood.

But I am also trying to promote new features. I have a draft article about why to use new language constructs or features :) Hope to publish it in a couple of days

Shorts

Part 2 of 2

Short thoughts or ideas that you can usually find on my Twitter or Ruby.social profile

Start from the beginning

Bugs, errors and causes from an 1975 paper

Half of the errors may result from factors other than the code itself.

More from this blog

All about code - Ruby and Rails technical content written by Lucian Ghinda

102 posts

I write here quick thoughts, ideas, tips, and learnings about programming, programmers, and building software. Most of my focus is on Ruby, Rails, Hotwire, and everything about web applications.