Profile cover photo
Profile photo
Gavin Hyde
52 followers
52 followers
About
Gavin's interests
View all
Gavin's posts

Post has attachment

Post has attachment

Post has attachment
Java 8 Overview: Lambdas
Probably one of the most requested features and biggest time saver in Java 8 are lambdas. Essentially, a lambda is a short hand way to create an anonymous inner class. Let's look at how we used to have to do an anonymous comparator for comparing the lower c...

Post has attachment
Free google play credit, what's not to like?

Post has attachment
Free Google Play Credit, what's not to like?

Post has attachment
Java 8 Overview: Exact numerical methods and negative floor/mod methods
Exact Numerical Methods One of the lesser known features added to Java 8 is the addition of exact numerical methods to deal with MAX_VALUE/MIN_VALUE situations. Normally when you do arithmetic with integers or longs (floats and doubles work the same but you...

Post has shared content
Did you know that Taxi Cab companies are trying to end Taxi Neutrality? They are saying that restaurants and bars are freeloaders profiting on their infrastructure, and they plan to drive customers to restaurants at 5mph unless that particular restaurant purchases a high speed customer transportation service from them. And that's in addition to the normal cab fare you already pay.

In addition, straw manufacturers are trying to end Straw Neutrality, arguing that juice bars are freeloading on their product, and want juice bars to pay them for a premium beverage suction plan for transporting lemonade from the glass to the customer's mouth.

Airlines also want to end air travel neutrality, arguing that touristic destinations and hotels are freeloading on their routes, and want hotels and vacation destinations to pay them to fly customers there. And that's in addition to the air fare you already pay, of course.

Do any of those sound absurd? Well, that's because they are all totally made up. I just invented them. But something very similar is happening on the Internet, and this one is true: internet providers are trying to end Net Neutrality using the exact same logic: web services will have to pay them to be able to provide a service to you. And that's in addition to the normal price you already pay for internet access.

Post has attachment
Mockito Captors and verify(): How to check objects created and verify method calls within a method
Like any good developer I'm sure you write unit tests for each line of your code. Now, you could simply write tests that will execute each line of your code and leave it at that and assume that if the line of code executed then it must be correct but what i...
#mockito   #junit   #testing  

Post has attachment
BigDecimal and equals(); the hidden trap
On my last project we were using BigDecimal for calculations (you don't still use double, or god forbid float, do you?). Like a good programmer I created a helper function for doing the divide to do the checks for things like the numerator or denominator be...

#java #BigDecimal #equals  

Post has attachment
New blog entry about default and static methods in interfaces for Java 8 is out.
Wait while more posts are being loaded