Skip to main content

Learning the Language

Today we have a plethora of computer languages, mostly open source, to pick from to suit our needs. For example, for simple web applications, there is PHP, for programming dealing with heavy math calculations, we can use Fortran and so on and so forth. Coming to my mother tongue, Java; it is a boon for large enterprise level applications. The advantages that distinguish Java from other languages are 1. Object Oriented paradigm, 2. Automatic memory allocation and garbage collection, 3. Enterprise level support, 4. The number of java professionals available, 5. Enterprise security and many more.....
Through this post, I want to express the problems I faced while understanding the language. When I first heard the name, I didn't know that there are language paradigms like object oriented, procedural etc. A language is a set of instructions given to the computer, that's all I knew from my minuscule experience with Fortran and C. But here I was determined the learn the omnipotent language.
The first day of training was exciting with the trainer promising big. The second day he started with a comparison between procedural and OO concepts. We were told to imagine everything as object. "The chairs, tables etc are all objects, and java works with objects", he said. So far so good, but nothing related to coding, I thought. Then we started with the core OO concepts like Polymorphism, Encapsulation etc. As examples, the trainer was writing some rough code on the writing board, but hey, I don't know the Java syntax at all. What I found was that I was somehow trying to relate the concepts with the syntax, which was totally foreign to me. How exactly the Car extends the Vehicle, and how does java fit in, was the question I was repeatedly and compellingly asking myself.
So the first problem which I faced while learning java was a desperate need to at least have a basic understanding of java syntax and code structure; the knowledge that java does not start with a #include, or that java code can be distributed through different files, that there are packages, or that java code is written inside a class(!!! Yeah, most of us didn't know even that), or that Class actually means something to the language, etc. It was almost like the package and class code was something by default that the code puts in. Days went by and I was still imagining how can java make a horse a 'type of' Animal, and how a Car 'has a' engine (I was quick in figuring out the grammatical exception there ).
From my experience, the approach that I would prefer as a trainer would be to first make the trainees write a java code to print out 'Hello World!'. This would at least give them a rough structure of java syntax. So that when I tell them that class Car implements the method drive( ), they understand that I am not talking about putting engineering flow charts into the method. This should be followed by the OO concepts and so on and so forth.
The most celebrated book among java newbies, the Head First Java, follows the same approach.

Popular posts from this blog

Days of our lives at Work and Workplace

Let's talk about Work and Workplace.

We spend around 40-45 hours a week at work, considering a 5-day work week.  It amounts to 26.7% of our week.  Over a long stretch of time, we must be spending at least 25% of our LIFE at work.  That's a quarter!  And considering we sleep for around 30%, work amounts to 38.1% of our conscious lives!

Those exclamations aren't just out of place.  It struck me like a brick.  It is common knowledge, but there is a difference between knowing something, realizing it and it cutting through your conscious.  It was an unnerving realization.  If I am miserable at work, I am unhappy for a quarter of my total life, and more than a third of my conscious life! That's 5 years in an active carrier of 20 years.

I went meta to understand what caused this sudden surge of spirituality; I concluded it could be mid life crisis, a time when career, personal life and unrequited dreams surface from their graves.  However philosophical it might seem, I gave …

Ola and Uber - An Experience

I have been using either Ola or Uber for my daily commute to work for the past few months.  I had a conversation with Drivers quite regularly, ranging from Politics to Movies.  I became interested in how their experience with Ola or Uber was like and how they felt about their customers.  They shared some funny and some scary incidents.

Some points that were repeated way often:

1.  Ola's business model does not help drivers, almost to the point of being predatory.
2.  Ola passengers (yep, us) are quite rude and demanding.  Uber's passengers are relatively more accommodating and polite.
3.  Ola's app is unstable, clunky and crash prone.
4.  Uber's initial plans for drivers were awesome, not anymore.  Less payout nowadays, but still better than Ola's (Uber suffered $780 million Losses this FY)
5.  Uber's app is super accurate and robust.
6.  Passengers don't understand the concept of Uber Pool/Ola share.  They just look at the low price, but don't grasp…

Space as The Final Frontier - The ultimate High

Movies like Interstellar or 2001:A Space Odyssey always make me feel insignificant and hopeless.  It leaves me in despair.  But also accompanying it is a sense of grandiose and greatness, it's a mixed and confusing feeling that feels like an afterglow of a drug binge (metaphorically), quite difficult to put in words or even describe orally.

What I can describe, though, is the sense of adventure and camaraderie I feel towards humanity and the earth after watching those movies.  We don't take Elon Musk seriously enough when he says that humans need to be a space faring civilization.  We cannot leave all our eggs in one basket, aka the Earth.  There are very high chances of a global extinction event over a long period of time.  It could be caused by anything among disease, war, extra-terrestrial objects hitting the Earth, climate change, a gamma ray burst etc.  It's a question of 'when' and not 'if'.  And as the current species roaming around aimlessly on th…