Tuesday, May 26, 2009

Damn I'm Annoyed Today. Gay Marriage. The Link. And The Taliban.


I'm driving home today from San Francisco. I have time to think. And I begin to ruminate about 3 things I saw on CNN.com this morning that really got me going. The first is this gay marriage ban that was upheld by the California State Supreme Court yesterday. The second, the monkey they've found which proves evolution. And the third, the Taliban seeking to return to their peace deal in Pakistan. I'm sorry about my points of view in this post. While they are mine, I usually try not to engage in political or religious discussions. They rarely go well. But I couldn't resist today.

Let's start with the gay marriage ban (here). I just don't get it? Not in California anyway. I mean, I don't care how you feel about homosexuality in terms of whether you agree with or not - that's NOT the point. But to put a law on the books to ban it, to remove people's civil liberties is beyond me. It reminds me of the Civil Right's struggles of the 50's and 60's. Not that I was around, but how is this any different? And 50 years later I think most educated people will agree that granting civil rights to all people was the right decision. Apparently for anyone except gay people. Look at it this way, I don't agree with Anna Nicole Smith and that oil tycoon's marriage, but I'm not about to propose a law opposing it. It's a decision that's not hurting anyone else and something two people choose to do - so stop wasting time debating it. It shouldn't be up to you. Unfortunately, some of you will argue that the state voted for it with Prop 8. And I ask this: Do you really trust that just because a majority of people voted for it, that it's the right thing to do? If there was an all white town in the deep south, run by the KKK, and they voted for killing all Jews (or at least denying them their rights), is that ok? And if you look back before the Civil Right's Movement, I'm sure a majority of people would have voted against it, were it up to a vote. That's why there's a Supreme Court, an Executive Branch, and The House/Congress. It's checks and balances.

Then there was this story about finding the 47 million year old fossil remains of a monkey that happens to be the missing link between humans and monkeys. It basically proves Darwin's theory of evolution. And boy am I surprised that evolution may actually be proven after all these years (note the sarcasm). What really catches me about this story though is the implication it's going to have on creationist religions. How are people going to twist their religious stories so that it becomes compatible with evolution? And what are those people who have proposed teaching creationism in school going to say? I can't wait for the day when those people will be silenced. To me, that's brainwashing. And this all links back to that first story about gay marriage. If everyone who is opposed to gay marriage is opposed because of their religious beliefs (ie: the Bible or whatever text it may be), then hopefully this monkey link is going to damage a lot of people's belief in that written word. Unfortunately, instead of embracing science, there will be a debate about the validity of this scientific proof. And we'll go on believing a book that was written by unknown people 3 thousand years ago and more.

The last story I read, which doesn't really have anything to do with the previous two, is the peace deal that the Taliban is seeking in Pakistan (here). Basically, they had a peace deal in place that enforced Sharia law in the Swat Valley in return for peace from the Taliban. The deal broke down when the Taliban decided the Sharia law wasn't strict enough, even though it had already forced women inside and closed schools to girls (among other things). So the Taliban moved into Bruner district and took up arms, some 60 miles from Islamabad. And Pakistan said hell no. And has been pushing them out. Now that the Taliban is losing, they want that peace deal back. I say, screw you Taliban. Nice try. And I really hope Pakistan doesn't give in. Because, just like in Afghanistan, the Taliban will regroup and then come back when they're ready. How do you trust a group like this to uphold a peace agreement they already broke?

Thursday, May 21, 2009

More Freebies - How To Get Free Stuff: Part II


I thought I'd follow up my post yesterday with some more free stuff today. First of all - let me warn you that getting this free stuff sometimes takes a month or so. But that's part of the fun. You totally forget about things and then shazaam, there's a gift card!

There are a few sites I frequent which actually have you test products. It's great, because you get these products either free or at seriously reduced rates. The best site in this category is BzzAgent. They're a word of mouth marketing company and they have a very active user community.

I joined over a year ago and some of the things I've received: A Norelco razor, Gift certificates for Chili's and Boston Market, a video game system, and my favorite, a laundry steaming system called the Fabric Freshener (here). That thing has a $219.00 retail value. How can you not love it?!

BzzAgent is one of the few product testing sites that lets anyone sign up. The more you contribute, the more products you're offered to test. Essentially, you join these campaigns. They send you items. And you write reviews about them - positive or negative. You have to spend some time on their site monthly to increase your status and to improve the number of products you test, but it's actually fun too.

Wednesday, May 20, 2009

How to Get Free Stuff - Part I


