Thursday, December 29, 2011
6 Wheeled Monster Off-Road Mercedes Mutant Vehicle in New Mad Max 4 Movie
Foxy Shahzadi VW Art Car and the Rocking Alhabib Ejaz who Painted it
Tuesday, December 27, 2011
[How to] Use error console in Native UI for Firefox on Android
Developers use different techniques for debugging their web applications. Though there are lots of new techniques coming up in this space, one technique which is still widely used is console logging. Every browser (including the mobile browsers) supports this feature in some capacity. I have been using Firefox on my Nexus One and it has an in-built error console which can be enabled from about:config. However, with the new native UI for Firefox on Android, this option does not seem to be available. Read through this post to find out how you can use error console in the native UI.
Error Console in Firefox Native UI
Firefox Native UI writes all the console messages to Android system log which can be read via logcat which comes along with the Android SDK.
- Android SDK. Download and install the latest Android SDK from here. This comes up with all the tools needed for development and testing of your application. Once the SDK is installed, go to the location on which the SDK is installed. Run ‘adb logcat’ - this will show the complete log from Android system. To view Firefox specific log messages, do a grep: ‘adb logcat | grep “Gecko”’. To view Firefox console messages alone, do a grep: ‘adb logcat | grep “GeckoConsole”’.
- If you don't want to install Android SDK, you can use apps like aLogCat (Android app for viewing the logs). The app provides an option for filtering the logs and also comes with lots of other accessibility options.
-- Varun
Monday, December 26, 2011
1969 Mustang Skull Art Car Falls On Hard Times - Prehistoric Hoarder With A Glue Gun Art Car
10,000 pieces of scrap metal + 3 German Friends = Amazing Scrap Metal Mercedes 300SLR Art Car
Saturday, December 24, 2011
6 Stunning Reasons why this Porsche Art Car by Miguel Paredes is so Amazing
Thursday, December 22, 2011
Ghost Art Car Driving through Town
Monday, December 19, 2011
Candy Cane Car Not For Sale - By Pogo Dave
Thursday, December 15, 2011
Rock and Roll Art Car
Tuesday, December 6, 2011
Military Art Car Project Needs Your Vote
Saturday, November 26, 2011
Arduino based game controller
Being the big fan of technology that I am, I always wanted to try out the latest things happening on the technology world. Some of the buzz words being talked about in the technology world are HTML5 and mobile development. After having fun writing games during my college days, I was interested in building a HTML5 based game. Then, I came across this HTML5 based implementation of classic Helicopter game. In the mean time, I was also playing around with Android ADK and Arduino boards. Finally, made up my mind to hack something cool connecting all these technologies – HTML5, mobile and USB accessories. And, here is the result of the experiment - “Arduino based game controller”. In a nutshell, it’s a game controller which can be connected to an Android phone using which we can play HTML5 games on the browser. The heart of the hack was built over a weekend and source code of the same can be found here. Check out the video demo of the hack at the end of this post.
What is it?
Arduino based game controller is a Joystick / game controller which can be connected to an Android phone via USB. Using the controller, we can play games on the browser. An android driver app has been built which reads the data from the game controller (using Android ADK) and routes it to the browser over web sockets. The game has been hosted here (The multi-player mode might not work properly as the hosting site does not support web sockets). More detailed information can be found here.
The hack consists of three core modules:
1. Game module. HTML5 based Helicopter game originally written by Dale Harvey. The game uses HTML5 canvas for rendering the game elements. I have forked his code and have built the networking layer of the game. I have integrated the game with Node.js and Socket.io to support multi-user mode. In order to facilitate seamless communication between the controller and the game module, web socket technologies have been used.
2. Joystick / Controller module. For this hack, I have used Arduino Mega ADK board and a joystick shield mounted on top of it. Arduino board has been flashed with the firmware which reads analog data from the controller and sends it to the connected Android device using Android accessory protocol.
3. Android module. An android app for linking the game module and the controller. The app can be installed on any device running Android 2.3.4 (Your device needs to have the USB compatibility library). It reads the data from the controller and forwards it to the browser over web sockets.
How to contribute?
The source code is available here under MIT licence. I have added enough inline documentations all around the code. Please send any bugs, feedback, complaints, patches about the hack to me at varunkumar.n@gmail.com.
-- Varun
Saturday, November 19, 2011
Sitting on the Fence - Locked Gate Artist Riding on the Locked Gate Bike of Indecision
Friday, November 18, 2011
Bone Art Cars Discovered - The End is Near for the Combustion Engine
Thursday, November 17, 2011
Star Wars Art Car STOLEN!!!!!!
Thursday, November 3, 2011
‘Occupy Wall Street’ Protester Art Car for the 99%
Tuesday, November 1, 2011
30 Hoop Art Cars of Extreme Awesomeness
Tuesday, October 18, 2011
Android 4.0 Ice Cream Sandwich Screenshots
Google and Samsung announced their latest smart phone Galaxy Nexus earlier today. It has awesome hardware capabilities and the offerings from Android 4.0 are quite exciting. Check out the official blog post here. Android 4.0 SDK was also released today and you can download it from here. I downloaded the SDK and played around with the emulator. Emulator seems to be faster than that of HoneyComb but still you will find some slowness compared to previous versions.
Note: Hover over each screenshot to know more about it. Click on a screenshot to enlarge it.
-- Varun
Sunday, October 16, 2011
Less , the dynamic style sheet language
A style sheet language is one which describes how a document has to be structured and styled. The most widely used style sheet language is CSS and is mostly used for styling web pages written in HTML. If you have developed even a simple web page, you would have definitely come across CSS and would have used it in some form. CSS plays an important role in the success of modern web applications with rich UI. CSS has gone through various iterations with the latest one being CSS3. However, there are some limitations with CSS. We can’t do dynamic stuffs like interpolating a property based on a variable, re-using a property value across classes, etc. Less is an extension to CSS with dynamic behaviour such as variables, mixins, operations and functions. We can write complex CSS styles with Less. Do more with Less.
Highlights:
Variables. This is a very useful addition to CSS. In most of our CSS files, we would have some repeating values like color, font-size, etc. With Less, we can define global variables for these values and use them across the classes.
Mixins. Mixins allow you to embed all the properties of a class into another class by simply including the class name as one of its properties. It’s just like variables, but for whole classes.
Nested Rules. Often, we write some complex selectors which are lengthy and hard to read. With Less, you can simply nest selectors inside other selectors. This will improve the readability and makes inheritance clear.
Functions & Operations. Sometimes we would need to write a class in proportion to an existing class, for example a class for hover will have properties opposite to that of its base class. With Less operations (add, subtract, multiply and divide) on property values, you can build a complex relationship between properties.
How to use Less?
Less can be used on the client side (on browser) as well as on the server side (using Node.js).
- On the client side, we need someone to understand Less syntax and converts them to browser understandable CSS. This is done by Less.js which needs to be included on the client side. Less files are saved with .less extension and can be linked to your page with rel attribute set to ‘stylesheet/less’. Make sure the style sheet is included before loading Less.js. The only drawback with this approach is that the conversion happens every time the page is loaded.
Browser Support
Since Less uses basic JavaScript techniques, almost all the browsers support Less - IE 6+, Webkit and Firefox.
I have been using Less for quite sometime now and it seems to be very handy. Who else uses this? Twitter uses Less in its UI toolkit Bootstrap. Try it out yourself. Do more with Less. The source for Less is available here under Apache License. Know more about it here.
-- Varun
Saturday, October 15, 2011
Star Trek Art Car - from Greece?
Wednesday, October 12, 2011
Sausalito Art Car Gets New Life by Heather Wilcoxon
[How to] Run Android apps on Windows
I have written earlier about installing Android market on the emulator and running Android apps on it. Here is a much simpler way of running Android apps from your PC. BlueStacks is a cool app which lets you run Android apps on your Windows PC. The application is available for free and it supports only Windows as of now. There is also an Android app which facilitates syncing of apps between your smartphone and the PC.
Features:
- Full screen mode for apps.
- Sync apps between Android smartphone and PC using BlueStacks Cloud Connect.
- Install up to a maximum of 26 apps. (Unlimited in the case of yet to be released Pro version).
Try it out here. Mac version of BlueStacks will be available soon.
-- Varun
Tuesday, October 11, 2011
The Fin Car by Bill Lockner
Saturday, October 1, 2011
Per-Element FullScreen API
I have been following the developments on Chromium channel and one thing which caught my attention last week is the fullscreen API. As the name suggests, the API supports “per-element” fullscreen on the browser. Traditionally browsers have been supporting fullscreen mode for the entire page but not for the elements on the page. This API will be handy if you want to focus on a particular piece of information on the page. Most of the analytics application can make use of this API to show more detailed information. I have worked on applications which spans across two monitors as it displays huge amount of information. With this API, I can utilize the real estate effectively. Multimedia contents can also be shown on fullscreen. The API, which is based on the Mozilla’s proposal, has two JavaScript methods: requestFullScreen() and cancelFullScreen(). Check out the demo here.
How do we use it?
The API includes the following methods to all the elements in the DOM:
- requestFullScreen(): Requesting the browser to render the current element in fullscreen. On using this method, the keys will be disabled and the element will not receive any keyboard events. This is to protect the users from potential phishing attacks in fullscreen mode.
- requestFullScreenWithKeys(): Same as requestFullScreen() but with access to keyboard events.
- cancelFullScreen(): Use this method to return back to the normal mode.
These methods have been added to all the elements in the DOM. Apart of this, a new attribute allowfullscreen has been added for the iframe element. You can also listen to the event fullscreenchange to know the state of the element. Three CSS pseudo elements have also been added: :full-screen, :full-screen-doc and :full-screen-root-with-target. Using these pseudo elements, you can control how you want your elements to appear in fullscreen mode.
Criticism:
The proposal received many criticism from the security experts. Some of the concerns are:
- Attackers can request fullscreen and pre-empt keyboard focus. Your security credentials could possibly be stolen.
- Increased chances for phishing attacks.
- One could open up fullscreen mode without user interaction (which in my opinion is very bad).
The aforementioned concerns can be addressed if control is given to the users to allow / deny fullscreen mode. Also, plug-ins should be disabled in the fullscreen mode.
Browser Support:
- Safari 5+ (with webkit prefix)
- Chrome 14+ (with webkit prefix). Chrome 14 requires the flag: –enable-fullscreen. It has been enabled by default in Chrome 15 (not yet released at the time of this post)
- Implementation of the API is in progress for Firefox. It is expected to be available as part of Firefox 10.
Check out this page for demo. More details can be found here.
-- Varun
Monday, September 19, 2011
LocalTunnel: Access your local web server on the internet
If you are a web developer, here is an interesting article for you. At some stage of the development, you might want to share / demo your web application to people outside your local network. This is a common problem in the life of a web developer. There are many ways to expose the contents on your local web server to the external world. Some of the commonly used techniques include: Port forwarding, SSH reverse tunnelling, etc. LocalTunnel is a free service that lets you share your local web server in an easy way.
LocalTunnel is a Ruby program which works on the basis of SSH reverse tunnelling. It connects to a remote host that has Gateway ports enabled. The remote host service is available for free at http://localtunnel.com. After installing LocalTunnel, localtunnel command facilitates the connection between local server and the remote host.
How to use?
- LocalTunnel can be installed using RubyGems. sudo gem install localtunnel.
- Start your local development server. It can run on any port.
- Run the localtunnel command passing the local port number. When the command is executed for the first time, you need to pass the SSH public key. More details here. localtunnel –k ~/.ssh/id_rsa.pub 8888
- If the command was successfully executed, it will show the URL to access the dev server. Note: The URL is valid only for this session. Share it with your friends. And, you are done.
LocalTunnel is hosted on github under MIT license.
-- Varun
Tuesday, September 13, 2011
JavaScript Remote Debugging
Mobile browsers are becoming more powerful day-by-day and you can do almost everything you do on your desktop browser. Many mobile app developers have already started moving towards mobile web app instead of native app. Apps are being built using HTML5 and rich JS libraries. However, one of the major concerns for the developers is the lack of developer tools. The reasons are quite obvious – real estate needed to show the debugger, non-developer friendly environment. The solution to this problem is remote debugging. I have been using JSConsole for this purpose. It comes handy when we want to inspect DOM of the webpage. I stumbled upon “Aardwolf” yesterday and it seems to be a better alternative for JSConsole when it comes to JavaScript debugging. Aardwolf is powered by Node.js.
Features:
- Breakpoints
- Call Stack
- Exception reporting
- JS Console remoting
How does it work?
Aardwolf is a Node application which listens on two ports – One for the debugger UI (8000), another one for the JS file server (8500). It has a code rewriter which rewrites the JS files to be debugged (dynamically). The rewritten JS files are served by the JS file server. The application to be debugged should consume JS files from the above mentioned JS server (rather than the original JS files). This will help establishing connection and adding hooks for debugging. Once the connection is established, we can add breakpoints and debug the JavaScript file.
How to set up Aardwolf?
- Create a file ‘config/config.local.js’ within the checked out location. Add the following lines to it:
var config = require('../config/config.defaults.js');
config.serverHost = 'ip-or-hostname-of-your-computer';
config.jsFileServerBaseDir = '/path/to/www/root';
- Start the server by running “node app.js” (Make sure that Node.js is installed on your machine)
- Add the debug library to your web app. Also, all the JS files to be debugged should be served from the JS file server.
<script type="text/javascript" src="http://ip-or-hostname-of-your-computer:8500/aardwolf.js"></script>
<script type="text/javascript" src="http://ip-or-hostname-of-your-computer:8500/some-script.js"></script>
<script type="text/javascript" src="http://ip-or-hostname-of-your-computer:8500/some-other-script.js"></script>
- After the server starts up, open http://localhost:8000 in your desktop browser. The debugger UI should appear.
- Open the web app on your phone and wait for the page to load. The debugger UI will show “Mobile device connected” once the connection is established.
- You can set the breakpoints and view the call stacks on the right pane.
The source code is available on github as well as on bitbucket. The project is available under the MIT license. Aardwolf does not seem to be good at inspecting DOM elements. We can employ both JSConsole and Aardwolf to make our debugging job easier. Happy debugging!!
-- Varun
New sharing option “Comment-Only” in Google Docs
Google has just updated Google Docs with a much needed feature – New sharing option “Comment-Only”. This feature will be rolled out in the coming weeks. In the current version of Google Docs, we need to give edit permission for the collaborator to add comments. With the new “Comment-Only” permission, we can build better workflow system around Google Docs. The reviewer of the doc can only do the job of reviewing. I was planning to write a Google app script to implement a similar functionality with Google Docs Spreadsheet. “Comment-Only” permission can be mixed with the access permission for the doc.
-- Varun
Tuesday, September 6, 2011
Google DevFests India 2011
Event : Google DevFest 2011More details here.
Venue : The Lalit Ashok Bangalore
Date : Sep 15, 2011 08:30 - 17:00
Venue : HICC and Novotel, Hyderabad
Date : Sep 17, 2011 08:30 - 17:00
-- Varun
Monday, September 5, 2011
Old British ArtCar
Tuesday, August 16, 2011
New toy in the house: Arduino ADK
Yay! I have got a new toy in the house to play with – Just bought Arduino ADK board. Ever since Google announced Android ADK at Google I/O 2011, I have been trying to get hold of one. I couldn’t get it till now because of my geographical location and the demand for the board. Finally, I have ordered it from SimpleLabs, Chennai and received the package yesterday. I will be playing around with it in the next couple of weeks and share my experience in this blog.
What is Android ADK?
Android 3.1 introduces powerful new APIs which allows external USB hardware to interact with an Android device. The APIs are based on a USB stack and services that are built into the platform, including support for both USB host and device interactions. Using the APIs, we can create applications that are able to discover, communicate with, and manage a variety of device types connected over USB. More info here.
Arduino ADK
The Arduino ADK is a microcontroller board based on the ATmega2560 (datasheet). It has a USB host interface to connect with Android based phones, based on the MAX3421e IC. It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. Source: Arduino.cc
-- Varun