My MacBook Pro

This post is just letting some steam out, so there is a lot of text and a lot of links, all because I recently made a very worthwhile purchase. I bought a brand new MacBook Pro laptop and I am more then happy. I didn’t really know what to expect, I was really looking forward to it… however it has exceeded all of my expectations.

The quick specs are that its a Silver MBP with a 15.4in glossy widescreen display with the newest LED back-lightning. It houses a 2GB of RAM and an Intel Core 2 Duo that knock the socks of my previous 512/1.6 laptop. The software takes a larger explanation.

I had originally planned on holding out on buying a Mac until Leopard was released. My plans were pushing forward when I won a bundle of applications valued at more then $500 from MacUpdate and MacHeist. However I had been looking at software to download for weeks before my purchase and the list of free, high quality software is nearly endless. Still, there are always programs you have to splurge on.

I splurged on TextMate, a programming editor that translates into about $55. Its the single tool that I have heard the most about from web developers all around the world. I have to agree with the masses, its a fantastic editor that is grows more and more useful as I get acquainted with the Mac.

On the free end of things I have to mention QuickSilver. I might argue that every Mac user has at least heard of QS as its popularity is nearly as high as that of TextMate. I really appreciate this little app as it really does just make my life easier. It took a few minutes to setup these global triggers for iTunes: ?P to pause/play and ??? to go to the next song. That means from nearly anywhere those key combinations will trigger iTunes. I’m learning more as I go but QS is useful in more ways than one.

For Instant Messaging I thought I would like iChat. I thought it was okay, it certainly was easy to setup and worked great, however it just wasn’t up to my standards. I had heard about a Adium and decided to give it a try. That is an amazing IM program. There are plenty of great themes and almost everything is customizable. Its and incredible chat client that easily synced with my Google Talk account (the only Windows chat client I am willing to use).

However my favorite application so far has been Linkinus. That program has completely revolutionized IRC for me. Chatting in Linkinus is just fun. Its a work in progress and I plan to help out with the development. I am working on scripts, which require me to learn AppleScript, but it is worth it.

A worthy app to mention is Growl. You don’t realize how useful a standard messaging system is until you have used one. Almost every application I have can interface into Growl and therefore I have awesome standard notifications. Just typing this I got a notification that someone logged on Adium!! brb.

Looking for a really nice free RSS reader? Check out NetNewsWire Lite! RSS is fundamental when you are as busy as I am (which I expect you are). Have your news come to you, and link yourself back if you deem the article worthy of a visit. Most of the time I read it all in the RSS reader to save even more time. I sift through about 100 RSS articles each day, some are duplicates and many are short but I’d say that there are at least 5 full articles that I will read. They come from blogs and news sources alike, I currently subscribe to over 70 different feeds.

Common apps like iTunes and Firefox are obvious must haves. Although I will admit that I am interested in safari and I will likely give it a try for just common browsing (as it lacks many of the web development plugins that I have in Firefox). Photo Booth makes excellent use of the built in web cam aptly named the iSight that comes equipped on every MacBook Pro laptop. My recently engaged sister and said counter-part were kind enough to sit in front of my Mac for some pictures in Photo Booth. Half an hour later I was able to find a few serious pictures and I sifted thru another 30 or so pictures with various effects to get a group of pictures to put on my family website.

Now the beta apps. I am excited to try out Flow and I was able to sign up for the private beta, however I have not gotten any response yet. I did meet a nice contact chatting on Linkinus and got ahold of a the Skitch beta. Now Skitch is a really cool tool. I can take a picture of a section on my screen, add some quick features like (text, arrows, etc.) in seconds. That is impressive coming from the mspaint.exe experience, however it is not nearly Skitch’s coolest point. There is a drag and drop portion on the bottom of the app to allow you to quickly make a file in the most common picture formats (png, jpg, gif…). To top things off when you sign up for a Skitch account you are given a profile online. A single button on Skitch uploads the image to your Skitch site storage. That same button can then take you directly to the online image, some more single click buttons will copy the image location or xhtml compatible code and allow you to share the image with anyone in the world. You will be able to do all of this just by watching the 3 minute video included with the download. Skitch is a fantastic app! I’ve got some invites if anyone is really interested I might give one away.

Being a web developer its useful to have a local web server to test your work on. Although I manually installed everything I need to do Ruby on Rails development (ruby, rubygems, mysql, mongrel, and svn) I also downloaded a nice app to make things easy for myself. MAMP stands for Macintosh, Apache, Mysql and PHP and it is just plain simple. MAMP (like Easy PHP for Windows) is a completely isolated webserver with php and mysql. You can be sure that nothing else on your computer will be affected, for instance if you have another mysql database running. A great dashboard that even has phpMyAdmin. I made a few modifications to the default pages to add a quicklink to quickly accesses my web directories, but MAMP’s ease of use is much appreciated. A simple click to turn on/off… what more would I want?

