Fun With Programming Languages

Tonight, a Facebook thread got a little out of control after I posted a status update that I was “mentally bankrupt.” It was a long day working on client work – a project that is just about done but past due.

After some commentary by Facebook friends, we got to writing little scripts that would take a random selection from a group of adjectives and adverbs and put similar phrases together randomly.

What came of this exercise was a fun little jaunt into a variety of programming languages.

PHP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
$adverbs = array(
    'mentally',
    'morally',
    'emotionally',
    'socially',
    'psychologically'
);

$adjectives = array(
    'devoid',
    'bankrupt',
    'empty',
    'hollow',
    'vacant',
    'sleeping with fishes',
    'taking a dirt nap',
    'shallow'
);

echo $adverbs[array_rand( $adverbs )] . ' '
    . $adjectives[array_rand( $adjectives )];
?>

Ruby

1
2
3
4
5
6
7
8
9
10
11
adj = [ "mentally", "morally",
    "emotionally", "socially",
    "psychologically" ]

adv = [ "devoid","bankrupt",
    "empty", "hollow","vacant",
    "sleeping with fishes",
    "taking a dirt nap","shallow" ]

print adj[rand(adj.length)] + " "
    + adv[rand(adv.length)] + "n"

Python

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import random

def popchoice(seq):
    return seq.pop(random.randrange(len(seq)))

adj = [ 'mentally', 'morally',
    'emotionally', 'socially',
    'psychologically' ]

adv = [ 'devoid','bankrupt','empty',
    'hollow','vacant','sleeping with fishes',
    'taking a dirt nap','shallow' ]

print popchoice(adj) + " "
    + popchoice(adv)

SQL

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CREATE TEMPORARY TABLE adjectives (
    adjective VARCHAR (30) NOT NULL
    );

CREATE TEMPORARY TABLE adverbs (
    adverb VARCHAR (30) NOT NULL
    );
   
INSERT INTO adjectives (adjective)
    VALUES
    ('mentally'),
    ('morally'),
    ('emotionally'),
    ('socially'),
    ('psychologically');
   
INSERT INTO adverbs (adverb)
    VALUES
    ('devoid'),
    ('bankrupt'),
    ('empty'),
    ('hollow'),
    ('vacant'),
    ('sleeping with fishes'),
    ('taking a dirt nap'),
    ('shallow');
   
SELECT CONCAT_WS(
    ' ',
        ( SELECT adjective FROM adjectives ORDER BY 1 LIMIT 1 ),
        ( SELECT adverb FROM adverbs ORDER BY 1 LIMIT 1 ) )
    AS RandomStuff;

Twitter is Life

Everyone loves Twitter. Some research reports seem to indicate that it was the number one most often used word on Twitter last year. That would be 1 in every 3 words written on Twitter are about Twitter. A sampling of these tweets would be:

  • Listen to our podcast about Twitter
  • 10 Reasons I Love Twitter
  • Twitter is my girlfriend
  • The only thing better than Twittering from my iPhone is Twittering from my iPhone while taking a crap
  • Twitter helped me make money
  • Twitter helped me find God
  • Twitter helped me find a #blinddate
  • Did you know Shaq was on Twitter?
  • We don’t talk to each other, even though we are in the same room. We twitter back and forth
  • Twitter is down! FAIL
  • Barack Obama is on Twitter, did you know that? Huh?
  • Tweetup!
  • Let’s talk about Twitter
  • Twitter me this, Twitter me that
  • Business are on Twitter too
  • How is Twitter making money anyway?
  • Twitter is bigger than FriendFeed

Friendfeed? Huh?

Anyways, my point is this. The most important thing on earth, if you want to tap into the collective conscience of the webgeeks is Twitter. It’s clear why. With so many mainstream people like Rick Sanchez of CNN, Shaq, Ashton Kutcher and of course, ROBERT SCOBLE (pant, pant, pant), it is clearly The Important Thing™ to be talking about.

Are you talking about Twitter? If not, you should be. It’s rewarding.

Words That Must Die in 2009

