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 [...]
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, [...]
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 [...]
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 [...]
Demonstrations embedding test: Swirly from the Wolfram Demonstrations Project by Sándor Kabai
“/quote cap req :-identify-msg” fixes this.
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.
I made this widget at Wolfram|Alpha Widget Builder. Give it a try, I hope you find it useful.
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 [...]
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 [...]
Recent Comments