SRS iWoW is an iTunes plugin that adds Three-Dimensional sound. I got it with the plugin but it a very cool plugin. Its enhancements to iTunes’ sound are immediately noticeable and gratifying. Simple to setup and customize you can have some real high quality sound. To be honest you won’t notice the difference until you try it, but once you do you will gasp at the difference.

I have a bunch more that I can write but I am going to finish now and hopefully finish working on my other website so that I can launch it! Goodbye for now.

Ruby – “Oh No He Didn’t Just Do That”

I am sitting at my computer and I have an idea. I want to print out the square of each number from 1 to 200 because I think that it might be useful in solving a problem that I am facing. I happen to know Ruby, and while I was thinking it, I typing this in my terminal:

ruby -e "1.upto(200) { |i| puts i**2 }" > squares.txt

No wait… I typed this:

ruby -e "(1..200).each { |i| puts i*i }" > squares.txt

Perfect, the output went to a file named “squares.txt” where I can easily access it again and again. What were you doing? Was it something like this:

public class Squares {
  public static void main(String[] args) {
    for (int i = 0; i <= 200; i++) {
      System.out.println(i*i);
    }
  }
}

Not to mention the time to compile it... the output did not even go to a file for easy reading in the future. Your counter argument was that my Ruby solution didn't either? Let me do it again, only this time I won't do a terminal one liner (even though its not complex), but I'll write you a full ruby script:

File.open('squares.txt','w') do |f|
  1.upto(200) { |i| f.puts i**2 }
end

Can you imagine what writing to a file would look like in Java? I can't remember what to import, which writer I should wrap in a buffer, and oh my goodness lets not forget about the try catch block if you're too much of a gentleman to allow your main method to "throw Exception." Gasp!

The idea I am trying to get across is that Ruby is an exceptional tool for a programmer. Being an interpreted, purely object orientated, loosely typed programming language has huge benefits for writing short scripts like the one above. If you're unfamiliar with Ruby you were probably shocked to see what the simple script did. You might be a little shocked to see the classic "Hello World" written Ruby style:

5.times { puts 'Hello World' }

Thats right, the Ruby version prints out "Hello World" five times because its so happy! No, there is no mistake above, I did just call a method on the number 5... get used to it. You've heard it all before, "Ruby is Purely Object Oriented." Nearly everything is an object. Numbers and Strings especially! Here is a quickie, how characters are in this sentence?

'Here is a quickie, how characters are in this sentence?'.length

The above Ruby line of code spits out 55. What would you do? Please tell me you really didn't count each letter... Maybe you pasted it in Microsoft Word, went to Tools, clicked Word Count and checked the number of characters. I don't care how you do it, everyone has their favorite ways, my favorite is the fastest and most convenient way. Ruby is the answer. It has eclipsed my expectations when I started learning it and now I want it to blow your mind.

Heres something that might shock you. I'm going to put a method right into the String class and then I'm going to actually use it from a String:

class String
  def exclaim
    self + "!!!"
  end
end

puts "Ruby is fun".exclaim

The script, as expected, prints out:

Ruby is fun!!!

This is my first post about Ruby, and its meant to be harsh. I want you to be a little bit shocked, a little embarrassed, and most of all a wee bit interested. Because if you give Ruby a chance, you won't regret it. I will post more about Ruby soon, so if you don't already know Ruby then sit up straight and click on this link to learn Ruby in just 15 minutes:

Try Ruby - In Your Browser

If you try that link you will be presented with the interactive ruby prompt, the same prompt where I typed in my Ruby code and received instant feedback. The mastermind behind the above is also the author of the first tutorial listed below and a developer of Hackety Hack, a really neat Ruby starter kit. Its aimed at teens but I suggest that you download it because of these quick benefits:

  1. The same "Try Ruby Tutorial" is Built In
  2. A Great Ruby Cheat Sheet
  3. Extra Quick Tutorials
  4. File Organizer for your Ruby Scripts

After you get your feet wet from the above take a look at these Ruby tutorials which are themselves unlike any other tutorials you have ever read:

Why's Poignant Guide to Ruby - The most talked about Ruby Tutorial ever written. No description I can put here can describe it. Just know that reading this might change your life... well maybe not your life but at least your perspective on what a technical tutorial can be.

Ruby's Homepage - You were probably wondering when I might mention where you can actually download Ruby. Here is the home page for all things Ruby. Download it and start one of the tutorials from this website and in 30 minutes you will have a new favorite programming language.

Mr. Neighborly's Humble Little Ruby Guide - Another great tutorial that gets deep quickly. Not as loose as "Why's Guide" (but what else is?). Still this tutorial tops all the Java tutorials I have ever read.

There are so many links that I could throw at you but lets face it... if you take a chance with the 15 minute Ruby tutorial, then you will want to know more. These links give you everything you need to get started and days of joyful programing and hacking. Its your ambition that will take you further. Have a safe journey!

search