(April 25, 2016 at 8:24 am)Mathilda Wrote: Writing legible code is a good habit to develop from the very beginning.
Remember, we're talking about an academic exercise here. It is possible to ask something of students that you would never ask of an employee. We can accomplish both tasks. Sometimes going to extremes is helpful.
For example, we were writing code for a Finite State Machine, and instead of having an if-else statement, I could make a change to one of two states with a single statement that depends on the input. So I turned 8 lines of code into 3. Thinking like that can sometimes help simplify your code.
I assure you, my code is always legible. I am OCD about annotating and whitespace and whatnot.
"There remain four irreducible objections to religious faith: that it wholly misrepresents the origins of man and the cosmos, that because of this original error it manages to combine the maximum servility with the maximum of solipsism, that it is both the result and the cause of dangerous sexual repression, and that it is ultimately grounded on wish-thinking." ~Christopher Hitchens, god is not Great
PM me your email address to join the Slack chat! I'll give you a taco(or five) if you join! --->There's an app and everything!<---
PM me your email address to join the Slack chat! I'll give you a taco(or five) if you join! --->There's an app and everything!<---