Monday, November 25, 2019

Read - Understand - Assimilate

There's no place like Legacy Code!

And you know it becomes legacy as soon as new moon rises. Even if you have written it yourself!
It is no easy task to understand alien (or alientated) code. The best IDEs are optimaized to write code and they fail to help you read and understand the code.
I have already posted on OpenGrok, that can be used to search huge codebase in milliseconds. It has become even better, that now you can set it up in 2 minutes with docker. With OpenGrok you can search repeated code phrases, common patterns in several codebases.
But to understand concepts in a given project can be hard. Even though UML diagrams can be generated from source code, you usually get a huge and messy diagram with endless web of connections.
There is though a refreshing new tool on the stage called Sourcetrail.
The clean and intuitive design makes it easy to adopt, and you can browse your legacy project asap based on its maven project file. Some shortcuts are a bit strange to me (e.g.: CTRL+z is back), but in the long run it has no relevance.
It has recently become free as beer, but please, support it with donation of any amount - it is worth every penny!

Thursday, August 22, 2019

Firmware upgrade on ThinkPad

I do not know what could have been the last thing causing that much headache as the HDMI problem of my current laptop. After a succesful system update the external monitor was not recognized and stayed in a disconnected state. I spent some hours browsing false-positive forums hunting for a solution. Then I gave up and turned to the problem of updating the BIOS which in turn happened to be the solution to my display problem.
I was inspired by an article how easy it is to upgrade firmware on Linux nowdays. Of course my ThinkPad 13 is not supported by that... But at least it ignited my curiousity. Downloading the .iso image from the manufacturer's site was easy. To burn it on a pendrive - that was something! Lots of tool around the world to burn images, but noone tells you to unpack the .iso image first to a .img file. That was the missing link that I have learned from this video.
The main parts:
Thanks nixcraftcom!

Wednesday, February 7, 2018

Proxmox Backup to VirtualBox

When you backup a virtual host on a Proxmox VE, it is quite likely that you get a file named
something.vma.lzo . This happens to be an image packed twice. To unpack it one should call
  lzop -d a.c.lzo
Then
  vma extract  
But how can I get the vma command? It happens to be a Proxmox internal format. Fortunately a well built docker image is here to help:
  git clone https://github.com/ganehag/pve-vma-docker.git
  [sudo ]docker build -t vmaconverter .
  [sudo ]docker run -it -v [mydir]:/backup vmaconverter:latest /bin/bash
  vma extract ./file.vma -v ./vmaextract
As the last step the raw image will be converted to VirtualBox image:
  qemu-img convert vmaextract/disk-drive-scsi0.raw -O vdi disk.vdi
Cool.

Wednesday, December 16, 2015

Wind Screen Up

During evening developsing it might hurt to stay connected while database gets dumped. In the world of console driven operating systems there are several nice solution to that. One of them is the screen command.
With screen one can detach from an ssh session without interrupting the current execution, and later on it is easy to reattach and see what has happened.

Usage

Start it with:
$ screen
Detach:
$ <CTRL+a d>
Reattach:
$ screen -r
Reattach when multiple sessions:
$ screen -r <sid>
List running sessions:
$ screen -ls

Rejoyce!



Thursday, December 10, 2015

VPN breaks after 2 minutes

VPN breaks after 2 minutes

There is nothing worse than having a bad internet connection. I usually take some work home as operational tasks have to be done during the night. It is a bit funny that my internet connection at home is much stronger than the one in the office. But recently one of my VPN connections started to fail after 2 minutes. It was horrible, and I could not get a clue...
Of course it was my fault! Somehow my very own home network was configured in the IPv4 routes for the VPN connection. This caused a collision - a timed bomb.

Friday, April 24, 2015

Craft 2015

I just love it.
There is nothing comparable to the two days of technology recreation for a programmer.
Thank you for all the organizers and lecturers! It is unforgettable.
For all you poor fellows who could not make there, check out the site for the speeches!

Monday, September 29, 2014

Android on Budget

I have bought some budget Android phones for my children. It made me remember to my former phones where I had to take care of all the tiny details to get maximum power out of the machine.

The phones

Moto E

Amazing hardware for the price meets well optimized software.

Navon Mizu 502

Beast of a kind with dual SIM.

The problems

Cannot go back

To reach all the apps that I have bought on Play I have registered my very own account on their phone. One should take care though! When activating the phone the process takes time and you will not be able to turn of synchronization before it get started. When you get to turning off sync it should download a lot of information about you (calendar events, pics, etc.) already. Register first the account of the real user!
It seems to be a pain to move to a budget phone from a better one. 

State of ART

I wanted to test ART vs Dalvik. Actually the only real change was that apps cannot be moved to SD card. Do not turn on ART on a budget phone unless you know what you are doing!

SD card extension

As time went by I had to realize that there are some apps that cannot be moved to SD card. That was a bit strange to me first: it was allowed on former versions of Android. Nowadays the application providers can give their preference which does not help on phones with storage on diet.
Fortunately there is a possibility to change some preferences through adb to get into a better position.
And when you run into trouble with adb (like I did) it might be helpful to start the service as root.

No problem

Both phones are very useful, well built. It is just the memory that takes it all. At least kids have to learn taking care...