Learn iPhone development on iTunes U

2010 January 10
by Nick

There are a few courses on iTunes U that offer a great intro to iPhone application programming. If you don’t see iTunes U in iTunes go to preferences and check the box next to “iTunes U”. Now go into iTunes U and click the iTunes U directory and search for “iPhone” and subscribe to the courses under iTunes U.

These courses are videos from the classes and posted online, most of the content is still fairly relevant as well.

Current courses as of this writing:

  • Stanford – iPhone application programming
  • RWTH Aachen University – iPhone Programming
  • UC Davis – iPhone Application Development
  • NJIT – iPhone

Find flights from your city to anywhere

2010 January 10
by Nick

If you like to travel and are open to go about anywhere you should check out Kayak’s Buzz section. Kayak Buzz lets you pick a departing airport such as your current city and then a variety of categories for your destination such as:

  • World cities
  • United States
  • Europe
  • Caribbean
  • Mexico/C. America
  • South America
  • Asia
  • Africa
  • Australia/Oceania
  • Canada

There are a few other options such as max price and if you are willing to have stops or not.  It’s a great way to find travel deals and find the cheaper flights for your next vacation.

Book a flight by only picking your departing airport at Kayak Buzz

Practice active purging

2010 January 10
by Nick

I hate moving. I hate moving the stuff that you haven’t used in forever but you still move anyways because you might use it some day. I also hate junk, or extra stuff.

I’ve been working on picking up a new habit of not buying items that aren’t essential or that I won’t use often. For instance, I love camping so camping items are good buys and I will use them multiple times. Something that is no longer on my list are CD’s, DVD’s and gadgets.

Another habit that I have been working on is active purging, i.e. getting rid of items that I haven’t used in more than three months unless they are a seasonal item.

All of the extra crap you have laying around is just another thing that clouds your thoughts. Typically your junk isn’t worth anything so why not get rid of it or don’t buy it all in the first place.

Living lite and constantly purging gives me several benefits

  • Saves money
  • Less stuff to worry about or think about (Zen Mind)
  • More eco-friendly, less waste

This weekend was one of my purging sessions. I had a carload full of stuff by the time I was done, I know it seems like a lot but most of it was clothes.

  • Three garbage bags of clothes and shoes – the clothes were either old or I just wasn’t wearing for one reason or another. Since I mostly wear my Vibrams and new pair of converse I got rid of most of my other shoes except for a few pairs of dress shoes.
  • An old desktop computer – it’s been sitting in the garage for the past two houses I’ve lived in, it was time for it to go.
  • All of my CD’s – well not all of them since Zia would only take seven of them and for those seven only gave me $12. I brought the rest of the CD’s back home and not sure what I’m going to do with them, probably end up donating them to Goodwill like everything else. Ditch your CD’s, they are the new vinyl.
  • A box full of random gadgets and such – two external hard drive cases(using cloud drives now), an old desk lamp and lava lamp. I haven’t used any of these in quite some time and didn’t really see myself using them again anytime soon.

Go through your garage and your closet, get rid of at least 10 things this weekend.

Declutter your living space, it’s addicting.

Another one of those Bing Vs. Google posts

2010 January 7
by Nick

I don’t typically use bing but I needed to install flash on Internet explorer within my Virtual Machine so I typed “Adobe flash” into the location bar.  This brought up more than the typical google search does. Google typically gives you the most popular pages for that site and a brief intro to the site usually from the meta description.  With bing though for a search for “Adobe flash” you get the customer service number as well as the ability to quickly search the site right from that search result.

Then I decided to try this out on something that is location based such as Best Buy.  A search for best buy within bing is pretty impressive, it gives me pretty much all of the information I would be looking for when I search for Best Buy without even having to visit Best Buy’s site.

With a search for Best Buy on Bing you get:

  • An “Official Site” badge
  • Customer service number
  • The 5 closest best buy locations according to my current location

