ClickOnChris

Christopher G Johnson: programmer, entrepreneur, gamer

ClickOnChris is Web 2.0!

without comments

 have implemented AJAX style comments system. If you click on the ‘Add Comment’ button below you can see it. The difference is that now you are presented with a comments form appears within the existing page instead of a comments form being on a new page, as was the previous behavior. This is AJAX, and it is the technology that people are calling Web 2.0. 
What’s the big deal you ask? By having the ability to only update parts of a web page instead of updating the whole page every time you invoke some function, it makes the browser act more like a desktop application than a web page. The end result is more robust applications served over the web. Think google maps or facebook.

Post to Twitter

Fork me on GitHub

Written by clickonchris

May 9th, 2008 at 9:23 pm

Posted in Ruby on Rails

Chris Johnson Highlights

without comments

In case you didn’t hear, I was drafted by the Tennessee Titans in the ’08 draft. I wanted to share my college highlight reel with you:

Ok, for anyone who doesn’t know me, I’m not that Chris Johnson; its just a coincidence. I like to think I’m fast, but not that fast.

Post to Twitter

Written by clickonchris

May 5th, 2008 at 9:25 pm

Posted in Uncategorized

I am Linked In

without comments

I have created a linkedin profile. At first I thought linkedin was going to be a facebook or myspace ripoff, but I see now that it’s really a great tool for professional networking. In fact, given that I’m studying business administration and that I have a passion for web applications, I think that linkedin is pretty awesome.
View Christopher Johnson's profile on LinkedIn
www.linkedin.com/in/johnsonchristopherg

Post to Twitter

Written by clickonchris

April 9th, 2008 at 8:00 pm

Posted in Uncategorized

Java Project Versioning with perforce+ant

without comments

I recently developed a useful ANT task to automatically increment a version number on your Java project when using perforce as your source control application. This task is intended to be run as part of an automated build (via cruisecontrol). It checks out version.properties and checks it back in after incrementing.
Notes:

  1. The task will look for the following files in the same directory as your build.xml. You should be able to figure out what parameters belong in each file by looking at the task. files: version.properties, buildnumber.properties, p4.properties
  2. In the lines where I print the full version number I have broken it up into two lines for display purposes. In practice you will want to keep it on one line. 

<span style="color: #000080;">&lt;target name="create-label" depends="compile-src"&gt;

    &lt;copy todir="${ant.library.dir}" 
      file="medremote_dev/tools/jakarta-oro-2.0.8.jar"
      overwrite="false"/&gt;
    &lt;property name="p4.properties"
                value="p4.local.properties" /&gt;
    &lt;property file="${p4.properties}" /&gt;

    &lt;property name="p4.port" value="${p4.port}"/&gt;
    &lt;property name="p4.client" value="${p4.client}"/&gt;
    &lt;property name="p4.user" value="${p4.user}"/&gt;
    &lt;!-- must supply password in globalopts when the perforce server uses sessions --&gt;
    &lt;property name="p4.globalopts" value="-P ${p4.password}"/&gt;
    &lt;property name="p4.path" value="{p4.path}"/&gt;

    &lt;echo&gt;p4.path is ${p4.path}&lt;/echo&gt;

    &lt;!-- sync buildnumber.properties and version.properties for edit --&gt;
    &lt;p4sync view="${p4.path}/source/buildnumber.properties" 
      force="true"
      globalopts="${p4.globalopts}"/&gt;
    &lt;p4sync view="${p4.path}/source/version.properties" 
      force="true"
      globalopts="${p4.globalopts}"/&gt;

    &lt;!-- increment buildnumber.properties --&gt;
    &lt;chmod file="buildnumber.properties" perm="ugo+w"/&gt;
    &lt;attrib file="buildnumber.properties" readonly="false"/&gt;
    &lt;buildnumber file="buildnumber.properties"/&gt;
    &lt;tstamp/&gt;
    &lt;!-- Updates the version.properties file --&gt;
      &lt;property prefix="label" file="version.properties"/&gt;
      &lt;property name="new.version.major" value="${label.version.major}"/&gt;
      &lt;property name="new.version.minor" value="${label.version.minor}"/&gt;
    &lt;property name="new.version.iteration" value="${label.version.iteration}"/&gt;
      &lt;property name="new.version.build" value="${build.number}"/&gt;
     &lt;property name="new.version.drop" value="${label.version.drop}"/&gt;     
    &lt;!-- update version.properties --&gt;
    &lt;chmod file="version.properties" perm="ugo+w"/&gt;
    &lt;attrib file="version.properties" readonly="false"/&gt;

      &lt;propertyfile file="version.properties"&gt;
          &lt;entry key="version.major" value="${new.version.major}"/&gt;
          &lt;entry key="version.minor" value="${new.version.minor}"/&gt;
        &lt;entry key="version.iteration" value="${new.version.iteration}"/&gt;
        &lt;entry key="version.drop" value="${new.version.drop}"/&gt;
          &lt;entry key="version.build" value="${new.version.build}"/&gt;
          &lt;entry key="version.date" value="${DSTAMP}${TSTAMP}"/&gt;
      &lt;/propertyfile&gt;

    &lt;echo&gt;Creating Label: ${new.version.major}.${new.version.minor}.
