Keep your source code SIMPLE
11–20 of 77 posts
Re: Keep your source code SIMPLE
#12I couldn’t agree more. Also; keep it clean . Don’t over-comment, but comment.
Re: Keep your source code SIMPLE
#13Earlier quoted context omitted.
Can you define "over-comment"? Without a clear definition, it's just subjective opinion.
Sure! The beginnings of functions, for instance, are great places to comment, perhaps even including a definition of some of the subroutines within it. In the case of an exceptionally large subroutine, commenting within the subroutine may be advantageous - but at that point you may consider another function to replace that larger chunk. Variable names that are perhaps obscure and are not practical to rename for whate…
Re: Keep your source code SIMPLE
#14I couldn’t agree more. Also; keep it clean . Don’t over-comment, but comment.
Re: Keep your source code SIMPLE
#15My feeling is these paradigms, SOLID and SIMPLE, boil down to basically: small objects, connected minimally, though interfaces. SIMPLE appears to be leaning even more towards the functional programming side of things; I think we should probably just get it over with and accept that composition of functions operating on immutable data structures is just the right way to go.
Re: Keep your source code SIMPLE
#16Earlier quoted context omitted.
Can you define "over-comment"? Without a clear definition, it's just subjective opinion.
(not OP, but here's my 2c) comments should explain why you choose to write the corresponding line of code. It's a "meta-communication" between the original author (even a previous-month you) and the reader. Code reading should be "boring". The code lines (and so the meaning) should be obvious. A good comment, IMHO, should convey the information "I'm sorry for this complexity here, but you need to take care of this ed…
Literate programming comes to mind as an extreme counter example of not enough comments. https://en.wikipedia.org/wiki/Donald_Knuth#Literate_programm...
Re: Keep your source code SIMPLE
#17Earlier quoted context omitted.
Can you define "over-comment"? Without a clear definition, it's just subjective opinion.
//increment i in for loop For (i=0;i++.... Var x; //define variable x X=4; //give value of 4 to x Everyone knows what that code does. The comments aren't necessary.
Re: Keep your source code SIMPLE
#18My feeling is these paradigms, SOLID and SIMPLE, boil down to basically: small objects, connected minimally, though interfaces. SIMPLE appears to be leaning even more towards the functional programming side of things; I think we should probably just get it over with and accept that composition of functions operating on immutable data structures is just the right way to go.
Is there a language that leans heavily towards immutable data, but steers clear of the, shall we say, dorkier side of functional programming?
Re: Keep your source code SIMPLE
#19My feeling is these paradigms, SOLID and SIMPLE, boil down to basically: small objects, connected minimally, though interfaces. SIMPLE appears to be leaning even more towards the functional programming side of things; I think we should probably just get it over with and accept that composition of functions operating on immutable data structures is just the right way to go.
Is there a language that leans heavily towards immutable data, but steers clear of the, shall we say, dorkier side of functional programming?
Re: Keep your source code SIMPLE
#20My feeling is these paradigms, SOLID and SIMPLE, boil down to basically: small objects, connected minimally, though interfaces. SIMPLE appears to be leaning even more towards the functional programming side of things; I think we should probably just get it over with and accept that composition of functions operating on immutable data structures is just the right way to go.
Is there a language that leans heavily towards immutable data, but steers clear of the, shall we say, dorkier side of functional programming?