Rationalizing the expense of attending a C++ conference


Posted by Jaime | Posted in Coding | Posted on 07-05-2019

In my mind, it is always a win to go to a C++ conference.

There are still managers who are against sending developers to conferences, for their own reasons, many of which I disagree with.

Not because I myself am a C++ developer, but because, as a community of developers, we do seek the opportunity to grow, to learn, and to connect with other developers.

Having the opportunity to do such things keeps developers happy, and being happy, means developers have more drive to deliver.

If you need a listing of reasons why to send your developers to a C++ conference, then have a look at http://slashslash.info/2019/05/reasons-to-send-your-developers-to-cppcon-or-any-c-conference/

Android Studio weirdness


Posted by Jaime | Posted in Tools | Posted on 07-05-2019

Or I should write, macOS and Android Studio not playing well with each other.

I updated my installation of Android Studio to 3.4 and something unexpected happened almost every time I brought up the “Find action” menu (Command+Shift+A) where Terminal.app would pop up immediately after the “Find action” menu popped up.

Turns out, this was a Keyboard shortcut conflict with the latest version of macOS Mojave (https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003367639-2019-1-Find-Action-shortcut-opens-terminal-securityuploadd-)

To fix the issue, you have to “Go to System Preferences | Keyboard | Shortcuts | Services and disable Search man Page Index in Terminal.”

USB Overdrive to the rescue


Posted by Jaime | Posted in Not-so-funny | Posted on 02-12-2018

