Wednesday, April 27, 2016

A Better Picture of Graduation



Just thought that since everyone goes about quoting graduation marks without realizing how misrepresented they are, here is my graduation with all the tests on record.

Practicals + Theory + Internals

Sunday, April 24, 2016

Why You Should Code

Every day, every second now, we are immersed in a world where dumb machines work for us. To list the obvious, your phones, TV, desktop, watch and, laptop are all computers. In the not so obvious list come power plants, rockets, cars, water supply, GPS, and, the post office. Despite living in this obviously computer driven world very few people know how to code. So I'm going to tell you why I code, in an effort to get you to pick up yourself and get going.

Programming at it's heart is communication. You instruct the machine. You tell it what to do, your desires, the things you don't like, the things you want more of, the things you want done quickly. You tell the machine what it is that you want done. In those moments of history, you are God. You can instruct the machine to anything and it will obey. It will obey in a manner you never thought possible.

There will be no complaint, no groans. There will be no raised eyebrows. You have a powerful ally at your command. You can designate repetitive tasks to it and it will do them till the end of time itself. You can assign some intelligent tasks to it and it will do them till the end of time. What the machine does is up to you.

The first problem I solved was downloading YouTube videos. I knew I wanted this entire play list and I did not want to go on clicking anymore. So I wrote a program for it and the machine obediently downloaded the entire play list for me. That is all there is to computing. Nothing fancy, nothing mysterious. Simple communication.

I now solve a lot of problems using my laptop. I have to apply for a PhD. So I write a program to suggest names of PhD guides to me.

There are lots of ways to communicate with the computer. Sure you can use something like Excel to do calculations for you. But in that you are limited to the options that the makers of Excel provide to you. Imagine this like talking to a person with cards. You can only say what is on the cards. Of course you will be limited! On the other hand, the way for unlimited communication is programming languages. Pick any one!

All programming languages are designed with one thing in mind. How can we maximize the things you can communicate to a computer. With a programming language at hand, you can communicate with your computer in an almost unlimited fashion. So learn one.

Try out Python! Try out Matlab( or Octave if you prefer free software like I do)! Try Java or even C!

All these languages allow you to communicate with the computer. All of them are powerful! With an untiring assistant at your beck and call, your life will be a lot simpler.

Thursday, April 14, 2016

Guidelines To Cheating In Exams.

Read on with a pinch of salt.

First off let us describe the examination. Here we consider a scenario where candidates sit in a hall and are given some sort of question paper and answer sheets upon which answers must be written.

There are one or more invigilators and they keep the cheating in check. Ok then let's get started.

