Mims H. Wright

Genius

How I Get to Work on Time: SPEED

Permalink

Here's a pro-tip for life.

As a developer, I naturally hate mornings! I am pretty awful at getting up. I am slow and easily distracted and have a hard time focusing on getting out the door.

As a developer, I also love acronyms! That's why I developed a simple mantra. SPEED.

  • S is for Shower.
  • P is for Poop.
  • E is for Exercise.
  • E is for Eat.
  • D is for Dress.

Most days it's more like PESDE but that doesn't sound as cool.

These are the five things I'm allowed to do when I first wake up in the morning. If I haven't done these things, I'm not allowed to look at my phone, clean the kitchen, or do anything else. I try to keep repeating “SPEED” to myself until it's all done, then if there's time left, I can futz around.

Perhaps repeating this mantra will help you in the mornings too!

Emmet

Permalink

Since writing my post about hating Haml and while playing around with WebStorm, I came across an awesome tool called Emmet. In short, this tool is an open set of snippets and shortcuts that plug into a bunch of different editors and ides.

This thing offers pretty much all of the benefits of Haml without all the pitfalls. Why have I never heard of this before now!? If you're still a believer in Haml or if you just want to code fast, I highly recommend checking it out!

Why I Don't Like Haml

Permalink

When I suggested that Huge move Haml to our blacklist of libraries and plugins that we shouldn't use on projects it got a lot of people upset and wondering why? I wanted to lay out all of my arguments in one place.

In this article, I will go through the pros and cons (IMHO) of Haml.

Welcome to the New Blog!

Permalink

7 years ago I started the dispatchEvent() Blog. It has served me well, but I've decided it's time to restructure to a slightly different format. I have a few major reasons for the transition.

  1. dispatchEvent() was a Flash-oriented blog. I still think Flash has some life left in it but regardless of whether you agree, in the real world, the platform has been on the demise. The upside to this is that I've been exposed to some of the many other ways to make rich content on the internet. I've been working primarily with Javascript and HTML5 and some of the libraries that go along with them such as Middleman, Sass, Backbone.js, etc. I've also picked up quite a bit of Ruby, Java, node.js, and bash script. Anyway, it's time to move away from a Flash-centric identity and into a multi-diciplinary one.

  2. The dispatchEvent() team is dissolved. When I started the old blog, I invited some of my favorite coworkers to share it with me. Namely, Roger Braunstein and Caleb Johnston were the most active. Some of the most popular posts came from these guys. However, we haven't seen much of each other lately and the number of contributions from others have dropped-off to nil. The new blog will be just my thoughts.

  3. Wordpress wass a huge memory hog. I've never much liked Wordpress. It has always seemed to me like the benefits of having such a rich platform were negated by it's esoteric architecture and I've never felt like I had full control over it. After failing to customize it for 7 years and after countless out of memory errors, I'm switching to Octopress. Octo is arguably much more complicated to set up and work with, and yet, it is very liberating to have so much control over how it works. I even enjoy learning new things in order to make it do what I want. It also is totally flat HTML so the memory problems should go away.

I've imported several posts from the old blog that seemed like they could still be relavent.

parseTimeString-js

Permalink

parseTimeString.js

I recently ported a function to JavaScript that I had originally written for KitchenSync called parseTimeString(). In a nutshell, it takes a string representing a time such as 12.5 seconds and converts it to an integer value in milliseconds. I found it terribly useful in working with tweening engines and setTimeouts. Hopefully you will find uses for it in JavaScript. Enjoy!

Pro-Tip: Add Your Contact Info to Your Lock Screen

Permalink

lockscreen

This is a simple trick that pretty much speaks for itself. I edited my homescreen wallpaper to include my email and my wife's phone number. I keep a passcode on my phone so if it were ever lost and found, this would allow someone to contact me without unlocking it.

Other info you may want to include:

  • Your blood type or drug allergies

  • A cash reward offer

  • Instructions to destroy the device so it doesn't fall into the wrong hands

I highly recommend doing this yourself. It only take a moment in photoshop.

Originally posted on 28 Jan 2013 to dispatchEvent() Blog.

My Top Games (Mostly iOS) of 2012

Permalink

The end of the year is the time when lots of enthusiasts and games journalists come out with their coveted “Game of the Year Awards.” As I see the posts pop up, it only makes me jealous and a little ashamed that I haven’t been able to enjoy most of the titles mentioned. I’ve had a lot of my mind this year between a new job and a baby on the way in January, pretty much the only games I’ve played have been on iOS. Then I realized, “Hey, I’ve played a lot of great games on iOS this year!” So here’s my list.

The Economics of HUGE's Birthday Policy

Permalink

As you my know, I recently began working for a new company, HUGE in Los Angeles. HUGE is a great place to work for a lot of reasons, but one of the best reasons is that the company gives employees their birthdays off! Since mine is coming up this weekend, I have been thinking a lot about how this is not only a great idea for employees, but makes a lot of business sense as well. Let me break it down.

Conventional birthday party

