Posts

Showing posts from October, 2013

[LINK] Making Software Successful

Original Link: http://smackerelofopinion.blogspot.in/2013/10/making-software-successful.html 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: Documentation 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 e

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

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 Makefile.am etc 2. create a script replace.sh #!/bin/bash while read line do perl -pi -e "s/user1/user2/g" $line done 3. give executable permissions to the script chmod +x replace.sh 4. run replace script as ./replace.sh < list.txt

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

Image
Original article: http://www.wired.com/opinion/2013/10/149481/ Want to Evade NSA Spying? Don't Connect to the Internet By Bruce Schneier 10.07.13 6:30 AM 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 th

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 h

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

[External] Fingerprints are Usernames, not Passwords

Image
Good Read ! Original Link: http://blog.dustinkirkland.com/2013/10/fingerprints-are-user-names-not.html 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.