Optimal Telelicious Coding From AK To CT
 
 
Monday April 14, 2008

Fring Skype/VOIP on Iphone

Techcrunch has an interesting update about Fring a voip/chat service for mobile phones which plans it’s launch for the iPhone sometime in the next day. While this does require a jailbroken iPhone for the time being, this technology will no doubt change the mobile phone industry once it’s available to the public through the iPhone app store launching in June.

VOIP over the iPhone means there’s no need to use calling plan minutes to make phone calls. Whil this may currently be limited to areas with WIFI signal, the minutes and money saved could be astronomical. With a service like this the iPhone could truly become a land line replacement assuming you have a solid WIFI connection. What’s more, if the 3G iPhone proves to have adequate bandwidth, VOIP calls might even be possible over the data plan.

What will this mean for Apple and At&t? Apple is positioned very well with their innovative device years ahead of the competition. AT&T on the other hand is stuck providing a commodity and with alternatives like WIFI becoming more an more available, long term I think you’ll see their pricing plans change to reflect the shift in data-plan usage from VOIP and potentially mobile video chat.

Jon Todd @ 11:16 pm
Filed under: Uncategorized
 
Sunday April 13, 2008

99 Bottles of Beer in 1178+ Languages

My buddy Wyatt Dumas dropped me a link to this site with currently 1178 variations of how to program a computer to output 99 bottles of beer on the wall.

The perl version was very creative:

       ''=~(        '(?{'        .('`'        |'%')        .('['        ^'-')
       .('`'        |'!')        .('`'        |',')        .'"'.        '\\$'
       .'=='        .('['        ^'+')        .('`'        |'/')        .('['
       ^'+')        .'||'        .(';'        &'=')        .(';'        &'=')
       .';-'        .'-'.        '\\$'        .'=;'        .('['        ^'(')
       .('['        ^'.')        .('`'        |'"')        .('!'        ^'+')
      .'_\\{'      .'(\\$'      .';=('.      '\\$=|'      ."\|".(      '`'^'.'
     ).(('`')|    '/').').'    .'\\"'.+(    '{'^'[').    ('`'|'"')    .('`'|'/'
    ).('['^'/')  .('['^'/').  ('`'|',').(  '`'|('%')).  '\\".\\"'.(  '['^('(')).
    '\\"'.('['^  '#').'!!--'  .'\\$=.\\"'  .('{'^'[').  ('`'|'/').(  '`'|"\&").(
    '{'^"\[").(  '`'|"\"").(  '`'|"\%").(  '`'|"\%").(  '['^(')')).  '\\").\\"'.
    ('{'^'[').(  '`'|"\/").(  '`'|"\.").(  '{'^"\[").(  '['^"\/").(  '`'|"\(").(
    '`'|"\%").(  '{'^"\[").(  '['^"\,").(  '`'|"\!").(  '`'|"\,").(  '`'|(',')).
    '\\"\\}'.+(  '['^"\+").(  '['^"\)").(  '`'|"\)").(  '`'|"\.").(  '['^('/')).
    '+_,\\",'.(  '{'^('[')).  ('\\$;!').(  '!'^"\+").(  '{'^"\/").(  '`'|"\!").(
    '`'|"\+").(  '`'|"\%").(  '{'^"\[").(  '`'|"\/").(  '`'|"\.").(  '`'|"\%").(
    '{'^"\[").(  '`'|"\$").(  '`'|"\/").(  '['^"\,").(  '`'|('.')).  ','.(('{')^
    '[').("\["^  '+').("\`"|  '!').("\["^  '(').("\["^  '(').("\{"^  '[').("\`"|
    ')').("\["^  '/').("\{"^  '[').("\`"|  '!').("\["^  ')').("\`"|  '/').("\["^
    '.').("\`"|  '.').("\`"|  '$')."\,".(  '!'^('+')).  '\\",_,\\"'  .'!'.("\!"^
    '+').("\!"^  '+').'\\"'.  ('['^',').(  '`'|"\(").(  '`'|"\)").(  '`'|"\,").(
    '`'|('%')).  '++\\$="})'  );$:=('.')^  '~';$~='@'|  '(';$^=')'^  '[';$/='`';
http://www.99-bottles-of-beer.net/language-perl-737.html

Liked the python version for it’s originality and simplicity:

    import re, urllib
    print re.sub('</p>', '', re.sub('<br>|<p>|<br/> |<br/>','\n', re.sub('No', '\nNo', 
    urllib.URLopener().open('http://www.99-bottles-of-beer.net/lyrics.html').read()[3516:16297])))
http://www.99-bottles-of-beer.net/language-python-931.html

Lastly, there is a version programmed in whitespace which is apparently a windows only language I had never heard about. This must be Microsoft’s secret weapon for secure coding, or maybe it’s their language of choice for open sourcing their work. In either case it’s no doubt what Vista must have been written in :)

Jon Todd @ 1:25 pm
Filed under: Uncategorized
 
Friday April 11, 2008

Vote PHP on Google AppEngine

Google just recently released AppEngine which will no doubt change the web application hosting industry as it handles all the hard problems related to scalability and it’s free while you’re small. The biggest problem with it is that I have is that it only supports Python right now. Google has promised to support other languages going forward so I think it’s time to make ourselves heard. Vote PHP5 as the next language supported by Google Appengine

Jon Todd @ 6:22 am
Filed under: Uncategorized
 
Thursday April 10, 2008

I’m moving to San Francisco!

So after posting about wanting to work for Google I was contacted by Pat Donahue at Structural Wealth Managment, a financial management start-up in San Francisco, CA. While Google would have provided a great learning environment with many bright people to learn from, they have done much of their growing.

Structural Wealth has a small but bright staff and lot more room to grow so I’ll be learning and involved in architecting a revolutionary product. Sounds like a win-win-win.

Not sure where I’m going to be living yet but I’ll figure that out later.

Jon Todd @ 1:36 pm
Filed under: Life
 
Wednesday April 9, 2008

The Monty Hall Problem

Liz and I went to see the movie 21 based on the book Bringing Down the House about some MIT students who went to Vegas and won a ton of money playing blackjack using card counting and signaling. While the movie way over dramatized the story, Kevin Spacey does an amazing job as always. One of his most memorable moments as an MIT professor is his description of variable change using the Monty Hall problem named after the host on the game show Let’s Make a Deal.

The Monty Hall Problem Explained

Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is it to your advantage to switch your choice?
- Marilyn vos Savant

If you don’t know the answer yet I suggest you give it some thought and then try out this experiment by the New York Times or if you like to be treated like a little kid of feel lazy here’s a youtube explanation.

Got the answer? Cool. Once you’ve got you mind wrapped around this problem it’s pretty simple but apparently it wasn’t till just recently that psychologists understood it’s implications on cognitive dissonance.

If you dig that problem the NYT has a few other related problems too.

Jon Todd @ 2:42 am
Filed under: Uncategorized
 
Monday January 21, 2008

Finding Duplicate Lines with Regex

If you are looking to remove duplicate lines from an alphabetized list this code will do the trick:

Find the duplicate lines

    ^(.*)(\r?\n\1)+$

Replace with a single line

    $1
Jon Todd @ 2:21 pm
Filed under: Code