Keep your source code SIMPLE
medium.com
Keep your source code SIMPLE
1–10 of 77 posts
Re: Keep your source code SIMPLE
#2Also; keep it clean. Don’t over-comment, but comment.
Re: Keep your source code SIMPLE
#3I couldn’t agree more. Also; keep it clean . Don’t over-comment, but comment.
Re: Keep your source code SIMPLE
#4If everything at the bottom is straightforward, then people will spot more overarching concerns, instead of bogging down in minor details.
I’d really love to see some cognitive science applied directly to UX and code quality concepts. Surely some of the things we espouse but don’t enforce are spot on, and others are cargo culting. Refining that list might make it harder to ignore.
Re: Keep your source code SIMPLE
#5I couldn’t agree more. Also; keep it clean . Don’t over-comment, but comment.
Can you define "over-comment"? Without a clear definition, it's just subjective opinion.
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 whatever reason can also use comments.
Class headers are of course also a great place to comment, to explain the purpose of the class.
Good comments can lead to better code. :)
Re: Keep your source code SIMPLE
#6I couldn’t agree more. Also; keep it clean . Don’t over-comment, but comment.
Can you define "over-comment"? Without a clear definition, it's just subjective opinion.
Re: Keep your source code SIMPLE
#7I couldn’t agree more. Also; keep it clean . Don’t over-comment, but comment.
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
#8SIMPLE 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
#9I can’t count how many times I’ve seen error messages that look like this, often with no context at all, in JavaScript apps, even widely used ones like npm and webpack. Proper error handling is never easy, but the JS community seems particularly given to avoiding it.
Re: Keep your source code SIMPLE
#10I couldn’t agree more. Also; keep it clean . Don’t over-comment, but comment.