Cloud based backup choices

2010 January 6
by Nick

Initially I thought there was just dropbox.

Then when I got my G1 I found out about SugarSync since they have mobile apps for all of the common smart phones such as iPhone, Blackberry, Android and Windows Mobile.

Recently I’ve been looking for a backup solution because I want to be prepared in the case of an emergency.  Anything from theft to water on the computer, I want to be able to be up and running as soon as possible and have all of the files I was working on.

It was also important to find something that was automatic. I don’t want to push buttons to make a sync happen, it should just do it’s thing and I shouldn’t have to worry about it. What if you forget to sync your files, then what?  Also, an external hard drive is a poor solution since I can’t access it from anywhere although definitely the fastest.

And of course privacy is a big one on that list, although it’s pretty hard to tell who is the most secure and what they are actually doing to protect your data.

I was going to pick “the best one” in this blog post but I’ve found way too many solutions now and just wanted to list them out for other people who are in this same boat.

  • SugarSync – Pick and choose your folders, up to 250GB storage, mobile apps, sharing available.
  • Dropbox – Seemless integration and sharing options, up to 100GB, great web interface, mobile apps available.
  • ZumoDrive – Up to 500GB, seemless integration via a network like drive, mobile apps, sharing available.
  • Your own server + rsync + lsyncd – For the hacker at heart, do it the cheap way and only be limited by the space on your server.
  • Mesh – From Microsoft, don’t know what the limit is. Provides a feed for collaboration when you share documents with others. Can even remote desktop into a computer connected to Mesh(Windows only). Desktop and mobile apps available as well as sharing.
  • Time Warp – Integrates with Time Machine and backs up to S3, only pay for what you use. Free during beta, $25 otherwise. @callstat(Mac Consulting) referred me to this one.
  • ElasticDrive – A couple people mentioned this although their web site doesn’t sell very well. Don’t have many options or screenshots, free 5gb account.
  • AS3Soft – Console based backup using your own S3 and a java application, not  to sure about this one. $9 and a free trial is available.
  • Crash Plan – Free for personal use, multiple backup destinations, have an unlimited plan and geared towards family plans.
  • Jungle Disk – works with Rackspace and Amazon S3, selective folder backup, can’t tell if it syncs automatically.
  • Spider Oak – Similar to Dropbox, site is nifty, no screenshots. $10/100gb.
  • Backblaze – $5/month, unlimited space. Getting your files seems like a chore, just a zip file or backup dvd mailed to you.

Remote drive access

  • ExpanDrive – More focused on remote connections and drives but a worthy mention.

I really like Time Warp because it integrates with Time Machine but there isn’t a web interface or other ways to access your files. I like Dropbox a lot because of it’s seemless integration but you are limited to 100 GB and that’s at $19.99 where a product like Mozy is $4.99/month.

What are your favorites?

Using Pwgen to create secure passwords

2009 November 24
by Nick

It’s nice to have a fast utility to make secure passwords for you, if you don’t then you become lazy and create passwords like “dog123″ or “qwert123″.

The pwgen command prints out a table of passwords which you can then copy a password from. For security reasons it prints out multiple passwords just in case someone gets ahold of your log files.

Screen shot 2009-11-24 at 4.31.28 PM

pwgen has several options too such as:

  • numbers – by default numbers are included but you can exclude them as well
  • capitalization – you can enable/disable capitalization
  • ambiguous – you can avoid ambiguous characters such as O and 0(zero and ooo)
  • secure – generate completely random hard to memorize passwords
  • symbols – include at least one special character in the password or exclude symbols

You can install pwgen by running
OS X (if you have ports installed)

sudo port install pwgen

Ubuntu

sudo apt-get install pwgen

Once you have it installed then tie it to an alias command such as ‘pass’. For more about aliases check out my post on aliases.
Then check out the man page or you can view the man page online.

Save time with aliases

2009 November 23

