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.
2 comments

Popular posts from this blog

General AI, Singularity and Elon Musk's fears surrounding it

Elon Musk has been raising concerns around the exponential advent of AI in the past decade, and  boy has it been exponential!  Many companies now have a CAiO (Chief AI Officer) to bridge the gap between the front runners in AI (Google, Microsoft, OpenAI etc.) and themselves.  Many academics don't share Elon's concerns, and even ridicule him for his alarmist views.  The argument the academics provide is that the current stage of AI is a nascent one, and the best General AI is still dumber than a toddler.  They also claim that AI has been useful only in a specialized domains, like Self-Driving cars, playing chess and Go, analyzing heaps of unstructured data and getting insights etc.  So although AI is super useful in a narrow range, something that can drive a car 100 times better than humans is unlikely to produce a piece of Art.  This is correct, looking at the existing AI landscape.  But the academics are missing the far term view, on a range of 200+ years into future.
With A…

My Favorite Sci-Fi Ideas

In the the frenzy of adulthood and people-pleasing, my love for Science fiction was almost lost.  I feel sad to admit that I didn't watch 2001: A Space Odyssey till very late.  Movies that reignited my sci-fi romance include Inception, Interstellar and 2001, while movies like Arrival and Contact fueled the fire that now has me hooked to the sci-fi genre.

This Genre, in essence, portrays magic while trying to explain the premise in the most scientific way possible, and in my opinion is an impressive feat to achieve.  Making the movie Interstellar as scientifically accurate as possible was harder than just making a visual masterpiece.  Sci-Fi gives almost a religious feeling to its followers, which is why Elon Musk enjoys such a cult fandom, he's trying to make sci-fi a reality.  When the humans landed men on the moon, it inspired a whole generation to achieve greatness.  It's unfortunate we did not do anything so great since then.

Here are my favorite Sci-Fi ideas that h…

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…