Thomas Lextrait

Sr. iOS Developer at Google

Page 3

Building a Drone With Arduino (p1)

There’s a few things I’ve always wanted to do but never had the time to. One of them is to play with an Arduino. The Arduino is a piece of hardware designed by a team in Italy (the blue board in the picture below).



This little board is truly disruptive because it breaks down several barriers that existed in the hardware world. I’ll illustrate this with an example: in order to develop a hardware product (a drone, a smart thermostat, a phone…) one could buy an ARM processor on a board and program it except…

  • That board costs a lot of money
  • The documentation is very complex and meant for professionals working in big firms that integrate this into consumer products
  • It requires proprietary software and cables in order to load applications into the board

Arduino solves all these issues. First the Arduino UNO costs just $25 from the official store, or much less if bought from a...

Continue reading →

UPC Database

I spent some time trying to find a UPC database. Essentially it is a database that associates bar codes to products and company names. Usually you would pay money to purchase such a database from a company that keeps one updated. However it turns out there is one available for free, right here:

I could be mistaken but I believe it dates back to 2010.

View →

Prime Numbers

Prime numbers are fun and it’s even more fun to come up with ways of finding them. People interested in prime numbers are usually interested in these areas of research:

  • Finding algorithms and formulas that yield a lot of prime numbers
  • Discovering the largest prime number possible
  • Designing algorithms that can evaluate a prime number as fast as possible

In this post I’m just interested in coming up with a very efficient way of finding all the prime numbers up to X. To achieve this, I designed a simple C program that applies a well known algorithm.

The Algorithm

First, a prime number is a positive and integer number that can be divided only by itself and 1. Such numbers are:

1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29...

Whether 1 is a prime number or not is up to discussion…

The obvious way to find these numbers is to follow the prime number definition and figure out if each and every...

Continue reading →

Of Web Apps & Architecture

In the recent months I have been asked several times what I think about the architecture of web apps, so I’ve decided to write this post. The architecture of web applications has been changing over the years and in this post I’d like to talk about where things are now and where I think they should be going.

MVC & Web Stacks

The Model View Controller design pattern and its derivatives (such as MVVM) have been the ubiquitous choice for user-facing applications since a while. This has given us web applications usually designed in two to four business layers (depending on what we define as a layer).

Several elements go into the design of an architecture: design pattern, protocol of communication between layers, choice of different paradigms for data storage… Here I’ll only focus on the protocol because it has been big a topic of discussion lately. I’ll start by presenting a few different...

Continue reading →

HTML and CSS for Beginners

If you’re reading this, then you’re probably thinking of building your very first website though you probably already have a domain name and hosting. In this short guide I’ll only focus on the essentials for writing the code to build a couple web pages.

Get a Text Editor

The first thing you need, is to choose a text editor. You will be writing HTML source code and therefore you need to choose an editor that’s appropriate, Microsoft Word isn’t going to work for this. There’s a million choices and software engineers can get defensive and are often religious about their favorite code editors.

Screen Shot 2014-05-15 at 3.54.43 PM.png

For Windows

  • Sublime (free to try, unlimited)
  • Notepad++ (free)
  • More…

For Mac

  • Sublime (free to try, unlimited)
  • TextMate (free to try)
  • Coda ($75)
  • Vim, Emacs…

Get Started

Let’s dive in, write something and see what happens. Just write:

Hello World

Save this to a new file called index....

Continue reading →

Get Started with LaTeX


LaTeX, originally TeX is the name of a markup language as well as the piece of software that renders it. It was created by Don Knuth and later extended by Leslie Lamport. You can read more about LaTeX on Wikipedia and the LaTeX project website, but essentially it’s an application that allows you to produce documents.

Why LaTeX


Unlike Microsoft Word, LaTeX is not WYSIWYG (it’s not “what you see is what you get”). This means you’ll write text, press a button and then the application will turn that text into your final document and look amazing. There’s a huge and not-so-obvious advantage to this. When you write text in Word or Pages, you will spend a lot of time tweaking spaces, font sizes, line heights and such in order to obtain the visuals you want. What you want is things to line up properly, spacing to be even and pages and paragraphs to break at the right spot...

Continue reading →

Driving in MA

Got some free time? maybe it’s an opportunity for a road trip. Massachusetts has a lot of places worth driving to that could suck out that free time you have like a black hole.


Cape Cod

I’m slightly cheating by starting off with the Cape because this is an obvious one. For those not from MA, Cape Cod is that little branch at the bottom right. Driving to Cape Cod takes an incredibly long time. There’s only one lane most of the road through the Cape, extending over 65 miles from end to end. Now for the good part, you will find the town of Wellfleet followed by Provincetown at the tip of the Cape.

Cap Cod has many beaches, bike routes and essentially chances to do physical activity. Personally when I go to the Cape I do the exact opposite: I go there for the food, which is basically the primary reason I go anywhere. Cape Cod is abundant with joints serving clams, lobster, fish...

Continue reading →



My name is Kiki. My days mostly consist of eating, pooping and sleeping. I usually eat grain or vegetables but my favorite is electric cables. Wires and cables taste amazing and the more expensive the better. My favorite is Apple cables, the ones that cost over $20 such as lightning or thunderbolt cables. HDMI cables are also pretty good. Though I think I binge bite cables to forget the fact that my lifespan is just 23 years.

8 years isn’t a whole lot, it’s the time it took Amazon to become profitable. It took me over a week to figure out where the water is, my odds aren’t looking good to do something with my startup idea. Did I tell you I have a startup idea? It’s a salad delivery service. I haven’t figured out the business model yet but I sure could use the service, that’s how I came up with the idea. I started work solving the traveling salesman problem. Efficient delivery is the...

Continue reading →

Design Houses with Minecraft

I’ve always wanted to build my own house. I’m an outlier and a software engineer. When I look at most houses I see inconsistent design, lines that don’t align, colors that don’t match, materials that don’t last, inefficient space use, poor placement of air vents and essentially everything that makes for a flawed design. I won’t talk so much about design as much as tools for designing, because I’m simply not an architect.

Pen and paper is a good start for designing a floor plan. If you don’t forget you need a closet for an HVAC, space for a washing machine or a spot to place the electric panel then it should be a good way to arrange walls and space. However, there are limitations: the two-dimensional seen-from-top view of a house doesn’t allow you to visualize the more complex design elements.


This is the point where architecture design software comes in. Unfortunately it’s really...

Continue reading →

Digging Dogecoin on a Dell blade

I just acquired a used Dell server on eBay for a total of $170 including shipping. I mostly bought it to experiment with OpenStack, do some benchmarks and such. Coincidentally I also recently read about the rise of Dogecoins, so I thought I’d try “mining”, or “digging” as they say for Doge.


I installed Ubuntu Server 12.04LTS, joined the DogeHouse mining pool and installed the cpu-miner program and started digging. It is considered inefficient to mine virtual currencies using CPU’s, since GPU’s tend to provide a better hashing rate. Unfortunately my blade doesn’t come with a graphics card and I’m not planning on buying one, I’m just curious about how much I can mine using what I have.

Server specs

  • Dell CS24-SC server
  • 2x L5420 Quad Core Intel Xeon 2.5GHz CPU’s
  • 8GB RAM (2x 4GB) PC2-5300P
  • 2x 500GB 7.2K SATA HDD’s
  • 400W Power Supply


With the setup described above, I obtain a...

Continue reading →