Suramya's Blog

Visit suramya.com Who am I?

November 17, 2014

Microsoft launches free Visual Studio Community 2013

Microsoft is on a roll recently and is becoming more and more active in the open source community by releasing many of it’s core tools and programs as open source, making them free and cross platform. Earlier this week news came out that MS had released a significant portion of their .NET framework under a permissive opensource license on Github. Before everyone had even finished digesting this news MS posted news that it is releasing Visual Studio Community 2013 as a free download for individual and small business use (teams of up to five people).

This is a brilliant move on their part to keep their market share. One of the major issues people had when developing software for Windows using Visual studio was the cost associated with the licenses. When I was in school and wanted to get a licensed copy of Visual Studio for my use I was told to go buy a pirated copy because the original cost was way too high (Rs 60,000 if you want to know). Keep in might that this is before the Dot com and Tech boom so that amounted to a couple of months of salary for most folks. As you can imagine most people went for the pirated version instead which costed Rs 100 or so. Now fast forward a few years to when open-source started taking off, now the development environment could be downloaded off the internet legally for free. A lot of folks including me switched to open source development tools. The only people still using MS Studio were either using their work/university licenses or were on pirated copies.

Now with .NET opensourced and available for use on Linux, Mac and windows, making a free version of Visual Studio available makes it easier for people to start working on and building software in the MS ecosystem.

I know of a few people who will find this news exciting. For the rest of us, this doesn’t impact us directly but definitely shows which way the wind is blowing in the software world and highlights the fact that FOSS is here to stay. :)

Official Announcement: Microsoft Blog
Via Betanews.com

– Suramya

PS: I know that Visual Studio express has been around for a while but it was a severely limited version as opposed to the Community version just released.

November 6, 2014

The Internet Arcade releases over 900 classic arcade games for the browser

Filed under: Computer Software,Interesting Sites,Techie Stuff — Suramya @ 1:46 AM

If you are like me then you must have spent a ton of money and time playing classic arcade games like Frogger, Pac-man plus etc over many long afternoons. A few days ago (2 days to be exact) over 900 of such games were released online and the best part is that you can play them right in the browser. Say good-bye to the possibility of doing any productive work for the next couple of days. :)

Check it out at: The Internet Arcade.

Of the roughly 900 arcade games (yes, nine hundred arcade games) up there, some are in pretty weird shape – vector games are an issue, scaling is broken for some, and some have control mechanisms that are just not going to translate to a keyboard or even a joypad.

But damn if so many are good enough. More than good enough. In the right browser, on a speedy machine, it almost feels perfect. The usual debates about the “realness” of emulation come into play, but it works.

Obviously, a lot of people are going to migrate to games they recognize and ones that they may not have played in years. They’ll do a few rounds, probably get their asses kicked, smile, and go back to their news sites.

A few more, I hope, will go towards games they’ve never heard of, with rules they have to suss out, and maybe more people will play some of these arcades in the coming months than the games ever saw in their “real” lifetimes.

Well this is all for now. I am off to relive some memories and to try getting the stupid frog across the road without getting squished.

Source: Slashdot.org

– Suramya

November 3, 2014

Use Excel to Watch Movies at Work

Before I start, let me make it very clear: I don’t recommend that you do this at work. If you get fired for doing this then it is your fault. I take absolutely no responsibility. That being said, lets proceed. I found this very interesting because it shows that no matter how much you try to secure a system there is always a way around any restrictions people put in the system and the only truly secure system is one encased in a ton of concrete at the bottom of the ocean. In this case a user figured out how to use the VBA (Visual Basic for Applications) functionality in Excel to go around the restrictions placed on his computer by his company’s IT department to watch movies at work.

From a Hacker/ingenuity point of view I love this, but from a work perspective I don’t think this was such a good idea. If you really wanted to watch a movie at work then there are easier and safer options to do so; watching it on your phone or tablet is one option that comes to mind. I seriously doubt that his IT admin or his manager would be amused when they find out about this hack.

