Farewell wordpress

I imported all the posts to my new jekyll-bootstrap personal blog at yuvalg.com/blog and this old http://uberpython.wordpress.com won’t see any new posts – it’ll be kept as an archive.

That’s it. I’m done. It took only 3 years from the first complaint to finish. Looking back, I’m very grateful for the service.

What I enjoyed at wordpress

  • Yearly reports – they’re eye pleasing, informative and fun. Maybe google analytics could replace this somehow?
  • Ease of initial setup and maintenance.
  • Stable, even on surprise high traffic days.
  • Free.
  • They allow exporting the data! No lock-in is the mark of a serious business with good guys running it.

Why I’m leaving

  • Huge, annoying, ads that they hide from the blog author so you have to go incognito to see what the rest of the world sees. You can pay wordpress to remove the ads, but what else are they hiding from the authors? I don’t know.
  • No control over CSS. You can pay for that too but…
  • I already have a VPS so why not use it? (no way I’m installing the exploit ridden wordpress-php-mysql stack again though).
  • Jekyll allows me to edit the plain-text posts from any device with ease.
  • I wanted to rename the blog anyway.
  • Jekyll is a much simpler stack – preprocessing that results in a a lot of html files is a better fit for my blog. MySQL/PHP/Cache is oldschool. Though this wasn’t a concern of mine when hosted on wordpress.com – I still get a certain “higher road” satisfaction leaving.

Goodbye wordpress.

http://yuvalg.com/blog/

Life Recording

If a baby born today was given a necklace with 2 mics and a camera, can we record its entire lifetime? At what quality? Lets assume dvdrip quality with xvid4, excellent compression with great sound and visuals for 700 MB per 2 hours. If we assume an 80 year life expectancy then we have 80 * 365 * 24 = 700,800 hours in a lifetime. This amounts to about 240 terabytes. Let’s say we cut off the boring half of the day and take a lower quality recording (1/5 file size as in YouTube for example) and we’re down to 24 terabytes. Using smart VBR we might even be able to get some hi-def for the important parts.