In the last two years, with minimal income, I've become quite adept at getting things free. If not free then at least at heavily reduced rates. I thought I'd begin to share some of these tactics with you. Some of these tips are going to take more of an investment than others, but they're all worthwhile if you're in a situation like mine.

I'll start by pointing out the most basic methods. In subsequent posts, I'll go into the more in depth tactics.

Free Websites - these are websites that give you daily freebies or special deals on a number of different items.

My go to websites. There are two that seem to handle pretty much everything.

FreeStuffTimes: This site is updated by the author several times daily. They list freebies that are generally available at that given time. And some expire quickly - so it's good to check this page a few times a day. Now don't get obsessive about it. I usually just check it every morning and scan the freebies. Some of todays freebies: Free VOIP headset, free magazines, free drinks at Corner Bakery. But they often have free gift cards (I've received several $10GC's for Starbucks). Also - I just got a free Gillette Fusion razor in the mail yesterday. Very worthwhile site.

Now this is the mother lode....

SlickDeals: Slickdeals is a forum where people post deals they find. It has an incredibly active user base and there are often tens of comments about particular deals. Especially whether the deals are actually a good deal or not. The deals are also rated here. It will take you a little while to familiarize yourself with the site. They also have a freebies section that's worth hitting up daily. I usually just scan the 5 star rated deals. Act quickly, because the volume of visitors to this site is so large, the amazing deals often end quickly. Their freebies are under Forums --> Freebies. Some of their great deals today - $20 GC to Starbucks, Wedding registry freebies, free aquafresh sample.

Additionally, Wal-Mart is always giving away samples (here). Today they have Prilosec samples, sun tan lotion, women's products, hair care, etc.

If you're like me and love getting packages...signing up for freebies is a great way to feel the love.

Tuesday, May 19, 2009

I Hate To Say It. I Love Apple. I'm an Apple Fanboy!


For my whole life, I've resisted. As a boy, I hated Apple. Their smug one button mouse. And their proprietary platform irked me. I felt it was to their detriment. The community couldn't become involved without the hands of Apple smothering them. But they retained an avid user base. And with the help of their arch nemesis Microsoft, they survived (here). Years later Apple learned a few lessons. They opened up their OS and opened up their iPhone to the masses, allowing users to create and share their own work.

But part of their core has remained the same. Their get what you pay for mentality. And pay you do. Apple products sell at a far greater premium than competing products. But like I said, you get what you pay for. Their commitment to their customers is exemplary. And it's this mantra that's made me a true fan along with the millions of others.

How I became hooked: I've been having difficulty with my iPhone for the past several months. Spotty reception and hanging software are but a few of the disruptions. I've spent a significant amount of time talking to both AT&T and Apple tech support. And Apple's tech support has so overshadowed AT&T's that it's not even a fair comparison. Apple's employees are so knowledgeable and understanding that I almost feel bad requesting their time with trivial matters. I feel compelled to thank them after every conversation. And if you know me. That's not the usual treatment that customer service reps get.

This past weekend surpassed even my greatest expectations. When I used the volume buttons on my iPhone, the volume graphic stayed on the phone, indefinitely. It would never shutoff. I decided to take my phone in to an Apple store. I made an appointment, because it was so damn easy to do online. I met with an Apple rep at their Genius bar, right on time, and he tried to fix the problem by blowing some air through the phone. When this didn't work, he didn't even have to think. I heard 5 words I never thought I'd hear without an argument and some kicking and screaming. "Let's just swap this out". What did you just say? Are you serious? You're giving me a new phone and you didn't exhaust every last alternative? You didn't make me reinstall the software, turn the phone on and off a hundred times, and throw it against the wall first? You didn't treat me like a 5 year old?

It took all of ten minutes. I have a new phone. Apple has another $69 from me because I extended my Apple Care. And they have a customer who's so happy that he's sharing his love with Apple to the world. Worth it? You bet. It'll probably cost them a few bucks to refurbish that phone. So, net, they're up about 60 bucks. And a whole lotta goodwill.

Monday, May 18, 2009

Wolfram Alpha Launch - It's Pretty Awesome!


Today is the official launch of the Wolfram Alpha. It's a search tool based entirely on Mathematica, the software developed by Stephen Wolfram and colleagues over the past 30 years.

"Our goal is to accept completely free-form input, and to serve as a knowledge engine that generates powerful results and presents them with maximum clarity."

