Is it just me....

... or do most men have trouble keeping track of their wife's conversation.

She started saying something that probably sounds exciting in her head, because I completely failed to see the cause of excitement. The story took 4 different related jumps and I lost track of the thread. Of course, I had to voice my thoughts:

Honey, do you realize you are all over the place? I have no idea why you are telling me this. 

She actually let that one slide, I bet she likes me quite a bit.

I hate meetings

I hate them with a passion. When I see people sitting there trying to formulate sentences for no apparent reason but just to fill the void of silence, it just boils my blood. 

I was reading an article titled "Why Google can’t build Instagram" and I came across this quote

how Larry Ellison actually got efficiencies from teams. If a team wasn’t productive, he’d come every couple of weeks and say “let me help you out.” What did he do? He took away another person until the team started shipping and stopped having unproductive meetings.

I'm no fan of Larry, but the man's right. I would much rather work in a small team that meets for a purpose. 

Dinner and BSG

Yosh and I have been planning to do a BSG (Battlestart Gallactica) marathon for  a while now. Finally we broke down and decided instead of doing a marathon, we'll just one episode at a time with our dinner. Here's to the beginning.

We had vegetarian Chili, Garlic Bread, Hash Browns and Beans with sesame seeds. 

Cows and Bulls == Master Mind

I found out during my Utah Python meetup that the game I created called Cows and Bulls is actually called MasterMind in the US. 

It's a really simple game. 

The computer thinks of a 4-letter word. You start guessing that word and the computer will give hints along the way.

Cows - Number of characters in your guess that match the original word, but placed in a different location.
Bulls - Number of characters in your guess that match the original word, found in the exact same location. 

Based on the hints from each turn we can narrow down the possibilities and finally reach the answer. 

It's a fun game and really easy to implement.

pTimer listed in Softpedia

One of my hobby projects is now included in the Softpedia Mac OS database. I don't know if that means anything but it is fun to see that 9 people have downloaded that utility so far. 

A while ago I wrote a little PyQt4 application called pTimer to try out the famous Pomodoro Technique for productivity. 

The original reason why I wrote that timer was to get myself acclimatized to Qt programming using Python. But since I liked it so much I decided to publish the code and host it on Google Code hosting. 

Yesterday I got an email from Softpedia about including that utility in their website. Pleasantly surprised.

Utah Python Users Group - 11/11/10

I've been messing around with Python for the past 6 months and I'm loving it. Today I went to my second UtahPython users group meeting and had a lot of fun and learned a ton of stuff.

Chronological order of things I learned:
  • Supy bot - an IRC bot written in Python. 
  • supybot-doxygen - A plugin for supy bot that can provide api documentation for any software that uses doxygen.
    • This could be really useful at work if I can setup an internal IRC server for the developers to hang out. 
  • Objectify is a module in python for parsing XML files. 
  • doctest - a python module for TDD that is super simple. I'm really excited about this. Thanks to Matt for showing me how to use this.
Matt suggested that we do some pair programming during the meetup.
Here's the task: Write a simple python program that can take page numbers as user input and convert it to a list of numbers. 
User Input: 0, 1, 5, 7-10
Output: 0,1,5,7,8,9,10
Here is the code I wrote with the doc test based unit test in the doc-string:
###### PrintParser.py #######
    
    #!/usr/bin/env python

    def convert(inp):
        """
        * Get the input from user.
        * Parse the input to extract numbers
        ** Split by comma
        *** Each item in the list will then be split by '-'
        **** Populate the number between a-b using range(a,b)

        >>> convert("")
        []
        >>> convert("1")
        [1]
        >>> convert("1,2")
        [1, 2]
        >>> convert("1,2-5")
        [1, 2, 3, 4, 5]
        >>> convert("1-3,2-5,8,10,15-20")
        [1, 2, 3, 2, 3, 4, 5, 8, 10, 15, 16, 17, 18, 19, 20]
        """
        if not inp:
            return []
        pages = []
        comma_separated = []
        comma_separated = inp.split(",")
        for item in comma_separated:
            if "-" in item:
                a = item.split("-")
                pages.extend(range(int(a[0]),int(a[1])+1))
            else:
                pages.append(int(item))

        return pages

    if __name__ == '__main__' :
        import doctest
        doctest.testmod()

Hapkido First Impressions

I went to my first Hapkido class today. I have a very good (and respected) friend from work, who is already taking that class and he recommended it.

I had high hopes for that class, maybe a little too high. It was a little bit underwhelming due to my overtly hyped expectations. It is definitely more exerting (physically) than Aikido. It combines the kicks from Taekwondo with the joint locks in Aikido. So I'm excited to keep learning the art. But the part that bothers me about Hapkido is you attack to destroy, unlike Aikido where you take care of your opponent even when you are pinning them down and making them submit. 

But one great thing about the class is the instructor seems really good. He is very friendly and knowledgeable. If you are in Lehi/American Fork area you should check out the class. xsifactory.com/martial-arts-classes/

Mmmmm.... Rice

After three days of not having any rice, I finally made some today. Is it just me or does every one well up a little bit when they are about to taste rice?

So if I like rice so much, why don't I make some every day, you ask. Well, I'm a lazy bum who doesn't enjoy cooking as much as eating. There, I said it!

Vita Brevis [Ars Longa]

InnerVoice: That is latin for "Life is Short, Art is Long". 

Me: Yeah, I know, I'm a little behind on my personal projects.
InnerVoice: Try waaaaay behind. There are at least ten tabs open at home and five tabs open at work 
Me: I'll get to it. They are not going anywhere.
InnerVoice: BTW, those unread emails with some tutorial links isn't gonna master itself, you know.
Me: Hmmm..... 
InnerVoice: Are you even listening to me?
Me: Barely. I'm still thinking about my first Hapkido class tomorrow. 
InnerVoice: Well, there goes the Wednesday nights.
Me: BTW, I agreed to present a brief tutorial on Git at the SLLUG meeting next Wednesday (Nov 17). 
InnerVoice: What? Are you crazy?
Me: Well how else am I going to make a good first impression?
InnerVoice: You do realize, you've never been to one of those meetings, right?
Me: Yeah, but they seem like nice people. I'm sure I'll be fine. 
InnerVoice: *Shakes Head* Hopeless, utterly hopeless.
Me: *Grinning with glee*

It's awesome when life gets busy.