Deploy code using git

It is common amongst developers to deploy code using git. However, I have never done this before. I am (generally) familiar with git and source code management concepts, but using git for a deployment is something I always wanted to do. BitBucket (and I expect other repo services) allow users to add a deployment key to their repo. This key is read-only, so you can be confident when you upload it to your remote host, no malicious user can use it to modify your code.

These instructions are written for BitBucket (which is the remote repo that I use), but should apply in a general sense to all remote repos.

Generate a new public/private key pair

$ ssh-keygen -t rsa

Be sure to set a passphrase, for maximum security. After all, you will be uploading the private key to a 3rd party, so make sure a passphrase is required so anyone who accesses your key cannot access your code.

Upload public key to BitBucket as deployment key

Navigate to your repo on the BitBucket website. Under Navigation in the left-side bar, click Settings, Deployment keys. Click the Add key button, and follow the prompts.

BitBucket menu showing where to find 'Deployment keys' setting

Copy private key to host

$ scp ~/.ssh/deployment-key hostname:~/.ssh/deployment-key

Configure ssh identity on host

Edit the ~/.ssh/config file on the host, using vi/vim/nano/emacs/whatever is available to configure ssh to use the private key when authenticating git requests with BitBucket.

Add the following line:

Host bitbucket.org
IdentityFile ~/.ssh/deployment-key

Set permissions for private key on host

When I tried to clone my repo, Git on my host alerted me to a security concern that the private key had excessive privileges. Run the following command to ensure that the private key is only accessible to your user:

chmod 600 ~/.ssh/deployment-key

Clone repository

git clone git@bitbucket.org:account-name/repo-name.git local-directory-name

Note these instructions assume you want to deploy the master branch. If you want a different branch, then add the -b branch-name flag to the clone command.

That’s it! Once the repo is cloned, you can simply run git pull to grab the updates in BitBucket. Follow these instructions each time you wish to deploy code using git.

SOLVED FaceTime camera on Thunderbolt Display does not work

Ran into an issue this evening trying to use my FaceTime camera via my Thunderbolt Display. After launching the video conference software and connecting to the call, camera would not share any video. It simply showed a black screen.

Some quick Googling revealed the answer. Run this command in your terminal:

$ sudo killall VDCAssistant

Then restart your video conference software (FaceTime, Skype, whatever). Your camera should begin sharing video right away.

Putting ‘Minimum’ in Minimum Viable Product

Many startups struggle with the concept of a minimum viable product (also known as an MVP). A number of clients that I work with believe that they need to have a perfectly functional and polished product before they show it to anyone. As a result, they will spend countless hours and significant amounts of money developing and refining their product without any input from a customer. In many cases, these entrepreneurs end up building something that nobody wants, and as a result, their startup collapses due to poor sales.

Instead, entrepreneurs need to think about what truly constitutes a minimum viable product. An early stage startup must focus on iterating their product quickly while spending as little cash as possible. The idea is to experiment as much possible, as quickly as possible. An entrepreneur must ask himself or herself, “What are the 5 most important ideas to be tested in a minimum viable product?” and “How can I test these ideas with spending the least amount of money and time?”.

The development from minimum viable product to commercial product is a progression. For initial experimentation, startups can receive significant value from a simple hand-drawn wireframe of their software or model of their physical product. After receiving feedback from customers, startups can upgrade from a sketch to a functioning prototype, or what I like to call the ‘garage prototype’, meaning an ugly but operating digital or physical product that may have exposed wires or buggy code. Again, after receiving customer feedback on this version, a startup can develop a more refined version.

Mike Kitchen, from WealthSimple, gives a great talk on how to build, and iterate, your MVP. Notice how WealthSimple began with a minimum viable product of a basic Excel spreadsheet that was used to gather feedback from a small group of users. Using that feedback, Mike improved his product, added more features, then sought more feedback from a larger group of users. As a result, WealthSimple built a very successful startup built upon real customer needs without over-engineering the product.

The Calgary Startup Ecosystem

