Tuesday, October 20, 2020

Learning programming

    Programming is an interesting world where you apply your skills to build a software program that comes into life when it is run on a computer device.  The live software programs behave the way you have created them.  You can modify the program to change its behavior or you destroy it and rebuild a whole new program.  It gives you sense of pride for creating something and then maintain it.

    You can choose either classroom training or self learning using the learning material and resources available.  The classroom training speeds up your learning as the teacher will assist you when you are stuck.  However don't be sad if you can't take up classroom training, there are so many videos and reading materials on the web which will help you to self-learn.


Prepare yourself

    To learn programming, first and foremost thing that is needed is your interest to learn programming.  Interest is needed to learn anything, be it programming or something else.  It is indeed the most important need as you can acquire all other required skills as long as you have a strong interest to learn something.

“Live as if you were to die tomorrow. Learn as if you were to live forever.” - Mahatma Gandhi.

    In the early stage of learning, you may find it difficult if you are trying to write a new software program all by yourself.  You will make mistakes and the program will fail to run or it runs with the wrong results.  However by exploring yourself to write a program and troubleshooting it by going through each line of code will help you to develop a fine eye for details.  These learnings will take you a long way in writing bigger software programs.

“Anyone who has never made a mistake has never tried anything new.” - Albert Einstein.

    As you are learning to write complex software programs you will most likely get stuck at some point in time.  It is very important that you have lot of patience while trying to find the reason as why the software program is not working as expected or how to make progress while finding a solution.  Breakdown the program and problem statement into smaller units to speed up your investigation for narrowing down to the problem area.  Consider all possible scenarios including the external programs that your program depends on.  Your patience and persistence to make it work will definitely pay you off with success, so always believe in yourself.

“Believe you can and you are halfway there.” - Theodore Roosevelt.

    While writing the software program consider its full lifecycle.  i.e., consider how the program will be installed, behavior of the program during start and stop phases, how the request will be processed, what is the format of the input data etc.  To support the same you need to code the software program with many logical statements and sequence of instructions.  Don't hesitate to try to solve the problem in different ways, and validate each method to find a more optimal, readable and high performant solution.  This helps you to develop problem solving and analytical skills, and it helps you produce better programs in future.

    To create something totally new, it requires your creativity and a focused effort.  Using the programming language elements you can write a software program in different ways to achieve the same result.  With this flexibility you can be as creative as you can.  Be creative in building a complex software program by breaking it into smaller program modules and stack them up.  Designing smaller program modules as independent and having single responsibility will help you to reuse them in many different place.  Writing a totally new and complex program from nothing looks very difficult at the beginning, but once you are successful you will enjoy it.

    Lastly learn to visualize the whole software program, start from the smaller components and then to larger software programs.  Visualize their structure, their behavior and their interaction with each other or with external programs, their access points and security etc.  Visualizing the software program helps you to design a better software that is more modular, more optimal, more performant solution.

“It always seems impossible until its done.” - Nelson Mandela.

In summary, you need

  • passion to learn
  • problem solving and analytical skills
  • visualize and exploring things
  • lots of patience and never give up attitude


Prepare environment

    To learn programming, you need to prepare the environment to learn.  If you are going through classroom based trainings, not the virtual classroom, then most likely you already have what is required to learn.  If you are going to self learn, below items guide you in preparing your environment for learning.

    You need a device on which you can write a program and test.  i.e, you need a computer system which has a display and a keyboard.  It will be useful if it is connected to internet otherwise its not mandatory.  For example, it could be a laptop or a desktop that has any of Windows or Linux or Mac OS etc installed on it.

    Learning programming is nothing but learning to code in a specific programming language.  So you choose which programming language you plan to learn.  There are many programming languages and the list can be found easily, however in my opinion the basic concepts and the basic constructs remains almost the same.  Some of the popular ones are java, python, c, java script etc.

    Based on the programming language you choose you need to prepare a development environment on your computer system by installing it with the tools and resources that help you to write and test the software program.  For example, you need a text editor to write the software program, a language specific compiler program if there is any to translate the written program to executable binary and the run time environment to execute the binary.

    The runtime environment varies based on the programming language. For example languages such as C use the operating system as a runtime environment, where as languages such as java require java runtime environment installed on the operating system, and the javascript code is run on the web browsers etc.

    Writing the software program on a simple text editor could be difficult, so there are also IDE (Integrated Development Environment) tools that are available and they will help you in programming easily.  These tools integrates with compilers and run time environments and have cool features such as an ability to validate the code you write before you compile or run, assist you in coding by providing suggestions, debug or run the program in the IDE itself, integrates with version control etc.

    For an advanced learning or developing software you need additional tools such tools for  design, test, documentation, build, package, version control, performance analysis, simulators etc.  However for a beginner none of these tools are necessary.

    In summary, based on the programming language you choose to learn visit the programming language website, understand the system requirement and prepare the environment on your computer system accordingly.

    Or nowadays these tools and resources are also available on the web, so that you don't need to install anything on your system.  These web tools allow you to write the program using programming language of your choice and has capability to test them on the web page itself.  Behind the scene, the software program you write is generally run in a sandbox in the cloud and returns the result to you on the web page.  In my opinion these web tools are not mature yet to provide you all the options and experience to learn and develop, so it is best to prepare your local environment and learn.

