|
|
|
|
|
by aiurtourist
5663 days ago
|
|
I was in the same boat as you when leaving college — I knew the Java _language_, but I didn't really know _Java._ Prior to my first job I always thought of Java as "that big ugly language," but after a few years there I really started to get it. A few things that made me enjoy Java more: • Use an IDE Eclipse, IntelliJ IDEA or NetBeans. Vim can't handle things like automatic imports and serious refactorings like "extract method." • Use packages liberally. Start your project inside `com.mistrq.myproject` and make a good, semantic hierarchy. • Write applications with Guice. Program to interfaces and bind concrete classes at runtime. Dependency injection lets you easily turn a giant, hard-to-comprehend project into manageable chunks. • Be liberal with interfaces. Sure, we had a lot of single implementations for interfaces, but using Guice made it trivial to swap out implementations for experimentation. • Write tests. Use whatever's popular for unit tests right now, and check out EasyMock for amazingly-easy creation of mock objects. |
|