Wednesday, December 18, 2013

App Comparison - Wallbase App for Android and Windows Phone

I have been an ardent follower of The site's got some awesome design and the wallpapers there easily transform your everyday average desktop experience into awesomeness! 
So when I stumbled onto the Windows Phone app of wallbase, I was expecting something that would be fairly basic. I thought that it would let you see the categories, top images and let you do some basic stuff. But when I used the app I was totally surprised. The design and the functionality provided really knocked the socks off me. The app looked awesome, was very responsive and fast, heck, it worked absolutely fine even on my 2G connection. Then there was the downloading of images which was awesome-start a download and go back to main screen to browse the images. Depending on the speed the download would finish and you get a popup. No more being blocked to the download screen or anything. It kind of defined what a smartphone app should be. 
Then couple of months ago I got hold of an android phone. So just to check it out, I got the droid version of the app. And for a simple app it provides enough functionality for general use. It's again as easy to navigate as the Windows Phone app and it's fast. Only think I have against it is that the margins between columns of images are not uniform so it feels a bit weird to me. But it does have more features since the Windows Phone application is limited thanks to WP's sparten feature set. 
Overall I would say if you want some totally awesome wallpapers, give wallbase a try and you won't be disappointed. 

Monday, December 16, 2013

Qt Application Plugins

Link for Code on Google Drive.
As it happens, recently I was needed to learn about Qt Plugins. The problem scenario was as follows: We have an application which has a number of dialogs. There's one dialog we customize for each client. We have to branch the application in SVN. Normally this would not be a problem but we are introducing incremental functionality into the core of the app and it becomes tiring to sync all the changes into all the branches.
So it's decided that we would separate the single dialog which differs from client to client, into a plugin and make branches for that. This way we will be saved from headache of syncing so much code across all the branches. Instead the branches will contain only the dialog which is different for every client.
So as a primary R&D on Qt plugins I prepared a basic application which shows a PluginContainer class which supports plugins and couple of plugin classes namely FivePlugin and SixPlugin.

Thursday, December 12, 2013

Developer mode droids speed up the animations

There are developer mode settings available in almost all Chinese oem phones many of whom are sold here in India by Micromax, Karbonn, Lava etc. 

These phones have developer mode settings available in settings menu. There you can change the speed at which various animations are run at. Setting these speeds to 0.5x can speed up the interface dramatically. 

Wednesday, November 27, 2013

Android APK download straight from Play Store

Evozi provide a service that lets you download app APK's directly from play store.

All you need to do is paste the play store URL of the App from its page and paste it into given textbox. 
Then press Generate download button. 

You also can paste the package name directly and get the APK. 

When compared to the websites providing APK files the advantage of this is that you usually get latest version of the app. 

Wednesday, November 20, 2013

Online COD of battery for Samsung Omnia W

This online purchase on cost me 469 INR only. I also got one battery for the same phone from local dealer for reference which cost me 700 INR.

Well, sometimes you get great deals shopping online!

Monday, November 18, 2013

Battery replacements

Recently my Samsung's battery died after two and half years of use. After searching for a fair amount of time, I came across a seller who had some in stock. This listing I found on I promptly ordered one for the total cost of 469 INR.
Couple of days later when I got some time to look in local market, I searched for the battery for my phone. After going through 3-4 shops I got one at a shop for 700/-. Since the tradus order was at least 3-4 days to reach mw, I got it. Also since I wanted to check the one ordered online against this one.
So today on 18th Nov '13 the tradus order shipped. Its manufacturing date is later than the one I procured locally. It looks fairly standard. So now I have two batteries and my Sammy Omnia W's future looks bright.

Tuesday, November 12, 2013

Resetting the Omnia W

My Omnia W completed two and a half years in my hands this month. It has been a great journey so far. The phone has been great in my hands, the timely updates added to its charm and made it speedier. And its tough body has held through ay least half a dozen falls.
Recently though I was experiencing some hiccups and slight lag once in a while. So being the adventurous soul, I decided to go ahead and reset the phone.
Having gone through about half a dozen resets, I didn't miss any data and settings. Managed to get all the important stuff backed up.
So I reset it and after it restarted and came back with the initial setup, I went through the steps and added the accounts back. Its fairly straight forward process. And in about 20 minutes the phone was up and I was into the marketplace hunting my favorite apps.
After couple of hours of installing the various apps and setting up things to my liking, I noticed 10 updates. And to my pleasure, they were all to the Samsung supplied apps. So I got the WP8 screen lock, some Unicode support and a call block list. Impressive.
Plus I also noticed that the phone is running buttery smooth. Awesome WP, MS, and Sammy.

Friday, November 1, 2013

Moving image on dialog resize

A side effect as observed in one of the apps I'm currently working on. The size of the image is bigger than the label in which it's shown. So when we increase the dialog size, the label size changes changing the amount of image displayed. It's a surprising side-effect!

Wednesday, October 30, 2013

[LINK] Making Software Successful

Original Link:

Making software successful

What makes good software into excellent usable software?  In my opinion software that fails to be excellent software generally lacks some key features:


A README file in the source is not sufficient for the end-user.  Good quality documentation must explain how to use all the key features in a coherent manner.  For example, a command line tool should be at least shipped with a man page, and this must cover all the options in the tool and explain clearly how each option works.

Documentation must be kept up to date with the features in the software.  If a feature is added to a program and the documentation has not been updated then the developer has been careless and this is a bug. Out of date documentation that provides wrong and useless information make a user lose faith in the tool.

Try to include worked examples whenever possible to provide clarity. A user may look at the man page, see a gazillion options and get lost in how to use a tool for the simple use-case.  So provide an example on how to get a user up and running with the simple use-case and also expand on this for the more complex use cases.  Don't leave the user guessing.

If there are known bugs, document them. At least be honest with the user and let them know that there are issues that are being worked on rather than let them discover it by chance.

Expect quality when developing

Don't ship code that is fragile and easily breaks. That puts users off and they will never come back to it.  There really is no excuse for shipping poor quality code when there are so many useful tools that can be used to improve quality with little or no extra cost.

For example, develop new applications with pedantic options enabled, such as gcc's -Wall -Wextra options.   And check the code for memory leaks with tools such as valgrind and gcc's mudflap build flags.

Use static code analysis with tools such as smatch or Coverity Scan.  Ensure code is reviewed frequently and pedantically.  Humans make mistakes, so the more eyes that can review code the better.   Good reviewers impart their wisdom and make the process a valuable learning process.

Be vigilant with all buffer allocations and inputs.  Use gcc's -fstack-protector to check for buffer overflows and tools such as ElectricFence.  Just set the bar high and don't cut corners.

Write tests.  Test early and often. Fix bugs before adding more functionality.  Fixing bugs can be harder work than adding new shiny features which is why one needs to resist this temptation and focus on putting fixes first over features.

