Write your code correct the first time around

After hanging around on StackOverflow.com for so long, I’ve started seeing bad programming patterns in the way new posters go about creating code, specifically using CodeIgniter, an MVC Framework. The code they write almost always shows a general lack of understanding of MVC design. A typical ‘bad programmer’ will create a controller, which would just call a view: and then their view would be jam packed with business logic, database queries, and very much a…

CodeIgniter URI routing issue with Controllers inside folders

I’ve seen a lot of people requesting help on figuring out routing on CodeIgniter (2.1.X as of this entry). Which leads me to believe they don’t read the guide and confuse how routes are setup. So, Here is our scenario, We want to have a nice clean URL of: http://example.com/account/manage/4123245/jakub Up to this point, we are fine, we don’t panic, we say “Self, we can do this”. Then we confuse ourselves by organizing our controllers…

Enabling CSRF Protection in CodeIgniter for AJAX calls

If you use CodeIgniter (CI) like me, you’ve probably read/heard about the CSRF protection that comes built into this great framework.  I typically kept ajax functionality (form submissions in this case) to a minimum as I wanted to focus more on development and finishing a project than prettying it up with ‘Web 2.0’ stuff. Well in a couple of my last projects I’ve ran smack into CSRF protection and how it impacts AJAX (as well…

Youtube being throttled on AT&T 6Mbit profiles? Seems like it to me…

I have been conistantly having buffering issues with Youtube using my standard home ADSL connection (6Mbit from ATT – ADSL). Not a single video running 480p or higher will pre-load without me getting a buffering icon in the center of the screen. I have a ‘Network meter’ widget on my Windows 7 desktop, (for giggles) and I watch the traffic sputter up and down, I am able to right click on a youtube video and…

No such thing as a “bandwidth” hog, finally proof!

Since the advent of broadband speed internet that was available to the consumer, we’ve all heard of the term ‘bandwidth hog’. The term always was used by your ISP to describe ‘evil’ consumers that ‘hogged’ wayyyy too much bandwidth for themselves, and thereby choking or reducing the speeds of everyone around them. I was always overly anal with these accusations (being an IT person and having some understanding of the underlying infrastructure), I would point…