Software Engineering – BCA 4th Semester
Unit-5: Coding
Programming language and development tools:
A computer program: Is a collection of instructions that performs a specific task
when executed by a computer. Most computer devices require programs to
function properly. A computer program is usually written by a computer
programmer and can be written in either high or low-level languages, depending on
the task and the hardware being used.
A programming language: Is a formal language, which comprises a set of
instructions that produce various kinds of output. Programming languages are used
in computer programming to implement specific algorithms. Most programming
languages consist of instructions for computers.
Types of programming languages:
There are various programming languages classes major five classes of
programming language are:
Procedural Programming Language
Functional Programming Language
Object-Oriented Programming Language
Scripting Language
Logical Programming Language
Procedural programming languages:
A procedural language follows a sequence of statements or commands in order to
achieve a desired output. Each series of steps is called a procedure, and a program
written in one of these languages will have one or more procedures within it.
Common examples of procedural languages include:
C
Fortran
Pascal
Visual BASIC
By Lec. Pratik Chand Page 1
Software Engineering – BCA 4th Semester
Functional programming languages:
Rather than focusing on the execution of statements, functional languages focus on
the output of mathematical functions and evaluations. Each function is a reusable
module of code which performs a specific task and returns a result. The result will
vary depending on what data you input into the function. Some popular functional
programming languages include:
Scala
Erlang
Haskell
Elixir
F#
Object-oriented programming languages:
This type of language treats a program as a group of objects composed of data and
program elements, known as attributes and methods. Objects can be reused within
a program or in other programs. This makes it a popular language type for complex
programs, as code is easier to reuse and scale. Some common object-oriented
programming (OOP) languages include:
Java
Python
PHP
C++
Ruby
Scripting languages:
Programmers use scripting languages to automate repetitive tasks, manage
dynamic web content, or support processes in larger applications. Some common
scripting languages include:
PHP
Ruby
Python
By Lec. Pratik Chand Page 2
Software Engineering – BCA 4th Semester
bash
Perl
[Link]
Logic programming languages:
Instead of telling a computer what to do, a logic programming language expresses
a series of facts and rules to instruct the computer on how to make decisions. Some
examples of logic languages include:
Prolog
Absys
Datalog
Alma-0
Other ways to classify programming languages
We can find many more ways to categorize languages beyond the five listed above.
Let's take a closer look at other ways you can think about programming languages:
Front-end vs Back-end language
High-level vs Low-level Language
Interpreted vs Compiled Language
Front-end vs. back-end languages:
Front-end languages are primarily concerned with the ‘user’ aspect of the
software. The front end deals with all of the text, colors, buttons, images, and
navigation that the user will face when navigating your website or application.
Anyone with a background in graphic design or art may be more inspired to begin
learning one of the front-end languages.
Some examples of front-end programming languages include:
HTML
CSS
JavaScript
By Lec. Pratik Chand Page 3
Software Engineering – BCA 4th Semester
React
Back-end languages deal with storage and manipulation of the server side of
software. This is the part of the software that the user does not directly come into
contact with but supports their experience behind the scenes. This includes data
architecture, scripting, and communication between applications and underlying
databases.
Some examples of back-end programming languages include:
JavaScript
PHP
Java
Python
Ruby
C#
A full-stack developer combines their knowledge of both front- and back-end
languages, along with other technical skills and expertise, to work on any part of
the development process.
High-level vs. low-level languages:
The biggest factor that differentiates high- and low-level programming languages
is whether the language is meant to be easily understood by a human programmer
or a computer.
Low-level languages are machine-friendly, which makes them highly efficient in
terms of memory usage but difficult to understand without the help of an
assembler. Since they're not very people-friendly, they're also not widely used
anymore. Examples include machine code and assembly languages.
High-level languages, on the other hand, are less memory efficient but much more
human friendly. This makes them easier to write, understand, maintain, and debug.
Most popular programming languages in use today are considered high-level
languages such as Java, Python, PHP etc.
By Lec. Pratik Chand Page 4
Software Engineering – BCA 4th Semester
Interpreted vs. compiled languages:
The distinction between interpreted and compiled languages has to do with how
they convert high-level code and make it readable by a computer.
In Interpreted languages, code goes through a program called an interpreter,
which reads and executes the code line by line. This tends to make these languages
more flexible and platform independent.
Examples of interpreted languages include:
Python
JavaScript
PHP
Ruby
Compiled languages go through a build step where the entire program is
converted into machine code. This makes it faster to execute, but it also means that
you have to compile or "build" the program again anytime you need to make a
change.
Examples of compiled languages include:
C, C++, and C#
Rust
Erlang
Difference between compiler and interpreter:
Interpreter Compiler
Scans the entire program and
Translates program one statement at
translates it as a whole into machine
a time.
code.
By Lec. Pratik Chand Page 5
Software Engineering – BCA 4th Semester
Interpreters usually take less amount Compilers usually take a large
of time to analyze the source code. amount of time to analyze the source
However, the overall execution time code. However, the overall execution
is comparatively slower than time is comparatively faster than
compilers. interpreters.
Generates Object Code which further
No Object Code is generated, hence
requires linking, hence requires more
are memory efficient.
memory.
Programming languages like
Programming languages like C, C++,
JavaScript, Python, Ruby use
Java use compilers.
interpreters.
Sofware Development Tools:
A programming tool may be any software program or utility that aids software
developers or programmers in creating, editing, debugging, maintaining and/or
performing any programming or development-specific task.
A programming tool is also known as a software development tool. Some of the
popular development tools are:
Collaborator:
Collaborator is a peer code and document review tool for development teams that
take quality seriously.
By Lec. Pratik Chand Page 6
Software Engineering – BCA 4th Semester
Features of Collaborator:
Comprehensive Review Capabilities: Review source code, Microsoft Word,
Excel, PowerPoint and Visio Diagrams, Adobe PDF, Images and Simulink
models all in one tool.
Enhances the code review process for GitHub, GitLab, BitBucket, and Azure
DevOps
Supports 11 version control tools including Git, SVN, TFS, Perforce, CVS,
ClearCase, RTC and more.
Proof of Review: Ensure proof of review with electronic signatures &
detailed reports to meet auditing and regulatory compliance standards
(ISO26262, 21 CFR Part 11, DO-178C, AS9100, OWASP).
Studio3T:
Studio 3T for MongoDB helps you to build queries fast, generate instant code,
import/export in multiple formats, and much more.
Features of Studio3T:
Query MongoDB faster with our Visual Query Builder, IntelliShell, or SQL
Query tool.
Our Data Masking tool enables data compliance and bolsters security with
powerful field-level data obfuscation.
Import to MongoDB from JSON, CSV, BSON/mongodump, and SQL, and
get a preview of your output documents as you make changes.
Migration from MongoDB to SQL (or vice versa) has never been easier with
our Migration t
By Lec. Pratik Chand Page 7
Software Engineering – BCA 4th Semester
Linx
Linx is a low-code IDE and server. IT pros use Linx to quickly create custom
automated business processes, integrate applications, expose web services and to
efficiently handle high workloads.
Features of Linx:
Easy-to-use, drag-and-drop interface
Over 100 pre-built functions and services for rapid development
One-click deployment to any local or remote Linx Server directly from the
IDE
Input and outputs include nearly any SQL & NoSQL databases, numerous
file formats (text and binary) or REST and SOAP Web services
Live debugging with step-through logic
Automate backend processes via a timer, directory events, or message queue
or expose web services, and call APIs via HTTP request
SQL Sentry
SQL Sentry is database performance monitoring for the Data Platform, with fast
root cause analysis and visibility across the Microsoft data estate. It helps you to
manger scheduled events and identifies resource contention in an Outlook-style
calendar.
Features of SQL Sentry:
At-a-glance view of database environment health
Proactive alerting and response system
It allows you to find and fix high-impact queries
By Lec. Pratik Chand Page 8
Software Engineering – BCA 4th Semester
Storage forecasting powered by predictive analytics
It helps you to identify contributing problems in the OS and virtual
environment.
DbSchema:
DbSchema is a visual database designer & manager for any SQL, NoSQL, or
Cloud database. This tool enable you to visually design & interact with the
database schema, design the schema in a team and deploy it on multiple databases,
generate HTML5 diagram documentation, visually explore the data and build
queries, and so much more.
Features of DbSchema:
Design schema in the team and deploy on multiple databases
Compare different versions of the schema, generate migration scripts
HTML5 Documentation, Interactive Diagrams, Relational Data Explorer &
Visual Query Builder
Schema Synchronization, Random Data Generator, Data Loader, Database
Reports
SQL Editor with auto-completion
IDE (Integrated Development Environment)
IDEs helps to developer to manage the coded and makes ease of development.
Dreamweaver:
Dreamweaver is a popular Software Development Tool. This tool helps you to
create, publish, and manage websites. A website created with DreamWeaver can
be uploaded to any web server.
By Lec. Pratik Chand Page 9
Software Engineering – BCA 4th Semester
Features of Dreamweaver:
Dynamic websites can be quickly developed using Dreamweaver.
You can create a website that fits any screen size.
This tool helps you to customize workspace the way you like.
It has an inbuilt HTML validator to validate your code.
Provides Real-time collaboration, Live Preview, Drag-and-drop Editor,
Multilingual, Syntax Highlighting, and Dual View
Supports compliance standard such as GDPR
Provides numerous plugins like Code View
Seamlessly integrates with Fireworks and Flash
Offers ready-made templates for blogs, ecommerce, newsletters and
portfolios
Provides programming languages like HTML, CSS, and JavaScript
Offers flexible coding, Seamless Live View editing, Multi-monitor, and
Redesigned
It provides customer support via Phone and Chat
Supported Platforms: Windows, Android and iOS
Free Trial: 7 Days Free Trial
Apache NetBeans:
Apache NetBeans is a popular, Free, open-source IDE. It is one of the best
application development tools that allows developing desktop, mobile, and web
applications. This is popularly used in java programming.
By Lec. Pratik Chand Page 10
Software Engineering – BCA 4th Semester
Features of Apache NetBeans:
Support for fast & smart code editing
Easy & Efficient Project Management process
Rapid User Interface Development
Helps to write bug-free code
NetBeans IDE offers superior support for C/C++ and PHP developers
It can be installed on any OS which supports Java, from Windows to Linux
to Mac OS X systems
AWS Cloud9
AWS Cloud9 IDE is an online integrated software development environment. It is
one of the best software design tools that supports many programming languages
like C, C++, PHP, Ruby, Perl, Python, JavaScript, and [Link].
Features of AWS Cloud9
Allows to clone the entire development environment
Built-In Terminal for command-line wizard
Code Completion suggestions help software developers code faster and
avoid typos
The Debugger helps developers to set breakpoints and inspect variables of
any JS/[Link] app
Simply drag any file or Terminal to create multiple split views
Developers can select an extensive set of default Runners to execute apps,
such as Ruby, Python, PHP/Apach
By Lec. Pratik Chand Page 11
Software Engineering – BCA 4th Semester
Zend Studio:
Zend Studio allows software developers to code faster, and debug more easily. It is
a next-generation PHP IDE designed to create apps to boost developers’
productivity. It is one of the best developer tools which scales according to the DPI
settings of the underlying operating system.
Features of Zend Studio:
Code faster with performance improvements in indexing, validation, and
searching for PHP code
Offering debugging capabilities with Xdebug, Zend Debugger, and Z-Ray
integration
Extensive plugin provided by the large Eclipse eco-system
It is one of the best programming tools that support development tools,
including Docker and Git Flow
Deploy PHP applications on any server for Amazon AWS and Microsoft
Azure
Atom:
Atom is a solid all-around text-editor. It is fully free and open source. This
software development tool can be customized to do anything but without a need to
modify the config file.
By Lec. Pratik Chand Page 12
Software Engineering – BCA 4th Semester
Features Atom:
Atom works across many popular operating systems like OS X, Windows, or
Linux
It helps developers to write code faster with a smart, flexible autocomplete
Easily browse and open whole project or multiple projects in one window
It is possible to split the Atom interface into multiple panes to compare and
edit code across files
Find, preview, and replace text type in a file or across the entire project
CodeLobster:
Codelobster streamlines and simplifies PHP software development. process. It
supports CMS like WordPress, Drupal, Joomla, and Magento.
Features of CodeLobster:
PHP, HTML, JavaScript, CSS code highlighting
Autocomplete of tags, attributes for a current tag, closing tags.
Inspector makes it simple to find HTML elements and their styles buried
deep in the page
Autocomplete of style property names and values
It allows autocompleting of keywords, DOM elements, and their properties
It offers PHP Advanced autocomplete
CodeCharge Studio
CodeCharge Studio offers the fastest way to build applications. This tool helps to
develop data-driven Web sites or enterprise Internet and Intranet systems.
By Lec. Pratik Chand Page 13
Software Engineering – BCA 4th Semester
Features of CodeCharge Studio:
Avoid costly errors and misspellings by generating consistent, well-
structured code
Eliminate time-consuming programming tasks and build scalable, robust
Web Applications
Helps to convert any database into a web application in a very less amount
of time
Analyze and modify generated code to learn web technologies and take on
programming projects in any environment
Best Software Development Frameworks
Framework provides pre-built functionality which help developer to make their
work faster and easier. Some of the popular framework are:
Bootstrap:
Bootstrap is a responsive framework for developing with HTML, CSS, and JS. It is
one of the best software programming tools that have many in-builds components,
which you can easily drag and drop to assemble responsive web pages.
Feature:
Bootstrap enables the utilization of ready- made blocks of code
It ensures consistency irrespective of who’s working on the project
By Lec. Pratik Chand Page 14
Software Engineering – BCA 4th Semester
It offers an extensive list of components
Base Styling for most HTML Elements
Bootstrap can be customized according to the specific need of the project
HTML5 Builder:
HTML5 Builder is a software solution for building web and mobile apps. It can
develop an app using a single HTML5, CSS3, JavaScript, and PHP codebase. It
helps to target multiple mobile operating systems, devices, and Web browsers.
Features:
It is the fastest way to develop cross-platform Apps with flexible Cloud
services.
Increased speed of development with a single visual framework
It is one of the best tools in the software that brings Designers and
Developers into a Collaborative Workflow
Create Enterprise or ISV web and mobile apps
Create location-based browser and mobile applications using geolocation
components in HTML5 Builder
Laravel (PHP):
PHP is not the most popular language in the world, but it does have a very large
and active development community and a number of excellent frameworks. One of
the most popular is Laravel, which is known for its expressive syntax and elegant
code. It’s also perfect for building RESTful web applications and APIs.
By Lec. Pratik Chand Page 15
Software Engineering – BCA 4th Semester
ReactJS (JavaScript):
ReactJS is an optimal JavaScript library for building user interfaces. It’s quickly
gaining popularity due to the ability to create performant, reusable components.
This makes it perfect for creating large and complex web applications and creating
reusable front-end components that can be used in various projects.
AngularJS (JavaScript)
AngularJS is another JavaScript library, this time for building dynamic web
applications. It’s perfect for creating single-page applications and has been used to
build some of the most popular web applications in the world, such as Google
Inbox, YouTube, and UpWork.
Visual Studio Online:
Visual Studio Online is a collection of services. It is fast and easy to plan, build
and ship software across a variety of platforms. It is one of the best tools for
software developers that allows organizations to create the perfect development
environment.
By Lec. Pratik Chand Page 16
Software Engineering – BCA 4th Semester
Features:
Track and manage all ideas on kanban or scrum boards with agile tools
Improve code quality and catch issues early
Build, manage, secure and share software components
Automate and simplify Azure deployments
Tools for manual, performance, and automated testing
It offers a centralized version control system with free private repositories.
Django (Python):
Python is not only a powerful and easy-to-use programming language, but it also
has an ecosystem of web frameworks that make building websites much
easier. Django is one such framework; it’s prevalent among developers because of
its large library of extensions and the fact its automatically generated
administration panel allows you to build and deploy bug-free sites rapidly. It’s also
compatible with Google App Engine, making it simple to deploy applications onto
the cloud.
Spring (Java):
As the most prevalent programming language in the world, it’s no surprise
that Java has one of the most mature and well-developed frameworks around
in Spring. It’s used by some of the biggest companies globally, such as Amazon,
Walmart, and eBay, and is perfect for building both web applications and
enterprise-level systems.
By Lec. Pratik Chand Page 17
Software Engineering – BCA 4th Semester
Cloud Tools for Software Development
Cloud tools provide online development environment for developer.
Azure:
Microsoft Azure is widely used by developers to build, deploy and manage web
applications.
Features:
It supports a wide range of operating systems, programming languages,
frameworks, and devices
Allows to build apps quickly and easily
It easily detects and mitigates threats
Rely on the most trusted cloud
Allows to manage app proactively
Helps to deliver mobile apps seamlessly
Kwatee”
Kwatee Agile Deployment is a software development tool. It is one of the best
software developer tools that automate applications or microservices to any
number of servers. It fully automates deployments of text and binary files from any
number of target servers.
By Lec. Pratik Chand Page 18
Software Engineering – BCA 4th Semester
Features:
It allows managing environment-specific configuration parameters for your
application
It allows generating command-line installers to be used for deployments in
environments
This software development tool eliminates the need for installation &
configuration. It also takes out many operational risks in the software
development process
It is a friendly web interface lets configure deployments efficiently and
painlessly
It supports a broad range of operating systems, including Linux, Windows,
Mac OS X, Solaris, etc.
Data Science Tools
These tools are used in the field of data science. In which data mining, data
manipulation, data management, data analysis etc. work can be done.
Data studio
Dataiku DSS is a collaborative data science software platform. It is used by data
scientists, data analysts, and engineers to explore, prototype, build and deliver their
data products.
Features:
Profile the data visually at every stage of the analysis
Prepare, enrich, blend, and clean data using more than 80+ built-in functions
Bundle whole workflow as a single deployable package for real-time
predictions
Build & optimize models in Python or R and integrate any external ML
library through code APIs
By Lec. Pratik Chand Page 19
Software Engineering – BCA 4th Semester
Source Control Tools
These tools are used to share the program source code among the developers.
Github:
GitHub allows developers to review code, manage projects, and build software. It
offers the right tool for different development jobs.
Features:
Coordinate easily, stay aligned, and get done with GitHub’s project
management tools
Easy documentation alongside quality coding
It is one of the best software dev tools that allows all code in a single place
Developers can host their documentation directly from repositories
BitBucket:
Bitbucket is a version control tool. It facilitates easy collaboration amongst the
software development team. It integrates very well with JIRA, a famous project
and issue-managing app.
Features:
Branch permissions access to ensure that the only right people can make
changes to the code
It is one of the best software tools examples that helps development team to
focus on a goal, product or process by organizing repositories into projects
It can display build results from CI system
Integrate into existing workflow to streamline software development process
By Lec. Pratik Chand Page 20
Software Engineering – BCA 4th Semester
Prototyping Tools
These tools are used to create a software prototype which makes developer to build
prototype easily.
Axure:
Axure provides the capability to produce wireframes, and prototypes, and create
documentation. This tool is used by business analysts, product managers, and IT
consultants around the world.
Features:
Axure RP generates prototype in HTML and provides link for sharing
It is one of the best dev programs which allows multiple people to work on
the same file at the same time
It can runs on Microsoft IIS with a MySQL or Microsoft SQL Server
database
It helps to create and maintain widget libraries
Notifications Programs:
This tool is used to push notification on chatting apps.
SendBird
Sendbird is used as a messaging and Chat API for Mobile Apps and Websites. It
offers scalability for a massive audience. It also prevents spam flooding of chat
rooms.
Features:
Read and track the status of the messages sent to users
By Lec. Pratik Chand Page 21
Software Engineering – BCA 4th Semester
Integrate bots to assist with customer support and product recommendations
Offers Push Notifications & Callbacks
Read Receipt & Delivery Status
Automatically split or merge chat rooms on the audience volume to offer
continues engagement
Selecting Languages and Tools:
As a custom software development firm, this is one of the most common questions
we’re asked. Choosing the best programming language, library or technology stack
is essential to successful software development, regardless of the problem you’re
trying to solve.
In general, we think you can write good software in Java, C#, Python, PHP, or any
other myriad languages. You can also write really bad software using any of those.
The stick to widely accepted design principles and philosophies is more important
than the specific language. As a tech-agnostic provider, we’ll find the right tool for
the job, in the tech stack that’s best for you.
Here are the seven critical factors we consider when determining the optimal
programming language for each project:
Application type:
Web applications, mobile applications, embedded firmware, etc. the type of
application you’re developing heavily influences what languages are available for
us to choose from.
General programming languages like Java, JavaScript, Python and C# can build
different types of applications on different platforms. There are also cases where
specific languages work better.
For example, building a native Android app requires knowledge of Java, building a
native iOS app requires a Swift or Objective-C skill set, whereas knowledge of C
or C++ is critical if you’re working with embedded firmware.
By Lec. Pratik Chand Page 22
Software Engineering – BCA 4th Semester
Complexity of the application:
The size and complexity of a project play an important role in deciding which
stack or technology we want to use, which in turn is a deciding factor on what
programming language to use.
Small projects such as simple marketing sites, portfolio presentations and simple
web application forms to collect data can be done with some CMS systems like
WordPress or Umbraco, which requires knowledge of PHP or C#, respectively.
Medium-sized and Large-size projects including e-commerce sites, internal
enterprise applications and IoT solutions usually have different layers, components
and integrations where a more general programming language such as Java or C#
could help simplify skill set requirements to maintain the products. We typically
break down complex applications into smaller components where each element
serves a specific function and uses a different technology stack and language to
yield the best result.
Company culture:
Every company has preferences regarding open source versus proprietary software
and internal versus external technical support. One company might prefer a
programming language that’s easy to learn, while another may need a language
that is more scalable. All programming languages have trade-offs, so our primary
focus is understanding your specific business challenges and then selecting a
language that aligns with your individual needs.
Time to market:
It’s important to think about the skill set of your current employees. Is it feasible to
introduce a new program or technology to your team? Unless there’s a compelling
reason to introduce a new technology, we always recommend leveraging existing
skillsets to bring new ideas to life faster. Exploring new languages and
technologies is better saved for projects with longer timelines.
By Lec. Pratik Chand Page 23
Software Engineering – BCA 4th Semester
Another consideration that impacts time to market is the physical environment
you’re currently operating in or what you may aspire to be in. For example, if you
already own a Microsoft-based server environment, we may choose a Microsoft-
based solution. If you’re looking to move to a cloud/PaaS environment, we may
suggest a platform that can more easily be containerized. Because the software
language can dictate size and scalability options in the long run, we also factor
these concerns into our decision.
Maintainability:
Every technology stack and language comes with an ecosystem of libraries and
vendor supports for those libraries. We want to look at the trend and update release
cycles to make sure what we pick is current and stay current for some time to
come.
While we like to engage with our clients long-term, we understand that at some
point we may need to transition a codebase to another team. If you plan to hire an
internal developer team to maintain your technology stack, maintenance costs will
be impacted by the availability and expertise of development talent in your area.
For example, in the Midwest, it’s easier to hire Java and C# developers than Ruby,
Python or PHP developers. We take this into account when selecting a
programming language to ensure the long-term sustainability of the codebase.
Scalability and performance:
Scalability is more about a technology stack, which in turn determines the
programming languages rather than the programming language itself. Some battle-
tested and popular stacks that have proven to be capable of such scalability include
.NET, LAMP, Ruby on Rails (RoR), MEAN and Java Spring.
Security:
Every application has different requirements in terms of security. For example,
healthcare-related applications might require HIPAA (Health Insurance Portability
and Accountability Act) compliance, or financial applications might require PCI
(Payment Card Industry) compliance. We also take more general security
By Lec. Pratik Chand Page 24
Software Engineering – BCA 4th Semester
recommendations like the OWASP Top 10 (Open Web Application Security
Project) into consideration when choosing the right stack. Keeping an eye on the
security bulletin for your chosen stack will help the application be more robust.
We have to consider above mentioned factors while selecting a programming
language and tools. Different factors may lead to choose different programing
language and tools for single developer.
Good Programming Practices:
“Good coding practices are a set of rules that helps developers write clean code.
High-quality code, in turn, ensures that applications will run smoothly and
software projects will be successful. Stripe and Harris Poll did their research
and found that programmers spend 13.5 hours solving technical problems and 3.8
hours fixing bad code.
The researchers also revealed that companies have to spend $85 billion annually
on solving issues caused by low-quality code. If you want to avoid these problems,
your development team should provide consistent and beautiful lines of code.
Following coding best practices will help your specialists working with any
programming language write code accurately from the very beginning.”
By the way, messy code can work as well. But it will adversely affect the entire
project and your business in the long run. Poor code quality inevitably increases
the cost of further product development. Let's imagine a situation when your
application has gained popularity. You decided to expand it and add new features.
Whatever the reason, you hire another developer to upgrade your app. He/she
needs to understand the existing architecture of the application, data structures, and
relationships between them. The high quality of the code allows developers to
quickly navigate it and make the necessary changes.
If bugs appear due to bad code, programmers spend extra time fixing them. And if
the bug is not noticed immediately, you will have to cope with the problems that
appear in the production code. What's more, you will have to spend even more
time fixing these problems in the future.
Finally, users want to get new features as quickly as possible. Good code allows
software development companies to release them faster while meeting user
By Lec. Pratik Chand Page 25
Software Engineering – BCA 4th Semester
demand. You will be able to compete with similar apps in terms of functionality
and development speed. As a result, users won't uninstall your product, and you
will continue to receive your profits.
Features of good code or program:
IEasily Modifiable: If the architecture is well-structured, you can extend
your code without much time or technical effort. The code should be
expressed briefly and clearly. Code entities should not be closely related;
each entity should be responsible only for its own part of the functionality.
Simple and Easy to Read: The majority of software requires regular
enhancement. Thus, different developers contribute to a single project. And
although code is, well, code, you shouldn’t have to decipher it: regardless of
who opens it, they should be able to quickly read it. This means that the code
has to be simple, convenient, and easily comprehensible. If these factors
were taken into account, then it is possible for developers to trace the
author’s train of thought and understand how the processes of software
should function.
Safe and Secure: When coding, you must always remember the overall
security of your product. Veracode revealed that 75.8% of apps have at least
one security flaw, and 23.7% have numerous security issues that are usually
solved for a very long time.
Good Program Practices or Principles:
There are various program practices which developers should follow. Some of
them are:
Choose industry-specific coding standards
Coding best practices and standards vary depending on the industry a specific
product is being built for. The standards required for coding software for luxury
automobiles will differ from those for coding software for gaming.
For example, MISRA C and C++ were written for the automotive industry and are
considered the de-facto standards for building applications that emphasize safety.
By Lec. Pratik Chand Page 26
Software Engineering – BCA 4th Semester
Currently, they are regarded as the absolute best practices for writing code in the
industry.
Adhering to industry-specific standards makes it easier to write accurate code that
matches product expectations. It becomes easier to write code that will satisfy the
end-users and meet business requirements.
Note: MISRA (Motor Industry Software Reliability Association) C is a set of
software development guidelines for the C programming language developed by
The MISRA Consortium. Its aims are to facilitate code safety, security, portability
and reliability in the context of embedded systems, specifically those systems
programmed in ISO C / C90 / C99.
Focus on code readability:
Readable code is easy to follow, optimizes space and time. Here are a few ways to
achieve that:
Write as few lines as possible.
Use appropriate naming conventions.
Segment blocks of code in the same section into paragraphs.
Use indentation to marks the beginning and end of control structures.
Clearly specify the code between them.
Don’t use lengthy functions. Ideally, a single function should carry out a
single task.
Use the DRY (Don’t Repeat Yourself) principle. Automate repetitive tasks
whenever necessary. The same piece of code should not be repeated in the
script.
Avoid Deep Nesting. Too many nesting levels make code harder to read and
follow.
Capitalize SQL special words and function names to distinguish them from
table and column names.
Avoid long lines. It is easier for humans to read blocks of lines that are
horizontally short and vertically long.
By Lec. Pratik Chand Page 27
Software Engineering – BCA 4th Semester
Standardize headers for different modules
It is easier to understand and maintain code when the headers of different modules
align with a singular format. For example, each header should contain:
Module Name
Date of creation
Name of creator of module
History of modification
Summary of what the module does
Functions in that module
Variables accessed by the module
Don’t use a single identifier for multiple purposes
Ascribe a name to each variable that clearly describes its purpose. Naturally, a
single variable can’t be assigned multiple values or used for numerous functions.
This would confuse everyone reading the code and would make future
enhancements more difficult to implement. Always assign unique variable names.
Turn daily backups into an instinct
Multiple events can trigger data loss by system crash, dead battery, software glitch,
hardware damage, etc. To prevent this, save code daily, and after every
modification, no matter how minuscule it may be. Back up the workflow on TFS,
SVN, or any other version control mechanism.
Leave comments and prioritize documentation
Don’t assume that just because everyone else viewing the code is a developer, they
will instinctively understand it without clarification. Devs are human, and it is a lot
easier for them to read comments describing code function rather than scanning the
code and making speculations.
Take an extra minute to write a comment describing the code function at various
points in the script. Ensure that the comments guide any readers through the
By Lec. Pratik Chand Page 28
Software Engineering – BCA 4th Semester
algorithm and logic implemented. Of course, this is only required when the code’s
purpose is not apparent. Don’t bother leaving comments on self-explanatory code.
Try to formalize Exception Handling
‘Exception’ refers to problems, issues, or uncommon events that occur when code is run
and disrupt the normal flow of execution. This either pauses or terminates program
execution, which is a scenario that must be avoided.
However, when they do occur, use the following techniques to minimize damage
to overall execution in terms of both time and dev effort:
Keep the code in a try-catch block.
Ensure that auto recovery has been activated and can be used.
Consider that it might be an issue of software/network slowness. Wait a few
seconds for the required elements to show up.
Use real-time log analysis.
Assignment:
1. What is programming language? Explain various classes of programming
language.
2. What is program development tool? Explain any five program development
tools.
3. What is good program? Explain the feature of good program.
4. What are the considerations that a programmer should think during selection
a programming language?
5. Explain the various good program practices.
End of Unit-5
By Lec. Pratik Chand Page 29