The Blog

The ramblings of a schoolboy

Read Some Stuff

August 6th, 2016 by Nirvik Baruah

The (very) thin line between vigilantism and terrorism

For decades the South China Sea has been one of the most contested areas in the world. Despite years of fervent debate, military bravado and even the occasional international tribunal, the situation is no less uncertain than it was 20 years ago. Progress has been made through neither diplomatic means of negotiation nor less diplomatic acts of aggression, so Chinese hackers have taken matters into their own hands and opened up an entirely new front to the dispute. This raises the question though of where we as a society draw the line between justifiable vigilantism and indefensible terrorism. And, more importantly, it makes us consider just what we can do, if anything, when a state condones 'vigilantism' to enforce their own agenda.

Many of us are devoted to the idea that the government ought not to have any jurisdiction over the lives of its citizens. Deep within the realms of an individuals private life, many of us firmly believe that the opinions of a person should remain just that - private and unsullied by the agendas of the government. The notion of governments handing out punishments to people for doing something offbeat or deviant is inconceivable and simply unacceptable to exist within a truly free society. So why is it that whilst we condemn government rulings against private matters do we still accept and condone similarly oppressive social actions, namely through vigilantism? Surely, by imposing social standards upon others in a society through these actions we are no worse than even the most totalitarian of regimes, essentially providing people with an ultimatum between grudgingly following societal standards or facing social ostracization?

December 31st, 2015 by Nirvik Baruah

The best websites of 2015

With the year drawing to a close, it's time for me to link the five best websites that i've seen over the year and for us to give an annual salute to great websites. Each year I post a round-up of the best website designs of the year, taking into account factors such as content and usability, so without further ado here are the five best websites of 2015.

The Hugo

Going on The Hugo's website, I loved the simplicity and the colourfulness of it. As soon as you enter the site, you're immediately drawn in by the illustrations and the landing page is a precursor for the rest of the website, with it's strong colours and great use of negative space. I loved this site for how vibrant and powerful it was without overloading it with uneccesary features and by keeping to this minimalistic design it allows us to focus on what really matters: the content.

December 25th, 2015 by Nirvik Baruah

Developers and designers aren't the same

Deep in the recesses of every software developers mind is a little voice, nagging away at them every so often; a siren song if you will, the whispers of a vain graphics designer chanting ‘is design work really that difficult?’ But don’t follow that voice because developers aren’t meant to design UI, nor should they attempt to.

The fact is that developers approach tasks with a hardheaded, pragmatic attitude. It’s a useful feature really, it’s what lets them write efficient code without developing feelings of sympathy towards it, but it brings about side effects that make certain tasks harder. These side effects are what make it near impossible for a developer to become a designer because design requires ‘soul’ and ‘feeling’ and ‘pizzazz’ which may be representable in the eyes of a purebred artist but not in the eyes of a callous and cold programmer. We can code fine, but our skills in Vim don’t translate seamlessly into skills in Photoshop.

September 26th, 2015 by Nirvik Baruah

Cracking passwords with brute force attacks

Modern cryptography has killed off the brute force attack. Back in the haydays of MySpace and Bebo, brute force attacks used to be an infallible alternative to crack passwords as cheaply as possible. They were simple to program, cheap to make and required no technological know-how to use; they were almost perfect. That is until security systems began to ramp up their defenses. With websites nowadays using 128-bit keys for their encryption, and some even venuturing into the 256-bit zone, it would take millions of years to crack the code. Jon Callas has a neat way to visualise it.

'Imagine a computer that is the size of a grain of sand that can test keys against some encrypted data. Also imagine that it can test a key in the amount of time it takes light to cross it. Then consider a cluster of these computers, so many that if you covered the earth with them, they would cover the whole planet to the height of 1 meter. The cluster of computers would crack a 128-bit key on average in 1,000 years.

If you want to brute-force a key, it literally takes a planet-ful of computers. And of course, there are always 256-bit keys, if you worry about the possibility that government has a spare planet that they want to devote to key-cracking.'

August 22nd, 2015 by Nirvik Baruah

How random is random?

Computers are machines of habit. There behaviour is defined by specific rules dictated to them, and their only goal is to not stray from these rules. This makes true random number generation impossible as a computer is physically unable to create something that can never be known in the first place. Since an algorithm is used to create random numbers in software, they are called pseudo-random numbers rather than true random numbers. As the dictionary says, Pseudo-random numbers are numbers satisfying one or more statistical tests for randomness but produced by a definite mathematical procedure. So how random is a pseudo-random number?

I first started out by writing some code to determine the spread of integers, using Python 2.7.

June 6th, 2015 by Nirvik Baruah

The Fibonacci Clock

A few weeks ago, I walked into my maths lesson late to find my teacher was showing my class this article featuring a clock that shows the time by lighting up different sized rectangles in different colours. The inventor, Philippe Chrétien, called it the Fibonacci Clock, as it used numbers from the Fibonacci series to represent different rectangles. Minutes later, out of the blue he asked the class if anyone could program a clock like this. Naturally, being the only programmer in my year, everyone looked at me, and before I knew what had happened I was set the task of programming this.

