The Wrath of Krang
Thursday, 11 April 2019
When the interview they told you to expect is not the interview that you get
›
Alternate title: "What's worse than whiteboard coding? Surprise quiz whiteboard coding!" I had a bit of a shocker this morning...
Wednesday, 1 March 2017
"I know.. instead of typing a forward-slash in a string, I'll declare a static variable for the "/" character"
›
Was looking at some code someone else wrote and came across: public static final String SLASH = "/ "; FML. Dude. WTF were yo...
Friday, 3 February 2017
Java JPA and Generics and Type Erasure: Casting a List
to List
›
Java Generics are a bundle of compromises and workarounds. Backwards compatibility is a PITA. We all know that. Anyway... I had a service c...
Friday, 20 January 2017
Rebuilding Nexus - what we did wrong and how we fixed it
›
Nexus is just a searchable cache for all the various jars you either downloaded from the internet or generated from your code-base. There ar...
Thursday, 25 August 2016
Unit tests with mockito - how to verify that a parameter to a mock method call has an expected value
›
http://stackoverflow.com/questions/1142837/verify-object-attribute-value-with-mockito Use ArgumentCaptor, then in your verify() call for the...
Wednesday, 27 January 2016
JSTL transforms null BigDecimal to 0 and null String to ""
›
Was scratching my head why I was getting zero for a BigDecimal that I was returning as null, then realised I'd forgotten about JSTL beha...
Friday, 11 December 2015
Problem and solution: "Content not allowed in prolog" when loading XML as string, even without extra characters
›
I was parsing XML files in a unit test, but was doing it incorrectly. I was loading them from classpath, then wanted to have them in a strin...
›
Home
View web version