June 10, 2011

Remembering Why I Write Software

I've worked on 2cloud for almost a year now. Since its inception, it has been used by tens of thousands of people, covered by dozens of publications large and small, and entered the lexicon of Android development. My professional career has been advanced by it and my personal network of friends has been augmented by some truly wonderful people I would not have met, were it not for the exposure this application received.

In all that time, however, I was never really cognizant of the software itself. I understood its function, I understood why it was cool, but I didn't think of it as useful. Part of this is the reason I started developing it: I started working on it for the sake of working on it. I wanted to learn Android development. I wanted to learn how to write a Chrome extension. I didn't have some pressing problem that this app would solve, no target use-case for it. I just wanted to learn something, and it seemed like a fun exercise. When people asked me why it was better than just emailing themselves a link, all I could think of was "it's a little more convenient."

Yesterday, somebody showed me why it was useful, and that is something I'm grateful for.

I had decided that people who donate will receive hand-written notes, thanking them for helping keep the server online. I was having a bad day, and I wanted to focus on the good in the world, instead of all of the things I hate about it. Writing letters to people who were kind, people who validated everything I believe in, made me feel better. I duly wrote and emailed out three of these notes to our latest round of good Samaritans. One went to an individual I'll call Sam.

Last night, Sam wrote back to me. In his email, he explained that he works shifts and has a young son, and so didn't get much time at his computer. By using the application, he could "speed browse" during his breaks, send the links to his machine, and have them waiting when he got a moment to sit down. He got some time to keep apace with the world, but still had time with his son. Because of this, Sam said 2cloud was "one of, if not the, best apps on [his] phone."

It was the perfect ending to a bad day. I remembered why I believe in open source software so much. I remember why I work on 2cloud whenever I can. I remembered that people found value in my work, and some of them weren't afraid of saying so, with money or words.

If you write software, I highly encourage you to communicate with your users on a personal level. Ignoring all the benefits it will provide your user experience, it will give you the most pure appreciation for your job that you can get in our line of work. As much as possible, get to know your users; some of them may be scum, but putting up with them is absolutely worth getting to know the gems.

May 18, 2011

Time for a Change?

It's the end of my third year in college. I'm miserable. I hate the standards they hold me to. I kid you not, my final for a class discouraged me from using independent thought. It told me it wanted nothing more than to show I could engage literature on its own turf. "Don't think about it, just be able to work with it." That's not the kind of education I want.

So I just submitted my résumé to Twitter. Yes, on the same day they announced that third party Twitter clients were essentially screwed. A lot of the developers are up in arms about this. So I applied to be either an Open Source Liaison or a Partner Engineer. Essentially, I signed up to work with either Twitter's open source policies or their developer relations team. I figure that if I'm looking for a challenge, it doesn't get much better than that.

Am I leaving Second Bit? No. At least, not immediately. I'm skeptical that Twitter will hire me—I don't look all that impressive on paper. If they do, I can't say for sure what will happen. I could work on both. I could just work for Twitter. I'm not sure what they'll ask of me. I do have some ideas in the works, however, and will be working on implementing some of them as quickly as possible. Iterating, and all that.

In short, I'm not sure where I'm going in the future. But if I can avoid it, I'm not wasting another year and several thousand more dollars on a degree I don't want.

March 29, 2011

Logging the Channel API

We're having a bit of an issue at the 2cloud Project. We're getting reports of the Channel API throwing iFrame errors about illegal access. Considering the Channel API is based on Google's Closure library's XPC library, which uses iFrames, I had a feeling the issue wasn't on our end. Unfortunately, neither I nor Moishe could figure out why this was happening—we both agreed it shouldn't be.

Even worse, I didn't have any logging mechanism for the Channel API at a low level like this, so I couldn't offer much debug information. The code was minified with Closure's compiler, which makes debugging it a pain. There's a wonderful Closure Inspector that is supposed to help debug stuff like this, but for some unknown reason, that only runs in Firebug. Which makes debugging a Chrome extension difficult. Clearly, the only thing to be done is to start console.logging things.

It took me far too long to figure out that I couldn't access Closure logs in Chrome, and it's annoying to sort through that minified, compiled code to find where the logging is defined. So I'll just tell you. Download channel.js, and search for I.prototype.log. Remove the following line:

