Divide and Conquer.

“Mr. Obama has, for at least brief moments, been forced offline. As he sat down with a small circle of advisers to prepare for debates with Senator John McCain, one rule was quickly established: No BlackBerrys. Mr. Axelrod ordered everyone to put their devices in the center of a table during work sessions. Mr. Obama, who was known to sneak a peek at his, was no exception.” [Source]

Obama’s own employee gives Obama order. Obama follows order.

I like this because it reminds me of an off-hand comment from the GTD thing. This comment has been making a lot of sense lately.

“It’s not about who’s on top; it’s about division of responsibility.”

Obama is a Renegade. No…he’s THE Renegade.

Recently I posted some ideas about the characteristics of codes, specifically the codes used to identify the President. Most of it was theorizing on my part.

“…this code has to be easily spoken via phone. No doubt, you’d like a certain about of uniqueness. Also, it should be something that could be understood when spoken over low-quality audio. You never know when those sat phones will get scratchy-sounding (‘I can’t hear you! I’m in a tunnel!’).”

I was very pleased to come across an article today that actually describes some of the codes used by the military, for identifying the President, Vice President, and their families. This was with respect to the new Secret Service code names being assigned for the Obama and Biden families. It turns out, speakability is a factor in their decision.

“The names are chosen to be easily pronounced and understood when agents use radio communications.

The code names have ‘nothing to do with security’ and more to do with ease in radio communication for those agents whispering into microphones up their sleeves.”

There’s a bit more info, along with a slightly funny story from Al Gore’s daughter.

When 19-year-old Karenna Gore’s father became vice-president in 1993 she had to choose her own name.

In 1997, she wrote: “Ever since four years ago, when I was put on the spot and told ‘two syllables’ and ‘It has to start with an s,’ I have been cringing in the back seat when identified as ‘Smurfette’.”

I find this additional “two syllable” requirement to be interesting. It makes sense, since it’s short, but still manages to provide a small amount of redundancy. [Edit: Chas points out that some of the names mentioned aren’t strictly two syllables, but I counter that if you slur them slightly, the names all have two “strong” sounding syllables — they’re not using “The Lotus Blossom”]

Also, the article mentions that the Obama family is being assigned names that begin with ‘R’ — Barack himself is “Renegade”. Karenna Gore said she was told it had to start with ‘S’. Bush and his wife have ‘T’. I think this might be so that the first sound of the word immediately identifies which family is being discussed. I think this is a clever trick.

And ultimately, it’s consistent. You don’t have agents using “Joe the VP”, “Mr Biden”, “The Vice Prez”, “Biden”, or any other possible name. There’s zero confusion. Day to day life is easy, and if they were ever put under stress, it’s one less thing they have to think about. They handle their thinking up front. Kind of like pre-processing data in a computer system. Good job, Secret Service.

“He’s not dead, he’s pining for the fjords”

Turns out that Monty Python’s Dead Parrot sketch wasn’t really groundbreaking. For it’s time, maybe. But it turns out that there’s a similar joke from the 4th century in Greece.

…a joke where a man complains that a slave he was sold had died.

“When he was with me, he never did any such thing!” is the reply.

I still love ’em, even if they were beat to the punch line by about 1500 years. Nudge nudge, wink wink, know what I mean?

Programming Visas, and effective regulation

I read an article on H-1B visas in the Harvard Business Review, and there was an interesting point made that I wanted to share.

Multinationals, desperate to fill technical positions, have been seeking alternatives to the use of H-1Bs. A solution that’s growing in popularity is intracompany transfer visas, which allow a firm to bring an unlimited number of foreign employees into the United States. But employees are eligible only after they have worked for the company for a year. So a multinational might, for example, assign a new hire to spend 12 months working in a country with looser immigration rules before bringing him or her to the United States.

The article then goes on to discuss how companies are also trying to simply avoid basing workers in the US at all. I suspect that — long term — this is not something we should want to encourage.

I thought this was interesting because it’s a clear demonstration of how companies will find a way around regulations, and how carefully regulation has to be designed so that is effective.

RSS Feed, side 2

New Point of Order: Ignore previous Point of Order.

You don’t need to update RSS anything. There’s a plugin that handles everything for WordPress forwarding to Feedburner.

I think the moral here is to ask Google before you do anything. [edit: Turns out I had an email in my inbox from Greg telling me that this plugin existed. So, new moral here: “ask Greg before you do anything.”]

Well, that’s nice.

