4 April 2019

OneNote: Looks like this section is corrupted... (fixed)

...OneNote might be able to fix it, but you should avoid working here in the meantime. 

This was the scary error message I received from MS OneNote on my windows 10 system.
This section  lives on Google Drive File Stream, not sure if this has any impact.
These are the steps I tried to solve the problem:

  • OneNote proposes to resync the section. 
    • This does not solve the issue 
  • Online resources suggest copying the pages to another section, the deleting the corrupted section.
    • I did that, leaving some old pages in there.
  • I deleted the corrupted section
    • The section disappeared, but quickly reappeared, still corrupted
  • I removed all pages, I emptied the notebook recycle bin
  • I deleted the corrupted section again
    •  The section disappeared, but quickly reappeared, still corrupted, so I do not think sep 4 had any effect
  • I moved the now empty section to another notebook
  • I deleted the copied section in the other notebook
  • All my notebooks are fine now

22 March 2019

Java 12 is out

Another semesterial java release, feeling more like a Java 9 maintenance update.
Most changes relate to JVM internals, not to the language itself. This reflects how the JVM importance has grown with respect to the language.

Oracle is still mostly tuning its release process. The most notable novelty is indeed in this area: in Java 12 we have the first preview feature: switch expressions. You have to activate it explicitly and then you can work with the feature. Seems like a good way to get real world feedback before casting a feature in stone.

9 February 2019

Java Web Services resources (updated)

22 January 2019

Dozer DTO assembler (upate)

Dozer is a nice little object mapper. It moves data from one object to another.

Dozer can be used as a generic Data Transfer Object assembler. You specify your mappings in an XML file. By default it copies data to properties with the same names, unless you add specific field mappings.

 <mapping>
   <class-a>z.Original</class-a>
   <class-b>a.Kloon</class-b>
      <field>
         <a>identity</a>
         <b>uid</b>
      </field>
 </mapping>

Next you call dozer in your code to move your data:
public Kloon getDto (Original o) {
  return dozerMapper.map(o, Kloon.class);
}
Dozer can reverse map from class-b to class-a as well. There is an annotation based mapping mechanism which works well for simple cases.

MapStruct is a good annotation driven alternative.

17 January 2019

Never trust a feature with the word management in its name.

Venkat Subramaniam

14 January 2019

Windows: Adding tiles to a folder in the start menu (problem)

In the windows start menu you can group multiple tiles under one tile. Just drag one tile over another one and they are both grouped under a folder tile:

Only... it doesn't work with small tiles. Most of the time windows swaps the tiles rather than adding the tile you're dragging in the folder.
Stupid solution for a stupid bug:
  1. Resize the tile you are dragging to to medium size. 
  2. Drag the tile you want to add into it
  3. Resize the folder tile to small again.

13 January 2019

Personally I'm always ready to learn, 
although I do not always like being taught. 

Winston Churchill