The Calgary startup ecosystem consists of a large collection of government agencies, non-profits, incubators, and accelerators that provide various support and resources to start-ups. I feel a major challenge with the entrepreneurs in Calgary, particularly the early-phase ones, is that they find it difficult to find these ecosystem players and understand how they can benefit their startup.

To remedy this, below is a list of various participants in the Calgary startup ecosystem.

First, I will recommend that all entrepreneurs start with the Alberta Innovators Network (albertan.com); a web portal with links to nearly all of the public and private startup support organizations.

Government

Calgary Economic Development

Calgary Economic Development

Responsible for developing and executing Calgary’s 10 year economic strategy.

Sustainable Development Technology Canada

Sustainable Development Technology Canada (SDTC)

Promotes sustainable development technology and startups in Canada. Focuses on startups solving problems related to climate change, air technology, clean water, and soil.

Community/Non-profit

Startup Calgary

Startup Calgary

Serving early-phase startups from idea to MVP. Creates and maintains a community of startups and entrepreneurs. Seeking to connect people together to create ‘sparks’ of innovation in Calgary.

The A100

A100

A group of C-level tech entrepreneurs and founders who seek to inspire and support the next generation of technology entrepreneurs in Alberta.

Innovate Calgary

Innovate Calgary

Serving clients at all stages between idea and investment-ready. Innovate Calgary offers applied education programs, mentorship opportunities, bespoke consultation services, intellectual property management, and a co-working space. The company operates closely with the University of Calgary and serves researchers, students, and community clients.

TEC Edmonton

TEC Edmonton

Joint organization between the City of Edmonton and the University of Alberta. Offering various educational and consultation services for early and mid-phase entrepreneurs. TEC Edmonton serves clients from all industries, but operates an accelerator for health technology startups, in partnership with AHS.

Accelerators

District Ventures

District Ventures

An accelerator lead by Arlene Dickinson for consumer packaged goods, such as food and beverage. Manages a $40m venture fund. Connects its client companies with retailers and distributors.

Zone Startups Calgary

Zone Startups

A collaboration between GE and Ryerson Futures. Focuses on startups in the energy, clean tech, smart cities, power, and internet of things (IoT) spaces. Includes a $8-10m seed fund for clients.

SOLVED Time Machine volume not mounting in OSX

I use an external USB drive to store my Time Machine backups, as most people do. The drive is split into two partitions; one for  Time Machine, the other for general data. Every few weeks/months, OSX will no longer mount the Time Machine volume. The volume appears in Disk Utility, but greyed out. The Mount option in Disk Utility is also greyed out. Overall, it appears that OSX can detect and identify the volume, but does not present any option for actually mounting it (at least through the GUI)…

The issue is caused because my Time Machine volume is encrypted. Encrypting your Time Machine backups prevents malicious people who gains access to the backup image will be unable to view the data (or at least it will take them quite a long time to break the encryption). The encryption option is available through the Time Machine area in System Preferences, and is highly recommended.

For whatever reason, OSX ‘forgets’ how to decrypt the volume in order to mount it. The solution is pretty straightforward, but will require use of terminal.

To find the UUID of the encrypted Time Machine volume, execute this command in a terminal:

$ diskutil cs list

Within the results returned, find the UUID of the logical volume used for Time Machine. Look for the LV Name field that matches the name of your Time Machine drive.

To unlock the volume, execute this command in a terminal:

$ diskutil cs unlockVolume UUID -passphrase PASSPHRASE

where PASSPHRASE is the password/key for the volume.

If this command executes successfully, OSX will unlock and mount the volume. You can then resume Time Machine backups as normal.

The Importance of Product Design

Customers love products with great design. A product may work great and provide real customer benefit, but will struggle to gain momentum and marketing ‘buzz’ if it looks unappealing. Therefore, the design of a product (or service) is just as important as its functionality and the value it provides to a customer. In fact, many customers presently expect products to be just as beautiful to look at much as they are reliable and functional.

