Skip to main content

Posts

Get Google Glass on your Nexus (or in that case Android)

Guess we all are interested about Google Glass. Pretty interested I might say. And all the more since the Glass Explorer prototypes started making its way to the dev community. Last day while reading a idea gist about what might be some good things to implement in glass fro Wikimedia I was pointed to the Glass Viewer in Google Glass Developer portal( Playground ). And today I found a way to run Glass apps in my Nexus 4. Thanks to Michael Evans(as he pointed that out) and Google we now have working factory images for the XE5 root. Get them at  https://plus.google.com/114052868601022948953/posts/Y3bFHYp7tCZ The build process is also very detailed.  And then we have another dump (which is very useful) from AndroidPolice Now how would you like if these were repackaged as install-able APK's which you can try in your android? Google Glass's build process is fairly conservative - they don't use hidden APIs often, and when they do, they use reflect...

A Microsoft Employees Rant: “I Contribute to the Windows Kernel. We Are Slower Than Other Operating Systems. Here Is Why.”

I was having a discussion in a forum with Marc Bevand about how windows is still slow despite of the “fast” windows 8. And out of nowhere an anonymous Microsoft developer who contributes to the Windows NT kernel wrote a fantastic and honest response acknowledging this problem and explaining its cause. The post has since been deleted. But I am re-posting it since it’s too insightful. PS: The anonymous poster himself deleted his post as he thought it was too cruel and did not help make his point, which is about the social dynamics of spontaneous contribution. However he let me know he does not mind the re-post at the condition I redact the SHA1 hash info, which I did "I’m a developer in Windows and contribute to the NT kernel. (Proof: the SHA1 hash of revision #102 of [Edit: filename redacted] is [Edit: hash redacted].) I’m posting through Tor for obvious reasons. Windows is indeed slower than other operating systems in many scenarios, and the gap i...

Testing With Python: The Django Way Part 2

This is the second part of what I started here . You can read the first post of  Testing With Python: The Django Way  to understand this one. Now where were we? The last time we left at test data. Now we will delve into requests. GET Requests The easiest of your views to test are the ones that only handle GET requests. All you have to do is retrieve the correct item from the database and display the information. Let's use the canonical book/author/publisher example. Suppose we're testing a view that displays the details for a particular book.  def test_book_detail(self):     testbook = Book.objects.all()[0]     url = '/books/id/' + str(testbook.id)     response = self.client.get(url)     self.assertContains(response, testbook.title) The first thing I want to stress, is that I think it's important that no specific test data is used in the tests. Always try to select objects you're going to use for your tests ...

Testing With Python: The Django Way Part 1

One thing I really slacked on while developing AWiKi (it's on internal network hence can't show you) was testing. Maybe that's not the right way to put it. It's not like I didn't test. In fact, I did a lot of testing. A lot of painstaking manual testing. For every change. So, in a way it was really the opposite of slacking. It was working a whole lot harder than I really needed to. It was also dumb.   Being conversant in conventional Automation methods I quickly tried my hands on automating a few scenarios using QTP and Selenium. But this soon led me to a more severe problem: I was surrounded with uncountable number of scenarios I needed to automate and soon it was eating more time than I was devoting in the development. Soon I realized What I did slack on, was figuring out how Django's unit testing framework worked. Well, no more! In fact, it's really easy to set up. Writing tests can also be somewhat painstaking when it comes to ensuring you've c...

Maximum Call Stack size exceeded: My mishap with nodejs and MongoDB

Working with nodejs is always an adventure and mix MongoDB with it, and it becomes very interesting for a nodejs enthusiast like me. While working on a pet project involving Native MongoDb driver and nodejs I encountered a weird problem. RangeError : Maximum call stack size exceeded   As usual my first thought was to Google out what I was facing and googling it out led me to the following to links.   RangeError: Maximum call stack size exceeded Calling Model.collection.save() RangeError: Maximum call stack size exceeded Also In some posts in MongoDB’s forum I saw that peoples said saving in `process.nextTick` or wrapping the call function in `parseInt` will also fix the problem, but it most certainly didn't work for me.So I started digging in on my own and soon enough found the reason. If you’re trying to save a document and saving process somehow exited with an RangeError: Maximum call stack size exceeded  exception, it’s related to what you wa...

April Fool and Google (2013): Collection of All Google’s April Fools Jokes

Every year, Google goes all out for April Fools’ Day. The company not only pulls together more jokes than all the other tech giants, but the company makes a point to outdo itself too. It honestly gets difficult to keep track of everything Google thinks up, so  Like Last Year  I'm putting together a roundup. 1. Google Maps Treasure Mode First up, Google has created a new  treasure map mode on Google Maps . Last year, the company showed off an 8-bit version, but this year it wants you to go out and explore 2D hand drawn landmarks, find hidden treasure chests, and “Beaware of pirates!” (yep, that’s a typo). Google’s  announcement  talks of the Google Maps Street View team finding a treasure map belonging to the infamous pirate, William “Captain” Kidd, on a recent expedition in the Indian Ocean to expand its underwater Street View collection. The map contains a variety of encrypted symbols which you are tasked with deciphering: Googl...

Request module: non-callable Dict Object

So, you are using the amazing requests module of Python! So checked their sample code in the website: http://docs.python-requests.org/en/latest/ and the URL you are calling returns json content. So you followed their example and came up with a code like this: import requests url = '' # put your url here r = requests.get(url) json_content = r.json() print json_content When you run the program, you get the following error: json_content = r.json() TypeError: 'dict' object is not callable Now you are wondering what is this! An example from the home page doesn't work. So you searched Google and came here. Now you solve the problem using json_content = r.json instead of json_content = r.json() So this code will work (Python 2.7): import requests url = '' # put your url here r = requests.get(url) json_content = r.json print json_content If you are wondering why you got the error in the first code, let me give you a hint. Add the followi...