Ensure any input data can't break the application.  In a previous role I analysed an MPEG2 decoder and manually examined every possible input pattern in the bitstream parsing to see if I could break the parser with bad data.  It took time, it required considerable effort, but it ended up being a solid piece of code.  Unsanitised input can break code, so be careful and meticulous.

Sane Defaults

Programs have many options, and the default modus operandi of any tool should be sane and reasonable.   If the user is having to specify lots of extra command line options to make it do the simplest of tasks then they will get frustrated and give up. 

I've used tools where one has to set a whole bunch of obtuse environment variables just to make it do the simplest thing.  Avoid this. If one has to do this, then please document it early on and not buried at the end of the documentation.

Don't break backward compatibility

Adding new features is a great way to continually improve a tool but don't break backward compatibility.  A command line option that changes meaning or disappears between releases is really not helpful.     Sometimes code can no longer be supported and a re-write is required.  However, avoid rolling out replacement code that drops useful and well used features that the user expects.

The list could go on, but I believe that if one strives for quality one will achieve it.  Let's strive to make software not just great, but excellent!

Tuesday, October 29, 2013

Separation, MVC, Threads and signal-slots

In Qt you can't display anything from other than the Gui thread.

I didn't know this.

In Qt you need to set the GUI class parent to the thread class to access the Main GUI Thread.

I didn't know this.

In fact I didn't know much about the current thing that I was working on. So 1. I tried to use threads to directly modify the GUI. Failed with aborts! 2. Wrote a wrapper in main that would modify the gui and called it by setting main class as parent. Still there are aborts. Then spent some time thinking about alternative solutions. And found some stuff about inter-thread communication. So stumbled upon solution of using Signal-Slots for inter-thread communication. Got a lot of weird errors involving MOC and stuff.
Further googling and furious search led to the pristine knowledge that we need a Q_OBJECT macro when we have a signal in a class. OK. Put in the macro; still more errors! Ok some more googling, and came to know that we need to qmake it all. OK, so after a super clean build, I had it all working and the UI was updated.