Behind the cascade of rectangles and in the land of the Excel macro, [AyrA_ch] took advantage of the program’s VBA (Visual Basic for Applications) functions to circumvent the computer’s restrictions. Although VBA typically serves the more-complex-than-usual macro, it can also invoke some Windows API commands, one of which calls Windows Media Player. The Excel file includes a working playlist and some rudimentary controls: play, pause, stop, etc. as well as an inspired pie chart countdown timer.

Hacking things is fun, but folks need to realize that they need stop being stupid about it. I am sure there is a lot of things I can do at work that I might not be supposed to but just because you can, doesn’t mean that you should.

Check out the original post on Reddit for a link to the file and a more detailed explanation.

Thanks to Hackaday.com for the story.

– Suramya

October 11, 2014

Microsoft Research releases Android Wear keyboard prototype

Filed under: Computer Hardware,Computer Software,My Thoughts,Techie Stuff — Suramya @ 5:33 PM

Yes, you read that correctly. Microsoft Research has released the prototype of it’s new keyboard for Android Wear which allows you to input text by drawing letters on the watch face. This is not the first time MS has released stuff of android and I am quite happy with this trend.

The idea of inputting text by drawing characters is not new. If you remember the Palm OS devices they had a keyboard call Graffiti which used a sort of shorthand of letting you input text. I used to love it and had it installed it on my Galaxy Nexus and used it quite often till it got replaced by the voice typing option on the Google Keyboard.

As touch screens are getting smaller, soft keyboards are getting harder to use. For example, on a 1.6” smart watch, a soft keyboard with 10 keys across has keys less than 1/8” (3mm) wide. Speech recognition can be a viable alternative, but unfortunately, speaking into your watch is not always appropriate or even possible (noisy environments).

With the Analog Keyboard Project we are exploring handwriting recognition for text input on small touch screens. Handwriting, unlike speech, is discreet and not prone to background noise. And unlike soft keyboards, where many keys have to share the small touch surface, handwriting methods can offer the entire screen (or most of it) for each symbol. This allows each letter to be entered rather comfortably, even on small devices. In fact, it has been shown that some handwriting systems can be used without even looking at the screen . Finally, handwriting interfaces require very little design changes to run on round displays, which are becoming increasingly popular.

Interestingly the developers decided to support lower-case alphabets instead of upper-case in this first release. I would have thought they would go the other way as it is easier to identify upper case letters for the most part than lower-case.

Please keep in mind that this is a prototype (Alpha) release so it possibly has a lot of bugs and is not production ready. Plus it can’t be installed on the watch from Google Play, it has to be side loaded and the process is a bit complicated so might not be the best option for non-tech savvy folks right now.

Source: androidcentral.com
Project Page: The Analog Keyboard Project
Download: Analog Keyboard for Android Wear

– Suramya

October 1, 2014

Erase Your iCloud Drive by reseting your iPhone settings

This has not been a good month for Tech, we are getting issues across the board on all fronts. First we had the iCloud hack (or fappenning as it was called). Then ShellShock hit followed by this new issue in iOS 8 where if you reset your iPhone settings your backups on the cloud also go bye-bye. Ouch! I hope if you are using the iCloud (or any cloud for that matter) you have a duplicate copy of your data somewhere else or you better not try to reset your phone.

The bug creeps up when you select Settings > General > Reset > Reset All Settings. Typically, this is just supposed to reset your network settings to give your iOS device a clean slate to work with, but it turns out it’s also deleting all your files from iCloud Drive.

The issue was discovered by members of the MacRumors forum. It just shows that no matter how much we try nothing is perfect and there are bugs in every system. The best way to ensure that don’t loose data is to store it in multiple places using multiple types of media/services.

I have a lot of my data backed up on a RAID array and am in the process of setting up a cloud server at home to sync it across different locations. I am not using Dropbox or other such services because I don’t want to trust my data to any external provider. Earlier I used to back up data on DVD’s/CD’s. Before that I used to store the data on Floppy disks.

