A blog where Moazzam … rambles
-
Technology is a means to an end and not the end itself
Last Friday, the CEO of the company I work for said something interesting: “Technology is not the end. It is a means to an end.” He, then, elaborated that by saying that we are making applications to make people’s lives easier. The code doesn’t have to be perfect. If it works for 90-95% of the…
-
Selenium Chrome driver nuances
When writing test, you generally tend to run the test in one browser and expect it to work on all the rest (except maybe Internet Explorer). I had ran my tests on Firefox and they succeeded but not on Chrome. In Firefox, if you click on an element that is not currently visible on the…
-
Testing multiple browsers with Selenium2 in PHPUnit
You used to be able to run test on multiple browsers with PHPUnit Selenium test class by specifying a $browsers property. You can still do the same with PHPUnit’s Selenium 2 class made for web driver. Here is how you do it: class SomeTest extends PHPUnit_Extensions_Selenium2TestCase { /** * Variable to specify which browsers to…
-
Fastest way to traverse an associative array
PHP has array_walk() which can be used to traverse an array and modify it in place. I wanted to find out if array_walk() would be faster than a loop written in PHP (for, foreach). I mean, PHP’s code is written in C/C++ and traversing anything has to be faster in C than in PHP. So,…
-
OSX Mavericks upgrade and PhpStorm problems
I upgraded my work laptop’s OS to Mavericks (finally). Started the upgrade yesterday when going home and when I went back to work today, PhpStorm stopped working. I got no errors, no warnings, nothing. It didn’t even give me an indication stating that it was trying to open PhpStorm. So, like any sensible person I…
-
Is OSX the best Linux
Someone I know mentioned in passing that OSX is the best Linux out there and I have been thinking about it ever since. A lot of developers I know get MacBooks to work on (and not Linux desktops or laptops) for multiple reasons. The business has a point of support they can pester if anything…
-
Dota 2 on Linux (again)
So, I had to reboot my computer and it booted into my Linux partition. I thought I would give Dota 2 another try. Maybe there is something I can do to improve the performance and I came across this forum in which a Valve developer said they made performance improvements to Dota 2. So, like…
-
Convert an array to XML in PHP
I haven’t benchmarked the memory consumption of this method versus just traversing the array yourself and writing XML but I can’t see anything else being more efficient than this. $testArray = [ ‘key1’ => ‘val1’, ‘key2’ => [ ‘key3’ => ‘hello’ ] ]; $xml = new SimpleXMLElement(‘<root/>’); array_walk_recursive($testArray, array ($xml, ‘addChild’)); print $xml->asXML();
-
My experience with Dota 2 on Linux
I love Linux. I love developing on it and the powerful command line that Linux has is really great. When I heard that Dota 2 had been released for Linux I was excited. I didn’t have to be on Windows just so I could play games. I installed 2 days ago and installed Steam and…
-
Sketchbook app for Android
I have a Samsung Galaxy Note II. As you may already know, it has a big screen and the fact that it comes with a note taking app made by Samsung (I think) makes it very useful to jot down ideas, doodle, etc. I, however, wondered if there was an app that would facilitate doodling…
Got any book recommendations?