Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh good lord. This one adds in Scanner!

How do you think this code will handle binary data? How do you think it'll handle a simple two line text file?



There is no one solution fits all. Especially if the problem is imaginary.


> There is no one solution fits all. Especially if the problem is imaginary.

Yeah, but there are solutions that actually solve the problem.


what exactly is the problem? you cant just make up problems and ridicule the code for not solving them when the coder had no idea he was supposed to be solving them.

This solution (and whatever solution you might have in mind) likely both dont solve all sorts of problems. for instance what if there is a power failure and you lose all the output? is it persisting to disk? what if new input methods that arent even thought of it come to exist 5 years from now, is it compatible with that?


> This solution (and whatever solution you might have in mind) likely both dont solve all sorts of problems. for instance what if there is a power failure and you lose all the output? is it persisting to disk? what if new input methods that arent even thought of it come to exist 5 years from now, is it compatible with that?

You are missing the point. The code doesn't work. I'd love to hear any interpretation of the problem where that code actually is correct.


Are you, like, paid for litres of Java hate per second or something?


I'm not hating on Java. Java has perfectly good ways of solving this simply.

My hate is on the Java code being posted here. It's horribly bad.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: