Thursday, April 30, 2009

Holy Crap! The Apocalypse is Here! H1N1!


I long realized that I don't buy into hype. Now I realize it annoys me when other people do. This swine flu thing is getting pretty out of hand. Not because I don't think it's an issue. I do. It's because people are going so overboard about it.

I was watching the news last night and this guy was talking about how he hasn't been feeling all that well the last few days. The anchor asked his symptoms and he said he's been tired. So what's this 35 year old guy do? He goes to the emergency room to get checked out. He wants to be safe and make sure he doesn't have swine flu. And he wasn't alone. There were lines of people like him. This is just clogging up the ER so people who really need help can't get it. And it's wasting money. Imagine if we had socialized medicine. Everyone would be there. And... what this guy doesn't realize is that he's exposing himself to more germs than he would have if he had stayed put. A hospital? Germ central.

I just don't get it. I mean, the regular flu has killed thousands of people this year. The swine flu has killed less than a hundred confirmed. Egypt just decreed that they're culling all of the pigs in their country even though there's no link and no reported cases there. If it arrives, it's arriving on the back of humans - so that's 300,000 pigs killed for seemingly no reason. Just overreaction.

Now if we actually analyze why it's been deadly in Mexico and not here, let's just use some common sense and compare the health care system in Mexico to that of the United States. Enough said.

But let's really look at the issue. What do we do about this? It's long been known that flu strains move from species to species. In fact, even the regular human strain of the flu mutates from year to year, making vaccinations useless from year to year (Time Magazine). Part of the problem, according to the article, is that multiple animal species have lived in close proximity to each other and squalid conditions for years. And the body that oversees flu outbreaks doesn't monitor animals. Just humans. So this is a good lesson to setup some better monitoring.

Let's be happy the flu isn't more deadly. And let's relax a little bit. If not - just head down to the ER and get yourself checked out. Maybe you'll catch it down there if you don't already have it.

Friday, April 24, 2009

WindowsError: The requested operation requires elevation


I got this error while installing Pylons for the first time. Pylons a web framework for Python - and from what I've read, the best solution for what we need. Of course, there's Django, which Google AppEngine uses.

Anyway, the error is due to user rights on your machine. I'm sick of Vista requiring me to run things as an administrator or preventing me from running things. I am the administrator. And I'm always logged in, so why does it keep asking me this.

I finally disabled User Account Control. Just go to Control Panel -> User Accounts -> Turn User Account Control off.

Shunning Responsibility - Why Is It So Hard for People To Take Responsible for their Actions?


I was listening the radio this morning on my commute to San Francisco as this professor went on a rant about how obesity is a systemic problem that's a direct result of institutional carelessness. He spoke about how world governments are complicit since they don't do enough to prevent obesity, through regulatory measures. And how they need to step in now and do something. I actually got angry listening to this joker. I wanted to punch the radio. I actually wanted to punch through the radio so I could hit this guy.

Sure there are lots of overweight people who are fat as a result of medical conditions. But how about the rest of the fat people? I'm getting tired of people shunning responsibility for their actions. You want to know why people are fat? Because Americans - and the rest of the world, are getting lazier by the day.

People have a choice to go and eat McDonald's. Nobody is forcing you. You have the choice to super size your meal or add a 98 oz. drink. Or to snack on doughnuts. Or own a deep fryer at home for your fried Twinkies. Or not exercise. Or not eat right. Look at our country. Everyone is looking for a handout... looking for someone else to bear the responsibility of their actions. Why don't we just improve education so people can be more informed rather than bail everyone out every time they're in a pickle? Jesus.

I have to laugh at how fat people are getting blamed for global warming now (here).

Tuesday, April 21, 2009

*** fatal error - unable to remap to same address as parent : Cygwin, Ruby on Rails, System calls


I was trying to run system commands from the Ruby console in my Cygwin environment today (since that's part of how I'm integrating with Python). I was running into a helluva problem. I was getting a fatal error, unable to remap .dll to same address as parent. It took a while to track this down and even longer to actually figure out what is happening.

Let me tell you what you can do if you don't care what's actually happening.

1) Close out of Cygwin (and all cygwin processes).
2) Open a Windows command prompt (start -> run - > type 'cmd' or on vista : start -> type 'cmd' in the start search window)
3) Go to your cygwin bin directory. For me it is c:\cygwin\bin.
4) Type ash
5) Type '/usr/bin/rebaseall'
6) Resolve any errors (I had a warning that went unresolved and it still worked fine)
7) Reboot...and you should be good.

So what actually is happening? Well, in this case, the problem was a result of the way windows manages their .dll's. Windows uses ASLR (address space layout randomization) to manage its .dll's. It loads your dll's into different areas of memory every time you boot your computer. If this gets out of whack then the next time you look for that .dll - you can crash your system. Or if you look in the wrong place, you can crash your system. So how can this system get out of whack? Well, running your cygwin setup program can affect record keeping, especially if the ASLR has changed but Cygwin is holding on to an older copy (this can happen when setup doesn't complete).

ASLR is great for malware or hacker defense. Hackers can't constantly try new addresses for your .dll's without crashing your system.

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.