Posts

Showing posts from 2016
Java Technology POCP Constructor Overloading Permitted in Java copyright ©Rajesh Patkar, All rights reserved.

POCP - Proof Of Concept Program

Over years, I have found that learners get great confidence in an  Assertion  when it is supported by a program that proves the Assertion. These Programs apart from reasonably proving the assertion also convey the tacit scope of the given Assertion. Several salient scenarios encompassing the Assertion can be represented by a set of Programs. These set of Programs become a concrete evidence and articulate in programmatic terms the context, assumptions, limitations and implications of the underlying Assertion. I prefer to call these program POCP ( Proof Of Concept Programs ). On one hand these programs are teaching aids for the teacher, and on the other hand they are themselves teachers for those learners who can listen to the program's voice. I have put up a GitHub Repository to share a few POCP for Java Technology course and would encourage community activity around it. Assertion :   Child Constructor Calls Parent Constructor POCP      :   Child Constructor Calls Parent Con

Potter Metaphor.

Image
Any Computer Language can be defined in terms of its  Vocabulary  and it's  Grammar . A Language's grammar specifies the rules of composition of its fundamental elements. When you start learning a language most of the introductory material focuses on the vocabulary and the grammar. When you achieve a satisfactory level of proficiency in the vocabulary and the grammar, you feel that you know the language. As you are aware that in languages like English, knowing vocabulary and grammar doesn't guarantee your ability to write an essay or a poem. Similarly knowing vocabulary and grammar of a computer programming language doesn't guarantee your ability to develop software in it. You have to master several other skills before you start developing a software. To clarify this to a new programmer, I use a metaphor called Potter Metaphor.  A Potter starts with raw materials like mud, water, colours etc and with the use of his wheel creates pots. A potter who claims that he is a po

Why Java Objects only on Heap?

Image
B ackground Last month I had asked a Java related question to all my students on a facebook post . Why is it that in Java, Objects are always to be allocated on heap? Why is dynamic allocation the only option in the toolbox of a Java developer while creating objects? It was a very interesting discussion on facebook. Many participants, my students and otherwise gave good arguments in defense of the Java Language Design. One of the arguments that came out shining, was that of the possibility of unsafe allocations on Stack Frame. Special thanks to Ted Lum, Chetan Parmar, Nishant Verma, Vaibhav Desai, Tusharkumar Thomar, Vimal Sakhiya, Clair Roma Henry, Subham Gadi, Makarand Bhosle, Prasad Kowli and Nirav Kothari   for their participation and valuable arguments. Let me now, put forward my perception on why Java Language Designers would have taken such a decision. The following content in this article assumes that the reader is aware of memory models and life cy