Re: Combination Circuits/Schematics
Posted: Wed Jun 07, 2017 6:57 pm
tiffy wrote:The Ruby Style Guide for best practice Source Code Layout:
Someone on the Forum once recommended that we should follow a "Ruby Style" of best practice rules (i.e. Source Code Layout) so that real-world Ruby programmers can write code that can be maintained by other real-world Ruby programmers.
So, I crawled the Internet and I came across the following webpage:
https://github.com/bbatsov/ruby-style-g ... ethod-bang
From my side (as a beginner) it is only a thought or recommendation not a hard-and-fast-rule. What do you think about the idea?
I was recommending it. There are three main sources for the style guide. All of them are user-based, because Yukihiro "Matz" Matsumoto, inventor of Ruby, was too busy programming it (he still is). You pointed to one of the three, the one that I am trying to follow is this one:
https://github.com/github/rubocop-github/blob/master/STYLEGUIDE.md
But don't worry, they all agree on everything they share, it's just that some guide covers areas the others don't and vice versa.
It's up to you to follow them. But if you write code and expect others to read your code later, it is raising your chances if you at least stick to the very minimum (like indenting, how to set paranthesis, operators etc.)
EDIT: For example, it is a pita to read KG's codes. I only try to read them, because he is a brilliant mind and so his work is always interesting. And he knows his code is ugly. He's just too lazy