Dev
Coder ses tests sans les mains grâce aux Live Templates de PhpStorm
Je ne tape pas particulièrement vite, en tous clairement pas avec les 5 doigts des 2 mains[1] mais j’arrive à compenser parce que j’ai trouvé différentes manières d’écrire le même code que quelqu’un...
read articleLe tags, la fonctionnalité oubliée des lanceurs de tests
Il y a une fonctionnalité des lanceurs de tests que l’on utilise bien trop peu, moi le premier : les tags. Avec un peu d’imagination ils peuvent pourtant nous rendre de chouettes services, et voir...
read articleDes tests super lisibles
Cet article est une traduction et légère adaptation d’un article précédent écrit il y a déjà plusieurs années sur ce même blog. Les techniques exposées ici me sont toujours utiles et je pense qu’elles...
read articleUsing data provider to express business rules in test
When we write tests we want to achieve several things: ensure that the code works, create documentation, gain feedback about the ease of use of the system we are building and the quality of its...
read articleNaming collision
The context I don't know if I already shared that I work at Evaneos, a travel market place. Our job is to interconnect future travelers with travel agencies all over the world so they can benefit a...
read articleWhat if someday...
"What if someday..." These three words are probably one of the main causes of accidental complexity and late delivery in the software industry. As software developers we always try to guess...
read articleAsk about the freelancer
A few days ago I was involved in a discussion on twitter about a modeling problem. As a support for the discussion we were talking about a time tracking system and the concept of time sheet. I...
read articleIt should not throw an exception
I’m very interested in living documentation because it provides some great values. First, you finally have documentation, which is up to date and under version control. The other great thing about it...
read articleExtra readable tests
I’ve been doing some experiments with tests for the last few weeks. In this article I’ll share some tricks I’ve learned from others, mainly Sandro Mancuso, Matthias Verraes, and, of course, from...
read articleUnique instance anti-pattern
I'm back from the past. I have been trying to introduce some tests in one of the oldest part of our codebase. I'm back from a time where using Service Locator was the norm for a lot of people,...
read articleStop using the database for everything
First thing first, database are useful in a lot of cases and we need them. We need them when we have to store information provided by users or information changing on a regular basis. This is not the...
read articleWrite code for the dumbest person you know
I wrote this text a few months ago while I was angry and decided not to publish it right away, letting it sink in. I kept it, made a few changes and finally decided to publish it. I'm dumb You're...
read articleRemoving ifs
I'm not a big fan of if statements. They make source code harder to reason about, force us to write more test cases and increase cyclomatic complexity... We even debated with some colleagues on the...
read articleTravis and different PHP versions in the same repo
At work we have one git repository for several projects. While this has some advantages their is also some drawbacks. Setting up a CI is one of them, especially when all the applications can't run on...
read articleOOP Layers
Yesterday at work I ran into a pretty nasty bug and while looking through the code I spotted something which even if it wasn't the primary cause of all the mess made it really worst. The code was...
read articleTest for behaviour not for implementation
While working on SearchCache I made a test which was ensuring that two shared search results coming from a same search - using the same search parameters - should be stored using the same key. Here it...
read articleRefactoring VoteValidator with tests
A few days ago I decided that the t-shirt a day application doesn't need the complexity of a vote validator with a validation handler and only a method stating if a vote is valid or not returning a...
read articleWhy are 404 pages still a thing ?
In this article every time you'll see "a 404 page" please read "The dumb 404 page with an apologize and a link to the home page". This doesn't concern 404 in other contexts, please...
read articleProject macro structure
File organization is something crucial if you have to maintain a project for the long run but is often overlooked by developers. The way files are organized within a project is very important because...
read articleBDD and domain code
Behat is a well known tool for end-to-end testing but as Konstantin Kudryashov pointed out in his article Introducing Modelling by Example it can be used as a modeling tool too. As Konstantin points...
read articleTShirt a day
I've been reading a lot of books and blog posts, watching a lot of conferences about development for the past year and I was searching a project to help me wrap my head around all the interesting...
read articleSmurfing a Twitter bot
The idea The idea came up a while ago when I was talking with colleagues : Would it be possible to make a bot able to retweet speaking as a Smurf ? Smurfs, or Schtroumpfs in french, are an imaginary...
read articleAdd more element forms the nice way with AngularJs
We sometimes have to deal with forms where user can add items to a list. Most of the time an "Add more" button is created and we add an input to the form when it's clicked. I'll show you in...
read articleIn modal nested states with AngularJs ui-router
In an AngularJs application I'm working on we need to display details about an object on a modal and to be able to switch to an edit mode in the same modal. An other requirement is that the modal is...
read articleUsing PrismJs with AngularJs
In a project I’m working on I need to display code snippets. I found PrismJs library, which is lightweight and cover a lot of languages. The application is based on AngularJs, and code snippets are...
read article