Wednesday, December 24, 2008

Flickr Tag Galaxy

Re-blog from Phasor Burn--a seriously cool flickr tag virtualization called Tag Galaxy.


Wish list: make it bookmarkable

Wednesday, December 17, 2008

De-anonymizer for Javascript


Here is a snippet of Ruby code to de-anonymize anonymous functions in Javascript files. It could, for example, be used in a rake file of a rails project, or a Capistrano script.
It will make your debugging and stack tracing experience a lot more fruitful:



def deanonymize(file_name)
content = ""
line_counter = 1
File.open(file_name).each_line do |line|
content += line.gsub(/(\w*)(\.?)(\w*)\s*(=?)\s*function\s*\(/) {
$1 + $2 + $3 + ' ' + $4 + ' function sbrew_' + $1 + '_' + $3 + '_' +
file_name.split('/').last.sub(/.js$/i, '_js') + '_' + line_counter.to_s + '('
}
line_counter += 1
end
content
end


Note that it tries to put as much information as possible into a function name, but not all de-anonymized functions will look the same. The information it uses is:


  • The file name

  • Line number of the function declaration (note: this will make the stack traces look a bit unusual, as you might expect to see the execution line in that stack trace but it is the function declaration line)

  • Enclosing object



Monday, November 17, 2008

Phrase from nearest book

A meme from Phasor Burn:


  • Grab the nearest book.
  • Open it to page 56.
  • Find the fifth sentence.
  • Post the text of the sentence in your journal along with these instructions.
  • Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.

My result:

Add lukewarm milk mixture and 4 1/2 cups (1.125L) flour.

Friday, November 14, 2008

I wonder how long we will have to wait...

... for some of the insanity resulting from 9/11 to reduce?


Salon's Patrick Smith, as usual, has an interesting viewpoint:

"More than any clash of civilizations, tedium is the legacy of Mohamed Atta"

Thursday, October 23, 2008

Gwynne Dyer - we are not heading into a second great depression

Gwynne Dyer has an interesting take on the global financial crisis

Punch line if you don't have time to read the article:  "Not the Great Depression, but the Reign of Folly."

Personally, I think this was a correction long overdue--and it will take some years to sort out before things become "normal" again. In the meantime more volatility means there hasn't been a better time to start dollar cost averaging for ages.

Saturday, September 27, 2008

You can pay now or you can pay later.

Many economist question the bailout, interesting thoughts about the financial crisis in the US: http://tynted.com/0LWSWjwD40U

Wednesday, September 24, 2008


Love this one....

Sunday, September 21, 2008

Is Microsoft going to get rid of this Wall?

I guess Microsoft breaks down the walls--but only if you're willing to install their software on your computer. I've always felt that their hostile approach to open standards throughout the years was kind of like building walls.

Monday, August 25, 2008

Let's get it over with and build a wall

Canadian Border No Longer Invisible in Vermont

Yeah--little fences and gates will keep the bad guys out. As if. I heard a very interesting podcast recently interviewing Daniel Gardner, the author of a book (The Science of Fear: Why We Fear the Things We Shouldn't--and Put Ourselves in Greater Danger) outlining how irrational, expensive, and damaging recent US policy has been. Should be mandatory listening/reading for all US politicians and bureaucrats.

Saturday, August 2, 2008

my greatest fear for the next 6 months

I hope I'm just a crazy conspiracy theorist.  Honestly.


Thursday, July 31, 2008

Still no iPhones for the fido faithful

Fido continues to reward their contract-holders and long-term customers (I've been with them, maybe 8 years???) by refusing to sell us iPhones.

Maybe I was wrong when I said Roger's didn't mess up Fido yet.....

Tuesday, July 29, 2008

Free music downloads

Some artists that get it...

Nine Inch Nails: http://tyntapp.tynt.com/go/0LQk93iZ40j

Kristin Hersh: http://kristinhersh.cashmusic.org/

When are the music companies going to figure out that people who love music will support musicians without being forced to?

Saturday, July 19, 2008

Memcache flushing/restarting after deploy--the easy way

Thanks to WillJ for an easy trick to flush out memcache as an alternative to restarting the process every time you deploy.

$ echo "flush_all" | nc localhost 11211

He also has an interesting article on how to connect to MySQL on engineyard.... 





Wednesday, July 16, 2008

Don't C++ Javascript!

After reading Douglas Crockford's latest book Javascript, the Good Parts, I came to appreciate more the small elegant language hidden inside Javascript.

However, I'm worried it's going to go the way of C++ with the new EMCAScript standard.  I don't think we need to turn it into a class-based language.  What I think should be fixed, though:

1. Block scoping--I just can't get used to the function scoping of Javascript when it looks so much like C.
2. Getting rid of globals--default globals are just wrong.
3. A simple namespace mechanism.
4. How about generating an error if you use a variable before it's set? 
5. Fix == and !=
6. Get rid of needless keywords, add missing ones (like undefined) 

Maybe instead of bloating up javascript, people should focus on a re-write of the browser DOM API.

Tuesday, July 15, 2008

An injustice of galactic proportions

This is probably old news to my astronomer friends, but I can't believe that even as you read this post, our "galaxy", the Milky Way, is cannibalizing an innocent bystander, the Canis Major Dwarf galaxy.  

Here I thought our galaxy was pretty amazing in its own right, but it's really just a space hog. 

What would you do with Half a Trillion Dollars?

I'm surprised I haven't come across this in the mainstream or alternative media yet.  It's from February 2008. Gwynne Dyer is suggesting that military-industrial complex is actually gearing up for a much more extensive and expensive cold war with China.

Just think of the goodwill that could be "bought" around the world with that kind of money.   Ugh.

Monday, July 14, 2008

Fido doesn't want my business

I found it quite frustrating to learn that, according to Fido customer service, I am not eligible to upgrade to an iPhone for six months.  I was told there was no way to get one sooner, even after asking if I would have to cancel my two current plan (half-way through) and pay the cancellation fee.

This is seriously making me think of canceling my plan altogether and going with the cheapest available pre-paid provider of the moment.

The mind boggles.

P.S.  What are Fido customers going to do if they want to upgrade their iPhone before 3 years is up?  Will everybody else have to wait until their contract is complete?

Sunday, July 13, 2008

Toluu is pretty cool

I've been trying out toluu.com lately.  It lets you upload your RSS feeds and then matches you to other Toluu members and see what they are reading.  It's nicely integrated with the bloglines feed reader (the only one I tried)--if I add a new feed to toluu it pops me out to bloglines and lets me add it there too.

However, there was one problem getting going with toluu--after finally sending an e-mail to them, I learned that I needed to add more than 8 feeds before it could match me to other members and suggest feeds.

I'm always on the lookout for stuff that makes it possible to find resources from people with similar interests.  That's what made Usenet so great in the pre-WWW days, before it got saturated.

Friday, June 20, 2008

Old Stuff

My Twitter Feed:  http://www.twitter.com/timbreitkreutz

I have a bunch of old blog junk still over there.