Amazon Advertising Consultant

Amazon Advertising Consultants are a great way to get your product in front of millions of shoppers each day. These services will help you reach customers on the largest shopping site. There is no…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Coding On My Phone

I’m a big guy with a big commute. I get on a bus every day at the first stop on the line. I sit there with an empty seat next to me and, like a good American, I pull out my phone.

Another thing I am is a dad. With two little girls waiting at home after I take the bus back from my full-time job, I don’t get a lot of time for side projects. About two hours of my free time every day is spent on that bus.

“I’ll work on code stuff on my commute!” I told myself one day. I opened my little Chromebook in my lap, tethered its wifi to my phone’s hotspot, and started noodling.

Noodling, that is, until the bus filled up and another passenger sat down next to me. Plenty of folks in this situation keep right on coding, but I can’t. I can’t! I feel my elbow rubbing against their elbow. I feel their eyes penetrating my own screen. I feel the weight of their judgment. “Who does this guy think he is?”

I’m a big guy, but I don’t want to be a big pain.

If only they made computers small enough that I could use one on the bus without bugging the poor straphanger next to me. Ah, but I do!

“I’ll work on code stuff on my phone!” I told myself one day.

And so I did. For a little while. It wasn’t great, but I got a few things committed here and there. If you’re trying to make a system like this work for yourself, here’s how I did it. Maybe you will benefit from the story of a big guy working on a little device.

They say developers have a bias. They develop apps that work on their own phones. The problem there is that developers tend to love tech, tend to have big steady paychecks, and tend to buy the latest and greatest phones for their personal use. Of course the apps work on our phones. We have the best phones on the market!

Do the apps work on less expensive phones? Do the apps work when the cell plan is not the best one available? These questions are easy to overlook.

This is all to say I have a Galaxy S9, supposedly one of the best Android phones on the market, and this setup just barely works for me. Your mileage may vary.

Termux is a neat little terminal emulator for Android phones. If you’re comfortable working on code projects using command line tools, you’ll recognize Termux as a crucial element in our mission to start coding on the phone. With git, vim, and your favorite shell (mine is zsh) all set up, you’ve got a full-blown Linux development environment right there in your pocket.

Using ssh from Termux is great. I have a remote Linode server that I keep online just for little projects. I much prefer monkeying with that disk instead of the disk on my own personal phone.

One limitation here is that spotty cell service tends to kill my ssh connection. I can use mosh to restore my connection right where I left off, but even reconnecting to the box using mosh a few times in one bus ride gets a little tedious.

I am not great with vim. When you’re coding using terminal tools, being great with vim would be a huge boost. This has slowed things down for me some.

Just enough to get git and other essentials installed and working. I personally have my oh-my-zsh settings configured in my Termux shell, but it’s kind of overkill if I’m just going to ssh into a box where the real work is going to happen anyway.

When I’m not levergaing Termux to ssh into another machine, I find it useful for firing up the node repl and doing some quick JavaScript calculations. If I read something about array.filter() on my laptop at work, I can pop open the dev console in my browser and try a few things out. Not so with my phone. Running node in Termux is a fine replacement for that flow.

Just like I don’t want to open a laptop on the bus, I’d rather not prop open a big O’Reilly paperback with my left thumb while I tap away awkwardly with my right. I had a subscription to Safari Books Online through one of my employers and it was a really great perk. Every O’Reilly book is available to be read online in their e-readers, desktop and mobile. They have a lot of technical books from other imprints as well.

When I left that employer I joined the ACM solely because one membership benefit is a subscription to Safari Books Online. See if you can get your boss to get you and your team a subscription. It’s worth every penny (as long as your boss is paying!)

Hacker’s Keyboard is a keyboard app for Android, plain and simple. It’s much easier to find brackets and arithmetic symbols on this keyboard than the native Android one or Google one. If I have to use an on-screen keyboard — and I usually do have to — this is the one I prefer.

Before I had the Galaxy S9 I had a big Motorola Nexus 6. That thing was a monster. It was the size of a greeting card. I’d pull it out and people would flinch, thinking I had a cleaver in my hand. My chiropractor recommended I get another one for my right pocket to even out the weight distribution.

You get the idea.

The screen real estate on that phone was great. And with Android’s split screen feature, I could open Termux in one screen and the Safari Books Online app in another screen and not feel cramped. Mostly.

The thing is, whenever I pulled up the keyboard to tap something into Termux on the top half of my phone, the keyboard would block the e-reader on the bottom half of my phone. So if I wanted to copy a code sample I needed to keep sliding the keyboard down out of the way. It sounds trivial (really, it IS trivial) but it breaks up my flow enough as to feel obnoxious. Now, on my flagship, top of the line, state of the art, smaller Galaxy S9, the problem is made worse. Woe is me, right?

