Archive for May, 2007

Web site stats

In the month of april my blog was on digg.com twice: Dear AMD and Getting involved with Ubuntu.

Interesting notes:

  • Dreamhost is my current host, and did not suffer from the digg effect
  • I got more traffic from people linking to the “No you can’t have a pony” pic than from digg
  • Stumble Upon, not digg, was the top referrer
  • Firefox beat IE in page views by roughly 9x
  • Windows XP was the most frequently used OS viewing the page. Windows XP had more views by 1.1x linux views. (Which is pretty darn close to 50/50)
  • Initial digg sends roughly 13k hits during the first day, 6.5k the second day and then exponentially falls off.
  • The traffic from the first digg was much larger, and was on a Saturday. The second digg was on a monday, and gave 5k less hits
  • Google reader appears to be the most used feed reader
  • Comparing stats when not being dugg, site readership is almost exclusively non-windows.

My hats off to dreamhost for working even during the digg effect, despite only paying like $7/month.

Silly puzzles

You sucked me in.
“tonyyarusso> rob: ‘k, now convert “hello world” to binary, then to a base ten number, divide by your age, subtract your street address, multiply by the number of cousins you have, convert back to text via ascii character codes, and give us the result. Oh, and you have to do it on paper – we want scans.

#!/usr/bin/python
def char_to_binary(c):
    n = ord(c)
    result = ""
    while n:
        if n&1: result = "1" + result
        else:   result = "0" + result
        n >>= 1
    return result.zfill(8)

def str_to_binary(s):
    return "".join([char_to_binary(c) for c in s])

def binary_to_int(b):
    count = 0
    sum = 0
    for item in b[::-1]:
        sum += (2 ** count) * int(item)
        count += 1

    return sum

def int_to_binary(i):
    bStr = ""
    if i == 0: return '0'
    while i > 0:
        bStr = str(i % 2) + bStr
        i = i >> 1
    return bStr

def split_len(seq, length):
    return [seq[i:i+length] for i in range(0, len(seq), length)]

if __name__ == "__main__":
    helloString = "hello world"
    helloBinary = str_to_binary(helloString)
    helloInt = binary_to_int(helloBinary)

    age = int(raw_input("Age: "))
    helloInt = helloInt / age

    address = int(raw_input("Address: "))
    helloInt = helloInt - address

    cousins = int(raw_input("Cousins: "))
    helloInt = helloInt * cousins

    finalString = int_to_binary(helloInt)

    print "rob> tonyyarusso, the answer to your question is:",

    for item in split_len(finalString, 8):
        intItem = binary_to_int(item)
        print chr(intItem),

    print ""

Wow

This is hilarious. The guy calls verizon, and neither the phone jockey nor his boss can understand that $0.002 != 0.002¢. Cell phone companys never seem to bill correctly, wonder why.

Riding the train

Today it seems popular to blog about the planet, complain on irc etc. Well, atleast to get upset about it. In my usual, non-popular stance, I am just going to pose a question: What did it hurt? Are people so deluded to think that going a day without reading their blog through an aggregator adversely affected them? I think it is pretty safe to say no. Also, I checked my files, and no, I don’t have an SLA from canonical, nor the ubuntu foundation that guarantees anything.

If you are interesting enough, or have something decent to say, then the readers would have the address to your blog anyway. With that said, I think Corey’s spec is a good idea.