-
Recent Posts
-

Recent Tweets
Follow @jonathansampsonRecent Comments
- Rakesh Juyal on Crushing Code and Shaving Chars
- Jonathan Sampson on Crushing Code and Shaving Chars
- Eli Perelman on Crushing Code and Shaving Chars
- Jonathan Sampson on “Windows 8 is too hard to turn off”
- Zimzat on “Windows 8 is too hard to turn off”
Archives
- April 2012 (3)
- March 2012 (1)
- February 2012 (1)
- October 2011 (1)
- June 2011 (2)
- May 2011 (1)
- January 2011 (6)
Tags
appendChild Autoload Bug business CodeIgniter Connection container_class CSS custom Database DOMDocument DOMElement DOMNode Error filters htaccess images interview JavaScript jeff atwood jQuery kohana menus menu_class mvc MySQL operators php posts prependChild Review stackoverflow styling ternary usability Version views wamp webdev windows Windows 8 Windows8 WordPress wp_nav_menu wp_page_menu
Category Archives: PHP
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 brevity, code golf, golfing, minification, php, stackoverflow
3 Comments
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
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 Autoload, Bug, CodeIgniter, Connection, Database, Error, MySQL, php, Version
1 Comment
A Shorter Ternary Operator in PHP 5.3
The ternary operator is simply awesome. It allows for some really beautiful if-else style variable assignments: $can_drink = ( $age <= 21 ) ? true : false ; This operator let’s you evaluate a condition, and return one of two … Continue reading