+ 3

Do you think code can be "beautiful" or "ugly"?

personally, I feel indifferent. I think that code is only meant to be robust and reliable, and that's it. what are some of your opinions on this?

26th May 2017, 7:04 PM
X-1
X-1 - avatar
4 Respostas
+ 14
If with "beautiful" word you mean the "{ } religion" and the "indentation style", (https://en.m.wikipedia.org/wiki/Indent_style) they are important for readibility of code... i think it is important be coherent with the style of our code. One of things i learned on Sololearn (and i should to thank @Gami for this) is how to write clean code, functions and constructors (at least in Javascript) can simplify your code and make it more readable and clean... at the same time a clean code with less lines is (in most cases) a robust code too. Honestly, i like to see clean code, with the right indentation spaces, so yes... a code should be as beautiful as we can.
26th May 2017, 7:16 PM
Maz
Maz - avatar
+ 5
for short code, it is not making any different. for long code with debugging and adding new feature each period (monthly for example), ugly code will be very hard to maintain. It will be the source of frustation and cause time consuming work, which is avoidable if we write clean and beautiful code. but sometime, programmer write the ugliest code s/he can. the purpose is to obfuscate code to protect from unauthorized user (or cracker).
26th May 2017, 8:08 PM
Setiawan Next
Setiawan Next - avatar
+ 1
Thats ob what you mean bueatiful... If u main things similar to "pythonic", then ugly is not a problem; But if u r talking about structure and mapping, ugly codes can be problematic
27th May 2017, 6:53 AM
Roger
0
I think code can be more readable, for example in C++ you could just write statements like this: int I; while(true) bla(); i = 10; cout << "This is I!" and so on so do you think that this is not very ugly? the beauty of code is in simple statements and readability
26th May 2017, 10:19 PM
‎ɐısıօլɐ
‎ɐısıօլɐ - avatar