0

Writing code: EXCELLENCE vs MEDIOCRITY

Let's grasp how similar pieces of code differ in quality. More precisely, it's about how/where/when poorly designed code differenciates itself from code that's been perfectly thought/designed, etc. provided both pieces of code are supposed to have, in fine, the same result. To highlight these differencesx give two pieces of co by analysing two pieces of code that are contrasting by their design, so that the excellent one is clear, concise, as simple as can be, in other words pure, compared to the

17th Feb 2018, 8:18 AM
Thomas Zufferey
1 ответ
+ 1
its not always true that less code is better, elegance is primarily efficiency combined with readability and proper grouping of relevant methods and properties, if using an OOP language it is good if each type is not connected but the use of inheritance can connect them, allowing for a dynamically structured project that flexes under pressure rather than cracking (hard coding values for example). I can't think of a very good example right now. cwl = Console.Writeline (has carriage return) cw = console.write (no carriage return) cwl("hello"); vs cw("h"); cw("e"); cw("l"); cw("l"); cw("o"); cwl();
4th May 2018, 1:19 AM
John
John - avatar