“Are you ok?” in 2014

Back in college, my mom called me and asked if I could check on my sister. My mom lived 10,000 miles away and hadn’t heard from my sister in a while and just wanted to know if she was ok. These were the days of paper letters and long distance phone call charges. I made a lot of long distance phone calls (expensive for me in those days but cheaper for me within the US than for my mom overseas) and tracked my sister down to Denton, TX where she’d taken a summer job. The letter must have gotten lost in the mail.

This morning someone asked about a former colleague who they haven’t been able to reach. Intrigued I checked his blog. No update since February. Same with Twitter. No updates since February. Same with LinkedIn. Now the question is, is he ok? Or did he choose to go off the grid? I found some Github activity in May, so probably he went quiet on purpose. Then I checked his Strava profile. He ran 48.9 miles in June so I think he’s ok.

And now I feel creepy for stalking him!

Could you go offline? Really offline? Or stay online and hide your tracks?

Who has your mail?

Who – or rather, which company – is holding all your email?

Photo by Louis Abate

If you couldn’t login tomorrow, do you have a copy of your email? Many webmail services, like Gmail, make it easy to download a copy of your mail using POP or IMAP but if you use their web client, it’s an extra step you have to think about and do on a regular basis. It’s not something that most people can do easily. Especially if they share a computer with others.

While there’s a good chance, as a reader of this blog, that you are a do-it-yourself kind of technical person and use Thunderbird or Evolution to read your mail on your own computer, most of us don’t. Most of us trust our webmail to be there when we need it. We are trusting a single company to hold and take care of years worth of personal correspondence.

We need a way to backup our data, data like our email, to a trusted place.

P.S. I use Thunderbird to backup all my mail from my email web service providers to my computer. It’s not what it was designed for but it works for now.

Devices as computers will change the world

At Kids on Computers, we’ve spent a lot of time and energy getting computers to kids that have no access to technology. Many of these places (rural Mexico, Africa, India) have cell phones before they have phone lines or even power. (The second time you blow the power for an entire school trying to set up a couple of computers, you realize how much we take power for granted in developing countries.)

So the new devices coming out right now are really exciting.

These devices, using open source software and open web technologies are going to bring the web – and the world – to more people everywhere.

Disclaimer: I work at Mozilla. At Mozilla we are working on making sure everyone has access to the web and that it stays open and accessible for everyone.

Who’s helping who?

At Philly Emerging Tech some girls from TechGirlz came into meet with me and Molly Holzschlag. I think we were supposed to be role models for them but two minutes into the meeting, I realized the girls were the role models!

One of the girls was already writing a game in Python and had already considered the benefits of open sourcing it or not.  Another was concerned with the lack of emotion you can convey in a text message and how we might be able to improve that. A third girl had already set up her own dog treat business complete with an online presence. And the youngest in the group? She was in a Lego club and could build and program computer robots. Her teacher? An older girl in the group. These girls ranged in ages from 8 to 15 and they were already accomplishing amazing things.

We talked about careers in tech, how you can take technology into other fields, the things that frustrated them, the things that motivated them, … I sure learned a lot and came away motivated!

For more on what we talked about read Todd Weiss’ excellent recap.

Thanks to Tracey Welson-Rossman for TechGirlz and for inviting me to participate.

Learning to write JavaScript

So now that I work at Mozilla, I figured it was time to develop a “web app” just to make sure I understood it all. And since my team is working on educational resources for web developers, I wanted to see what it was like to learn how to use some of them using resources online.

So I decided to use the resources I could find online and write some JavaScript to do a pet project of mine.

What was the problem I wanted to solve?

I really wanted a way to automatically add “Photo by <author>” to the bottom of Flickr pages I want to use in my presentations. I have a number of workarounds I’ve developed to do this in an effective way, but I really just wanted to click a button.  For example, at first, I saved the image with the author’s name as the file name, and then every time I used the picture, I added text to the slides. Then I wrote a Ruby script that went through all my picture files and added “Photo by <filename>” to them. But that is still a three step process: grab the author’s name, save the photo as the author’s name and then run the script. Also, I like searching on Flickr better than I like searching my personal archive. Tags are nice.

I also wanted to make it a service and a bookmarklet so others could easily use it.

Why did I decide to use JavaScript?

When I first started this problem, I wrote a script in Ruby. I thought I’d use Ruby on Rails to make it into a web app, but Rails looked pretty difficult to setup for a newbie, so I put it on the back burner.

Now that I’m at Mozilla, I thought it was high time to learn JavaScript.

(For the record, I have a background in C, C++ and Java. I find Ruby much more intuitive to read than JavaScript. But I find JavaScript much more readable than many other things.)

In retrospect, the Flickr API is difficult to use from JavaScript. I think using PHP would have been much easier. It did force me to use only one call to Flickr (the right solution), as adding a Flickr API call to JavaScript turned out  to be unintuitive to me. You basically build a <script> object and then append it to the document.

Like this (copied from sample code):

