This is why we need less features.

I cam across this interesting image recently, it’s Microsoft Word with all the toolbars turned on.  This is exactly why we should only include the relevant features in our code and not dump in every single thing that may seem like a good idea.

http://www.codinghorror.com/blog/images/word-all-toolbars-small.png

You can edit this ad by going editing the index.php file or opening /images/exampleAd.gif

How to SCP a file.

I had to move a file from my OSX laptop to a Linux box, while using a FTP client to do it is easy, there is an even easier way.

From the command line just use the SCP command. “Secure Copy”

scp examplefile yourusername@yourserver:/home/yourusername/

Another method a friend of mine showed me is the following:

cat file | ssh user@someserver.com "cat - > file"

I kinda agree with Microsoft.

Usually I have a tough time agreeing with Microsoft’s philosophy, but this nice financial-looking guy is making sense to me.  I think Apple should do a subscription service for iTunes, makes sense…  Anyway watch the commercial.

What’s the current URL?

Have you ever needed to know the URL of the page that you are on in your Rails application.  Well, it’s very easy to find that information.  Simply call the request_uri method on your request object.

Like this: <% page = request.request_uri %>

You can also get a ton of other useful information about the page you are on by calling some of the other methods on the AbstractRequest object.

Beginning iPhone Dev

A few of us at work started to go through the iPhone class from Stanford, it’s very detailed and well taught.  Here’s the link to all the slides and assignments:

http://www.stanford.edu/class/cs193p/cgi-bin/downloads.php 

Another very help site is Apple’s Dev Center.

How to use Sphinx with Rails

I’ve been working on a little side project that requires me to find out where in my area are the best kabobs.  This is what I’m using.

RailsConf 09: David Heinemeier Hansson, “Rails 3 …and the real secret to high productivity”

David had some great points; everyone complains that they don’t have enough time to finish a project but that can be a good thing. Not having enough time keeps you focused and on track, it makes you do the important tasks and leave behind the unnecessary bloat. I think this advice is very good in general too, I found that when I was in college and working at the same time I was more productive then some of my friends that were only going to school, because I knew that I had less time and I needed to be focused and productive. If David can create Basecamp in 10 hours a week while going to school and working, I’m sure we can do the same! No excuses.

Segmentation fault while installing the Rails Gem

I recently upgrade my Media Temple hosting account from the Shared Hosting (Grid Server) to the Dedicated Virtual hosting.  So far I’ve been very happy with the added performance and freedom to install anything that I wish.  But I did run into a minor problem when building my deployment environment.  I had to install Rails so I did the normal gem install rails command. Poof!! Ran into a nasty error that I hadn't seen for some time now, since college really.  SEGMENTATION FAULT!  Which generally means that you have run out of memory or you don't have enough memory to complete the current task.  http://en.wikipedia.org/wiki/Segmentation_fault

# gem install rails
Attempting local installation of ‘rails’
Local gem file not found: rails*.gem
Attempting remote installation of ‘rails’
Updating Gem source index for: http://gems.rubyforge.org
/usr/local/lib/ruby/1.8/yaml.rb:133: [BUG] Segmentation fault
ruby 1.8.6 (2007-03-13) [i686-linux]

To fix this little annoyance all you have to do is reboot your DV, pretty easy with the Media Temple interface, just click on the “Reboot Server” icon on the dashboard.

Going to Ruby Nation / June 11-13

I’m going to Ruby Nation again this year, last year was a blast! Really learned a lot and met some very interesting people. There are a bunch of really great talks, I’m especially interested in these three:

David Medinets presents “ActiveScaffold
ActiveScaffold is a tool that produces on-the-fly scaffolding that looks much better than the default Rails scaffolding.

Mark Cornick presents “Code Stinkers Anonymous: Learning To Write Better Code And Love Refactoring”.
He’ll talk about how he learned to program, how going pro exposed flaws in his coding style, and how he’s working to improve his code quality, sharing some of his old stinky code, the better, refactored versions, and the lessons he’s learned in.

Hal Fulton presents “Reia: The Next Big Thing?”.
Reia is a language still in its infancy but showing great promise. It borrows heavily from Ruby, as well as from Python and Erlang.

*Snippet borrowed from Ruby Nation website