peter on dev stuff

phpstorm and intellij tips

PhpStorm I find Jeffrey Way’s series on PhpStorm extremely useful even after 2 years of using the software. Please check out his series on laracast.com. On the other hand, Jeffrey uses a Mac therefore he’s keyboard layout and keymap preferences are somewhat different from mine. Feel free to adapt whatever you like from both of us. My keys were only really tested on Debian linux. Short keys Alt+0: Toogle Project window.

job interview questions to ask your employer

Note: I’m by no means an expert in this. I just made these questions up for my own sake. I did however look at posts created by others, some by self-proclaimed experts. There were only two that I actually liked. There are so many blog posts out there about questions to be prepared for as an employee as a developer. On the other hand we are often fortunate enough to be able to choose the company we want to work for.

how i ended up loving vim within a week

Where I’m coming from? I mostly work with PHP and JS at work. I code a fair bit in Go, some in Python and less in some more languages in my free time. As most devs, I’m always in love with my current toolset, especially with my editors and IDEs. I started writing code in Notepad++ a long-long time ago. Later I used Dreamweaver (I regret to admit), Eclipse, Netbeans, Sublime Text and “finally” PhpStorm.

phpmetrics of popular php projects

Story I came across a new tool called phpmetrics. It can be used for, what a surprise, calculating and displaying metrics for php. I fell in love with the tool in an instance and decided to run it on some php projects that I consider important. I’m aware of the fact that the list is far from complete, but it’s probably still worth a look. I especially love the “maintenability” (sic!) reports, I find those big red spots just as disgusting as I find ugly code the same.

First Impressions of Hugo

Prerequisite So I’m lately enjoying Go as my language of choice and Hugo is an open source site generator written in Go. It is a new project when you compare it to alternatives like Wordpress or Joomla but even when compared to the big fish of the genre: Jekyll. Since I haven’t done any blogging for ages, I had the urge to start over from scratch, hopefully lasting longer and having a much better sprint this time.

debugging cli scripts with xdebug

So you’ve set up your IDE to debug your webapp. Cool. It’s time to set it up for command line scripts too. No worries, it’s going to be a whole lot faster. export XDEBUG_CONFIG="idekey=XDEBUG_PHPSTORM"

jenkins for javascript I.

I actually thought that setting up Jenkins to properly test a PHP based application is hard. Then I tried to do the same for JavaScript… I’m currently half way there, but I think I already learnt enough to make up for a quick post. As an effort to make the code for this blog as clean and good as possible, I decided to set up Jenkins. It wasn’t a big deal until I made my mind up that the frontend part should also be tested there.

don't die

Your unit tests are broken, you need to figure out what happened. You analyze the stack trace and open up the file you feel to be guilty of the error. You put some var_dump statement - maybe you’ll put it in some pre in there and then just die(). It doesn’t help much, so you open up the next file and start again, maybe copy-paste your “debugger-statements”. We have all been there, but please, don’t do it again!