Skip to main content

Posts

Showing posts with the label node.js

Developing for Android: HTML5 and Qt

Recently read a post by my friend and ex-collegue Sai Geetha on her very famous Android blog . I am now reading her blog to start learning a bit about Android development. In her most recent post, she has listed 4 ways for developing in Android. 1. Using the Software Development Kit (SDK) with Java 2. Native Development Kit using C / C ++. 3. RenderScript using C99 - used to write faster graphics code like the Google Books page turn animation etc. 4. Android Scripting Layer using Python etc. Just thought I'll extend the above further and add a couple of thoughts to this list... The trend now and what is gaining a lot of traction is developing cross platform apps. So you develop once and can deploy it on multiple platforms. Java showed this promise earlier, but is slowly making way for the newer and greater things out there. One should see how the recently released Java7 will perform. And Java is still the greatest thing for Android development today. Java is also the reco

Node.js and reckless console.log() statements

I've seen code that over uses, nah rather abuses the logger. Many times teams use it in the wrong way or sometimes over use it and then struggle to improve performance. This simple test will show the effect. From the synopsis of Node.js doc, this is my server code: var http = require('http'); http.createServer(function (request, response) {     response.writeHead(200, {'Content-Type': 'text/plain'});     response.end('Hello World\n'); }).listen(8124); console.log('Server running at http://127.0.0.1:8124/'); Now I use JMeter to test the performance. I fire a 1000 HTTP requests within a time frame of 2s, with a wait of 1ms duration in between each new request. In my environment the median response time was 2ms for each request. Now I add a single console log statement for the callback function in the above server code. var http = require('http'); http.createServer(function (request, response) {     response.writeHead(200, {'Content