As this is the end of the year, we are required by some unwritten law to go through certain exercises. Among those are a required “predictions” post, certain holiday-related posts and of course, like last year, a list of words that have been so overused in the past year that we hope they will die a tortured, cruel death in 2009.

  • Change – the buzzword of the 2008 Presidential election. It has become a mantra for utopian-loving citizens everywhere.
  • Meta – Meta is a word to describe descriptive data of descriptive data. Or, better, it is the abstraction of something more well known. It is a catch phrase to describe something as simple as, for instance, one photographer taking a picture of another photographer taking a picture. It is rather difficult to describe because it is so meta.
  • Rock Star – a description of a minor celebrity or demigod, usually in the web space. These are individuals who carry some personal reputation and weight in only their circle but remain relatively unknown “in the real world”. Also describes the blogosphere’s “A List” of top tier bloggers. I, for instance, am a rock star.
  • Cloud – a technology that takes data and operations out of a simple peer to peer concept of client and server, and places it in a massive grid on the internet. Cloud computing is usually powered by Amazon S3 or EC2, Google App Engine or the new Microsoft Azure platform.
  • fail
    Products built “in the cloud” are generally known to buzzword junkies in PR as SaaS (“Software as a Service”).

  • Bailout – By far the biggest word that must die, in word and in deed, is bailout. No explanation necessary as you must be living under a rock if you don’t know what I’m talking about!
  • Ubiquitous – this word tends to revolve in the same orbit as “Cloud”. It is a buzz word often used to describe web services that are always available and tends to apply in the world of mobile. Ubiquitous ensures that everyone can get to everything at any time or any place. And it needs to die.
  • FAIL – This is shortform for the obvious meaning. If something is unsuccessful or stupid on it’s face it is just plain FAIL. Made popular by the Failblog, it has become a common part of geek culture and lingo.

As a bonus, Twitter seems to think “Oh, you know Aaron?” is overused in conjunction with people meeting other random people that know me. :-)

Thanks to everyone who helped me assemble this list!

Additional: Transparency. This has come up in a variety of way. In politics and government circles, the Sunlight Foundation has made a lot of progress (and noise) on the Transparency in government front. In PR, communications people are striving to be “more transparent” online. Regardless of which form of transparency, people need to talk less about it and do more of it. :)

Sweet Caroline in Vegas

I’m still in travel mode. Long story, but I’ve been in Las Vegas since last Wednesday and don’t leave until tomorrow. While this has been a fantastic trip, the process of writing serious posts requires some time to process everything from the week. That processing of data doesn’t happen when you get together with Jeremy Wright, Darren Rowse, Muhammed Saleem, Micah Baldwin and many others for karaoke in Las Vegas.

Yeah. Could be ugly.

So, while I have a ton of things to write about, those will have to wait for another day. In the meantime, enjoy my rendition of Red Sox Nation national anthem, Sweet Caroline. The entire bar was into it and though there was someone just off camera who was really “off” making the recording sound meh, in reality it brought down the house. Thanks Micah for having your Nokia N95 ready to go at a moments notice.

Cameos by Jeremy Wright, Darren Rowse, and Shai Coggins.

Thanks for letting me bring Red Sox Nation to Vegas. :)

What Would the United States Do for Mexico?

There was a massive earthquake in western Mexico and 200,000 people unfortunately, and tragically, died. In the wake of the tragedy, the nations of the world banded together to provide relief.

China sent a ship with containers of goods such as tee-shirts, watches and electronic devices to help with cleanup and provide humanitarian relief.

Great Britain sent 500 palettes of drinking water and other humanitarian aid.

Beliza and Costa Rica sent hundreds of first responders and medical aid.

The United States sent 200,000 Mexicans to replace the ones that were lost.

In all seriousness, this election is important in so many ways. One of the major issues on the table that might not be getting as much attention is illegal immigration. John McCain doesn’t want to talk about it much because it was an issue made big by George W. Bush and he’s trying to keep Sarah Palin front and center. Barack Obama isn’t talking much about it because he’s fighting a guerilla war based more on propaganda and media spin, than he is on these core issues.

But, at the end of the day, both candidates have taken some kind of position on immigration. It’s not that we, as conservatives, don’t care about the plight of illegals, but that there is a process to being legal.

Obama is best suited, based on his platform, to push this issue. We need to find a way to help illegals become legal without destroying families and lives in the process. We do need to secure the borders, but what does that mean? Certainly, the immigrants that are here now are “doing the jobs Americans won’t”, but that’s not an excuse to allow a persistent state of illegality. Instead, how do we help these people become legal and at the same time, stem the wave of illegals that are coming into the country and tapping our finite resources without paying a dime into the system.

Obama is best suited to do this.

Barack Obama Wins the Democratic Nomination with 3441 Delegates

Forget Independence day, also known as June 4th (Yes, I do know Independence Day is July 4th, but thanks for the correction. The statement was tongue in cheek.), also known as the day that Presidential hopeful Barack Obama claims the Democratic nomination for president. We’ve suffered through five months of primaries and caucuses and all of the tree decorations that have been this Democratic primary season. Today, we stand five days shy of the Montana and South Dakota primaries that will wrap up all 48 states, the District of Columbia, Guam, Puerto Rico and American Samoa.

Michigan and Florida don’t get the distinction of being called states, in this post, due to their decision to buck the party system and make their own rules. Damn those independents!

So, though Obama appears poised to claim the victory, we thought we’d take the technical approach to the nomination process and figure out what Google Fights has to say.

Picture 6.png

According to Google, Barack Obama has won 85% of the vote for a total of 3441 delegates.

One wonders why it has taken this long to find a nominee…

Update: Digg it if you wish.