Option Pattern and avoiding Nulls pt. 3: Request Variables

January 7th, 2013 No comments

In Part 1 I introduced the Option pattern as a pattern to avoid using nulls. In Part 2 I showed an example of how this can be handy in method chaining. In this part I’ll introduce how to use Option for request variables. Request variables are supplied by the user. You can’t rely on them [...]

Categories: Coding, PHP Tags:

Option Pattern and avoiding Nulls pt. 2: Method Chaining

January 6th, 2013 No comments

In Pt. 1. I introduced Option as a way to avoid running into problems using null. Now to show you one of those problems. Consider the following method: function isPass($student, $course) { $grade = StudentRegistry::getStudent($student)->getCourse($course)->getGrade(); if($grade > 60) { return true; } return false; } This method may look good to an untrained eye. However, [...]

Categories: Coding, PHP Tags:

Option Pattern and avoiding Nulls pt. 1: Introduction

January 6th, 2013 No comments

I imagine in the PHP community, the idea of avoiding nulls in your code might be something new to think about. Because PHP is a dynamically typed language, nulls are handled much better compared to other languages. However, they do still cause a lot of issues. Two of the main places I see issues with [...]

Categories: Coding, PHP Tags:

PHP frameworks are obsolete

July 18th, 2012 23 comments

As a person who works with the PHP support community quite a bit, I’m often asked “What PHP framework do you recommend?”. I answer this as honestly as I can: “None of them”. It does pain me to say this, but as someone who’s been to the other side, and not only seeing that the [...]

Categories: Uncategorized Tags:

Testing Demonstrations Embedding!

April 23rd, 2012 No comments

Demonstrations embedding test: Swirly from the Wolfram Demonstrations Project by Sándor Kabai

Categories: Uncategorized Tags:

Freenode prepending + or – to every incoming message.

April 5th, 2012 No comments

“/quote cap req :-identify-msg” fixes this.

Categories: Uncategorized Tags:

Some inspiration

July 11th, 2011 No comments

If you believe in miracles or not, you have to acknowledge one of the biggest miracles is giving mankind the drive to implement our imaginations and dreams through art and technology.

Categories: Uncategorized Tags:

Wolfram|Alpha ABV Calculator Widget

I made this widget at Wolfram|Alpha Widget Builder. Give it a try, I hope you find it useful.

Categories: Uncategorized Tags:

Reading Files in Reverse in PHP

August 12th, 2010 No comments

Every once in awhile I get someone asking me in ##php on freenode how to prepend entries to a file. Usually it’s because it’s a log file of some sort and they want to read the latest entries first. This is usually for someone (not necessarily the developer) who isn’t used to the whole habit [...]

Categories: Coding, PHP Tags:

First Three Fights in 25 Man Trial of The Crusader

December 6th, 2009 No comments

Beasts of Northrend Kind of messed up part 2. I forgot to hit stop record, and didn’t catch it until I uploaded to youtube. Enjoy me jumping around while people argue over loot. What sucks is I could have gotten this fight in one video. Lord Jaraxxus This is by far my favorite fight. Spellsteal [...]

Categories: Gaming Tags: