Suramya's Blog

Visit suramya.com Who am I?

December 14, 2014

Cleaning your Linux computer of cruft and duplicate data

When you use a computer and keep copying data forward everytime you upgrade or work with multiple systems it is easy to end up with multiple copies of the same file. I am very OCD about organizing my data and still I ended up with multiple copies of the same file in various locations. This could have happened because I was recovering data from a drive and needed a temp location to save the copy or forgot that I had saved the same file under another directory (because I changed my mind about how to classify the file). So this weekend I decided to clean up my system.

This was precipitated because after my last system reorg I didn’t have a working backup strategy and needed to get my backups working again. Basically I had moved 3 drives to another server and installed a new drive on my primary system to serve as the Backup drive. Unfortunately this required me to format all these drives because they were originally part of a RAID array and I was breaking it. Once I got the drives setup I didn’t get the chance to copy the backup data to the new drive and re-enable the cron job that took the daily backup snapshots. (Mostly because I was busy with other stuff). Today when I started copying data to the new Backup drive I remembered reading about software that allowed you to search for duplicate data so thought I should try it out before copying data around. It is a good thing I did because I found a lot of duplicates and ended up freeing more than 2 GB of space. (Most of it was due to duplicate copies of ISO images and photos).

I used the following software to clean my system:

Both of them delete files but are designed for different use cases. So let’s look at them in a bit more detail.

FSlint

FSlint is designed to remove lint from your system and that lint can be duplicate files, broken links, empty directories and other cruft that accumulates when a system is in constant use. Installing it is quite easy, on Debian you just need to run the following command as root

apt-get install fslint

Once the software is installed, you can either use the GUI interface or run it from the command line. I used the GUI version because it was easier to visualize the data when seen in a graphical form (Yes I did say that. I am not anti-GUI, I just like CLI more for most tasks). Using the software was as easy as selecting the path to search and then clicking on Find. After the scan completes you get a list of all duplicates along with the path and you can choose to ignore, delete all copies or delete all except one. You need to be a bit careful when you delete because some files might need to be in more than one location. One example for this situation is DLL files installed under Wine, I found multiple copies of the same DLL under different directories and I would have really messed up my install if I had blindly deleted all duplicates.

Flossmanuals.net has a nice FSlint manual that explains all the other options you can use. Check it out if you want to use some of the advanced features. Just ensure that you have a good backup before you start deleting files and don’t blame me when you mess up your system without a working backup.

BleachBit

BleachBit is designed for the privacy conscious user and allows you to get rid of Cache, cookies, Internet history, temporary files, logs etc in a quick and easy way. You also have the option to ensure that the data deleted is really gone by overwriting the file with random data. Obviously this takes time but if you need to ensure data deletion then it is very useful. Bleachbit works on both Windows and Linux and is quite easy to install and use (at least on Linux, I didn’t try it on Windows). The command to install it on Debian is:

apt-get install bleachbit

The usage also is very simple, you just run the software and tick the boxes relevant to the clutter that you want gone and BleachBit will delete it. It does give you a preview of the files it found so that you can decide if you actually want to delete the stuff it identifies before you delete it.

Well this is all for now. Will write more later.

Thanks to How to Sort and Remove Duplicate Photos in Linux for pointing me towards FSlint and Ten Linux freeware apps to feed your penguin for pointing me towards BleachBit.

– Suramya

December 12, 2014

My new toy: the Moto 360 smart watch

So I have a new toy that I am super excited about and It is a birthday gift from me to myself. :) I have been wanting to get a smartwatch since last year when the Samsung gear came out but when I saw the gear I didn’t like the way it looked so ended up not buying it. Now that I have bought the Moto 360, I am glad I didn’t buy the gear because it beats the Gear hands down, no questions asked. I have been using it for 3 days now and I love it.


The Moto 360 with the default Face

The initial setup of the watch was easy, I just had to download an app on my phone and follow the prompts, took me about 2 mins (excluding the time to download the app) to complete the pairing and setup. Once the app was installed the watch downloaded the latest firmware and upgraded automatically after I charged the battery which was surprisingly very fast. Once the upgrade completed it was connected to my S5 and has been working like a charm.

