Pages
Mikael Ståldal
Software projects
Categories
Archives
- November 2022
- July 2019
- June 2016
- February 2016
- August 2015
- July 2015
- June 2015
- May 2015
- December 2014
- October 2014
- June 2014
- March 2014
- December 2013
- October 2013
- August 2013
- January 2013
- August 2012
- July 2012
- January 2012
- December 2011
- November 2011
- October 2011
- July 2011
- May 2011
- April 2011
- November 2010
- August 2010
- June 2010
- April 2010
- November 2009
- September 2009
- August 2009
- July 2009
- April 2009
- January 2009
- December 2008
- July 2008
- October 2007
- May 2007
- March 2007
- September 2006
- May 2006
Author Archives: Mikael Ståldal
How to capture log events in tests with Log4j 2
Sometimes you want to verify that your program actually logs what it is supposed to be logging. When using Apache Log4j 2 as logging framework, it can be done like this: Include this dependency (for Maven, adjust appropriately for other … Continue reading
Posted in Java
Comments Off on How to capture log events in tests with Log4j 2
How to run exec-maven-plugin only if a file is not up-to-date
In my Maven build, I use exec-maven-plugin to run an external tool for Java code generation. In this case the flatbuffers compiler (flatc). By default, flatc always runs, so you always get a new .java file. This will always trigger … Continue reading
Posted in Java, maven, programming
Comments Off on How to run exec-maven-plugin only if a file is not up-to-date
Support fake Android TV devices
Android TV is included in some modern Smart TVs, and there are also external set-top-boxes to get Android TV for any TV with HDMI input. However, there are also some set-top-boxes which almost, but not quite, support Android TV. With … Continue reading
Posted in Android
3 Comments
Data structures and Domain Driven Design
After listening to a presentation about Domain Driven Security, I got some additional insights about what a data structure (as opposed to OOP object) should be able to do. Data structures (I call them struct) should have a subset of … Continue reading
Posted in programming
Comments Off on Data structures and Domain Driven Design
Objects vs. data structures
Several popular statically typed programming languages, including C++, Java and C#, have a serious design flaw. They make no useful distinction between objects in the OOP sense and plain data structures. A plain data structure should only be a dumb … Continue reading
Posted in Java, programming
2 Comments
Typesafe’s Reactive Straw man
In their quest to promote Reactive, Typesafe is beating up a straw man by portraying blocking I/O in a particularly stupid way which is rarely (if ever) done in practice. In a recent webinar, I found this slide which suggests … Continue reading
Leafpad > gedit
I want a simple, fast and lightweight text editor for my Linux desktop. I don’t want to learn a lot of new arcane key bindings, so not Vim or Emacs. I want a real GUI desktop application, not a console … Continue reading
Posted in Linux, Ubuntu
5 Comments
How to fix keyboard layout in Ubuntu 14.04
I regularly use Swedish keyboard layout, but I keep the English layout around in case I would like to temporary switch to it. Ubuntu 14.04 sometimes mess this up and I suddenly get English layout when I log in. I … Continue reading
Custom Preference for Android
I need a setting with a numeric value in my Android app. There is no obvious fit among the standard Preferences in Android, so I decided to implement my own Preference subclass. This was a bit more involved than what … Continue reading
Running Adobe Lightroom 4.4 in Ubuntu 14.04
I use Adobe Lightroom 4.4 for photo editing. There is one very annoying aspect of this program, it is not available for Linux (only for Windows and Max OS X). In order to run Lightroom on my computer, I had … Continue reading
Posted in Linux, Ubuntu, wine
4 Comments