Thursday, December 30, 2010

The best mobile development platform for hobbyist programmer - IV

The best mobile development platform for hobbyist programmer - I
The best mobile development platform for hobbyist programmer - II
The best mobile development platform for hobbyist programmer - III

Over the last few years the whole mobile landscape has completely changed. Now the contenders have also changed. When I last wrote about the topic there was no SDK for the iPhone and Android had not launched. Since then the whole landscape has changed. iPhone is the king amongst the platforms. Android is a close second. J2ME is a platform which still goes unnoticed since its just not part of most new smartphones. The process to develop Windows Mobile apps has gone a complete transformation with a completely brand new way of developing apps. Symbian is in its last leg, Nokia will be moving to MeeGo soon enough. Palm development also changed completely with the launch of Web OS. If you plan to develop today here is how you can go about it.

1) iOS Development - SDK for iDevices
2) Android
3) Palm Web OS
4) Windows Mobile
5) Symbian
6) RIM - Developing for the BlackBerry
7) MeeGo - Upcoming mobile platform
8) Java ME - If you plan to develop for most feature phones.

Saturday, November 27, 2010

Iomega ScreenPlay Director HD review/hacks

I bought the iomega ScreenPlay Director HD a few weeks back. Hardware wise the product is perfect. The only place where it really lets you down is the software. Calling the UI on this system ugly would be an understatement of the century. To top it all none of the advertised features like Youtube and Shoutcast work. If you want to copy a file over the network get ready to sleep. The speed is no more than 10MBps and again that is on the higher side, it more like 4-5 MBps. If you want to copy all your stuff you will have to copy it using USB. The Ethernet cable will not really help you. I had initially thought that I would use it like a NAS but that seems almost impossible with such a slow speed.

I figured since this system runs of Linux I would be able to somehow telnet into the system. This system is completely locked down. I've been searching quite a bit to figure out ways to atleast telnet but so far all the efforts have not yielded any results. I still don't get it, if iomega cannot provide good quailty software why don't they atleast let others who know how to develop software tinker with the device.

If you are looking for places to find information about how to get started with hacking the device here are a few links which can get you started. If you somehow figure out a way to telnet please do let me know.

http://foro.wydev.es/ - Forum is in Spanish but some good information. You can use Chrome with its auto translate mode incase you don't know Spanish.

http://www.iomegasupportforums.com/ - This is the official forum and surprisingly its not indexed by Google so will very rarely see the links using Google.

There is one very interesting piece of information in the forums if you try http://screenplay-550c:49152/, here screenplay-550c is name or ip of the device. It returns a 500 Internal Server Error. So there is a webserver running on the device. I think its got to do something with UPnP A/V & DLNA Media Server.

UPDATE (March 12th, 2011): I read in the forum that you can mount the hidden partitions using JFSutils.

Friday, July 09, 2010

Getting song information from a shoutcast server

This is a very simple way to get the currently playing song information from the server. Append /7.html to the music stream. This will give out a HTML file with the following details. There is CSV information inside the body. Based on the position you can find the following information.

1. Current Listeners:
2. Status:
3. Peak Listeners:
4. Max Listeners:
5. Reported Listeners:
6. Bitrate:
7. Song Title:

To see whats currently playing on Radio TeenTaal you can try http://91.121.155.39/7.html.

Thursday, May 13, 2010

The all new Facebook XSS scammers

Am surprised that I have not heard about it on any of the tech blogs. Every other day I get a mail from facebook from one of my friends to see this amazing picture or solve a riddle. Since the mail is coming directly from your friends its difficult to ignore it as spam. It is the perfect example of social engineering to get information from users and spread it further.

