Hello
Welcome to the blog
Battle of the Bots: To-Do App LLM Reviews & Comparison
Starting at Tradeshift
After almost 8 years at Schantz, i thought it was time for something new. So after a couple of nice talks with the Tradeshift CTO Gert Sylvest, I’ve decided to join Tradeshift.
I’m starting this week at a new company with a new domain, so i guess i’ll be very busy. My guess is that most of the week will be spent on setting up the computer, and learn the new organisation and domain.
Using Snap CI with Golang
I’m finding myself writing more and more code in go, so i thought it were about time i got some CI up and running. Pretty much when that idea popped into my head, i got a mail from snap-ci. So i thought i would give it a go.
Snap is a product developed by ThoughtWorks, and it seems like a nice take on the whole CI thing.
But it seems that golang isn’t supported out of the box, however we can hack it a little bit to make it work :)
Java upgrade
Why should i run the latest java version
In Scala community there have been talks about what java version the next scalac should target. That got me thinking, why should we run the latest version of java, and by latest i mean the latest major version.
It turned out it was easier to argument why you shouldn’t run an old version, so here goes !
Security
Nobody wants to be on the cover of some newspaper because your application has been compromised. That’s why Oracle is using some many resource to keep java bug free. They actually are using so many resource to fix bugs, that the next java version has been pushed, due to lack of resources internally at Oracle.
Setting modules dir as default
When running code from IntelliJ i often run into the issue, that my project file is not located in the same directory as the code. This will mess up code that are looking for locale files since the don’t exists in the project directory.
The solution is quite simple and easy, but for some reason it has taken me for ever to find it.
You have to go the edit run / debug configuration, and go under the defaults. Find e.i. JUnit, and enter $MODULE_DIR$ in the working directory field. This will use the module directory as the default value when creating new JUnit run / debug configuration.
Repository pattern
Repository pattern
The basic idea of the repository pattern is to seperate buisness logic and persistence logic through a list like sematic.
The great thing about this, as asposded to the way orm’s does things is that you force the developer to think about when and how do i access data.You just can’t navigate around in the model, and expect some framework to handle it magiccally for you.
The idea of a repository teams up well with aggregates. Imagine the repository as an interface of List[Aggregate], where you can add, remove, delete etc. from.
Logging
#Logging
I was browsing through our code at Schantz were i do my daytime hacking. I found something that’s not unusual in our code base. To be fair it’s not unusual in most codebases.
The issue is logging, and more specific what log level should be used when.
So i’ve decided to give you my take on it.
Error
The error statement should only be used for actual errors. So if the system will fail catastrophically, and there is no known way to recover, a error is written.