| Subcribe via RSS

College Pick ‘Em: Coin Toss Version

August 17th, 2010 | No Comments | Posted in Bin

I decided as random as the outcome of collegiate football games, I’m going to leave it up to fate to decide my picks.
More »

Reading #hash Variables in URI

June 1st, 2010 | No Comments | Posted in Bin

Most of the time when you have a # (hash) symbol in the URI, the functionality is simply to point to an anchor on the page. This is handled by html and the functionality of your browser. In more advanced situations, this variable can be read by JavaScript to do other things like change content or tabs, or maybe even use some fancy script to scroll you to a point on the page. In the case of usability, knowing the hash variable in your PHP code can be extremely useful.

More »

My Experience with NetBeans

May 18th, 2010 | 5 Comments | Posted in Bin

I recently wrote about my switch to phpDesigner as my IDE. Since the article, I have received several comments/feedback telling me I should try NetBeans. I had already installed it once before and didn’t like it, but I couldn’t remember why. So, I thought I’d try it again, except this time, document my experience!

My favorite feature about phpDesigner, and the primary reason why I use it over any other IDE is it’s ability to take files in my project, wrap em all up and create the intellisense for all my classes, functions, methods, and constants, INCLUDING phpDoc comments in my code hints. And as I mention in my article, phpDesigner does this really fast! Even when reading a project off a network drive.
More »

Extended CodeIgniter Loader Library

April 9th, 2010 | No Comments | Posted in Bin

I’ve been trying to make contributions wherever I can to CI and one handy thing I’ve been using is an extended CI Loader Library. It adds 2 features:

1. The ability to alias auto-loaded models and libraries.
2. The ability to load a model or library from another CI application on the same server.

Here’s the link to the forum post with all the details:
http://codeigniter.com/forums/viewthread/151827/

If you just want the code, here’s the link:
http://solepixel.pastebin.com/6DHpxXuz
More »

Longest Spades Game Ever!

December 3rd, 2009 | No Comments | Posted in Bin

The past few months or so, I’ve been playing Spades online at MSN Games Zone. I like it SO much better than Yahoo. Well, they’ve got this version called Whiz. Basically the rules are same as normal Spades, however when you bid, you must bid either the number of Spades in your hand or Nil. I really enjoy this game, almost a little too much. So tonight I got in a room with 3 others and little did we know what was sort of game we had gotten ourselves into. I can’t remember the stats exactly, but it was a 2050 rated player paired with a 1600 rated player, vs. 2200 and 1480. This game went 50 rounds of rediculous back and forth setting and missed nils. It took so long the other 3 players dropped out before it ended. I pasted the scores here.
More »

Nested Sub-folder Controllers in CodeIgniter

November 1st, 2009 | 1 Comment | Posted in Bin

If you have gotten to the point where one sub-folder for your controllers just isn’t enough, you probably found a frustrating problem in CodeIgniter. Whether or not MVC Frameworks are supposed to allow nested sub-folders is debatable, however I like the organization. This post solved my problem (very simply) and I got right back to developing:

Multi Level Subfolder Controller in CodeIgniter
http://glennpratama.wordpress.com/2009/10/20/multi-level-subfolder-for-controller-in-codeigniter/

Thanks Glenn!

Our First Big Fight

August 26th, 2009 | No Comments | Posted in Bin

I’ve been using CodeIgniter for the past 6 months or so and while we’ve had our minor indifferences, I’ve thought of CodeIgniter to be a pretty decent PHP MVC. There was very little learning curve for me and we hit off quite easily. We were like peas and carrots. Unfortunately, as go most relationships, I knew this “new love” wouldn’t last forever.
More »

Remap function for CodeIgniter

July 26th, 2009 | 1 Comment | Posted in Bin

I got tired of looking for this code in other projects so I wanted a handy place to keep it.

PHP:
  1. <?php
  2. function _remap($method)
  3. {
  4.     if (method_exists($this, $method)){
  5.         $this->$method($this->uri->segment(3));
  6.     } else {
  7.         $this->index($method);
  8.     }
  9. }
  10. ?>

In case you're wondering, this function is a reserved method in CodeIgniter controllers that will allow for a dynamic method name to be passed into the URL. Docs on it are here: codeigniter.com/user_guide/general/controllers.html#remapping.

Backwards Text in Gmail App

July 20th, 2009 | No Comments | Posted in Bin

backwards-gmail
I'm not sure exactly what happened here, but this is what I saw when I re-opened Chrome and my Gmail Tab that was left open got restored. Any ideas?

Why “hiding” source code is bad.

July 8th, 2009 | 1 Comment | Posted in Bin

I've been working at my current employer for about 5 months now and since I started, I have been involved in or heard this conversation more than 10 times, which is 10 times more than I've heard within the past 7 years I've been doing web development. The client wants their source code hidden from public view.

Let me first explain where I feel the communication has failed. The client says "Source code", however they may mean "Application code". To the client, when they "View Source", they may not know exactly what they are looking at, all they see is code. If they don't understand the difference between HTML code and Server side code (PHP/.NET/JSP), they feel like the code that makes their site work could be compromised. It is imperative that the client understand the difference between these 2 types of code and that their server side source code is safe.

More »