Dec 4, 2018

Various approached to problem fixing

I worked with many programmers in my life. I saw two types of solutions for the same problem:

  1. Using X hours and writing 300 lines of code without any comments and zero maintainability
  2. Using 3*X hours and writing 50 lines of self-explaining, fully maintainable code
I always prefer the second approach. It costs more at development time but it always pays back in the long term and have nearly zero costs after deployment. But this approach is very rare unfortunately.

May 13, 2017

How stupid those spammers can be...

How stupid do they have to be to make so many errors in one mail and hope that I believe it is a legitimate PayPal message?

So, what do we see here?

  • Wrong style (PayPal messages do not look like this)
  • Wrong "From" name and email
  • Spaces before commas
  • Missing spaces
  • Wrong spelling of the name (WFT is “PaYpal”?)
  • Comma in places, where it should not be
Really, how stupid is this?

Aug 12, 2016

Thoughts about notebooks

Since 2008 I use Apple Mybook Pro for all my activities. I migrated from Windows to OS X because of better quality of the screen, higher resolution, better fonts and colors. If you have to spend 50 hours near the computer weekly, you should have a really good one.

My last Macbook Pro was late 2011 model. I was really reluctant to change it because it was a HiRes model (not Retina though) with a matte screen. I hate glossy screens. But time goes on and after five years I had to buy a new one. The old one stays as a backup and it is now being services by Apple authorised service center.

Meanwhile I thought about criteria that I would use to select a computer. I started to think about it because I saw a very good deal on Dell E7450 ultrabook. I am not going to run Windows on it but a certain kind of Linux. So here is what I got as my criteria and how the current Macbook 2015 matches to E7450:

CriteriaMacbook Pro 2015Dell E7450
CPU power
Need highest possible
2.8GHz, 4 cores2.3GHz, 2 cores
16GB at least
16GB, 1600MHz16GB, 1600MHz (upgraded from 8GB)
The more the better
1TB USD256GB SSD (upgraded from 128GB)
Only need good quality screen
Retina looks great but screen flickers when switching from integrated to discrete graphics and there are artefacts on the screen sometimes when using discrete graphicsScreen is excellent!
Screen size15"14"
Not really noticeable difference comparing to Macbook Pro
Non-glossy screenNot availableNon-glossy
Touchpad with multitouch++
WWAN connectivityNoYes, with Dell WD5809e card (GPRS/EDGE/3G/LTE)
Real battery life
Maximum possible
About 6 hoursAbout 6.5 hours
Weight2.04 kg1.54 kg
Upgrades possibleNoYes
General stabilityExcellentExcellent
Price3200€990€+320€ for upgrades

As you see, suddenly Dell beats Macbook Pro in overall comparison. Also given all kind of issues with video, privacy and upgradability, Dell becomes much better choice than a Macbook Pro. I also found that using Linux on Dell is a very good experience.

Probably, I will use more and more Linux on Dell Ultrabook and less and less Apple notebook. It still remains my main work computer but for side research and private activities I would prefer Dell & Linux.

Mar 3, 2016

RealURL 2.0

RealURL 2.0 is finally in TER.

Now I can relax for a couple of days...

Thanks to everybody, who helped:
  • My employer, snowflake productions gmbh, who donated many hours to this work and personally Patrick Aubert de la Rüe for his support
  • René Bigler, who was one the first to try it and submitted a big piece of code for integration
  • Benjamin Serfhos
  • Mathias Brodala
  • Artus Kolanowski
  • Robert Vock
  • François Suter
  • All those, who dared to install a pre-release version

You can help to develop the extension further:

Oct 14, 2015

Removing merged git banches

If you work in a team, create many git branches and push them to the server, you may end up with many local branches that were merged and removed on the server. The following simple command will clean up your repository from local branches that track missing remote branches:

git fetch --all -p

Oct 12, 2015

Set environment variable when "cd"ing to the directory

I love automation! It saves a lot of time and helps to avoid mistakes.

When I work on projects, I sometimes need to set environment variables in the shell when I cd into a directory in the terminal. I ended up with a shell function that replaces the standard cd command. It checks if there is a .env file in the current directory and executes it on entering. When you leave the directory, if checks if the file .env_off exists and calls that. That file can contain normal shell commands, not just environment variables.

Do not forget to export variables in the .env file!

The script is here.

Jul 15, 2015

Evernote plugin for browsers

Just discovered a nice feature of Evernote plugin for Safari: if you search in Google it can show related results in your notes:

Jun 14, 2015

Chinese IP camera user name and password

I forgot what was the default user name and password to access one no none IP camera. However I found those settings "encrypted" in the configuration file:


After a couple of minutes the solution came with the help of phpsh:

php> $arr = array(0x61,0x65,0x6F,0x6A,0x6A);for ($i = 0; $i < count($arr); $i++) echo chr($arr[$i] ^ $i);
php> $arr = array(0x31,0x33,0x31,0x37,0x31,0x33);for ($i = 0; $i < count($arr); $i++) echo chr($arr[$i] ^ $i);

Yeah, really "strong" encryption...

Apr 3, 2015

Why scam emails fail

Dear scammers!

PayPal is spelled like "PayPal", not like "paypal".

There should be no space after the punctuation mark.

And, please, improw yor Ingiz before you write those emails, ok?

I am bored to get this in my mailbox. You can do better than this!

Mar 15, 2015

realurl and dd_googlesitemap are released for TYPO3 7.0

realurl still supports 4.5 LTS while dd_googlesitemap requires 6.x or newer now. Also in preparation to support the newer news extension, former news sitemap is renamed to tt_news.

I think realurl and dd_googlesitemap can be used with TYPO3 7.1 too but I did not test that version yet. O hope to make it soon.

If you wonder why this happens slowly, the answer is simple: there is daily work and family, which takes priority over free work. As to 7.0, my employer is interested in getting these extension work with TYPO3 7.0, so they sponsored it with certain amount of time. This is how I could get these extensions out.