Mocking hard dependencies with Mockery

on December 23, 2014. in Development, Programming. A 2 minute read.

One problem with unit testing legacy applications is that the code has new statements all over the place, instantiating new objects in a way that doesn’t really makes it easier to test the code.

This is the last post about the Thinkpad and Fedora. At least for a while. Promise.

This week I got myself a new laptop, a Thinkpad T540p. One of the features it has is that the battery’s life can be prolonged by setting custom charging thresholds.

Xdebug and private /tmp on Fedora

on December 16, 2014. in Development, Software, Programming. A 1 minute read.

This one was a bit weird and needed some figuring out. Xdebug profiler output files were not being generated in the /tmp directory.

Continue reading Xdebug and private /tmp on Fedora...

Ack in vim

on December 09, 2014. in Development, Software, Programming. A 2 minute read.

I started using vim 3, 4 years ago. The way I use it is that I started out with no plugins and with a handful of lines in .vimrc. It is far too easy to cram all kind of stuff into it and then get lost in the myriads of key combinations. To prevent that, I decided to slowly add in bits and pieces I find lacking in my day to day usage of vim. Also allows me to first learn the editor and later the plugins.

Continue reading Ack in vim...

Developer conferences in Croatia

on October 28, 2013. in Blablabla, Development. A 3 minute read.

In the past month and a half I had the pleasure of attending not one, but two developer conferences in Croatia’s capital Zagreb. Both conferences are community organized, by people who apparently know what they are doing, as I only have words of praise for them.

Continue reading Developer conferences in Croatia...

Eight years of PHP

on April 04, 2013. in Blablabla. A 3 minute read.

This time around eight years ago I was introduced to this thing called PHP: Hypertext Preprocessor. I studied it in college as a part of classes on “Internet Technologies”. It consisted of HTML, CSS, some Javascript and XML, and PHP.

Continue reading Eight years of PHP...

Learning English

on March 29, 2013. in Blablabla, Free time. A 2 minute read.

Most of my knowledge of the English language is self-taught. I had English classes in elementary school, but that was more or less singing "London bridge is falling down" and reciting a list of irregular verbs. I also had a semester of English in college, but that again consisted of reciting a list of irregular verbs (true, this time the list was longer) and reading and translating engineering texts. Good for learning how to read a technical manual, but not so much when it comes to having a conversation with other people. Other than that, it's all from computers, music, films, books.

Continue reading Learning English...

Saturday night hack - coords

on March 24, 2013. in Development, Programming, Software. A 4 minute read.

When I was just starting out learning programming, everything was so simple. I did not care about design patterns and best practices and unit tests and how will users use that piece of code. Hell, I did not even know those things exist. I was having fun, I was learning, I was free to do whatever I wanted to do, I was playing, I was like a child. Not that there is something wrong caring about those things now, but then I was able to put out a piece of code that was fixing a core of one problem I had and that was it. Once I was done with that, I would move on to the next problem. For a long time now I was missing that feeling of not caring, just fix the damn problem and move on. Just to slap together some crappy piece of code, use it once or twice and then forget about it.

Continue reading Saturday night hack - coords...

When a package update goes wrong

on February 06, 2013. in Development, Software. A 3 minute read.

I am running Fedora 17 on my laptop, and yesterday there were some packages to update. Nothing unusual, updates on Fedora are quite frequent and, up until yesterday, there was not a single problem I remember with any update. And it was a small update, four packages in total. What could possibly go wrong, right?

Continue reading When a package update goes wrong...