Coding On An iPad

Using an iPad for Coding

This project will attempt to document my experiences using an iPad as a code-creation device using Git, Github and various applications. This document is not about creating iPad apps.

I’ve had a 64GB iPad 2 that was under-utilized, mainly living near my bed, where it served as an alarm clock and a way to play Pandora while I fell asleep. This being a waste of usable technology, I decided to factory wipe it and epurpose it as a mini-workstation that wouldn’t weigh me down.

Keyboards

Now, coding using the on-screen keyboard would be a hellish way to live your life, but fortunately, the iPad has bluetooth, so you can connect any bluetooth keyboard. I had one of those aluminum Apple keyboards and that connected well and worked perfectly, but did not lend itself to being tossed in a messenger bag with the iPad, as errant keystrokes woke the iPad, drained the battery and would manage to take dozens and dozens of random screen captures.

USB keyboards are out, obviously, as are any of the Logitec keyboards that use their dongle. Fortunately, Logitec makes a fairly ideal keyboard, the Logitec K48o bluetooth multi-device keyboard. http://www.logitech.com/en-us/product/multi-device-keyboard-k480?crid=1221

It has a groove that you set your ipad into in landscape mode, or, if you prefer in portrait mode, which frees up enough space for a smartphone. It makes no attempt to charge your devices, but doesn’t get in the way of cables. It also has a 3-position switch that lets you easily jump between different devices.

SSH Client

With that sorted out, it was time to go looking for apps with which to get some work done. The first thing I needed was a reliable SSH client. Server Auditor is a free, very well-thought-out app that gets the job done. There is a paid version that I haven’t tried, but the free version is ad-free.

With SSH working, I had a good, reliable way to do quite a bit of what I need to do, such as logging in to linux servers and editing files. I could have really stopped there, since my servers all have git and vi, but I started to wonder what else I could do, leveraging the iPad’s capabilities.

Editing and Git

There are a lot of text editors for the iPad, but I wanted one that would work with git and not add a lot of steps to my workflow. A thread on Reddit recommended the combination of WorkingCopy (git client) and Textastic (TextMate for iPad, basically) for editing.

Working Copy Git App