document.flickrURL = ‘http://api.flickr.com/services/rest/?method=flickr.photos.getInfo&api_key=’ + document.apikey + ‘&photo_id=’ + photoNumber + ‘&format=json';

//add the flickr javascript to the page so it gets executed
//flickr automatically calls jsonflickrAPI(rsp)
var root = document.getElementsByTagName(‘head’)[0];
var oS = document.createElement(‘script’);
oS.setAttribute(‘type’, ‘text/javascript’);
oS.setAttribute(‘src’, document.flickrURL);
root.appendChild(oS);

Maybe that’s the way things are usually done in JavaScript, but it took a while to wrap my head around it. I felt like I was dynamically changing the code at execution time which made me feel like I was in a science fiction movie. Except that I didn’t think my problem warranted that complicated of a solution.

Part of my comprehension problem was that a call to Flickr calls your jsonFlickrAPI() function and you don’t get to say when that’s called. Nor change it for different calls. (Although maybe you could have several JavaScript files each with their own jsonFlickrAPI() functions. I didn’t try that.)

How did I learn?

I asked one really stupid question of my team mates. Then I decided I really needed to see if I could learn this from web resources.

I used primarily three:

  1. MDN. When I wanted to learn more about an element or what was possible, I ended up on MDN. Probably because I was familiar with this site – it’s the one that my team at Mozilla maintains! But I really didn’t find any other site that covered all topics like a reference guide. It did turn up several times in my searches too.
  2. StackOverflow. I googled most of the problems I had and several time I found good answers on StackOverflow.
  3. Personal blogs. A lot of my questions and answers were found on personal blogs. People had encountered a similar problem and they blogged about it.

How’d I get started?

It’s been a long time since I’ve written code. (Other than an occasional program or script to solve a quick problem.) I broke my problem down into nice little steps. Each one of which was functional on its own.

For example:

  1. First I wrote a “Hello World” app in JavaScript. This was to make sure I knew where the code should go, the basics of getting setup with an editor, etc. (Very easy.)
  2. Then I figured out how to make a canvas and draw an image on it. (Easy.)
  3. Then how to write text on an image. (Easy.)
  4. Then how to create a jpg of that canvas. (Was easy. Then it quit working.)
  5. Then I figured out how to have the user specify the image location and the text. (Pretty easy.)
  6. Then I figured out how to get an image from Flickr. (Not easy.)
  7. Then I figured out how to get an image from Flickr when all you have is the url of the photo page. (Really not easy.)
  8. Then I figured out how to put some javascript on a website for everyone to use. (Very easy.)
  9. Then I created a bookmarklet. (Not as easy as I thought but quick.)

What was hard?

Trouble shooting and Flickr.

  • Trouble shooting JavaScript was not always easy. If I was getting someone started with JavaScript, I’d set up their development environment and explain the tools first. Firebug, the Firefox Console and alerts ended up being my friends. Before I do more JavaScript development, I’ll explore some more debugging tools.
  • Flickr. I think the Flickr API might be really easy to use if you use a language where you could just make a call from the code. I had to create a URL and then append it as a script. It made trouble shooting harder and it felt clumsy.

A couple of times I also ran into something that made no sense to me or was taking too long to trouble shoot and instead of figuring it out, I did it a different way. I think it would be good for my education to figure out what was wrong with the initial approaches.

What did I end up with?


If you’d like to try it out, drag this bookmarklet [thisphotoby] to your bookmarks bar. (If you are on Internet Explorer, right click and save it.) Then go to a Flickr photo page and click on the bookmarklet. It will return the photo with “Photo by <author>, <url>” overlayed over the  bottom of the photo.

You can also check out the (very ugly) website I made, thisphotoby.com.

Next steps

There are a lot of things I could do to improve this.

  1. Add error handling. If anything goes wrong, well, it just doesn’t work. I didn’t do any checking or give the user any helpful tips. A terrible coding practice!
  2. Clean up the code. I copied and pasted ideas from many places and ended up with variable names and function names that follow no standard. I’d also like to find a JavaScript style guide and clean up the code.
  3. Add user preferences. It would be nice to specify which size image you want, if you want white or black text, what size text, etc.
  4. Licenses. I’d like to be able to check what permissions the user has and what license the photo is under in order to help the user understand how they can use the photo. Flickr lets you download all sizes of all photos even if they are licensed “All Rights Reserved”. This script passes on that ability, but it would be nice to also make the licensing more obvious.
  5. Create a jpg. I had it working with a png and a jpg. Then the jpg part quit working. I tried several other methods and did not get it working. Since I felt like I had accomplished my goal, I left this for later.
  6. Make a pretty website. :)

LinkedIn Maps: How are your friends connected?

LinkedIn Maps takes your LinkedIn contacts and groups them. The result is not only interesting but rather pretty. You can mouse over the different nodes, see who they are and who else is connected to them. After a few nodes I was able to see patterns in all my groups but one …

The group I can’t identify is dispersed throughout the whole map and contains friends from college, old collegues from HP as well as people that used to work at O’Reilly. I believe the group is really one of people that don’t share enough connections with others in my network to fall into any one group.

