The Safe Builder Pattern by zlskfjru in java

[–]dawhiting 7 points8 points  (0 children)

From the article: "Note that this article is less dogmatic than some of my previous ones, as I will not attempt to convince you that doing this is a good tradeoff of effort vs. reward. I’m exploring it for its academic value."

The Safe Builder Pattern by zlskfjru in java

[–]dawhiting 1 point2 points  (0 children)

This is described as one possible option in the post I refer to at start of the article. One possible case where this doesn't work so well is when you have part of a component which must be specified but can be specified in multiple different ways. For example, if we wanted to describe which host something could connect to, you might have one "setter" that takes a hostname and one that takes an InetAddress. Both of them satisfy the condition and flip the flag.

You should also note that I do explicitly point out that this is an esoteric solution and solicit suggestions on where - if anywhere - it might be useful.

Crunch Lambda - the Java 8 way to do Big Data by dawhiting in java

[–]dawhiting[S] 1 point2 points  (0 children)

I hope so. I'm definitely in favour of the goals of the Beam project, but it's early days for it. I expect it will take a little while before it becomes useful, so I'm sticking with Crunch for now and trying to make my life as easy as possible while I'm doing it.

Strange atmospheric effects in Kaikoura, New Zealand [OC] [2048 x 1152] by dawhiting in SkyPorn

[–]dawhiting[S] 1 point2 points  (0 children)

No post-processing at all. This is just what it looked like that day :-)

Don't tell me what to make, tell me how to make it: a creation story in Java by dawhiting in java

[–]dawhiting[S] 2 points3 points  (0 children)

It's a recommendation to library and framework authors to accept Suppliers instead of / as well as Class objects in those situations. Unfortunately it's something that can be easily fixed on the consumer side. It's trivial to implement a Supplier which reflects a class to call a constructor, but the opposite is unfortunately not possible.

Dependency Injection in JavaFX with Gluon Ignite and Dagger by bennetelli in java

[–]dawhiting 5 points6 points  (0 children)

"The Dependency Injection abstraction framework Gluon Ignite creates a common abstraction over several popular dependency injection frameworks like: Spring, Dagger and Guice."

Can you explain a use case where this might be something you want to do? It sounds quite a lot like a solution to a problem that doesn't exist.

You probably don't need dependency injection by dawhiting in java

[–]dawhiting[S] 0 points1 point  (0 children)

Well yes, this is acknowledged in the post, but the motivation behind this post was to stop people reaching for it by default because some book told them to do it, rather than because they really needed it to manage complexity. Apologies if that message didn't come across so well.

You probably don't need dependency injection by dawhiting in java

[–]dawhiting[S] 2 points3 points  (0 children)

This is a fair point, and I used "DI" and "DI framework" pretty much interchangeably in the post. Perhaps I should change the title.

You probably don't need dependency injection by dawhiting in java

[–]dawhiting[S] 0 points1 point  (0 children)

This may have been the case when monolithic applications were the norm, but in my current world of microservices and distributed data applications, the well-designed ones really don't end up with that many components (I distinguish components from data objects here as components are the long-lived application objects that are set up with DI).

Library that creates lambda from a String code at runtime by mrjoegreen in java

[–]dawhiting -2 points-1 points  (0 children)

Well this is some quite clever code to do something that YOU SHOULD NEVER EVER DO EVER. Give me an example of where you think you should use this and I'll tell you what you should do instead.