logo
  • Jobs
  • About Me
  • Contact
  • Home

Archive for the ‘Uncategorized’ Category

« Previous Entries

Whiplash

Legos and Metallica … how much better can it get? You’ve got to watch this.

1 Comment

Latest Polymorphic Podcast

Am I the only one that was bothered by Craig Shoemaker’s interview with Craig Newmark (craigslist.org)? I was very put off my Mr. Newmark using almost 10 minutes of a 22 minute podcast to stump for Barack Obama. For this podcast, I was interested in learning more about the scaling model for craigslist and what made it a success. Unfortunately, this discussion seemed to get lost in the politics.

I try to stay away from politics on this blog, and I wish that it would also be removed from my other sources of technical information.

Mr. Shoemaker: I enjoy the Polymorphic Podcast and have been a listener since episode 1. Please remember the mission of this podcast, and stay away from presenting highly charged political views on a technology podcast. I’ll get my political news from other sources. Thank you.

1 Comment

RIP George Carlin

No greater comic genius has ever existed. Thanks for your thoughts and laughs.

1 Comment

Contributing to a record

Many may be aware of Mozilla’s attempt to set a world record today for the most downloads of a software product (Firefox 3) in a 24 hour period.

After trying for some time, I was finally able to connect with the Mozilla servers to get my download of Firefox 3 on my desktop. I’ll be installing it shortly. :)

If you’re unable to connect, please be patient and keep trying. Eventually, you’ll get in and contribute to the record. :)

No Comments

My first game console

Yesterday, I finally purchased my first game console (thanks GWB). After a tremendous amount of research and thought, I decided to purchase an XBox 360. Of course, I considered the Wii, but the lack of HDTV output nixed me on that console. The PS3 supported Blu-ray, but this was not compelling enough to justify the price difference for me. With the console, I bought Tiger Woods 2008. I’d enjoyed earlier versions of this game on a PC, but the display and game play on the 360 is absolutely stunning. Wow!

Anyways, are there other games I should be looking at? Rock Band is on my list of games to get, but I was also thinking about Tom Clancy’s Rainbow Six: Vegas 2. I want to be careful to not get sucked in and play too much. I really like to play games that I can sit down with for an hour or two, and then walk away.

3 Comments

DHH at Startup School 08

Yesterday, I sat and listened to David Heinemeir Hansson’s presentation at Startup School 2008. Most people know DHH as the creator of Ruby on Rails, but he is also a co-founder of partner at 37signals, which could very easily be considered a successful startup. This is an amazing talk, filled with excellent insight into what is needed to create a profit.

Hint: you *DONT* have to create the next Facebook or MySpace to be a wildly successful startup. You just have to find something that someone else is doing and do it just a little better. The talk is ~30 minutes long and is absolutely worth your time to watch.

Fair warning: in typical DHH fashion, there are a few f-bombs sprinkled in throughout the talk. You may want to wear headphones. :)

4 Comments

Cappin’ that Stat - Solaris edition

Some time ago, I saw a post on err the blog that detailed how to use Capistrano to inject your site’s google analytics javascript at deploy time. The major advantage to this is that you dont run up your site stats while developing your site. While developing, it’s empty, and when you run a cap deploy, it places the javascript right before the closing body tag. Brilliance, if you ask me … until you try the posted after_symlink task on a Solaris box.

Solaris’s version of sed does not support the -i (in-place) option. You could create a nasty script that does all the intermediate saving for you, but I chose to go a different route … perl.

Perl has some options that can be passed to it which allow it to function on sed scripts. If you are deploying your Rails application to a Solaris environment, you can use this Capistrano task instead:

task :after_symlink, :roles => :app do
  stats = < <-JS
	<script src="http://www.google-analytics.com/urchin.js" type="text/javascript" charset="utf-8">
 
	<script type="text/javascript" charset="utf-8">
		_uacct = "YOUR-TRACKING-CODE";
		urchinTracker();
	</script>
  JS
 
  layout = "#{current_path}/app/views/layouts/application.rhtml"
  run "perl -pi -e 's??#{stats}?' #{layout}"
end

My stats should hopefully be a bit more relevant with this little gem.

1 Comment

CMD-K for searching in Safari

Using Firefox on my daytime PC and Safari on my evening PC (MBP), I’ve suffered a bit of schizophrenia when it comes to keyboard shortcuts. To get to the Google search box in Safari, I would hit CMD-L (to get to the location bar), and then hit TAB to get to the search box. I very much wanted a CMD-K shortcut, similar to what I use in Firefox.

Earlier today, I found how to do this:

  • Open System Preferences > Keyboard & Mouse > Keyboard Shortcuts
  • Click the add button in the lower left corner
  • Select Safari from the application drop down menu
  • Enter “Google Search…” for the menu title (the … is made by clicking OPTION-;)
  • Focus on the Keyboard Shortcut textbox and press CMD-K
  • Select add and restart Safari

Thanks to the folks over at 5thirtyone for this tip.

7 Comments

Generating URLs with ActionMailer

ActionMailer is a very handy class for sending emails from your rails application. However, the problem that typically arises is the sending of links to your site via rails using the url_for method. Acording to the API documentation, this is because the mailer instance does not have any context about the incoming request. The API documentation recommends passing the host to the url_for parameter, like this:

url_for(:host => "www.myproductionsite.com", :controller => :home, :action => :index)

However, when using multiple url_for calls in a model, this can lead to a violation of DRY. Therefore, the typical resolution to this has been to add some declarations to your class, like this:

class Notification < ActionMailer::Base
  default_url_options[:host] = "www.myproductionsite.com"
end

I dont really care for this approach, as it locks my model into operating under the assumptions of a particular environment. I am unable to verify the links in my development or test environments without some string manipulation. A little effort led me to this approach, which so far seems to be much better. Instead of declaring the default_url_options in the ActionMailer model, I’m including them in config/environments/*.rb in this way.

# development.rb and test.rb
class ActionMailer::Base
  default_url_options[:host] = "localhost"
  default_url_options[:port] = 3000
end
 
# production.rb
class ActionMailer::Base
  default_url_options[:host] = "www.myproductionsite.com"
end

I am taking advantage of the environments file to give me the benefits of custom url options based on the environment that I am currently executing in. This is precisely what these files were designed for.

1 Comment

Lazy Web Request: Google Reader and comments

I have been using Google Reader for quite some time now and thoroughly enjoy the feed synchronization that comes from this hosted solution. Additionally, I very much enjoy being able to zip through my feeds. I find myself trying to j and k’ing through other lists of data as well. Unfortunately, it doesnt always work. But, I digress…

The real point of this post is to ask how other people keep track of the comments that they have posted to articles. Currently, what I’m doing is starring the article, and then I go back through to locate the ones I’ve commented on to see if there’s further discussion. This seems *much* too manual, and surely there is a better way to do this.

Here’s where I solicit your help, dear reader… Let me know in the comments how you keep track of articles that you’ve posted comments to and how you keep the conversation going. Thanks in advance for your ideas.

6 Comments
« Previous Entries
Social
  • mattberther on twitter
Syndication
Archives
  • August 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • May 2005
  • April 2005
  • March 2005
  • February 2005
  • January 2005
  • December 2004
  • November 2004
  • October 2004
  • September 2004
  • August 2004
  • July 2004
  • June 2004
  • May 2004
  • April 2004
  • March 2004
  • February 2004
  • January 2004
  • December 2003
  • November 2003
  • October 2003
  • September 2003
  • August 2003
  • July 2003
  • June 2003
  • May 2003
  • April 2003
  • March 2003
Jobs
mattberther.com © 2003 - 2008