Hope this was useful and wish you all the best for your learning journey!

Disclaimer:  I hope this information helps someone.  Above writing reflects my view based on my experience and learnings.  Please comment if you find any discrepancy.


Monday, October 12, 2020

Software program and programming

    Software programs have been there for many years now, and have advanced a lot in terms of technology, programming, designs and practices.  There are a large amount of population who are interested in learning programming and some find it difficult.  I hope programming related posts in my blog are simple to understand and are helpful in their journey of learning.


“A software program is a set of coded instructions that can be run on a computer to perform the specified operations.”

Fun software program


    Here the computer is any intelligent hardware device that reads the provided instructions and performs the requested operation.  For example, it can be a desktop computer, a laptop, a mobile phone, a tablet, an iot device, or an embedded computer processor, or a virtual hardware in the cloud, etc.

    As the technology is advancing everyday, many of the devices that we use everyday are becoming smart by embedding a computer and a software program.  For example smart TV, smart refrigerators, smart cars etc.

    The operations performed by a software program could be a compute operation on a given data, or to manage data, or to route the data over network, or to control the hardware and resources etc.  A software program is written to solve a user/business requirement and the instructions coded in the software program are aligned to perform operations as required for a given user/business needs.

    For example, an ecommerce software program has the set of instructions having logic to process the submitted shopping order request.  It takes the user order data, computes the total price of the products purchased, applies discounts, processes the payment and generates order confirmation.

  There are too many software programs in this world. There are software programs for providing ecommerce services, for generating financial report of a company, or for schools to manage the students academic records, or for game enthusiasts, or for connecting your mobile phone with your television, or for providing infrastructure service on the cloud, etc, etc, etc.


“A software program is called as a software product, if it has well defined user interface, documentation and support on how to use and workflows.”

    The software product is also interchangeably called as software or software application or simply an app.  Based on its use, different terms are used such as system software, application software, enterprise software etc.  Few examples are, Google Pay, Microsoft Word, Angry Birds game, Amazon Alexa, etc.

    More than one software that have similar user interface and integrates with each other are packaged into one bundle called Software Suite. Software Suite is generally designed in such a way that its collection of software provides a holistic experience to the user with different services offered together.  Few examples are Microsoft Office 365, Adobe Creative Cloud, VMware vCloud suite, Apple macOS etc.

    In my opinion a software program is more of a technical term, and I would use the term software program mostly in the technical documentation.


“The process of writing a sequence of coded instructions to prepare a software program is called as software programming or simply programming or coding.”

    To write a software program, you need to understand the user requirement, define the program design and translate the requirements into sequence of instructions with some logic.  You will then test written software program to verify whether the results are satisfactory, and this process is called as software testing.  There are a lot of programming practices and styles followed in the industry.


“The instructions in a software program are written in a formal language called programming language.”

    There are many programming languages with various levels of abstraction.

    A software program that will be run on a computer should have instructions in the language that the computer understands.  This is called machine language or machine code and these are binary codes. It is impractical for anyone to write big software programs in machine language.

    The assembly language is symbolic representation of machine code instructions that is human readable.  An assembler software translates the assembly language program into the machine code format that the computer understands.  These are low level languages and are very much tied to instruction set of the computer.  For example, 8051, 8086, x86, x64 assembly languages.  It is still impractical to write big software programs in low level languages. 

    To simplify writing a software program, the high level languages were developed.  The high level languages provide higher level of abstraction from machine language and uses natural language elements to simplify programming.  The software program written in high level language is translated to machine language using compiler software programs. You would then run the compiled software programs on the computer.  There are many high level languages and each have different features and styles for writing a software program.  For example, C, C++, Java, Python, C#, etc.

Software programs in different languages
Software programs in different languages


    The software program that is written in any of above language is called as source code and the compiled code that runs on the computer is called as binary executable or simply binary.  The binary executable is then packaged and released to users along with documentation.  The software development methods and practices is a very vast topic to be included here.

Disclaimer:  I hope this information helps someone.  Above writing reflects my view based on my experience and learnings.  Please comment if you find any discrepancy.


Learning programming

    Programming is an interesting world where you apply your skills to build a software program that comes into life when it is run on a com...