“…and then just walked away”
Wednesday, April 25th, 2007Definitely one of the most interesting acts of vandalism I’ve seen in a while…
Definitely one of the most interesting acts of vandalism I’ve seen in a while…
I was looking at the Google Zeitgeist, and Malaysia produced some fairly standard searches, but one of the results stood out indeed. Here’s a screen capture for posterity:
I really had no reason to write about this, but I find it amusing that amidst all those legitimate, serious searches, we find Kirsten Dunst at position #8… Apparently more than a few people have a liking for her, though with Spiderman 3 on the horizon and building up a ton of buzz this isn’t unexpected.
As taken from the CodeIgniter website:
CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you’re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you’re tired of ponderously large and thoroughly undocumented frameworks
I must say that after looking through the documentation, watching the introductory screencasts and then experimenting with it myself, it really does live up to it’s claim of real-world thoughtfulness. CodeIgniter flexible and clear when it comes to the MVC pattern, and all through the tutorials I never once felt that I didn’t quite understand what was going on. Even reading the documentation, it’s all amazingly well explained.
I’ve so far not felt mystified by something in the framework, and haven’t yet had to ask any questions on the forums of IRC channels — something I’ve had to do numerous times with CakePHP, a similar open-source project. This of course isn’t to say that Cake is bad, but good documentation is king when it comes to programming.
Overall, the first impression you get when you run CodeIgniter is that of confidence. This is of course the benefit of having a commercial entity backing a project — little things like the documentation that typically don’t get done with a non-commercial project get taken care of.
Best of all? CodeIgniter comes with a license that qualifies as ‘Open Source’.
Lookout CakePHP, you may have the major portion of mindshare right now, but CodeIgniter is a serious contender.
You just have to appreciate the irony of this paragraph in the CakePHP manual:
Now, in order to help you understand this, let’s use a practical example. Imagine, for a moment, a computer system used by a group of adventurers. The leader of the group wants to forge ahead on their quest while maintaining a healthy amount of privacy and security for the other members of the party. The AROs involved are as following:
- Gandalf
- Aragorn
- Bilbo
- Frodo
- Gollum
- Legolas
- Gimli
- Pippin
- Merry
Indeed, a practical example :P
RHB has disappointed me once again with yet another facet of their services. Their wonderful online portal (shockingly similar in layout to MayBank) isn’t quite up to snuff when it comes to interbank transfers it seems.
On Thursday I transferred some funds from my RHB account to my MayBank account, and I still don’t have it. It is Saturday morning. Talk about poor service. Idiots. Now I’m going to have to worry about where my money went through the weekend and call them and give them an earful on Monday. I’m sure I’ll get my money on Monday or (god forbid) Tuesday, but the problem really is that I wanted to use it today.
This is such a contrast to Maybanks wonderfully consistent service — instant, or near instant transfer. You click OK, and within a few minutes your money is available, even with interbank transfers. Then again, RHB is the bank that took 5 working days to clear a cheque of mine once, so I’m wondering if I should even be surprised?
As most of the Linux world already knows, Ubuntu “Feisty Fawn” v7.04 was released a couple of days ago. So being the good early-adopter that I am, here’s what I did to upgrade:
apt-get update followed by apt-get dist-upgrade to update my Edgy Eftvim /etc/apt/sources.list, a dash of VIM magic, :s%:edgy:feisty to make APT look at the new stuffapt-get dist-upgradeNone of that GUI nonsense. I’ll use my command line damnit!
Was it worth the upgrade? Well, there aren’t any blindingly obvious new features on the KDE side of things, unlike the GNOME folks who are at this very moment raving about drop shadows and compositing I’d imagine. It certainly feels more evolutionary than revolutionary, which is how I like it.
I have noticed a few new versions of things, like Amarok — got a few new buttons to play with, some fancier TreeViews with album art in it etc. I’m sure more stuff will show up in the next few days as I actually use the system.
So far only two things have gone bad:
I was reading Why Can’t Programmers… Program today and while I find questions like these annoying at interviews because PHP isn’t really used for that sort of thing, I set myself and my colleagues the task of writing out answers.
The question:
Print out the numbers 1 to 100. Where the number is a multiple of 3, print ‘Fizz’, otherwise if it is a multiple of 5 print ‘Buzz’. If the number is a multiple of 3 and 5, print ‘FizzBuzz’.
Here are our answers, and mind you, they’re all in PHP.
Lim is our budding project coordinator turned programmer. He’s just started getting into PHP, and here’s what Lim came up with:
for ($count=1; $count<=100; $count++)
{
if ($count%3 == 0 && $count%5 ==0){
print "FizzBuzz<br />";
}
elseif ($count%3 == 0){
print "Fizz<br />";
}
elseif ($count%5 == 0){
print "Buzz<br />";
}
else {
print $count."<br />";
}
}
An almost perfect textbook style answer.
Here’s what Foong came up with:
for($i=1;$i<=100;$i++)
{
$result=$i/3;
$result2=$i/5;
if(!preg_match("[\.]" , $result)&&!preg_match("[\.]" , $result2))
{
echo "FizzBuzz<br />";
}
elseif(!preg_match("[\.]" , $result))
{
echo "Fizz<br />";
}
elseif(!preg_match("[\.]" , $result2))
{
echo "Buzz<br />";
}
else
{
echo $i."<br />";
}
}
Certainly an example of … unique thinking. Foong’s had more than a year of experience programming in PHP, for the record.
Here’s what I came up with:
foreach(range(1,100) as $i)
echo $i % 3 == 0 ? ( $i % 5 == 0 ? "FizzBuzz\r\n" : "Fizz\r\n" ) : ( $i % 5 == 0 ? "Buzz\r\n" : $i."\r\n" );
Update: I’ve made a change to the code, Ken Brush a.k.a. shiruken noticed I’d missed something out :(
I love the conditional operator @_@
Also, no, I would never use code like this in production, or even casual coding. I just wanted to beat my colleagues on line-count :P
And now, the ‘proper’ textbook solution for all the Googlers:
for ($i = 1; $i <= 100; $i++)
{
if($i % 3 == 0 && $i % 5 ==0){
print "FizzBuzz<br />";
}
else if($i % 3 == 0){
print "Fizz<br />";
}
else if($i % 5 == 0){
print "Buzz<br />";
}
else {
print $i."<br />";
}
}
I moved over here from my old domain (denial.loose-screws.com) and after installing WordPress and using it for a bit realised I should’ve imported all the content from my old website before I added content here for a few months.
Anyhow, when looking through the import options available to WordPress, I found an RSS feed one. So I set my RSS feed on the old installation to 500 entries (way more than I had) and fed it to the importer. Less than 30 seconds later, I had ALL my old content, complete with categories available… Talk about no-hassles.
WordPress team you did a wonderful job with it. Thanks.
A game based on the official Battlestar Galactica storyline? You have got to be kidding me. This looks quite nice really — Beyond the Red Line. It’s just what all the Battlestar Galactica fans need to hold them over till the movie and next season surface in a year.