Friday, April 17, 2009

How To Setup MySQL on Cygwin and Rails


I've been developing our app on Rails in a Windows Vista environment. I'm now working on integrating our scoring algorithm more closely with Python, which means I need the help of some libraries that don't compile under Windows. Thus, I've finally had to install Cygwin. Of course, it comes with it's share of problems. While I had to setup MySQL under Cygwin so I could get the MySQL gem installed, I wanted to use the MySQL instance in Windows. Another reason for that was because the MySQL build didn't complete properly - there are some problems with some of the extensions it needs under Cygwin. But it install enough after you modify the ./configure command (like this "./configure -without-libedit") and run the "make install" command.

You'll likely wind up with a socket error when you try to connect to your MySQL database on your Windows box if you keep your database.yml file the same. The error you may get looks like this: "can't connect to local Mysql Server through socket '/tmp/mysql.sock'"

To fix this, simply change your host in your database.yml file to point to: "host: 127.0.0.1" or wherever your host is. And that's it, problem solved.

Wednesday, April 15, 2009

Brilliant. The Strategy to Open Up 3 Fighting Fronts with the US


This has the smell of Al Queda. It just does. These pirate attacks appear to be the opening of a third front in our "war on terrorism". If that's even what it's still called? It's actually a brilliant strategy. The US is already stretched thin with our wars in Iraq and Afghanistan and we appear to be the only country willing to do something serious about the pirate "scourge". Fighting a sea war against terrorists is going to be a never ending proposition. They don't play by our rules. And global opinion is making us stick to our dated rules of engagement. It reminds me a little of the image I have from the American Revolution, when the Colonists were sitting in the bushes taking pop shots at the British. This is the same thing our ancestors will be laughing about with us. And of course, I wonder where we're going to get the resources for this? I guess we should just start up the printing presses again. Hell, let's crank out a world war to get the auto industry back in shape - making skiffs for us.

All I know is that if I see 3 speedboats racing towards me, men armed with guns, then I'm not just standing there. That's the line that should have been taken from the get go with these people. Instead, countries have been paying these "pirates" millions in ransom which has just emboldened them more.

How do you fight pirate skiffs with aircraft carriers anyway? It's the same problem we're facing with the insurgent's shoot and run, city fighting techniques. We're just not prepared for this. Maybe Cheney should have been thinking about this during his 8 years as VP. But of course, he's also a shoot and run kind of guy.

My solution? Just like we have with Air Marshals, we should have Freight Marshals. Send 10 SEALS or Navy troops out with every US flagged ship that goes through the Gulf of Aden. Have them specially trained with weapons to fight the terrorists. And have them use their weapons. And other countries can choose to do this or not. There were some 12,000 ships that passed through the Gulf last year. That's 120,000 troops worldwide if you used different troops for every trip. Which you won't. But that's not that bad (and that's 12,000 ships for all countries, not the US).

By the way, I'm a little pissed about these people being called pirates. Pirates hold a special place in my heart. I always wanted to be a pirate, hunting for treasure, sailing a huge wooden ship with a plank. Sporting a wooden tooth and a peg leg (well, maybe not that). Hanging out with Blackbeard and Captain Hook. Or at least Captain Morgan. Please don't call these people pirates! Arrrrrrrggggh!

Monday, April 13, 2009

Tilapia SUCKS! What the Hell is the Deal with this Fish?o


Tilapia reminds me of the emergence of hangar steak a few years ago. I'd never heard of it. I'm 33 and had never heard of Tilapia until about a year ago. Is this some new breed of fish? Some mutant species? Apparently not. It's been around for thousand of years. And it's even mentioned in the bible (not that I read it). Thank you wikipedia.

Like hangar steak, Tilapia has become the latest thing. I wasn't sure why, but suddenly it appeared on menus everywhere. I'd never really thought about it's sudden popularity until this week. See, I'd only had it once before, but in the last week I've had it twice. And I hope I never have it again. The first time I had it this week I was at a restaurant, and it tasted like mold. No kidding. Like they had just peeled some mold off a rock and mixed it in with the Tilapia. It was gross. It reminded me of a trip to Alaska I took about 10 years ago. I went fishing for Salmon, which were spawning. The ones that were near the end were literally wasting away alive (they looked moldy and probably tasted moldy). The second time I had it this week, I accidentally bought it. I swore I'd never eat it again. I was in the store last night getting some fish and I saw some Sole. I like Sole. Unfortunately it looks like Tilapia. I grabbed a package of Sole. Or so I thought. When I got home I realized my mistake. I made it anyway - thinking maybe the restaurant had some bad fish. And guess what? It tasted like mold and was fishy on top of that.

I looked up Tilapia and it's an easily farmed fish - which means, that's why it's gaining in popularity. It has low mercury levels and grows quickly. It's the 9th most popular fish in the US and growing fast. I guess taste doesn't matter. They apparently eat mostly vegetables. Probably moldy vegetables. You are what you eat.

Tilapia actually isn't that great for you as far as fish is concerned. It has an unhealthy relation of Omega 6 to Omega 3 fatty acids (here). Hopefully this will ensure Tilapia gets removed from menus. I'm dry heaving thinking about it.

The fish doesn't even look like it's good.

Should I Worry About Pandora's New Advertising Model?


