Mukul Sabharwal's Blog
I'm a student at Iowa State University studying Computer Engineering. This blog reflects my personal opinion about various issues; and is linked to no third party (disclaimer). I also maintain a programming website, devhome.org
Detecting dyslexia; via programming?
3/21/2008 07:28:00 AM | Permanent Link | Comments (4)
A lot has been written about it (in/outside the medical community); a movie in recent memory as well, but ... detecting it through code? WT..!I have a few dyslexic programmer/coder/tech buddies and a mistake they commonly make while looping through two dimensional arrays, or such outer/inner loop combos:
for (int i = 0; i < ROWS; ++i)
for (int j = 0; j < COLS; ++i)
// pwned
or it's cousin:
for (int i = 0; i < ROWS; ++i)
for (int j = 0; i < COLS; ++j)
/* these comments look more attractive */
I'm tempted to analyze the reasoning, rather the inclination for doing this, but I'll refrain.
Curious, how many of you do this?
लमबी जुदाई (Lambi Judai)
3/08/2008 07:55:00 PM | Permanent Link | Comments (1)
Another great Hindi song, from the forthcoming movie जन्नत (Jannat). It's slightly melo; nice voice though! Anyway, I need a better way to share songs, any ideas?लाष्मी नारायण (Lakshmi Narayan)
2/24/2008 07:18:00 PM | Permanent Link | Comments (1)
A really, really funny song from a Hindi movie, One Two Three. The lyrics (if you understand the language) are hilarious!Tell Me You Love Me: Hindi Writing?
1/28/2008 10:33:00 PM | Permanent Link | Comments (7)
I've been keeping myself busy (the semester has just started ...) on the weekends (and weekdays) by watching this not-so-conventional drama series, Tell Me You Love Me. I won't digress from the post and tell you details about this series; tune into HBO on your Tele, or view it through other visual instruments ...Michelle Borth (« that's a link worth checking out), a pivotal character in the show has a tattoo (or something) on her wrist; I did a little capture of it, and I can't seem to understand/make out what clearly looks like a word in Hindi/Sanskrit (alright, it could be any language that uses Devanāgarī) :
Anybody know what it means? (UPDATE: Michelle does say it means to heal, but she in another episode says it's something else, so I'm not quite sure)

Michelle Borth sporting a tattoo with a word written in Devanāgarī script in HBO drama series — Tell Me You Love Me
Labels: Borth, Heal, Michelle, Tattoo
Comic relief: SUNW to JAVA
9/19/2007 11:59:00 PM | Permanent Link | Comments (1)
So, I read about this on Slashdot about a month back, when this happened. But really, only after revisiting the Sun CEO's blog today did I realize how ridiculous it all sounds.Read the blog entry, then hover down to the comments, they'll just crack you up. Jonathan (CEO) probably spent an entire evening preparing the entry, and much to his chagrin, not a lot of happy people!
From SUNW to JAVA
PHP6, Magic quotes & the “best practice“
7/24/2007 12:30:00 AM | Permanent Link | Comments (4)
All the code that was employing the considered “best practice“ for Magic Quotes in PHP, apparently fails when it comes to PHP6, since magic quotes has been officially removed from the sources; a good thing, of course. I discovered this as we moved to a new version of PHP @ work.So an updated version of what I think would be “best practice“, and backwards compatible.
<?php
function stripslashes_deep($value)
{
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
$_GET = stripslashes_deep($_GET);
$_POST = stripslashes_deep($_POST);
$_COOKIE = stripslashes_deep($_COOKIE);
$_REQUEST = stripslashes_deep($_REQUEST);
}
Web Standards Project (WaSP) website; doesn't validate
7/19/2007 12:10:00 AM | Permanent Link | Comments (1)
Interesting name, the "Web Standards Project (WaSP)". Apparently, the leading authority in pushing for Web Standards.One would expect, at least, their website to validate! Especially if the page title reads: Accessible HTML/XHTML Forms: Beginner Level or Accessible HTML/XHTML Forms: Intermediate Level
Validate WaSP
The future of web standards is at risk! Act Now! ... Just kidding, sloppy coding on WaSP's part, maybe they'll fix it.



