Sunset on the dock, originally uploaded by nshontz.

Vermillion Lake, northern Minnesota

Sitting on my grandma’s dock. I spent a lot of summers up here as a kid, but back then I didn’t appreciated the beauty of a sunset.

I have always been a slow adopter of frameworks. I used to write all my own JavaScript and every PHP app was written from scratch. I liked having the control over the entire project, if something wasn’t working i could easily identify the point of failure because i had a solid understanding over every line of code being executed. After my first experience with jQuery I got right over my hesitations, tho I’m still not a first adopter on every new framework out there.

I’ve been working in CodeIgniter for several months now and have learned a few things.

1. Always have your controllers extend MY_Controller.
If and when the developers of CI decide to change the name of the core controller that all controllers extend you’ll only have to change it in one place. More importantly tho it gives you the ability to keep your controllers a lot cleaner and more narrowly focused. All of our controllers extend one of two custom controllers Public_Controller and Private_Controller (Both of these extend MY_Controller which extends CI_Controller). The Private_Controller handles the authentication so the code is not duplicated in every secure controller. It is not a bad idea (probably a good one) to do the same with your models, you can build in simple update, insert, delete and selects that you’ll have to do anyway.

2. Use Libraries and Helpers.
if you have code that will be used in multiple controllers you need to either put the functions in a helper or create a library to handle it. It’s important. you need to do it. We started using Memcached to help out with page load, and once i wrote it into a library it made creating and managing keys much easier and more reliable as well as simplified integration into new controllers.

3. Use config files.
It took me too long to figure this one out. Initially i put all the config settings in my config/constants.php, it made for easy access to the config variables but inevitably i ended up with a really messy constants.php file. Separating configuration details in config files makes managing and updating them much easier and other developers expect it, and can then implement your code into their CI app.

4. Don’t be afraid to extend the Core.
Extending things like the Log, CI Controller and Router will unleash untold power. That may not be exactly true, but it will feel like it. I overwrote the write_log method in CI_Log and was able to setup custom error logging, while still keeping the stock logging in tact and when i want to implement this custom logging in my application i drop in the MY_Log and the log config file and it’s done.

My Grandmother

I spent 2 weeks of every summer from the time I was five into high school with my grandmother at her cabin on Lake Vermillion, I did a lot of growing up there and will never forget her.

I wrote this to my grandmother for her 80th birthday, which was March 28, 2004

Throughout my entire life the lake has been a place of joy for me.  Every summer that i can remember i have spend my happiest days on the lake. i remember spending countless hours on the pontoon boat fishing for sunnies and learning to knee board behind it.  i remember spending countless hours in the woods behind the cabin chasing frogs and catching bugs, the lake is where i remember growing up.

I remember picking blueberries in those woods and then making a fresh blueberry pie. i can still remember how incredibly good it tasted.

Being at the lake inspired me in my younger years and that inspiration really molded me into the person i am today.  i have you to thank for all of these wonderful experiences like talking me to Spain because that’s where I wanted to go.

You have made such a phenomenal impact on my life and i am forever grateful.

love nick

Obituary:

Virginia Mary Marceau Flann died May 5, 2011. Virginia was born in Belgrade, Minn. on March 28, 1924.

She was affectionately known as Ginny to her many friends and family. Ginny was raised in Minneapolis and married Harold W. Flann on June 5, 1948.

They lived on Minnesota’s Iron Range for many years. Ginny enjoyed sewing, crafts, painting, golf, boating and above all, her friends and family.She forged many special friends that have been a part of her life for more than 50 years.

After Harold’s passing in 1979, Ginny enjoyed travelling to Europe, Spain, Norway, China and Hawaii. She also enjoyed her cabin on Lake Vermillion and her home in Mesa, Arizona.

Ginny found a second love in Les Hafdahl with whom she spent 20 years of joy.

Les passed away in 2007.

Ginny is survived by her three children, Linda (Denny) Nelson, Sun Lakes, AZ; Anita (John) Shontz, Helena, Mont.; and Paul (Cheryl) Flann, Savage, Minn.; she also leaves behind her special grandchildren, Brian Nelson, Scott (Brenda) Nelson, Nick (Jessica) Shontz, Alicia (Drew) Flann Zarges and Lindsey (Matt) Flann Tyson; her four great-grandchildren (Collin, Hannah, Lauren and Cole) knew her and will miss Grandma Ginny; she also loved Les’ children and called them her own; other survivors include Rich (Linda) Hafdahl, White Bear Lake, Mark (Joanne) Hafdahl, Fargo, N.D., Tom (Deanna) Hafdahl, Gilbert, Jim Hafdahl, Virginia, Bob (Karen) Hafdahl, White Bear Lake, and Bill (Judy) Hafdahl, Virginia.