Before I actually started the programming aspect of the challenge, I first had to work out what the clock actually did and how it worked. From the article above, I worked out that the different square sizes represented different values in the Fibonacci series, going from the center spiralling outwards 1,1,2,3,5. From here, you used the colour of the square and corresponding value that the square had to work out either the minutes or the hours. The squares coloured in red show the hours, so if I have the smallest square coloured red only it would be 1 o'clock. In the clock below, since the second smallest and largest squares are coloured in red, the hours would be 2 + 5 which would be 7 o'clock. All rather simple for this first step

March 28th, 2015 by Nirvik Baruah

Why More Developers Need To Spend Time Bug Fixing

Writing any piece of code, be it a website or a game, is a long process that usually takes hours of work and thought to implement. There are many stages to creating the program, from the initial idea to the rolling out the final product, but one of the biggest steps, and one many developers seem to overlook, is the stage that comes at the end: cleaning up the bugs.

Many developers, including me, suffer from a simple disease that I like to call Post-Production Indolence - the acts of laziness that occur as a result of publishing work onto a platform. This manifests itself in many different forms, but I have seen it appear most in website development. Many times, after I publish a website, my initial instinct is to immediately wipe out any memory I have of the website. It doesn't matter if the website looks funny on mobile, or if the animations slow the page down to a crawl; my work here is done. There are other forms of this disease too. I have noticed that many developers seem to feel almost insulted by the fact that something is wrong with their page. Upon seeing a comment that says something such as 'I cannot view this webpage on my device', they immediately translate the message into 'F**k you, and all your work'. These two attitudes expressed towards simple suggestions not only limit the number of people who can view and enjoy your work, but also limit what you yourself can achieve, because in my opinion, these suggestions aren't just annoying bugs, they're new possible elements to add.

January 28th, 2015 by Nirvik Baruah

The evolution of website design

Since Tim Berners-Lee created the first website back in 1991, the way we view the web has changed drastically. From simple text-based sites to extravagant Flash animations to sleek, flat websites, here is how the internet has evolved over the ages.

The Early 1990s - Genesis

The 1990s was the beginning of the internet, with Tim Berners-Lee creating the worlds first website in 1991. Due to the fact that internet loading times weren't exactly fabulous and that the world wide web had only been created a few years prior, websites composed of simple, plain HTML documents with inline hyperlinks connecting pages together. These websites resembled single-columned text documents, and while their design was not very impressive, it did pave the way for a new age of website design.

December 31st, 2014 by Nirvik Baruah

The best websites of 2014

With the year drawing to a close, it's time we celebrate the 5 best websites i've seen during the course of the year 2014. These will be rated based on 3 criteria: creativity and originality, usability and of course, the design of it and how it appears aesthetically. It doesn't matter what message the website is built to convey - if it fulfills the criteria then it has the chance of being on this list. The amount of websites that I saw that could have been up here was huge, but in the end I finalised it to these, 5 websites.

Huge Inc.

As soon as you enter Huge Inc's website, you are greeted with an array of H's, to showcase their recent work and projects. This is combined with a slick, scrolling animation that keeps you engaged until you reach the main section of their website. This clean, smooth website was made by Huge Inc, an international design and branding agency. I really like this website, for how simple yet effective it is.

December 7th, 2014 by Nirvik Baruah

Tools for a modern developer

The influence of the internet in modern day life has had an undeniable effect. Everyone needs to be on there, and they all demand new, creative designs. For a web developer, this makes things complicated and slow to make. Luckily for you guys, i've collected a few tools that will help you develop websites faster and easier.


Eager is a library of high quality applications and projects, that allows you to quickly import them to your website at the touch of a button. No code neccesary, just preview the application on your website and it does it's job. All you have to do is copy one meta tag to your head, and it does the rest from there. Even though this website is still very young, being created only a few months ago, I can see this becoming very successful as it takes out all the hassle of installing open-source projects. They currently only have a few applications to add to your website but this will only increase with time.

November 29th, 2014 by Nirvik Baruah

The Horrors of Vertical Alignment

Any developer has, at one point or another, tried to vertical align something on their webpage. The natural approach to this is to stick vertical-align: middle on it. I mean, text-align: center works, why shouldn't vertical-align? The harsh reality is, however, that vertical-align is nothing more than a cruely named CSS attribute.

If you ever use tables in your website for layout (please don't), vertical-align does what most people expect it to do. It, well vertically aligns the object. However, with other object types it's a completely different ball game.

Technically, vertical-align is not meant to work with other types of elements, but with a little bit of tweaking in our CSS markup, we can get our elements nice and straight.

Method 1 - Negative Margins

When I started web development, after trying out vertical-align: middle, I tried using top: 50%. However, you could tell that the object wasn't perfectly in the middle, and that it was a little bit lower than it I wanted it to be. One common method to overcome this is to use negative margins. Suppose I have an image with a height of 200 pixels. If I use top: 50%, only the top side of the image will be placed on 50%, whereas that should be where the center of the image runs through. By adding a margin-top of -100px, half the height of the image, you can make the shape sit on the exact center. All good so far. However, using this method requires the shape to have a fixed height and width that you know at all times, unless you're a masochistic maniac that enjoys using JavaScript to position elements. So, not perfect.

Method 2 - CSS Table Display

Another method that you can use to vertical align an object is to change the display attribute in the CSS. On the parent container, if you add display: table, you can add display: table-cell to the child object to use vertical-align: middle. By doing this, the browser turns the parent object into what it thinks is a table, and the child object you want to align as a cell of that table. After doing this, you can just use vertical-align: middle, as it works for tables.