if(a.value >= wc(this).value) {

Being sure to also remove the trailing brace, because you're intelligent like that. Then, above

p.console && p.console.markTimeline && p.console.markTimeline("log:" + a.Xb);

insert the following:

console.log(a.Xb);

That's it. enjoy your new, powerful, low-level Channel API logs.


Of course, if you're not insane and actually plan to debug this, you probably want to beautify your channel.js file.

December 8, 2010

App Engine Channels and Chrome Extensions

Google's latest toy for App Engine, its Channel API, is really a cool tool. It gives you Comet support on a free webhost. That's a phenomenal achievement, in my mind. I was given early access to it, to build the android2cloud web server with its technology, to relieve our polling woes. And I tested it, and it worked great.

And then there were some mishaps, with frontends, and the roll-out to production servers was taking a bit longer than I had hoped, so I had to look into other alternatives. When an app is eating $80 a week and is constantly in a state of financial peril, I couldn't afford to just rest on my haunches and wait for Google.

And then, of course, Google got the Channels to production before I got my node.js implementation to production-readiness. So, of course, I tested the beta software I had written a couple months prior, ensured it still worked, and called for a test. Except something blew up in my face: I had neglected to trust the extension, trusting that it would still work. It didn't.

Google had changed their code that handles their "CrossPageChannel"; basically, a hidden, embedded Google Talk iframe. Whatever, no big deal. Except now they were automatically passing through the domain the code was called from (in a Chrome extension, chrome-extension://chromeextensionidhere) and appending "/_ah/channel/xpc_blank". Fine, whatever. I don't understand the changes, and I don't really care to. The problem, I discovered, is that the new code rejected anything that wasn't on the http or https protocol. Which these weren't.

OK, fair enough. I downloaded the javascript file that's responsible for making the channels (http://talkgadget.google.com/talkgadget/channel.js) and substituted in my local channel.js file for the http://yourappid.appspot.com/_ah/channel/jsapi file in the script tag. Then, in my local file, I added chrome-extension to the test for http and https, so extensions were listed as ok. Loaded it up, and... it failed. A dynamically generated file that Google hosts itself tested again. Darn.

And then I had an idea. What if, instead of trying to make the tests allow the link, I tried to make the link pass the test? It was worth a shot. So I changed the /_ah/channel/xpc_blank to be http://yourappid.appspot.com/_ah/channel/xpc_blank, and fired it up. A little ferreting around (had to find the code that was extracting the current domain, match it for the chrome-extension protocol, and tell it to not append the domain and path if the protocol was chrome-extension. Otherwise, it was giving me "chrome-extension://extensionidhere/http://yourappid.appspot.com/_ah/channel/xpc_blank", which is not quite what I wanted) and lo and behold, the extension worked again.

I fired off an email to Moishe Lettvin, the developer who had been working with the testers on the API, letting him know about the bug. He acknowledged it existed, but claimed he didn't know how to fix it off-hand. I explained what I had done, and he acknowledged that was the correct fix. He has (by now, I presume) applied the fix, and it will be rolling out with the next GTalk frontend rollout. Unfortunately, that could be weeks or months away. So I'm keeping my hacked together file, and am going to end up pushing it out for android2cloud. And I'm going to let you do the same.

Using it is simple:

  1. Grab yourself the channel.js file I've modified.
  2. Put it in the folder of your Chrome extension.
  3. Open the channel.js file, and modify line 2:
    var myHost = "http://connegt.appspot.com"; needs to become
    var myHost = "http://yourappid.appspot.com";
  4. Build a webpage that is Channel-enabled, as usual. Your chrome extensions are just HTML pages, so you shouldn't have to modify anything at all.
  5. Change "http://yourappid.appspot.com/_ah/channel/jsapi" to "/channel.js" anywhere it appears in your code (though you should only have it in there once...)
  6. Enjoy!
It's really that simple to have your browser updated in realtime. I don't think you have any excuse left for polling.

August 18, 2010

On Peter Pan

It's probably pretty obvious, but I have a huge Peter Pan complex. I blame my parents for this (they made my song "Forever Young"—the Rod Stewart version, not the Jay-Z version—when I was young), but it probably stems from a lot of things. Regardless, I've always had a fascination with Peter Pan. My favourite portrayal so far has to be the 2003 version starring Jeremy Sumpter, but I got the chance to watch Hook the other day, and I thoroughly enjoyed it.

While watching it, though, I started thinking about the untapped stories in Peter Pan. The story is magical because of the character that Peter holds. Peter embodies and is Neverland, and a lot can be done with that. Few films seem to accept or embrace that, which is why the 2003 version happens to be my favourite; it really plays with the idea and personality of Peter, while staying rather close to the original J.M. Barrie story.

Peter is embodied by his childishness—his refusal to grow up is what gives Neverland its timelessness. And in that inherent immaturity, we see the pros and cons of such an approach. Peter is tactless, to the point of hurting those around him out of ignorance, but enchanting, happy, and carefree. He is incapable of some of the stronger emotions, and exhibits a fleeting character that one may miss if they blink.

What then, is made of the crush that Tinkerbell clearly has on him? It is implied in every version I've seen that this is what fuels her betrayal of Wendy to Captain Hook, but the dynamics aren't really explored. And Tink, herself, is a wonderful font for exploration: a creature so tiny she can only hold a single emotion at any given point. Much a mirror of Peter's undeveloped emotional capacities, the dynamics between Tink and Peter hold a plethora of opportunities for stories. What would Tink say, should she have a chance to tell the story? What would Peter say, should he know of Tink's feelings for him? What would a relationship between Tink and Peter look like?

Perhaps I'll have to write some explorations into this realm that I love so, should I get the opportunity this semester. I would love to hear other people's thoughts on the matter, though.

August 2, 2010

I'm a Shakespeare of Software

I wear funny clothes and people will remember me for centuries to come.

OK, maybe not for those reasons. But still, I find the best comparison to my programming style is the great bard himself. Some of you may not know this, with all the programming stuff I do, but I'm actually an English/Adolescent Education dual-major. No, no Computer Science degree. Yes, I spend my time reading literature. Yes, I will be teaching your kids.

As any English major must, I've spent some time with the bard (or his work, at least). One of the most striking things, and one of the things discussed in classrooms ad-nauseum, is the bard's remarkable lack of originality. King Lear, for example, is little more than an amalgamation of three similar stories, told and retold throughout cultures and time periods. In essence, William Shakespeare was the Disney of his day. Which is not to say that the bard never created something; he simply grounded his creation in the creations of others, standing on the shoulders of giants.

Which is all well and good, but software has no cultural history. Does it? Well, yes and no. There are certain problems that are solved and re-solved almost continuously. things like user authentication. These solutions grow to be abstracted out, and suddenly we wind up with things like OAuth and OpenID. We wind up with open source platforms that can solve these problems. These platforms, I would argue, are the cultural history of the craft.

And I, like Shakespeare, simply weave them together.

android2cloud, one of the most successful pieces of software I've written, was built by simply tying together four of these platforms. I stood on the shoulders of Google and OAuth, and in a month I pumped out an application that is used by over 300 people. The amount of code I actually wrote for that project is laughably small. Minuscule. And that is how I do programming; weaving together what others have built, until it fits what I need it to do. With the amount of cultural history available in programming, there's very little I can't do.

My suspicion is there are a lot of Shakespeares running around right now, weaving software together into a sum that's bigger than its component parts. We all owe a debt to the creators around us, who pioneer the new technologies we stand on, but they owe us a debt as well, for making that technology more than they dreamed it could be.

June 30, 2010

Thoughts

I've been thinking a lot lately. This is a largely unintentional side-effect of some current personal life happenings that I won't share, simply to save you the whining. And yet it remains, there have been a lot of thoughts bouncing around in my skull. I'm sure I've been annoying my friends, texting and IMing them about some pretty abstract things.

Last night, I got to thinking about why I write. Whitney Turland wrote recently on why she writes and asked for commenters to chime in on why they write. And I intend to, but I'll do that in its own blog post. In a nutshell, though, I write to think.

Rather than killing trees, thinking in notebooks that are then scattered around my room, gathering dust and doing nothing for anyone, I've decided that this blog should fulfill that purpose. I've been trying to write for an audience, trying to write what I think people will care about. But this is my blog. It's supposed to be my presence. And so I intend to let it archive my thoughts, and guide my thinking. Perhaps you will take the time to comment, to help shape my thinking. Perhaps you won't. That's entirely up to you.

What does this mean for you? It means more posts that you may not care about. It means more of my personality, more of the things I care about, and more variety on this blog. It does not mean more personal problems or interests that mean nothing to anyone but those closest to me. Instead of posting about how Charlie and Jane are fighting, I'll be looking at why they're fighting, and pondering over which of them (anonymously, of course) is right. I will be trying to refrain from adding unnecessary personal information into posts as possible, focusing instead on the ideas, the abstract.

Maybe you'll like this. Maybe you won't. If you don't, I'd love to hear from you on why. But I've grown distant from my writing, and my lack of practice has weakened and poisoned my abilities. I intend to get back to my writing, and that means writing my thoughts, not the thoughts I think people want to hear about.

May 22, 2010

All Quiet

I started out to write this post thinking I hadn't written anything for this site in quite some time. Actually, I wrote a post here four days ago. Seems like that was a long time ago. Probably because I've done so much in between then and now. My last post was on Tuesday; let's recap what has happened since then.

Tuesday

Tuesday was the introduction of Neil Patrick Harris to Glee. I'm not much of a television person; Glee's the only show I watch regularly. And NPH happens to be my personal hero.

Naturally, I set up a projector to view the show. And naturally, I almost wet myself. I was extremely disappointed that the producers saw fit to auto-tune NPH (who does that?!), but it was still amazing to see him rock out to Dream On and Piano Man.

Wednesday

Wednesday I dedicated to Google I/O. I watched the recorded versions of the streams as soon as I got the chance, and thought and thought some more about the company I want to work for. Day 1, I thought, was far more web-oriented. It was all about building web applications: HTML5, cloud computing, app stores, etc. Day 2, to the contrary, I saw as being far more focused on devices; namely, Android and Google TV.

I'm squeeing like a schoolgirl over Google TV, because I may actually watch TV again now. Ignoring the fact that I don't have the time for it, this is really exciting. And Android was exciting, for reasons I'll cover in a minute.

Thursday

Thursday was also dedicated to I/O. I've only seen the first half (before the Google TV news) due to availability, but Android already has me super pumped. The cloud to Android sync option (the Push notification done right, as it were) particularly inspired me. It inspired me so much that on...

Friday

I started a new project, android2cloud. I figured if the cloud could push pages to Android, Android should be able to push back.

I was in Rochester for the day, at my brother's commencement, but in the four hour round-trip and an hour or so after the event, I managed to get a working prototype of the cloud side of this. A Chrome extension pings an App Engine server every 15 seconds and gets the latest link attached to your Google Account (using OAuth, of course). If that link is the same as the last link that Chrome opened, Chrome does nothing. If it's different, Chrome opens it in a new tab. There's also a button in the browser that will open the last link attached to your account, no matter what.

I plan to release two versions of the Android app when I (start and) finish it: a free version, and a $0.99 version. These two versions will be absolutely identical in every way. The only difference is one donates $0.99 to me to help me get through college, and (maybe? Possibly? No promises.) send me to I/O next year. Basically, it's a convenient way to donate to me.

Of course, I need to have an Android app to sell, and I haven't even started yet. I want to wait until I have an Android phone I can actually test it on (though I have a pretty good theory as to how the app will work...) Which leads me to...

Today

Today, the glorious day in which I bought my Nexus One. It will arrive Monday or Tuesday. I'm excited.

I also did some work on android2cloud, designing logos, opening sites, and checking policies. I have a request in to Google to use the word "android" in my application, as well as to allow me to use my modified copy of the Android logo in situations where it's impossible or impractical to include their attribution statement at the bottom of a page. Like, for example, in the app, in Chrome, in Google Code, and in Google Groups. Basically, everywhere I use the icon. I feel like Google will come through for me, so long as I attribute them somehow.

So yeah, busy week. And it looks like my next week is bright: Lady GaGa is on Glee, I get my Nexus One, and I get to see an improv show my friends are performing in.

I love summer.

May 17, 2010

Let's Cut Down a Tree, Knowing No One Will Hear

A couple days ago, I read Paul Carr's thoughts on the growing number of complaints against Jobs, Zuckerberg, and Wales, CEOs of three of the most prominent tech companies. As I sat there reading his article, I was uncomfortably nodding my head. I was nodding because most of what he was saying (which, in case you don't read my mouse-overs [you should], was essentially "Shut the hell up, and stop whining.") was absolutely spot on. It was uncomfortable because I really, really wanted to hate Jobs.

I've hated Jobs for a while now. I find his entire style of running a company and producing a product to be unmanageable, unscalable, and unwieldy. Yes, it produces pretty stuff, but we all know to beware the pretty-faced girl. But you know what? I don't have a Mac, for that very reason. I have an iPhone, and am dumping it instead of upgrading. I'm voting with my dollar, and that's where my voice ends. Or so Paul says.

And up until that point, I'd agree with him. I have no business telling Steve Jobs how to run his company. None whatsoever. Lord knows I couldn't do his job better, or even half as well. I'm a big enough boy to admit that; I have my strengths, and running Apple is not one of them. And yet, that doesn't mean I should sit down and shut the hell up. It just means I shouldn't expect Steve to change for me.

Let's talk about how friendship, trust, and recommendations work. My friends know me as the most tech-savvy thing they're likely to know personally until they leave college. Which is kind of cool, but kind of a heavy responsibility. Every time a friend wants new speakers, a new laptop, a new monitor, a new computer, a new anything that has circuits, they ask me what they should get. They tend to trust my opinions, and so I put a lot of thought into what I tell them. Because they trust me to know what I'm talking about and trust our friendship to ensure I act in their best interest, they're likely to follow my recommendations. See how that works?

Because of this, I'm acutely aware of something: Apple products are not for everyone. Just like Windows isn't the best thing for everyone, or Linux, or any other single product. People are complex beasts, and there is no one-size-fits-all product out there. My mother would have no idea how to use a Mac. My R.A. prefers one. It all comes down to how they feel comfortable interacting with computers.

So rather than trusting Apple to know what's best for all of these people, I need to know what's best for them. And to know that, I need to know what there is. And how do I know that?

I know that because people complain. Because people complain, I get a feel for the downsides of every product. Not all complaints are reliable and hold water, but you learn to wade through and get a feel for what's on the money and what's bullshit. I don't have the time to run a Mac and a PC as my main computers, and work a lot in both. I've dabbled with Macs, know how to get around in them, have logged some hours on one, but I'm nowhere near as familiar with them as I am with PCs. So I rely on the reports other people make, I rely on their complaints, to fill in the gaps in my knowledge.

The bottom line is, no, Steve Jobs should not bend to the demands of Apple haters, trying to make a product that makes everyone happy. There's no such thing. But that's not to say people should stop complaining; it's just saying he should continue to not care.

Which I'm sure he's quite good at, as he checks his bank account balance.

May 12, 2010

What I've Been Up To

OK, so I haven't written here in a little while. Not nearly as long as some of my writing dry spells. But I've been busy! Not in the "so I didn't have time to write" way, but in the "so I have cool stuff to share with you guys" way.

First of all, I started with Yet Another Blog. This one is going to be mainly active this summer, and then periodically over the next school year—or that's the plan, anyways. It details my adventures as a Googler In Training (which is a wonderful title I've made up for myself; it basically just means I want to work for Google really badly, and am trying to hone my skills so I can). I'll be learning C/C++ over the summer, and enhancing my skills with Java. I'll also be looking into learning data structures and algorithms.

