a day in the pit my view from inside

26Jan/120

HelloBirthday Grows Up, Goes Private

It must have been two years ago that I missed my friends birthday and she was super upset with me. Naturally, I devoted 48 hours to building an app that would never let me forget a birthday. (I think this may have pissed her off even more...)

Fast forward... I've decided to change HelloBirthday so that as of January 25th, 2012 new users will only see a forecast of birthdays and wishing will not occur. This only affects new users; current users you're OK.

HelloBirthday still has the capabilities to automate wishing and I'm letting friends, family, and people who know me to continue to use it. If you want to use HelloBirthday please add it and then e-mail me (mike@thinkeffect.com).

Filed under: Information, Software No Comments
20Jan/120

I hope you’re surfing

The Rush

I've been thinking about how thrilling life can be. One minute you're in a comfort zone without realizing it and then in a flash you're paddling your heart out head-on for a large body of water that's trying to crash down on you. And as you paddle into this wall of a wave your instinctual response, to the sheer amount of fear amongst other things, is to paddle, kick, and dive into the belly of the beast. Just barely scraping past the wave you and your board flop down onto the hard surface water only to keep paddling because you know there is another wave coming; the set had just begun.

A freezing chill runs down your spine but you realize it's just some of the water from that last wipe out. Fuck, it's freezing cold.

But you continue because the feeling of this challenge has never felt better. It's why you put yourself in situations you're never comfortable in, and why you know the devil in comfort intimately. These waves don't care about anything except providing you challenge after challenge with no end in site.

Ride a Wave

Surfing is a lot like entrepreneurship. It's fueled primarily by you and your own will, and encouraged by that group of people in the water with you. It's still somewhat of a dog-eat-dog world but that bond between soloists is stronger than one might think. It's incredibly rewarding. It takes an immense amount of time to do it well but you can start and feel empowered immediately.

Good luck. Have fun. And remember, the company you work for does not define you.

Filed under: Entrepreneurship, Information, Jokes and Stuff No Comments
2Nov/110

What’s New in Rails 3 & What I’m Excited About

Rails 3.1.0 was released on 8/31/2011, and as such marks a great day for the Rails community. For a while Rails felt stagnant (think 2.3.11 to 3.0.1RC) and so this is something I've been looking forward to. As I've been using Rails 3 for over a year now, and I've been following along in the change sets, I wanted to point out some of the features I think are really going to be game changers.

Sprockets, and the Asset Pipeline

Previously done through third party libraries, the Asset Pipeline is a built-in framework for managing your assets and writing these assets in other, some say more friendly languages, like CoffeeScript for JavaScript and Sass for CSS  style sheets. It's a very large change to Rails because it introduces a new mix of options for how you can write your JS/CSS and it moves the serving of these components to the Rack middle-ware. Your asset resources now can be pre-processed, minified, and compressed in one swoop. This process is done by Sprockets. I won't go into any further detail but you should know this is worth reading up on, so go check out the Asset Pipeline introduction by the RoR team. (You can disable this feature if you don't want to use it. So don't freak out!)

Streaming

Although it requires Ruby 1.9x to run, HTTP streaming has finally been added. Part of the confusion I often hear about Rails is why this feature was not there from day one. To be honest, I'm not sure but my hunch is that it didn't make sense in a prototyping stage to have to stream content. Further, it's very very error prone compared to building your response and then shipping it over (i.e. if computational errors occur mid stream you're dead in the water and the page will never finish loading). Further, Ajax helped mitigate this need by loading a light HTML shell and then using asynchronous calls to fetch your users' data. At any rate, I'm very excited for this feature because the last two years of PHP coding has had me used to buffering output and I really do see the value in being able to use streaming to show progress without making lots of asynchronous calls.

JSON

ActiveResource now defaults responses to JSON, as opposed to XML.

jQuery

Is now the default JavaScript library bundled with Rails 3. Further, RJS has been factored out as a gem.

Basic Authentication

Rails 3 comes with a quick and easy way of doing Basic Authentication (Username/Password) in your Controllers. Read up on Base.http_basic_authenticate_with - Check out the example here

Pluralize Names for Models

Yup! You can now set, on specific models, whether you want them pluralized or not. From within your controller class you'd set: self.pluralize_table_names = false

BCrypt Passwords

You now have a model attribute has_secure_password that will take care of password hashing/encryption.

Tagged as: rails 3, Ruby on Rails Continue reading
3Oct/112

State of the Union

