Category Archive: Uncategorized

TinyMCE, poltergist, and minification

We’re working on a project now that needs a good WYSWIG type editor. Our old favourite, TinyMCE, wins the spot. TinyMCE, of course, is Javascript and so we need Capybara to run Poltergeist to be able to test.

Minified TinyMCE downloaded and installed. Runs fine in a browser from localhost, but then fails to load in Poltergeist, stating that it couldn’t find its files. For some reason, it was looking relative to the root path. You can use the baseURL attribute in settings to point to a direct location, though.

That solved the location problem, but then produced errors like:

Failed to load: /javascripts/lib/tinymce/plugins/save/plugin.js
Failed to load: /javascripts/lib/tinymce/plugins/autoresize/plugin.js

Notice the lack of a .min.js extension? What wasn’t made clear in the SO post is that baseURL must be paired with the suffix attribute to load minified files:

tinymce.baseURL = '/javascripts/lib/tinymce';
tinymce.suffix = '.min';

There you go: I just saved you a half-day of annoyance. Exit through the gift shop.

It’s a little gross if you need to switch between full and minified, and there may be a better setting to use, but I’ve spent too much time on this problem already. If you know a better way, feel free to drop me a line.

Continue Reading

When to Use HTTP 401 vs 403

I’ve been making a Sinatra plugin to better support Tenjin‘s Story Oriented process 1.

Here’s my final decision: 401 is for Identification, and 403 is for Permissions.

HTTP Code Server Says Server Means
401 Unauthorized I’m not telling you anything until you show me some ID
403 Forbidden Your ID is valid, but you don’t have clearance

This is a little contrary to what the spec actually states, but with good reason. The full RFC includes a statement that (emphasis mine):

If the request included authentication credentials, then the 401 response indicates that authorization has been refused for those credentials.

To me, applying this rule would make 403 nearly or totally useless. If there is a file that nobody may ever access via HTTP, it’s better that the server not tell anyone about it (404). Sharing existence information would only be potentially harmful; it’s admitting that a file exists that is also important enough to protect.

As a developer, I’d rather have a distinction between “I don’t know you” and “you can’t do this” over trying to detangle both. I’m not the only one to feel this way, either.

Just because something is standardized, doesn’t mean it can’t change. Those original standards are from fifteen years ago, and the way we use the internet has changed drastically. We’re moving away from the web-addresses-as-file model and toward web-address-as-command. Holding on to irrelevant or misguided standards just because they’re standards won’t help anyone.


  1. More on this later. There are half-written posts, I promise.
Continue Reading

So This Is Goodbye

Grooveshark shut down this past Thursday.

It hit me harder than it arguably should have. Yes, it is a fundamental, unexpected interruption to the way that I work, but there’s something more to it. It’s just a music service after all. I didn’t know anyone who worked there, and I didn’t have any stock in the company.

Maybe it’s because my ravenous exploration of new music helped me through the difficult transition period around 2011. Grooveshark was the provider of much-needed colour in my life. Grooveshark hummed away while I finished my degree, redefined myself, grew into leadership, and built a business. I had discovered thousands of tracks and organized them carefully into task-oriented playlists.

And here I was, scrambling to hopefully retrieve whatever data I could before it was gone forever. Search and rescue for refugee data from a failed corpo-state. My computing wizardry skills at least meant that I managed to make it out with around 60% to 80% of my collection’s listing. That’s more than some can say.

Shortly after hearing of the service’s demise, but before discovering the Reddit tutorial, I realized that my laptop would still have a copy of the last page I was on until I refreshed. Opening it, I saw the player there, forever frozen halfway through the last song Grooveshark would ever play for me: an alternatively-labelled Porcelain by Moby.

Call Me Ishmael

Sometimes life imitates art.

Continue Reading

The Gentleman Scientist

I recently received my annual donation call from the University. 1 The pleasant man on the line asked the routine demographic information that they always do. Was I using my degree in a relevant field? Yes. Still Gentleman Scientist at Tenjin? Yes again. Then he broke script and asked what a lot of people ask when they see my business card or email signature:

Why ‘Gentleman Scientist’?

