Oracle PL/SQL Exception Handling: Examples to Raise User-defined Exception

What is Exception Handling in PL/SQL?

An exception occurs when the PL/SQL engine encounters an instruction which it cannot execute due to an error that occurs at run-time. These errors will not be captured at the time of compilation and hence these needed to handle only at the run-time.

For example, if PL/SQL engine receives an instruction to divide any number by ‘0’, then the PL/SQL engine will throw it as an exception. The exception is only raised at the run-time by the PL/SQL engine.

Exceptions will stop the program from executing further, so to avoid such condition, they need to be captured and handled separately. This process is called as Exception-Handling, in which the programmer handles the exception that can occur at the run time.

In this tutorial, you will learn the following topics-

Exception-Handling Syntax

Exceptions are handled at the block, level, i.e., once if any exception occurs in any block then the control will come out of execution part of that block. The exception will then be handled at the exception handling part of that block. After handling the exception, it is not possible to resend control back to the execution section of that block.

The below syntax explains how to catch and handle the exception.

Exception Handling in PL/SQL
BEGIN
<execution block>
.
.
EXCEPTION
WHEN <exceptionl_name>
THEN
  <Exception handling code for the “exception 1 _name’' >
WHEN OTHERS
THEN
  <Default exception handling code for all exceptions >
END;

Syntax Explanation:

  • In the above syntax, the exception-handling block contains series of WHEN condition to handle the exception.
  • Each WHEN condition is followed by the exception name which is expected to be raised at the run time.
  • When any exception is raised at runtime, then the PL/SQL engine will look in the exception handling part for that particular exception. It will start from the first ‘WHEN’ clause and, sequentially it will search.
  • If it found the exception handling for the exception which has been raised, then it will execute that particular handling code part.
  • If none of the ‘WHEN’ clause is present for the exception which has been raised, then PL/SQL engine will execute the ‘WHEN OTHERS’ part (if present). This is common for all the exception.
  • After executing the exception, part control will go out of the current block.
  • Only one exception part can be executed for a block at run-time. After executing it, the controller will skip the remaining exception handling part and will go out of the current block.

Note: WHEN OTHERS should always be at the last position of the sequence. The exception handling part present after WHEN OTHERS will never get executed as the control will exit from the block after executing the WHEN OTHERS.

Types of Exception

There are two types of Exceptions in Pl/SQL.

  1. Predefined Exceptions
  2. User-defined Exception

Predefined Exceptions

Oracle has predefined some common exception. These exceptions have a unique exception name and error number. These exceptions are already defined in the ‘STANDARD’ package in Oracle. In code, we can directly use these predefined exception name to handle them.

Below are the few predefined exceptions

ExceptionError CodeException Reason
ACCESS_INTO_NULLORA-06530Assign a value to the attributes of uninitialized objects
CASE_NOT_FOUNDORA-06592None of the ‘WHEN’ clause in CASE statement satisfied and no ‘ELSE’ clause is specified
COLLECTION_IS_NULLORA-06531Using collection methods (except EXISTS) or accessing collection attributes on a uninitialized collections
CURSOR_ALREADY_OPENORA-06511Trying to open a cursor which is already opened
DUP_VAL_ON_INDEXORA-00001Storing a duplicate value in a database column that is a constrained by unique index
INVALID_CURSORORA-01001Illegal cursor operations like closing an unopened cursor
INVALID_NUMBERORA-01722Conversion of character to a number failed due to invalid number character
NO_DATA_FOUNDORA-01403When ‘SELECT’ statement that contains INTO clause fetches no rows.
ROW_MISMATCHORA-06504When cursor variable data type is incompatible with the actual cursor return type
SUBSCRIPT_BEYOND_COUNTORA-06533Referring collection by an index number that is larger than the collection size
SUBSCRIPT_OUTSIDE_LIMITORA-06532Referring collection by an index number that is outside the legal range (eg: -1)
TOO_MANY_ROWSORA-01422When a ‘SELECT’ statement with INTO clause returns more than one row
VALUE_ERRORORA-06502Arithmetic or size constraint error (eg: assigning a value to a variable that is larger than the variable size)
ZERO_DIVIDEORA-01476Dividing a number by ‘0’

User-defined Exception

In Oracle, other than the above-predefined exceptions, the programmer can create their own exception and handle them. They can be created at a subprogram level in the declaration part. These exceptions are visible only in that subprogram. The exception that is defined in the package specification is public exception, and it is visible wherever the package is accessible. <

Syntax: At subprogram level

DECLARE
<exception_name> EXCEPTION; 
BEGIN
<Execution block>
EXCEPTION
WHEN <exception_name> THEN 
<Handler>
END;
  • In the above syntax, the variable ‘exception_name’ is defined as ‘EXCEPTION’ type.
  • This can be used as in a similar way as a predefined exception.

Syntax:At Package Specification level

CREATE PACKAGE <package_name>
 IS
<exception_name> EXCEPTION;
.
.
END <package_name>;
  • In the above syntax, the variable ‘exception_name’ is defined as ‘EXCEPTION’ type in the package specification of <package_name>.
  • This can be used in the database wherever package ‘package_name’ can be called.

PL/SQL Raise Exception

All the predefined exceptions are raised implicitly whenever the error occurs. But the user-defined exceptions needs to be raised explicitly. This can be achieved using the keyword ‘RAISE’. This can be used in any of the ways mentioned below.

If ‘RAISE’ is used separately in the program, then it will propagate the already raised exception to the parent block. Only in exception block can be used as shown below.

Exception Handling in PL/SQL
CREATE [ PROCEDURE | FUNCTION ]
 AS
BEGIN
<Execution block>
EXCEPTION
WHEN <exception_name> THEN 
             <Handler>
RAISE;
END;

Syntax Explanation:

  • In the above syntax, the keyword RAISE is used in the exception handling block.
  • Whenever program encounters exception “exception_name”, the exception is handled and will be completed normally
  • But the keyword ‘RAISE’ in the exception handling part will propagate this particular exception to the parent program.

