The Daily Checkin

How do you spell your name?

Ever have a problem spelling out the letters of your name over phone and left speechless trying to make up words
for each alphabet? I often do.

I wrote a tiny javascript program – phonetic speller to help memorize your Alphas and Charlies.

The Phonetic Speller uses the International Radiotelephony Spelling Alphabet .

Book meme

They actually live (socially) in the kitchen and/or den area anyway, so what better place to spend your time working than with lots of light and room for equipment and your library?

by David Allen “Ready for Anything”.

continue the meme.

  • 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.

Announcing webgen.py

webgen.py is a simple static website generator written in Python.

The source code is available on github – http://github.com/btbytes/webgen.py

Using Web.py's database library for data munging

The more I use web.py, the more I appreciate its compact libraries.

Web.py's database library is very handy in writing scripts that do the manipulation and heavy lifting.

Lets cut to the chase and see how to use web.py's database library.

Consider the simple use-case of normalising all the tags for articles stored in articles table to a standard format of lower__case_words (often called a slug). The current tags have a mix of upper case words and whitespace, which does not look very neat (Ah! geek OCD).

 
import web
db = web.database(dbn=os.environ.get('DATABASE_ENGINE', 'mysql'),
                  db='devdb', user="user", passwd="passwd")


def cleanup_blog_tags():
    tags = db.select('tags')
    ccount = 0
    for t in tags:
        name = t.name
        slug = slugify(name)
        print name, slug
        db.update('tags', where="id=$id", _test=False,
            vars={'id':t.id}, slug=slug, name=name)
    print '%s tags updated' % (ccount, )

def main():
    cleanup_blog_tags()

if __name__ == '__main__':
  main()

Old wine, new bottle

This blog continues to be served by Python, but by a different species – Yaki . Yaki is a Blog and a Wiki rolled into one.

As I have documented here, I find doing blog posts from text-editor1 quite liberating. I spend a lot of working hours inside a text editor editing code, so writing posts feels more natural opposed to blogging from within a browser window. I can understand why many people went gaga about Darkroom . Focus is a good thing to have.

Yaki also removes the stress of figuring out where to put a blob of text. Should I write a blog post about the server configuration I did, or should I create a stand alone page because I might add something to it later? With Yaki, everything is just text so that I can just write what is there to be written, content with the fact that I can always just edit the file and the online version will be updated automatically. I see this approach of edit-it-and-forget-it approach enabling me to write longer, hopefully useful documents over time compared to yyyy/mm/dd trailing blog posts.

1 Using TextWrangler because TextMate does not have native support for editing remote files.

Pi

I constantly tweak my website, hoping that some combination of layout, design and colors will suddenly propel me into becoming a better writer. My tinkering of the website does not go from 1 to 2. Rather, it jumps back and forth between many ideas. A blog, a 'homepage', a "bliki":bliki, a minimalitic tumblr etc. "Pi":Pi seems to be a better change tracking sequence. 3.142...

I wrote my own CMS using Django and imported all the entries from the old blog running on Wordpress. Still I didn’t like the idea of having to use a browser window to write anything. Yaki looks to be what I consider to be an excellent balance between static and dynamic content, file-system based, fast, hackable and opinionated (uses relatively obscure Snakelets application server) system. To top it all, its written using Python.

I’m going to give it a serious try. So far, it is looking good. Considering I’ve written at-least three paragraphs after three months of hiatus.

© 2008 Pradeep Kishore Gowda (C-C by SA 2.5-IN) ◊ Made with python, YUI on a mac.