Thomas Lextrait

Software Developer at EF & Founder of Jackfruit

Read this first

Find All Images With Given Attributes

I’m an iOS developer and with the release of Xcode 8 came a little issue. Apple introduced wide-color support on iOS 9. This meant that if you had 16 bit images then you couldn’t target older iOS versions, otherwise you would see something like this:

ERROR ITMS-90682: Invalid Bundle - The asset catalog at ‘Payload/XXXXX/Assets.car’ can’t contain 16-bit or P3 assets if the app supports iOS 8 or earlier.

So this prompted the need for me to easily find 16-bit images. Apple did help with that but it was really Xcode-project specific and I wanted to have something more generic.

 Note For iOS Devs (Others can skip)

For those of you who are finding this page because you’ve had this error, do also check this page: https://forums.developer.apple.com/thread/60919?tstart=0 and note the following:

If your Deployment Target is set to either 8.3 or 8.4 and you have an asset catalog then you will

Continue reading →


Source Code Is Only Half the IP

Nowadays every company needs to be making some kind of software. Every company needs a website, a mobile app maybe or more. Because of that most companies, including non-tech companies have either adopted a team of developers or have allocated a budget for outsourced software development.

We have all come to realize that source code becomes stale very quickly if it is not maintained and updated. Libraries, API’s, plugins, smart phones all change and applications that depend on those eventually stop working if they’re not updated. This means we live in a world where you can’t just pay a team of developers to build a website or an app and then it’s just “done”. Software development is a never-ending process.

Because software development is never ending, projects typically last years if not eternity. People rarely stick around for the whole lifespan of a software project. Software

Continue reading →


The Developer’s Dilemma

Screen Shot 2016-10-18 at 10.53.47 AM.png

I often see developers, team leads, development managers and so on who say they don’t have time for non-programming activities. Because of an aggressive schedule (I don’t know any company that doesn’t have an aggressive software development schedule), there is no time for:

  • Documentation
  • Recruiting
  • Blogging
  • Experimenting with new frameworks and tools
  • Building experimental features
  • Looking into new processes
  • Doing security audits
  • Fixing security issues that nobody knows about
  • the list goes on…

All these things though are crucial in the long term to ensure the success of the project and the company. Many recognize that and often the complaint is: “my boss (who may be a lead, a manager, director, VP Engineering or CEO even) doesn’t give me the time and flexibility I need”.

My theory and of course it’s just my own and I very well may be mistaken, is that when given the choice between

Continue reading →


Road Trip Calculator Update

Some time ago I created the road trip calculator and wrote a post that went over the calculation of the true cost of driving from Boston to New York City in a $25,000 car.

Today I am making a small update to the calculator. Aaditya Prakash, a good friend of mine who is pursing his PhD in Computer Science at Brandeis pointed out a small flaw in the calculation. Aaditya reminded me that owning a car has a fixed cost and taking a road trip has no impact on that cost. Therefore in order for you to know how much your road trip is costing you, and I mean the road trip alone, then the pro-rated ownership cost needs to be subtracted from the calculator’s result.

 Car Ownership Costs

In order to really focus on the fixed ownership costs – meaning costs that don’t vary based on your driving – let us assume you’re not driving your car at all. What do you need to pay for?

  • Insurance
  • Excise tax –

Continue reading →


Arduino: Power Consumption Compared

When I first started working on my Arduino drone, I decided I wanted to evaluate, understand and compare components before selecting them. Then I would be able to come up with an optimal combination of components, or if not then at least I would understand where my design is lacking.

Something I thought is fundamental is understanding the power consumption of every component so I could design a drone with a long range. However I couldn’t find a lot of data on the power consumption of the most key component of my drone: the Arduino.

At first I was tempted to just get the “best” Arduino, meaning the one with the best specs and most inputs/outputs. But why base the drone on the Arduino Mega for example, if it could run just fine on an Arduino board that consumes less power? And actually, the real question is: which one will consume the least power versus the specs it provides?

I thought

Continue reading →


Boston to New York: the true cost of driving

It is no secret that I love to drive. It may sound insane to many but I actually enjoy my 30-minute morning commute to work. For me it’s a privileged time when I’m alone, comfortable and can catch-up on podcasts and audio books. Anyhow this post isn’t about that, it’s about the true cost of road trips.

I have flown, taken the train, taken the bus and driven to New York many times. No surprise there: driving is my favorite because it’s the mode of transport that provides the most freedom. So what does it really cost to drive from Boston to New York and back?

nyboston.png

 Depreciation

Let’s assume you own an average German car that’s worth $25,000 and has 15,000 miles. It doesn’t matter what brand or what options it has. We know that when it reaches 30,000 miles it will be worth $20,000 (Edmunds). That’s essentially a depreciation of 30 cents per mile. I know it’s not linear but let’s assume it is

Continue reading →


Displaying Custom Pins on MKMapView for iOS

Please forgive minor inaccuracies since this is my very first iOS development post! email me with your suggestions. Also, this should work with at least iOS 7 and 8.

IMG_0059.jpg

I have found a few articles on the web that explain how to customize map pins but it turns out that a few issues arise when one does. Additionally an important use-case that I haven’t read a lot about is when pins need to contain dynamic elements such as text, which would be unique to one pin. I thought that I’d consolidate all this information in one post.

First, when designing custom UI elements I always prefer implementing a separate class. Therefore I recommend sub-classing either MKAnnotationView or MKPinAnnotationView in order to represent a pin. Just as a note, MKPinAnnotationView is a child of MKAnnotationView that allows customizing the color of the pin if using Apple’s default pins, as well as choosing whether

Continue reading →


Marriage in Vietnam

Thanks to my wife Nhi for helping me write this post

 Traditional Wedding Ceremony (“Lễ Vu Quy”), December 31, 2014

This winter I got married in Vietnam and did a traditional ceremony. It was fun and I wanted to share some of the details and intricacies such a wedding entails.

IMG_1736.JPG

On the day of the ceremony, the groom organizes a procession that travels from his house to the bride’s – Obviously I don’t live in Vietnam so we used a hotel in Saigon. The procession is led by two representatives: a married elder couple who is chosen to help organize and respect the traditions. They are followed by the groom, the groom’s parents and family, and the groom’s friends.

 Procession, Gifts & Significance

In the procession, the groom, his family and friends bear decorated boxes covered in red cloth. These boxes contain gifts representing the wealth that the groom’s family will bring to the bride’s

Continue reading →


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).

Arduino_Uno_-_R3.jpg

 Arduino

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:
https://archive.org/details/UpcDatabase2010-06-01

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

Continue reading →