Software Engineering Tidbits

Software Engineering Tidbits

Share this post

Software Engineering Tidbits
Software Engineering Tidbits
Coding Tips
Copy link
Facebook
Email
Notes
More

Coding Tips

Georges El Khoury's avatar
Georges El Khoury
Feb 09, 2023
9

Share this post

Software Engineering Tidbits
Software Engineering Tidbits
Coding Tips
Copy link
Facebook
Email
Notes
More
Share

There is no magic bullet for clean readable code but these are tips that usually overwhelmingly increase code readability.

1) Declaration close to usage

Instead of declaring a variable and use it way below and have random code in between, have the declaration and the usage as close as possible.

2) Guarding

Instead of having code inside an if and maybe an else, do a quick one liner guard check in the beginning of a function and have the majority of the code unnested outside of brackets in the top scope of the function.

3) Reduce the number of parameters in a function

A function with a long list of parameters usually mean that it is highly coupled and doing a lot of things. 1, 2 or sometimes 3 parameters is okay but more usually mean that the function or the parameters need refactoring.

4) Naming variables

A lot of time naming variables to exactly describe what they do goes a long way into making the code more readable Also breaking logic and encapsulating them into intermediate variables improves readability too Do not be afraid in having long variables names.

Did I miss anything? Feel free to add them in the comments.

I will keep adding to this list on this post.

If you want to stay up to date, subscribe below to the newsletter.


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 stay up to date.

Dilshan Hiruna's avatar
Daniel Jarzębowski's avatar
Aisha's avatar
Chris Sun's avatar
9 Likes
9

Share this post

Software Engineering Tidbits
Software Engineering Tidbits
Coding Tips
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.