I gave him the Simple Answer: I had the opportunity to have fun with it, so why not? It does convey a little bit of the whimsy that colours the humour of Jason and I. I guess that’s a good enough reason for most people.

Really, though, business titles are often meaningless, 2 frivolous nonsense and egotism. 3 I’d rather have a title that describes me as a person, rather than be a vague description of my position that only has meaning within that organization 4 and makes me feel important.

But whimsy and a mild contrarianism is just the Simple Answer. On a deeper level, I appreciate its simple utility and its personal resonance. Functionally, it sallies forth a few facts:

  1. Robin Miller is male
  2. Robin Miller is a gentleman
  3. Robin Miller is a scientist

Fact One is handy to have as a baseline for communication, especially since my name is unisex and English doesn’t handle gender neutrality very well. 5 Further, this gender confusion has a) accidentally gotten me into a limited-space course because the instructor thought I was female, 6 and b) confused another instructor as to who I was. I don’t like leaving people confused, so I appreciate that it clarifies and instructs. The reader is empowered to use the appropriate pronouns with confidence.

Facts Two and Three are where we get into roots into my life and personality. In truth, it was my friend Kaylee who bestowed me the title of gentleman. I have a penchant for opening doors for people, men and women, friends and foes alike. To this she would often respond with a bemused “You’re such a gentleman.” Later, when she printed business cards for herself, she got me a stack of joke cards that read simply:

Robin Miller - Gentleman

I admit, it was absolutely a lot of fun to hand these out.

I embraced the title, though for different reasons than you may think. When “gentleman” is uttered, a lot of people think of some grey haired, stodgy, blue blooded Victorian in a waistcoat, but that’s just a caricature. I think Kaylee had it right. A gentleman is not defined by his clothing or genealogy, he is defined by his actions. Therefore, a gentleman in the modern age is not a status, but instead is an ethical code. It is an ideal to strive for, to be gentle and a man. A gentleman is compassionate and empathetic. A gentleman creates cooperation, peace and civility. A gentleman uses violence as a last resort. He is respectful, and is aware that others have positions and experiences different to his own. He participates in debates and discussions with the knowledge that he does not know everything.

It dovetails nicely with my other core identity, scientist. I am, by education, a scientist, of course – it says so on my degree. However, I know comparatively little in the way of physics, less of chemistry, next to nothing about biology, and my knowledge of geology is rocky at best. 7 Mathematics and statistics bore me, and my dilettante knowledge of the physical sciences is little to write home about. So why do I claim to be a scientist?

I call myself a scientist because science is not beakers and equations. Science a mindset. A scientist does not think in absolutes. A scientist is capable of and, obligated to change her or his viewpoint when sufficient evidence supports a particular hypothesis. The motto of a scientist is “let’s find out,” and not “because I said so”.

Together they are both a descriptor of who I am and a pair of core ideals that I strive for daily. I’ve taken it as my moniker as a reminder to myself of who I want to be, and what I represent. I fall short at times, of course. I’m certain that if you spend just a day with me, you’ll be able to spot at least one instance where I’ve failed to live up to my ideals. But I am, after all, only human, 8 so I hope that you will forgive me. I will try again, and I hope to do better each time.

I am Robin Miller, Gentleman Scientist. With your leave, I’ll try my best to live up to it.


  1. Haha, no. Not yet by a long shot. Try me again after I’ve billionated or something.
  2. I once saw a Chief Knowledge Officer. What does that even mean? That your job is just to know things?
  3. Said the man writing a blog post about himself. I claim sanctuary in the original setup: that this is a common question. I am providing a public service by answering it. If my ego is stroked in the process, it’s not entirely my fault.
  4. I do admit that standards like CEO, CTO, COO, and CFO are generally well defined. I rebut that they are, at the least, boring.
  5. Nor do people like being referred to as objects, despite being objects. Not in any sort of dehumanizing sense, that is, it’s just that that people are, in the abstract, things that exist. Don’t try to use this linguistic abstraction on your significant other, though, unless you are prepared to take a thrown pillow to the face.
  6. The instructor had a mandate to encourage diversity. I found out about it after the course was finished.
  7. You’re welcome
  8. And an object
Continue Reading