News for hackers. Stuff that matters.
Re:AWS Java documentation is fucked by miralabs on Friday February 12, 2016 @11:38PM (#11092574)
in Java you always have this.. Impl Impl Impl.. Impl everywhere. I feel it's being passed from a senior and a junior dev who interprets the "program to an interface" idiom. Its so annoying to follow a code that is deeply nested with calls on a very basic controller call. It seems to be program to think that calls will be dynamically "replaced" and "reloaded".

So much complexity in the Java world and I don't know if its because of the language has not evolved throughout the years or the quality of developers (majority) that it has produced. Reminds me of this https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

We also have the same developers coding in javascript. I literally need to refactor once a 7k+ lines single ExtJS controller. Yeah Extjs is so popular in the enterprise java world.

Re:AWS Java documentation is fucked by manyxcxi on Saturday February 13, 2016 @12:06AM (#11092647)
To be fair about Interfaces and implementations- when you're using DI and Aspects, or really any type of framework that is going to be proxying your classes it is a good idea to code to an Interface, even if you only have one implementation.

I read a few great articles on this a long time ago and unfortunately I don't have the references at hand, but it was compelling enough that I Interface anything that's going to be proxied or injected.

That being said, I REFUSE to call anything an Impl. If I have an interface called FileSavingService, I'll have a LocalFileSavingService or an S3FileSavingService, but I'll chop my fingers off before I add Impl to the end of them.

Re:AWS Java documentation is fucked by jrockway on Saturday February 13, 2016 @12:23AM (#11092680)
I generally like coding things to interfaces, as you often implement the interface twice; once for the real system, once for unit tests of other dependent components. Not using interfaces leads to either compiling test code into your production binary, or other more-horrifying hacks (mocks!).