I was listening to my Pandora station this morning and something happened that's never happened before. My station was interrupted with a commercial. It was a 2 second sponsored ad telling me I could find out how their music genome project works. I wasn't that bothered. It was 2 seconds. And I actually clicked on the video to see how it works. It was really interesting. It took me through a scenario of how I could be shown some Elvis Costello music if I liked a Kanye West track.

I don't mind the occasional interruption if it's this short, but what worries me is if this 2 seconds extends into 30 second spots. Advertising on the radio just seems to be getting longer and longer. I switch the station when ads start because it's so annoying. Almost as annoying as when the volume of television ads goes up during commercials. But this really got me wondering if the offline model of ad supported radio is just too proven to stray from on the internet? Are all online stations going to be ad supported soon? Is there any other model that can make money? Will online and offline radio converge at some point? Wouldn't a radio in your car with different Pandora stations be so much cooler than listening to KFOG? Or WBCN? And sure, you can pipe in some news and talk radio if you wanted.

I'm surprised that audio advertising is really the only way to make money with music stations online. With all this technology going on you'd think it'd be different.

Saturday, April 11, 2009

You Know You're a Dork When...


It's 1PM on a Saturday. It's beautiful out (at least the sun's out). Your friends are playing in a beer pong tourney. And you keep hoping they don't call so you can keep working at the corner coffee shop you're now sitting in.

There's a huge correlation between the ownership you have in what you're doing as it relates to the time you want to put into work. That's why stock options are such a great motivator. Everyone knows stock ain't worth a damn until a company makes it. But it gives someone a stake in what they'd doing. You get 3,000 shares in a company that's got 700M - and well, that's not much of an interest. Which was my signing bonus at Gap... Plus, you're just a cog in the wheel. You do your work or not...nothing changes. That's why so many people in big companies just punch their time cards. 9-5. Because there's nothing in it for them. A lot of people are happy to do that. But not a lot of entrepreneurs. It's not in their DNA.

Point is, I start feeling bad if I'm not doing anything work related...even if its a few hours some days. And even if I don't have much to do (as in, I'm waiting on some things to get finished).

My friend up in Vancouver emailed me last night that he was out at the bars last night. And he couldn't stop thinking about going home and coding. Yea, he's a dork too. Maybe more of one, because usually once I'm out, I'm alright. We started asking each other whether it's our age that's doing this to us or just our dorky nature? I'm thinking it's got a bit to do with both.

Man...not even done this post and I got a call that I'm missing the tourney.

Friday, April 10, 2009

Mozilla Labs - Firefox Personas, Skin Your Browser


I just noticed Firefox Personas this morning. Since it takes me a while to actually wake up, I decided to play around with it while rubbing the sand out of my eyes. It let's you spice up your browser with a skin, just like Winamp used to let you do (is that even around anymore?). Every once in a while I do get sick of the status quo so this is a nice change.

I imagine it's pretty easy to create your own skin, though I haven't really looked into it. It seems like it's just an image file. But there are plenty to choose from that other bored people have already made.

http://www.getpersonas.com/

Thursday, April 9, 2009

Today's Google Post - Google AdSense is down... And Google Voice Arrives! I Already Love GoogleVoice!


I was just going to check my AdSense account because it's a great indicator of site traffic. And I get to see how many cents I earned today. I count in cents (single cents) though some days that's hard because I don't earn anything. Ahh, the life of a struggling blogger/entrepreneur.

Anyway... there's a point. AdSense is down. Never seen that before so thought I'd share it in case anyone else is wondering what's up?

More importantly. As a GrandCentral user, I got an email today that GrandCentral is migrating over to Google Voice. It instructed me to convert my account, which was nothing more than a simple GMail sign-in. And yes, you can change accounts, you don't need an existing Google account Very cool. It's still in beta, but should open up soon.

Here are the additional features they're offering now, from their email:

"In addition to the GrandCentral features you already know, we've added voicemail transcription, SMS support, conference calling, Goog411, enhanced spam protection and low-priced international calling. We have also integrated GrandCentral with your Google Account and your Google Contacts list."

Voicemail transcription? That rocks! I mean...this should kick some serious ass. I've started to use it a bit for a side business...which is very cool, because it keeps my personal number separate. You can see when a GrandCentral number is coming in since your GrandCentral number comes in on your caller id (for AT&T customers at least).

I feel like this is a big opportunity for people wanting additional numbers for businesses (now that phone numbers are portable, it doesn't do as much for regular users that don't care about the Google Voice features). As an entrepreneur/small business owner this is great for keeping things separate - and keeping restrictions on your business line (hours, messages, separate lines, etc). And for conference calling. And for free calling. And for free SMS. And for cheap international rates. I hope this integrates with GTalk soon. I can't imagine it not. And then I hope it kills Skype... because I hate anything owned by ebay.

Ok...so you can call anywhere in the US. And Google Voice will call that number and then ring yours. Free. You can use this for international calls (for a fee) and it will call your cell phone too. Bye bye Jajah. I used to use Jajah a ton when I was living in Hong Kong. If this works internationally, then they'll be in trouble soon. Google is really integrating all this awesomeness into their product. Of course with a ton of crap that gets filtered out when users don't start using it en masse.