I could address this limitation with a bluetooth keyboard, but you can imagine how that would stoke my “don’t bother my co-passengers” neurosis. If I put a full-size keyboard in my lap to code on my phone, I’m taking up enough lateral space that I may as well just be working on a laptop. Not only that, but I have to find somewhere to put the phone where it won’t slide around if the bus takes a turn. There are bluetooth keyboards with little slots on the top for sticking in tablets and phones, but what kind of goofball setup is that? I want to look like I’m texting, not like a I’m a madman.

I wouldn’t call my time coding on my phone on the bus a total failure.

Free time really is limited for me these days. I work on little learning projects not because I’m a career-driven money-obsessed robot. I do it because learning new languages or playing around with programming conecpts are fun activities for me. I just never get to fit them in. Finding ways to do that when I’d otherwise be rage-scrolling through my Twitter feed seems beneficial.

I read a lot of writing advice. They advise you to set aside time. Let everyone know about the time that you’ve set aside. Close the door to your workspace so no one disturbs your precious set-aside time. Doors are fine. Doors keep out toddlers pretty well. But doors are pretty bad at keeping toddlers’ screaming voices out. And when toddlers are screaming, daddy needs to become available and unset that precious time for a bit.

And if you live with toddlers, you’ll find that you’re unsetting your precious time, every time.

The bus I take to work rarely has toddlers aboard. And when they are aboard, they’re somebody else’s toddlers.

Commute time is precious time that has been set aside by the Providence of your creator and the invisible hand of capitalism. Use it wisely.

I like when people glance at my phone and see me grinding away at code in vim. I look like I’ve jacked into this reality from outside the Matrix.

At least I think that’s what I look like.

I’m not exactly pawning my laptop.

Extended periods of coding in this context are bad for my eyes and fingers. When I do get the text small enough so that it doesn’t wrap and jank up the code, the font size is laughably small. When I’m in flow and have it all still in my head, this works okay. When I load up someone else’s code, or code that I wrote some time ago, and have to read it in the terminal, the strain is real.

Typing, which is its own sad story, is a relative joy compared to thumbing a cursor around in a text editor. In vim, this is not a problem. But for web devlopment I find myself in a lot of online editors and native text editors that expect me to tap to move a cursor or highlight some text. Not super delightful with these sausage fingers.

The deal-breaker. I’m a two-monitor guy. When I’m working on something light on the side, I usually work from a reference. I’m working through a book or reading a tutorial. Switching back and forth between apps is onerous. Split screen would be the killer app if the dang native keyboard didn’t always swoop in and cover the reference material when it was time to get into write mode. I long for the days of phones with physical keyboards.

I use Sprint as my cell data provider. I joined during one their promotions wherre they’d match my provider’s plan and cut the cost in half. The price is right! However, I now lose cell service at three or four points along my commute. When I’m connected to a remote machine, this is not great.

It’s relatively true of any device, but a smartphone is expertly engineered to distract its owner. I could keep struggling with SICP and Lisp, or I could follow that notification I just got from Instagram. It takes a lot of discipline to stay on course sometimes, and who wants to use discipline on their commute?

I might get back into working on my commute if I can make a few improvements around the margins.

For a vim novice, entering text or code is easy. Type the things, hit enter, close the brackets, save your work. Fine.

For a vim novice, working with a big honking codebase is misery. Finding code relationships between files, mass editing, multiple cursors, git diffs. It’s a war zone.

If I could up my vim game I’d be able to make more headway in terminal-based coding sessions. And I should try to do this. I should.

I really should. Some day.

I’ve had my eye on a one-handed keyboard like the Twiddler3. It’s a device that looks like a Wii controller and lets users type using just one hand using chords. It would take a long time to learn, and the Twiddler3 itself is pretty pricey. I do think it’s a neat solution to the external keyboard problem. Maybe I can amortize it over the next ten Father’s Days…

People open their laptops and type away on these buses all the time. Do I think any less of them when I see them? “Oh, there’s an ambitious go-getter,” I might think. “Let me see if I can read that email he has open.”

Why can’t I be one of those people? Is it such a large barrier that I’m willing to contort myself into the tiny arena provided by a smartphone? Is this really what it’s come down to?

You tell me. Should I just work on a laptop on the bus? Do you do any coding on your phone?

Add a comment

Related posts:

Bharat Industries

In a board meeting of Bharat Industries, the new CEO cum Chairman was to be decided. Since no consensus could be arrived upon , it was decided that a secret ballot should be conducted. Out of 15…

An Introduction to Setting SMART Goals for Project Managers

Learn all about setting SMART goals for project managers and how SMART goals can help streamline project management in our new blog post.

Blue Armchair

Sweet human creation, built in detail for one purpose: to lay your buttocks on it. Millions if not billions of men fought to put their asss on top of it. No matter the material: of stone, of wood, of…