Fun fact, I was recently looking for some code that I had written around 1998 and ended up searching through my old Floppy disks to find it. Interesting thing was that about 90% of the disks still worked and I was able to read the data without issues. (Well… no issues other then the fact that I had to buy a USB floppy drive as my mother board doesn’t have a connector for floppy drives…) I don’t see the same level of longevity in either DVD’s or CD’s so far. I haven’t tried Blue-Ray disks yet because of the cost and the fact that HDD’s are getting cheaper / larger.

Thanks to lifehacker.com for the initial links.

– Suramya

July 10, 2012

Wireless finally working on the RaspberryPi

I finally managed to get wireless working on the RaspberryPi (Go Me!). The main problem was that when I connected the USB dongle directly to the Pi it wasn’t getting enough power, then when I connected it via a powered USB hub I kept getting error messages. If you like you can read about me previous attempts to get the wireless working here and here. Since I didn’t feel like spending more time on this (and because I thought that the problem was caused because of a problem with the USB hub) I stopped fiddling with it. Then I had to switch the SD card I was using in the Pi (the old one was the card from my camera so I replaced it with another 2GB card) so I downloaded and installed Debian Wheezy on it.

Turns out that the Wheezy doesn’t have the same problems with the USB hub as Squeeze did, so all I had to do was plug in the stuff, install the firmware and I was ready to go. To configure the wireless network I installed wicd as I have found that to be the easiest way to work with wireless networks, I also installed the wicd-curses interface so that I could configure the system from the commandline. The commands I used were as follows:

apt-get install wicd wicd-curses

Then ran wicd-curses to configure the Wifi, That’s it. Now my Pi is connected to net wirelessly and I have one less cable running across my desk, which is great.

Well this is all for now. Will post more later, its time for me to hit the sack. Have an early day tomorrow.

– Suramya

June 27, 2012

Installing Citrix on the RaspberryPi + Other Pi related stuff

One of the use cases I had for the Pi was to use it as a portable thin client that could connect to a Windows server using Citrix. After a little experimentation I managed to get Citrix installed on the Pi and was able to connect to a Windows server successfully and work. I documented the steps I followed to get this to work on the RaspberryPi forum, check out the Tutorial (How to get Citrix working on a RaspberryPi) if you are interested.

Getting Citrix working was a positive thing, other than that I spent some time trying to install my Wireless network dongle (3Com OfficeConnect Wireless. Model # 3CRUSB10075) on the Pi and hit some hurdles in the process. If you remember the last time when I tried this I thought the problem was caused because the card was pulling more power than the Pi could provide. So I went and got a Belkin powered USB hub (I needed it anyways as I need to connect more than 2 USB devices to the Pi).

When I initially plugged in the hub everything seemed to work without issues and the keyboard + mouse I had connected to the hub worked without issues. So I plugged in the wireless dongle, as soon as I plugged it in my mouse and keyboard both stopped working. I then unplugged the dongle and both the mouse & keyboard started working again. I then plugged the keyboard directly on the Pi and the dongle on the hub, now the keyboard worked but the mouse had issues. Looking at the /var/messages log I saw a ton of error messages like the following:

Jun 21 18:10:46 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
Jun 21 18:10:46 raspberrypi kernel:
Jun 21 18:10:46 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
Jun 21 18:10:46 raspberrypi kernel:
Jun 21 18:10:46 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
Jun 21 18:10:46 raspberrypi kernel:
Jun 21 18:10:46 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK

Tried a few things but nothing worked and since it was 3:30 in the morning I gave up and crashed for the day. Will try again when I have had some sleep and get some dedicated time to play with the Pi.

– Suramya

March 13, 2012

Running Ubuntu on my Samsung Galaxy Tablet

Filed under: Computer Software,My Thoughts,Techie Stuff — Suramya @ 1:25 AM

A couple of days about someone at work posted an email asking about Ubuntu Installer and if anyone has tried installing Ubuntu on their android tablet using this software (Sorry I can’t remember your name but am too lazy to log on to the office network to find it in my mailbox). I volunteered to try it out because it sounded interesting and cool to have. This application allows you to install Ubuntu on your Android device on top of android so you basically run Ubuntu as a virtual machine in Android in a fairly easy and painless way. From the FAQ on the developer’s website:

This projects aim is to bring a range of linux distros to your android device through a method known as ‘chroot’, see it has running a linux distro within a virtual machine on your phone. You can access this virtual machine and run it on your phone without causing any damage to your device, or having to overwrite anything. Why might you want this? well my apps are designed to make the install and set up process as easy as possible (more so in the paid apps) while still giving you some flexibility. Once you have the distro up and running then you can pretty much run and install any linux software you like (so long as there is a arm port or it is not architecturaly depenedent), sure there a very few big benefits over what android itself can do but it is still pretty dam cool. (and with the free ubuntu version, hey its free does it matter how useful you find it?)

Excluding the time it took to download the image, the entire process took me about 15 mins to complete so that shows you how easy & painless the entire process was. The app install takes only a couple of mins to complete and that just installs an application that gives you a user guide that explains the install process and buttons to make the process faster/easier. The process is pretty self explanatory and if you can read and understand English and are good at following directions you should have no issues installing. :) I would really suggest downloading the images over WiFi because downloading 1.5GB over 3G/GPRS would be too expensive.