It's been some time since my last post. Yeah, I know, that may be a good thing for some of you and bad for others! Either way, I'm back in school temporarily to finish up my last class to get my undergraduate degree. What this really means is that I'm now throwing a new ball into my juggling routine. Will I survive? Eh, most likely. But for those who have been bitten by curiosity here is what I'm up to now-a-days:

I'm still working full-time for Yahoo! as a software developer/advertising analyst. I'll continue my night-time hacks; but these will slow down. I'm completely immersed in my computational models & theory course at UC Santa Cruz. I recently picked up an Ipad2 to begin developing on the mobile platform and have begun working on a game. And last but not least I continue to eat, sleep, and surf.

So there you have it. A breakdown of all that is important to me right now and why this blog may just experience a pause for silence. Who knows, I just might have some interesting things to say when I resurface in a few weeks. Surely, you can expect some exciting news towards December spacer You should follow my twitter account @smasher5 for snippets of interesting (and uninteresting) things.

Katt Williams said life is too fucking short. Yeah Mr. Williams I agree with you. Therefor I say to all of you reading this post, "go outside." (And make your paper booboo)

Filed under: Information 2 Comments
30Aug/110

Resque me with a custom Redis host

If you're working outside of Ruby on Rails and want to have Redis hosted non-locally than this is the command you're looking for:

Resque.redis = '<non_localhost_address>:<port>'

To paint the full picture: You've got Redis running on Machine1.Hostname and your Resque workers on Machine2.Hostname and you need those two wired up. In your Rake file for Resque workers you should add the line of code from above.

One little caveat, if you're told Resque is an uninitialized constant than you just simply need to get Resque into your environment. Here's an example IRB session where I'm using Bundler/Gemfile:

ree-1.8.7-2011.03 :001 > require 'rubygems'
 => false 
ree-1.8.7-2011.03 :002 > require 'bundler/setup'
 => true 
ree-1.8.7-2011.03 :003 > Bundler.require
=> [<Bundler::Dependency type=:runtime name="SystemTimer" requirements=">= 0">, <Bundler::Dependency type=:runtime name="rake" requirements=">= 0">, <Bundler::Dependency type=:runtime name="redis" requirements=">= 0">, <Bundler::Dependency type=:runtime name="redis-namespace" requirements=">= 0">, <Bundler::Dependency type=:runtime name="yajl-ruby" requirements=">= 0">, <Bundler::Dependency type=:runtime name="resque" requirements=">= 0">, <Bundler::Dependency type=:runtime name="ruby-prof" requirements=">= 0">, <Bundler::Dependency type=:runtime name="json" requirements=">= 0">, <Bundler::Dependency type=:runtime name="nokogiri" requirements=">= 0">, <Bundler::Dependency type=:runtime name="fastercsv" requirements=">= 0">, <Bundler::Dependency type=:runtime name="yieldmanager" requirements=">= 0">]

Cool, now we've got our environment and can do what we want. It's not necessary to use a Gemfile, you can manually install your gems and then require them in your Ruby file. But since I have multiple files doing many different things it makes sense to have one common section for inclusion of my packages. I also encourage creating a ruby include file with your Redis setups; this will prevent you from having that Resque.redis scattered in all of your files that access Redis.

Hope this saves someone a minute. More information is in Defunkt's Resque package on Github.

Filed under: Code, Redis, Resque, Ruby No Comments
   Older Entries »

Ephekt/Mike Rose/Smasher5

spacer
spacer spacer spacer spacer spacer

Sections

  • Benchmark (2)
  • Blog Updates (1)
  • Code (22)
  • CSS (1)
  • Designs (3)
  • email (3)
  • Entrepreneurship (1)
  • Hardware (3)
  • Information (22)
  • JavaScript (2)
  • Jokes and Stuff (3)
  • Learning (3)
  • Mac OSX (1)
  • PHP (3)
  • Redis (1)
  • Resque (1)
  • Ruby (6)
  • Ruby on Rails (16)
  • Software (13)

Archives

  • January 2012 (2)
  • November 2011 (1)
  • October 2011 (1)
  • August 2011 (5)
  • July 2011 (4)
  • June 2011 (1)
  • May 2011 (2)
  • March 2011 (1)
  • February 2011 (1)
  • January 2011 (3)
  • December 2010 (1)
  • October 2010 (3)
  • September 2010 (1)
  • July 2010 (1)
  • April 2010 (1)
  • February 2010 (1)
  • September 2009 (1)
  • August 2009 (4)
  • July 2009 (2)
  • March 2009 (1)
  • February 2009 (2)
  • November 2008 (1)
  • October 2008 (1)
  • September 2007 (4)
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.