Software Engineering Tidbits

Software Engineering Tidbits

Share this post

Software Engineering Tidbits
Software Engineering Tidbits
Elegant code
Copy link
Facebook
Email
Notes
More

Elegant code

Georges El Khoury's avatar
Georges El Khoury
Mar 28, 2022
9

Share this post

Software Engineering Tidbits
Software Engineering Tidbits
Elegant code
Copy link
Facebook
Email
Notes
More
Share

Elegant code is hard to put your finger on, describe or quantify.

In his book clean code, Robert Martin spent a full chapter with multiple people trying to do just this.

Each of them ended with different definition.

Here is my take on it:

Clean code is readable, sectionable and effortlessly extensible.

1) Readable

Clean code should be glanceable and reads like a story. It should be easy to understand. One of the first things to check while doing a code review is whether the code is easily understandable without the need to go into details.

2) Sectionable

Elegant code is usually written in different sections. Each doing one thing. When you see a bug in a well written repo you usually directly have an idea on where it is happening. The fix is usually in one and only one place.

Rails is a great example of elegant code in a sectionable framework. Views, Controllers, Models, Tasks, etc…

You can pick up any Rails repo and usually can find your way pretty quickly around it

3) Effortlessly extendable: Emphasis on effortlessly. It is just easy to extend the existing code to do more without doing a lot of modifications.

Couple of examples:

Start with Uber Rides and effortlessly add Uber Eats.

Start with a calculator app in the first iPhone and effortlessly generalize to the App Store in the next version.

Start with Google Search and specialize down to Google News.

There are more examples powered by engineers writing elegant extendable code.

One last note on this code are not born or are always elegant. Perfection is the enemy of progress. They are iterated upon and refactored to their current state.

Don’t aim in writing the perfect code. Aim at writing functional and simple code, keep complexity at bay and refactor every then and while and you will end up with elegant code in the long run.


Software Engineering from the Frontlines Course on Maven

If you liked this article, I will be teaching a “Software Engineering from the Frontlines” course on Maven where I will teach hard-learned lessons I acquired developing large-scale products at companies such as Uber, Airbnb, and Microsoft.

View Course


Thanks for reading Software Engineering Tidbits! Subscribe for free to receive new posts and support my work.

Panneer's avatar
Peter Belán's avatar
Averrous Saloom's avatar
Niels Holvoet's avatar
Ali B's avatar
9 Likes
9

Share this post

Software Engineering Tidbits
Software Engineering Tidbits
Elegant code
Copy link
Facebook
Email
Notes
More
Share

Discussion about this post

User's avatar
A good unit test
A good unit test should be:
Feb 20, 2023 • 
Georges El Khoury
18

Share this post

Software Engineering Tidbits
Software Engineering Tidbits
A good unit test
Copy link
Facebook
Email
Notes
More
5
A good way to debug
One of the best software engineering tip I received is a good way to debug.
Apr 28, 2022 • 
Georges El Khoury
16

Share this post

Software Engineering Tidbits
Software Engineering Tidbits
A good way to debug
Copy link
Facebook
Email
Notes
More
2
Outage Management
Outage management is a core skill for a software engineer to acquire and is critical to achieve high availability of an online service.
Feb 13, 2023 • 
Georges El Khoury
13

Share this post

Software Engineering Tidbits
Software Engineering Tidbits
Outage Management
Copy link
Facebook
Email
Notes
More
3

Ready for more?

© 2025 Georges El Khoury
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More

Create your profile

User's avatar

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.