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 ...

When IT negatively affects brand equity

Caution: Semi-long rant, but a valuable message at the end. I've had my fair share of troubles with poorly implemented online systems (I'm looking at you Citibank), but my experience today with Comcast takes the cake. This is an example of how digitizing traditional processes with state-of-the-art online payment systems might reduce costs for large corporations, but if not implemented correctly can backfire by deteriorating the brand image. After ...

Introduction to Message Queues and RabbitMQ

Incase you're not familiar with the advantages of message queues in web applications, they allow you to (among other things) offload tasks and processes that may be initiated by users interacting with your application but the results of which need not return back to the user synchronously. E.g. a user submits an e-commerce order, the application captures the order and returns a confirmation to the user. As an ...

Anti-RDBMS and distributed key-value stores

I've been comparing and playing with a bunch of distributed key-value stores lately. Here's an annotated list of interesting articles: Richard Jones (from Last.fm) has compiled an useful comparison of the various distributed key-values stores out there including MemcacheDB, Cassandra and CouchDB. He seems most interested in Scalaris and Project Voldemort. redis seems to be a very interesting key-value store. It behaves like memcached but supports strings, lists and sets as ...

Review: Quantum of Solace (no spoilers)

Quantum of Solace opened this weekend, and as any self-respecting die-hard Bond fan would, I had to go watch the opening show. Lines were long, seats were suboptimal, but thankfully, the movie wasn't a disappointment. There's no denying that Quantum of Solace is stellar. It helps further the new direction that the Bond franchise is moving in. It's a thrill-ride (yes, it's cliche) for the die-hard Bond fan as ...

Publish blog posts to Twitter automatically (using FriendFeed)

Here's a quick tip if you've ever wanted to publish your blog entries on Twitter automagically. There's always been services like TwitterFeed but they are slow to update and requires that you share login credentials with yet another 3rd party site. Enter FriendFeed. With the launch of their new feed publishing feature, you can post to Twitter any or all services that are linked to your account. Here are ...

Become a specialist at being a generalist

At my day job at Yahoo! Research, I get to interview my fair share of engineers. Almost always, the candidates seem to fall into one of two types - the specialists and the generalists. The specialists are those who come from a strong background of fundamentals. Over years, they have honed and assimilated the details of their language or technology of choice. The generalists are the hungry scavengers. ...

Attached is my resume and DNA

Imagine if the attempts by startups in the genome space like 23andMe were to succeed at cataloging everyone's DNA. Would this piece of DNA become the ultimate representation of who and what you are? What would be the effects of having all the things that make you uniquely human be reduced to a string of characters? It's interesting to wonder if there would exist social networks around your DNA. ...

Why upgrade to Wordpress 2.5 (5 min version)

Wordpress 2.5 finally launched after a few delays, and it hasn't disappointed. I was glad to see them concentrating on revamping the Dashboard and the general Admin area. Wordpress has proven itself to be a solid extensible platform, but their admin area lacked in usability and flexibility. The upgrade process was a snap thanks to this guide.

Next,

My Lifestream

My shenanigans around the web