If you’ve ever lost a cell phone, you know how much of a pain in the ass it can be. I’ve definitely lost and damaged phones. Just ask Dan.

I was looking at some papers from a credit card company I use, and realized that they will reimburse me if my phone is lost or stolen.

I wanted to point this out, because your credit card companies might offer this too.

One other thing, if you spend a lot on phones & service, you might be interested in the same card I have.They give you 10% back on phone-related stuff.

Gregg’s “Speeding up Ruby, without the Rails” Presentation

Gregg’s “Speeding up Ruby, without the Rails” Presentation

He points out that the C library stuff is going to cause blocking, because Ruby’s threading manager doesn’t know when it can stop execution. He demos this with mysqlplus, showing 10 queries with the blocking driver, and then showing mysqlplus which is the non-blocking driver. 10x speedup.

He points out dbslayer, which sits between processes and MySQL, and passes JSON out to the processes.

Starling (which uses memcached) is a good tool for job queueing. Looks like it sits on a single server, and serves up jobs when requested. He demoed putting integers into the job stack, could we put whole objects into the stack?

“What if I can’t find a C library to do what I want?” — use Ruby Inline. It lets you embed C code *directly* into Ruby.

Also, he is talking about ruby-prof, which is for profiling Ruby code.

gem install ruby-prof

Very nice stuff, but interpreting the output definitely requires some knowledge. One neat trick is that if you

require ‘ruby-prof’

You can start and stop the profiling so that you only get data from the parts of the code you’re interested in. Also, with this technique, you can easily output HTML formatted and linked code.

Interesting optimizing trick

“#{@var1} #{@var2}”

is faster than

@var + ” ” + @var2

because method calls are expensive, and the plus signs are method calls.

Another pro-tip: if you’re doing a switch-case, put the most common option at the top of the list — it cuts down on the number of compares that it will take to find the desired option.

In Rails 2.2, there’s a new function called “memoize”, which will automatically handle memoizing, so you don’t have to do a

@result ||=

Don't use .nil? calls, because method calls are slow.

if !value

or better

unless value

are better choices.

a, b = b, a # Nice trick for swapping two values

Link love for Gregg: http://www.envycasts.com His presentation style is excellent, and I guarantee you will learn at least one thing you didn't know before.

http://www.railsenvy.com/rubyconf/ This link has more info from his presentation, and source material

RubyConf 2008 Keynote by Matsumoto

Thursday AM Keynote by Matz

This is Matz: http://en.wikipedia.org/wiki/Yukihiro_Matsumoto

He’s talking about his love of languages, and why he got into Ruby.

He’s addressing some of the criticisms, that it’s slow, poorly implemented, embedding issues…he says the list of complaints goes on forever.

But, now he’s talking about why is Ruby good. He says people say it’s enjoyable, that Ruby made programming fun again.

He says he got into BASIC in 1980, and is talking about his problems with it. He says that one thing was the lack of being able to define data types. Everything is predefined, and you can’t change much.

He is talking a bit about LISP, and says some good things about it. He then complains about the parentheses in LISP, then puts up a slide that just says “No.”

He says he likes the aristocracy, as long as he is in power. BASIC gives you no power, LISP gives you full power. But, the problem is that at both ends of the spectrum, we lose popularity. It’s all about balance. You don’t want to go off the cliff of power with LISP, but you want to be able to be near the edge of the cliff — where BASIC isn’t.

He’s talking about why people choose Ruby. When he asks how many people choose Ruby because of Rails, about 60-70% of the room raises their hand. Matz points out that Rails is basically just a DSL for turning Ruby into a web language. He also points out that they are not at RailsConf, they are at RubyConf. This gets a laugh.

Again, talking about LISP, he says it’s a good DSL.

“There are under one million professional Ruby developers now, and we’re projecting there will be four million plus by 2013” — Mark Driver, Gartner analyst

Matz says “The future is bright…too bright maybe. Beware commercial success” He says, right now, we have the community and enthusiasm. In the coming years, we’ll have more money and more job titles. With these resources, come better implementations of Ruby. He says some of these are here now, but there will be more to make Ruby faster, more feature rich, and providing more satisfaction to us, the developers. He also says one of the great things will be all the new developers who are coming to Ruby, and he says “Welcome them, nourish them”. He says there are people who learn Ruby as a first language, and they go on to become great programmers. [Tim: I wonder what happens to people who start in Ruby, and then see C++]

He says he loves us all.