The default apps on the 360 are the Fitness apps, ability to receive any notifications on the watch and control the music app and the Google camera app from the watch. It has built in voice recognition which works fantastically great and is integrated with Google Now. Tonight we tried it out in a restaurant where we had gone out for a team outing and it had no trouble with the voice recognition even with the background noise. In addition to the default apps so far I have also installed a flashlight app, a dictation app and another camera app that lets me use the watch as a viewfinder for the camera on my phone. I keep finding cool new apps for the watch every day so will probably be installing a lot more stuff on it in the near future.

As I said earlier Voice recognition works for most of the things I would want to do on the watch, like use to to initiate a call or dictate a reply to an SMS, start an app etc. For the rest the touch screen works fine. Took me a bit of time to figure out how to run the new apps I installed because that isn’t really intuitive initially (or maybe I was just sleep deprived) but once I figured that out I was good to go. I think it would have made sense for them to put this in the help section.

The watch is not bulky at all and is lighter than my other watch. Lots of folks have complained about its size online but I didn’t find that to be an issue. However the battery life could have been better. In my daily use I am down to about 35% charge by the time I am ready to sleep after starting with a full charge in the morning. The charger looks nice and the charging is fast, however since the watch has a custom charger it means that I have to make sure that I carry it with me when I am traveling because none of my other chargers work with it. Sure, I can buy another charger for the office but it’s a pain.

The other issue that I noticed with it is that the heart rate sensor is crap. Every single time I have tried to check my heart rate (using both fit and the Moto software) it has failed with a sensor time out message, although Vinit did manage to get it to work once so I know the sensor works.

For the most part I have been using the watch to read my SMS/Whatsapp/Email messages without having to pull out my phone and monitoring my step count. Apparently I walk around a lot more than I thought which is good. :) Also the ability to decline calls with a message from the watch is very handy when your phone is at your desk and you are at another desk working on something or in a meeting.

I am planning on installing the Analog keyboard for Android that I blogged about earlier but that will be over the weekend when I have some breathing room to experiment. I will share my findings and experiences going forward so if you are interested do keep an eye on the blog for new posts.

Well, this is all for now. It’s time for me to crash for the night. Will post more later.

– Suramya

November 23, 2014

Presenting hack.summit a virtual dev conference Dec 1st – 4th

Filed under: Interesting Sites,Techie Stuff — Suramya @ 11:55 PM

Developer conferences are a great way to meet developers and learn about the latest and greatest technologies and programming skills etc. However most of them happen in places where they are not accessible to a majority of the people in the world, primarily because of cost and time taken to travel there which is quite unfortunate. I know there have been multiple conferences that I wanted to attend but couldn’t because they were in the US or Europe while I was in India.

To fix that problem the nice folks at hack.hands() have created a free, live, online event from Dec 1 – Dec 4th where top speakers from their fields will be available to answer questions and have their brains picked. You can register for the event for free by visiting their website.

The hack.summit() conference is a live, global event put on by the fine folks behind real-time programming assistance service hack.hands(). From December 1 to December 4, a wide range of speakers will present and answer democratically popularized questions over Crowdcast via Google+ Hangouts. Speakers in attendance include wiki inventor and Design Patterns pioneer [Ward Cunningham], Codeacademy founder [Ryan Bubinski], Google Glass creator [Tom Chi], Python Software Foundation’s [Alex Gaynor], and even the inimitable [Jon Skeet].

The goals for this conference are simple and admirable: to educate developers of all stripes about best practices, to encourage mentorship in the programming community, and to spread the joy of coding by supporting coding non-profits.

Thanks to hackaday.com for the story.

– Suramya

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 5, 2014

A ‘Doctor Who’ game to teach kids how to code

Filed under: Interesting Sites,Techie Stuff — Suramya @ 1:48 AM

