17 April 2014

Voting Tech

I was very happy when EVM's were introduced for voting. A quicker, more efficient technique of counting votes. Vote counting happens in 2 to 3 hours, as compared to the 30 to 40 hours of manual counting (and remuneration). Able to cater to 64 candidates, the current EVM's can record only 3840 votes, which is surprising, because even if you allocate 25 bytes per vote, 3840*25 comes to less than 1MB. Every polling station having an average of 1400 voters, this seems like a reasonable decision. Their way of choosing the right hardware for the right purpose.

The votes stay registered in memory for more than 10 years (an Engineering estimate) even without the battery. And guess what? With EVM's, there are 10000 tons of ballot paper saved = 2,00,000 trees saved.

Security
The control unit of the EVM is designed to be standalone. They do not transmit results to the Election Commission even though they could, if they used RFC4418's Universal Message Authentication Code. Having not used UMAC is good, because the eventuality of remote tampering is avoided. Given the strict security that it is under, it's said to be unlikely that anyone would get the chance to tamper with it.

What if you don't like any candidate?
If people feel their vote does not count, or that there's no good candidate, I'd encourage them to at least show up and choose the NOTA option on the voting machine. It's useful, because if NOTA receives a majority vote or a plurality vote, formal procedures would be invoked, like leaving the office vacant, attracting action such as having the office filled by appointment, re-opening nominations or having another election (more info on how to find info about candidates, below).
The real problem though, is not with the voting machines. It's with people not receiving their voter ID's and not figuring on the voters list. Hope that could be addressed first, before the media persecutes non-voters from not voting.


Did you know of the other types of voting machines world over?



Images are from Wikipedia. These are the permissions for file reuse.

The other useful piece of tech I'd like to draw your attention to, is Google's tool which helps us find info about the Lok Sabha candidates and our constituency Member's of Parliament (MP's). They say they source their info from the Association for Democratic Reforms, PRS Legislative Research and Liberty Institute India. It was nice to look up the candidates in my area and was surprised that many of them had criminal cases against them. The map has the facility of typing the pin code too, but it didn't work correctly for me. I was taken to some other city when I typed. I've reported the error to Google; hope they work on it.

Do have a look at candidates in your area:


Now even Bing has come up with info on elections; using animations like the ones in d3.js.



For queries on voting:
There's (a page which could be re-programmed to load faster) Jaago Re FAQ.


The page on the ECI though, was a bit disappointing because it couldn't find me :) Possibly the database isn't up-to-date.


As a tech person, although I'm happy to see so many advances in the availability of data, what I'd really like to see is good governance. I don't support any party when I say this, but to me, statesmen like Mr. Jawaharlal Nehru, Mr.Manmohan Singh and Mr.A.P.J. Abdul Kalam are people I admire, because they kept the dignity of their posts and kept their focus on development. Hoping to see technology bringing a change in the way data about politicians and the work they do is presented to the public. Less of advertising and more of real development work and good governance.

13 April 2014

Pushing to GitHub without the authentication problem

After creating a repository in GitHub, accessing it and pushing to it from Fedora with Smartgit and an authentication token, I found it very perplexing that i wasn't able to do the same thing from Windows. Here, whenever I tried pushing to the repository, Smartgit gave me an authentication error. If anyone else is going through the same problem, this is the way to solve it:

Download and install Git for windows: http://git-scm.com/downloads

Open the Git Gui and select "Show SSH key"




Click on "Generate a key" and copy that key to the clipboard. This is the key with which Github will know that a connection from your PC is genuine. You'll be asked to enter a passphrase. Remember this passphrase, because everytime you want to push to the repository, you'll be asked for this passphrase.

Open your GitHub account and navigate to the account settings > SSH keys > Add SSH key
to add the key that you copied to the clipboard.


I initially tried using PuTTY's plink.exe (there's a GIT_SSH system environment variable which had first pointed to just 'plink' and I changed it to the full path to C\Program Files\PuTTY\plink.exe, (but the right way to do it is to point it to the ssh.exe of the Git installation, after which the Git GUI's will work fine)



but kept getting a  "The server's host key is not cached in the registry" error) to do the ssh authentication. Then decided to unset the GIT_SSH variable. Just open up the Git Bash prompt in Windows, and type "unset GIT_SSH" (without the quotes).

That's it! Now you'll be able to clone and push to GitHub.

To clone:
First, copy the SSH link
 
 
Now use that link in Git Bash like so (attribution):

git clone git@github.com:yourgithubusername/yourrepositoryname.git

The remote repository will now be cloned onto your local PC.
Create a few new files in the local repository and add them to the 
local repository by typing:

git add .
 
This will add the new files to your local Git repository (note the 
space and the dot after 'add'). Commit by:
 
git commit -m "some message"
 
and push to the remote server using:
 
git push
 
It's as simple as that! Somehow, I liked the process of doing it via the 
commandline more than via a GUI.





 
At this point, you'll be able to push from SmartGit or from Git GUI too.

 
 
 
At any point of time if you wish to see the files which contain your 
ssh authentication, go to the Git Bash prompt and type:

cd ~/.ssh
ls 

and you'll see the rsa files that hold your ssh keys. If you want to 
generate new keys, you can always delete these files and create new ones 
as I showed in the beginning of this blog post.