headphono.us

Avatar

Pras Sarkar blogs about web technology, music, social networks, digital identities and other random things.

A neat trick to expose PHP objects’ private properties

If you've ever needed to write up a PHPUnit test that requires you to check the value of a private property, you can try accessing the private member variables like so: Or PHP 5.3+ using Reflections: Great tip from Derick Rethans.

Having fun with for loops

I love for loops. I use them in ways they probably shouldn't be used for. Here are some few fun ways of using for loops with the caveat that not all these should be used since they are unorthodox and may not be easily readable to others in your team. For loops for concise conditional logic Have you ever come across a pattern where you need to set a ...

ZendCon 07 – Day 2 (Afternoon update)

The Joel Spolsky keynote was one of the most engaging, interesting and downright hilarious presentations I've heard this year. He really knows how to talk to the crowd. A few suggestions from Joel on creating great software: Make people happy Think about emotions Obsess over aesthetics Joel is right - developers don't necessarily want to think about beautifying their applications. Developers largely work on the middle-tier and supporting backends, and like everyone, ...

ZendCon 07 – Day 2

Second day here at the ZendCon 07, and no session better than Eli White's PHP Features You Didn't Know Existed to start off the day. PHP developers who've been coding for a number of years (some 10 years or more) were scoffing at the idea that Eli would present anything new or 'undiscovered'. But there wasn't a cough in the packed room as Eli presented rarely-used hidden gems ...

Blogging from ZendCon 07

The first day of Zend Con was pretty interesting. I wasn't able to attend all the sessions, but the notable ones were Terry Chay's The Internet is an Ogre: Finding Art in the Software Architecture (hilarious guy), Ben Ramsey's Give Your Site A Boost With memcache, and Eli White's High Performance PHP & MySQL Scaling Techniques (standing room only). These types of sessions make conferences interesting and a learning ...

Keeping iTunes organized with tags

I go through a lot of music through the day - my ipod through commutes, workstations at work and home, etc. Keeping my music organized is not only necessarily but also lets me look up the right song for the right moment. So I got to thinking, why not use the social tagging concept for my mp3's. Luckily, iTunes already has support for a mp3 tag called "Grouping". Searching ...

todo.txt and Multi-user IM bot

I started using the minimal but feature-rich todo.txt by Gina Trapani today. Its got a great set of features (lists, priorities, projects, contexts, etc). Its minimal and coupled with the AIM client, you don't necessarily have to always have a Terminal window open to interact with it. Adium does just fine. A few tweaks you may want to use to further enhance. I found myself typing "ls" for "list" ...

World Cup Schedule Dashboard Widget

I released my first widget today - the FIFA World Cup 2006 Schedule. Its powered by the good folks at www.worldcupkickoff.com and uses rss feeds to pull in the match timings. It should automatically adjust the time to the timezone set in your preferences. You also have the ability to see schedules by teams or by groups. After much searching, being unable to find a widget for the 2006 ...

,

My Lifestream

My shenanigans around the web