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

6 January 2019

Making shortcuts (links) in google drive

Using the SHIFT-Z shortcut on a file or folder, you can add it to another folder as a link
To remove the link from a location, go to the details of the file/folder. You will see that it has multiple locations. You can remove one of the locations here.
More...