+ 23

Writing clean code

someone today asked me about the importance of clean code.Thus please feel free to spread the word of clean coding as it is of great importance in your life as a programmer.

6th Apr 2017, 12:20 PM
Lehlohonolo
Lehlohonolo - avatar
51 Answers
+ 11
clean an structured code is easier to read,modify,test and fix. Adding comments or jdocs will help you and others understand what the program actually does. Only import what you need. If your language has no garbage collector make sure to release memory after you used it. Use descriptive variable names something this side doesn't teach very well. Only use single character variable for incrementation values (in "for" loops for example). Use patterns, make abstract classes or interfaces for multiple classes with the same structure. Last but not least: Format your code, most editors have an auto format function that puts in line breaks and positioning for you
12th Apr 2017, 10:25 PM
TransHedgehog
TransHedgehog - avatar
+ 41
Neat and Tidy codes shows your personality as programmer, developer or just a coder. By followinh the coding standards you will find how important a simple and clean code. Tips: After coding just make sure to refactor your code remove redundant codes, class, id or whatever that makes your code heavy try to keep it as simple and straight as possible. Don't look on how beauty your output is please also consider the codes behind. As programmer and developer I am more looking on code side not in the output.
6th Apr 2017, 12:32 PM
Waren Gonzaga
Waren Gonzaga - avatar
+ 24
Practice indentations. Use descriptive variable names. Use functions to replace repeated blocks of codes. Do iteration in place of recursion whenever possible. Cookies
6th Apr 2017, 1:58 PM
Hatsy Rei
Hatsy Rei - avatar
+ 16
what does clean code mean?
11th Apr 2017, 10:43 AM
Saja Husam
Saja Husam - avatar
+ 8
Have a bit of the programmer side that tells you to right clean code, and a bit of your creative side that tells you to get dirty.
10th Apr 2017, 4:48 PM
Shahar Levy
Shahar Levy - avatar
+ 8
I hate dirtyness. keep clean, keep simple
12th Apr 2017, 5:47 PM
Sachin Artani
Sachin Artani - avatar
+ 7
I am agree with that ... maintainability of your code makes the debugging more easy to do.
6th Apr 2017, 12:41 PM
Waren Gonzaga
Waren Gonzaga - avatar
+ 7
A clean coding is the only way.. It sure helps if someone else need to work with the code of your website;)
11th Apr 2017, 9:02 PM
🔱Sassy Muffin🔱
🔱Sassy Muffin🔱 - avatar
+ 6
if you want to write clean code in my opinion you should do that : 1-know the data structure and implement it during you are coding in order to save memory (efficiency) 2- use a mental algorithm for how to summarize your code like anonymous object or class instead write the whole intializations (effectiveness) 3- you have to use one style for coding like pascal style ,lowercase style,...etc ..and do not to be lazy for writting comments :-)
12th Apr 2017, 10:47 AM
Ahmed
Ahmed - avatar
+ 6
clean code is more useful for self updating of code. reduces confusion
14th Apr 2017, 2:00 PM
Player
Player - avatar
+ 5
What do you say about maintainability? in relation to clean code?
6th Apr 2017, 12:35 PM
Lehlohonolo
Lehlohonolo - avatar
+ 5
clean code==efficient code;
11th Apr 2017, 4:50 AM
DeleteThisAccount
+ 5
clean code = reuse, performance, easy to understand, beauty:))
11th Apr 2017, 11:58 AM
Popescu George
Popescu George - avatar
+ 5
Clean code improves readability for yourself and for your coworkers. This involves following - the style guide for the programming language in question, such as PEP 8 for Python (https://www.python.org/dev/peps/pep-0008/) - coding conventions at your workplace - conventions for documentation (Python docstrings, javadoc comments) - conventions for submit messages to your repository (git, etc.) Just don't be a nuisance to others and your later self ;-)
13th Apr 2017, 4:30 PM
Klaus-Dieter Warzecha
Klaus-Dieter Warzecha - avatar
+ 5
clean code == easily readable code == efficient code == master code!
13th Apr 2017, 7:25 PM
JΞΜΔ 🇨🇩👑
JΞΜΔ  🇨🇩👑 - avatar
+ 5
To write clean code is necessary to understand the principles, patterns, and practices of writing good software. Cleaning up code-of transforming a code base that has some problems into one that is sound and efficient. Avoiding the "code smells" gathered while creating that software. The result is a knowledge base that describes the way we think when we write, read, and clean code. 
14th Apr 2017, 8:24 PM
⏩▶Clau◀⏪
⏩▶Clau◀⏪ - avatar
+ 5
By using Jetbrains IDE you'll have to worry less about clean coding cause it helps to organise your code and make it more efficient with minimal redundancy. All you have to do is document your code and follow warnings and instructions
16th Apr 2017, 9:38 PM
damilare lamidi
damilare lamidi - avatar
+ 4
Clean codes makes our lives easier
10th Apr 2017, 2:34 PM
Brian Tomas
Brian Tomas - avatar
+ 4
clean code is something that can be easily readable,like usage of proper comments which can increase readability of code -use of camel cassing while writing code -proper spaces between​ blocks -usage of function instead of writing one block of code again and again -code written in best case complexity -proper arrangement of syntax
10th Apr 2017, 7:58 PM
Mohit Rattu
Mohit Rattu - avatar
+ 4
Guys check out these two books I recommend if you really want your code to be very shiny... 1.Clean Code by Robert C. Martin 2.Code Complete by Steve McConnell
10th Apr 2017, 7:58 PM
Labib Abdullah
Labib Abdullah - avatar