Skip links

Random knowledge shared...

  1. Sane defaults over Exceptions

    January 4, 2017 at 7:21 AM - by Freek Lijten - 7 comments

    Part of our work is defensive programming. A lot of webdevelopment is centered around taking input from a customer, processing it in some way and returning output. Since the source of input is out of our control we are used to writing all kinds of guards. Is this an integer (in case of a dynamically typed language), is it greater than zero, is it smaller than RANDOM_THRESHOLD, etc.

    What I see a lot is people using exceptions or even intentional fatal errors for this. I think the reasoning is that since the application will always generate the correct values, the only thing to worry about is malicious attempts and we can show those people 404's or error pages without feeling remorse.

    Read more about "Sane defaults over Exceptions"

  2. Switching jobs

    August 16, 2016 at 8:33 AM - by Freek Lijten - 1 comment

    After almost nine years I'm leaving Procurios to start a new challenge at the Netherlands' national airport Schiphol. I've really enjoyed my time at Procurios. It is a company where you're encouraged to challenge the status quo and has a lot of friendly people and skilled professionals. Over the years I started to feel itchy though.

    Read more about "Switching jobs"

  3. Final, private, a reaction

    June 17, 2016 at 8:09 AM - by Freek Lijten - 2 comments

    I read a blog by Brandon Savage a couple of weeks ago and it triggered some thoughts. He refers to a blog by Marco Pivetta which basically states "Final all the things!". Brandon comes back with a more mild opinion where he offers the notion that this approach might be overkill. Since both posts got me thinking I tried to organise my thoughts on this in the following post.

    Read more about "Final, private, a reaction"

  4. Sharing knowledge and starting discussions using lightning talks

    May 11, 2016 at 7:48 AM - by Freek Lijten - 0 comments

    Since lots of people at Procurios work in multi-disciplinary teams it is not uncommon to have only one or two direct colleagues that perform exactly the same tasks as yourself. A threat to this approach is knowledge on a certain discipline never goes beyond the virtual walls of an agile-team. Other disciplines have other challenges. Our servicedesk for instance is quite large and not everyone can share every bit of knowledge with every other employee. To share knowledge accross these boundaries most disciplines organize lightning talks.

    Read more about "Sharing knowledge and starting discussions using lightning talks"

  5. Three eventstorming workshops - a report

    April 13, 2016 at 7:56 AM - by Freek Lijten - 1 comment

    Tags: ,

    Since we learned of event storming at Procurios it felt like an interesting tool to me. Several teams started experimenting and using it for two main reasons. Getting to know the customers business and helping the customer realise that their business is much more complex than they always assumed.

    To help everyone in the company understand what we mean when we talk about event storming Pim and I organised a series of three workshops open to any employee. Bonus? I got three free tries at facilitating and learned loads.

    Read more about "Three eventstorming workshops - a report"

  6. Experiencing a Coding Dojo

    April 6, 2016 at 7:54 AM - by Freek Lijten - 0 comments

    Tags: ,

    Last night I attended a Coding Dojo meetup organised by Matthias Noback of IBuildings. Since this is one of the things that I've always wanted to organise but never got around to at Procurios, I happily jumped at the occasion and visited the fruit of someone else's labour. This is a short report of the night.

    Read more about "Experiencing a Coding Dojo"

  7. Fostering change using experiments over opinions

    March 25, 2016 at 8:43 AM - by Freek Lijten - 0 comments

    Tags:

    Change is important. Change is what keeps us motivated, helps us solve problems, makes us realise we messed up horribly (change back!) and generally makes for an exiting environment. There are a lot of things holding back change however. First of all, everyone has an opinion. On everything. Discussions on how to change generally cripple any actual progress.

    Read more about "Fostering change using experiments over opinions"

  8. Inheritance, composition and the meaning of "is a"

    October 16, 2015 at 1:20 PM - by Freek Lijten - 1 comment

    Tags:

    So I watched this talk by Sandi Metz dealing with the "Null object pattern", composition, inheritance and general Object Oriented design principles. It was really nice and you can see it here on youtube. The whole talk was great but there was one part that really struck me. I want to emphasize that part in this blog to spread the word. Basically: watch the talk. If you want to know what I liked in particular, come back or stick around :)

    Read more about "Inheritance, composition and the meaning of "is a""

  9. Keeping track of your branches

    September 2, 2015 at 8:45 AM - by Freek Lijten - 0 comments

    Tags: ,

    Anyone using a modern version control system has seen that branching really takes no effort. Git branches are easy and I'm sure this goes for other version control system. In my scrum team we tend to create feature branches for all changes that surpass "change the title of formelement X". This article describes (in short) my teams approach to managing all that branches.

    Read more about "Keeping track of your branches"

  10. DateTime createFromFormat without time

    August 12, 2015 at 9:08 AM - by Freek Lijten - 6 comments

    Tags:

    This is just a quick word of warning. I recently had a bug where two DateTime objects that were created with the same date were inequal to eachother. It turned out that this was a difference between the normal __construct() and createFromFormat. This is actually documented behaviour but since people might be searching for this problem, this post might help.

    Read more about "DateTime createFromFormat without time"

  11. Value objects

    July 16, 2015 at 7:49 AM - by Freek Lijten - 5 comments

    Tags: ,

    I would like to talk about value objects for a bit. Value objects are very underused, very powerful and general good stuff. They might not change your world but they will change, very subtle, a lot of the code you write. I hope to give the shortest possible introduction to the concept and follow up with a couple of example that make me like value objects so much.

    Read more about "Value objects"

  12. Setter anxiety

    June 24, 2015 at 8:10 AM - by Freek Lijten - 4 comments

    Tags: , ,

    Sometimes sudden (or slow) realisations can wreak havoc in ones mind. I've always (since long?) been a a proponent of constructor injection for dependencies. On the other hand I was not unused or diametrically opposed to constructing objects with their values usings getters and setters. But now, these setters scare me. I'm suffering from setter anxiety.

    Read more about "Setter anxiety"

  13. Testing PHP extensions - what makes a good test

    March 22, 2015 at 3:04 PM - by Freek Lijten - 1 comment

    Tags: , ,

    In my previous blog I took you through the process of getting PHP and extensions compiled, generating code coverage and running tests. What I did not talk about was what makes a good test. I hope to correct on this by adding this post and going into more detail on the actual writing of tests itself.

    Read more about "Testing PHP extensions - what makes a good test"

  14. Testing and improving PHP extensions for PHP 7

    March 12, 2015 at 1:58 PM - by Freek Lijten - 0 comments

    Tags: , ,

    PHP7 is coming. And it is coming to a neighbourhood near you :) A couple of people started an initiative to ensure extensions will be running out of the box once PHP7 hits the shelves. The fun part: You can help too! No C knowledge is necessary (although it is fun to dive into PHP's internals!). This piece is a short intro to help you help PHP! Help triaging extensions, write tests, add documentation and who knows when you'll be diving into C code.

    Read more about "Testing and improving PHP extensions for PHP 7"

  15. Separating concerns even better with events

    March 9, 2015 at 9:03 AM - by Freek Lijten - 2 comments

    Tags: , ,

    Object oriented architecture interests me. A lot is happening in PHP over the last few years. PHP might be a decade late but hey, it is happening. I feel a lot of techniques and terms like SOLID, BDD, DDD, CQRS and what not are essentially one thing: tools to help us model the real world in an as useful and understandable way as possible. The concept of an API or a Service is widespread, even  in PHP land. I feel the same goes for repositories. This is a great way of separating concerns, but there is room to improve! In my Services at least :)

    Read more about "Separating concerns even better with events"

  16. Separating models and logic for storing and loading

    February 13, 2015 at 8:10 AM - by Freek Lijten - 0 comments

    Tags: ,

    In this blogpost I will showcase a simplified problem I recently encountered. Basically I am wondering how storing data and retrieving data are different and how you should / could model this. Since we need different information while storing and retrieving information it makes sense to model those actions in different ways. The how is still bothering me and in this post I give a possible solution. I truly hope I can get some reactions and thoughs of other people in on how they would solve these kind of problems.

    Read more about "Separating models and logic for storing and loading"

  17. PHP Benelux conference

    January 24, 2015 at 10:44 PM - by Freek Lijten - 0 comments

    Tags: ,

    I'm not sure if I visited every PHP Benelux conference or if I missed the first. What I am sure of however is that each and everyone of them was a blast. Afforable, well organised, good speakers, great socials and insane closing ceremonies. This year was no different, these are reviews of all the talks I visited.

    Read more about "PHP Benelux conference"

  18. Quick conflict over comforting customers

    January 13, 2015 at 8:30 AM - by Freek Lijten - 0 comments

    Tags: , ,

    Deliberately displayed as one of the four statements from the agile manifesto, the title of this piece does not indicate that comforting customers is stupid or unnecessary. It indicates that quick conflict might be more important. Whatever I say in this piece, keep this in mind.

    Read more about "Quick conflict over comforting customers"

  19. Walk the board - making a daily scrum useful

    February 24, 2014 at 12:20 AM - by Freek Lijten - 1 comment

    Tags:

    For a while now I've been dissatisfied with daily scrums. For your understanding, we actually have two of them at Procurios. One is with our developer team (developer outside of the SCRUM context, meaning backend-coders writing code in PHP and the likes) and one is with the project teams. Both follow the "way of the three questions". This is not the most ideal way though.

    Read more about "Walk the board - making a daily scrum useful"

  20. Consistency vs. "The itch"

    February 18, 2014 at 1:28 PM - by Freek Lijten - 2 comments

    I assume everybody has certain rules, regulations, guidelines or conventions at their jobs/open source projects. I like structure and consistency so, as long as they are sensible, these things make me happy. Still, every once in a while, something itches. What wins, itch or convention?

    Read more about "Consistency vs. "The itch""

  21. SOLID - The D is for Dependency Inversion Principle

    January 2, 2013 at 10:07 AM - by Freek Lijten - 0 comments

    Tags: , , ,

    The fifth principle of the five SOLID principles is the Dependency Inversion Principle (DIP). You might expect an article on the ISP first, but I feel the internet is filled with enough posts about SOLID. This one was already finished so I'll publish it nonetheless :) 

    Read more about "SOLID - The D is for Dependency Inversion Principle"

  22. Continuous learning

    December 21, 2012 at 8:21 AM - by Freek Lijten - 2 comments

    Tags: ,

    A couple of years ago I was still at the Utrecht University of Applied Science (university in short from now on), I detested it. Sure, I liked information science and I like to dabble around, but formal education is something that was obviously not for me. It took me four different educations and a year of working in between to even finish one.

    Read more about "Continuous learning"

  23. SOLID - The L is for Liskov Substitution Principle

    September 4, 2012 at 8:55 AM - by Freek Lijten - 3 comments

    Tags: , , ,

    Between a holiday in the states, buying and redecorating a house and a summer it has been a long time since my last blog entry. It seems about time for a new one :) Today we'll be dealing with the third principle of SOLID, the Liskov Substitution Principle.

    The Liskov Substitution Principle (LSP) was coined by Barbara Liskov as early as 1987. The principle is very tightly connected to the earlier discussed Open Closed Principle. A good way of adhering to the OCP is understanding and implementing code that uses the Liskov Substitution Principle. In this article we will discover why and how.

    Read more about "SOLID - The L is for Liskov Substitution Principle"

  24. SOLID - the O is for Open Closed Principle

    May 7, 2012 at 8:27 AM - by Freek Lijten - 6 comments

    Tags: , , ,

    In the second installment of this series we will be looking at the Open Closed Principle (OCP), responsible for the O in SOLID. This principle is extremely important if you accept the premise that all software systems change during their lifetime. If you want to design systems that need to last beyond their very first versions adhering to the Open Closed Principle is paramount.

    Read more about "SOLID - the O is for Open Closed Principle"

  25. SOLID - The S is for Single responsibility

    March 23, 2012 at 8:26 AM - by Freek Lijten - 9 comments

    Tags: ,

    SOLID is an acronym that stands for five different principles that have to do with clean object oriented code. Lately the term SOLID seems to get more widespread in the community of PHP developers. Talks are given, blogs are written and information is shared. What I'm missing in all these is a thorough explanation of why these principles matter. I see a lot of explanations of the principles, but the why is lacking. I will try to create a series showing the why of each of the five SOLID principles, starting with the S of Single responsibility.

    Read more about "SOLID - The S is for Single responsibility"

  26. Book Review - Growing Object-oriented software guided by tests

    March 10, 2012 at 2:30 PM - by Freek Lijten - 3 comments

    Tags: , ,

    Recently I've been reading Growing Object-oriented software, guided by tests (Freeman & Pryce) and I thoroughly enjoyed it. I've been getting into unit testing and test driven development (TDD) lately and as such I am convinced TDD works and unit tests are vital to your application.

    The only problem is, there is a lot of text on writing unit tests and there usefulness, but I haven't seen much fully worked out examples of a TDD cycle. This book provided exactly that!

    Read more about "Book Review - Growing Object-oriented software guided by tests"

  27. Currently on PHP's internals - Property Accessors

    February 2, 2012 at 10:36 PM - by Freek Lijten - 11 comments

    Tags: ,

    My last article discussing the current status of PHP's internals was quite well read so it is time for another update. Today I will be discussing a feature that at this moment is called "Property Accessor". It is a method of defining getters and setters. Originally an RFC was defined as early as september 2009, but recently new discussion took place and an actual patch was created. There is no certainty this feature will ever make a PHP version but discussion seems to target implementation details and not the feature itself, so things are looking bright for this feature.

    Read more about "Currently on PHP's internals - Property Accessors"

  28. The real problem of the hash table dos attack

    December 29, 2011 at 6:20 PM - by Freek Lijten - 1 comment

    Tags: , ,

    Yesterday I read a tweet about something being fixed in the PHP core. Curious to what exactly was fixed I started reading. It appears that Julian Wälde (zeri) and Alexander Klink (alech) have presented a way to use the way hash tables solve collisions on different entries as a method of attacking web platforms.

    Since the attack is well covered I will explain it only briefly and mostly refer to good explanations. But more important than the attack itself is the way it was handled by various communities. To give a hint, it wasn't handled very well. At all.

    Read more about "The real problem of the hash table dos attack"

  29. Writing an OAuth Provider in PHP

    October 19, 2011 at 9:45 PM - by Freek Lijten - 17 comments

    Tags: , ,

    Earlier I wrote about consuming an OAuth service. This kind of blog posts is reasonably common on the internet. What seems to be less common is posts on providing an OAuth service. Today I hope to share some light on the topic by offering an extensive post on exactly that. As well as my first article the provider will use PECL's OAuth package.

    Read more about "Writing an OAuth Provider in PHP"

  30. Ubuntu 11.10 - my wifi is not working

    October 17, 2011 at 11:11 PM - by Freek Lijten - 12 comments

    Tags: , ,

    This morning I decided to update to Oneric Ocelot, Ubuntu's newest version. Actually, everything went smooth and I was a happy man. Untill Chrome timed out on me. And XMPP services went down. And nagstamon gave me a sad smiley face. And IRC all but got to a halt. My Wifi was failing. Failing so bad that, in effect, it was non-existent.

    Read more about "Ubuntu 11.10 - my wifi is not working"

  31. I was at a conference, you should go too!

    September 18, 2011 at 11:27 AM - by Freek Lijten - 2 comments

    Tags: , ,

    Yesterday I visited a one-day conference organised by a dutch PHP community (PFZ.nl). It was well-organised and entry came at a fair price (37,50 euro, convert here for yourself).

    I had a great time for three main reasons: I learned new stuff, I met people and I got inspired by topics I already knew about. I like to (shortly) share on the experience itself and I hope to explain why I think it is valuable to visit a conference every once in a while.

    Read more about "I was at a conference, you should go too!"

  32. Git commands, making your life easier

    August 30, 2011 at 9:24 PM - by Freek Lijten - 0 comments

    Tags: ,

    At Procurios we've recently migrated from SVN to Git. Since we're new to Git we make mistakes or don't know the best or quickest way to solve a problem. Usually this results in trial and error or a Google session. I'd like to share some of the results in this post so a next Googler might have a more easy job :)

    Read more about "Git commands, making your life easier"

  33. A tutorial on remote logging with rsyslog

    August 16, 2011 at 1:49 PM - by Freek Lijten - 6 comments

    Tags: , ,

    Why are you logging data? Two reasons come to my mind specifically: statistics and debug information. In the first case not being able to access your data for a period of time is not that big of a deal, statistics are only significant if you can collect them over a long timeframe. But if a specific server has an all out breakdown, and one service after another crashes, you want to determine what is happening right now. But then you'd have to have access to your logs over ssh. And this service has just crashed too...

    Once again we can count on our OS for offering a solution to this problem. Starting in 2004 Rainer Gerhards started writing rsyslog, a logging daemon which offers remote logging and strong filtering capacities. This article will cover setting up the system for remote logging and show some examples of possible day to day use. I will include the standard syslogs as well as apache's access and error logs

    Read more about "A tutorial on remote logging with rsyslog"

  34. Expressing algorithm complexity: the big O notation explained

    August 4, 2011 at 8:00 AM - by Freek Lijten - 4 comments

    Tags: ,

    I'd like to share a topic today which was re-introduced to me by a  lightningtalk of a colleague of mine. His talk was on the "big O notation". The big O notation is a tool you can use to express the order of complexity of an algorithm.

    It is useful because it lets you express the order of complexity of an algorithm without taking a lot of time profiling or researching the underlying algorithm. In other words: it gives you a quick way to gain an understanding of what might be wrong (or right) with a specific algorithm. 

    Read more about "Expressing algorithm complexity: the big O notation explained"

  35. Git commit hooks using PHP

    July 5, 2011 at 8:18 PM - by Freek Lijten - 1 comment

    Tags: ,

    Git has a flexible plugin system which lets you hook into various moments of the git flow. This can be very useful for checking code for syntax errors for instance. But also checking for conventions, refusing new files and other options are viable. In this article I'll describe the various hooks and give some PHP examples which will show how to use these hooks.

    Read more about "Git commit hooks using PHP"

  36. Currently on PHP's internals...

    June 10, 2011 at 12:12 PM - by Freek Lijten - 4 comments

    Tags: ,

    The internals list is the place to be to hear about the current state of PHP. It is one of PHP's many mailing lists, but this is the one where (core) developers discuss new features, current bugs and wild ideas. If you want to keep up with things it is a good idea to sign up, it is not an extremely high volume list and if you ignore the noise it is quite informative. In this article I would like to share examples of stuff typically discussed on the list.

    Read more about "Currently on PHP's internals..."

  37. Mounting a Canon EOS 550d on Ubuntu using gphoto2

    June 4, 2011 at 12:30 PM - by Freek Lijten - 5 comments

    Tags: ,

    So I have bought a wonderful new camera, Canon's EOS 550d, not so long ago. I am a linux user and, as usual, the software delivered with the camera was not compatible with linux. But, also as usual, the mechanisms of open source came to my rescue. There are perfectly good tools developed by enthousiasts. 

    Read more about "Mounting a Canon EOS 550d on Ubuntu using gphoto2"

  38. Logical Volume Manager (LVM), a practical approach

    June 1, 2011 at 9:37 PM - by Freek Lijten - 0 comments

    Tags: , ,

    In this article I explained the concepts behind the Logical Volume Manager (LVM). In this continuation I will have a look at the commands necessary to actually setup an environment with logical volumes. I will once again use the scenario of our storage machine as an example.

    Read more about "Logical Volume Manager (LVM), a practical approach"

  39. OAuth, a practical introduction with examples using the Twitter API

    May 18, 2011 at 9:12 PM - by Freek Lijten - 4 comments

    Tags: , ,

    If you're a webdeveloper and haven't heard of OAuth yet, you've been living under a rock. Apparently you moved though as you're reading this. In this article I'll try to explain the concept behind OAuth, give a quick overview of the technique behind it and give a real-world example using the Twitter API and a PECL package called OAuth.

    Read more about "OAuth, a practical introduction with examples using the Twitter API"

  40. Logical Volume Manager (LVM) explained

    May 5, 2011 at 7:22 PM - by Freek Lijten - 1 comment

    Tags: , ,

    Most of our servers over at Procurios are virtual. This means big servers with several harddisks in a raid array creating large amounts (several terabytes in one case)  of storage space. If you would create virtual servers directly on this volumes you would run into problems however. It would for instance be very hard to enlarge diskspace for a specific virtual server without bringing all virtual servers on the machine down. Luckily there is a solution for this: storage virtualization. On linux the Logical Volume Manager (LVM) is the tool of choice.

    Read more about "Logical Volume Manager (LVM) explained"

  41. Meld: A generic diff viewer

    May 5, 2011 at 4:13 PM - by Freek Lijten - 0 comments

    Tags: ,

    Sometimes you just want to see the difference between two files which are not under version control with access to easy diff capabilities. This can occur if you want to check your XML against an example for instance. Someone told me about a tool which can do just that: meld.

    Read more about "Meld: A generic diff viewer"

  42. Ubuntu 11.04 - how 'bout that

    May 2, 2011 at 2:39 PM - by Freek Lijten - 0 comments

    Tags: , ,

    So there is a new Ubuntu and today I tried a dist-upgrade and succeeded (reasonably well). Here's my  opinion on the new Ubuntu after the first few hours of actual usage.

    Read more about "Ubuntu 11.04 - how 'bout that"

  43. Mastering Git with Pro Git

    April 27, 2011 at 9:20 PM - by Freek Lijten - 0 comments

    Tags: ,

    We're going to make a move from SVN to Git at Procurios so it is time I get to know more about it. This is not going to be a long blog though, I'd just like to share my main information source up till now.

    Read more about "Mastering Git with Pro Git"

  44. Selectivity in MySQL

    April 27, 2011 at 7:57 PM - by Freek Lijten - 0 comments

    Tags: ,

    I heard a talk concerning MySQL by Joshua Thijssen some weeks ago where he spoke on Selectivity and MySQL for some minutes. I found this especially interesting and researched some more. This small blogpost is the result.

    Read more about "Selectivity in MySQL"

  45. Aptitude vs Apt-get

    April 26, 2011 at 3:14 PM - by Freek Lijten - 0 comments

    Tags: , ,

    As a debian-based linux user I am naturally confronted with package management. There seem to be two different tools to achieve the same means: Aptitude and apt-get. I use Aptitude because someone, sometime, told me it was the better of the two. Up untill now I had no real clue on why it was better. I decided to find out :)

    Read more about "Aptitude vs Apt-get"

  46. Less typing with my.cnf

    March 25, 2011 at 10:58 AM - by Freek Lijten - 2 comments

    Tags: ,

    I once read a lazy developer is a good developer. This makes me a good developer :) I just discovered a way to do less typing with a file called my.cnf

    Read more about "Less typing with my.cnf"