Clean code haiku

Clean code haiku
0

#1

At this point I feel,
Does not repeat and Does work.
Clean code, and haiku.
I can’t use all the dot methods they suggest. My codes seem long but they work. I keep assuring myself that its because i have to tell the computer everything; ie creating placeholder variables, using a chunky for loop just to cycle through arrays, if scenarios. Especially the if functions. That function is becoming an almost at every corner function. great function, but it feels like I’m communicating with a child. Do this but if this, oh an watch-out for this. Are my symptoms normal?
=] What is your philosophy on clean code?


#2

well, I’m still fairly early on in my learning curve but if you’re following DRY and not using if/else when you could use a switch, you’re probably doing fine… especially if your code’s working.


#3

hahaha, i had never heard of DRY till now. but youre saying use a switch instead of if/else? i used a while true then did if/else if/ statements to let the computer know, hey buddy, only do this when you need to do this. thought it might save on memory lols


#4

I’m not saying use switch instead of if/else in any case, just saying that in some cases it’s better to use a switch instead of an if/else