If I had to evacuate my home in an instant, what five items would I grab on my way out?

When I started thinking about the answer to this question, it occurred to me that I don’t have many possessions that I’m crazy about. I live a minimal life and don’t have much stuff I would want to grab when my house is on fire. But still, I have to answer to the question and thus we begin with.

My phone

Probably my most important possession. From text messaging between my friends, I use my phone, a Lumia 800, for email, social networking and pretty much everything I can do on it. Not to forget using it as a phone.

My laptop

As a web developer, this is the most important work-related piece of equipment I own. I have two notebooks; an Envy 15, which is my powerhouse, and a MacBook Air, which is my main workstation. Although my work is all backed up on the cloud, but these two are definitely on the list.

My wallet

Cash, bank and identification cards, business cards - stuff I’ll need to get around. No one cares it’s a zombie apocalypse: “That’d be 20 bucks, sir.” Not to mention the wallet itself was a gift from a dear one, and thus holds sentimental value.

Wow, couldn’t make it past three. If anything, that should make my escape swift. Me 1 - Zombies 0.

Curious discovery involving PHP and OS X

Since I moved my local development from my Windows machine to OS X, I had to deal with a lot of annoyances that come with change. One thing that’s really high up on the list and interfered with my development is how any file starting with the period character becomes hidden. And since I haven’t found a way to quickly show and hide files, I’ve tried to ignore it. Until..

<?php

	$photos = scandir( 'my/photo/photos' );

	foreach ( $photos as $photo )
	{
		if ( $photo == '.' || $photo == '..' )
		{
			continue;
		}

		// do something here
	}

?>

The above code iterates over the contents of the directory, skipping the dots (file system shortcuts) and then I can do whatever I want with them. But on OS X, there’s this pesky .DS_STORE file that stores information about the folder. And my code obviously didn’t check for that. And since there was no way to quickly find the file and delete it, I just figured it’d be easier to change my code to check for the file. On Windows, you also have something similar: the Thumbs.db file, that stores information about image thumbnails. But that’s easily seen and deleted.

So when I added one more item to be checked in my code, I realised I didn’t like it. I wanted to make it simpler, and here’s the solution that I came up with.

<?php

	$photos = scandir( 'my/photo/photos' );

	foreach ( $photos as $photo )
	{
		if ( $photo[0] == '.' )
		{
			continue;
		}

		// do something here
	}

?>

By checking the first character of the filename for the period character and skipping those files, all my tests pass. Except “Thumbs.db” but I guess that’s not a concern. I’m feeling so smart!

Going Back to School

In the beginning of this year, I decided I didn’t want to go back to school. I had conflicting thoughts about spending my time, energy and money on an education that seemed devoid of any value. I had a lot of ideas that I wanted to work on fulltime and they all appealed to me more than waking at 7am and sitting in boring lectures. The idea that I was going to dropout was thrilling!

So I put things in motion. I told my program manager that I’m going to be on vacation for at least one term and then broke the news to my friends; mostly to mixed reactions and wise peer advice. you know how it is. Convincing my dad was easy. He just wanted to make sure I was spending my time on something constructive and that it would be worth dropping out of school for. He asked about my plans and even though I didn’t give him a satisfactory answer, he agreed. It was my mum who gave me a hard time. She didn’t even let me finish my pitch before she bombarded me with things like, “[insert her friend’s name here]’s son is graduating next year and you’ll get behind him!” and “all I want is for you to graduate so I can get you married, but you can’t even do this for me!” Ah, it was an interesting evening. Thankfully, it’s easy to convince her using emotional pitches than most people and I was good to go in no time.

I was free. At long last! I had all the time I needed to pursue projects I had been putting off for the longest time. Out came the ideas box and I started poking my nose into mobile phone and web apps that I’ve had wanted to do for more than a year. It was during that time that MovieMate came out. First as a web app and then as mobile app for Windows Phone 7. I had an HTC HD7 at the time, so if made most sense to churn out an app for my favourite platform first.

Moving on. Work  started flowing, I was busy almost all the time. I started watching TV shows, too, which is something I had never dabbled in before. I picked up the first season of Community and fell in love 20 seconds into the pilot. Waiting for season three to finish airing was a painful process! I also watched Game of Thrones, a show I had been avoiding for at least a year since my friend recommended I watch it. I was hooked to Fringe, watching four seasons in less than two weeks! I used to postpone work just so I could watch the shows. And I’m getting off-topic now.

Coming back, I’d say I was satisfied with what I did in this vacation. I was also elected the Vice President of the Student Council of my school. But come August, the choice I made in the beginning of the year asked for renewal. And as much of a nuisance it might be, I couldn’t ignore it for long, since the course registration process has a deadline. And it approached fast and out of nowhere!

