Entries Tagged 'world domination' ↓

Overriding Time.now to Control the Server Time

I just recently worked on a project in which I needed to modify what time the Ruby on Rails server thought it was. I was able to change this very easily with the help of court3nay while on #rubyonrails.

def Time.now
  Time.parse("2010-02-30", nil)

With this I am able to change the server time whenever I want! The system was one in which user interface capabilities changed at different times of the month. Obviously I didn’t want to wait 20 days to see something different!

I placed this code snippet in my config/environments/development.rb file so that everything in my application could access it, and it wouldn’t affect the test or production environments. The only downside to this is that you have to restart the server in order to change the time. Of course, in RoR this takes like 5 seconds so it was no big deal for me.

In my specs I used stuff like

date = "2008-01-01"

which of course made it very easy to write effective specs that covered all of my functionality. Thank you RSpec!

Voila, now you too can control time!!

Partnership of the Century!

What happens when two of the brightest minds in technology join forces? You witness the most spectacular technological achievements mankind has ever known!

Reputable sources have already confirmed this event!! John Ford at Aldenta has the story.

So I’m an optimist.

In more down-to-earth news, my brother, John Ford (Aldenta), has partnered up with Glenn Fu for some pretty exciting projects. While I’m not at liberty to share the fact that we’re creating an actual DEATH STAR in order to TAKE OVER THE UNIVERSE, just know we’re having a great time and I’m learning a ton.

We start our days bright any early with a great workout (stretching, weights, running), smoothies for breakfast, and a healthy dose of international (and sometimes local) news to keep our minds from getting too trapped inside the little boxes where we spend so much of our time. After that John does things to make money while I fool around and try to learn stuff. Hopefully in the near (very near) future I’ll be doing more of what he’s doing. Right now it looks like we’re on the right track!

Additionally, since I’m currently in a very low-budget situation, we have the opportunity to try to take on some more exciting (and thus more risky) projects that neither one of us would have been able to attempt alone. I can’t wait to be able to share stories of our accomplishments! Until then, I have quite a bit of learning to do in order to get up to speed. Wish me luck!