On an individual level
  • This is the ultimate gig. You are a one man army of complete incompetence and are set up to fail but are not prepared to give up on the test yet.
  • I admire your spirit but WTF girl(man if you please), you should have studied.Ok, let's see what you can do.
  • Before the exam:
    • Remember that short term memory is pretty useful in such situations.
      • Risk: low
      • Use: high
      • Volume: low
      • Death: you start writing before the writing time.
      • Memorize key information. If you do not know what is key ask around (remember that you are in a room full  of people who studied)
      • You will forget all of this in due time (it's called short term memory for a reason) but you have about 15 minutes to jot it down on the answer sheet before that. 
    • Chits are a classic way to cheat on an exam.
      • Risk: low-medium
      • Use: high
      • Volume: medium-high (depends on writing size)
      • Death: If you get caught by an invigilator (more on that later)
      • You essentially write stuff down on a piece of paper.
      • You hide it somewhere (washroom, your clothes etc)
      • You see what is required.
      • You dispose it (throw it from a window, eat it ?)
    • Environment tampering
      • Risk: high
      • Use: medium
      • Volume: low
      • Death: If anyone sees it you are done for
      • Involves writing things on walls, desks etc instead of paper as in the chit model.
      • I would prefer a better model of cheating.
  • During the Exam:
    • You had time and you did nothing. If you are reading this you probably tried and failed. Ok, moving on.
    • Unless answers come to your mind magically, you will have to ask someone the correct ones.
    • I don't know. If you have a good one tell me.
  • After the Exam:
    • While the paper is in transit.
      • Have a genius friend create a copy of answers for you.
      • While the paper is in transit to the examination authority, switch the answer sheets in a Mission-Impossible style.
    • Pray
With a group
  • Now this is a different beast altogether. You have allies!
  • Distracting the invigilator:
    • The invigilator is human. Meaning he has the same model of attention that everyone else has. Meaning he can be putty in your hands.
    • Help me!
      • Decide on an initiator and reciprocator among the group.
      • Initiator calls the invigilator to her side to clear up a 'misunderstanding' in the paper.
      • Everyone else quickly does the dirty while the invigilator is occupied.
      • Reciprocator then calls the invigilator to her side and the Initiator then completes her cheating.
    • Something strange
      • Drop your pencil box, get up suddenly from your seat, ask for extra sheets. In general do something which grabs attention.
      • For the rest of the people, while the attention is diverted, exchange info. 
    • Keep them walking
      • Asking for more sheets is a good way to keep them walking and thus keeping a moving field of attention.
      • An invigilator in one place is a dangerous person. they see everything and you do not know where they are seeing.
  • Call signs:
    • For MCQ type examinations, touching the nose for option 1, ears for option 2 etc are common things to do.
    • I have known this to work across 2 different halls.
  • Answer sheet circulation:
    • Using any of the above methods of distraction, exchange answer sheets between groups.
    • Use rules of exchange, thus making sure every one's chances of passing the test are maximized.
    • For example, "Pass clockwise"
Those are the things which come to mind off hand. If you have more(I know I have missed a lot) add them in the comments below. Cheers!

Wednesday, April 13, 2016

The Terminal - (Not the Movie)

"Ah, you think that a GUI is your ally? You merely adopted the GUI. I was born in it, molded by it. I did not see a terminal until I was already a man, by then it was nothing to me but blinding." - the difference between now and then.

As mentioned, I was born in 1994, and computers already had GUI by that time. Ever since I was introduced to computers, all I knew was the GUI. That had, as aptly said, defined my computer using habits. I was dependent on the mouse, I needed WYSIWYG editors and so on. Not that they are a bad thing, but they made the computer a black box for me.In college I was introduced to the command line and that gave way to a whole new experience.

This article is about how I finally embraced the terminal and started my life inside of it. As of now, I have completely un-installed the X server on my Archlinux installation and currently only have the terminal. Note that this is a TTY and not a terminal emulator like terminator and xterm.

Some of the things I had to introduce in my life to make this easier were:
  • MUTT   : for email purposes
  • IRSSI  : for IRC purposes
  • MDP    : for presentation purposes
  • TMUX   : for the sake of sanity.
  • LYNX   : for web browsing purposes
  • GNUPLOT: for plotting purposes ( the text mode is useful)
  • PANDOC : for converting various files to text
These things have made life a lot simpler. The terminal also streamlines your thought process a lot. Though it is a little tough initially, since our daily experience is so enriched by graphics, after a while you begin to see the effects.

The Changes

First off you miss the desktop. With nothing to see, you need to constantly be aware of where you are in the computer and what you want to do. That said, it takes away a lot of distraction by removing the oh-so-good movies folder from your sight.

With the Desktop gone, the file explorer is the next thing that is missed. This bit of tech had us in binds, making exploring as easy as point and click. It does however mask some things in the file system which we would have been better off knowing.

The next thing which hurts us is the browser. Firefox, Chromium and so on are all graphical browsers. We have given all of that up for the sleek, powerful and ad-free environment of terminal based browsers. Keep in mind that the image displaying powers of w3m also do not work as the X server has been removed.

Images and videos do not work. Obviously! That puts a hitch in our world, sure does.  VLC media player to the rescue. Turns out that VLC has a ASCII mode where it can display images and videos as painted by ASCII characters. Here is an example.


Best of all it works in the TTY too. That takes care of seeing a few short tutorials without the X server involved. Do take care though that you are using tmux when you are doing this as it takes over the TTY when a video is run, not allowing you to Ctrl-C it or close it in any other manner (AFAIK).

Another thorn in the side is research papers which are usually PDF files. Pandoc comes to the rescue by allowing us to convert between files. I use another utility called pdftotext.

When professors ask you to give a presentation on some topic, you begin to miss the old PowerPoint. In hindsight though, as Uncle Ben said "With great power comes great responsibility". PowerPoint makes it easy to obscure the message and deliver nothing at all. I have begun using MDP to provide presentations from the terminal itself.

With the browser gone, Gmail and Facebook has been cut off too. Although LYNX provides a decent web browsing experience, the lack of Javascript shows. For email I have started using MUTT and for Facebook, well let's just say that ship has sailed.

With the browser went the ability to use Jupyter notebooks. And so we come to our last program which helps ease the terminal life (pun probably intended). GNUPLOT let's us plot graphs in text mode, allowing us to get a general idea of what the data is like. Of course it is nowhere near the full capability of GNUPLOT but it gets the job done.

And so our life in the terminal is now rolling and work is so much more easier because of it.