Earlier this year, I took the plunge and bought myself a WASD Code Keyboard, with Cherry MX Green buttons and 0.2mm sound dampeners… it’s oh soooo nice! (http://www.wasdkeyboards.com/index.php/products/code-keyboard/code-104-key-mechanical-keyboard-mx-green.html

This keyboard was paired up to my 2017 MacBook Pro; I type a lot for a living and and mechanical keyboards work well for what I do.

When the laptop was on all the time, I didn’t have any issues. However, if the computer would go to sleep, sometimes, I would find that the keyboard would not work.

To get the keyboard to work again, the USB connection had to be disconnected, then reconnected.

Not a big deal if this only happened once in a while, but the keyboard not working after the computer came back from sleep mode was almost 100%.

On the internet, there were some wierd suggestions to get around this problem, one of which included using a USB extension cable.

Thankfully, I found a forum that suggested installing USB Overdrive (http://www.usboverdrive.com), and thankfully, that had fixed the problem.

It seems that even with the latest macOS, Mojave, I still have to use USB Overdrive.

If you experience the same issue, maybe this app can help you out too.

If you want to make your own card game


Posted by Jaime | Posted in development, games, Gaming | Posted on 25-08-2017

This site seems like the place to get it done: https://www.blackbox.cool

These folks are the creators of “Cards Against Humanity” and to boot, the site looks cool.

Cool terminal app


Posted by Jaime | Posted in bash, development, macos, terminal, terminal.app | Posted on 14-08-2017

Sometimes I run really long tasks in Terminal.app.

I sometimes wait.

I sometimes go somewhere else and forgot that it was running.

It would be so cool to have Terminal.app use Notifications to let me know that it is done.


Thankfully, someone has done just that and it can be downloaded via homebrew.

To install, type :
$ brew install terminal-notifier

To use:
$ echo "I'm pretending to be a long running task" ; terminal-notifier -message 'All done!'

Thanks to the folks over at apple.stackexchange.com for listing out this cool utility.

Perforce DVCS and iCloud Drive


Posted by Jaime | Posted in Coding, dvcs, infrastructure, p4, perforce | Posted on 10-08-2017

I use Perforce DVCS for almost all of my projects: it’s a great new feature for p4, and I use it on a daily basis, given, I usually away from my home server.

Now, there is one DVCS instance I use, which happens to be on my iCloud Drive folder.

That seemed to work well … until one day …

The instance stopped working. It didn’t recognize the DVCS client name, and when it would pop up the name in the error log, most of the client name was chopped off… even though I can see the client name in the “.p4config” file.

Not sure why that happened… but I’m guessing it may have something to do with iCloud Drive 😐

No biggie, since I have my data backed up to the server anyway.

Just made a new folder on my hard drive… not in iCloud Drive, and cloned my client again: “p4 -u jaimerios clone -p ubuntuserver:1666 -r AngryMittens_remote”

A quick word on modern BASH


Posted by Jaime | Posted in Coding | Posted on 30-05-2017

Tags: ,

Here’s a page that has some useful tips for modern BASH scripting: http://www.davidpashley.com/articles/writing-robust-shell-scripts/

Building OpenCV as a macOS Universal Intel Binary


Posted by Jaime | Posted in Coding | Posted on 02-03-2017

Tags: , , , ,


So, for my project, I needed an Intel Universal build of the OpenCV library.

The copy of the OpenCV source I have on my machine is version 3.0.0 and it has worked well for me, so I’ll start with that.

My build machine is running macOS 10.12 and has Xcode 8 installed on it.

OpenCV uses cmake for its build system, so you have to download and install the CMake app for macOS. I got my copy from https://cmake.org

I referred to the article listed on Wired Watershed to help me get started.

I made the following changes to the project once CMake.app was done processing the source folder.

  • Set CMAKE_OSX_DEPLOYMENT to 10.8, since my project needed it.
  • Unchecked 1394

However, when the 32-bit portion of the project went to build, it reported the following error: cap_qtkit.mm:46:9: fatal error: ‘QTKit/QTKit.h’ file not found.

Apparently, this is a known issue.

So, I thought I could solve this problem by going to version 3.2.0… off to GitHub

I cloned the master branch to my machine and ran CMake again on the new source, but when I build the project with Xcode 8, I saw other problems.


  • I unchecked WITH_LAPACK
  • I had to go into the Xcode project and set the C version to c11, and the C++ version to c++14.

Ok, things are getting better, but… the code doesn’t compile for 32-bit.


This can be fixed by … fixing the code?

Off to GitHub again, where I forked the OpenCV project and fixed the Obj-C++ code so that it will build for 32-bit Intel.

With that done, I create a pull request.

If you would like your own copy of the code I modified, you can clone the forked OpenCV repo.

Creating a remote from an already existing depo


Posted by Jaime | Posted in Coding, DevOps | Posted on 30-10-2016

Tags: , ,

Today, I created a remote depo, so that I can use the DVCS functionality in P4 with one of my projects.

First, I connected to my perforce server and typed:

$p4 remotes

To see all of the remotes that were on the server. Before doing this command you have to type:

$p4 login

Which thankfully, my username on the linux server is the same as my username in the Perforce server so I didn’t have to type that again.

Once I was logged in and saw that there was no remote set up for the project I wanted to use with DVCS, I typed:


This brought up NANO (I know some of you out there are rolling your eyes) and I modified the //local/… //remote/… paths to my liking. Remember, the left side represents the local depo representation on your computer and the right side of that mapping is the remote depo representation that is on your Perforce server.

Now, in another terminal, I typed:

$p4 -u jaimerios clone -p -r PROJECT_CODE_NAME

The last command then takes the files specified in the mapping and clones it to your local filesystem.

You can check that the origin server is set up by typing:

$p4 remote -o origin

Now, in my project, I had two read-only depos in my Perforce server that was for the Boost headers and the Google gtest framework libs.

For those normally import+ folders, I created a symbolic link to those folders that were already on my local filesystem:

$ln -s /Users/jaimerios/Development/Perforce/READONLY/libs/Boost ./Boost
$ln -s /Users/jaimerios/Development/Perforce/READONLY/libs/Google ./Google

And so far, everything seems to work well … except there are a few files I want p4 status to ignore, so:

$nano .p4ignore

I added some folders and files to ignore and life is good.

So, onto happy coding 🙂

How to install Perforce DVCS


Posted by Jaime | Posted in Coding, Tools, Utility | Posted on 20-09-2016

Tags: , , , ,

For 9 years now, I’ve used Perforce; before that, it was MKD, Subversion, VisualSourceSafe, CVS and a few others.

In the past year, I used Git.

One cool thing that Git has that Perforce didn’t have was being able to save your changes while not being connected to a central server.

However, Perforce recently added native DVCS to their source control tools so, checkouts and submits are now possible while offline.

Here are the steps you need to take if you want to use Perforce DVCS on your computer. Note, I’m using macOS, so my instructions are for that platform only.

Installation steps
Step 1: download Helix server at https://www.perforce.com/downloads/helix
You will need both p4d and p4 command line utilities, so head over to https://www.perforce.com/downloads/helix and download the “Helix Server” for your machine.

Step 2: Double-click the tar file to extract it
I think this step speaks for itself; on my computer I was able to double-click the tar file and everything appeared in a new folder.

Step 3: Make a folder for the binaries to live in
I created a bin folder in ~/Perforce/. I happen to have a dedicated Perforce folder in my home directory that I use for a lot of projects and the bin directory seemed to be a logical place to store the files.

From the command line you can type the following to make the folder:
mkdir -p ~/Perforce/bin

Step 4: Copy the binaries to the bin folder
Copy the p4d and p4 command line utilities to the ~/Perforce/bin folder (or whatever folder you just created)

Step 5: Add the path to the PATH environment variable
I edited my ~/.bash_login file using emacs to add the following:
export PATH=~/Perforce/bin:$PATH

Step 6: Load the Perforce bin path
Relaunch Terminal.app or open a new Terminal Window or source your .bash_login via
source ~/.bash_login

Step 7: Init your offline project
Here is how I got up and running:
p4 init -C1 -n

The extra settings after init tell p4 what case-sensitivity is should use and whether or not to enable Unicode support. If I didn’t add those, p4 would try to find a server to copy those settings from and that won’t work for me.

Step 8: Enjoy
From here, you use the Terminal.app and p4 to perform all of your Perforce commands and enjoy the goodness that is Perforce… like the super-large-file-support-without-choking feature 😉