The scam starts with an email from your friend with the link to a facebook page (Do not open it before you've read the whole post and understand the consequences). When you open the page you see the wizard with the following steps.

Step #1: Press and HOLD CTRL AND press the letter C

The step is nice and animated so that you know what you are doing. When you have clicked it takes you to step 2. Which shows that you have "Successfully Copied Code To Your Clipboard!". It does not tell you what code but just that some code has been copied.

Step #2: Press and HOLD ALT AND press the letter D

Even in this step as you press the keys you see an animated effect which gives you feedback about what you are doing. And it highlights the address bar. It even animates the fact by displaying "Successfully Selected Your Address Bar!". And takes you to step 3.

Step #3: Press and HOLD CTRL AND press the letter V Finally, press ENTER to reveal!

Since most users will blindly follow the instructions they end up pasting the javascript code in the address bar that enables the scammers to get into your facebook account and send out an email to all your friends that you like that page and recommend it to them. Most of your friends who trust you will blindly follow the same instructions thinking that you suggested that page.

Since its a network effect more and more people keep on getting scammed. To most people it might seem like nothing more than spamming. But in reality it can be a lot more harmful than you think. Since the spammer can get you cookies all your private information is out to them. All your private photos, notes, videos and private information is no longer private. Send chat messages to all your friends who are logged in.

The scammer has the same privileges as you have. They can do everything that you can do. All you personal information is no longer personal as the scammer can log into your facebook account with your cookies.

If you think you have been scammed log out of facebook and log in again. Goto http://www.facebook.com/editapps.php and make sure there is no application there which you have not authorized to post information. Also if you still really paranoid make sure you change your password.

If you look at that facebook page it will take you to the wall and show you how many people have been duped. In time when someone at facebook finally disables it you will be redirected to the homepage. Its easy to see that new users are added every second. With every new user that likes that page that user has been duped and a mail is sent to everyone on his list.

Monday, May 10, 2010

Force shoutcast server to send audio stream

This is something I had read about some 7 years back but had completely forgotten about it. Basically I was trying to get the audio stream from the shoutcast server in the browser.

If you open the shoutcast url in the browser you will get a html page and not the audio stream. To force the audio stream use http://example.com:8032/;stream.mp3 the ;stream.mp3 in the end forces the server to send the audio stream. You don't even have to write ;stream.mp3 you just need to add a ; (semicolon) in the end.

Hopefully next time around I am looking for it. I can read it here. I was looking for this info an year back but wasted quite a bit of time but could not figure it out.

Saturday, May 08, 2010

Deleting a file with a . (period) in the end

This one had me baffled for a complete day. I was downloading this file and the filename was myfile.mp4.. Since the file was not completely downloaded I tried deleting it but I got the error.

Cannot delete file: Cannot read from the source file or disk.
I tried renaming it and I got an even weirder error.

The system cannot find the specified file
I figured it would be easier to remove it from the command line so I tried del "myfile.mp4." but to my surprise even that did not work out. After almost giving up I tried Google and it came up with these solutions on support.microsoft.com. Even that did not help out.

After spending a few more minutes searching online I realized that the problem was in the way windows treats filenames. Since each file has two names one the 8.3 format and the other name which we normally use.

To see a list of files in 8.3 use the command on the command line. dir/x Try this in the directory and see the 8.3 name for that file. Now try and delete it using the 8.3 and hopefully you will be able to remove the file. In my case it was del MYFILE~1 that did the trick. Since I wasted so much time this problem certainly deserved a post.

Thursday, April 29, 2010

COMET for Chirp User Streams - II

After almost giving up I finally figured out a way to use the Chirp User Streams. Not the best way to use it but I guess it just might work. Create a XHR request and abort it ever other minute. It will complete the request and make a new request. Try and keep the connection alive. This is something that facebook does in its chat. Thought there the connection is aborted by the server.

In this case make sure that you abort and make the connection the very next second. It should be possible to use the same connection to reconnect to the server. But I have not tested it extensively to see how it will work in a real world situation.

For now it works and hopefully when I again get to work on it I will write something more about how I use the ChirpUserStreams.

COMET for Chirp User Streams


First there was AJAX and to give it company there was COMET. Incidentally both names of popular disinfectants in North America. In JavaScript AJAX allows the client to PULL information from the server and COMET is the technology where the server PUSHES down information to the client.

I got interested in COMET after going through Chirp User Streams. Thinking it would be a trivial task to call a XHR and keep listening to it. In my mind I kept thinking that it would be stuck on readyState 3 and it will never get to 4. Since it would be stuck at 3 I could use a timer and after every few seconds keep checking for the change in length of xhr.responseText.length. Technically it should work like that.. BUT.. the way IE has implemented XHR it is not possible to check the responseText till it reaches 4. Which means that the request has timed out or ended. That somehow makes no sense at all.

I figured out it was time to investigate and see how Facebook and GTalk were able to work on IE if it does not allow you to read text till it reaches readyState 4. Facebook makes a XHR and keeps waiting, after a minute if there is no data it sends some data and the connection is closed and a new connection is made. Incase there was some event in between that minute the XHR reaches readyState 4 and a new connection is made. In a way facebook makes a new connection for every new event. Here a bunch of events can also be merged together to make it more efficient.

While looking into it I also figured out the other way to use COMET. But in that case you need to make changes on the server side. You basically use an IFRAME and send out information in chunks. Every time the server wants to PUSH some data or call an event it makes a new SCRIPT element with the data. Since the script is executed instantly the client can listen to events that way.

In all this confusion I realized that there is no easy way to use Chirp User Streams using XHR in IE. Might have to look into WININET to get the work done.

Thursday, April 22, 2010

Moving from Basic Auth -> OAuth -> xAuth

Twitter will remove the option to use Basic Auth from June onwards and the only option left is OAuth. But the problem with OAuth is that its a UX nightmare to implement in a Desktop application. After trying to figure out how to use OAuth all day long I finally figured out that I was looking for xAuth all along.

Cutting a long story short I found a blogpost which helped me get a hang of it. Using xAuth, an alternate OAuth from Twitter. Also found a little bit of help on the twitter wiki on using xAuth. Its quite simple to use once you get a hang of it. But since it mentions headers in most of the places I assumed HTTP headers but you need to provide all the parameters when you POST it to twitter.

I have sent out a mail to enable xAuth on my account lets see how long that takes and I can finally start using xAuth instead of the cumbersome OAuth to log into twitter.

Wednesday, April 21, 2010

Adobe Stratus - P2P networking using your webbrowser

With the launch of Flash 10 there is a P2P technology Stratus built right into flash. When it was launched I was not really interested in it as it takes time to deploy the latest flash runtime. But in less than an year Flash 10 has been deployed on more than 90% of the systems worldwide (According to these stats on adobe.com).

I personally don't like flash but flash is not just about animations and videos. Its a lot more than that. And these things are what will keep flash alive even after the onslaught of "HTML5". The problem is HTML5 is made out to be this magical solution that will rid the world of Flash. Unfortunately with people like Steve Jobs promoting HTML5 as the solution to all Flash problems most people blindly start to believe it.

The reason Flash really works is that the deployment is so large and most people have it installed even if they don't know about it. iPhone got away without using flash as they had partnered with Google when they first launched the iPhone. They got an application built for it that would stream YouTube content so most people really did not miss flash on one of the biggest sites which uses flash. With the strong momentum that iPhone had flash got sidelined and the only place where we now think of flash is for Videos or Animations.

With Stratus you can do things that till now were not possible without setting up a huge server farm. List of webapps using Flash based P2P KKloud Cloud , PipeBytes, Files Over Miles and JetBytes. Even Chatroulette uses Stratus to connect users together. Since there is no server in between the cost of hosting video and voice chat is almost minimal.

There might be more applications which are using it and I will try and keep this post updated with new services which use it when they are launched.

Friday, April 16, 2010

Dynamic GUI and console windows application

Running the same executable as a GUI as well as console application. This is one problem I had come across a few years back. But I soon realized that its decided while linking if an executable will be GUI or console application.

But given the amount of time its been I thought of searching online and I came across this article "How do I write a program that can be run either as a console or a GUI application?". It kinda had a solution but in the end its still better to have two separate executables. One for GUI apps and the other for console apps. After all these years Java also has two executables. java.exe for console apps and javaw.exe for GUI apps.

There are two bytes in the executable file which tell the OS if the file is Console or GUI app. Change those bytes and you can run it as a console or GUI application. For more information about the PE format visit http://wotsit.org.

Hopefully this is the first in the series and hopefully I will be writing more about it soon.

Quick update for April 2010

Its been a few weeks since I've been working on my personal projects. I need to manage them a little better. Will be setting up a bugs database and also a project management system to better manage the workflow. All that happens tomorrow morning.

I also want to blog on a more regular basis and I am learning quite a lot these days. And it always helps to write it down. I guess I should start that with the next post in a few minutes.

Wednesday, March 03, 2010

New beginnings

Over the last 3 years I've very rarely written about my work but I guess since its all behind me now I can talk about it. For the last 3 and half years I was working with Opera Software and in the coming days I will be leaving the job.

I have met some amazing people at Opera and have had a great time working with the people there. The people who worked in the India office have been really friendly and I have had a great time working with you guys.

Am still not sure what I will be doing next. I want to take a few months off and try to finish of my personal projects. I also want to learn something new and probably prepare for a new beginning.

I was going to write a post on my birthday but there was so much going on that I got little time to write anything. Over the last one year so many things have changed. Even though I loved working at Opera over the last few months I felt that my work had stagnated and I had reached a point where I had to move on.

Hopefully if I take the next few months off I will get more time to write posts. This time around I will be writing about all the new things that I come across and hopefully bring back this blog alive :P (Seems more like a dream but lets see....)

Monday, February 22, 2010

Been a while since I wrote something

Its been 3 months since I wrote anything here. A lot has happened since then and hopefully continuing with the birthday tradition will be posting something tonight or maybe tomorrow. Also want to write about a few technology posts that have been going on in my mind and been in the drafts mode for a really long time now.

The birthday post normally set my goals for the year and somehow they also seem to work and get me to my goals. More when I write that post.