Link Rodeo: Go Package Management and Boring Technology

Here are a number of interesting topics for you to think about this week.

I’ve been learning the Go programming language recently, and in the process I’ve been having conversations about it with friends and colleagues. Go has a unique package management system that has already caused me a number of headaches. The recommended method for taking care of package dependencies is lacking, at best. Over at Nerdbucket, my buddy Nerdmaster has written a thoughtful piece about it.

While I’m talking about new technology, I’d also like to contradict myself by agreeing with Dan McKinley’s great piece, “Choose Boring Technology.” He argues that a project should be careful about adopting lots of new tools and technologies. It reminds me of a time recently when I was looking for a Node.js programmer, and one of the replies I got back was, “For us, Node.js is glue. Its ecosystem is still too young to support anything long-term. Libraries and packages move too fast to build a product that will need actual maintenance.” I’ve had the same feeling about many technologies I’ve wanted to try, such as Ocsigen for OCaml, which has a build system and API that is always several steps ahead of its documentation.

This post’s featured photo is courtesy of Flickr user MunicipioPinas.

Don’t Modify the Clipboard with JavaScript

3429454121_9a93f53855_oRecently, I was reading an article about a newly published book that I’m interested in. However, the article didn’t include a link to the book, so I copied the title by highlighting it with the mouse and hitting ‘Ctrl-C’, and opened a new browser tab to do a search. However, upon pasting, I saw the book title along with an annoying addition: “To read more, visit our website at [redacted].”

This sort of website behavior is not okay.
Read more

Pansophie Online Color Test

The Pansophie PC testing interface.

The Pansophie PC testing interface.

Pansophie Personality and Color is focused on mapping personalities to colors. Alexandra Hall wanted an online testing platform with flexible questions, testing mechanisms, and report generation. I built a full-featured web application to meet Pansophie PC’s requirements. This was one of my early Zend Framework projects, but it ended up with some neat features.

  • A private administrative interface
  • Seamless jQuery-backed test interface with few pageloads
  • Custom PDF reports, generated on the fly
  • A customer database with contact information
  • API endpoints for test generation
  • Integration with 3rd party e-commerce system

Pansopie PC isn’t currently doing business.

Prime Number Service on Google App Engine

Enigma PlugboardAs I mentioned earlier this week, I’ve decided to learn the Go programming language. I’ve also been very interested in Google App Engine, which lets you deploy applications to the cloud from a development sandbox. It’s like magic for web and mobile applications!

Since I’m so fond of prime numbers, I thought I’d build a web service for calculating them. It does some other fun stuff, too, like figuring out if a number is happy. It also caches primes in the Google Cloud Datastore with some minimal statistics. If you’d like to see the source code for the prime number service, it’s available on GitHub.
Read more

Random Link Rodeo

Hawthorne BridgeI’ve been working on a few projects, but nothing I can share publicly. However, I’ve also been out in the world of the Portland tech community, which has been excellent. If you haven’t heard of Calagator yet, go check it out.

Last week, I went to a meet-and-greet for developer evangelists from Google Cloud Platform. After talking to one of the Google devs, I was convinced to give Go a try. He told me that Go has type inference, and while I was dismayed to learn that it only has type inference on variable declarations, it still looks like a good language. I’m playing around with sawsij and Google App Engine and should have something to share in a few weeks.

Last night, I went to a PDX WordPress Meetup, where I saw Kronda Adair of Karvel Digital give a presentation called “5 Common Website Owner Mistakes and How to Fix Them.” After the talk, there was some interesting talk about website optimization and the “noisy neighbor” problem in cloud computing.

Next week, I’m looking forward to the PdxDevOps meeting, mostly because I’ve realized that this is what I do most of the time. When I build websites, I tend to handle everything from hosting and system administration through software development.

I’m really impressed by how full and rich the Portland tech community is. So far I’ve met a lot of great people in it, and I look forward to meeting more.

How to Enable XPath in Internet Explorer

Yesterday, I shared a little bit about using a virtual machine to test frontend code under Internet Explorer (IE). My goal was to use Wicked Good XPath to add the proper XPath features to IE so that EPUB.js would work correctly, thus making the Philalethes E-Bulletin Online Reader work on all major browsers.

Well, I’d been thinking about this problem for a while, but had delayed working on it because I just didn’t want to fiddle with IE. While I’d been thinking about it, the EPUB.js instructions were updated with IE-specific steps. I didn’t have to look far.

After loading wgxpath.install.js in the header, I just had to add this bit of JavaScript before anything important happened:

1
2
3
4
5
6
7
8
9
// Internet Explorer workaround.
if (!window.XPathResult) {
    EPUBJS.Hooks.register("beforeChapterDisplay").wgxpath = function(callback, renderer){
       wgxpath.install(renderer.render.window);
 
       if (callback) callback();
    };
    wgxpath.install(window);
}

You can see on line 2 that I test for window.XPathResult instead of looking for a user agent or anything like that. That’s because it’s not really IE I’m interested in detecting. I want to find out if XPath is both available and somewhat standard. User agents are unreliable. Always test for feature availability instead!

Recent web browser usageThe results are good enough for now: the Online Reader works in IE, but it’s not perfect. The cover image doesn’t load full-size and fonts don’t seem to be loading correctly. IE users account for only 10% of the traffic on the website, so obviously I need to work on the EPUB.js cross-browser support. For now, though, it works. And it looks great on Chrome, Safari, and Firefox.

How to Test Your Frontend Against Internet Explorer Without Booting Windows

Internet Explorer (IE) has been frustrating me. I want to use stronger words than that, but it would be unprofessional.

I recently launched the Philalethes E-Bulletin Online Reader, which uses EPUB.js and an implementation of XPath that, for some strange reason, isn’t available in IE. I found a few solutions which would work, but all of them require testing in IE. Of course.

This seems like it wouldn’t be a problem, except that I run Linux all the time. All of my work happens on the Linux side of things, so booting into Windows just to run IE for one tiny bug fix is an inconvenience and a chore.
Read more

When to Develop Apps From Scratch

I haven’t had time to write anything interesting for the blog this week, so instead check out Sebastian Green’s article, “A transparent box: the case for developing from scratch,” which has been published over at Developer Drive.

Mr Green makes some great arguments for developing from scratch. Good software takes good planning, no matter what.