tech stuff and then some
categories: code, web hosting
tags: , ,

A few days ago I began setting up a rails app that was in need of some user authentication. A friend of mine recommended looking at @technoweenie‘s restful_authentication plugin and I already had messed around with heroku’s hosting service. Now it was time to combine the two.

I initially installed the restful_auth plugin using the ‘git clone’ method and my app worked perfectly fine on my local machine. However, when I uploaded the app to heroku, I was hitting a few errors. The first error was that my app was failing to launch because it could not find a const named ‘User::Authenticated’ … how’s that possible? I installed the plugin , shouldn’t it just know where to look for it? Well it appears that if you use the ‘git clone’ method to install the plugin, it will not work on heroku. You must install the plugin by running ‘script/plugin install git://github.com/technoweenie/restful-authentication.git’. This will put all the pieces in the correct place. ALSO, be sure to change the name of the folder downloaded to ‘restful_authentication’ .. that is … change the hypen to an underscore. Once I changed that, I re-launched my app on heroku using the command ‘heroku restart’, and I hit a (NameError). Seems the ‘script/plugin install’ command didn’t create an file called user_observer.rb that should be placed in the models directory. I’m not sure if this is a bug at this point but this is the workaround I used:

drop a file named user_observer.rb in your /app/models/ directory and put this code in it:

class UserObserver < ActiveRecord::Observer

def after_create(user)

UserMailer.deliver_signup_notification(user) if user.not_using_openid?

end

def after_save(user)

UserMailer.deliver_activation(user) if user.recently_activated? && user.not_using_openid?

end

end

Once I had this file in place, my app launched successfully and now included full user authentication.

YAY!

category: video games
tags:

This past weekend I decided to play EA’s Fight Night Round 4. So I turn on my xbox, grab my controller, plop the the disc in the tray, and sit back. Must’ve been a few weeks since I had last played Fight Night and my xbox live service reminded me that I had some game updates. After downloading the updates, I noticed something slightly different about the game. Wait what … the update put in ads?

My first glimpse ….

photo 3
Hey wait a minute. That giant Gillete ad wasn’t there before!! Well whatever I can live with one ad …
The first round is done and I notice something new … What is THAT on the sides?!?!?!?!
photo 5
Close up!!!
photo 4
Oh no!!!! There are terrible ads in Fight Night now. This also shows up in between every round. After enduring the barrage of ads, I started up another fight and realized the ads change. This time it was for Microsoft’s Bing!
photo
EA , I don’t think there is a need to make us download an update if all you do is splatter the screen with a million ads. I rather you function on the mechanics of the game and the xbox live side of Fight Night. If there was a DLC to turn off Ads I would gladly pay for it. The new ads are an eye sore and break the flow of the game. It was perfect before!!
Take a note from Skate 2′s in-game ad system. It’s totally fluid. The ads are displayed on in-game billboards and posters. You guys are in the same company. Talk amongst yourselves!
category: human
tags:

I just read Alex Payne’s blog post about moving to San Francisco and it got my wheels moving again on a blog post I started writing about SF. First I urge you to read this blog post and then come back here:

http://al3x.net/2009/10/04/so-youre-moving-to-san-francisco.html

I totally agree with every single thing Alex pointed out. Although I lived in Silicon Valley the past two years, I can totally relate to the troubles Alex sees in the city. It’s natural beauty is completely drowned by a decaying city. I really wanted to like SF when I first moved to the valley … but the amount of homeless people (aggressive ones nonetheless), the safety concerns, the terrible public transportation system, the poorly designed roads, the ridiculous housing costs, and the nature of the people that live there are a complete turn off.

SF just can’t compete with cities like NYC.  That’s all I have to say about that.

category: human
tags: , ,

Image borrowed from http://www.nsti.org/

Living in the heart of Silicon Valley has really changed me in many ways. I gained the experience of working at a very large company with thousands of employees, being able to work on high profile projects, and worked alongside the very best engineers in the world. Unfortuantely, there has always been something …. lacking.

Here are a few observations I made while living in SV:

If an engineer is so smart, why is he working on the most boring thing in the universe?

I really admire super smart people. They are easily able to think abstractly and come up with even more abstract solutions to complex problems. I’m blown away by the amount of man power and resources that goes into creating a physical consumer product. However, maybe I’m out of the loop since I didn’t go to school for engineering, but perhaps some sort of engineering ethics class should be a requirement. For example, an engineer with extraordinary capabilities should aim to solve world problems before creating more stuff to fill up land-fills. It’s almost as though (some) engineers go through engineering school and then are expected to work on really boring stuff. Calling all engineers, WAKE UP!!! I believe in you … go save the world!!! Build the new hybrid car that doesn’t look like a turd on the road. I understand an engineer may get some sort of satisfaction from working on some obscure low-level code, but what kind of selfish punk does that make? If an engineer is extraordinary he or she should NOT be spending all of their time on really mundane stuff. I urge engineers to get out there and make a REAL difference! Don’t lose sight of the fact that you are brilliant and you can use your knowledge to further mankind. For the record, I’ll be the first to admit that it’s a tricky catch-22 situation. Without the work the boring engineers do, the more interesting engineers can’t do their work because they depend on the technology. Something must be done!

Our small businesses of today are the future …
While living in SV, I met a lot of people working in really interesting startup environments. They are doing pretty amazing things with technology.  They are shaping the way we will communicate with each other, the way we will be entertained, and generally speaking, the way future technologies will function. While employees at these startups could easily be working at large companies (from which many of them have come) and live vanilla lives, they instead choose to take the chance. Living life on the edge and taking technology there with them. These are the people that will truly shape our future. I applaud you.

Ass-kissing and being self-righteous can lead to success …
Switching gears a bit. I unquestionably saw this happen first hand. It’s amazing how people will throw away their own dignity just for a pay bump. While I totally believe hard-work and good work ethics is the path to success, ass-kissing and putting yourself ahead of everyone else appears to work quite well in SV. It’s even worse when managers encourage this kind of behavior. Although I never had the opportunity (nor sought out) to be a manager, that stuff would NOT fly under me. Nothing is more disruptive to a team than someone who has ‘gone rogue’ and seeks a leadership position. Aside from knowing all the ins and outs of the business, a true leader is someone who can raise everyone around them to a new level of performance and can consistently provide encouragement and feedback. I’m also referring to the type of encouragement and feedback that doesn’t have to be scheduled in a calendar. It should be natural and an every day occurrence. Needless to say, SV has some serious ass-kissing going on.

Where to now?
SV has seen it’s hay day and I was way too late for the party. All throughout high school, college, and thereafter … I have always aspired to own my business. By living in SV for two years, I’ve gotten a really good sense at how both big businesses and small businesses work. In a few months I will be leaving my day job and will be starting my own Silicon Alley business. It’s super scary and I don’t have a wealthy family to fall back on. Actually my parents are broke. So it is essentially all up to me and the few incredibly smart people I know.

That said, I want to thank Silicon Valley ….
Thanks SV. Thanks for the 10 extra pounds I’ve gained from working a desk job. Thanks for teaching me a bit about business. Thanks for demonstrating what certified grade-A ass-kissing looks like. Thanks for letting learn from the best engineers in the world. Thanks for proving that Bay Area drivers are indeed the worst. Thanks for teaching me that you can achieve anything you set out to do. Thanks for teaching me to always ask the question: “What’s next?”

So long and thanks for all the fish!