marcelpetrick

business card: put everything technically possible in the balance

Written by  on May 8, 2018

Some weeks ago I thought that it would be nice to have some business cards and then I started to think about the data I want to share, the design and what could underline my claim to be above-average?

A paper-card with all data: standard.
Adding QR-codes to lead the user to my homepage: nice.
Adding another, bigger QR-code to the back to give him all the aforementioned data plus address: better.
Putting a NFC NTAG216-sticker on the back which delivers on reading ALL information with the slightest effort: my level!

And yes, I think you noticed my pride. I am pleased with the result ๐Ÿ™‚

hint: created the QR-codes with the help of QR-monkey – well designed and comfortable to use

visualise your github <3

Written by  on May 8, 2018

Will create a nice overview of your projects, the amount of commits and the used languages. I like it ๐Ÿ™‚
http://ghv.artzub.com/#user=marcelpetrick

static code analysis: PVS Studio

Written by  on May 4, 2018

I am using a new static code analysis-tool for some weeks now and it turns out quite handy: PVS Studio.
It integrates quite well into Visual Studio and you can run the analysis of projects or the whole solution. Doing this can take a while, because all includes are analyzed as well – which is nice. For a single developer a trial-license is for evaluation enough – if you can refrain from the really nice “jump to the culprit”-functionality.
It looks like it detects more errors than cppcheck (another tool which I use now for years on several platforms) and without doubt: none of the reported lines were false positives!

Of course, there is always the discussion with colleagues if those tools help. But I will repeat it again: why not buy & apply them and get a lot of troubleshooting for zero investment of creativity and time!
The screenshot hints out (for instance) that some breaks are missing in the switch-case – and yes, the resulting symptoms were already reported as bug in JIRA.

ESP32: the future is now!

Written by  on May 3, 2018

Ok, the first drafts of the ESP32 (successor of the ESP8266) as presoldered boards (mostly called development-board) appeared 2016, so acquiring something like this in the current year is nothing special. BUT: I’ve had my hands on an ESP8266-board (nodeMCU v3 – if I remember correctly) and I was astonished! Integrated wifi on such a tiny board and then even micro-USB for flashing, wow. For someone who played with the MSP430-chips from Texas Instruments for his bachelor thesis, this is finally something affordable. “Smaller” than the RPi, but I see alot of potential for gathering and preparing data and the final distribution of information.

So, today I ordered from China (why buy from local or european shops, when you can save 60% if you have time?):

  • 2 x ESP32S (240 MHz DualCore from Tensilica, 4 MiByte integrated flash memory, Wifi, Bluetooth)
  • 2 x DHT22 temperature and humidity-sensor
  • 2 x MAX7219 modules (8×8 LED)
  • 2 x MAX7219 modules with 4 blocks in line (32×8 if you want to call it that way)
  • 2 x 0.96″ OLED displays RGB(!) and 128×64 pixel

Alltogether for less than 40 โ‚ฌ, which is really crazy. Let us hope everything arrives well and in the next five weeks and then the tinkering can start ๐Ÿ™‚ Have two “weather sensor-stations” in mind. Maybe a Raspberry as sink for the data. Maybe some Android-app via Blynk. Let us see…

I have the skill(s) – give me the hardware! ๐Ÿ™‚

backup often, backup early: Duplicati

Written by  on May 1, 2018

I wanted an open source-solution which allows to backup locally and remote certain directories (or whole PC). I found some month ago duplicati and used it for good at work, where it currently backups the content of the whole SSD-partitions to some interal hard disk (not the most secure backup, I know. But given to the constraints still better than no backup at all.)
At home the content of the two home-directories (Linux) is transferred to a shared folder on the Synology-NAS.
duplicati on wikipedia // code under GNU LGPL

I can just repeat: working without a backup is the best path to failure.
In my history as “computer technician” I have ruined several drives and especially when you just want to do a default, simple operation (*cough* move a partion on a hard drive *cough*), everything fails and there is no way to revert back to the original state. Never again ๐Ÿ™‚

book: “Lean Testing fรผr C++ Programmierer”

Written by  on April 26, 2018

Reading some developer-news lead to a quite interesting and practical brochure 840 pages) about software-testing in general and in regard to C++:
https://www.dpunkt.de/material/Testen/Openbook_Testen.pdf


