Coderguy’s Blog

Thoughts on code

About

Hello, my name is Daniel Ice. I am a software developer in the Dallas, TX area. I enjoy learning about new technology. I mostly focus on PHP and Ruby on Rails.

I was working on a 404 page today.  The pages that detected the 404 and routed it to the 404 page, would try and set the $_SESSION['404'] variable.  After setting the variable I was able to use it on that page.  However, after the redirect the variable was missing.  I could set other variables, and they would remain from page to page.  I put in some extra debugging and received the message:

Notice: Unknown: Skipping numeric key 404

This lead me to rename my variable to $_SESSION['url404'], which would stay set on the redirect.  I have not found any documentation that says that numeric keys are illegal for sessions vars, but I believe it to be the case.

Hope this saves you time in your PHP coding.

Here is nifty little tip.  If you need to have your command line MySQL autocomplete enabled or refresh the just type \# at the command line.

mysql>\#

This is great for those times when you creating a lot of tables.

As new versions of SVN come out, I enviably run into the error message:

svn: This client is too old to work with working copy ‘.’.

I have spent countless hours looking for a good way to upgrade the SVN client on my Mac. The offical SVN page, includes links to MacPorts and Fink versions. I don’t want to install all of that just to upgrade my SVN. I just recently noticed that they also had a link to a company that provides a nice simple installer to upgrade your SVN client on your Mac.

Here is the link: http://www.open.collab.net/downloads/community/

BTW: You don’t have to fill out to register to download.

So I have been working on a new product for affiliate marketers.  In designing this site I started with Search Engine Optimization (SEO) in mind.  My goal in making SEO a key value was to get to the top of the search engine for relevant terms.  However, through the process of learning about SEO, I came to understand that getting to the top of search engine results was only one of many benefits that you get from SEOing your site.  Lets explore what SEO is and how it can help you make a better website. Read the rest of this entry »

Great Intel Commercial

May 15th, 2009

This is a pretty funny commercial by Intel.

Rails Conf

May 15th, 2009

I have been watching the videos of RailsConf2009.  I always enjoy DHH’s keynote.  Like most of his talks DHH explained the philiosphy that makes up rails before explaining anything about the technology.  He went through a brief history of Rails.  The point that really got me was that all of the bad press really only had about a 48 hour life cycle.  Often times we forget that while people like to make stuff sound like the end of the world.  If you have a good product, you will be able to ride out these storms, even though they feel very intense.