There are two Ubuntu images available: small (450 MB) & large which is 1.5 GB, The large image requires 3.5GB of free space on your SD card and the small image requires 2.5GB of free space. If you have enough free space then you should go for the larger image as that has the Gnome desktop plus a ton of applications pre-installed the small one doesn’t have too many applications preinstalled and uses LXDE instead of GNOME. I first downloaded the small image to try it out and liked it enough to download the large image.

The install itself was mostly painless. I did hit an issue initially when unzip’ing the small image file (the download is a zip file) with AndroZip as it was unable to handle the large file size and kept dying on me. Using Astro’s built in extractor resolved this and I was then able to extract the file without issues. Learning from this I downloaded the large image on my computer and copied it over after extracting it there (plus I didn’t have enough space to download the file and then extract it on the tablet itself).

After you download the images, the instructions tell you to install the VNCViewer app and the Terminal app. It wasn’t clear from the instructions that VNC was required to see the actual desktop itself so I didn’t install it at first thinking that it was so that you could connect to your laptop/desktop from the tablet. I later realized that it was needed to see the Gnome desktop so installed it and was good to go.

The process to start Ubuntu is a bit cumbersome and requires you to type a few commands on the Terminal but once you start the image and select the desktop size you are good to go and all you have to do then is connect to the Ubuntu desktop using VNC. The desktop is fairly responsive and you can zoom in for more fine grained control. The large image installs the Gnome desktop and not Unity but still it was pretty good. Would have liked to get the option to try Unity as it was designed for tablets but I guess that is a project for another day.

Below is an photo of the tablet with the Gnome desktop running on it (Taking a photo of a tablet at night is a pain because the flash reflects off the screen and without the flash the photo is too dark):

Ubuntu on Samsung Galaxy Tab
Ubuntu on Samsung Galaxy Tab

Over all a cool and geeky thing to have, but not really that useful in the long run unless you have programs that you want to be able to work on when not at your desktop and don’t have net access.

– Suramya

January 13, 2012

Official style guide for Android developers launched

Filed under: Computer Software,Interesting Sites — Suramya @ 3:01 PM

Google has just launched Android Design, a website created to help aid developers in the creation of applications for ICS. This makes it easier for developers to code visually consistent applications, so if you are interested in Android development check it out. I took a look and it has some good tips/suggestions on design etc.

Duarte wants to remedy this. On Thursday, Google launched Android Design, a web site created specifically to help aid developers in the creation of applications for ICS. The site offers a comprehensive visual to third-party application developers, giving suggestions on everything from how to implement different visual elements to overall back-end patterns for the OS itself.

In theory, it will help developers better understand just how the Android team thinks about layout and implementation, while simultaneously giving suggestions to interaction designers on how to maintain visual integrity. Basically, it will help both first-time developers and Android veterans make apps look less crappy.

Since have been thinking of diving back into mobile development for the past few days, this site will be very useful and has been launched at just the right time. Considering the previous experience I have with mobile development was on Symbian using Python, I can use all the design help I can get.

– Suramya

October 26, 2011

Connecting a WordPress blog to Facebook

