Author Archives: Jonathan Sampson

Crushing Code and Shaving Chars

Who has heard of Code Golf? I hadn’t up until about 3 years ago when I first stumbled across some on Stack Overflow. I faintly recall the horror as I gazed upon some of the most cryptic code ever – … Continue reading

Posted in Just for fun, PHP | Tagged , , , , , | 3 Comments

Abusages in JavaScript

Upon reading a recent blog entry by Brendan Eich (creator of the JavaScript language), I found myself falling under a bit of conviction when he described a popular use of || (OR) and && (AND) as an “abusage”. I also … Continue reading

Posted in JavaScript | Tagged , , , , , , , | Leave a comment

n Parts for Sum in PHP

I was bouncing around on Stack Overflow, answering questions here, voting on questions and answers there, when I came across a question on how to construct an array of arbitrary size, whose members add up to an explicit sum. This … Continue reading

Posted in PHP, StackOverflow | Tagged , , | Leave a comment

“Windows 8 is too hard to turn off”

Did you know the Windows 8 operating system is too hard to shut down? In fact, it’s a “pain-in-the-rump,” according to Steven J. Vaughan-Nichols of ZDNet.com. I must be honest – when I read those words I just thought to myself, … Continue reading

Posted in Windows 8 | Tagged , , | 2 Comments

First Impression of Windows 8 (Developer Preview)

I downloaded the developer preview of Windows 8 a few weeks ago so that I could begin playing with Internet Explorer 10. After setting up a new partition and loading the OS into a dual-boot environment, I was quickly up … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

prependChild on DOMElement in PHP, Sort of.

This evening I wanted to add a new LI onto a WordPress navigation programmatically. After considering a few different options, I decided I wanted to use PHP’s DOMDocument, and use this as an opportunity to more familiarize myself with its … Continue reading

Posted in PHP, WordPress | Tagged , , , , , , | Leave a comment

Sometimes jQuery is (not) the Answer

It’s difficult to say, as much as I love jQuery I must admit that it is at times the wrong route to take when addressing a problem. While looking over a few questions on StackOverflow today I came across a … Continue reading

Posted in JavaScript, jQuery, Uncategorized | Tagged , | 1 Comment

Todays WTF Moment with CodeIgniter, MySQL and PHP

As routine as an oddly-twitching finger sabotaging any attempt to use your mouse, strange things  may take place with your environment, tools, or code. Today I was working on setting up a very small project with CodeIgniter when I came … Continue reading

Posted in CodeIgniter, MySQL, PHP | Tagged , , , , , , , , | 1 Comment

Unexpected Results While Styling WordPress Menus

Today I sat down to convert a static theme consisting of nothing more than HTML and CSS into a WordPress theme, complete with calls to functions like wp_nav_menu() for the construction of the menu’s. For this particular theme I began … Continue reading

Posted in Uncategorized, WordPress | Tagged , , , , , , | Leave a comment

Using Views in Kohana 3

What is a View? If you’ve never worked with Kohana Views in the past, they’re not hard to understand. Controllers handle most of your logic, Models handle the database communication, and Views handle the presentation of the data (generally-speaking). In … Continue reading

Posted in Kohana, Uncategorized | Tagged , , | 1 Comment