There are a lot of commands that I run every day over the terminal. Once I see a command I run more than once a day or more often than usual I usually create a shortcut for it.

Some of these shortcuts are everything from restarting apache, cd’ing to my web root, ssh’ing to a server, etc. Below are a few that I have in my .shortcuts file.

# restart apache
# $ r
alias 'r=sudo apachectl restart'

# I'm used to running gvim and this just maps the command 'gvim' to mvim'
# $ gvim .
# $ gvim directory_name
alias 'gvim=mvim'

# ssh to a common server
# add passwordless login for a faster connection, be careful though.
# $ s
alias s='ssh user@yoursite.com'

# cd into a common client work folder
# $ john
alias john='cd /Users/nick/web/freelance/john.com'

# generate a bunch of random passwords, it's better than go123...
# pwgen is an awesome password generation tool, I highly recommend it.
$ $ pass
alias pass='pwgen -s -n 10'

# open the specified location in finder and highlight it. Helpful for when something would be faster through the gui or you need to view images or pdfs.
# $ o images
alias o='open --reveal'
# 'o' is faster than 'open'
# open web
alias open='o'

# kill a process immediately.
# e.g. kp ruby
# e.g. kp firefox-bin
alias kp='killall -9'

# quickly view the last 100 lines of the apache error log
# $ log
alias log='tail -n 100 /var/log/apache2/error_log

To load your .shortcuts file when you open up the terminal just put this line in your .bashrc or .profile file.

. ~/.shortcuts

Also, you have to use a utility like Spotlight, Quicksilver or Launchbar. Get one of them and use it at least for the ability to quickly launch applications. Hide your dock or taskbar and rely on alt-tab(switch applications) and alt-~(switch windows for current application)

For example, with Spotlight which comes with OS X all you have to do is hit Alt+Space type ‘Fire’ and hit Enter and Firefox will open, no mouse required. Mice are gross and smell, keep your hands on the keyboard where they belong.

Bye Linux Mint

2009 November 13
by Nick

I’ve been using Linux Mint since I got back from Europe(August 2009).  Overall I’ve been pretty happy with the Operating System.

On a day to day basis my must have applications are a terminal, vim, and a browser(usually Chrome).  Sometimes I jump into some image editing software but for the most part I’m editing code and browsing the web.  I mostly use all web apps for anything else that I need such as Tracks for GTD. I’ve even switched to using Hootsuite for Twitter, it’s pretty much a web based Tweetdeck just without the resource hogging.

While the OS is pretty nice overall, there are some little things that just didn’t work.

  1. Printer compatibility is lacking.  I bought a Lexmark printer and installed the Lexmark provided driver.  It worked for a few days, then stopped working.  So I did some googling and found another solution using the z600 driver for another printer. No success after a few hours of compiling and installing the driver software.  A printer should just work, which it did not.
  2. Selecting the audio output device.  When I really need to concentrate I use my big, bulky headphones. Since the headphones are USB based I have to tell the audio to switch from the earphone plug to the USB driver.  This involves going into the control center and going to the sound section and then selecting one of 3 drivers installed for the USB headphones.  Why is there not one? Why can’t I just pick from “Miniplug” or “USB”? On all my previous OS’ this was automatic when plugging in the headphones as it should be.
  3. Disconnecting a dual monitor.  With Ubuntu/Mint to get a menu bar on the dual monitor you have to add a new panel and then add whatever items you would like to it.  Before I knew this, this was probably the most annoying “feature” and I almost dumped it for it immediately.  Also, because without a panel on the dual monitor and a “window list” item any window on the dual wouldn’t show up on a menu bar anywhere.  Also once you right click the panel on the main monitor and select “New panel” it puts that panel on the main monitor, to get the panel to the other monitor you have to alt+click+drag(pretty hard to find how to do this) the panel to the other monitor. When I disconnect my laptop from the dual to take it over to the couch it doesn’t refresh the desktops and figure out “Oh, you disconnected the external monitor, let me readjust things to a single desktop setup”, which forces me to mess with the panels some more, this should just work.

