Countdown at the races
This is not accepted as solution
try {
for (int i = numSeconds; i > 0; i--) {
System.out.print(i + " ");
Thread.sleep(1000);
}
System.out.print("Go!");
} catch (InterruptedException e) {
System.out.print("Interrupted!");
}
I think I much prefer to write my own code, rather than modifying existing code. Especially when I am presented something with no context and told to "figure out what this does". Like... how about telling me what it's SUPPOSED to do.
I agree, but I assume that as a future developer, you will have to stare at some other people's code and figure out, what it does and modify it if needed, much more often than writing your own code, so I think this is a great exercise and training for the mind :)
Yeah, I get that. I don't mind looking at other peoples' code and figuring out how it's doing what it's doing. My issue is not even knowing what it's supposed to do. I guess that likely happens a lot, too, where you have massive programs with hundreds, if not thousands, of methods, and you come across something in it that you're not sure what it's supposed to be doing or what purpose it serves, but you for some reason know that it's not doing it's job correctly... I guess.
Does that happen?
Yes. It can depend the way your company is organized and the role you play on your development team. You may be on a team that works on "Warranty" issues, where all the work is fixing bugs introduced by others, or you may be on a new feature development team, where you're writing new code and only fixing items that are found during internal testing. In the latter case, you might have to fix issues introduced by others if the original developer moves to another team or is otherwise unavailable to work on it. Sometimes that person does have time to share the intention of the code, and sometimes you're just walking into it blind.
Well..., I'd say that in "No interrupt, no dice?" they should clarify more in requirements how much or how less and where it is possible to change the code..., otherwise you can break your head looking for a walkaround while it's easier...
GO TO FULL VERSION