Can a developer use an iPad as their only portable “computer”?

I am at a crossroads in my work situation. Since 2008 I have worked as a freelance web developer, which naturally meant using a laptop as my primary/only computer. I worked mostly from home, but I would frequently go to coffeehouses, and occasionally work on-site at client offices. A portable computer was a must.

The same week that Steve Jobs announced the 11-inch MacBook Air, I went out and purchased one. It was exactly what I wanted: a full-blown Mac, (almost) as small as an iPad (which of course I already owned as well, but mainly used for testing, occasional gaming, and watching all six seasons of Lost in the span of a month on Netflix, not for “real work”). I loved the MacBook Air. I said it was the best Mac I’d ever owned, though I admitted it was a tad underpowered. Enough so that when SLP needed a new computer 6 months later, I gave her my MacBook Air instead and bought myself a new, slightly more powerful version of the same.

That MacBook Air has been my only computer ever since. In fact, shortly after switching to it full-time, I wrote a glowing review of it right here. But last April I moved my business into a storefront studio space. I’m not going to coffeehouses anymore. Now, more often than not, clients come to me instead of the other way around. And all of this time I’ve been sitting at a desk, with that same 11-inch MacBook Air hooked up to an HP 23-inch LCD. (Yes, HP. I may be a self-proclaimed Apple fanboy, but even I can’t justify the expense of one of their Cinema Display monitors.)

It’s in this context that I’ve finally really become aware of the performance limitations of the 2010 MacBook Air. It’s unbearably slow with Adobe Creative Suite apps. It’s even unbearably slow running Panic’s Coda. And no computer today should choke up on what is essentially a glorified text editor. (That said… As much as I love Coda, it does seem bloated and slow almost everywhere I’ve used it. There’s no comparison to the blazing speed of BBEdit, which I also love, but Coda has some features I prefer, so it remains my main coding tool.)

Over the past few months, as my workload has increased and my patience has diminished, I can no longer pretend that the 2010 MacBook Air’s performance is adequate for my needs. I know the 2012 Airs are at least 3 times faster than the one I have, and I’m sure this year’s will be even faster, and maybe even have a Retina display, and therein lies the problem: I’ve been desperately wanting to upgrade my Mac, but I couldn’t bring myself to buy one of the current 11-inch Airs (the only portable I will consider) when they’re getting so close to a refresh.

At the same time, I have a major crunch at work over the next 3 months. I couldn’t afford to wait on my creaky old Air anymore. So last weekend I settled on a compromise, borne of the fact that I almost never touch my MacBook Air outside of the studio anymore. I got a Mac mini for the studio. I went with the more powerful quad-core i7 model, which is rated on Geekbench as at least 6 times faster than my old MacBook Air, and almost twice as fast as the current ones.

I’ve already noticed a huge difference. Adobe Creative Suite is way faster, almost to the point of no longer being infuriating. (But that’s another story.) Coda is still occasionally sluggish, but that may have more to do with the fact that I’m working with files on our local file server over a questionable WiFi connection. I should try putting the files directly on my hard drive to see if it makes a difference.

But now I am faced with a weird dilemma. This is the first desktop computer I’ve owned since the Dell I had back in 2001, and the first Mac desktop since even before that. (It was a Bondi blue G3 tower, if you were wondering.) The dilemma is this: in a world of iPads, where I am already pretty much never touching my MacBook Air outside of work, do I really need a portable Mac at all?

I still have the Air, of course, and have continued to lug it around next to my iPad in my Tom Bihn bag this week. But why? In the two meetings I had this week at client offices, I only used my iPad. Maybe the iPad is really all I need. Maybe?

I have a few months to find out. I won’t consider buying another MacBook Air until the new models are out, so in the meantime I will experiment. I will try only using the iPad for any and all computing tasks outside of the studio. I’ve begun that today, by typing this blog post on it as I sit at the kitchen counter with my Saturday morning coffee. It’s been a bit of a challenge. I gave up on using the WordPress web interface and switched to the (marginally better) dedicated iPad app. And I’ve made lots of typos… some that iOS auto-corrected, some it didn’t, and some false positives it shouldn’t have. (C’mon, iPad… use some context, would ya? Why would anyone ever write “you we’re”?)

The biggest challenge will be if I have to write some actual code. But it’s a far different world for that than it was even a year ago. I have a handful of coding apps on my iPad, though nothing I have could be more valuable than another pair of apps from Panic: Diet Coda (great name, BTW) and Prompt, a terminal app. I haven’t had much call to use either of them… yet. But I’ve been comforted knowing they’re there.