I know that Ubuntu will get it right very soon and they have made some amazing progress already. Afterall, Ubuntu has only been around since late 2004.

I know there are probably some fixes to some of the things I mentioned. I don’t feel like digging and googling around to figure out how to make things work on my computer, I just want them to work.

You shouldn’t be working for your technology, your technology should be working for you.

Desert Code Camp Recap 2009

2009 November 7
by Nick

Just got back from this year’s Desert Code Camp at Devry in Phoenix.  Overall the event was pretty good, got to meet some new people that aren’t at the usual events and listen to topics that aren’t discussed as often.  It’s also nice to have an event strictly focused on coding since I don’t believe there are very many in Phoenix, maybe I’m wrong.

Metaprogramming in Ruby

My first session was Metaprogramming in Ruby by Michael Cowden which was a really good overview of Metaprogramming in Ruby.  He covered topics such as good uses for metaprogramming, bad uses and a general overview of ruby.

I knew there was method_missing, but didn’t know there was method_added and method_removed. method_missing is the function that is called last before raising an error.  Rails uses this to hook into the dynamic finders that it has such as User.find_by_first_and_last_name and many other uses.

Forgot about this trick too, grep your method names or attributes when you are looking for something specific.

object.methods.grep().sort

Michael also brought up another method within Ruby called “undef_method” which is short for undefine method. What that function does is remove the method from the current class. But there’s more to it…

undef_method "calculate" # prevents the current class from responding to that method

In comparison to another method in Ruby called remove_method. The difference with remove_method being that you can still call that method on the current class it is just going to look to the super classes for that method. The method no longer exist in the current class but if that method exists in one of the super classes then that one will be called, in order of inheritance.

remove_method "calculate" # removes the method from the current class and then any call to that method looks at the super classes

The Secret of Easy “Full Stack” Testing with Cucumber & Webrat

Update: Clayton just posted his slides and example code from the event.

Cucumber is phenomenal, there’s no doubt about that.  It has greatly improved BDD and user story implementation with projects.  Clayton did a great job of going over some examples of typical user stories and features with Cucumber.  The key points besides the general overview out of the presentation were about the step Transforms, before/after hooks and tags.

Cucumber has before and after setup hooks that are pretty powerful since you can specify tags to specifically run before and after on.

Hooks

# run before every scenario
Before do
end
 
# run after every scenario
After do
end
 
# only run before sections tagged as "@sometag" or "@anothertag"
Before('@sometag','@anothertag') do
end
 
# only run after sections tagged as "@sometag" or "@anothertag"
After('@sometag','@anothertag') do
end
<span style="background-color: #ffffff;">Depending on your situation you might also want to check out </span><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px; background-color: #ffffff;"><a href="http://wiki.github.com/aslakhellesoy/cucumber/background" target="_blank">background</a> instead of before and after hooks.  Another option too is to use nested user steps which setup a set of steps for a typical chain of actions.</span>

Scrum 101 and Scrum Artifacts

Scrum is a development life cycle process, just like Waterfall is a development life cycle process. There is a huge difference between the two. The Waterfall process involves gathering all of the requirements and doing everything all at once, no user feedback along the way and just hoping that the end product is close to the customers requirements, ick. Scrum focuses on communication amongst key stakeholders within the project, short release cycles, and tons of feedback.

Ken Ward taught three different talks today, the first two being the exact same(intro), the third one focusing on burndown charts and velocity or in normal terms “amount of work complete and throughput of work”. Although thankfully Chris Conrey was there to provide some more insight at a few times throughout the presentation since some subjects were a little fuzzy or done a very archaic way.

Scrum is a heavily covered topic so this is just a brief overview of the session.

The process