Working Copy has a free version that lets you check out repositories, but not check in changes. While this would be useful to some, I decided to buy the paid version for $14.99 and have not regretted it in the least. Working copy will become the cornerstone of your workflow on the iPad, both with GitHub as well as privately-hosted repos. (There is an ’Enterprise Version" that lets you get the full-featured version in a single step, but I do not believe it offers any additional features, it’s just a convenience for deploying throughout a company.)

Once you have Working Copy, authorize it against your GitHub account and clone or create a repo. Now, it may appear that you can edit right there in WorkingCopy, but you really want to fire up an a real editor at this point. Put WorkingCopy in the background and open up Textastic.

iOctocat

Working Copy is where you’ll manage your git repositories, but if you’re using GitHub, you’ll also want to install iOctocat to do all of the things on GitHub that come along with being a member of the ecosystem. GitHub is a social platform, after all, and iOctocat is where you manage your life on it.

Textastic Text Editor App

Get the $10 upgrade for Textastic. I can’t remember exactly what’s different between the paid and unpaid versions, but the developers deserve the love.

My first instinct was to first open up Textastic, create a file, then check it in to git. This is not the best way to go about it. Start from Working Copy. Open your repo and click the “+” mark to create a new file. Once you type the name, hit enter and the file will be created. Switch over to Textastic and the file will be available from the file chooser.
(Yes, you can create files in Textastic, but it’s more difficult to get them into Working Copy afterwards, so don’t bother doing it this way.)

What also threw me a bit was when I looked for the save button. There is none. You edit to your heart’s content, then switch back to WorkingCopy. Looking at the repository view, you’ll see that it has seen the changes and gives you a simple way to commit your changes.

Byword Markdown Editor

GitHub projects default to displaying a README as the top page of your project and they use Markdown syntax for formatting, but I’m a real newbie when it comes to Markdown, so I decided to look for an editor that would let me work visually, rather than just monospaced text and formatting codes.

BATHVS

Bathvs

BATHVS, as you probably know, is my girlfriend Shana’s business.  She makes soaps, shampoo bars, bubble bars, lotions, and other products.

Recently, she just launched her website, from which you can purchase her products.  Aside from the initial website, she’s done everything herself and, I must say, it looks gorgeous.

BΛTHVS, pronounced Bath-us, believes in using high quality ingredients for the best results in skin and hair care products. We are conscious of our ingredients and where they come from, straying away from animal testing. All ingredients are cruelty free and vegetarian. We support charitable causes throughout the year, from helping animal non-profits, to donating a part of each batch of soap to an organization called “Clean the World”, which gives the soap to impoverished countries, and educates them on personal hygiene to avoid illness. We want to make a positive difference, while also providing pleasure to all of your senses in the form of fine scents, relaxing baths, and soft, manageable hair.


Everything in our shop is handmade in small batches in our studio space at the historic Pajama Factory, from our cold process soaps, to our very popular environmentally friendly hair care products.  Our soaps are cured on our handmade wall racks for at least 4 weeks until they are ready to hit the sales floor.  The long cure ensures that all of the water put in during the soap making process can evaporate out, creating a hard, longer lasting, and mild bar.  We always have something new and interesting coming off of our soap racks to offer to our customers, so I recommend keeping an eye out on our Facebook page, as well as our Blog.

ngrok – secure introspectable tunnels to localhost

So you’re developing a website on your laptop and you want to make it available for someone else to look at, but you don’t want to push it up to a “real” server. Sure, you could do some NAT tunneling voodoo on your router, or maybe some jiggery-pokery with your network’s NGINX config, but that’s probably more effort than you want to go through, so you wind up doing a lame screen share using Skype…

Here’s a better way: Simply download and run in a terminal and it will make your local website available, via an address it generates.

securely expose a local web server to the internet and capture all traffic for detailed inspection and replay

via ngrok – secure introspectable tunnels to localhost.

Quick and Dirty vi

Quick and Dirty vi
Resurrected an old page I wrote years ago.  There was a time it was one of my most popular pages, from back when this site was just a collection of handwritten pages, not done with blogging software:

Quick and Dirty vi

Getting Out of vi

In case you are only here because you’re stuck in vi with a messed-up file on your screen, you probably just want to kill it without saving the file. Relax.

Hit “Escape” a couple of times to insure that you are in comma…

Maranon Chocolate

This is pretty cool—my sister Leslie has been working with a group who discovered a thought-to-be-extinct variety of cacao beans growing in Peru. The NYT did a story on it:

DAN PEARSON was working in northern Peru two years ago with his stepson Brian Horsley, supplying gear and food to mining companies, when something caught his eye.

“We were in a hidden mountain valley of the Marañón River and saw some strange trees with football-size pods growing right out of their trunks,” Mr. Pearson said by telephone last week. “I knew nothing about cacao, but I learned that’s what it was.”

It was, he would learn after sending samples of seeds and leaves to the Agricultural Research Service of the United States Department of Agriculture, one of the rarest, most prized varieties of cacao.

“The DNA of this material is pure Nacional,” said Dr. Lyndel Meinhardt, a scientist with the service. “These are very rare.”

I love this kind of story—part Indiana Jones, part Tom Swift, part… Willy Wonka?
They’re now producing chocolate from these beans: Fortunato No. 4 – “preeminent chocolate during the 1800’s, destroyed by diseases in 1916, rediscovered in Peru and released to world in 2011 – Fortunato No.4 is 100% thought-to-be-extinct Pure Nacional. Even more facinating is that this newly discovered Pure Nacional has 40% white beans – never before discovered, never before tasted and absolutely delicious”
“The chocolate is intense, with a floral aroma and a persistent mellow richness. Its lack of bitterness is remarkable. “ New York Times, January 11, 2011:

Marañón Chocolate

Thought to be extinct since diseases struck Ecuador in 1916, Pure Nacional with 100% purple beans was esteemed for flavors of fruit and rare floral. It commanded a dominant share of the worldwide fine chocolate market before it suddenly vanished–until now.

We found Pure Nacional with 40% and 100% white beans growing in a remote canyon of the Marañón River Valley in Peru. “An unprecedented discovery”, said USDA genetics scientist, Dr. Meinhardt, head of the lab that tested the cacao DNA and confirmed the results.

“In my 30 year chocolate obsession, this is the finest I’ve ever tasted”, said Paul Edward pastry chef and co-founder of Chef Rubber with 25,000 customers worldwide.

We are there during every process pictured below: from planting cacao seeds in our nursery, harvesting, fermenting and drying and making chocolate in Switzerland on the 1879 Longitudinal Conche. From Pure Nacional seeds to Pure Nacional Chocolate, Traceability is Guaranteed.

What’s also cool is that some of the beans in the cacao pods are white, apparently something that doesn’t happen unless the plants are left undisturbed for decades.

Cash For Hot Tubs (New Client)

Just did a nice quick site today:

Cash for Hot Tubs!

Ready to trade up that old tub?
Tired of that old tub cluttering up your yard? Why not turn it into a nice little pile of cash, just in time for Christmas?
Use the form below to get in touch and we’ll get back to you ASAP!

[From Cash For Hot Tubs!!]

Really a very simple site, but the client needed it up and running with a custom feedback form for a print ad campaign by tomorrow.

Surprisingly, we had a real customer use the form within minutes of going live, too!

Lucy


Lucy came to my studio the other day looking for headshots for her upcoming move to Los Angeles.
To get the light right for this shot, I actually went to the space behind the muslin backdrop in my studio. There’s actually about eight feet between the back of the cloth and the studio wall which id painted gallery white. It was late in the day and the light was nice, especially bounced off the wall.

The Pajama Factory

As you probably know, I’ve left Tokyo, gone back to Pennsylvania for a while to help out with my family.

I’m not sure how long I’ll be here, but as it looks like it will be a couple of months at least, I’ve decided to use what free time I do have to take a break from freelancing and do a bit of creative photography.

pajama factory