Over the past two decades, companies such as Apple and Tesla have used product design to create competitive advantage. Furthermore, these companies discovered that customers are willing to pay a premium for a more attractive product. For example, compare two canister vacuum cleaners; a Dirt Devil and a Dyson. Without looking at the specifications of each, it can be agreed that both products perform a similar function (floor cleaning) and are constructed from similar materials (plastic). The significant difference is the design and attractiveness between the products. The Dirt Devil resembles a standard modern canister vacuum. The Dyson, however, looks like something used on a spacecraft. The standard two rear wheels are replaced by a single orb. The filter was crafted to mimic a jet turbine. Clearly, the Dyson team spent significant time crafting the look of the product.

The effect of product design is reflected in the price difference between the two vacuums. The Dyson ($599) is priced approximately CAD $400 more than the Dirt Devil (CAD $199). Of course, Dyson may have some higher internal costs, however one can expect that a retail price difference of 200% provides Dyson a much healthier margin than Dirt Devil.

Read this article from Entrepreneur magazine to learn more about how product design affects the emotion of the customer, and can either persuade (or dissuade) someone from purchasing a product.

Don’t Waste Time Choosing a Programming Language for your Software Startup

A client recently asked me for some technology advice regarding his startup. His team is developing software for physiotherapy patients and was curious on whether switching from MySQL to a no-SQL database (MongoDB) would be advantageous. Their development team is intelligent and capable of learning, but had no previous experience with both Mongo and no-SQL databases. The advice I provided to them is the same that I have told countless startups asking such technology questions:

Early phase software startups should build their product using whatever language their team has the most experience with.

The early days of a software startup, or any startup, is about Customer Development. The focus should not be the technical or performance elements of the product. Instead, software founders must find potential customers, understand their needs, and get feedback on their product. Founders must then use this feedback to modify the product based on what customers tell them. The key to success is speed of iterations; the faster the technical team can modify the product, the quicker the team can engage customers so that even more feedback can be given on the changes.

Using a language, framework, or libraries that the team is unfamiliar with means they will spend more time learning rather than building. In this situation, making a high number of pivots in a short period of time will be impossible. The impact will be costly delays in time-to-market, preventing the team from getting the customer feedback necessary for success.

Once some initial sales/beta testers/traction is achieved, the team should only then discuss the chosen technology platform, looking at other relevant factors such as security, performance, reliability, scalability, and cost.

So, stick to what you know best at first, and re-evaluate once you’ve captured some customers.

Avoiding ‘permission denied’ errors when running find command

Spotlight in OSX is not good for finding files on your Mac. It will return things like documents, videos, and songs, but the tool is not useful for finding things like basic text files in non-user directories. Enter the find CLI command.

When find tries to enter a directory the current user does not have access to, it will return a error like find: /.Trashes: Permission denied. These error can quickly take up all the space on your terminal screen, making valid results difficult to see. One can get around this by executing find using sudo, but why elevate privilege when you don’t need to?

The solution is to run the command with the -print option. Using this option, the command can be instructed to toss out all the error messages in stderr by directing them to /dev/null.

An example to run a case-insensitive search for items with iTunes in their name:
$ find / -iname iTunes -print 2>/dev/null

Issues with Seti@Home on Raspberry Pi

The Seti@Home package published by Daniel Carrion no longer appears to be compatible with BOINC on the PI. From my searching the internet, I found some information stating that some people may have had some success when compiling both BOINC and the Seti@Home binaries from source, but the results were not consistent.

I still wanted to do some BOINC’ing on my Pi and looked at other projects. I first looked at Einstein@Home, but the project required more RAM than was available. Other Pi users reported the same problem, and were directed to use Asteroids@Home as the RAM requirement was much smaller. Not only was using Asteroids@Home less RAM intensive, the project offers a project that can be directly attached to the Pi; no additional downloads or tweaking necessary.

After a few hours troubleshooting a few issues, I was able to get Asteroids@Home running on my Pi. Here is the link to my instructions for anyone also interested.

Setting up BOINC on a Raspberry Pi

Updated instructions for setting up BOINC on a Raspberry Pi

Last month, a reader contacted me stating that my instructions for setting up BOINC on a Raspberry Pi were quite helpful. The reader also confirmed that the instructions worked. Thank you for the complement!

The reader provided some feedback, which I used to update my post.
Click here to view the post.