So according to hard drive capacity trends, this is feasible by 2015 (hard drive capacity multiplies by 10 every 5 years, see at: http://en.m.wikipedia.org/wiki/File:Hard_drive_capacity_over_time.svg ).

The only problem nowadays is the battery. Current tech would require your life recorder to recharge or replace the batteries once a day. So by 2015 all the crazy modern technologies will be ready for recording an entire human lifespan from a first person point of view without replacing any piece of equipment, except for the energy source. By the way the modern battery was invented around 1800. Us humans had 200 years to work on this thing but we’re still terrible at it.

Ok, so how do we tap into our bodies energy supplies? Please answer this question by 2015, thank you.

Leaving WordPress.com

I don’t like wordpress taking ownership of links
http://en.forums.wordpress.com/topic/link-redirection-through-go2wordpresscom?replies=12#post-404181 so I’m breaking off. I use wordpress partly as a link pastebin and archive so not being able to just copy-n-paste links is a real deal breaker for me.

I wonder which of these links will be replaced into go2 jacked links: http://www.youtube.com
http://www.cnn.com
http://www.blizzard.com
http://www.thebestpageintheuniverse.net/c.cgi?u=swine_flu

Hurrah for the export/import tool.

Installing extensions on google wave

Some tutorials proclaim to explain this but don’t. In order to install G**gle Wave extensions you have to go to your first wave named “Welcome to Google Wave” and click on the “Extensions Gallery” link. There you’ll find an extension named “Extension Installer”, install it, then when you’re editing waves it’s on the toolbar (yeah, where you change fonts is where you install wave extensions). This allows you to install any extension by url and not just those that are in the gallery.

What a self referential headache that caused.

I think this extension should be pre-installed by default just like the map gadget and yes/no/maybe. And it might be a good idea to just integrate the extension into the settings wave. I would tell google what I think but the forums on the subject don’t seem like the right place to post a suggestion, they’re more akin to tech support:

http://www.google.com/support/forum/p/wave?hl=en

Javascript’s Global Scope and Google Wave

Dmitry Baranovskiy said something that bit me the other day:

JavaScript’s global scope is a public toilet. You can’t avoid going in there but try to limit your contact with surfaces when you do.

Google wave stops calling your gadget callback functions if you do the following in your javascript:

name = "something, anything really, it doesn't matter"

That’s it, that’s all it takes to break a gadget. This bug was very hard for me to find and fix. I now realize it’s noobish not to place ‘var’ before every local variable and that the most polite thing would be to always use var and fight the scoping with only one uniquely named global. Javascript did a big nono when it decided that by default a variable is global and the special ones are local. Really that’s just one insane design choice.

What’s in a “name” as one might ask is something like
“wgadget_iframe_8″ for which I didn’t really care enough to dig any further. Just know that you can’t touch it when making a gadget for google wave.

Btw the gadget I made’s called “4 in a wave” which allows you to play the classic game face to face (thumbnail to thumbnail) with your opponent. A bot for playing alone is coming soon. To use this gadget in a wave just click the puzzle piece and paste this url:

http://4inawave.googlecode.com/files/4inaawave.0.8.xml

Python Programmers Writing Javascript Beware

Call me silly for not reading the docs, but this bug was very hard to find. Dictionaries in python are NOT the same thing in javascript. The curly braces mean it’s an "object literal" and the keys don’t need the quotation marks. For example:

var x = { NAME: 123, Something: "ok"}

Is the same as the following code:

var x = {}
x['NAME'] = 123
x['Something'] = "ok"

Which means that if you had a variable named "NAME" and you expected it’s contents to be the key, then you’re going to have a royally hard to find bug (especially when developing for an already obfuscated framework such as Google Wave).

This is even worse because JSON causes you to believe the quotation marks are needed. If there’s a place to file a JS enhancement proposal, I would, but I doubt this inconsistency would annoy anyone but a pythonista.

Projects I’d Like To Do

I’ve got too many things on my mind, I was thinking of doing the following:

  1. Help improve 3to2, sounds like it could help bridge the PyPI gap and allow for writing “backwards compatible” libraries, using the newest of technologies (it’s alot better than imitating decorator behavior using the silly syntax it’s sugar for).
  2. Help port Numpy to py3k
  3. Help port Django to py3k
  4. Build a small script that’ll crawl svn.python.org and give points to developers. [update: ohloh did it]
  5. Build a python ascii art lib (not one that does the greyscale trick, one that actually tests for lines etc).
  6. Build a pinax captcha app
  7. Make a py2exe, Freeze, py2app mashup that can easily compile on all platforms.

I think that’s it. I wonder how much of the above I’ll be able to complete by next month considering I’m really not good enough in Rock Band 2 drums yet.

Dr. Jekyll And Mr. Hyde

Books are assembly and movies are python. To me, books are an outdated medium that’s just not worth the hassle. Movies on the other hand I enjoy watching and creating. Of course just like there will always be people optimizing assembly, there will always be the paper text lovers, they can enjoy their pretentious fun ride for all I care.

Of course I don’t dismiss text as a medium completely, but story books are just java bytecode that’s waiting to be JIT compiled into a movie if it’s worth the machine’s effort.

Now, concerning this anti-science borderline racist book Dr Jekyll And Mr. Hyde thing, I quote:
"""Why is one person blond and the other brunette? Why are some people tall and others short? There must be a similar reason to explain the good and bad parts of mankind.""". This Jekyll guy was so curious and into the science that he got defaced and destroyed by this inclination. He became a short, ugly and thus evil form of himself. The good guy’s last words are "May the good Lord take mercy on me", so he actually tries to repent, lovely.

May god have mercy on religious fud tactics.

Python Regular Expressions Evaluator

I wanted to try out Django over App Engine so I made an online regular expressions evaluator:

http://pythonre.appspot.com

At first I thought it’s strange that there’s no online python regular expression checker. This might not be surprising considering how easy it is to test stuff with the python interpreter as opposed to php which can be a PITA for just testing one or two lines. Either way I thought this might be useful for quick checks and as a teaching tool.