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

Java is a language for people good at resisting temptation. It gives you all sorts of ways to make your code look nicer, more elegant, but the only way to be productive in Java is to avoid all of them.

In my experience, you can be more productive in Java than in any other language, because it has by the best tools and libraries. However, don't use reflection, don't use cloning, avoid automatic (de)serialization, don't doc needlessly, don't separate interface and implementation when you don't have to, use refactoring and code generation, don't feel bad about code duplication.

Most of all, always consider that coding is cheap. Changing a constant? Easy, not hard. Changing interfaces? Easy, not hard. Introducing an alternative implementation? Easy, not hard. Changing names? Easy, not hard. Adding new types? Easy, not hard. You don't need to think about easy things in advance, think about the problem instead.



More productive than any other language?

That's quite a bold claim...

I'd expect languages that require far less code for pretty much anything, and have far more compile-time safety to be more productive both at the prototyping stage, and at long term software maintenance.


"In my experience"

It wasn't a broad claim, it was an observation.




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

Search: