Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
19 views

Basic Computer Programming

The document provides an introduction to basic computer programming concepts including what a computer program is, the roles of programmers and programming languages. It describes key concepts like algorithms, source code, compilers, variables, conditionals, arrays, loops, functions, classes and common programming language types and operations. The necessary skills for programming are also listed such as self-reliance, logical thinking, attention to detail and the ability to think abstractly.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Basic Computer Programming

The document provides an introduction to basic computer programming concepts including what a computer program is, the roles of programmers and programming languages. It describes key concepts like algorithms, source code, compilers, variables, conditionals, arrays, loops, functions, classes and common programming language types and operations. The necessary skills for programming are also listed such as self-reliance, logical thinking, attention to detail and the ability to think abstractly.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

BASIC COMPUTER

PROGRAMMING
Introduction to Computer Program
• A computer program is a sequence of instructions
written using a Computer Programming Language to
perform a specified task by the computer.
• A computer program is also called a computer
software, which can range from two lines to millions of
lines of instructions.
• Computer program instructions are also called program
source code and computer programming is also called
program coding.
Introduction to Computer Programming

Computer programming - It is the act of


writing computer programs.
Computer Programmer - someone who can
write computer programs or in other words,
someone who can do computer
programming.
Based on computer programming language expertise, we can name
a computer programmers as follows:

• C Programmer
• C++ Programmer
• Java Programmer
• Python Programmer
• PHP Programmer
• Perl Programmer
• Ruby Programmer
Basic Programming Concepts
#1) Algorithm: It is a set of steps
or instruction statements to be
followed to accomplish specific
tasks. A developer can design his
algorithm to achieve the desired
output.
For Example, a recipe to cook a
dessert. The algorithm describes
the steps to be followed for
completing a specific task, but it
does not say how to achieve any of
the steps.
#2) Source code: Source code is the actual text that is used to construct
the program using the language of choice.

For Example, it is mandatory to have the main method in Java and the text used is
as shown below.

public static void main(String arg[]) {


//Steps to be performed
}
#3) Compiler: Compiler is a software program that helps in converting
the source code into binary code or byte code, also called machine
language, that is easy for a computer to understand, and can be further
executed using an interpreter to run the program.
#4) Data Type: Data used in the applications can be of a different type,
it can be a whole number (integer), floating-point (decimal point
numbers), characters or objects. For Example, double currency = 45.86,
where double is a data type used for storing numbers with decimal
points.
#5) Variable: Variable is a space holder for the value stored in the
memory and this value can be used in the application. For Example, int
age = 25, where age is a variable.
#6) Conditionals: Knowledge of how to use a certain condition, such that a set of
code should execute only if a certain condition is true. In case of a false condition, the
program should exit and should not continue the code further.
#7) Array: Array is the variable that stores elements of a
similar data type. Knowledge of using an array in
coding/programming will be a great benefit.

#8) Loop: Loop is used to execute the series of code until the
condition is true. For Example, in Java, loops can be used as
for loop, do-while, while loop or enhanced for loop.

The code for loop is as shown below:

for (int I =0; i<10; i++) {System.out.println(i); }


• #9) Function: Functions or methods are used to
accomplish a task in programming, a function can take
parameters and process them to get the desired output.
Functions are used to reuse them whenever required at
any place repeatedly.
• #10) Class: Class is like a template that contains state
and behavior, which corresponding to programming is
field and method. In Object-Oriented languages like
Java, everything revolves around Class and Object.
Essentials Of A Programming Language
A programming language is a special language or a set
of instructions to communicate with computers. Each
programming language has a set of rules (like English
has grammar) to follow and it is used to implement the
algorithm to produce the desired output.
The selection of particular programming languages depends on
many factors such as:
• Targeted Platform and Project/Solution Requirement: Whenever a software solution provider
comes across the requirement, there are many options to choose an appropriate programming
language. For Example, if a user wants the solution to be on mobile, then Java should be the
preferred programming language for Android.
• Influence of Technical Partners with the Organization: If Oracle is a tech partner with the
company, then it is agreed to implement software marketed by Oracle in the solution for every
project and product developed. If Microsoft is a tech partner with the company, then ASP can be
used as a development framework for building web pages.
• Competency of available Resources & Learning Curve: The developers (resources) should be
available and competent to quickly learn the selected programming language so that they can be
productive for the project.
• Performance: The selected language should be scalable, robust, platform-independent, secure and
should be efficient in displaying results within the acceptable time limit.
• Support from the Community: In the case of open-source programming language, the acceptance,
and popularity for the language as well as online support from the growing support group should
be available.
Types Of Computer Programming
Languages
#1) Low-level Language
• Hardware dependent
• Difficult to understand
Low-level Language can be further divided into two categories,
• Machine Language: Machine dependent, difficult to modify or program,
For Example, every CPU has its machine language. The code written in
machine language is the instructions that the processors use.
• Assembly Language: Each computer’s microprocessor that is responsible
for arithmetic, logical and control activities needs instructions for
accomplishing such tasks and these instructions are in assembly
language. The use of assembly language is in device drivers, low-level
embedded systems, and real-time systems.
#2) High-level Language
• Independent of hardware
• Their codes are very simple and developers can read, write and debug as they are
similar to English like statements.
High-level Language can be further divided into three categories.
• Procedural Language: Code in the procedural language is a sequential step by
step procedure, that gives information like what to do and how to do. Languages
such as Fortran, Cobol, Basic, C, and Pascal are a few examples of procedural
language.
• Non-procedural Language: Code in non-procedural language specify what to do,
but does not specify how to do. SQL, Prolog, LISP are a few examples of non-
procedural language.
• Object-oriented Language: Use of objects in the programming language, where
the code is used to manipulate the data. C++, Java, Ruby, and Python are a few
examples of Object-oriented language.
Basic Operations Of A Programming
Environment
• Input: Data can be input using the keyboard, touch screen, text editor, etc. For Example, to book a flight,
the user can enter his login credentials and then select a departure date and return date, the number of
seats, starting place and destination place, Name of Airlines, etc, from desktop, laptop or mobile device.
• Output: Once authenticated, and upon receiving the request to book the tickets with the mandatory
inputs, a confirmation of booking for the selected date and destination will be displayed on the screen,
and a copy of the tickets and invoice information is sent to the user’s registered email id and mobile
number.
• Arithmetic: In case of flight booking, update of the number of seats booked and those seats need some
mathematical calculations, further name of the passenger, no. of seats reserved, date of journey,
journey start date, and starting place, destination place, etc. should be filled into the airlines server
database system.
• Conditional: It is required to test if a condition is satisfied or not, based on the condition, the program
may execute the function with parameters else it will not get executed.
• Looping: It is required to repeat /perform the task until the condition holds. Types of loops can be
While loop, Do-while loop, For loop.
Necessary Prerequisites/Skills Required For Programming

