Timeline for How to write correct loops?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 17, 2016 at 20:40 | comment | added | James Snell | @CodeYogi ...and since you ask, I rarely get my looping and branching wrong because I make a point of having a clear understanding of what I need to achieve before I write code, it's not hard to do on something simple like a sorted array class. As a programmer one of the hardest things to do is concede that you are the problem, but until you do that you won't start writing really good code. | |
| Apr 17, 2016 at 20:32 | comment | added | James Snell | @CodeYogi If you're having to do 'trial and error' and you're 'getting frustrated' and 'making the same mistakes' with your coding then those are signs that you didn't understand your problem well enough before you began writing. Nobody's saying you didn't understand it, but that your code could have been better thought out and they're signs that you're struggling which you have the choice to pick up on and learn from, or not. | |
| Apr 17, 2016 at 19:02 | comment | added | CodeYogi | @JamesSnell I think you are getting over confident about yourself. Look at the code and tell me what makes you think that its under documented? If you see clearly there is nowhere mentioned that I couldn't solve the problem? I just wanted to know how to avoid repeating same mistake. I think you get all your program correct in one go. | |
| Apr 17, 2016 at 15:38 | comment | added | James Snell | @MainMa - I think while Mark could have been more sensitive, I think he's right - There's interview stress and there's just hacking code together without due consideration to defining the problem. The way the question is worded points very strongly to the latter and that is something that can best be solved in the long term by making sure you have a solid foundation, not by hacking away at the IDE | |
| Apr 17, 2016 at 14:42 | comment | added | Arseni Mourzenko | I wouldn't be so assertive about the skills of OP. Making boundary mistakes is easy, especially in a stressful context such as a hiring interview. An experienced developer could do those mistakes as well, but, obviously, an experienced developer would avoid such mistakes in the first place through testing. | |
| Apr 17, 2016 at 12:52 | history | answered | High Performance Mark | CC BY-SA 3.0 |