So I picked up three courses (full load is at six) and started taking classes. And that’s when it occurred to me: it was difficult fitting back into my class. Everyone, including me, had changed. I had spent too much time away from them and with other people to feel different and even conscious about it. It felt worse than my first semester. There’s a difference between meeting strangers and meeting familiars-turned-strange, and that difference is not comfortable. Although it might be too early to say where it goes from here, so I’m just going to have to wait a while and see how it turns out. Thankfully, the courses I’ve picked allow a lot of flexibility so I should be good and comfortable soon enough.

So here’s to an interesting semester. Hopefully, I’ll be acing my courses (which were carefully chosen to suit my preferences) and my Student Council post (I’m the Vice President) and providing value to the students of my school. And since Eid is just a day away, Eid Mubarak to everyone! Have fun.

“Walk of Faith” - China’s newest tourist attraction. Definitely wanna try this!

(Source: 9GAG)

Creating for the mobile web: SOCFilms

Recently, a client of mine (SOCFilms), wanted to create a mobile version of their website that I made a few months ago. My first thought was, “yes! I finally get to use CSS3 Media Queries!”, but then I decided against it, given the JavaScript-driven layout that their main website has, since it seemed too cluttered and heavy for mobile devices.

So I set off, to create a lighter version of the main website that didn’t use any JavaScript at all, as a base ground to work on. It was simple, accessible, and of course, very light.

Next step was to target different resolutions with multiple stylesheets. I looked at popular magazine and blog sites like Smashing Magazine, Neowin, etc, to get some inspiration about the different possibilities that I could use on this site. The following stylesheets were created:

This covers most of the potential target market: iPhones, iPods, iPads, and most Android and Windows Phone 7 devices. The site even looks decent on my full HD Envy 15.

The result was great! Responsive web design has always intrigued me, and this was the first time that I actually got to implement it in a client project. And I know this will become a norm for future projects.

I had planned to use responsive web design in the new designplox website, but client work and laziness prevented me from doing so. As soon as I have a few days off work, I’ll get to it and make it more friendly for my mobile visitors. However, I am afraid those free days will go to playing DotA 2, which I’ve picked up recently; you should totally check it out.

Saw this on 9gag, found it quite interesting. And rather true.

Saw this on 9gag, found it quite interesting. And rather true.

Best Film I ever saw in a theatre: Avengers, baby!


Avengers Iron Man poster

Absolutely amazing. The epic humor, the brilliant visuals and the mind lowing action, what’s not there to recommend? I could throw in a while bucket of stars if I could. Setting aside the fact that I’ve been waiting for this since The Incredible Hulk came out in 2008, it’s still an amazing movie. It’s the kind of film that makes people wanna roar in their seats and get off them to punch the bad guys!

Higly recommended to those who haven’t seen it yet. I was gonna throw in some sarcasm here about why you haven’t already, but let’s skip that for now. Iron Man ftw!

(Source: plinky.com)

Nokia prototype device running Windows Phone 8. Looks stunning, exactly how I like the shape and everything. The thickness is debatable, though. If only I could get my hands on this bad boy!

Nokia prototype device running Windows Phone 8. Looks stunning, exactly how I like the shape and everything. The thickness is debatable, though. If only I could get my hands on this bad boy!

Fixing bad text/resolution on a 1080p HDTV

I recently bought a 40” LED HDTV and have been using my HP Envy 15 with it a lot. But sadly, I had to run it on 1600x900 because 1920x1080 would make the text over-sharp and unreadable and cropping out parts of my screen, too! So I went to Google and searched for a bit and here’s the solution I found:

  1. Press the “Source” button on your remote control.
  2. Highlight the HDMI input.
  3. Press “Tools” -> Edit Name -> And then simply using the scrolling (up & down keys on your remote), select “PC” or “DVI PC” for your HDMI. And voila you have crystal clear text just as on DVI.

Now I have a Samsung LED, so depending on your make and model, the settings could be under different categories and possibly named different, too, but I’m sure finding them won’t be trouble. Have fun 1080p’ing!

(Source: superuser.com)

How to get iTunes to detect iDevices on Windows 8 Developer Preview

If you, like me, were impatient to try out the beauty of Windows Developer Preview and the Metro-style apps AND were naive enough, then you removed Windows 7 and installed just the Windows Developer Preview on your system, because the transitions were no fun on VMware 8. Later, you’d realize that you can’t sync your iDevice in iTunes because it doesn’t show! If you’ve got the problem, here’s the solution.

  1. Make sure iTunes isn’t running, then go to Services
  2. Stop ‘Apple Mobile Device’
  3. Plug your iDevice in and wait for the chime(s)
  4. Start ‘Apple Mobile Device’
  5. Open iTunes
  6. Your iDevice will show!

Make sure iTunes isn’t running when you do this process!

Now, I’m downloading iOS 5 and will be updating my iPad 2 as soon as it does!

(Source: eightforums.com)