Everything that needs to be done for the project is put into the product backlog. A sprint is an iteration of development, sprints can range in time from a week to about 3 weeks at the most.  It’s important to keep the sprints short, Scrum is all about constant feedback and being able to show production ready code along the way.  Instead of just the complete application at the end.  Items are taken out of the product backlog and put into a sprint backlog, this backlog is what will be processed while going through the sprint. Repeat the process and adjust as needed.

The meetings

  • product backlog planning – stakeholders and team involved. Define the goal, define the next sprint goal.
  • sprint backlog planning – Product owner and team. Team decides which tasks/items will go into the next sprint
  • daily scrum standup – no sitting. Each day, same time, same place. What have you done since the last scrum? What are you doing for the next scrum? What is preventing you from doing your work? Not a status meeting, a communication meeting among your team members.
  • sprint review – show what was completed during the sprint, show it to stakeholders and owner. Determine if sprint goal was acheived, if not put items back into the backlog.
  • retrospective – What went well during this sprint? Bad? Improvements?

3 roles

  • Product Owner – key stakeholder, impress this guy.
  • Team – a mix of developers, testers, and UI. Depends on the project what your mix is though. The team should always work together in the same room.
  • Scrummaster – no control, no command, more of a facilitator. Conducts and runs meetings. Finds solutions to any problems the team is having.

Key objectives

  • short release cycles with a usable, shippable product at the end of each cycle.
  • communication & feedback are crucial

Tracks for GTD

2009 October 31
by Nick

Just started using Tracks for my GTD system and I love it.

Tracks is an open source Ruby on Rails application for your GTD system.  You can either install the application on your own server or there are a few companies that provide hosting for Tracks.  I chose the self-hosted route which is pretty easy to get setup and any modifications you want to make or updates are in your hands.

The best part about it is since it’s a self-hosted solution and open source you can modify anything you want.  For instance if you don’t like the display order of something you can just jump into the code and change it.  If you want to add some keyboard shortcuts you can add those in and maybe submit a patch back to the contributors.

Tracks does a great job of utilizing ajax only when it actually benefits the user.  Instead of some sites where they just add ajaxy like functionality to look slick and be pretty.  Tracks is about function which really speaks to the GTD system.  The system is focused around function but the looks are pretty slick too, they didn’t cut any corners there.

Take a look at the Get on Tracks site and also at the Tracks github repository.

Removing Google Chrome Extensions on Ubuntu

2009 October 29
by Nick

Update: Just type “chrome://extensions” into the location bar and that brings up the extension manager

To remove Google Chrome extensions on Ubuntu you need to locate the profile for the current user and delete that extension folder.

Your Google Chrome profile on Ubuntu is stored in ~/.config/google-chrome

The “Default” folder most likely contains your profile information.  Within that folder is an extensions folder.  Go into that folder and all of your extensions will be in there.  The folder’s are named with random alphanumeric hashes, just open up a folder and find the one that has filenames similar to the extension you want to remove.

Some Stoic principles

2009 October 18
by Nick

Just started reading letters from a stoic by seneca, great book. It is a collection of some of the letters that seneca wrote for his friends and leaders. He goes over some really great concepts with all of them relating or a part of Stoicisim.

What difference does it make how much there is laid away in a man’s safe or in his barns, how many head of stock he grazes or how much capital he puts out at interest, if he is always after what is another’s and only counts what he has yet to get, never what he has already.

You ask what is the proper limit to a person’s wealth? First, having what is essential, and second, having what is enough.

Refrain from following the example of those whose craving is for attention, not their own improvement, by doing certain things which are calculated to give rise to comment on your appearance or way of living generally.

Wild animals run from the dangers they actually see, and once they have escaped them worry no more. We however are tormented alike by what is past and what is to come…

adapt yourself to the present instead of projecting your thoughts far ahead. Memory brings back the agony of fear while foresight brings it on prematurely.

Nothing, to the wise man, is a necessity.

What difference does it make, after all, what your position in life is if you dislike it yourself?