Posted in: Technology by Steve on November 21, 2010
After so many different posts about Comcast and their horrible service and inability to help my with my bill, I’ve been slowly building up my entertainment devices and different things that will allow me to get rid of cable. The next thing is trying to link up my upstairs network with my downstairs TV. Unfortunately, I can’t run a hard wired ethernet from upstairs to downstairs because I don’t know what’s between the floors to get it through. So wireless-N is the solution I need.
I already have a D-Link dual band router running my wireless network so getting another one of their products seemed like a good idea so I’m not worried about different product issues. I decided to get the D-Link DAP-1522 Xtreme 4-Port GigaBit Selectable Dual Band Draft 802.11n N Duo Wireless Bridge/Access Point
I’ll be keeping my Xbox downstairs and hooking it up to the wireless bridge because I’ve heard bad things about the Xbox wireless adapter. I think this is one of the last pieces to allow me to break free of cable. Once I make a full transition, I’ll have a full blog post on the entire setup with pictures.
Now the last thing to do is to stop watching sports.
Posted in: General by Steve on November 8, 2010
Looks like I’m not the only one fed up with Comcast and other providers:
Netflix is definitely giving us a reason to move on to cheaper alternatives.
Posted in: Programming by Steve on October 30, 2010
So after writing up the tutorial on getting a Linux VM setup, I came across and issue where I couldn’t install gems. I would get the following error message after trying to install any gem:
ERROR: Loading command: install (LoadError) no such file to load – zlib ERROR: While executing gem … (Name Error) uninitialized constant Gem::Commands::InstallCommand
I found the answer in the RVM documentation: http://rvm.beginrescueend.com/packages/zlib/
Execute these commands:
rvm package install zlib rvm remove 1.9.2 rvm install 1.9.2 -C --with-zlib-dir=$HOME/.rvm/usr
This will install zlib in your ~/.rvm/usr directory.
I could then move forward setting up my development environment.
Posted in: Programming by Steve on October 29, 2010
Since Codemasher uses the CodeMash REST API, I didn’t want to bog it down with requests from the website. So I looked up how to use caching with Heroku.
Here is how I did it:
First, edit your Gemfile to include dalli as your cache client:
group :production do gem 'dalli' end
Add this line to your environments/production.rb:
config.cache_store = :dalli_store
Finally, if you haven’t enabled the free 5MB memcache addon for Heroku, execute this from your application directory (command line/terminal):
heroku addons:add memcache:5mb
Posted in: Programming by Steve on October 28, 2010
I run across this error way too much. I try to merge a branch into my working copy or another branch, and I get tree conflicts that I can’t explain. It’s probably because I’m a VCS dummy or because I was doing it wrong at one point or another.
I found this blog post that described how to do branching & merging and it describes a step to resolve the tree conflicts.
svn resolve -R --accept working *
So now, It’s easy enough to just execute this command and move on.
Posted in: Programming by Steve on October 27, 2010
As CodeMash approaches, I wanted to build something that would get me more formally introduced to rails 3. I also wanted to set it up so others could see it and view how I was coding it so I could get some direction.
So I present to you, the Codemasher. It’s a quick and dirty website that returns a random session to attend. It uses the REST API provided from the CodeMash website and is the simplest site I could come up with. I have deployed an example up on Heroku at http://codemasher.heroku.com
I hope to have it working where it remembers the sessions that you didn’t like. Another thing is to set it up to look at the sessions that will happen in the next chunk of time slot(s) so you could look at it at the end of a session and try to find another session to go to.
It was inspired by WTFSIMFD (http://whatthefuckshouldimakefordinner.com) but without the curse words.
All of the code is available on github at http://github.com/underwhelmed/codemasher. Please take a look and see how you like it, and if you would make improvements to it, I’m all ears.
Posted in: Programming by Steve on October 26, 2010
I wanted to do some Rails development on my Windows machine, but I didn’t want to worry about compatibility. So here are my steps to build up my development environment.
First thing is to download an Ubuntu VMWare Appliance. I got my machine from http://vmplanet.net/node/114
Second was to rename the machine – I used the tutorial here http://www.liberiangeek.net/2010/06/how-to-quickly-change-computer-name-in-ubuntu-10-04-lucid-lynx/. Since my server/network naming is based on characters from Futurama, I selected Leela as my rails development VM.
Next was to install git – http://book.git-scm.com/2_installing_git.html, curl and the developer tools
sudo apt-get install git-core sudo apt-get install curl sudo apt-get install build-essential
Next, time to install the base ruby libraries:
sudo apt-get install irb libopenssl-ruby libreadline-ruby rdoc ri ruby ruby-dev
The next step is to install ruby gems and make sure that you have the latest version:
sudo apt-get install rubygems1.8 sudo gem update –system
Now, you’re ready to start getting your environment setup for rails. By default, new rails applications use SQLite3 so we’ll install it and get it ready for use in our applications if we so please.
sudo apt-get install libsqlite3-dev sqlite3 sqlite3-doc
Our next step is to install Ruby Version Manager. This package allows you to set specific versions of ruby (1.8.7 or 1.9.2 are the main versions) and set specific gemsets:
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
Then open up your .bashrc file (located in the home directory, ~), and append the following code to the end of the file:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
Now you can close your terminal session, open a new one, and RVM will be ready for you to use.
There are a few editors that you can use (gEdit, Aptana Studio 3 or even JetBrains RubyMine which is a paid for application). I prefer TextMate on OS X so I use gEdit along with a few plugins to get it to look like TextMate.
That should get you started on your way to get developing on a linux VM, or even a regular PC set up with linux on it.
Posted in: Family by Steve on October 24, 2010
This week has been extraordinarily long for my family. Our son has been sick all week and we’ve been fighting a 103°+ fever all week. He’s very active and we needed to get him to settle down so he does not get sicker. So we’ve not gotten much sleep at all and my wife and I have both missed some work this week. Even after getting him on antibiotics, he had a reaction to it, so we had to go back to the doctor to try another one.
Our doctor wanted to make sure it wasn’t something more serious like pneumonia or something worse, so he sent us to the hospital to get some blood tests and a chest x-ray.
So we had gone to the doctor at 10 AM and it was around noon by the time we had gotten all checked in and were in the waiting room. It’s usually time for us to eat and our son gets a little crabby when he doesn’t get his lunch. Luckily we had brought some fruit snacks for him to nibble on while we were waiting.
After about 20 minutes of waiting, the nurse called our name for x-rays. She takes us back to the room and is talking with him, telling him that he’s such a cute boy and trying to make him feel comfortable. She was doing a good job of it too. We get to the room and she puts him into a special chair for the x-ray and he does so well considering everything that he’s been through (not only today, but all week with a fever and what not). We were about to leave the room and she called us back to give him a sticker for being such a good boy. Little did we know, she also took his teddy bear from him and was putting it down on the x-ray table. I thought she was going to pretend to take one of teddy too, but she actually made us go behind the wall and took a picture. She said she would print it up and then delete it so no one would see it. She got it printed and give it to us to take home in an “official” envelope.
This is what came back:
How awesome is that? We had such a bad week and someone came and did just a little thing to make our day so much better. I can’t say how much we appreciated this. We will definitely remember this hospital visit more for this than for him being sick.
So if you’re not doing the little things to make your customer’s day, then you’re doing it wrong.
Posted in: Programming by Steve on October 23, 2010
With my blinders on, I dove headfirst into learning Rails and trying to fit my existing website into a shiny, new container. The problem was that it would have taken too long to get everything that I needed for my website done in a reasonable amount of time. The customer has been requesting new features and to polish up some of the old ones. If I was to get all of these features accomplished, I was going to need a lot more time to get it done.
So instead of trying to build my own CMS, I am going to use a CMS that already has a multitude of code, layout and experience:
GASP! Blasphemy! A true programmer would never use something like that for a new site, written in PHP, and being all PHP-y and scripty. It doesn’t even have unit testing and you can’t do TDD with it!
Yes, in the past, I would have said such things, but as I’ve learned: if someone’s already done it for you, why spend time trying to do it again. It really meets all of my requirements and I can give the customer a lot of choices when it comes to functionality. If I need to customize anything, it’s an even better opportunity for me to dig into a language that I don’t know much about. Wasn’t that the original reason for learning Ruby on Rails?
So why not WordPress?