At the end of this month we’re planning a family vacation to Utah. That may prove to be the ultimate test. Do I dare leave for a week with only my iPad? Honestly, I’m not sure I can. It will depend on the state of my various work projects at that time. But I’d like to be able to give it a try.

I’ll post follow-ups here as the experiment continues.

Building a centered gallery grid with flexible column count for responsive web pages

It took an untold number of fruitless Google searches and a couple of hours of trial and error to get this to work. I think part of the problem may have been that I simply didn’t really know how to describe what I’m trying to do in a way that would yield good search results. And so, I hope now that I have a solution, sharing it here might help someone else.

The situation: I have a web page that contains a gallery of square images. The page is responsive but the sizes of the images are fixed. I want the page to automatically show as many images across as will fit in the layout on any particular screen, creating anywhere from one to five columns as needed. And, it needs to stay centered.

I got all of this going pretty easily… all except the “it has to stay centered” part. I was able to get it to work if there was only a single line of images, but as soon as they wrapped to multiple lines, the container element went to a full width and the images became left-aligned. It took considerable effort to discover a solution, although that solution itself is embarrassingly simple. I was hung up on a couple of possible approaches that got me nowhere, which probably contributed to the problems I had finding the right way to do it.

So… here we go. We’ll start with an unordered list:

<ul class="gallery">
  <li><img src="image.jpg" alt="" /></li>
  <li><img src="image.jpg" alt="" /></li>
  <li><img src="image.jpg" alt="" /></li>
  <li><img src="image.jpg" alt="" /></li>
  <li><img src="image.jpg" alt="" /></li>
  <li><img src="image.jpg" alt="" /></li>
  <li><img src="image.jpg" alt="" /></li>
  <li><img src="image.jpg" alt="" /></li>
  <li><img src="image.jpg" alt="" /></li>
  <li><img src="image.jpg" alt="" /></li>
</ul>

And here is that embarrassingly simple CSS:

ul.gallery {
  text-align: center;
}

ul.gallery li {
  display: inline-block;
}

OK, that’s not really all of the CSS. Your li tag needs height and width properties, and you may want to give it margin as well. But those values are going to be specific to your project.

TinyMCE and the non-breaking space problem

Let’s get right to it then: TinyMCE is great, but I am annoyed by its willingness to take users’ multiple spaces literally! Collapsing multiple spaces is a basic characteristic of HTML, and allowing users to carelessly (or intentionally, which they still shouldn’t do) insert multiple spaces by converting every other one of those spaces into the &nbsp; (non-breaking space) character is BAD!

IMHO.

Anyway… start with a pinch of Stack Overflow, add a dash of the official TinyMCE documentation, along with a heaping tablespoon of reading between the lines, and I have a working solution to the problem. My installation of TinyMCE now automatically converts any &nbsp; characters in the text back into regular ol’ spaces.

It’s a bit draconian; after all there are legitimate uses for non-breaking spaces. But 95% of the times they’re inserted by TinyMCE are user accidents, and another 4.9% of those times are abuses like faked “tabs” that would be solved better by another approach altogether. (There are reasonable CSS-based solutions that work in some cases, but let’s talk HTML’s need for tabs another time.)

Anyway… here’s the gist of the solution. You need to create a callback function. Here’s mine:

function my_cleanup_callback(type,value) {
  switch (type) {
    case 'get_from_editor':
      // Remove &nbsp; characters
      value = value.replace(/&nbsp;/ig, ' ');
      break;
    case 'insert_to_editor':
    case 'submit_content':
    case 'get_from_editor_dom':
    case 'insert_to_editor_dom':
    case 'setup_content_dom':
    case 'submit_content_dom':
    default:
      break;
  }
  return value;
}

It may look like there’s a lot of extra stuff in here you don’t need; I included all possible values for type inside the switch to be prepared for the future. You do want to check for type == 'get_from_editor' though; otherwise your replace() is going to run under way too many conditions and may cause weird behavior like new paragraphs appearing when you just want to insert new text into an existing one, or browser-generated warnings about leaving the page when you try to save. (I ran into both as I was fine-tuning this.)

Now that you have your callback function, you just need to… you know… call it. That’s done inside tinyMCE.init(). You’ll need to include this line somewhere:

cleanup_callback: 'my_cleanup_callback',

Be sure to check if cleanup_callback is already declared somewhere, and also don’t forget the comma at the end, unless you’re inserting this as the last line.

Once you’ve got it all rolled out to your site, you’ll need to clear your cache. I’ve found TinyMCE’s configuration files can be annoyingly persistent in the browser cache.

