It's been 18 years since Joel Spolsky's 12 steps to better code and since back then, technologies, tools and techniques have improved greatly. In this post, I want to share with you what I think is the checklist any software company should comply with nowadays.
Do you version-control everything?...
While coaching a team on how to program in a TDD fashion in C, I stumbled across this wonderful testing and mocking framework.
I often have to develop softwares in C++, so I was getting used to write tests using GoogleTest and GoogleMock. When I had to write code in C, it remained the way to go,...
I made a cheatsheet to help people get into GoogleMock, and I want to share it, along with the links and cues you need when you'll get started with GoogleTest.
Here's the links to GoogleMock's CheatSheet and to GoogleTest's CheatSheet
In order to use GoogleTest, have a look at the Advanced G...
I gave a seminar in French at Laval University, which will give rise to a 2 days course that I will start giving in Montreal in 2016. This post offers a download link.
During this seminar, I discussed with the attendees about:
Embedded Systems
The different kinds of embedded systems
The diffe...
The vast majority of the unit tests we write mandates an initial context. This post is all about cleaning this initial part so the tests read like well written proses that go straight to the points. I give all the credits of this post to Elapse Technologies as this is a quick reference to one of...
Don't laugh! That may sound curious (or trivial, if you are a true tester), but why would you repeat the tests for the methods of an abstract class into all of its children? Or worst, why would you write the tests for the methods of an abstract class in only one child? That would not be unit tests...
Suppose you have a class with a public constructor. This class contains a private object that do a lot of stuff you don't want it to do for unit testing. Here's an excellent way to do that.
Imagine you have a User class that contains a class for authentication:
public class User {
private St...
Have you ever seen or written static methods in your company's project? I'm sure that some of you did, because I often fell into static classes when I dug into most of the entreprises' code I visited. The question is: Do you think it's a good practice?
Just to make things clear before I start writ...
During my Master's degree, I found a complete tutorial for the quaternion algebra. The authors explained the process of implementing a Kalman filter for attitude estimation with 6 degrees of freedom. In this post, I show an implementation in Matlab. I've also made a Python version of the code, so wr...
I'm the first author of this paper, which was accepted to the International Symposium on Robotics Research of 2013. In this post, I present the abstract of the paper and I offer a download link.
Here's the abstract:
The solution of cooperative localization is of particular importance to teams of...
On my previous post on this subject, I explained how I created a Sudoku solver for Android using the CoR pattern. Now, some students I am supervising in an engineering course at Laval University were given the task to solve a Cubic Sudoku. This problem looked interesting so I wanted to search a bi...
A couple of years ago, I implemented with the help of Julien Grenier a little program for creating random sudokus and for solving them in an intelligent way. We demonstrated that there was a simple way to solve a Sudoku faster by avoiding the bruteforce solution. Since it worked well, I took a day...
While doing a code reviews in a class of studients at Laval University, I heard that some people think that design quality is a very subjective matter. As long as they were using design patterns, the code they developped was clean. In this post, I will explain that everyone should be careful when us...
One of my friends, Jean-Nicolas Viens (JNI) found this tweaked version of the singleton pattern. It make possible to inject mocks, so unit tests are still possible!
public class RepositoryLocator {
private static RepositoryLocator instance;
public static RepositoryLocator getInstance() {...
This small post is about the SOLID principles. They have been described in the books of Uncle Bob and in his blog, which I invite you to follow cleancoders.com.
But as I know them, I wanted to put them in my blog.
SOLID is an acronym of their combined names :
SRP: Single Responsibility Princip...
I've recently started a big data project with Mathieu Dumoulin. We are using Mahout with Hadoop to do some machine learning with some Map Reduce in order to deal with big data the right way. We've found the way to test our Map Reduce code, so that's what I present in this post.
Long story short, w...
In this post I present a paper that I wrote with Mathieu Dumoulin. We presents a fully scalable approach to improve classification by adding confidently labelable examples from a big dataset of unlabeled examples to a small original training set.
Abstract :
In real world applications of machine...
In this article, I will present you Pig, a scripting language that is used with Hadoop. I had to learn Pig for a project I worked on with Mathieu Dumoulin. Pig is very similar to the SQL's syntax, but allows one to manipulate big data in mapreduce mode quite easily.
First, you can find good tutori...
During the winter session at Laval University, I followed a course about machine learning. One of the homeworks to do was to learn how to use scikit-learn in Python. I teamed up with Mathieu Dumoulin. In this article, I present you some code, so you will learn how this tool work.
First, you can g...
I got a quick tip. I had to implement a visitor pattern (as in GOF's book, "Design Patterns", go read it). After it was done, I suddenly realized that this class had created an enormous cycle of dependencies in my program. It is a problem inherent to the pattern when implemented in C++, C#, Java and...