In reality, this search tool aims to answer any systemic query or really any objective question, even if it hasn't been asked before. It does this with a large repertoire of algorithms and natural language tools as well as numerous modeling technologies.

This tool is incredibly powerful. And it's pretty well done. And remember, it's still in its infancy. I have high hopes for this... though I'm still puzzled as to who will be the main benefactors. It's not really a Google type search tool for the masses. It seems to be more of a research assistant. So surely it's going to benefit scientists, mathematicians, researchers, et al. You're not going to find hotels on Maui or airline flights. But you can find computations for complex math.

I just typed in derivative of 9345x^2 2x - and it returned the answer, along with graphs. Pretty f'in impressive.



Check it: "As of now, Wolfram|Alpha contains 10+ trillion of pieces of data, 50,000+ types of algorithms and models, and linguistic capabilities for 1000+ domains. Built with Mathematica—which is itself the result of more than 20 years of development at Wolfram Research—Wolfram|Alpha's core code base now exceeds 5 million lines of symbolic Mathematica code. Running on supercomputer-class compute clusters, Wolfram|Alpha makes extensive use of the latest generation of web and parallel computing technologies, including webMathematica and gridMathematica.

Wolfram|Alpha's knowledge base and capabilities already span a great many domains, and its underlying framework has the power and flexibility to support ready extension to essentially any domain that is based on systematic knowledge."

Friday, May 15, 2009

So That's It Chrysler and GM?


Oh boy, what a surprise to wake up to today. GM will be closing about 1/6th of their dealer network in 2010. But that's just the tip. They're looking to cut 40% by next year, which I assume means they'll just announce it by next year. Chrysler is cutting about a quarter of their dealer network.

So let me get this straight. We gave the auto industry billions in order to save it and the jobs that come with it? And now they're cutting lots and lots of jobs? Maybe they're saving some jobs by cutting others. Whatever the case... these guys are downsizing and restructuring. Why couldn't they do this without 40 billion in taxpayer money?

This sure sounds like it's the golden ticket. GM thinks so too, "GM also acknowledges that its long-term decline in U.S. market share will continue as a result of the smaller network of dealers".

Hmmm.... that's smart then isn't it? Sounds like the perfect solution to all of their problems. Maybe they should downsize their employee base first. Restructure operations. Get rid of union pay. Just a few things I thought of in the last 30 seconds.

Flash, ActionScript, and Rails 2 Integration with SWFObject


I finished integrating our Flash Map into our Rails application. It was a bit tricky since I hadn't worked with ActionScript or Flash before, but in the end it all actually made sense.

The first thing I did was use SWFObject to embed the Flash Map (swf object) into my rails view. SWFObject is a javascript library that handles multi-browser support for flash. It really takes the heavy lifting out of implementing flash from the client side. I highly recommend downloading the js libraries (here).

In your view, simply include the js file:
<script type="text/javascript" src="/javascripts/swfobject.js"></script>

You can then display your flash object like this:
<script type="text/javascript">
flashVars["authenticity_token"] = AUTHENTICITY_TOKEN;
var flashParams = { menu: "false"};
var flashID = { id : "flashObject" };
swfobject.embedSWF("/path_to_file.swf", "flashObject", "550", "400",
"9.0.0", "expressInstall.swf", flashVars, flashParams, flashID);
</script>

That will display your Flash object in the DIV following the path_to_file.swf. So this will display the Flash object in the flashObject div in your page.

There are some important points to highlight. The flashVars contains variables you can pass to your ActionScript. This is important with rails because you NEED the authenticity token in the ActionScript so that your application can validate the request. You can certainly turn this off with a before_filter, but I do not advise it. The AUTHENTICITY_TOKEN is a parameter I set in my application.

If you want to use the before_filter to turn off login or authenticity validation, use this:

skip_before_filter :login_required, :check_new_user, :verify_authenticity_token

In our case, we also needed to pass flash variables to our ActionScript from the server. Without AJAX, your JS cannot get values from the server - because it's client side. In order to handle this, we used a rails "javascript_tag" to populate the flashVars with our values on the server side. You can do this like so:

<%= javascript_tag "var flashVars = { user_id: '#{@user.id}' };"%>

Or populate it with whatever variables you want.

In the ActionScript, you'll need to read in these parameters. You can do that like so:

userId = this.loaderInfo.parameters.user_id;

Of course, you'll have to pass the auth token back to the rails app as well. You can do that by appending the token to the URL:

http://your.url.com?authenticity_token="+authToken"

Just grab the auth token the same way you just grabbed the user_id.

Enjoy.