Yes… you have correctly observed that I had to use non-breaking spaces myself in this post, to get the indents in the code samples to show. Pay no attention to the man behind the curtain. And remember my complaint about the lack of tab characters in HTML. Another day.

February 1983 / February 2013

The sting in my nostrils as I step out the back door
Into the pre-dawn cold

The smell of car exhaust mixing
With the frozen winter air

The stretching shifting halos
Around the streetlights seen through squinting half-awake eyes

The snow stomped from my boots before I step
Through the front door

Recruit THIS!

I have perhaps an unhealthy contempt for technology recruiters. I know they’re just doing their job, but it just so happens that their job is only slightly less annoying to me than telemarketers, or those people working mall kiosks who want to shove lotion samples in your face and yell at you for not accepting it.

Part of my distaste for recruiters comes from my own persnicketiness regarding tech jobs themselves. I love technology, but a lot of the ways it gets put to use are tedious and boring or even worse, objectionable to my values. (My primary values being avoiding things that are tedious and boring.) And there seems to be a strong correlation between tech jobs needing recruiters to find people to fill them, and those jobs being the kind of tedious, boring, objectionable work I wouldn’t want to take anyway.

I know I was lucky to have mostly worked at places I found interesting (or at least acceptable) during my decade or so of employment, and I’ve been even luckier to create a niche as a small business owner where my clients and collaborators are interesting, creative, and doing work I value in the world.

In short, I have no place in my life for recruiters or the jobs they recruit for, and never really have, save for a brief period in late 2007 when the job I was in at the time was turning sour and I was desperately casting around for alternatives. That one experience I had dealing with a recruiting company was so negative that I vowed never to work with one again. And as it happens, I’ve never even had to consider it, because I found a new job without their help, stayed there for a few months, and then successfully went out on my own less than a year later.

But occasionally I still hear from the recruiters. Usually (thankfully) by email. And I usually only give them enough of my time to reply “Please remove me from your database.”

Today I got just such a recruiter email:

To: Me
From: Recruiter X
Subject: update [sic]

Scott,

It has been a little while since we connected.

Just wanted to get a quick update on your status.

Thanks,
Recruiter X

I definitely did not recognize the sender’s name (and not just because it was “Recruiter X”), nor the name of his company. I was pretty sure it had been a very long while since we had “connected” — like, never. My reply:

To: Recruiter X
From: Me
Subject: RE: update

Please remove me from your database. Thank you.

I figured that would be the end of it. Surprisingly not.

To: Me
From: Recruiter X
Subject: RE: update

Scott,

Can do. I am guessing that you don’t remember getting together a few years ago.

Continued good luck with your business.

Sincerely,
Recruiter X

Why no, I don’t remember getting together with you a few years ago, or ever, Recruiter X. And I just couldn’t leave it alone:

To: Recruiter X
From: Me
Subject: RE: update

No, I don’t. Perhaps you could refresh my memory on the context of our meeting.

I honestly did not expect a reply at all to this message. What context could he possibly provide, since I know we have never met before? But I was wrong.

To: Me
From: Recruiter X
Subject: RE: update

It was at a time that you were looking for additional work. I believe it was as far back as 09 or 10, so I understand if you don’t remember. The intent was as an introductory meeting and to do some general networking. You shared your resume with me at that time.

I obviously am not looking to spam you. I was just looking to reconnect.

Sincerely,
Recruiter X

Oh, yes! That time I was looking for additional work! Way back in 2009 or 2010! Now I… no, wait. I still don’t remember. Maybe that’s because I haven’t looked for work with a recruiting company since 2007. In fact I haven’t even produced, much less distributed, a résumé since early 2008. And I had never heard of Recruiter X’s company. And, no offense, but I took a look at Recruiter X’s company’s website and… well… let’s say it did not strike me as the website of a company that would be good at placing people in jobs in web development.

Obviously…

I started drafting a snarky reply (yes, even snarkier than this post), but I elected not to send it. I think I had, and have, already proven my point. Which was that I might complain about recruiters wasting my time, but I am more than willing to waste that time myself in order to complain.

Postscript

On the extremely remote chance that “Recruiter X” happens to read this post… don’t take it personally. Just delete my information from your database. And from the databases of all of the other companies your company shares information with in exchange for money. Because someone gave you my information, but it sure wasn’t me. I don’t blame you personally for how annoying I find the business of recruiting to be. But since my information is a commodity to you, I also don’t have a lot of sympathy for your work.