${new.version.iteration}.${new.version.build}"&lt;/echo&gt;
    &lt;p4change description="Increment build number via automatic build" 
      globalopts="${p4.globalopts}"/&gt;

    &lt;!-- open buildnumber.properties and version.properties for edit 
                (even though we already incremented it)--&gt;
        &lt;p4edit view="${p4.path}/source/buildnumber.properties"
            change="${p4.change}"
            globalopts="${p4.globalopts}"/&gt;
        &lt;p4edit view="${p4.path}/source/version.properties"
            change="${p4.change}"
            globalopts="${p4.globalopts}"/&gt;

    &lt;!-- submit properties files to source control after incrementing build --&gt;
    &lt;p4submit change="${p4.change}"
      globalopts="${p4.globalopts}"/&gt;

    &lt;!-- label the project --&gt;
    &lt;p4label
      name="FX${new.version.major}.${new.version.minor}.
      ${new.version.iteration}.${new.version.build}"
      desc="label created during automatic project build"
      view="${p4.path}/..."
      globalopts="${p4.globalopts}"/&gt;
  &lt;/target&gt;</span>

Post to Twitter

Written by clickonchris

April 8th, 2008 at 8:03 pm

Posted in Uncategorized

Class Project Collaboration with a Wiki

without comments

In the Operations Management course I just finished, a group project accounted for a third of the grade. My group was given the topic “Toyota Production System / Lean Manufacturing”. I suggested to the group that we use a Wiki to collaborate on the project.

I installed MediaWiki (the same one used by Wikipedia) on my site and off we were. The wiki did not necessarily determine the outcome of the project(which was a success), but it certainly helped streamline the process. In fact, I think I found a new application for Lean principals – Lean Group Project Collaboration!

You can find the results here: OMIS505 Group Project Wiki 

Upsides of Wiki Collaboration
-mobile, accessible repository for keeping research (links and notes)
-gives you the ability to instantly see the latest version of your project (or the outline in our case)
-you can review what changes were made when and by whom, which introduces some accountability into the project

Downsides of Wiki Collaboration
-no mechanism for uploading files (like a powerpoint presentation)

In case you are interested, the final version of our powerpoint is available here:
Group Project Presentation (5MB)

Post to Twitter

Written by clickonchris

December 17th, 2007 at 8:14 pm

Posted in Uncategorized

Words of a Hawaiian King

without comments


You know, I think he was right.

Post to Twitter

Written by clickonchris

September 28th, 2007 at 8:15 pm

Posted in Uncategorized

Implementing reCaptcha in Your Rails Application

without comments

Recently I started noticing a lot of spam posts on my website. It must be those internet hacker bots! I wondered if I could put one of those fancy image verification things into my site to stave them off. They’re called ‘captchas’ and it turns out that its simple and easy to implement such a thing in Ruby on Rails using the reCaptcha plugin. Here are the instructions I wish I had when I started:

  1. install the reCaptcha gem. I’m using Aptana/RadRails IDE which has a nice interface to install gems, but I hear you can install it via the command line with something like ‘gem install reCaptcha’
  1. Register for public and private keys at recaptcha.net .This is also a good tutorial of how a captchas and reCaptcha works. You will have to add your public and private keys to your config/environment.rb file.
  1. insert the reCaptcha function calls into your code:
    recaptcha_tags() – put this into your®html form to generate the challenge image.
    verify_recaptcha() – when inserted into the controller, checks the data passed from the form to make sure that the correct ‘answer’ was given. returns boolean

Thats it! Add a comment to test it out!

Post to Twitter

Written by clickonchris

September 19th, 2007 at 8:28 pm

Posted in Uncategorized

Are You Ready For Some Football?! (Because I am!)

without comments

Training Camps are finished. Madden has been released. Exhibition games are done. Fantasy Drafts have closed…
The NFL season is upon us. The action kicks off in just two days and I CAN’T WAIT!
Go Bears

Post to Twitter

Written by clickonchris

September 4th, 2007 at 11:56 pm

Posted in Uncategorized

Web host switch

without comments

 have switched web hosts as of today from Axishost to Dreamhost. Axishost was very good, but their spamassasin has been broken for about a month and I couldn’t take it anymore!

I’ve also lowered my yearly hosting costs from $72 to $23(Dreamhost promo code: DOIT). We shall see how Dreamhost measures up.
Update: The switch went pretty smooth, although this was the most complicated one yet due to the fact that I’m using Ruby on Rails and running a photo gallery. The procedure was basically:

  1. Copy Data
  2. spoof new DNS by modifying ‘hosts’ file. This was required to access phpmysql and to test out the site.
  3. Export/Import Mysql databases.
  4. redeploy website.

I can tell the difference with Dreamhost using fastCGI. The site usually loads a lot faster. My only complaint so far is that Dreamhosts spam filtering solution isn’t as good as axishosts. Supposedly I can install a better one but I haven’t gotten around to it yet.

Post to Twitter

Written by clickonchris

August 3rd, 2007 at 11:57 pm

Posted in Uncategorized

Slate Floor Installation

with one comment

Dayna and I just finished installing Slate flooring in our Kitchen.

You can see the rest of the pictures in the photo gallery

Post to Twitter

Written by clickonchris

July 16th, 2007 at 11:58 pm

Posted in Home Improvement

Twitter links powered by Tweet This v1.8.2, a WordPress plugin for Twitter.

Switch to our mobile site

WordPress Loves AJAX