The first glimpses about methodical, mutation-based test-case selection, (..) were interesting. Because fully comprehensive tests are (even with automation) not doable.
Will report after I have finished reading it – stay tuned.

 

edit 20180501: A bit disappointed, because I expected more. More content and more in-depth hints. In the end it looks just like the excerpt of one or two chapters of the book. Yes, it fans the flames for “more”, but … it looks like a cheap appetizer.

Create and maintain a shared, secure (family)-chronicle

Written by  on April 26, 2018

When my daughter was born, I thought already for a longer time about how to set up a:

  • shared,
  • secure,
  • remote-accessible platform to add stories, facts, media(!)
  • which are more or less automatically time-stamped.

We wanted to save the current steps of firstborn’s development, but not hand over the control of the data to a company. So external providers – even when they promised to be secure and safe – were out of question.
Drawn by the experience with some wordpress, which I had set up on the Synology NAS, which was first more and later less frequently used due to the quirky access to write entries and upload media, I decided against another microblog.
Of course, I even wrapped my mind around the idea of “what would be necessary to write an Android-app which synchronizes against my own server(s)”.

And then it hit me: just (ab)use the group-chat-functionality of one of the already used, secure messengers!
Data is immediately shared; it is secure due to the API-changes two years ago; it is possible to export the chronicle (with all the media); we can even alter it (remove unwanted entries); it is time-stamped;
and it costed me just two minutes to set it up!

(By the way: we chose out of the two candiates we use (Signal and WhatsApp) WA).
(I avoided the use of timeline to prevent the invocation of some weird social media-thoughts ..).

The reader may ask himself now: Ok, so why the entry? Nothing created, nothing implemented?
But I present this as one of the best examples of how to avoid to re-invent the wheel, something I’ve seen so often in my career. People start to re-implement given functionality from libraries just because they want to avoid the include or because they want to do it themselves (better).
But most often it is not about the LoC, but about providing usable, easy solutions. We* don’t have the time to do everything with our own hands if we want to be magnificent.

* I

current workplace: new category for annalist reasons (chronicle)

Written by  on April 19, 2018

Tools in use for daily development-tasks:
* development with C++11 & Qt 5.5 & boost 1.5.9
* Visual Studio 2015 and 2013 with Incredibuild and the power of ~100 PC as slaves
* QtCreator 4.6 for QML/Widgets/smaller projects
* MPC as buildsystem (converts to vcxproj/sln-files for VS)
* SVN (Tortoise SVN 1.9) for version-control company-wide
* Git (SmartGit 18.1) for our team-sources and better branching-control
* AutoIt-skripts for automation-tasks

* Agile/Scrum-like project-management (sprints; standups)
* daily stand-ups for the core-dev-team
* two weekly stand-ups for the full team
* Jira for tickets
* Crucible+FishEye for code-reviews

* MagicDraw/DOORS for modelling/test-cases
* pgAdmin for SQL-related things
* RapidEnvironmentEditor to edit conveniently environment variables
* cygwin/GNUwin32-tools as POSIX-bash-replacement
* Jenkins for the continuous build
* Notepad++ as helpful XML-editor

* medium-sized company; team-size 10-15

QT_MESSAGELOGCONTEXT: more detailed qDebug()

Written by  on April 19, 2018

Add to your environment:

Windows: set either via “set” or via RapidEnvironmentEditor.
In case of a no-debug-build, add QT_MESSAGELOGCONTEXT to DEFINES in the pro-file.

(Open question: if there are just mpc/vcxproj-files, then how to trigger?)

related sources:
* https://woboq.com/blog/nice-debug-output-with-qt.html
* https://fecub.wordpress.com/2015/11/04/better-debug-output-using-qt_message_pattern/
* http://doc.qt.io/qt-5/qmessagelogcontext.html#details

robocopy: transfer huge repositories between PCs

Written by  on April 16, 2018

Average rates of 24% on 1 GBit-connected PCs with SSD were achieved! ๐Ÿ™‚

############################

my favorite parameters:
/NP – no status
/ETA
/E – with subdirs
/MIR – mirros (like /E with /PURGE)
/MT – multithreading
/XD – exclude the subversion-metadata

resulting command

note: multithreading with 32 threads was slower than with just 8: 10 min vs. 7 min for 18 GiByte files of varying size

photo-backup: