DEV Community

Discussion on: Open Discussion: What Tips Do You Have For Writing Clean Code?

Collapse
 
paratron profile image
Christian Engel

I read that article out of curiosity and I have to say, I am more than just a bit irritated by it.

The article is a perfect example of someone selling a personal preference as if its a fact which everyone should obey.

The autor even admits that after doing some research he found out that just about 10% of other developers follow his example and the majority does logical grouping.

I have to say, I think alphabetical oordering is just as bad as random ordering. The two examples looked exactly the same for me. I am very much in favor of the logical grouping (with blank lines in between!) and think its much easier to scan over.

But still: is is preference and not "clean code".

If you think about improving your general coding abilities, I can warmly recommend two books:

A philosophy of software design
by John Ousterhout

Refactoring (second edition)
by Martin Fowler

I learned a lot out of these two books.

Collapse
 
adrvnc profile image
Adrian Carter • Edited

Thanks for sharing your perspective, it's cool to read an opposing viewpoint on this article. Everyone has different personal preferences as it pertains to the way they code. After reading your comment, I can understand why the article can rub some people the wrong way.