At most other companies I've worked, when a person's birthday comes around the following occurs…

  1. A shitty ice cream cake is ordered ($)

  2. Perhaps a card is passed around the office (this usually stresses me out and takes me a long time to come up with something to say)

  3. People gather in the kitchen (sometimes reluctantly), sing happy birthday (sometimes embarrassing the birthday boy/girl), and eat cake (fat!)

The emotional benefits of this approach range from awkward to marginally exciting at best. It's hard to put an exact number on it, but all of this activity will probably take about 15 minutes. That's 15 minutes per person per birthday. In other words…

Hp = (n * t) * n Where Hp is the total office hours spent partying every year, n is the number of employees, and t is the time spent for each birthday.

Paid time off for birthdays

When you have a day off of work, one person is very happy for the day and nobody else is affected. Everyone wins. The time spent is 8 hours for one person per birthday. Or…

Hv = n * 8 Hv being the total office hours spent vacationing every year.

Notice anything about these two functions?

The party function is exponential, O(n2), while the vacation function is linear, O(n).That means that the more employees you have the more expensive it is to throw a party while with vacation time, you have a fixed price per employee for birthdays.

HUGE LA has about 90 employees. When we compare the two formulae, we get these results.

Hp = (90 * .25) * 90 = 2025 hours Hv = 90 * 8 = 720 hours

Vacation time is about 1/3 as many resources as birthday parties. Of course, for smaller numbers of employees, birthday parties are actually more efficient than days off. If we reduce the inequality…

Hp < Hv (n * t) * n < n * 8 (n * t) < 8

The magic point where parties are cheaper than vacations is when (n * t) < 8. So if party time, t, is 15 minutes, that number is 32 employees, (32 * .25) = 8.

Some offices combine all the birthdays into one party for all the birthdays in a given week. This changes the equation to

Hp <= (52 * t)

…which is linear but also only provides less than 10 minutes per week for partying before you're better off giving vacation time. It also doesn't help much for offices with under 40 or so employees. An even better plan would be to have one party per month for all of the birthdays in that month. That would give you roughly 40 minutes of uninterrupted cake-hole stuffing per party!

But regardless of the time, what adult would rather eat cake than take a day off of work!?  Forward this to your boss.

Originally posted on 19 Sep 2012 to dispatchEvent() Blog.

Best Unit for Font-size in CSS

Permalink

My brother Neal turned me onto this article on A List Apart

tl;dr

The best unit for defining font sizes in CSS are _ems _combined with font-sze:100%; in the body selector.

But working with ems can be a PITA. But if you're using less css (or sass), it can be quite easy. 1 em = 16px so the conversion can happen in a parametric mixin.

// less
.font-size (@px: 16) {
    font-size: @px/16 em;
}
p {
    .font-size(18); // 1.125em
}

// sass
@mixin font-size ($px) {
    font-size: $px/16 em;
}
p {
    @include font-size(18); // 1.125em
}

PS, less rules, sass drools!

Originally posted on 13 Sep 2012 to dispatchEvent() Blog.

Ludum Dare : Play the Game and Read the Postmortem

Permalink

Hey folks. Sorry for not posting more during the competition. I guess I was too busy making a game! But the good news is, that game is finished and you can play it right now!

Stampede at Crooked Thorax Ranch

I also wrote a mini-postmortem about the production process.

I ended up combining two of my ideas. One for the tower defense game with enemies that grow as they approach and the other for cowboys that ride on bugs.

Enjoy!

Originally posted on 23 Apr 2012 to dispatchEvent() Blog.

Ludum Dare Tiny World: 1 Hour Down, 14 Ideas

Permalink

The theme for LD23 is Tiny World. After handling an unrelated work call I got cracking on ideas. I think a lot of these are pretty good!

  • Platformer with impasses that require the player to shrink down to sneak past.

  • Medical War game

  • Tower Defense game with pixel sized monsters that creep up (unnoticed) but grow suddenly when they reach growth pads near the player.

  • Manage resources on a tiny planet with too many people (2)

  • a creature lives in your nose mining boogers + fighting allergens

  • Position Planets in space so they don't crash into the sun

  • Grow planets in a lab setting + release them into the wild

  • Insect cowboys on a bug ranch

  • Your in a cell and you can only interact with things that pass by your window

  • ON a small planet, every bit of acid rain or toxic waste erodes your planet a little. Stop it before the core is exposed!

  • A platformer where whenever you get hit you shrink a little (everything else grows). The monsters get more detailed and it takes you longer to reach the end (but you never die, just get impossibly small)

  • Some kind of puzzle or obstacle course using close up photography for graphics. Macaroni Tetris?

  • City building game where you can only use pieces of molecules that fit together

  • A game where you destroy particles (ants?) one or a few at a time. Try to get a large score in the hundreds or thousands (1 pt per particle). Violent screams for sfx of course.

I'll be voting on these using the criteria:

  • Easy / Simple to make

  • Innovative

  • Fun

  • Kelly's (wife's) Pick

  • Mims' Pick (worth 1000 points)

Originally posted on 20 Apr 2012 to dispatchEvent() Blog.