Universal Subtitles

I found the coolest tool, Universal Subtitles. With Universal Subtitles you can easily transcribe a talk, add subtitles or captions or translate any video on the web.

I’ve been trying to transcribe my Would you do it again for free? talk forever and I always give up – I can’t type fast enough to keep up and manually pausing required more hands than I have. Universal Subtitles let me type and automatically paused and let me catch up whenever the video got ahead of me. Then I could go back and edit, adjust the timing, etc. Now I could also go back and translate the subtitles into other languages.

Universal Subtitles is an awesome tool to help people share videos and presentations in other languages. Not only does it give you the tools you need to do the job, but it makes it very easy to cooperate. So for example, I could transcribe a GNOME video and then someone from the GNOME Hispano community could translate the subtitles into Spanish and then someone else from the GNOME localization team could translate them into their language. Others can go back and make corrections and adjust timing.

(Note that while the Universal Subtitles tool is awesome, transcription is still hard! I was transcribing myself and I still had trouble at times!)

Universal Subtitles is open source software and funded in part by Mozilla through Mozilla Drumbeat.

Disclaimer: I work for Mozilla.

How to make a password protected WordPress blog

There are lots of posts on how to make a password protected WordPress blog. I followed quite a few unsuccessfully (like this one).

Then I found a very simple way to password protect your self hosted WordPress blog:

Install the Absolute Privacy plugin.

The Absolute Privacy plugin lets only registered users of your blog view your blog posts. You can either create a login for each individual or you can create one generic login and hand out that login and password to everyone.

The disadvantage is that if people don’t have a login, it doesn’t send them to a place to request an account. You can however redirect them to any page you wish. So you could make a page that let’s people know how to contact you for a login.

How my Kindle paid for itself

My blog post about Kindle covers brought in enough revenue in December to pay for my Kindle. It now brings in enough every month to cover my Kindle reading habit.

KindleGranted, I could use that money for something else, but I like to think of it as my Kindle paying for itself. I mean, I wouldn’t have written a review of covers if I didn’t own a Kindle.

Amazon pays a healthy 10% affiliates fee for any Kindle product sales that you send them. Those affiliate fees have encouraged a huge number of Kindle blogs. All people hoping to get rich from Kindle sales.

They fall into a number of categories.

  1. Books. There are blogs that just talk about books available for the Kindle. Since Amazon makes it pretty easy to find Kindle books, I don’t understand the point of these blogs at all. If I want advice on what books to read on my Kindle, I’m much more likely to read a blog about the genre I like to read, not about the reader I like to read on. These blogs can be useful when they point out free books, but you can find those easily on
    Amazon’s site
    too. Or just check the bestseller
    list
    – the good free books hit the bestseller list fast. (Interestingly enough, Amazon’s own
    Kindle blog
    falls into this category of mostly about available books.)
  2. Merchandise. People have created entire blogs about Kindle accessories. I can see a blog about home accessories for people that like to decorate, but a blog about Kindle accessories? How many can you add to the little thing? A cover, a light, a screen protector, and then what? These blogs must live off searches. Much like my cover review blog post does.
  3. Kindle news. These blogs try to update you on Kindle news but there isn’t much. Some also offer tips and tricks for your Kindle and some of these are rather useful. I enjoy being able to check the time on my Kindle. (Now if they would just release the source code so I could make the time display permanently at the top of the screen …)
  4. E-reader news. Some blogs cover all the e-readers and the news about the industry including DRM issues, debates between publishers and distributors, etc. I think these are the only blogs that are going to live long term. Ones like the Kindle Review. If you want to try getting rich off Amazon Kindle affiliate sales, this is the long term category to be in. (I don’t think your chances of getting rich off Amazon Kindle affiliate sales are really good though.)

But even if most of those blogs don’t work out … Amazon’s affiliate program has given them enormous amounts of cheap advertising.

So the real question is how can you create an affiliates program around your product? Can we add an affiliates type program to Friends of GNOME? To GNOME? To Kids on Computers?

What to do with that old computer?

First off, if it's really, really old, you might need to recycle it.

However,
if it has at least 256MB or 512MB of RAM (or could have, if you bought
more memory), there are a number of things you could do with it.

  1. Use it in front of the TV or in your kitchen. Install Linux on it.
    It will cost you nothing to try. You burn a Linux image onto a USB
    drive or a CD, put it in your old computer and install. You then have a
    working system. While it may not be fast, I bet it would still be good
    to look up recipes in the kitchen or movie actors in front of the tv.
    We have an old laptop that regularly overheats and has to be plugged in
    sitting on the coffee table in front of the TV just to answer random
    questions. (Or take a quick peak at email or Facebook.)
  2. Donate it. There are lots of places that will take a computer with enough working memory. Kids on Computers is one. Your local school system might be another. Your local user linux group may know of others.
  3. Give it to a kid. My 9 year old has a hand me down computer. As
    long as it runs some kind of flash player and can surf to lego.com,
    he's happy.

What else would you do with an old computer?