Tuesday, June 22, 2010

Don't hurt your spleen!!

Son (via chat): Mom says you have to feed me today.
Me: I promise to feed you, but if you start feeling a little light headed, feel free to feed yourself. (He's 15 afterall...)
Son: Alright, but if I die, it is on your head.
Me: If you die it will effect more than my head. I will hurt in my head, my heart and in my spleen too.
Son: Your spleen?!?! I'd better not die in that case. Don't want you to have a hurt spleen.

Wednesday, June 16, 2010

Getting Creative

My son and I were having a conversation about some of his writing the other day. I told him that he needed to be more creative in his writing, and one of the best ways to do that is to give yourself constraints. Here is a great article about why constraints are a great way to get creative:

Next, creativity is all about connecting things. It is about knowing x and knowing y and then figuring out that if you put x and y together you will have something awesome. Often x and y are completely unrelated, but just knowing them helps. That means you have to start to learn lots of x's and y's. And they don't really need to be anything in particular, just... learn.

Open your mind to consuming information. And practice. Then put yourself in a position to create something and then CREATE! And do it by giving yourself constraints and using things that you already know.

Monday, April 19, 2010

Improved Office Arrangement

I propose that office arrangements should be re-arranged. Currently the bosses sit in offices and the workers sit in cubicles. Managers are always talking to each other, so if they sat in cubicles it would facilitate communication amongst managers. Also, putting the developers in offices would allow them to stay in the zone because they would have fewer distractions.


Managers say they need offices because the meetings they have require privacy, but I imagine that if those meetings were held in the open more collaboration would happen. They say developers should sit in the open because they need to communicate, but all of the times that I have ever "communicated" I was with a manager.

Who knows, projects might show up on time for a change.

Friday, November 20, 2009

Counting in Base 36 with JavaScript and Ruby

Converting from Base 36 to integer in Ruby couldn't make this any easier:

str.to_i(36)

and back to Base 36:
int.to_s(36)

Humorously, JavaScript is very similar, just not as elegant:
parseInt(str, 36)

and back to Base 36:
int.toString(36)

Counting in Base 36 in both languages is an exercise in converting to integer incrementing and then converting back to Base 36:
def inc36(str)
n = str.to_i(36)
n += 1
n.to_s(36)
end

And in JavaScript:
function inc36(str) {
var n = parseInt(str, 36);
n++;
return n.toString(36);
}

Good times! I hope this helps someone. Googling for the answer did not turn up many hits.

Monday, September 14, 2009

VMA + Twitter = New Day for Marketing

I believe that the scandal that Kanye created with Taylor Swift was staged by Mtv. I would guess that Kanye and Mtv were in on it at a minimum, but it is possible that all four (Mtv, Beyonce, Taylor and Kanye) were all in on it, but I doubt it. The Rhapsody commercial that followed ("this is Taylor Swift's time") immediately following the incident seemed a little like an apology.

But the change for marketing came at the end when Mtv showed that they were *measuring* the Twitter traffic and pointed out that the traffic really jumped when Kanye did his thing. Mtv just proved to the rest of the world that if something big enough happens a measurable amount of
chatter will be generated. Granted, few people will get the level of traffic that Mtv generated, but I don't think that makes it any less important for businesses of all sizes.

Sunday, August 23, 2009

Adding commas to numbers

I could not find any good utils out there to add commas to numbers in JavaScript. So I wrote one:



I found a Ruby example a long time ago, and it has served me well. Here is my Ruby comma util:



I love the Ruby version, but I am pretty proud of my JavaScript version as well.

Friday, August 21, 2009

Firefox Prism Page Search

Firefox Prism is nice, but it is killing me. I use it primarily for Gmail. Gmail's keyboard shortcuts don't work from time to time. "gi" or Goto Inbox never works. "y" or Archive works most of the time.

I wish they would open up more of the options because this one is driving me nuts.