Those who know me know that I am a big fan of Doctor Who and have been a fan for a while. It is one of the most iconic Science Fiction shows out there along with Star Trek and Star Wars. Now BBC is planning on using that popularity to encourage children to learn coding. Yes, you read that right: “Dr Who is going to help kids learn how to code”. The game is called “The Doctor and the Dalek” and it aims to get children to use logical reasoning, variables and loops and repetition to help the Doctor save the universe from the Daleks, teaching them the basics of programing while having fun.

Unfortunately the game is only accessible if you are based out of UK :( which is not surprising considering this is BBC we are talking about. They are famous for restricting content based on geographical boundaries. But from what I have read about it online, it looks like a lot of fun and even though I know programing I want to try it out. Hopefully they will open it up to a broader audience in the near future as I would love to have my Nieces and Nephews take it out for a spin. (and I will of course be there to ‘help’ them play the game)

If you are located in UK you can check it out at the cbbc site.

– Suramya

Source: Comments (0)

November 4, 2014

The Underhanded C Contest 2014 is open

Filed under: Computer Related,Interesting Sites,Techie Stuff — Suramya @ 11:43 PM

Do you think you have the skills to write code that is as readable, clear, innocent and straightforward as possible, and yet somehow exhibits evil behavior that cannot be seen even when staring at the source code? If so then you should take a look at The Underhanded C Contest. The contest has been running for about 6 years now and it is amazing how easy these guys make it look to create code that does something but looks like it is doing something else.

The 7th Underhanded C Contest is now open.

The goal of the contest is to write code that is as readable, clear, innocent and straightforward as possible, and yet it must fail to perform at its apparent function. To be more specific, it should do something subtly evil. Every year, we will propose a challenge to coders to solve a simple data processing problem, but with covert malicious behavior. Examples include miscounting votes, shaving money from financial transactions, or leaking information to an eavesdropper. The main goal, however, is to write source code that easily passes visual inspection by other programmers.

Check it out at: The Underhanded C Contest.
Source: Slashdot.org

– Suramya

A Cardboard Computer that actually works

Filed under: Computer Hardware,Interesting Sites,Techie Stuff — Suramya @ 12:31 AM

No, this is not a joke or a toy for a 5 year old. In the 70’s the computers were still not in the affordable range for 99% of the population so a bright chap by the name of David Hagelbarger working at Bell Laboratories designed CARDIAC (CARDboard Illustrative Aid to Computation) as an educational tool to give people without access to computers the ability to learn how computers work. Basically it is a micro-processor made out of cardboard.

The CARDIAC computer is a single-accumulator single-address machine, which means that instructions operate on the accumulator alone, or on the accumulator and a memory location. The machine implements 10 instructions, each of which is assigned a 3-digit decimal opcode. The instruction set architecture includes instructions common to simple Von Neumann processors, such as load, store, add/subtract, and conditional branch.

Operating the computer is fairly simple–the cardboard slides guide you through the operation of the ALU and instruction decoder, and the flow chart shows you which stage to go to next. The program counter is represented by a cardboard ladybug which is manually moved through the program memory after each instruction completes.

Even though the CARDIAC is dated and very simplistic, it is still a useful tool to teach how microprocessors work. Although modern processors include multi-stage pipelines, finely-tuned branch predictors, and numerous other improvements, the basic principles of operation remain the same

You can print your own by visiting Kyle Miller’s Site. More information about CARDIAC and how to use it is available at cs.drexel.edu and on it’s Wikipedia site.

Thanks to Hackaday.com for the story.

– 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 12, 2014

Take Orders From A Cat And Learn Cybersecurity

Here’s an interesting site that teaches Cybersecurity to folks in the form of a game. As you know cyber criminals are getting more and more sophisticated and the best way to counter that is to train more folks on the basic principles of Cyber Security. It is targeted towards children but is good fun for adults as well.

Take cybersecurity into your own hands. In this Lab, you’ll defend a company that is the target of increasingly sophisticated cyber attacks. Your task is to strengthen your cyber defenses and thwart the attackers by completing a series of cybersecurity challenges. You’ll crack passwords, craft code, and defeat malicious hackers.

Check it out at: NovaLabs Cybersecurity
Source: Popsci.com

– Suramya

Older Posts »

Powered by WordPress