loading words...

Jul 08, 2019 13:22:04

Make everything readable

by @rahulchowdhury | 260 words | 🐣 | 1💌

Rahul Chowdhury

Current day streak: 0🐣
Total posts: 1💌
Total words: 260 (1 pages 📄)

I have been writing a lot of Ruby code lately. This is because I’m rewriting my new side project’s entire backend with Ruby on Rails.

Given Ruby’s clear and plain English like syntax, same for Rails, it somehow feels terrible to write code that’s not elegant.

I mean, sure, I can throw in some code to get a feature working, but every time I write code in Ruby, I ask myself:

“Is this how a Ruby enthusiast would write this functionality?”

A lot of times, the answer’s no.

At those times, I revisit the code that I wrote and try to make it cleaner and more concise. Refactor it to something that carries the Ruby flag: read like the English language.

What this has taught me is that this philosophy is not only applicable to programming. Almost everything can be and should be simplified.

Imagine writing an article. Are you ever satisfied with your first draft?

Or that painting; is your first stroke always the last one?

In most cases, the answer is no. A craftsman always polishes to get the best version out of his work.

Polishes to make the work understandable and straightforward.

Simplicity always wins. If you create something that requires someone to read a manual first to understand then it’s not your best work.

Do better. The goal is to make everything readable or rather easily understandable.

Doesn’t matter if you’re writing code or an essay or maybe creating a tangible product. Keep revising until you’re absolutely convinced that the end product is damn elegant.

Originally published at rahulchowdhury.co

  • ❤️ 1
  • 1

    @rahulchowdhury - This is very elegantly written Rahul. Fantastic first post. You have to do this everyday for 30 days and join us in #TeamStreak.

    Could you tell me why you choose Ruby? What are you trying to do that you could share here?

    Keep writing.

    See this @seunoyebode

    Keni avatar Keni | Jul 09, 2019 14:43:24
    • 1

      @rahulchowdhury @keni

      Inspiring first post.

      Welcome Rahul

      Seun Oyebode avatar Seun Oyebode | Jul 10, 2019 08:03:33
  • 1

    @rahulchowdhury Congratulations on your first post!

    Brandon Wilson avatar Brandon Wilson | Jul 08, 2019 18:43:22
  • 1

    @rahulchowdhury welcome to the community! :)

    Basile Samel avatar Basile Samel | Jul 08, 2019 11:18:10
contact: email - twitter / Terms / Privacy