Note: While raising the exception to the parent block the exception that is getting raised should also be visible at parent block, else oracle will throw an error.

  • We can use keyword ‘RAISE’ followed by the exception name to raise that particular user-defined/predefined exception. This can be used in both execution part and in exception handling part to raise the exception.
Exception Handling in PL/SQL
CREATE [ PROCEDURE | FUNCTION ] 
AS
BEGIN
<Execution block>
RAISE <exception_name>
EXCEPTION
WHEN <exception_name> THEN
<Handler>
END;

Syntax Explanation:

  • In the above syntax, the keyword RAISE is used in the execution part followed by exception “exception_name”.
  • This will raise this particular exception at the time of execution, and this needs to be handled or raised further.

Example 1: In this example, we are going to see

  • How to declare the exception
  • How to raise the declared exception and
  • How to propagate it to the main block
Exception Handling in PL/SQL
Exception Handling in PL/SQL
DECLARE
Sample_exception EXCEPTION;
PROCEDURE nested_block
IS
BEGIN
Dbms_output.put_line(‘Inside nested block’);
Dbms_output.put_line(‘Raising sample_exception from nested block’);
RAISE sample_exception;
EXCEPTION
WHEN sample_exception THEN 
Dbms_output.put_line (‘Exception captured in nested block. Raising to main block’);
RAISE,
END;
BEGIN
Dbms_output.put_line(‘Inside main block’);
Dbms_output.put_line(‘Calling nested block’);
Nested_block;
EXCEPTION
WHEN sample_exception THEN	
Dbms_output.put_line (‘Exception captured in main block');
END:
/

How Does an Engineer Create a Programming Language?

Besides being a software engineer, Marianne Bellotti is also a kind of technological anthropologist. Back in 2016 at the Systems We Love conference, Bellotti began her talk by saying she appreciated the systems most engineers hate —”messy, archaic, duct-tape-and-chewing-gum.” Then she added, “Fortunately, I work for the federal government.”

At the time, Bellotti was working for the U.S. Digital Service, where talented technology workers are matched to federal systems in need of some consultation. (While there, she’d encountered a web application drawing its JSON-formatted data from a half-century-old IBM 7074 mainframe.)

The rich experiences led her to write a book with the irresistible title “Kill It with Fire: Manage Aging Computer Systems (and Future Proof Modern Ones).” Its official web page at Random House promises it offers “a far more forgiving modernization framework” with “illuminating case studies and jaw-dropping anecdotes from her work in the field,” including “Critical considerations every organization should weigh before moving data to the cloud.”

Kill it With Fire by Marianne Bellotti - book cover

Bellotti is now working on products for defense and national security agencies as the principal engineer for system safety at Rebellion Defense (handling identity and access control).

But her latest project is a podcast chronicling what she’s learned while trying to write her own programming language.

“Marianne Writes a Programming Language” captures a kind of expedition of the mind, showing how the hunger to know can keep leading a software engineer down ever-more-fascinating rabbit holes. But it’s also an inspiring example of the do-it-yourself spirit, and a fresh new perspective on the parsers, lexers and evaluators that make our code run.

In short, it’s a deeply informative deconstruction of where a programmer’s tools really come from.

Going Deep

In one blog post, Bellotti invited listeners to “start this strange journey with me through parsers, grammars, data structures and the like.”

And it is a journey, filled with hope and ambition — and a lot of unexpected twists and turns. “Along the way, I’ll interview researchers and engineers who are active in this space and go deep on areas of programming not typically discussed,” the podcast host promised. “All in all,  I’m hoping to start a conversation around program language design that’s less intimidating and more accessible to beginners.”

But the “Marianne Writes a Programming Language” podcast also comes with a healthy dose of self-deprecation. “Let’s get one question out of the way,” her first episode began. “Does the world really need another programming language? Probably not, no.” But she described it as a passion project, driven by good old-fashioned curiosity. “I have always wanted to write a programming language. I figured I would learn so much from the challenge.”

“In an industry filled with opinions, where people will fight to the death over tabs -vs.- spaces, there isn’t much guidance for would-be program language designers.”

—Marianne Bellotti, software engineer and podcast host

Fifteen years into a sparkling technology career, “I feel like there are all these weird holes in my knowledge,” Bellotti told her audience. And even with the things she does know — like bytecode and logic gates — “I don’t have a clear sense of how all those things work together.”

In the podcast’s third episode, Bellotti pointed out that, “for me at least, the hardest part of learning something is figuring out how to learn it in the first place.” She discovered a surprising lack of best-practices documents, she wrote in an essay in Medium. “In an industry filled with opinions, where people will fight to the death over tabs -vs.- spaces, there isn’t much guidance for would-be program language designers.”

Still, her podcast’s first episode showed the arrival of those first glimmers of insight. “Even knowing very little upfront, I had a sense that in order for a programming language to work, there had to be some sense of cohesion in its design.”

Where to Begin?

Her Medium post cited a 2012 article titled “Programming Paradigms for Dummies: What Every Programmer Should Know,” which offers a taxonomy of language types based on how exactly they’re providing their abstractions. That article apparently got her thinking about how exactly a programming language helps communicate the connections that exist between its various data structures — which led to more insights. (In a later podcast, Bellotti even says “technology suggests to its user how it should be used.”)

“Eventually I came to my own conclusions,” she wrote in her Medium article. To be successful at creating her own language, she realized that she needed to think of  programming paradigms like object-oriented or functional programming “as logical groupings of abstractions and be as intentional about what is included and what isn’t.”

Bellotti is also trying to design a language that will work for her specific needs: to know how likely certain types of problems are in a given system, to achieve model resilience. But on her first podcast episode, Bellotti acknowledged that she still had to begin by typing, “How do you design a programming language” into Google —and was surprised by how little came up. (Although she did discover “there’s a whole world of obscure experimental languages that appear in research papers, rack up a host of citations, and never touch an actual computer other than their inventor’s.”)

“I feel like I’ve been struggling to hang pictures around my home and one day someone knocks on my door and introduces me to the hammer,”

—Marianne Bellotti, software engineer and podcast host

So where to begin? Avoiding the standard dry collegiate textbooks like “Compilers: Principles, Techniques, and Tools,” she instead found her way to the book Writing an Interpreter in Go, a book which by necessity also created its own programming language (a modified version of Scheme called Monkey) for its interpreter.

That book’s author, Thorsten Ball, became her podcast’s first guest, explaining that his language was not so much designed as experimented into existence. (Later, other people suggested something similar — that Bellotti “pick something you like in another language and copy the implementation to start, because figuring out all the edge cases from scratch is really hard.”)

In that first podcast episode, Bellotti explained her concern that “tiny little design decisions I don’t even realize I’m making could have dramatic impacts… it does seem to be the case that programmers create languages without being able to fully anticipate exactly how they will be used or how technology will change around them.”

Things Get Complicated

There are moments where it all sounds so simple. (“What you’re doing when you write a programming language is actually writing a series of applications that take string input and translate it into something the machine can execute.”)

But things get complicated pretty quickly, and by episode three Bellotti started to see a pattern: “Confronting what feels like a tidal wave of information is becoming an all too familiar feeling on this project.” Yet, while considering a need for her language’s source code-interpreting parser, she realized that parsers can be auto-generated — as long as she can supply that tool with the necessary grammar rules.

“I feel like I’ve been struggling to hang pictures around my home and one day someone knocks on my door and introduces me to the hammer,” she told her podcast audience.

She ends up talking to a linguist who studied under Noam Chomsky, who refers her to another linguistics professor, who begins by discussing whether language can be learned through the brute-force assimilation of machine learning, and ends up explaining why Chomsky’s “context-free grammar” ultimately became the basis for programming languages and compilers.

But there are resources to discover. Along the way, Bellotti found a Reddit forum about programming language design. (“This subreddit is full of great stories and people will give detailed explanations and encouragement, which is rare on the internet these days.”) She’s also found a forum for people building Domain Specific Languages.

By December, she’d received a comment from a grateful listener who was also writing their own programming language, and was glad to find a relevant podcast. And Bellotti acknowledged in a response that her whole journey “has been so much fun so far.”

Progress is clearly being made. By episode 12, Bellotti considered how hard it would be to add modules to her language. (“From my vantage point, being able to split a system specification into smaller parts means you get to reuse those parts and build progressively more complex systems that are in easily digestible chunks.”) And there’s also already an empty repository on GitHub that’s waiting expectantly for the code to arrive.

Then, in mid-April Bellotti announced that episode 12 would be the last one “for a while. I’ve made some design decisions that I feel really good about, but it’s clear that the only way to validate them is to write code and try things out.”

She’s also spending some time researching how to optimize her compiler, “But really, I just need to just be heads-down, hands-on-a-keyboard for a while on this.”

And so, the podcast has entered a productive hiatus, leaving listeners with this tantalizing promise.

“I’ll be back in a couple of months to let you know how that went.”

3 Must-learn programming languages for developers in 2021

Photo by Kevin Ku on Pexels.com

Amidst the pandemic, it is essential to understand the major skills and a quick peep into the most in demand tech jobs that may help professionals to grow and explore various career prospects.

Especially with the evolving technology, which is offering innumerable job opportunities, for fresh graduates and even experienced programmers who are willing to learn the innovative trends that are emerging into the world of programming.

For a few the chances might be minimum in the growing tech market due to skills being mismatched. Therefore, to supersede this obstacle, we tailored 3 top programming skills which have high demand in the tech world today:

1. C++
The post-pandemic work that has forced people to work from home has seen an enormous rise in demand for cloud adoption. Various problems of data breaches have forced companies to come up with a greater budget for security purposes. The day-to-day cybersecurity threat is getting worse. So, if one wants to prosper in the said field, should be highly fascinated with IT not just that, sometimes it is even required more than that. Having command over various programming languages like C++ will make it easier. The demand for cybersecurity professionals with C++ skills has been rising especially with the rising cybersecurity cases globally.

2. Python
AI and ML are rising unexpectedly, mostly during pandemic times as businesses have been stuck in the digital world having no other way out than opting for AI and ML. For an AI engineer, it requires both the knowledge of technical and non-technical skills. A fastest-growing industry like this needs an ample amount of people with proper skills and knowledge. Well, Python is considered by experts the most suitable programming language for Machine Learning, Artificial Intelligence, and Natural Language Processing.

3. Rust
If one is starting a career in the world of programming they should be highly equipped with the knowledge of Python and JavaScript which forms the very base of it the reason being as they have a wide number of applications and have been used for many years. However, 2021, which is full of different things has something new to offer for people who aspire to be a programmer. In a survey, it was found that Rust was the most loved programming language which has been gaining prominence for the past few years.

Acting as an alternative for C++. Useful mostly for people who are looking for problem-solving techniques when they are working on large-scale applications. Offering a new atmosphere to programmers is highly functional helping developers remove bugs caused by C++.

Various courses are available with projects for hands-on experience.

Programming Languages: Choose Wisely?

languages cybersecurity

We’ve got decades of experience in programming and language adoption under our belt at this point, and there are a few things we can say definitively that developers in general (and DevOps engineers specifically) should be aware of.

First, it doesn’t matter as much as you think. It really doesn’t. Most developers don’t choose programming languages based on important things like optimization or general applicability. They choose a language based on ease of use, availability of third-party libraries and simplification of things like UI. Open source version availability helps, but only insofar as it spawns more third-party libraries. So, use the language that works best for the project, and don’t get too hung up on whether or not it’s the newest shiny one.

Second, the changes in use and adoption that matter–the top five to 10 languages that make up the vast majority of all professional programming activity–don’t happen overnight. Both JavaScript and Python are considered “rapid ascent” in terms of uptake when they took off … but both were around for years before that spike in adoption occurred. So, learning any of the top few languages is a far better long-term investment than learning the hottest new language.

Third, those top languages actually don’t change much. They were written to fulfill a need, and that doesn’t change much over time. Indeed, the only language I can think of that has fundamentally changed in its lifetime is C++, which seems to want to keep up with the times rather than keep serving its original niche. Python? Java? Still pretty much the same as when they became popular back in the day. And that’s a good thing. But that means if you want to try something new and engaging, you need to look to up-and-coming languages. At the time of this writing, specialist languages like R and Kafka are having their day, and that’s a good thing. After all, we know that different applications have different needs and different platforms have different needs–and have been trying to address that second one forever, currently with languages like Flutter. All of these will offer new ways of doing things, which is good exposure.

Fourth, (though we briefly toyed with eliminating this one) organizations do determine the pool of available languages. Frankly, allowing each team to build a separate architecture was never a good idea from a long-term maintenance point of view … but a fairly large number of organizations played with the idea and learned the lessons about technical debt all over again. Now we’re back to “We use these languages, pick one,” which is better than “We’re an X shop,” and offers maintainability over time without burning a ton of man-hours.

And finally, you can do anything with those languages your organization makes available. I’ve seen object-oriented assembler, I’ve seen entire websites served in C; the list goes on. The language you choose makes certain things easier or harder, but if you need to get it done, you’ll either get an exception to the language list, or you’ll figure out how to get it done with what’s available. But you can … But as my father used to love to say, “Just because you can, doesn’t mean you should.” He had nothing to do with programming and as little as possible to do with computers, but his logic still applies perfectly.

So, grab an approved language, and crank out solutions. Just keep driving it home; you’re rocking it. Don’t stop, and don’t worry too much about which language you’re using, just focus on the language and do what needs doing–like you’ve done all along.  And spin us up even more cool apps.

How much salary does Cognizant pay to software engineers?

Photo by Christina Morillo on Pexels.com

According to the JobBuzz data, here is the compensation of software engineers that Cognizant offers.

1. Software Developer/ Programmer
Software developers obtain compensation of Rs 2,73,617 per year on the minimum level and Rs 8,58,340 per year on the maximum level. The average salary of a software developer is Rs 4,84,968 annually.

2. Data Warehouse Developer
Annually, the minimum and maximum salary for a data warehouse developer are Rs 2,93,821 and Rs 9,47,472 respectively. The average compensation for the candidates is around Rs 5,30,472 per year.

3. Software Testing Engineer/ Test Automation Engineer
Software testing engineers obtain a salary of Rs 4,74,120 per year. The minimum and maximum compensations are Rs 2,43,227 and Rs 8,11,764 respectively depending on the experience of the candidates.

4. Tech Architect
On average, the salary of a tech architect is Rs 12,04,353 per year. The minimum and maximum compensation depending on the experience of the candidate are Rs 3,31,666 and Rs 23,38,366 annually.

5. Software Quality Assurance Analyst
Software quality assurance analyst compensation is around Rs 4,70,236 per year on average. The minimum compensation is Rs 2,52,693 per year and the maximum is Rs 8,02,490.

Developers dread these programming languages, but which one pays the most?

A portion of the report ranks programming languages by their correlating developer salary. If you’re looking to get paid well, it might be worth your time to learn Clojure and maybe not Dart

office.jpg
Image: GettyImages/RyanJLane

On Monday, Stack Overflow published the results of its 2021 Developer Survey. The findings highlight a range of sentiments and economic information such as developer attitudes toward specific “dreaded” languages and how much certain programming languages pay on average. So, which programming languages do developers love, and which one should you learn if you want to get paid top dollar?

Top programming languages: Loved, hated and wanted

Overall, the results are based on a global survey conducted in May and June of this year involving more than 83,000 software developers. Rust topped the list in terms of languages developers love versus the options they dreaded, with 86.98% of responses saying they loved Rust compared to the 13% of responses who dreaded it. Clojure ranked No. 2 in this regard with 81% of respondents saying they loved the language versus 18.88% who dreaded it.

Interestingly, there’s a marked drop-off between the top two and the rest of the field. TypeScript ranked third with 72.73% of respondents saying they loved the language versus 27.27% who dreaded it. In order, Elixir, Julia, and Python round out the top six.

On the other end of the spectrum, Cobol ranked at the least loved programming language, with 84.21% of respondents saying they dreaded it, versus 15.79% who loved it. In order, VBA, Matlab, Objective-C, Groovy and Assembly sat at the bottom of the list as the top six most dreaded programming languages.

A portion of the report identifies the programming languages developers wanted to have in their arsenal. Stack Overflow determined these languages based on the percentage of “developers who are not developing with the language or technology but have expressed interest in developing with it.” Python topped the list by a wide margin with 19.04% of respondents wanting the programming language, followed by runner-up TypeScript (15.29%). In order, JavaScript (14.59%), Go (14.54%), Rust (14.09%) and Node.js (11.9%) round out the top six most wanted programming languages.

“Rust is the “most loved” language for the sixth straight year, and Python was the “most wanted” for the fifth straight year. Though it’s not as “new” as Rust, Python is easy to learn and applicable across industries. It’s one of the most widely implemented languages, and programs tend to be clear and readable,” said Khalid El Khatib, SVP of marketing communications at Stack Overflow.

Top paying programming languages

A section of the report ranks programming languages by their correlating developer salary. To determine this figure, the survey asked respondents to list their total compensation. Clojure topped the list at $95,000 nearly $14,000 higher than runner-up F# ($81,037). Elixir and Erlang both garnered the same pay ($80,077) followed by Perl and Ruby, with both also earning the same pay ($80,000). On the economic flip side, Dart sat at the bottom of the list at $32,986, just a few grand below PHP ($38,916).

Programming Languages that you must learn [part 2]

[By Bhoomika Saini]

Photo by Karolina Grabowska on Pexels.com

If you’re new to the field of software development, the toughest part of learning programming is deciding where to begin. There are hundreds of programming languages in widespread use, each with its own complexities and idiosyncrasies. As you begin your journey as a software developer, you’ll start to discover which programming language will be most suitable for you, your interests, and your career goals.

When deciding which programming language to learn, it’s important not to get caught up in flashy trends and popularity contests. The best programming languages to learn in 2021 are likely the same ones that were best to learn in 2017 and 2018, and that will continue to be true for the next several years as well.

Although the field of computer programming changes rapidly, the languages that we’ve discussed above have a great deal of staying power. By learning one or more of these languages, you’ll be in an excellent position not only for this year but in the years to come.

In the list below, we go over the best and most in-demand programming languages for many of the most common use cases including web development, mobile development, game development, and more.

Scala

If you’re familiar with Java—a classic programming language in its own right—it’s worth checking out its modern cousin, Scala. Scala combines the best features of Java (such as its Object-Oriented Structure and its lightning-fast JVM runtime environment) with a modern twist.

As a functional programming language, Scala allows engineers to elevate the quality of their code to resemble pure math. Scala allows for concurrent programming, allowing complex procedures to be executed in parallel. Furthermore, it is a strongly typed language. Engineers can create and customize their own data types, allowing them to have the peace of mind knowing entire swaths of bugs are impossible at runtime.

Elm

One of the youngest languages on our list, what began as a Harvard student’s thesis has now grown to become a point of passion for front-end developers around the world.

Elm compiles to JavaScript, making it ideal for building fast-executing UIs with zero errors at runtime. Elm is a functional programming language, allowing developers to create client-side interfaces without the declarative trappings of HTML and CSS.

Ruby

Ruby is another scripting language that’s commonly used for web development. In particular, it’s used as the basis for the popular Ruby on Rails web application framework.

Beginners often gravitate toward Ruby because it has a reputation for having one of the friendliest and most helpful user communities. The Ruby community even has an unofficial saying, “Matz is nice and so we are nice,” encouraging members to model their kind and considerate behavior on Ruby’s chief inventor Yukihiro Matsumoto.

In addition to the active community and its straightforward syntax, Ruby is also a good language to pick up thanks to its association with great tech businesses. Twitter, Airbnb, Bloomberg, Shopify, and countless other startups have all built their websites using Ruby on Rails at some point.

C#

Like C++, C# (pronounced C Sharp) is a general-purpose, object-oriented language built on the foundations of C. It was originally designed by Microsoft as part of its .NET framework for building Windows applications.

C# uses a syntax that’s similar to other C-derived languages such as C++, so it’s easy to pick up if you’re coming from another language in the C family. C# is not only the go-to for Microsoft app development, but it’s also the language mobile developers use to build cross-platform apps on the Xamarin platform.

Additionally, anyone who is interested in VR development should consider learning C#. C# is the recommended language for building 3D and 2D video games using the popular Unity game engine, which produces one-third of the top games on the market.

HTML

What this language is used for: 

  • Web documents 
  • Website development 
  • Website maintenance

HTML stands for Hypertext Markup Language. Don’t let the complicated-sounding name fool you, though; HTML is one of the most accessible stepping stones into the world of programming. 

Technically, HTML is a markup language, which means that it is responsible for formatting the appearance of information on a website. Essentially, HTML is used to describe web pages with ordinary text. It doesn’t have the same functionality as other programming languages in this list and is limited to creating and structuring text on a site. Sections, headings, links and paragraphs are all part of the HTML domain. 

Rust

Rust is a bit of an upstart among the other languages on this list, but that doesn’t mean it’s not a valuable language to learn. Stack Overflow’s 2020 Developer Survey found that Rust was the most loved programming language among developers for the fifth year in a row, with 86.1 percent of Rust developers saying that they want to continue working with it.

Developed by the Mozilla Corporation, Rust, like C and C++, is intended primarily for low-level systems programming. What Rust adds to the mix, however, is an emphasis on speed and security. Rust emphasizes writing “safe code” by preventing programs from accessing parts of memory that they shouldn’t, which can cause unexpected behavior and system crashes.

The advantages of Rust mean that other big tech companies, such as Dropbox and Coursera, are already starting to use it internally. While it may be a bit more difficult to master than other beginner languages, Rust programming skills are likely to pay off handsomely, as the language’s popularity will only continue to rise in the near future.

CSS

What this language is used for: 

  • Web documents 
  • Website development 
  • Website design

CSS, or cascading style sheets, is usually applied in conjunction with HTML and governs the site’s appearance. While HTML organizes site text into chunks, CSS is responsible for determining the size, color and position of all page elements.  

CSS is convenient, too; the cascading part of the name means that an applied style will cascade down from parent elements to all children elements across the site. This feature means that once users determine aesthetics for the main parent, they won’t have to manually repeat their code across a website. Moreover, the delegation of site organization to HTML and aesthetics to CSS means that users don’t have to completely rewrite a web page just to change a color. 

CSS is an approachable language that allows beginning programmers to dip their toes in the metaphorical coding pool. If you’re new to coding, there’s no reason not to learn CSS before tackling more complex languages!

Perl

What this language is used for:

  • System administration 
  • GUI development 
  • Network programming

Perl isn’t the most commonly used language on the market. In fact, just 3.1 percent of developers used it in 2020, and it didn’t even make Stack Overflow’s commonly used languages list for 2019. However, we are recommending it for a reason. If you’re already well into your career, learning Perl could significantly boost your earnings potential. 

Developers who know Perl tend to make 54 percent more than the average developer (PDF, 2.4MB). That said, it is worth noting that most of the people who know these are senior developers, who tend to make more at a baseline — thus, attempting to quantify the “bonus” that a programming language provides may be somewhat tricky. That said, learning a language like Perl may still make a junior developer better suited for a promotion or raise. 

The Practical Extraction and Report Language — or Perl, for short — is a scripting language that is commonly used to extract information from a text file and create a report. 

While many programming languages are compiled languages — wherein a target machine translates the program — Perl is an interpreted language, wherein a third “interpreting” machine locates the code and executes a task. Usually, interpreted programs require more CPU, but because Perl is such a concise language, it creates short scripts that can be processed quickly. 

GitHub Copilot

GitHub Copilot is an AI service which suggests line completions and entire function bodies as a programmer types. GitHub Copilot is powered by the Open-AI Codex AI system. It is trained on public Internet text and millions of lines of code that are publicly available on websites like StackOverflow, GeeksforGeeks, and many more. While Copilot might be a major time saver that many people would consider “magic” ,it’s also been met with criticism by other developers, who worry that the tool could violate individual users’ copyrights.

How Copilot works?

GitHub describes Copilot as the AI equivalent of pair-programming, which is a term coined for two developers who work together at a single computer. Pair programming is when one developer write code for the problems stated and the other observes and make changes(debugging). In practice, though, Copilot is more of a time saver, which integrates the resources that developers might otherwise have to look up elsewhere. As users type into Copilot, it will suggest lines/blocks of code to add by just clicking a button. That way, they don’t have to spend time searching through various documentations or looking up sample code on sites like StackOverflow.

GitHub also wants Copilot to get more efficient over time based on the collected data from users. So whenever users accept or reject Copilot’s suggestions, its powerful machine learning model will use that feedback to improve future suggestions. This would make Copilot only better with time

Criticism

Not long after Copilot’s launch, many developers started ranting about the use of public code to train the tool’s AI. The major concern being commercial use of open source code without proper licensing. The major reason why developers are criticizing it is: Microsoft, the company that owns GitHub, has access to all the repositories. Training a machine learning model that uses all the public repositories and charges a subscription fee for others to use it will benefit Microsoft. So what do people who contribute to open-source get in return? The tool could also leak personal details that the developers may have posted publicly.

Microsoft’s Policy

The developers, programmers and the open-source community cannot complain, nor can they sue Microsoft. This is because there are absolutely no rules or regulations on how Microsoft plans to use open-source repositories. Even if the open source community decide to sue Microsoft, that would just mean a new set of rules would be imposed on how open-source software is used

The open-source community has mixed feelings regarding Microsoft’s Policy. Some people think that GitHub Copilot doesn’t work the way it’s advertised. A large portion of what Copilot outputs is already full of copyright/license violations, even without extensions. Some think, the code is still AI generated and not a copy-paste block from some repository, so the production is still the programmer’s responsibility.

Conclusion

It’s true that Microsoft is using the public repositories for their own good, but there are no laws based on which people can sue them. This is why most are moving their code from GitHub. It’s indeed copyright infringement for sure, but it’s going to be a little longer before Copilot will deliver a genuine productivity boost. Right now, the suggested snippets do look very accurate, but when dug beneath the surface and you will find that it doesn’t always do what you expected. Can we really find ourselves working with an AI pair-programmer in the future? As for now, it does look skeptical. But with Copilot, the future doesn’t look so far off.

BEGINNING WITH PROGRAMMING

Programming is one of the most sought after skills in the professional market. It is an nothing more than an interesting way to solve problems. Programming presents you with unique solutions to real world problems and tends to help develop logical thinking. Many people think programming is memorizing statements and words to make a computer do your bidding but let me tell you otherwise. Programming is  using your knowledge to solve problems thrown at you in the most effective way.

Let me nudge you on the right path to starting programming.

What is your goal ?

Programming can be for different tasks like :-

  • solving problems based around management of data
  • solving problems related to math and statistics
  • creating a utility for a specific task
  • creating games
  • automating daily tasks
  • to develop a new skill

There are many more forms that programming could take but focussing on your end goal will help you achieve it quickly and efficiently. Let me elaborate the aforementioned paths.

Solving Problems based around management of data.

To start with these problems you’ll need some knowledge of data structures so I recommend doing a basic course to learn what data structures are. Not only data structures but you may require knowledge of some oop concepts. There is no specific language specifically made for this task but learning C would be the best path to strengthen oop concepts and data structures as C works very closely with the operating system.

Instead of just starting coding you should first pickup a notebook to practice these concepts logically. Building a strong base of algorithms instead of trying to memorize a set of instructions in a particular language is the most important step.

A simple project can then be made to bolster these concepts. Create a data structure like a linked list, heap or any semi-complex data structure in whatever language you choose. Creating a program even to store and retrieve names would be helpful enough to start your journey.

Solving Problems related to maths and statistics.

To start with these problems you’ll require a knowledge of statistical methods and formulas. In these kind of problems generally data can be manipulated and analysed for interpretation as per requirements. The most recommended language for such problems would be R. It is tailored to be able to work with large data sets and has many inbuilt functions to make working with such data easy.

As our teachers stopped us from using calculators when we were younger I would similarly ask you to first try making the functions yourselves before using the in-built functions as knowing how to solve something manually would help you work through issues when automating the tasks.

A simple project can be undertaken to interpret freely available datasets. These datasets when worked upon can give a plethora of information.

Creating a utility for a specific task

This would depend on the type of utility you want to create. In such a situation you’d want to research the utility you want to make and decide for yourself what language you want to use. You’d want to check for the pros and cons of the technology you would want to use. Every language excels at some specific task and we want to be able to use the advantage to the fullest.

A simple project can be undertaken to set as an end goal while starting to learn the language.

Creating Games

This is a vast field with an even bigger community. To be able to make games you need to know some basics like the geometric world space and logic to be able to craft a game. There are quite a few game engines but probably the most recommended game engine for beginners would be Unity. it uses C# as the backend language so picking up basics of the language would be a good place to start.

Unity boasts a node based system for materials and setting up the scene. Many tutorials are available online for free so they would be your biggest reference points. The online community is not just large but helpful too. A lot of new users post questions about all the aspects of the process so don’t be shy to look something up online.

A simple project to be undertaken to make a basic game to imbue the basics of the process into yourself. There are many tutorials that start off from basics and ultimately combine the concepts to create a complete game.

Automating daily tasks

The use of smart home technology is very prominent in todays world and more and more stuff is being connected to the internet for easier use. The use of IOT can help you automate your house. technology like Arduino uses C or C# as their programming languages while raspberry pi uses node.js and python prominently. These technologies can be used to solve actual real world problems.

Smart switches and devices can be programmed to start up on a predefined time or on a set action. Even software tasks like backups can be automated with some simple shell scripting. Now automation of tasks is a 2 pronged path. Physical tasks can be automated using IOT and software based tasks can be automated using some scripting.

A simple project can be undertaken to bolster these concepts. A simple software automation task would be starting a download manager or torrent client and prioritising the downloads on the basis of speed and importance.

To Develop a new skill

Now this is where the learner has the most control. You can choose whatever language you’d like to learn and not limit yourself to a certain technology you could learn whatever you want to.

Depending on the path you would want to take you could choose to learn a language used for application design, web design, work with databases, etc the possibilities are endless. You just have to commit to the learning process and learn the basics which you could implement in any further projects.

Conclusion

No programming language is particularly difficult or easy to learn. Programming languages are nothing but tools and to wield any kind of tools you need to be capable. When your basics are clear you can implement them in any languages you learn.

Web Development

Web development is a method of providing site structure and maintenance and this is work done in the background, intending to keep the site look good, running quickly, and performing well with consistent customer interactions. Web developers use various programming dialects to do this. The dialect used depends on the type of errand. Performance and the stage of their work. Online promotion skills are popular all over the world, and they are well paid, making them an excellent career choice.

This is one of the areas that are easier to open up, and the rewards are more generous because you need not have to struggle with a formal university degree to obtain qualifications. The field of web development is mainly divided into front-end(client-side) and back-end(worker-side).

Comparing Front-End and Back-End Development

The Front-End web developer is responsible for layout, design, and interaction with HTML, CSS, and JavaScript. He takes an idea from the drawing board and implements it. The content you see and use, such as the visual aspects of the website, drop-down menus, and text, is put together by a front-end developer who has written many programs to link and build elements, improve their appearance, and add interactivity. The program runs through the browser. It happened behind the scenes. This is where the data is stored. Without this data, there is no external interface.

The Back-End or the server side of the network consists of the server hosting the website, the application that starts the website, and the database where the website is located. Server-side developers use computer programs to ensure the smooth operation of servers, applications, and databases. Such developers need to analyze the company’s needs and propose effective software solutions. ng uses different server-side languages ​​such as PHP, Ruby, Python and Java.

The Industrial applications

In larger organizations and companies, a Web development team can consist of hundreds of people (Web developers) and follow standard practices such as agile Web development. Small organizations may only need a permanent or contract developer, or assist in the allocation of appropriate positions. As a graphic designer or IT expert. Web development can be collaborative work between departments, rather than the domain of a specific department. Web developer professions are divided into three types: front-end developers, back-end developers, and full-stack developers. Responsible for the actions and images that run in the user’s browser, while the internal developers are responsible for the server.

All of this may seem difficult to understand at first glance, but you don’t need to understand all of them immediately. You will gradually increase your awareness and things will start to click. The good news is that learning to be a developer is easy to get and access. This applies in particular to Open Classrooms.

Is coding an absolute necessity for kids starting from 1st grade?

The world is moving at a fast pace. And adults try their best to match the pace, but often they cannot because such is the development consuming the world. While 25 year olds are still trying to earn a place in this highly competitive salary race, what about 5 year olds? You would have seen many advertisements endorsed by popular celebrities saying that kids should start coding right from age 5. The tender age where they should be chasing a butterfly, they are to sit before computers. And not just learn coding, but also aim to be the stalwart that companies should be hounding after.

The biggest scam

Coding is an integral part of the digital world and of course, everything is done with the help of it. But that alone is not enough to incentivize parents into signing up their 5 and 6 year olds to coding classes. These ‘education’ platforms supposedly charge a hefty amount from parents just by some flashy marketing and advertising. You would’ve come across ads where a company allegedly claims that a 2nd grader bagged a 1.2-150 crore job from Google. It is definitely hard to believe(it has been proved that the claims are bogus) and at the same time, saddening that kids are now forced to enter the salary race.

Why coding isn’t the only thing in picture

child in front of laptop

The deeper unsettling fact is that parents are put up in such a situation where they feel bad for not signing up their kids. Think about what any parent would do if they hear that any child has the capability to design an app and can bag a place in top firms. They will readily sign up their kids, thinking they are going to secure their child’s life. But, what they don’t know is that, there is time. 1st grade or even 8th grade is not the age for children to learn the fundamentals of a for loop construct. It is the age where they are to learn the world, the surroundings, and their presence.

It is when languages should be given importance to. No, not programming languages, but the languages which lets them express their opinion to the world and which lets them explore the richness of their culture. It is when social and democratic sciences should be learnt, letting them know about their ancestral world.

It is also when values and ethics should be imparted into them, not by texts, but by making them experience it in a situation where it is put into test. While there is so much to learn about, forcing them to create a video game application not only burdens them with unnecessary information, but it also limits their creativity by directing it into one field only.

A note to parents

One thing parents must hardwire into their mind is that, coding alone cannot land you a job in Google or Microsoft. It is just another tool to put an idea into implementation. By introducing kids to coding at an early age, the ‘idea’ part gets subdued. There is no particular age to start coding. It is a gradual process.

We may not be aware, but every individual is already coding, no matter their knowledge in computer science. The literal meaning of coding is: to use a particular system for identifying things. As kids, as adults we already incorporate it in daily life when a kid arranges his play blocks in a certain manner or when adults have a particular system of doing their chores.

creativity
Let children explore their creativity. Source: Deposit Photos

Hence everyone can code if they have the interest to do so. The reason kids shouldn’t be obliged to learn coding at an early age is to allow them to have the time to identify their interests. So as parents, the least you can do is by providing them that right. The right to choose things that delight them. The right to choose it for themselves instead of pushing it down their throats at an age where they don’t even recognize it. Do not let falsified ads ruin childhood. Let them decide for themselves who they want to be. Until then, enjoy their transition. Because they are going to be kids only once.

You have a lifetime to work. But children are only young once.

5 coding languages every beginner should learn

There are many different type of programming languages available in today’s technology-driven world, making it quite daunting to opt for one which suits you and can help you get the best result possible from a future perspective. Many professionals have a hard time picking a suitable language for a particular task or project.

Moreover, The beginners or newbie programmers lack the guidance and exposure which makes it more challenging to decide how and where to build a successful career in the programming world.

Most Suitable Programming Language for the beginners are?

To find out the best and worthy programming language, to begin with, one must first know the purpose of learning a programming language.

For instance, if one has a keen interest in the technologies like Artificial Intelligence and Machine Learning, then he/she can opt for language like python which is most suited, or if one is trying to enter into the competitive programming world, he/she can opt for C++.

There are many other things which should be properly analyzed like popularity, market demand, job prospects, efficiency, compatibility, applications, etc. before picking a language.

Some top programming languages which can be pursued without giving a second thought

  1. Python

Python, is one of the most commonly used and recommended language for the beginners in recent years, because it has a easy syntax and a wide range of applications which makes it suitable for high-level programming and easy code readability.

It offers some remarkable features such as extensive support modules and community development, open-source nature, ability to scale complex applications, etc., that makes it easy for beginners to understand.

Several renowned platforms like YouTube, Instagram, Quora, and Pinterest, use Python.

2. C/C++

It is highly recommended that the beginners start with lower-level programming languages so that they can easily start their programming journey without any hassle.

C is a procedural programming language that was basically developed as a system programming language to write operating system and develop major platforms like Microsoft Windows, Linux, etc.

Moreover, C/C++ allows beginners to understand many underlying mechanisms on the ground level and more complicated topics easily.

3. JAVA

From the invention, JAVA has always been one of the most demanding languages in the tech world. It follows on the principle of ‘Write Once Run Anywhere’ of the language which makes it most preferable by the developers.

This is a language which provides several other prominent features, such as automatic memory allocation, multithreading, platform-independent, etc. Though the language is little harder than some other languages like python, etc. but if you are interested in developing android applications or enterprise software, you can opt for this language without giving a second thought.

Furthermore, JAVA is being used by various renowned platforms such as Google, Amazon, Twitter, etc

4. JavaScript

JavaScript is a relevant and worthwhile language for beginners as it can be used in a wide range of applications, is also compatible with various other languages, and is comparatively much easier from various other languages.

In JavaScript there are various frameworks and libraries available such as Angular, React, Vue, etc.

Besides, numerous IT companies such as Google, Facebook, Gmail, etc. also like to rely on JavaScript.

5. Kotlin

If someone new is trying to learn a programming language to develop Android development. In fact, Google has officially announced Kotlin as the first choice for App development.

Moreover, the language offers several outstanding features such as statically-typed, concise, and secure, and many more.

Despite being the new programming language Kotlin is still used by renowned organizations like Pinterest, Basecamp, etc. are using the language for their respective platforms.

HOW TO LEARN CODING AND TIPS TO LEARN IT FASTER

With the resources present on the web , it’s very easy to urge started with programming. If you’ve got a laptop/desktop and a reliable Internet connection, you’ll start your coding journey immediately . Follow this roadmap to begin without any confusion.

Object Oriented Programming Language( OOP )
Start your coding journey with an OOP Language like C++. Learn the nitty gritties of it and master the important libraries such as STL. For a detailed strategy to learn C++, check this article. It is equally important to solve different programming problems. This tests if you’ll actually convert an algorithm into working code. Hackerrank is a good source for covering the basics and solving challenging problems.

Mastering Data Structures and Algorithms
You should develop the ability to tackle different programming questions by implementing the correct algorithm. This is also crucial for software developer roles, as every company tests the knowledge of algorithms and data structures. Competitive programming websites such as Codechef, Codeforces are some of the recommended sources to begin with.

Building Software
Start developing your own applications. Simple projects like web scrapers, document searchers are an honest start line . Learn Python which may be used for developing several web applications. You can also start learning android and web development. You can also build your own portfolio after this.

Delve Deeper
Software engineering is a huge field. Increase the complexity of projects gradually such as using the web scraper to fetch data from a website and adding classification by using ML. You can try to build applications powered by databases( apps such as Quora or a small social network application that can group users by their common interests and engage them accordingly. )

Specialized Skills
Try to gain skills which can be leveraged massively. Start with Machine Learning from Andrew Ng’s Coursera course. Join Kaggle and participate within the ir contests in order that you’ll understand the implementation of ML in the world . Often the practical use of different ML algorithms is more essential than understanding the theory fully. You can also explore areas such as Cryptography, Network Security depending on your interests.

IMPORTANT TIPS TO LEARN CODING FASTER
When learning how to code, it is important to know the right way to learn. Otherwise even after spending a huge amount of your time , it can happen that you simply aren’t actually good in coding and there are gaps in your learning.

  1. Practice coding
    Only seeing tutorials for coding would not help. Often students are satisfied in watching videos and that they feel that the training is over. This is not how it works in real world and is certainly not coding. Unless you are stuck at problems, you do not know your weaknesses. Writing code is the deal. And you have to get things executed. Practice problems from sites like Hackerrank to urge started. There are elaborate editorials for problems and you’ll understand from there if you’re stuck.
    For running Python programs, you’ll also use Google Colaboratory. You have the power of Google data centres at your disposition and there is no additional need to install anything else. The notebooks are present in the Google Drive connected to your account. Try Google Colaboratory.
  2. Googling
    Google things on how to do it. Stackoverflow has many solutions to very frequently occurring errors. There are blog posts available for it. Use the main keywords and not unnecessary grammar. Googling in itself is a great skill. You need not remember each and each syntax of each programing language . Be smart to take the help of the resources.
  3. Patience
    Writing code by yourself by following the logic requires patience and it’s okay to struggle initially . You can understand the essential syntax of a language at one go but that’s not enough. For understanding the subtleties within the various problems, you would like to spend longer time with the precise questions. If you’re stuck in writing a program, follow the 2nd step, read the code, the relevant material and execute step 1. Once you recognize the way to do these stuff, you’ll be learning things quickly.