Filed under: Computer Software,Linux/Unix Related,Techie Stuff,Tutorials — Suramya @ 5:01 PM

Over the past few months I have been trying to connect my blog to my Facebook account so that whenever a post is made on the blog it automatically gets posted on Facebook to varying degree’s of success. Most of the attempts would work for a while and then stop. I even tried using some of the existing plugins for WordPress but since they required a developer account (which needs a valid phone no or CC#) and for some reason I never get the validation code on my cell I was never able to get them to work.

Then I found an article on Linux Magazine on a Command Line interface for Facebook and decided to build on top of that to get the linkage working. Now this is a very hackey way and is not at all elegant or anything but it gets the work done which is what I wanted, so I am good. :) All the work was done in about 2 hours including testing so that should tell you something on its own.

I had to install this on my local system since my webhost didn’t have all the per-requisites to get this to work. That and the fact that I can’t connect to my MySQL db’s from a machine outside of my hosting provider is why this convoluted method was created. The steps I followed to get this to work are as follows.

Install Facebook Commandline

To install Facebook Commandline, follow the instructions on their site.

Authenticate the Application to be able to talk to Facebook

For some reason there was a difference when I run the application from the commandline and when I run it from the web, in as to where the preferences file and the session details were saved, so all the steps have to be done either from the command line or via the web, you can’t interchange the two.

Creating a Web interface for the FBCMD

Since I wanted to be able to get data from WordPress and pass it on to FBCMD I created a new PHP page called run.php that basically pulls the data from WordPress and then passes it to FBCMD as command line parameters. I know that using passthru is probably not very secure and I should have modified the FBCMD file to accept parameters as a URL but didn’t want to spend that much time trying to get this to work. (Hey! I told you it was a quick and dirty ‘fix’).

The contents of this file are very simple:

error_reporting(E_ALL);
$handle = fopen('http://www.suramya.com/blog/LatestPost.php', 'r');
$current = fopen('/var/www/fbcmd/latest.dat', 'r');
$current_id = fgets($current, 4096);
fclose ($current);

if ($handle) 
{
 $ID = fgets($handle, 4096);
 $link = fgets($handle, 4096);
 $title = fgets($handle, 4096);
 $content = fgets($handle, 596);
 $content = chunk_split(htmlspecialchars(strip_tags($content)), 500) . "...";

 if($ID != $current_id)
 {
  // If we have a new post then call FBCMD to make a post
  $command = '/usr/bin/php /var/www/fbcmd/lib/fbcmd/fbcmd.php POST " " "' . chop($title) . '" "' . 
              chop($link) . '" "' . $content . '"';
  passthru ($command);
  // Write the new PostID to a file
  $current = fopen('/var/www/fbcmd/latest.dat', 'w');
  fputs($current, $ID);
  fclose($current);
 }
}

The file basically calls ‘LatestPost.php’ and gets the latest post details on the blog(see below for details), then it checks if the post made is newer than the last post processed and if so it proceeds to post to Facebook using FBCMD.

‘LatestPost.php’ file looks like this:

< ?php

define('WP_USE_THEMES', true);
require_once( dirname(__FILE__) . '/wp-load.php' );

$month = $_GET['month'];
$year = $_GET['year'];

$args = array( 'numberposts' => 1);
$myposts = get_posts( $args );

//print_r($myposts);

foreach( $myposts as $post ) : setup_postdata($post); 
echo $post->ID . "\n";
the_permalink();
echo "\n";
the_title();
echo "\n";
the_content();
endforeach; ?>

This file need to be put on the server in the WordPress Root directory and when called returns an output in the following format:

Post ID
Post Link
Post Title
Post Content

Once all this is done and the FBCMD has access to post to Facebook all we need is a cron job to run on a frequent basis to run the code. So I created a shell script that contains the following line and have it run every 15 mins.

/usr/bin/curl http://localhost/fbcmd/run.php > /tmp/FBPost.out

That’s it. So far it looks like its working great and if this post shows up on my FB wall then all is well. If not, then its back to the code to see what went wrong this time.

– Suramya

Older Posts »

Powered by WordPress