Monday, September 8, 2014

NodeJS: A Primer For Newbies

Node.js is an excellent server side scripting application.

Node.js was created by striping the V8 javacript engine from chrome and running it as a native application. Thus you can use JavaScript just as you would use java or python or ruby.

The use of JavaScript is really cool because of a concept called platform equalization.
This means using the same language on both the server side and on the client side for data manipulation and presentation. This means that a lot of code can be reused directly, since web browsers come with JavaScript by default, and you gain by using it on the server side as well because data can directly be used with out having to convert it into a variety of formats.

JSON, or JavaScript Object Notation, is a form of serialization that is used to transfer data to and fro between server and client. It is slowly starting to replace XML, because it has a cleaner structure, takes up less characters, and directly integrates with javascript (since its javascript object notation).

JSON follows a structure of a dictionary, or key-value mappings.
eg.   {     "key1":"value1"   ,     "key2":"value2"   }


JavaScript is an asynchronous language. It runs in a single thread, but handles methods asynchronously through callback functions.

A callback function is any function that is to be executed after the completion of something. Usually in JavaScript, we have events that trigger callback functions to be executed. For example, a server waiting for a request from a client will trigger an event that a request has arrived, and will pass on the request to a callback function.
The advantage of this is that the initial method can go back to listening for requests. Thus it doesn't get blocked from executing. 

The disadvantage of JavaScript is again it's single threaded architecture. This means that any computationally intensive task will clog up the execution. Thus javascript should be used for tasks that are more in number, but less expensive, to utilize it's full potential.

For the Node.js official site: http://nodejs.org

For resources on how to start with nodejs, check the following question on StackOverflow: http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-node-js

Have fun JavaScripting!

Sunday, September 7, 2014

Experience: A Biased View Of Life

"Have you done this before? We need you to start working right away, you need prior experience..."

Experience is what lets us do stuff effortlessly. Unfortunately, we might not always be experienced at something.

Fortunately, it can be gained by engaging with stuff that you haven't done yet. New things always give us a new perspective, and that's what experience is all about. The slight problem, though, is you might not always have an opportunity to try out something new. This implies that you do stuff every day over and over again in predefined routine. This is good in a way. If you are, for example, working a job, then even though you might not be doing something new, it will add up to you job experience of having a particular skill.

If you want to try out something new, then you have to find a way to break free from your current routine.

Consider the case of the playing the video games Assassin's Creed 2 (AC2) and Assassin's Creed Brotherhood. As you play the role of Assassin Ezio, you try so hard to become the best assassin that you can be in AC2. But once you complete that game and move on to Brotherhood, all that goes away, Ezio loses his fancy armor and weapons, and you have start over from scratch. But you have experience from playing the first game. And that itself is extremely useful in starting over.

Its kind of like college life. Working so hard to prove yourself to everyone how hard working and dedicated you can be is a daunting task. But once you start employment, or join for higher education in a different university, it starts all over again. But you have experience to help you out.

So the next time someone asks you about experience, don't be afraid. Tell them that experience only comes through practice, and that only comes through first having an opportunity. Ask them for that opportunity if they are in a position to give it.

Cheers!

Sunday, August 24, 2014

Sleep: A Biased View Of Life

Sleep. Its such an essential part of the human way of life that we tend to overlook its importance.
Why do we sleep? What makes it so important that we spend one third of our life sleeping?

Sleep is a way for the brain to focus on passive maintenance of the body. When we are awake, our brain can only focus on the current activities that need to be addressed. When we sleep, the brain has its resources freed and can therefore use them for other vital activities such cell regeneration, healing, relaxing stressed body areas and so on.


Research has shown that sleep deprivation is extremely detrimental to health. Here is an awesome video that shows the effects of sleep deprivation on facial appearance.


But many don't take this so seriously. We feel that sleeping less is synonymous with having a busy life, and having a busy life is a sign of working hard in this socially fast-paced world.


An Excerpt I found from this article Bring back the 40-hour work week - Salon
Research by the US military has shown that losing just one hour of sleep per night for a week will cause a level of cognitive degradation equivalent to a .10 blood alcohol level. Worse: most people who’ve fallen into this state typically have no idea of just how impaired they are. It’s only when you look at the dramatically lower quality of their output that it shows up. 

So had some good sleep lately? If not, you definitely should. There are so many benefits of getting a good night's rest. You will be more active through out the day, and will have soaring energy levels. Your body will relatively be more fit, and you will most likely be in a better mood. Your concentration levels will be better, thus decision making skills and memory skills will also be better.


Have a wonderful sleep time ;)

Saturday, August 23, 2014

The Life of a Techie: A Biased View Of Life

Half the screen in white. The other half in red. A head just half a foot away from the screen. Motionless.

"What in the world are you talking about!" you might exclaim. No, nothing horrifying here.
Welcome to the life of a software professional.

"What's with the red, white, and motionless stuff?" you might wonder. Just the average day for a techie who churns out many bugs and errors as the lines of code exponentially pile up - then stares at the screen as all hell breaks loose and wonders what just happened.

According to Google,
techie (noun) - a person who is expert in or enthusiastic about technology, especially computing.

A Techie is synonymous to any technologist. Or a Developer. Or a Tester. Or an Entrepreneur. Whoever dons the role of a techie, however, will get used to one thing: trying out new stuff and utterly fail, only to try again and again. Until Success. (Maybe.)

This infinite loop of developing new stuff, then maintaining it, especially in software, is termed as the software development cycle. Of course this cycle is applicable to any stream of technology. The thing to remember: this cycle is endless. Create and Maintain. The moment one stage is broken, the cycle breaks and the product fails. Period.

A Techie must have exceedingly high patience and determination. Why? The simple answer is he has to live through multiple iterations of the development cycle. A techie needs determination to finish what he starts and patience to see through the maintenance.

But come to think of it, aren't all humans techies in their own right? Every person is the architect of his/her life, and go through the development cycle of their lives. Everyone fails at some point in life until they learn from their mistakes and succeed. It all seems to be part of a bigger picture, the grand picture of Life.

Cheers!

Tuesday, August 5, 2014

First Post: A Biased View Of Life

Life. We tend to exaggerate what we really don't understand. Humans have such good imagination; we probably over-use it a lot.



But its our imagination that has brought us this far. Civilization, technology, everything we see is the result of humans' ability not only to imagine but to bring that imagination into reality. Scientists, Inventors, and Entrepreneurs have dedicated their lives to the betterment of mankind in some form or another. 

Life. It's an extraordinary something that's just beyond description. Can we really justify a definition for it?

Many throughout the ages have tried to find the answers to our existance. We have so many philosophical teachers, to whom we should be extremely grateful for. They have tried to justify the meaning of our existence in this universe. And they have done an excellent  job explaining it to us in a language we can understand.



Life. To Live.



(These were thoughts that just popped up in my head while eating tomato soup)