If any of you readers know about these kinds of things and would like to teach me even a little bit, drop me a line in the comments, or @ me (@paddyforan) on Twitter. I'll need all the help I can get.

Besides my over-publicised attempt to get hired at the greatest company on Earth, I've been busy with finals. But those aren't nearly as exciting, so I'm just going to skip right over that part.

I'm working on a QR-based ticket site written in Java for App Engine, basically because it sounded like a cool tool. I'm focusing on keeping it simple. You log in with a Google account, all transactions are handled by Google checkout, and there are no lists of events or searches for events. It's meant to be a tool, something people link to, not a destination of its own. The basic premise of it is that you can sell tickets to an event, and the user can print them off right from their computer. The tickets have a QR code, an ID number (in case the QR code magically fails or something, you can check from a web interface), and then whatever extra attributes you include. When the QR code is scanned, it checks if that is a valid ticket, reports that it has been used, and then displays any extra attributes, along with the buyer's name and, optionally, picture.

Again, just a really simple ticketing system for lightweight events. Also working on a way to integrate "on-site" or "at the door" tickets with the system. Think I've got it figured out.

I may release that project as open source. Probably will, just because that's how I roll. Look for it on Github, or I'll write a post here when it's ready to actually, y'know, be used.

So there you have it. That's what I've been up to, besides my normal hacking on @spaz and mundane college stuff. Oh, and super-secret Google stuff I'm not allowed to tell anyone about. Like, laws and such. Which makes me feel all warm and fuzzy.

I forgot to mention that.