So now it all looks like a big hell of a mess and I need to clean it all up. So some more googling and I came to know about MVC thingie. Took me couple of days to completely understand it. ( Actually I still don't know if I have groked it all, but whatever I have consumed, works!!!) So after this, there were few days of equally furious and confused refactoring, some scope jumbles and lot of commenting around to keep track of everything. And finally, I got it all working.

I'll still need to clear it up into a separate project which I can present as a module, but this was a fortnight of intensive learning. Working on new stuff is always so interesting!

Thursday, October 24, 2013

Replace String in multiple files using Perl

1. Create a list of files that you want to replace the word in

e.g find . | grep Makefile | grep -v Makefile. > list.txt

This will list all Makefile's and exclude etc

2. create a script


while read line


perl -pi -e "s/user1/user2/g" $line


3. give executable permissions to the script

chmod +x

4. run replace script as

./ < list.txt

Wednesday, October 16, 2013

[LINK] Want to Evade NSA Spying? Don't Connect to the Internet

Original article:

Want to Evade NSA Spying? Don't Connect to the Internet

Photo: Ariel Zambelich / WIRED; Illustration: Ross Patton / WIRED

Since I started working with Snowden's documents, I have been using a number of tools to try to stay secure from the NSA. The advice I shared included using Tor, preferring certain cryptography over others, and using public-domain encryption wherever possible.

I also recommended using an air gap, which physically isolates a computer or local network of computers from the internet. (The name comes from the literal gap of air between the computer and the internet; the word predates wireless networks.)

But this is more complicated than it sounds, and requires explanation.

Since we know that computers connected to the internet are vulnerable to outside hacking, an air gap should protect against those attacks. There are a lot of systems that use — or should use — air gaps: classified military networks, nuclear power plant controls, medical equipment, avionics, and so on.

Osama Bin Laden used one. I hope human rights organizations in repressive countries are doing the same.

Air gaps might be conceptually simple, but they're hard to maintain in practice. The truth is that nobody wants a computer that never receives files from the internet and never sends files out into the internet. What they want is a computer that's not directly connected to the internet, albeit with some secure way of moving files on and off.

But every time a file moves back or forth, there's the potential for attack.

And air gaps have been breached. Stuxnet was a U.S. and Israeli military-grade piece of malware that attacked the Natanz nuclear plant in Iran. It successfully jumped the air gap and penetrated the Natanz network. Another piece of malware named agent.btz, probably Chinese in origin, successfully jumped the air gap protecting U.S. military networks.

These attacks work by exploiting security vulnerabilities in the removable media used to transfer files on and off the air gapped computers.

Since working with Snowden's NSA files, I have tried to maintain a single air-gapped computer. It turned out to be harder than I expected, and I have ten rules for anyone trying to do the same:

1. When you set up your computer, connect it to the internet as little as possible. It's impossible to completely avoid connecting the computer to the internet, but try to configure it all at once and as anonymously as possible. I purchased my computer off-the-shelf in a big box store, then went to a friend's network and downloaded everything I needed in a single session. (The ultra-paranoid way to do this is to buy two identical computers, configure one using the above method, upload the results to a cloud-based anti-virus checker, and transfer the results of that to the air gap machine using a one-way process.)

2. Install the minimum software set you need to do your job, and disable all operating system services that you won't need. The less software you install, the less an attacker has available to exploit. I downloaded and installed OpenOffice, a PDF reader, a text editor, TrueCrypt, and BleachBit. That's all. (No, I don't have any inside knowledge about TrueCrypt, and there's a lot about it that makes me suspicious. But for Windows full-disk encryption it's that, Microsoft's BitLocker, or Symantec's PGPDisk — and I am more worried about large U.S. corporations being pressured by the NSA than I am about TrueCrypt.)

3. Once you have your computer configured, never directly connect it to the internet again. Consider physically disabling the wireless capability, so it doesn't get turned on by accident.

4. If you need to install new software, download it anonymously from a random network, put it on some removable media, and then manually transfer it to the air gapped computer. This is by no means perfect, but it's an attempt to make it harder for the attacker to target your computer.

5. Turn off all auto-run features. This should be standard practice for all the computers you own, but it's especially important for an air-gapped computer. Agent.btz used autorun to infect U.S. military computers.

6. Minimize the amount of executable code you move onto the air-gapped computer. Text files are best. Microsoft Office files and PDFs are more dangerous, since they might have embedded macros. Turn off all macro capabilities you can on the air-gapped computer. Don't worry too much about patching your system; in general, the risk of the executable code is worse than the risk of not having your patches up to date. You're not on the internet, after all.

7. Only use trusted media to move files on and off air-gapped computers. A USB stick you purchase from a store is safer than one given to you by someone you don't know — or one you find in a parking lot.

8. For file transfer, a writable optical disk (CD or DVD) is safer than a USB stick. Malware can silently write data to a USB stick, but it can't spin the CD-R up to 1000 rpm without your noticing. This means that the malware can only write to the disk when you write to the disk. You can also verify how much data has been written to the CD by physically checking the back of it. If you've only written one file, but it looks like three-quarters of the CD was burned, you have a problem. Note: the first company to market a USB stick with a light that indicates a write operation — not read or write; I've got one of those — wins a prize.

9. When moving files on and off your air-gapped computer, use the absolute smallest storage device you can. And fill up the entire device with random files. If an air-gapped computer is compromised, the malware is going to try to sneak data off it using that media. While malware can easily hide stolen files from you, it can't break the laws of physics. So if you use a tiny transfer device, it can only steal a very small amount of data at a time. If you use a large device, it can take that much more. Business-card-sized mini-CDs can have capacity as low as 30 MB. I still see 1-GB USB sticks for sale.

10. Consider encrypting everything you move on and off the air-gapped computer. Sometimes you'll be moving public files and it won't matter, but sometimes you won't be, and it will. And if you're using optical media, those disks will be impossible to erase. Strong encryption solves these problems. And don't forget to encrypt the computer as well; whole-disk encryption is the best.

One thing I didn't do, although it's worth considering, is use a stateless operating system like Tails. You can configure Tails with a persistent volume to save your data, but no operating system changes are ever saved. Booting Tails from a read-only DVD — you can keep your data on an encrypted USB stick — is even more secure. Of course, this is not foolproof, but it greatly reduces the potential avenues for attack.

Yes, all this is advice for the paranoid. And it's probably impossible to enforce for any network more complicated than a single computer with a single user. But if you're thinking about setting up an air-gapped computer, you already believe that some very powerful attackers are after you personally. If you're going to use an air gap, use it properly.

Of course you can take things further. I have met people who have physically removed the camera, microphone, and wireless capability altogether. But that's too much paranoia for me right now.

Thursday, October 10, 2013

Parenting in Qt

Qt has the concept of parenting the widgets. The reason is  to arrange the widgets in a hierarchical manner.
This way you can access / find almost all child widgets using a pointer / object of the parent.

The reason I'm highlighting it here is that when you are trying to generate the UI at runtime, this ability of able to find almost any widget comes in very handy.

Recently I had to work on a small utility which basically used an external configuration file to generate the contents of a form dynamically. The external file would contain the field definition and the constraints and I would create a corresponding widget and assign it the properties.

Now to access these, I didn't even have any pointers since everything was getting generated dynamically, I used the object names.

I assigned them object names that would correspond to the data that was contained in them. Then I would use findChildren method to get the matching objects.

But you didn't hear anything about parenting here. So why parenting is so important. See, even I didn't know it. But when I ran the binary through valgrind, I saw that my good enough code is leaking like a shipwreck.

So after going through a lot of internet posts and fair amount of qt documentation, I learned that When you delete a parent widget, all its Childs are automatically deleted'.  This translates do no more memory leaks. So after spending some more time getting my concepts right, I dug in. After a stressful evening of lot of cussing and keyboard banging, I got it right. All Child widgets properly coded to have appropriate parents and proper validity and existence checks along with some clever coding made the binary leak free!!!

Isn't it awesome when such a simple thing like parenting the widgets helps in such a big way!

Friday, October 4, 2013

Moving from CentOS 5 to CentOS 6

Recently we ended up upgrading the base OS at my organization from CentOS 5 to CentOS 6. Our product is an application built in Qt with dependencies on PostgreSQL and Qwt.

Now with the old solution being based off CentOS 5, Qt 4.5 and Qwt 5.1, there were a number of stability and performance issues that were observed. So finally we decided to bite the bullet and decided to shift to CentOS 6. The reason for not proceeding earlier was there are a number of hardware peripherals and interfaces that our system uses which doesn't have upgraded drivers etc. So the task fell on me to go through all the pieces and get a good estimation of efforts required for this jump and what problems we would face.

It was decided that we would also upgrade to Qt 5 and Qwt 6 alongwith jump to CentOS 6. After getting a fresh installation ready we - me and one of my colleagues, started going through the requirements one by one. PostgreSQL was easy. Add the repository and fetch the required version. Qt was toughest. It took a lot of tweaking and installing lots of development libs etc to get it compiled properly and even then we ended up recompiling it again since we ended up with screwed up prefix setting.

Anyway after a fortnight we had the system up with Qt and Qwt compiled and the application refactored to work with Qt 5. Refactoring the application itself took about a week for two of us, and even then I don't think it's a good job. Mostly just good enough to get the UI up and get started. So after performing a quick prayer we started the App through it's startup script. Thankfully it started without any issues and we let it run for couple of days. After a steady run we are now nitpicking through the performance corners, compatibility corners and life is going to be interesting.

It was a good experience for me to see such a generation-big upgradation of a system and have a first-hand. We faced a number of problems and some of them readily solved while some other took a while to fix. At the same time it was good to know that CentOS has as good a community as any and lots of helpful people.

[External] Fingerprints are Usernames, not Passwords

Good Read !
Original Link:

As one of the maintainers of eCryptfs, and a long time Thinkpad owner, I have been asked many times to add support to eCryptfs for Thinkpad's fingerprint readers.
I actually captured this as a wishlist bug in Launchpad in August 2008, but upon thinking about it a bit more, I later closed the bug "won't fix" in February 2009, and discussed in a blog post, saying:
Hi, thanks so much for the bug report.I've been thinking about this quite a bit lately. I'm going to have to mark this "won't fix" for now. The prevailing opinion from security professionals is that fingerprints are perhaps a good replacement for usernames. However, they're really not a good replacement for passwords. Consider your laptop... How many fingerprints of yours are there on your laptop right now? As such, it's about as secret as your username. You don't leave your password on your spacebar, or on your beer bottle :-) This wikipedia entry (although it's about Microsoft Fingerprint Readers) is pretty accurate: *, I'm sorry, but I don't think we'll be fixing this for now.
I'm bringing this up again to highlight the work released last week by The Chaos Computer Club, which has demonstrated how truly insecure Apple's TouchID is.
There may be civil liberties at issue as well.  While this piece is satire, and Apple says that it is not sharing your fingerprints with the government, we've been kept in the dark about such things before.  I'll leave you to draw your own conclusions on that one.
But let's just say you're okay with Apple sharing your fingerprints with the NSA, as I've already told you, they're not private at all.  You leave them on everything you touch.  And let's say you're insistent on using fingerprint (biometric) technology because you can.  In that case, your fingerprints might identify you, much as a your email address or username identifies you, perhaps from a list.

I could see some value, perhaps, in a tablet that I share with my wife, where each of us have our own accounts, with independent configurations, apps, and settings.  We could each conveniently identify ourselves by our fingerprint.  But biometrics cannot, and absolutely must not, be used to authenticate an identity.  For authentication, you need a password or passphrase.  Something that can be independently chosen, changed, and rotated.  I will continue to advocate this within the Ubuntu development community, as I have since 2009.

Once your fingerprint is compromised (and, yes, it almost certainly already is, if you've crossed an international border or registered for a driver's license in most US states and many countries), how do you change it?  Are you starting to see why this is a really bad idea?
There are plenty of inventions that exist, but turned out to be bad ideas.  And I think fingerprint readers are another one of those.

This isn't a knock on Apple, as Thinkpad have embedded fingerprint readers for nearly a decade.  My intention is to help stop and think about the place of biometrics in security.  Biometrics can be use used as a lightweight, convenient mechanism to establish identity, but they cannot authenticate a person or a thing alone.
So please, if you have any  respect for the privacy your data, or your contacts' information, please don't use fingerprints (or biometrics, in general) for authentication.


Wednesday, September 25, 2013

About QFtp and stuff

Recently I started work on one module where I had to integrate FTP on the application. My focus was on getting a clean design and a good implementation.

I didn't have any idea about ftp in Qt. So I dug into the documentation and found about QFtp. After going through the main class and some related stuff I started coding. I referred to the sample application. And as I went on coding I came to understand how easy to use the class implementation is. In about 300 lines of code my simple get file functionality was coded. Now I'm working on bulletproofing my code and I can see the perfectly logical ways in which QFtp's error handling is.

In short I'm very impressed by QFtp's implementation. And kudos to whoever coded this brilliant class!

Thursday, September 12, 2013

Tech sanyas

Would not checking fb means you have taken fb sanyas? Well, one of my colleague haven't logged in to Facebook in last three months.

That made me take a look at my use patterns. I usually log in/ check out Facebook 3-5 times a day. Then there are all those morning tech news sites - my favorites are the verge, Engadget, anandtech, gsmarena. Sometimes I check out tomshardware and ZDNet too.
Then there are the stupid Google maps detours when I'm not feeling particularly productive.
And yeah besides tech, I also visit bikeszone for bicycle related news and discussions. 
And sometimes when I'm feeling musical I visit rolling stone for music reviews.
And imdb/ rottentkmatoes for movie reviews. Damn, that's a lot of misc internet use. And I don't think I can cut any of it off.
But what if I am to take tech sanyas? What would I cut off? Big question this!!!

Thursday, August 29, 2013

WP7 and the ActiveSync supported Host Internet Sharing

 Did you know that WP7 supports Host's Internet Sharing via Zune? To see that enable Airplane mode and connect your WP7 device to your computer. Now open zune, and let it connect to your phone. Once your phone is detected, open Internet Explorer on your phone and see if you can open any website. Provided your computer is connected to internet, websites should open on your phone.

You must also know that media access is not allowed in a WP7 device while connected to computer. Which means that you can't really use the computer's internet connection to do much useful things. But if your WP7 device is unlocked then you can use WPHack to enable media access while connected to computer and that make it possible to use your WP7 device as normal internet connected device where you can download anything, store it in phone storage and as such. It also allows you to update apps/ install new ones from marketplace/ download stuff from internet via various apps. In short, it makes your WP7 device even better!

Friday, August 16, 2013

Using Qwt Plots: more functionality in the app

Added some more functionality. Now we can see the source and the prediction graph on left side. On right I'm showing the filtered results. The algorithm is still a bit whacked up, but the UI does look good.

The additions were: Stylesheets for styling the groupbox and the graphs - canvas and curves. I also used QPens to make the curves look better. Also added a checkbox for providing anti-aliasing. It doesn't look that good on current graph but if there's a simpler graph then that may benefit from anti-aliasing.

Tuesday, August 13, 2013

Using Qwt plots

I wrote a small app for stream processing some data. This is the front-end which shows a stream of data (simulated as of now ) and plotted in a qwt plot on the right.

This in itself is not the important thing - that's some logic I'm going to write to filter the data. But this form helps me in visualizing the real thing.

Tuesday, August 6, 2013

Experience creating and deploying Hello world app for windows phone

Recently I unlocked my Samsung Omnia W which I previously upgraded to WP7.8 using Heathcliff's unlock for Samsung second generation devices. Afterwards I got hold of some xap's and deployed them to the phone to test out the unlock and things worked out quite well.
Thus now I have a device that I can code for and put my code in. So just to test the development environment I tried installing the SDK and coding a simple Hello World app for my wp.
There I ran into a few problems and I had to run circles to find solutions / workarounds for them. The first problem was I had WP7 sdk which is incompatible with Windows 8 (which is my current desktop OS of choice along with elementoryOS). So after looking at a few workarounds for the incompatibility which involved downloading a few update packages and messing with the system. I discarded them since I didn't want to mess with my Win8 installation which is already finicky enough.
So I decided to keep the existing WP7 SDK install since I can use Application Deployment tool from it. I created a new Win7 VM in VirtualBox, and installed the WP7 SDK in there. After installing SDK, I created Hello World app which was straight forward. Then I thought I would deploy this to the phone directly. But this didn't work. Somehow the Win7 VM would error out on attaching the phone as a USB Peripheral. And I had run out of patience by then. So I copied the created xap to Host Win8 system and used Application Deployment tool from there to put it into the phone.
Later search revealed that WP8 SDK can be used to create and deploy WP7 applications as well. But it's another 1.6GB download so I am sticking with my current VM setup as it is.
Now I'm looking for a good idea to make it into an app. Hopefully I'll find some more use of my Omi as I like to call it.

Monday, August 5, 2013

xev to check xinput events

xev is a utility that draws a window on screen and processes all events occurring in that window like mouse in, mouse out, mouse move with screen coordinate output.
Very useful when checking touchscreen input values.

Friday, August 2, 2013

CentOS installation in GUI mode to a terminal where you get only text mode

To get GUI mode over vnc, you need to edit the first option and append "linux vnc vncpassword=qwerty" to the line and boot using that.
This will basically start a vnc server on the terminal and you can login to that machine using any vnc viewer with "qwerty" as password.

The need for GUI mode maybe anything - e.g. advanced partitioning options which are not available in text mode.

Tuesday, July 30, 2013

Samsung Windows Phone Diagnosis App

Samsung ATIV S (Also work on Samsung Omnia W)
##MFG# displays (and installs) the "Diagnosis" app.
##3282# gives many alternatives to edit/read on another user's GT-I8750
Lots of options [from ##3282] on my SGH-T899M as well (different model ATIV S)

Install diagnosis app via ##634# code and you type 3 digits starting with 15 (last digit doesn't matter) you will have access to hidden test menu...
For example we can view Samsung ROM version (mine is I8750XXAMC1) Unfortunately [the user] couldn't take a screenshot while viewing that menu.

Here are some codes for ATIV S, these are intended to be inserted in the Diagnostic Dialer
Imei Number Prompt: *#06#
Screen and vibration test menu: *#0*#
Battery test menu: *#0228#
Firmware version prompt: *#1234#
FTA SW Version menu: *#1111#
FTA HW Version menu: *#2222#
FTA HW Version menu: *#8888#
FTA SW Version menu: *#9999#
Basic information Testmode menu: *#0011#
Vibrations test menu: *#0842#
Bluetooth MAC Address prompt: *#232337#
I don't know what the FTA menus are for, but they look dangerous (and potentially useful).

Wednesday, July 17, 2013


Ducky is a small project showing a duck picture and moving it around the screen.

Link to File

Thursday, July 4, 2013

Public - Private key encryption using OpenSSL

Original Link:

Public – Private key encryption using OpenSSL

Sometimes I need to encrypt some stuff but do not want to install PGP or GPG. I typically use OpenSSL for this kind of thing and have written a simple frontend script to achieve strong password based encryption using OpenSSL. Sometimes you need public / private key encryption though, below will show you how to do it using just OpenSSL.
Public/Private key encryption is a method used usually when you want to receive or send data to thirdparties. The system requires everyone to have 2 keys one that they keep secure – the private key – and one that they give to everyone – the public key. Data encrypted using the public key can only ever be unencrypted using the private key. This method of encryption that uses 2 keys is called asymmetric encryption.
So by example if Person A want to send Person B data in a secure fashion she just have to encrypt it with Person B's public key, only Person B can then open the file using her private key. There are other advantages to this kind of encryption. If I met you in person and gave you my public key, I can send you something electronically using my private key to encrypt it, if the public key you have can decrypt that data then you can trust that it was sent by me, it's mathematical proof of identity. This is the basis for Digital Signatures.
Using OpenSSL on the command line you'd first need to generate a public and private key, you should password protect this file using the -passout argument, there are many different forms that this argument can take so consult the OpenSSL documentation about that.

Thursday, June 27, 2013

Hello World

Syntax Highliter in Use

// understanding call-by-value vs call-by-reference


int f1 (int, int, int);
int f2 (int&, int&, int&);
int f3 (int, int&, int);

void main () {
  int i, j, k;


  cout << endl;
  cout << "Initial values of i, j, and k are: " 
    << i << ", " << j << ", and " << k << endl << endl;
  cout << "f1(i,j,k) = " << f1(i,j,k) << endl;
  cout << "Values of i, j, and k after the call to f1 are: " 
    << i << ", " << j << ", and " << k << endl << endl;
  cout << "f2(i,j,k) = " << f2(i,j,k) << endl;
  cout << "Values of i, j, and k after the call to f2 are: " 
    << i << ", " << j << ", and " << k << endl << endl;
  cout << "f3(i,j,k) = " << f3(i,j,k) << endl;
  cout << "Values of i, j, and k after the call to f3 are: " 
    << i << ", " << j << ", and " << k << endl;

int f1 (int x, int y, int z) {

int f2 (int& x, int& y, int& z) {

int f3 (int x, int& y, int z) {

[Article Link] Publish Source code in Blogger

Friday, June 21, 2013

Refactoring n configuring

We have a set of scripts in one of the products in my current company. I have been maintaining them for last six months. They are simple scripts which perform some routine maintenance task like logging etc.
So I have been steadily improving them and adding more options and hardening them. But I wasn't able to spend some considerable time and finish them off with some real world unit testing and accompanying documentation with guidelines for use in various scenarios.
I finished this big task this week. I have made considerable changes to make them very configurable so that they can be used in one of 7-8 possible use cases with minimal amount of changes. I also added logging capability and fine tuned it. That was a feature we were jn sore need of having. The logging capability will let us perform statistical analysis based on the logs. Overall this was the one great task of the week.
On the documentation front I have created a standard document which depicts all the scenarios in which the scripts will be used and I have provided samples for the use cases too. I think this is going to help our implementation team a lot. 

And I thought Qt's documentation was average

Till I encountered OpenSSL!!!

Thursday, June 13, 2013

Upload files to a FTP site via batch script

Original Script: 

ECHO Upload to FTP
ECHO Written by: Jason Faulkner

REM Usage:
REM UploadToFTP [/L] FileToUpload
REM Required Parameters:
REM    FileToUpload
REM        The file or file containing the list of files to be uploaded.
REM Optional Parameters:
REM    /L    When supplied, the FileToUpload is read as a list of files to be uploaded.
REM        A list of files should be a plain text file which has a single file on each line.
REM        Files listed in this file must specify the full path and be quoted where appropropriate.

SETLOCAL EnableExtensions

REM Connection information:
SET Server=
SET UserName=
SET Password=

REM ---- Do not modify anything below this line ----

SET Commands="%TEMP%\SendToFTP_commands.txt"

REM FTP user name and password. No spaces after either.
ECHO %UserName%> %Commands%
ECHO %Password%>> %Commands%

REM FTP transfer settings.
ECHO binary >> %Commands%

IF /I {%1}=={/L} (
    REM Add file(s) to the list to be FTP'ed.
    FOR /F "usebackq tokens=*" %%I IN ("%~dpnx2") DO ECHO put %%I >> %Commands%
) ELSE (
    ECHO put "%~dpnx1" >> %Commands%

REM Close the FTP connection.
ECHO close  >> %Commands%
ECHO bye    >> %Commands%

REM Perform the FTP.
FTP -d -i -s:%Commands% %Server%


REM Clean up.
IF EXIST %Commands% DEL %Commands%


/*********************   Modified script *************************/
/* Modified to provide fixed username/password and variable server IP 
to be passed on command line as first parameter and after that the file/ 
fileList to be ftp'd */

ECHO FTP Upload Script

ECHO Written by: Jason Faulkner

REM Usage:
REM FTPScript serverIP [/L] FileToUpload
REM Required Parameters:
REM serverIP
REM     The IP of FTP site; Username/password is hardcoded
REM    FileToUpload
REM        The file or file containing the list of files to be uploaded.
REM Optional Parameters:
REM    /L    When supplied, the FileToUpload is read as a list of files to be uploaded.
REM        A list of files should be a plain text file which has a single file on each line.
REM        Files listed in this file must specify the full path and be quoted where appropropriate.

SETLOCAL EnableExtensions

REM Connection information:
SET Server=%1
SET UserName=ftpuser
SET Password=ftppassword

SET Commands="%TEMP%\SendToFTP_commands.txt"
CD "D:\LIU_BACKUP\master"
REM FTP user name and password. No spaces after either.
ECHO %UserName%> %Commands%
ECHO %Password%>> %Commands%

REM FTP transfer settings.
ECHO binary >> %Commands%

IF /I {%2}=={/L} (
    REM Add file(s) to the list to be FTP'ed.
    FOR /F "usebackq tokens=*" %%I IN ("%~dpnx3") DO ECHO put %%I >> %Commands%
) ELSE (
    ECHO put "%~dpnx2" >> %Commands%

REM Close the FTP connection.
ECHO close  >> %Commands%
ECHO bye    >> %Commands%

REM Perform the FTP.
FTP -d -i -s:%Commands% %Server%


REM Clean up.
IF EXIST %Commands% DEL %Commands%


Wednesday, June 5, 2013

OpenSSL vs the Me

I have been working on openSSL integration for some time. And its been quite some experience. I knew openSSL by name only. I was aware of SSL certificates - you know how sometimes things fail when you get some invalid certificate error.
So I have learned a lot about both OpenSSL and authentication. I have also learned about public key encryption. But this has not been easy. I got stuck at almost every step.
The problem was OpenSSL looks easy to use and as long as you are generating some certificates and using them with your web hosts. Look towards integration with existing software and then you need to take some easy chill pill.
Basically I didn't even wanted to touch openSSL. I wanted to use Qt's inbuilt openSSL support and be done with it. But the requirements changed midway and Qt just couldn't extend far enough. I tried everything till inheriting QSslCertificate but it just wasn't designed to serve our requirement.
So after going through some OpenSSL research I decided to bite the bullet and went for it. That meant I needed to build openssl with my setup. Thankfully I got hold of a good tutorial which asked me to install perl and then after a few steps my openssl was ready. Next I created a sample certificate and went about reading it. Here I hit a wall. Since openssl integration is a rare thing, there are so few pointers out on the net. But after struggling around for a few days I finally picked up a few pieces here n there and made them work together to read my sample certificate.
After getting there I integrated my existing authentication code to it and made that work together.
You must be thinking, wow! He has done it. But that's just the first half. Since I wanted almost no human interaction I had to create a program to generate the certificate as well. There I hit few more snags. But after some time I even got that to work. But by then the requirement has changed again and so that invalidated my code.
So now I am stuck where I have the certificate creator and authenticator working properly but the reader isn't able to read the generated certificate. I know few more hours of headbang is going to solve this too. But just so you know, openssl sucks! C n C++ suck even more. But I'm happy fighting!

Friday, May 10, 2013

something nontechie - this time it's about vegetables...

You will find here alphabetical list of all vegetables used in indian kitchen along with their names in English and Indian languages, Hindi, Marathi and Kannada.
This a list of culinary vegetables. That is, some of these are actually fruits but are used as vegetables. So they are included in this list.
We are still adding to this vegetable list. Please let us know if we have missed any vegetables using the comments below or our comment form. Thank you in advance.
English Hindi Marathi Kannada
Ashgourd Petha Kohala Budkumbalkai
Artichoke Hathichouk

Baigan Baingan Vangi Badnekai
Banana-raw Kachcha Kela Kachchi Keli Balekai
French Beans Farasbi
Farasbi Hurlikai
Beans - Runner Farasbi Farasbi Hurlikai
Beetroot Chukandar Beetroot Beetroot
Bell Pepper/Capsicum Simla Mirch Dhobli Mirchi Donmensinkai
Bitter Gourd Karela Karle Hagalkai
Bottle Gourd Lauki - Kaddu - Doodhi Doodhi Bhopla Sorekai
Broad Beans - Fava Beans - Field Bean Papdi - Val - Bakla Papdi - Val Avarekai
Cabbage BandGobi, Pattagobi Kobi Kosu , Elé kosu
Capsicum/Bell Pepper Simla Mirch Dhobli Mirchi Donmensinkai
Carrot Gajar Gajar Gajjari
Cauliflower Phoolgobi Cauliflower, flower Hookosu/ Cauliflower
Cilanto, Coriander leaves Kothmir Kothimbir Kothambari soppu
Cluster Beans Gavar Gavar Gorikai
Colacassia Arbi - Arvi Alu chi pane Kesu
Corn Makkai Maka Musakina Jola
Cow Peas - Lobia Chawli Alsande
Cucumber Kheera - Kakdi Kakdi Savatekai
Double Beans Boda Double bee Chapparadavrekai
Shingh phali / Sahjan ki phali Shevagyachi sheng Nuggekai
Field Beans Val Val Avrekai
Garlic Lahasun Lasun Bellulli
Gherkins Tendli Tondali Tondekai
Green Chili Hari Mirch Hirvi Mirchi Hasi Mensinkai
Green Peas Mutter Matar, Vatana Hasi Batani
Ivy Gourd - Tindora Tondli
Tondali Tondekai
Jackfruit (raw)
Kathal Phanas Halasina hannu
Gathgobi, knolkol Navalkol Navil kosu
Lady Finger - Okra Bhindi Bhendi Bendekai
Long Beans - Cowpea Lobia
Chawli, Chavli Alsande
Mushroom Khumb , Guchhi Khumb, Kutryachi chattri Anabe
Onion Pyaj Kanda Irulli, Ullagaddi
Potato Aloo / Batata Aloo / Batata Batata Aloogedde
Pumpkin Kaddu Bhopla Kumbalkai
Radish Muli Mula Mulangi
Radish Pods Mungre, moongre, mooli pods Dingari, mulyachya shenga Mulangi saang
Ridgegourd Turai Dodka - Ghosavale Hirekai
Sweet Potato Surti Kand Ratali Gensu
Tamarind Imli Chinch Hunsekai, hunse hannu
Yam Surti Kand Suran Surangadde

Tuesday, May 7, 2013

Boot a USB Flash Drive in VirtualBox

Original URL:

Here, we show you how we booted from a USB Flash Drive in VirtualBox. This process will allow you to run your Portable Linux from the USB Flash Drive or external hard drive while still running from Windows. By default VirtualBox does not support USB Boot. However this is easily attainable by mapping a virtual machine to the USB Drive.

VirtualBox Website:
How to Boot from a USB Flash Drive in VirtualBox
  1. Download and Install VirtualBox (Install to the default path)
  2. Click Start > Run Type diskmgmt.msc and click OK (In Vista/Win7 use the Start > Search Box)
    (1) Locate your USB Disk #
  3. Open a command prompt cmd.exe (run as admin in Vista/Win7)
  4. Type cd %programfiles%\oracle\virtualbox
  5. Type the following (replace # with your USB Disk number from step 2)
    VBoxManage internalcommands createrawvmdk -filename "%USERPROFILE%"\.VirtualBox\usb.vmdk -rawdisk \\.\PhysicalDrive#
  6. Start VirtualBox (run as admin in Vista/Win7) and create a New Virtual Machine Create a New Virtual Machine
  7. When prompted for a Virtual Hard Disk, tick use existing hard disk and select usb.vmdk Select Existing Virtual Disk usb.vmdk
  8. Once you have finished creating your New Virtual Machine, click StartStart VirtualBox
If all goes well, VirtualBox should now be running the Linux version installed on your USB device emulated from within Windows.

Thursday, April 25, 2013

Dependency walker

Dependency walker is a great program that tells you what dlls your windows program is using. So you can ship your program with only those dlls and not need to carry a number of unnecessary files.

Wednesday, April 24, 2013

SDM - SATA disk module

For last few days I have been working on a SDM based system. The goal was to setup a lightweight system with a SDM instead of a SATA hdd as main storage. The concern was that the SDM is supposed to have write failure protection. This will prevent data corruption in case of power failure.
The SDM was an apacer module and was of 4GB capacity. As I had worked on such small scale systems the task of installation and configuration was handed to me.
The installation was straight forward. We were going to start with a minimal CentOS Desktop and add extra packages as per need. So to safely test it I started with a 4GB virtual machine in VirtualBox.
I installed CentOS in it and that took about 1.6GB of available space. Next I put a minimal QT and QWT library package plus our Client software on top of that. This consumed about 300 MB of more space. Finally I installed PostgreSQL v9.1 as required. This took another 180MB after creating the empty databases etc.
Later I installed telnet, vsftpd and x11vnc servers. And our machine was ready. Configuring so many pieces of software was complex task but I had help from implementation veterans.
After it was all tested fine, we replicated it on DOM.
So after about 3 days of work, our DOM based Client is ready. Later the implementation guys imaged the setup for replicating on multiple machines.
It was good exercise in that I get to know CentOS better and also so much configuration helped me better understand the various parts and pieces of the configuration for the software involved.
Later I performed some database performance and storage profiling for this DOM based system. It was found that with our current data acquisition profile we can comfortably store at least 10 days worth of data on such a system. This added with power failure protection makes it a good solution.

Fixing Turbo C in windows 7

There's a FIXED version of tc floating around in the net and for general programs it works well. But one of my friends being an adventurous soul wanted to try some graphics functions and the program wouldn't run. The error was related to the path to the BGI files.
The problem came to me and I remembered this being caused by the c:\Program Files location of turbo c folder. So I had him copy it to C drive and modify the path accordingly.
With updated path the program stared working and a circle appeared on the screen.
Made me recall my own college days.

Tuesday, April 23, 2013

GPS run/cycling trackers

I have wanted to track my exercise for a long of time. But I don't exercise that much - couple of long walks a week plus some aerobics. So I really was being lazy at it. But I've decided to up my efforts and so I was looking for an app that would help me keep track of my efforts and the amount of distance I passed on and the speeds etc.
After going through the measly no of such apps on my WP Omnia, I stumbled across "run the map". And after using it for a few times I think it's a great app for tracking your exercise.
The main interface is divided into 3 pages - first page shows Recorder i.e. speed, distance and elapsed time. This page also has start-stop button as well as exercise selector. Below these, we get current values for speed and altitude.
Next page is maps which shows your real time path updated at regular intervals.
The last page is mixed mode where you get to see both the map and recorder values.
Also available are features to export GPX or KML files of your runs which you can import on other services and apps for interoperability.
Overall "run the map" is a great exercise map tracker.

Wednesday, April 17, 2013

Tuesday, April 16, 2013

Very interesting discussion

I was searching for a decent way to kill hung jobs and stumbled onto following discussion:
Orig URL:
It's very informative!
A: I tried to kill all my background jobs submit earlier under KUbuntu by
kill -9 $(jobs -p)  
Although this command immediately gave the message like
[1] Killed myjob1
[2] Killed myjob2
I can still see their processes hanging in the output of top and the CPU and memory usages are not changed in the output of uptime and free.
So I guess I must have not killed them properly. Can someone please explain what's happening to me and what shall I do?
I found that in top, if type k and input the PID I can kill the processes one by one. SO is this different from the command kill?
I also found somewhere online about not recommending kill -9
Useless Use of Kill -9 form letter
(Quote abomination)
No no no. Don't use kill -9.
It doesn't give the process a chance to cleanly:
1) shut down socket connections
2) clean up temp files
3) inform its children that it is going away
4) reset its terminal characteristics
and so on and so on and so on.
Generally, send 15, and wait a second or two, and if that doesn't work, send 2, and if that doesn't work, send 1. If that doesn't, REMOVE THE BINARY because the program is badly behaved!
Don't use kill -9. Don't bring out the combine harvester just to tidy up the flower pot.
Is this true? What does it mean by "send 15", "send 2" and "send 1"? Are they commands themselves or "kill -15 PID", "kill -2 PID" and "kill -1 PID"?
Thanks and regards!

5 Answers

Your process is probably dead but it still show up in the process table entry because it is a "zombie process". When a child process terminated and completely disappeared (except its process table entry) and the parent wouldnt be able to fetch its termination status (thru any of the wait functions), it is called zombie... Killing (thru signal) a zombie wont work because it is already terminated. What you need to do is find out its parent process and kill thjat one cleany, thus not using kill - 9
here are two simple steps to kill a zombie...
  1. if the parent is still alive, try to kill it (or SIGHUP is all you need)
  2. if number 1 fails, there is a bug in the kernel.... reboot is your friend and fix that bug :->

see man kill for a definition of the various signals available, but yes.
  • 15 is SIGTERM, and asks a program to exit.
  • 2 is SIGINT and is equivalent to Control-C
  • 1 is SIGHUP, and indicates that the terminal has hung up.
These inform a process that the user is "done" with the process, though they indicate somewhat different reasons.SIGTERM might be interpreted as "finish the currrent task, but then exit; don't start another", SIGINT means "abandon what you're doing and quit", SIGHUP just means nobody's listening anymore (a server process might legitimately react to SIGHUP by discontinouing its console output and continuing to run).
  • 9 is SIGKILL, and is special in that it's the only one that the process can't catch and handle internally. It simply results in the kernel never returning control the the process, giving it no chance to clean up.

It does mean using kill -15 PID (or another number) instead of kill -9 PID. The numbers are equivalent to different unix signals.

It means type "kill -1" or "kill -15" instead of typing "kill -9". Kill -9 is a hardcore bullet in the head of any running process, kills it dead in a dirty state which can cause memory leaking, blah blah.
If you're typing kill -9 and it's not working, then I'd look to make sure the process is not getting respawned, and that you have permission to kill that process.

Signal 9 is SIGKILL. Sending a SIGKILL is asking the OS to immediately kill the process, no questions asked. The process is not notified in advance and has no chance to clean up after itself.
Signal 15 is SIGTERM. Sending a SIGTERM is asking the OS to ask the process to shut itself down.
SIGKILL may be ignored if the OS thinks the process is doing IO, or if it's a Zombie (A child process whose parent didn't clean up after it).
SIGTERM may be ignored by the application, but it is not recommended that applications do this, as OSes send SIGTERM during shutdown, followed shortly by SIGKILL if a program is still running.
Note: The command line kill is always asking the OS to send a signal to the application, which it may or may not do based on who owns the process, etc...

Ultimately I have decided to create a shell block for safely killing any process but it's going to be a big task. Below is what I am working on right now.

killall myprocess
MYPROCCOUNT=`ps -e | grep myprocess | wc -l`

while [ $MYPROCCOUNT -gt 0 ]; do
       MYPROC=`ps -e| grep myprocess| tail -1| xargs |cut -d" " -f1`

       if [ -z $MYPROC ]; then
           echo "All myproc's killed!"
            echo "Killing $MYPROC"
            `kill -9 $MYPROC`

       MYPROCCOUNT=`ps -e | grep myprocess | wc -l`

I'll have to add lot more code to handle 15, 2 and 1 signals and then give 9 as ultimate kill!

Wednesday, April 10, 2013

One line of code made so much change!


Monday, April 8, 2013

Image Processing

If you are familiar with image processing textbooks and articles, you must have seen the following picture:
Following is an extract from the comp.compression FAQ:
For the curious: 'lena' or 'lenna' is a digitized Playboy centerfold, from November 1972. (Lenna is the spelling in Playboy, Lena is the Swedish spelling of the name.) Lena Soderberg (ne Sjooblom) was last reported living in her native Sweden, happily married with three kids and a job with the state liquor monopoly. In 1988, she was interviewed by some Swedish computer related publication, and she was pleasantly amused by what had happened to her picture. That was the first she knew of the use of that picture in the computer business. 

A scan of the original Lenna from Playboy is available from:
The editorial in the January 1992 issue of Optical Engineering (v. 31 no. 1) details how Playboy has finally caught on to the fact that their copyright on Lena Sjooblom's photo is being widely infringed. However Wired mentionned that: "Although Playboy is notorious for cracking down on illegal uses of its images, it has decided to overlook the widespread distribution of this particular centerfold".
The following was found on sci.image.processing:

Subject: Lena (parting words) (longish)
Date: 21 Feb 1996 13:33:20 GMT
Newsgroups: sci.image.processing

If Dr. Munson and the Transactions can forgive the copyright infringment, the departing Editor-in-chief's comments on the Lena deal are too good not to share with the group.

A Note on Lena

During my term as Editor-in-Chief, I was approached a number of times with the suggestion that the IEEE TRANSACTIONS ON IMAGE PROCESSING should consider banning the use of the image of Lena. For those of you who are uninitiated in this brouhaha, let me provide a few facts. The original Lena image was a photograph of a Swedish woman named Lena Sjooblom, which appeared in the November 1972 issue of Playboy Magazine. (In English, Lena is sometimes spelled Lenna, to encourage proper pronunciation.) The image was later digitized at the University of Southern California as one of many possible images for use by the research community. I think it is safe to assume that the Lena image became a standard in our "industry" for two reasons. First, the image contains a nice mixture of detail, flat regions, shading, and texture that do a good job of testing various image processing algorithms. It is a good test image! Second, the Lena image is a picture of an attractive woman. It is not surprising that the (mostly male) image processing research community gravitated toward an image that they found attractive. The Woody Allen buffs among you may be interested to know that the Lena image appeared in the movie Sleeper. Tom Huang pointed this out to me. In the scene where Allen awakes in the year 2173, he is asked to identify a number of artifacts from the past, including photographs of Joseph Stalin and Charles de Gaulle, and the issue of Playboy Magazine containing Lena. The view to the movie watcher is fleeting and somewhat unclear, but this is the closest I have come to viewing the original image. From second-hand reports from Sweden, I am told that Lena is living in a small town south of Stockholm. She is said to be quite amazed that her image has become a standard in the research community. In recent years, Playboy Enterprises was giving thought to enforcing their copyright on the Lena image (see Brian Thompson's editorial in the January 1992 issue of Optical Engineering). It appears, though, that this is no longer the case.

So what is the problem? Well, quite understandably, some members of our community are unhappy with the source of the Lena image. I am sympathetic to their argument, which states that we should not use material from any publication that is seen (by some) as being degrading to women. I must tell you, though, that within any single segment of our community (e.g., men, women, feminists), there is a complete diversity of opinion on the Lena issue. You may be surprised to know that most persons who have approached me on this issue are male. On the other hand, some informal polling on my part suggests that most males are not even aware of the origin of the Lena image! I have heard feminists argue that the image should be retired. However, I just recently corresponded with a feminist who had a different point of view. She was familiar with the Lena image, but she had not imagined that there could be any controversy. When I offered an explanation of why some persons are offended by the use of the image. she responded tartly. A watered-down version of her reply is, "There isn't much of Lena showing in the Lena image. This political correctness stuff infuriates me!"

So there you have it. Much of our community is blind to the fact (until now!) that there is a controversy. Among those who are "tuned in," there is vigorous disagreement. As Editor-in-Chief, I did not feel that this issue warranted the imposition of censorship, which, in my view, should be applied in only the most extreme circumstances. In addition, in establishing the precedent, I was not sure where this might lead. Should we ban the Cheerleader video sequence? Should we establish an oversight panel to rule on acceptable imagery? Instead, I opted to wait and see how the situation might develop. I suspected that the use of Lena would decline naturally. as diverse imagery became more widely available and as the field of image processing broadened in scope. Although the use of Lena has declined (witness our January, 1992 issue!), this image still appears so frequently that I imagine it must be grating on those who oppose its use. What to do? I favor a compromise of sons. I suggest that the IP authorship be more sensitive to the feelings of those who are offended by the Lena image. In cases where another image will serve your purpose equally well, why not use that other image? After all, why needlessly upset colleagues? And who knows? We may even devise image compression schemes that work well across a broader class of images, instead of being tuned to Lena!

Editor-in-Chief, Emeritus

I was gratified to note that there were at least three articles in that issue of Tr. Img Proc. with Lena test image! There was also more using The Photographer, maybe we should start a legend that the Photographer was photographing Lena at the Bridge............ ;')
The following was found on Wired
Playmate Meets Geeks Who Made Her a Net Star
by Janelle Brown
6:11pm 20.May.97.PDT

Having graced the desktops of millions of engineers, researchers, and digital imaging specialists for 25 years, Playboy's Miss November 1972 - dubbed the "First Lady of the Internet" - is coming to meet her fans.

Lena Sjooblom became Net royalty when her centerfold was scanned in by programmers at the University of Southern California to use as a test image for digital compression and transmission over Arpanet, the precursor to the Internet. Years later, the "Lena" image (a closeup of her face and bare shoulder) is till in the industry standard for tests. This week, Sjooblom is making her first public appearance at the 50th Annual Conference of the Society for Imaging Science in Technology, as part of an overview of the history of digital imaging.

"They must be so tired of me... looking at the same picture for all these years! comments Sjooblom, who was, until last November, unaware of her fame, and who has still never seen the Net. This week, she is busy signing autographs, posing for pictures, and giving a presentation about herself at the conference.

Playboy helped track down the Swedish native in Stockholm, where she helps handicapped people work on (non-networked) computers. Although Playboy is notorious for cracking down on illegal uses of its images, it has decided to overlook the widespread distribution of this particular centerfold.

Says Eileen Kent, VP of new media at Playboy: "We decided we should exploit this, because it is a phenomenon."