• #1) Self Reliance: To succeed in coding, you should develop a confidence in yourself,
control your impatience, frustration and should refrain from being dependent on someone
else to help you in solving your technical problems, rather you should be self-reliant and
keep faith on your capabilities, monitor your efforts and remain optimistic and
perseverant in learning.
• #2) Language: It is an individual’s choice to decide which programming languages he/she
should learn. A programming language should be selected based on its acceptance in the
various domains in software industries. Object-oriented languages like Python and Java,
which are free & open-source are widely accepted and used by Google, Yahoo, and NASA.
Java script is another scripting language, a client-side scripting language, but
knowing Javascript will highly benefit web-based application developers. Non-procedural
language like SQL is mandatory as it is acceptable by all the back-end databases. Click
this link for learning an online exercise for SQL.
#3) Logic: As a developer or tester, to excel in the programming
language, one must always have conditional and logical thinking. It can
be improved as we improve our muscles, there are a few sites where
one can prepare and improve logical thinking and prepare for
programming language.
• Fresherslive
• The Online Test Centre
• Indiabix
#4) Attention to Detail: A conscientious and alert person with an eye
for details will check his/her work for minute details and this will
prevent any syntax error, verify if any steps like unit testing or including
API /classes, miss associated jar or class files. For some people,
meditation might help to improve focus and concentration while for
others taking a walk or playing some mind games might help. You need
to find out what works for you.
• #5) Abstract Thinking: During sprint meeting in an agile environment,
the ability to think out of the box, or see things from different
angles/perspectives, help to uncover scenarios for requirements and
design considerations. This can be improved by a discussion with
others.
• #6) Patience: At times, it happens as you write a code, for which you
are confident about, verified it a couple of types, it works in your
machine, but after integration the code snippet does not work, all the
effort to identify the fault go in vain, you feel stressed out, frustrated
and feel like good for nothing.
• #7) Strong Memory: Being able to understand and visualize the high-
level design, data flow, algorithm, data structure, how they interact
with each other will separate you from an average coder. Meditation
techniques and memory exercises can help with this as well.
Where Can We Apply The Skills Of
Programming?
• Ability to Communicate: Communication is an extremely essential quality wherein, you
can explain your plan, discuss your doubts, improve your thoughts and exchange
information from your superior and your team member. A good communicator can
understand and explain the tasks performed in daily reporting, find out how can you
improve your thoughts and clear your doubts. During the agile standup meeting & sprint
meets, you can communicate the plan of action and can lead the team.
• Problem-solving: Accepting challenges and accomplishing difficult tasks will build
problem-solving skills and this is a prerequisite for a good developer. During development,
you may encounter various issues of understanding the business logic and implementing
them into your code, integration of the code with application, compatibility issues and
many more challenges. Your problem-solving skills will help you to sail through the most
critical situations.
• Collaboration/Teamwork: Collaboration skills enable you to work with the team members
to accomplish some tasks effectively and thereby improve productivity.
Career Options For Programmers

The areas or positions for computer programmer are as follows:


• Web Developer
• UI Developer
• User Experience Designer
• SQL Developer
• Quality Assurance
• Automation Test Engineer
• Software Engineer at Test

You might also like