By Chris on June 22, 2021
There is a 70 M lottery draw this week plus 70 one million prizes, I know this is no powerball, but here in Canada we are pretty excited. Even my wife is like: “We need to buy a ticket”. And she bought one with her father because 35M is still an insane amount of money. […]
Posted in rant | Tagged lottery |
By Chris on June 10, 2021
We had at work a piece of code that was using mongorepository and updating the arrays of the object on a collection instead of using mongodb method directly.The way it was coded had a big issues with concurrency and we were losing update because of it.The problem we had with the way it was updating […]
Posted in java, mongodb, prog, tips | Tagged java, mongodb, MongoRepository, MongoTemplate |
By Chris on May 19, 2021
This is old news, but having work with big bank and insurance companies they tend to stick with the old version of java and they’re underlying libraries, I’ve finally been expose to new ways of testing exception with junit. I use to test exception by adding an expected right after the @Test annotation.@Test(expected = NullpointerException) […]
Posted in java | Tagged assertJ, java, junit, junit4, junit5, mokito, testing |
By Chris on May 12, 2021
We recently added a feature that allowed direct modification on our content for some client vs using the same path (queues) that the batched content is using. Our user were really happy with it, but after our team implemented the new feature, we started having some LazyInitializationException. exception for that problem org.hibernate.LazyInitializationException: could not initialize […]
Posted in java | Tagged Exception, hibernate, java, LazyInitializationException |
By Chris on March 2, 2021
Once upon a time an engineer with years of experience encounter something so basic he doesn’t understand why he didn’t encounter it sooner. This week we had a strange error in our log stating that should have a null values in a map. After some digging in the service where that log was found, it […]
Posted in java | Tagged java, java.util.Map, maps, null |
By Chris on January 8, 2019
Perenial Seller: The Art of Making and Marketing Work that Lasts I’m subscribed to Ryan Holiday newsletter and read is latest work on stoic philosophy (Obstacle if the way, Ego is the Enemy, Daily stoic) and when he usually get a book out I buy it. In his book, Perenial Seller, we study on what […]
Posted in book | Tagged 2018, book |
By Chris on December 22, 2018
No drama discipline A another parenting book, I’ve read 3 of those in 2017 alone it’s from the same author of the Whole brain child. Learning to help your child to use their upstairs brain when they are overwhelm in their downstairs brain (emotion). Connect with your child first before trying to do discipline. See […]
Posted in book | Tagged 2018, book, Da Vinci Code, Love yourself, No drama discipline, Recession Proof Graduate |
By Chris on January 29, 2018
In January 2017 I’ve decided I would read 16 books, my goal is to hit 100 books read before I turn 40. I’ve already read 34 in 2013-2014, 26 in 2015, 12 in 2016, so I’m only 8 shorts of my goal, so I’m going to try to read 12 book this year since I’m […]
Posted in book, Review | Tagged book, List, reviews |
By Chris on October 19, 2014
My coworker was moving files around in our SVN repo and we end up losing the history of the file. It seem it was because of our IDE (eclipse svn at the time), after some searching we manage to find a way to do it by using the svn command rename & move. Doing everything […]
Posted in prog | Tagged source control, svn |
By Chris on October 12, 2014
While trying to remove a element after creating a List from a array using the Array.asList(array[]) method I’ve stumbled on that error. java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:131) at java.util.AbstractList.add(AbstractList.java:91) Then I remember this, list created by the Arrays.asList method are immutable Same goes for empty lists. So instead create a arraylist : List<String> list = new ArrayList<String>(Arrays.asList(split));
Posted in java, prog | Tagged arraylist, java, java.util.List |
Recent Comments