In lieu of flowers, please make memorials to Sunshine Acres, 3405 N. Higley Road in Mesa, AZ 85215. This children’s home was a favorite non-profit organization of Ginny’s. Memorial services will be held at Windsor Park, Mesa, Ariz. and Virginia at a later date.

This will setup memcached to allow connections from localhost (127.0.0.1)

  1. sudo vim /etc/sysconfig/memcached
    • PORT=”11211″
    • USER=”memcached”
    • MAXCONN=”1024″
    • CACHESIZE=”512″
    • OPTIONS=”-l 127.0.0.1″
  2. I had to turn selinux off to allow httpd scripts to connect to the network, i think there might be a better way of doing this but i’m not sure yet.
    • sudo setenforce 0

This is similar to my post on how to do this on Ubuntu, but it’s a little different but a lot easier on Redhat (don’t tell anyone i said that)

  1. download the rpm’s for the oracle instant client (basic & sdk) from http://www.oracle.com/technetwork/topics/linux-amd64-093390.html
  2. copy the rpm’s to your server and install them (sudo rpm -i filename.rpm)
  3. sudo yum install php-devel
    • You’ll need this for phpize
  4. sudo yum install php-pear gcc
  5. sudo pecl install oci8
    1. use default for “Please provide the path to the ORACLE_HOME directory. Use ‘instantclient,/path/to/instant/client/lib’ if you’re compiling with Oracle Instant Client [autodetect] :”
    2. Note the last line “You should add “extension=oci8.so” to php.ini”
  6. create a file /etc/php.d/oci8.ini with the contents: extension=oci8.so, see other files in this directory as examples
  7. sudo service httpd restart

That’s all there is to it. It’s the reason that in 2009 Google pulled down $17,863,013.70 in pure profit a day (wikipedia).  We’ve (We means the University) been using a Google Mini appliance for just about 6 years (It’s been here longer than I have) and it desperately needs to be replaced.  The problem is Google Mini’s are expensive, and not sustainable. Drop $9,000 today and in two years your support will run out, but don’t worry you can just buy a new one!

We decided to look into Nutch an open source web-search software. It works a lot like a Google MIni, you buy a piece of hardware and once setup properly Nutch does the crawling and  indexing.  Nutch showed a lot of promise and i was really excited to be out from under the Google Mini. The issue we ran into with Nutch is that search is hard and isn’t for hardware that is, well puny.  Nutch runs best on a Hadoop Cluster and this is noted clearly in the About documentation.  In our environment getting anything better than a Dell R210 is near impossible so even getting one box good enough to power Nutch just wasn’t feasible.

We finally started looking at Google Custom Search. We talked to some folks from Virginia Tech, who had a lot of good things to say about their experience over the last couple of years. We’ve implemented it, and much like they did we’re pulling in search results from web pages, people and places. The Google Custom Search is free, unlike Google Site Search which is more customizable and because we are a university we can legitimately turn off the ads.

I’m pretty happy with the new setup, especially the price and the fact that we don’t have to support another piece of hardware.

Yo, Check out my post “Hard Apple Cider” over at JoLearnsToCook

While I don’t actually make beer that often, but i should. Today i stopped into the Greenlight in Missoula, they now have two stores on at their original location on Alder and another on Higgins. The original location is now dedicated to gardening and beer making. They have an excellent selection of grains, hops and tools that make getting the right supplies both easy and convenient.

I took a few photos with my droid, not the greatest in quality, but you get the idea.

Greenlight beer making suplies
Greenlight beer making suplies
Greenlight beer making suplies
Greenlight beer making suplies


A Few Tennis Balls, originally uploaded by nshontz.

Some fella’s and I from work put 888 tennis balls on our buddies desk while he was in Europa on his honeymoon.

Recently I picked up a polarizing filter for my DSLR. The fellow at The Dark Room said “A polarizing filter is probably the thing you can buy that will make the biggest difference in your photos.” I think he was probably right, I’ve only just started playing with it and i’m really happy with the results.

While researching what polarizing filters do and how best to use them i came across a great video by DSLR Tips, which I found very helpful. He gives you some great tips on when and when not to use the polarizer and what to look for when you’re using it.

Here are a couple of the shots i’ve taken recently that really illustrate what it can do for your photos.

Unpolarized Polarized
Polerizer Polarizer
Polerizer Polerizer