C# Archives - Simple Programmer https://simpleprogrammer.com/category/c/ Wed, 11 Mar 2026 01:50:38 +0000 en-US hourly 1 https://wordpress.org/?v=7.0 C vs. Java: The 10 Key Differences https://simpleprogrammer.com/c-vs-java-10-key-differences/ Wed, 23 Mar 2022 14:00:08 +0000 https://simpleprogrammer.com/?p=40679 Both Java and C are powering some of the most robust enterprise platforms on the market. They have similar support, OOP, and syntax. This might have made you wonder which one is better—Java or C? Perhaps, the answer depends on your purpose of learning, as you are about to choose between the two oldest programming...

The post C vs. Java: The 10 Key Differences appeared first on Simple Programmer.

]]>
Both Java and C are powering some of the most robust enterprise platforms on the market. They have similar support, OOP, and syntax. This might have made you wonder which one is better—Java or C?

Perhaps, the answer depends on your purpose of learning, as you are about to choose between the two oldest programming languages still in mainstream use.

However, despite the similarities mentioned above, the truth is that Java and C are worlds apart. In this post, I’ll show you the key differences between them so that you can know what to expect from each.

The 10 Key Differences Between C and Java Programming Languages

C programming language is a general-purpose, procedural programming language that supports structured programming, recursion, and lexical variable scope with a static type system. At present, it’s the most famous and fundamental language. Dennis Ritchie developed it at the Bell Lab in 1970.

On the other hand, Java is an object-oriented, interpreted, high-level language designed by James Gosling. Java is famous for its platform independence behavior and other uses like desktop computing, mobile app development, games, and numerical computing. As a result, it’s one of the most influential programming languages of this time.

With these in mind, let’s now take a closer look at their key differences.

Architecture

C Programming Language is mid-level and combines both machine and high-level language. Since it is compiled, it converts code into machine language. Moreover, C is procedure-oriented and follows a top-down approach.

On the other hand, Java is a high-level, object-oriented programming language that transforms the code into machine language using a compiler or interpreter. In Java, codes transform into bytecode first, and then a virtual machine executes the bytecode. Thus, Java is an interpreted language, and Java follows the bottom-up approach.

Memory Management

C supports user-based memory management, while Java uses a garbage collector.

Java has automatic memory management functionality. When a program executes, it uses the memory in various ways. For example, objects live in the “Heap” part of the memory, which is involved in garbage collection. This assures that the heap has free space; it finds and deletes the object that can’t reach it.

In addition, JVM (Java Virtual Machine) checks the size when it allocates any object. JVM mainly differentiates between large and small sizes, but this differentiation also depends on the JVM version, garbage collector, etc.

On the other hand, C programming has numerous memory allocation and management functions. The function is located in the header file <stdlib.h>. The function void calloc allocates the array of number elements, void free releases the blocks, void malloc allocates the array and leaves them uninitialized, and lastly, void realloc re-allocates memory, extending it up to a new size.

Paradigms

There have been different opinions on designing a programming language since the beginning of software development. As a result, each language has significant rules, concepts, and principles—called programming paradigms.

Both Java and C are multi-paradigms. For example, C is a procedural, structured, and imperative programming language. On the other hand, Java is an object-oriented, generic, imperative, and functional programming language.

If you build an application and want it to be fast, you can choose C. But, you should go with Java if you wish to have portability with a similar amount of speed.

Variable Declaration

C declares variables at the top of a block, but Java can declare anywhere. Again, C uses a free() variable to free up any variable, allowing deallocation of the memory block, and Java uses a garbage collector compiler.

After declaring a variable, Java sets bits in memory for that data type and allocates the name. Therefore, Java needs to declare the data type for further use and representation.

In the C programming language, you should declare a variable before its use. Unlike Java, C doesn’t allocate memory while declaring variables. Notably, the C language has three types of variables: Local, Global, and Static. In addition, Java doesn’t require pointer syntax, while C explicitly handles pointers.

C Variable Declaration:

#include <stdio.h>

void function()
{
int x = 10; // local variable
}

int main()
{
function();
}

Java Variable Declaration: 

String name = “Alena”;
System.out.println(name);

Functions

A group of statements that perform together is a Function. In C programming, it’s called Function, while in Java, Functions are known as Methods.

The Java method is a code called by its name, but it’s associated with any object. You can pass parameters to methods and get some return value from them, but they will always be associated with some objects. Java supports exception handling.

In comparison, a function in C is just a piece of code that you can call anytime by its name and pass parameters to. You can also get the result from any function. The C standard library has various built-in functions like main(), strcat(), memcpy(), etc. C doesn’t support exception handling, for which it often has issues with program flow maintenance. Java supports method overloading, while C doesn’t support it.

Function declaration in C:

return_type function_name( parameter list ) {
body of the function
}

Method declaration in Java:

returnType methodName() {
// method body
}

Speed

The speed efficiency of a language depends on its usage. Primarily, the C language is developed for machine preference, so the code directly goes into the machines.

On the other hand, Java requires a Virtual Machine to transform bite codes into machine language and then deliver it to the machine. It adds an extra process and time. So, in that case, C is faster than Java.

Java is faster than C at runtime in only a few rare use cases because of its memory allocation. Java allocates the heaps separately, providing flexibility on data structure and automated garbage collection, which is above the level compared to C.

Security

In the case of security, memory corruption is the biggest category of high-security factors. Unfortunately, Java doesn’t have any analog rules because of its type system that prevents memory corruption—which becomes harder in C.

Both C and Java have some rules in privilege escalations. However, while Java has an internal privilege system, C doesn’t support it. As a result, you get static data hiding in C and private data hiding in Java.

If you choose between Java and C for a plugin inside a web browser, you should pick Java because Java often releases a vast number of security patches at a time.

Object Management

C offers manual object management while Java has automatic. C operators can manually create and destroy objects. On the other hand, Java largely depends on the garbage collection process for this job, and it takes some time to collect. But you cannot afford the risk of accidentally doing memory management in Java during a critical section.

Compilation

As you already know, C is a compiled programming language, and Java is interpreted. Likewise, C directly converts codes into machine language, while Java transforms codes into bytecode first, then converts this bytecode into machine language. Therefore, compiled languages tend to be faster than interpreted languages, though their platform dependency is questionable.

Learning Curve

The learning curve of a new language depends on the previous programming experience of the learner. If you are starting fresh, C should be the more straightforward language, as it has fewer concepts to learn, so you can catch the idea quite quickly and in a short time.

On the other hand, as an OOP, Java offers numerous features and can require a longer period to get your hands on all functionalities.

C vs. Java: Which One to Choose First?

It’s wise to start learning an early language because the current languages are based on early language syntaxes. Likewise, Java has derived its syntax and several features from C and C++.

As C programming has fewer features, less complexity to learn, and is less prone to errors, it’s wise to get your hands on C programming first. Then, later on, you can move to learning Java and other languages like C++, C#, Objective-C, or Python.

Learning C, you would have to learn more programming as you deal with the lower-level language of computer science and software development. Being object-oriented programming, Java is widely used for developing projects and other programming paradigms. It is also one of the highest-paying programming languages in the current world. Therefore, ultimately, you should choose the one that suits you.

 

The post C vs. Java: The 10 Key Differences appeared first on Simple Programmer.

]]>
The 15 Most Popular App Development Programming Languages for 2022 https://simpleprogrammer.com/popular-app-development-languages-2022/ Wed, 26 Jan 2022 15:00:55 +0000 https://simpleprogrammer.com/?p=40424 A mobile application—also referred to as a mobile app or simply an app—is a computer program or software application designed to run on a mobile device such as a phone, tablet, or watch. Apps were originally intended for productivity assistance, such as email, calendar, and contact databases, but the public demand for apps caused rapid...

The post The 15 Most Popular App Development Programming Languages for 2022 appeared first on Simple Programmer.

]]>
popular app development languagesA mobile application—also referred to as a mobile app or simply an app—is a computer program or software application designed to run on a mobile device such as a phone, tablet, or watch.

Apps were originally intended for productivity assistance, such as email, calendar, and contact databases, but the public demand for apps caused rapid expansion into other areas such as mobile games, factory automation, GPS and location-based services, order-tracking, and ticket purchases. As a result, there are now millions of apps available.

Apps are generally downloaded from application distribution platforms operated by the owner of the mobile operating system, such as the App Store (iOS) or the Google Play Store. Some apps are free, while others have a price, with the profit being split between the application’s creator and the distribution platform.

Mobile applications often stand in contrast to desktop applications, which are designed to run on desktop computers, and web applications, which run in mobile web browsers rather than directly on the mobile device.

So what does the future bring for mobile apps? More importantly for a software developer, what programming languages are expected to be the most popular for mobile app development in 2022 and beyond? That’s what you’re about to find out!

The Most Popular Languages for Mobile App Development

With the above in mind, let’s walk through the best programming languages for mobile app development in 2022.

Python

Python has been used in web development services for almost 30 years. It’s one of the most dynamically growing and best coding languages for web development.

Python is a high-level dynamically typed programming language that focuses on robust and rapid development, with a versatility that makes it quite suitable for web development or data science. Here are a few pros and cons of using Python programming language for your application:

Pros

  • Versatile, fast to develop, and easy to use
  • You can do more with less code
  • Vast variety of libraries

Cons

  • Not native to mobile environment
  • Slower than other programming languages
  • Memory consumption is very high

Swift

Swift is a new programming language for iOS and OS X that builds on the best of C and Objective-C, yet without the constraints of C compatibility. Swift is one of the few app development languages that adopt safe programming patterns and add modern features to make programming easier, more flexible, and more fun.

Swift’s clean slate, backed by the mature and much loved Cocoa and Cocoa Touch frameworks, is an opportunity to reimagine how mobile app development works.

Pros

  • Rapid development process
  • Improved safety and performance
  • Speed and scalability of the application

Cons

  • Limited pool of talent
  • Lack of support for earlier iOS versions
  • Language is still young

JavaScript

popular app development languagesInvented in 1995 at Netscape corporation, JavaScript is a programming language used in HTML pages. JavaScript programs run by an interpreter built into the user’s web browser.

For the purposes of mobile apps, one should mention React Native, an open-source JavaScript framework designed for building apps on multiple platforms like iOS, Android, and also web applications, utilizing the very same code base.

React Native is based on React, and it brings all its glory to mobile app development. There is nothing better than JavaScript to build an app. In simple words, JavaScript is an interpreted, lightweight language designed for creating network-centric applications. As it is integrated with HTML, it is easy to implement. Moreover, It is advised to develop an app by following the proper guide on React Native , as it can help in building apps across the Android and iOS platforms without any hassle.

Pros

  • Turns the real DOM into a virtual DOM
  • Rich Interface and extended functionality
  • Capable for frontend, as well as backend, development

Cons

  • Requires a JavaScript-enabled browser
  • Lack of debugging facility
  • Supports single inheritance and not multiple inheritance

SQL

SQL is a standardized computer language, currently considered one of the best programming languages. It was originally developed by IBM for querying, altering, and defining relational databases using declarative statements.

Developers can become masters in SQL development. SQL, also known as Structured Query language, is a database computer language designed for managing data in relational database management systems (RDBMS). It can execute queries against a database and retrieve data from a database.

Pros

  • Easy to manage with no code
  • Well defined standards and multiple data views
  • Portable and interactive language

Cons

  • Complex interface, difficult to scale
  • Partial control and requires specialized personnel
  • Problematic in rapid dev environments

Rust

Rust is a programming language that’s focused on safety, speed, and concurrency. Its design lets you create programs that have the performance and control of a low-level language, but with the powerful abstractions of a high-level language.

These properties make Rust suitable for programmers who have experience in languages like C who are looking for a safer alternative as well as those from languages like Python who are looking for ways to write code that performs better without sacrificing expressiveness.

Pros

  • Strong community support
  • Strong support of generics with guaranteed safety
  • Saves time in testing and debugging

Cons

  • Slow in compiling
  • Programming language is complex
  • Lacks efficient garbage collection

Scala

Scala smoothly integrates object-oriented and functional programming. It is designed to express common programming patterns in a concise, elegant, and typesafe way.

Scala introduces several innovative language constructs, such as a flexible syntax and type system that enables the construction of advanced libraries as well as new domain-specific languages. Moreover, Scala is compatible with Java, allowing the use of Java libraries and frameworks without glue code or additional declarations.

Pros

  • Built in control structures
  • Great IDE support
  • Scalable and highly functional

Cons

  • Limited developer pool
  • No true tail-recursive optimization
  • Makes type information hard to understand

Ruby

Ruby is a dynamic programming language with a complex but expressive grammar and a core class library with a rich and powerful API. Ruby draws inspiration from Lisp, Smalltalk, and Perl but uses a grammar that is easy for C and Java programmers to learn.

Though a pure object-oriented language, Ruby is also suitable for procedural and functional programming styles. It includes powerful meta programming capabilities and can be used to create domain-specific languages or DSLs.

Pros

  • Open-source and 100% free
  • Vibrant ruby on rails community
  • High velocity of prototyping

 Cons

  • Slower runtime speed
  • Lack of flexibility
  • Higher costs

C++

C++ is used by countless developers in essentially every application domain. It was developed from the C programming language and, with few exceptions, retains C as a subset.

C++’s greatest strength is its ability to be used effectively for applications that require work in a variety of application areas. It is quite common to find an application that involves local and wide-area networking, numerics, graphics, user interaction, and database access.

Pros

  • Platform independence and portability
  • Multi-paradigm language
  • Scalable and compatible with C

Cons

  • No garbage collector
  • Doesn’t support built-in threads
  • Lack of security

C#

C# is a general purpose, type-safe programming language. The goal of the language is programmer productivity. To this end, C# balances simplicity, expressiveness, and performance.

The C# language is platform-neutral and works with a range of platform-specific compilers and frameworks, most notably the Microsoft .NET framework for Windows. It is a rich implementation of the object orientation paradigm that includes encapsulation, inheritance, and polymorphism.

Pros

  • Boolean conditions and standard library
  • Automatic garbage collection
  • Easy to write code

Cons

  • Lack of independent compiler
  • Not suitable for low-level things
  • Poor platform GUI

PHP

PHP started out as a small open-source project that evolved as more and more people found out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994. PHP is a recursive acronym for “PHP: Hypertext Preprocessor.” It is a server-side scripting language that is embedded in HTML.

It is used to manage dynamic content, databases and session tracking and even build entire e-commerce sites. PHP is integrated with a number of popular databases, including MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server.

Pros

  • Powerful support library
  • Built-in database
  • Cost-efficient

Cons

  • Tough to manage
  • Prone to handling errors
  • Not secure

HTML5

popular app development languagesHTML5 stands for Hypertext Markup Language version 5. It was published by the World Wide Web Consortium (W3C) in October 2014 as one of the best coding languages for app development. It is the most recent version of the language or code that explains web pages.

HTML5 was created to enable various characteristics that present-day websites need. It is simple to adopt, as there are no major alterations to the programming version of HTML. Debugging and tweaking the code is easier, and it greatly facilitates search engine optimization (SEO).

Pros

  • Complete UI and grid system
  • Most friendly search engine
  • Easy to use and learn

Cons

  • Unnecessary coding required
  • Additional customization
  • Insufficient for dynamic pages

Kotlin

Kotlin is a modern, statically typed, Android-compatible language that fixes many Java problems, such as null pointer exceptions or excessive code verbosity. Kotlin takes application development to a whole new level by improving code quality and safety, boosting developer performance.

Kotlin is designed to seamlessly work side by side with Java as a cross-language project. The existing ecosystem of Java libraries and frameworks works with Kotlin without any performance penalties.

Pros

  • Clear and compact codebase
  • Merges procedural and functional programming
  • Maximized productivity

Cons

  • Slow compilation speed
  • Smaller pool of talent
  • Limited learning sources

Flutter

Flutter is developed using Dart and contains a unique technology stack that sets it apart from its competitors. The Dart language is present at the core of the Flutter app development.

A modern framework such as Flutter requires a high-level modern language to be capable of providing the best experience to the developer, making it possible to create robust mobile applications. Dart aims to aggregate the benefits of most of the high-level languages with mature language features, including productive tooling, type annotations, and garbage collection.

Pros

  • Customized widgets
  • Allows instant updates
  • High performance and hot reload

Cons

  • No third-party libraries
  • Not supported by web browsers
  • Limited resources

Go

Go was built by Robert Griesemer, Rob Pike, and Ken Thompson, all at Google, and was announced in November 2009. The goals of the language and its accompanying tools were to be expressive, efficient in both compilation and execution, and effective in writing reliable and robust programs.

Go bears a surface similarity to C and, like C, is a tool for professional programmers, achieving maximum effect with minimum means. But it is much more than an updated version of C, with a unique approach to data abstraction and object-oriented programming that is unusually flexible.

Pros

  • Easy deployment
  • Ability to optimize code efficiently
  • Static code analysis

Cons

  • Defective dependency management
  • Automation inviting errors
  • Internal inconsistencies

Objective C

The Objective-C language is a simple computer language designed to enable sophisticated object-oriented programming. This approach makes programs more intuitive to design, faster to develop, more amenable to modifications, and easier to understand. It leads not only to alternative ways of constructing programs but also to alternative ways of conceiving the programming task.

The Objective-C language was chosen for the Cocoa framework because of its dynamic nature. Its syntax is small, unambiguous and easy to learn and promotes best code for apps.

Pros

  • Portable and structured programming language
  • Reusability; write once and use it multiple times
  • Data redundancy and inheritance

Cons

  • Insufficient memory management
  • Run time checking
  • Absence of exception handling

Programming Language Are Constantly Evolving

The type of software you want is one primary consideration you’ll need to make for which programming languages to choose.

For instance, web-based startups are more likely to be programming in Python and JavaScript. Larger companies tend to develop their internal software applications using C# or Java and their Web applications using PHP. Embedded devices, such as those in the automotive and health care industries, run software written in C, C++, or Rust.

The repertoire of programming languages is constantly evolving. If you consider the list of factors, pros, and cons as I showed you above, you’ll be able to sensibly choose the best coding language for your app development.

The post The 15 Most Popular App Development Programming Languages for 2022 appeared first on Simple Programmer.

]]>
Deep Learning: The Absolute Minimum an Interested Developer Should Know https://simpleprogrammer.com/minimum-guide-deep-learning/ Wed, 13 Jan 2021 15:00:16 +0000 https://simpleprogrammer.com/?p=38061 Deep learning is all hype these days. Learn some of the basics you'll need to know before jumping into the world of DL and programming.

The post Deep Learning: The Absolute Minimum an Interested Developer Should Know appeared first on Simple Programmer.

]]>

minimum deep learningIf you are a developer and have been reading articles and posts on deep learning, you must be intrigued by how the industry is progressing.

For those of you who haven’t heard, deep learning is a machine learning (ML) technique that teaches systems to perform tasks that come naturally to humans. It is the key technology behind the voice control options in hands-free speakers, TVs, tablets, and smartphones, and it is key to developing driverless cars.

For a developer looking to switch fields or niche, deep learning brings in a lot of opportunities. However, how to get started is still a big question if you want to make a mark in the industry.

In this post, you will learn about the rapid growth of deep learning, why the traditional approach to teaching deep learning will not work for you, and how you can really get started as an interested developer

How has Deep Learning Attained Impressive Results in Such a Short Time Span?

The shortest answer to this question is ‘accuracy.’ Deep learning executes recognition accuracy at higher levels, helping consumer electronics meet user expectations. Accuracy is essential for safety-critical use cases like driverless automobiles.

With constant technological advancements, deep learning has improved to the point that it is outperforming humans in tasks like categorizing objects in images.

This is what makes it a hot topic among developers. However, its application is quite difficult because it doesn’t include your standard coding. It includes data as well. So, you will be circling between large amounts of labeled data and substantial computing power.

Deep learning applications are changing the course of how we perform certain tasks—from automated driving to medical devices, aerospace and research, and more.

Traditional Answer to “How to Get Started in Deep Learning?”

Most developers looking to explore the deep learning niche leave it halfway because it starts with definition and transits to concepts of algorithms and mathematical descriptions, which only increase complexity.

While mathematical descriptions, concepts of algorithms, and definitions are concise, clear, and often straightforward, they are dull, dry, and require a prerequisite mathematical background to parse and interpret.

This is the primary reason why you only get to study machine learning and its stages as a graduate-level subject in colleges and universities. It is because the topic only requires you to have the basic principles cleared. With that said, to start a career in deep learning as a developer, it is advisable that you have a good understanding of:

  • Calculus
  • Multivariate Statistics
  • Linear Algebra
  • Probability
  • Statistics

It can get a little worse when you explore exotic algorithms because their approach to deep learning is pervasive.

YouTube videos and online courses follow the university approach to teaching deep learning. Since it is related to data science, you have a better opportunity to find what you need at platforms like SDSclub. It can help you learn more about coding with deep learning. It is a unique community designed to empower tech enthusiasts.

Traditional approaches to learning aren’t going to benefit developers because they are rigorous. Suppose you are a developer who has picked up languages from here and there and is now learning to develop standalone applications.

You tell your teachers about it, and they advise you that you should complete your degree first in computer science before you can become a programmer. You start college and are exposed to discrete mathematics, calculus, and esoteric algebra. You realize that you are using antiquated programming languages. And slowly, your passion for developing computer applications wavers.

Maybe you made it to the other side but realize that you weren’t taught a single thing about modern coding and software development practices, tooling, languages, and other things that you can use to become a developer practicing machine learning.

So what does this mean? Would a budding developer who wants to explore deep learning be required to go to an extent where they spend a bunch of years and hundreds and thousands of dollars studying higher degrees and math?

Well, the answer is no.

What is the Better Approach?

There will be a lot to code. So, the better approach is to understand the changing industry needs and shape yourself accordingly.

According to GitHub, an online code repository, there are about 10 extremely popular programming languages that are used in machine and deep learning. They include:

  • Python
  • C++
  • JavaScript
  • Java
  • C#
  • Julia
  • R
  • Shell
  • TypeScript
  • Scala

minimum deep learningSome of the names included in this list might surprise you, but they are changing the course of how deep learning is implemented in real-life things.

It is not that you should master all the languages. If you know Python, you can work on developing your skills in programming Python codes. It would be better if you try your hands at one more language that goes hand-in-hand with Python.

Once you know the right programming languages and tooling, you can easily blast a problem with deep learning codes and algorithms. However, you will need to form a systematic process for repeatable results, like:

  • A process that is constant to the specific tools, fad algorithms, and programming languages. It takes no time for a tool to get outdated, but the process you use must be adaptive.
  • Work on developing a process that assures ‘positive’ results.
  • The process you choose must be ‘step-by-step’ so that you and the whole team working with you know what is next. Your team would not want to completely rely on you for codes. And not knowing what the next step is is a project killer.
  • You need a process that allows you to see it from a problem specification and guide you from end-to-end.

Learn the Basics Before You Start

Deep learning is all hype these days.

As a developer, it must be tempting to explore the whole new world of programming and coding where machines are involved.

But, before you start, it is vital that you get your basics cleared, particularly in mathematics, because coding and knowledge of programming languages are not the only things it requires.

The post Deep Learning: The Absolute Minimum an Interested Developer Should Know appeared first on Simple Programmer.

]]>
The Major Programming Languages of 2016 https://simpleprogrammer.com/major-programming-languages-of-2016/ Mon, 21 Nov 2016 15:00:17 +0000 https://simpleprogrammer.com/?p=18588 Often, new developers think it’s important to know a large number of programming languages—but it’s not. While I don’t think it’s important to be an expert in every language that exists, I do think it’s very useful to be aware of the major programming languages and their differences, so you can have a good idea...

The post The Major Programming Languages of 2016 appeared first on Simple Programmer.

]]>
Often, new developers think it’s important to know a large number of programming languages—but it’s not.

While I don’t think it’s important to be an expert in every language that exists, I do think it’s very useful to be aware of the major programming languages and their differences, so you can have a good idea of what tool to use for the job.

In this chapter, I’m going to give you a fairly biased look at what I consider to be the major programming languages you are likely to encounter and should be familiar with.

I know plenty of people will disagree with me, but my opinion on programming languages comes from my experiences using them.

I do believe that even if you don’t completely agree with my choices of programming languages and my descriptions of them, you’ll also find that most experienced developers would at least agree with 75 percent of what I am going to say here.

In the software development world—as you may know already—75 percent confidence in something is pretty dang high.

Also, you’ll notice there aren’t programming languages like COBOL, Ada, Fortran, etc. on this list because, even though some people might argue that they are major programming languages, you don’t see them around that often, so I don’t think they are worth talking about here.

If you want a full list of programming languages, check out this one on Wikipedia.

C

C, originally created at Bell Labs by Dennis Ritchie between 1969 and 1973, is one of the older programming languages in use today. It is still quite popular, despite its age, and is arguably the most used programming language worldwide.

Many of the other major programming languages of today have their roots in C.

In fact, if you learn to program in C, you’ll probably find it easier to pick up other languages like C++, C#, Java, JavaScript, and many others.

C is a bit of a tricky language because it is so powerful. It is very low-level, allowing developers to access the memory on a computer directly and to manipulate many low-level parts of the computer.

You’ll find C used in many operating systems, low-level hardware, embedded systems, and even a good number of older games.

C is often considered a system’s programming language.

C++

C++

C++ is the programming language that often gets mixed in with C. That is mainly because many C++ programmers don’t grasp the object-oriented concepts in C++ and write what would be called C code with some C++ features.

If you work on legacy systems written in C++, you are likely to see a large amount of this type of code.

C++ is technically a superset of C, which means that a C program should compile with a C++ compiler (although there are a few exceptions).

C++ was created by Bjarne Stroustrup at Bell Labs to extend the C language in order to provide some useful features from Simula, adding object orientation, classes, virtual functions, and many other features.

Today, C++ is still widely used—especially in game development—and it continues to be updated, now called “modern C++.”

However, C++ is a very complex language. It’s not one that I recommend beginners start with because of the level of complexity.

It’s extremely powerful, but it’s also, as they say, easy to blow your foot off with.

C#

C# is one of my favorite programming languages of all time because of how expressive yet easy to use it is.

I feel like C# is an elegantly designed language, and it seems to grow and evolve fairly rapidly even today.

C# was originally created by Microsoft as the flagship language of the .NET Runtime.

It was created by Anders Hejlsberg, who was highly involved with the creation of Delphi and Turbo Pascal.

C# started out very, very close to Java. In fact, it has been called a copy of Java, which I can’t really argue against.

In fact, I first picked up C# so fast because I knew Java, and in my mind it was basically the same thing with just a few minor differences.

Recently, however, C# and Java have diverged quite a bit—although, again, I’d say that if you know one of these languages, you are 90 percent on the way to knowing the other.

C# is an object-oriented language that could be described as similar to C++, but is much simpler and now has many functional features.

Java

Java Programming Language

Java is extremely similar to C#, but it’s older, so technically C# is extremely similar to Java.

It was created in 1995 by James Gosling at Sun Microsystems as a write once, run anywhere language. The idea was that Java could run on a virtual machine which could run on any computing platform, thus enabling Java programs to be easily cross-platform.

Java is object-oriented and largely based off of C and C++, but again, just like C#, is very simplified, not allowing direct memory manipulation and other low-level constructs that can get you into trouble.

Today, Java is owned by Oracle and still continues to grow and thrive—although it’s now managed by a committee, whose members tend to slow down advancement.

Python

Python is one of those languages that I’d like to dive into deeper some day.

It’s an extremely elegant and simple language with one of the core design’s tenants being readability.

Python was created in 1989 by Van Rossum who is called by the Python community “benevolent dictator for life.”

Python can be written in an object-oriented, procedural, or even functional way, and it is an interpreted language, meaning that it is not compiled.

In comparison to C++, Java, and C#, Python code is often much more terse since more can be expressed in fewer lines of code.

Python is extremely popular today and is growing in popularity—as far as I can tell.

It’s one of the main programming languages used at Google and is a great beginner language.

Ruby

Ruby Programming Language

Now, here is an extremely interesting language.

Ruby was actually created in Japan by Yukihiro “Matz” Matsumoto around 1993. (I had the honor of Matz being a commentator on the Japanese translation of my Soft Skills book.)

The idea was to create an objected-oriented scripting language.

Ruby didn’t really start to take off and become a popular programming language until years later, though.

One of the big catalysts of Ruby’s success was the creation of Ruby on Rails (RoR) by David Heinemeier Hansson (also known as DHH) in 2003.

Since then, Ruby has risen and slightly fallen in popularity, but it is still an extremely popular programming language today because of how easy and fun it is to use to program. In fact, that is one of Matz’s major design goals for the language.

You’ll find that many coding boot camps teach Ruby as the primary programming language since it is a very good beginner language.

JavaScript

Here is another interesting programming language that doesn’t seem to want to die.

JavaScript was originally created by Brendan Eich in 1995 and was developed in just 10 days!

As you can imagine, this resulted in a language with many problems. JavaScript looks a lot like C#, Java, or C++, but it behaves much differently.

JavaScript was initially used as a simple scripting language for the web, but, as I’m sure you have discovered, it has become the primary language of the web—and beyond.

Newer versions of JavaScript, or more precisely ECMAScript, have fixed many of the deficiencies of the language and made it more suitable for large-scale development.

Pretty much every web developer today has to have at least some understanding of the language since it is so widely used.

Perl

Perl

While not as popular as it used to be, Perl is still a widely used language, especially in the Unix scripting space.

In fact, Perl was originally created as a scripting language for Unix by Larry Wall in 1987.

It became widely popular in the early days of the web because of its flexibility and ability to parse strings, which made it great for CGI scripting. (If you don’t know what that is, don’t worry, but consider yourself lucky.)

I’ve always sort of hated Perl because I’ve found it to be an ugly language which is extremely difficult to read.

But, despite my misgivings about the language, I have to admit that its designation as “the Swiss Army chainsaw of scripting languages” is accurate.

Perl is extremely flexible and extremely powerful—I just can’t understand anything I or someone else wrote in it two days later.

PHP

Here is a language which people love to hate—myself included.

PHP is not a very elegant language. In fact, it feels a bit “dirty” in my opinion, but it pretty much powers a majority of the web today.

Facebook was first written in PHP. The ever-popular blogging software WordPress is still written in PHP.

There is a huge list of extremely popular websites that at least started out as PHP, and many of them still use it.

It was originally created by Rasmus Lerdorf in 1994 and actually evolved without any kind of written specification until 2014. (Yes, you read that right.)

PHP was never even intended to become a programming language. It was just a set of dynamic tools to help build simple web pages, but once the cat was out of the bag, it was impossible to put back in.

For all of PHP’s shortcomings, it is easy to learn and use although it has many dark alleys to get lost in.

It’s not my favorite language, but many beginners start out modifying existing PHP code to “cut their teeth.”

Objective-C

Here is another language which rose from obscurity to dominance in a matter of a few years.

Objective-C was originally created by Brad Cox and Tom Love in the early 1980s. The idea was to add object-oriented capabilities from SmallTalk to C.

Objective-C was widely forgotten—and almost dead—except for Apple picking it up and deciding to use it in its Mac OS X operating system.

Even still, it didn’t become widely popular since only Mac developers were really using the language until Apple introduced the iPhone and iOS, which beckoned in millions of new programmers to struggle with the strange syntax of the language.

I was one of them, as I had to learn Objective-C to port my first Android application over to iOS.

I have to say, I’m not a big fan of the language.

It has a very high learning curve, and it’s quite verbose to even do the most simple thing.

Luckily, iOS developers today don’t have to learn Objective-C and can use a slightly more friendly language, Swift.

Swift

This programming language is Apple’s new flagship language for iOS.

I’ll admit, at the time of writing this chapter, I haven’t played around with Swift myself—although if I pick up iOS development again, I’ll certainly check this language out.

Swift has been purposely designed to work with Apple’s Cocoa and Cocoa Touch frameworks (the ones used for iOS and OS X development).

It’s also designed to easily integrate with the large amount of existing Objective-C code out there.

Swift supports many of the popular features of Objective-C that make Objective-C so dynamic and flexible, but also is much simpler and concise.

If you are going to do iOS development today, it’s probably a decent idea to skip Objective-C and go straight to Swift.

Go

go programming language

Go is a relatively new programming language which was created by Google.

I really like Go because it’s concise, yet also powerful.

(I created a course on Go which you can find on Pluralsight.)

Go was created in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson and is very similar to C, but with some great additions and simplifications.

Unlike C, Go has garbage collection, so you don’t have to manage memory. It also has some concurrent programming features built right into the language, making it extremely performant and making concurrency a first class feature of the language.

When you start to program it, you can tell overall that it’s a really well designed language by how concise much of the syntax is.

Like C, Go is primary a system’s programming language, but it is spreading out to more areas including the web.

Erlang

Erlang is a functional, deeply interesting programming language, designed to be distributed and concurrent. It also supports hot swapping of code where you can change the code in an application without stopping it.

It was originally created in 1986 by Joe Armstrong, Robert Virding, and Mike Williams at Ericsson, but was open-sourced in 1998.

The language was originally created to help improve the development of telephony applications—hence the hot-swapping since you don’t exactly want to have most telephony applications go down.

Erlang could easily be considered the most robust programming language (and programming environment) around today.

Haskel

This programming language is very academic in nature.

Haskel is a purely functional programming language which was first designed as an open standard for a handful of functional languages that existed in 1987. The idea was to consolidate the existing functional languages into a single comment, one that could be used for functional language design research.

Haskel 1.0 was designed in 1990, by a committee believe it or not.

In recent years, Haskel has become more popular and not just for academics.

Since Haskel is a purely functional language and strong static type system, it can be a difficult programming language to use and learn, but it is also quite powerful and produces highly predictable code without side effects.

Glossing Over the Details

Again, I want to stress a few things about this list of major programming languages.

Obviously, it’s time-sensitive and highly biased, so if your favorite programming language or the new hotness isn’t listed here, it could be for either of those reasons.

I also glossed over the details of the programming languages because I don’t want us to get sucked into trying to define static versus dynamic languages and object-oriented or procedural languages versus functional languages.

In fact, in programming environments today, many languages don’t clearly fall into the old categories of static or dynamic or object-oriented and functional since many languages incorporate features in multiple categories.

Rather, all you need is an idea of the major programming languages there are and a quick synopsis of each one so that, if you are interested, you can explore whatever languages interest you most on your own.


The post The Major Programming Languages of 2016 appeared first on Simple Programmer.

]]>
Learning Your First Programming Language https://simpleprogrammer.com/learning-your-first-programming-language/ https://simpleprogrammer.com/learning-your-first-programming-language/#comments Mon, 08 Aug 2016 12:00:14 +0000 https://simpleprogrammer.com/?p=17404 Ok, so you’ve decided what programming language you want to learn and now you are all set to learn it. All you need to do is crack open a book and start reading, right? Well, not exactly. I mean, you can do it that way—if you like frustration. Remember how we talked about how you...

The post Learning Your First Programming Language appeared first on Simple Programmer.

]]>
Ok, so you’ve decided what programming language you want to learn and now you are all set to learn it.

All you need to do is crack open a book and start reading, right?

Well, not exactly. I mean, you can do it that way—if you like frustration.

Remember how we talked about how you learn best by doing?

That’s the plan for this chapter.

I’m going to give you the layout for the ideal way to learn your first programming language, and not just to learn it, but to become extremely comfortable and proficient in it, if not master it.

Learning your first programming language can be the most difficult thing about learning to program, but it doesn’t have to be.

Most programmers—myself included—learned by reading a book, trying a few things out, scratching our heads, and then rereading a book and continuing to try things out until it finally “clicked.”

What I’m about to share with you comes from coaching and teaching many software developers through not only learning their first programming language but also improving their skills in that language. I also bring my own experience mastering languages like C++, C#, and Java.

Basically, in this chapter, I’m showing you what I would do—knowing what I know now—if I were in your shoes and were learning my first programming language today.

Start by Looking at a Working Application

Learn By Doing

Most starting programmers, when they want to learn to program, pick up a book and start reading.

While there are some excellent books out there which attempt to teach you programming in a very hands-on approach, I think the best place to start is by looking at the source code of an actual working application and trying to figure out as much of what is happening as possible.

This is difficult.

It’s going to feel uncomfortable, but that’s ok. Get used to feeling uncomfortable. That is the only real way to grow in life.

What I want you to do is to pick an open source application—preferably a popular one that is likely to be well-designed—and start looking through the source code.

You can find plenty of projects on GitHub, so I’d recommend checking there.

It’s beyond the scope of this book, but it’s even better if you can download the code and build and run the application yourself.

If you have a friend that can help you with this, that’s great. If you don’t, it’s ok.

What is important is that you explore the code to get a feel for what the programming language syntax looks like and that you try and read the code and see if you can understand or make sense of anything.

Use the application itself, if possible, so you can get a feel for the relationship between the code and what the code does.

Like I said, this is going to feel very uncomfortable.

You might feel like you’re not understanding anything.

I repeat, that is ok. Just do your best and see if you can figure out how one or two things work or what you might change in the code to change the functionality in some way.

Moreover, get a feel for how things are named and how they are organized.

Pretend like you are an archaeologist trying to understand the writing of some ancient civilization.

By starting out this way, you are going to have a serious head start over most programmers who have no idea what the programming language they are trying to learn even looks like.

It’s always a good idea to get a lay of the land before embarking on any journey.

Programming is no different.

Find a Few Good Resources or Books and Scan Through Them

Scan Through Books

Further continuing with the theme of getting the lay of the land before setting sail, the next step is not to read a programming book cover-to-cover, but instead to pick out a few books or other resources—such as videos, articles, or tutorials—and scan through them.

Again, this is going to be at least somewhat uncomfortable because much of what you are looking at isn’t going to make much sense.

But… the idea here is to scope out the territory. You just want to get an idea of how big this thing is that you are about to learn and what the general concepts are.

This extra work upfront will pay off later when you have an idea of what types of things you are going to be learning and how the concepts are going to build on each other.

If you have taken my “10 Steps to Learn Anything Quickly” course, you might recognize that what you are essentially doing here is getting the big picture and determining scope.

Learn How to Create Hello World

Ok, at this point you are still not “reading a book” or taking a training program.

You’ll be doing that soon enough—if you want to. (You can actually learn a programming language without doing that, if you follow these steps. I learned Go and Dart in about two weeks utilizing only online documentation and a similar process to what we’re discussing here.)

What you want to do at this point is to create the most basic kind of program you possibly can in whatever programming language you are learning.

Remember how we talked about learning just enough to get started in the chapter on “How to Develop Technical Skills?”

That is the goal here.

You want to get started as soon as possible so that you can develop the confidence and knowledge to apply what you will be learning and put it immediately into practice.

What you are going to start with is a very basic program called “Hello World.”

Most programming books begin by having you create a “Hello World” program, which usually just prints “Hello World” to the screen.

The idea here isn’t really to learn all that much about the language, but rather to become familiar with and test out the basic tool chain required to build and run a program in your programming language of choice.

If you have a book you are reading about your programming language, it should contain an example of a “Hello World” program you can create.

If not, just do a Google search for “Hello World + your programming language.” You should have no trouble finding an example.

By creating a “Hello World” program, you’ll also learn the basic structure of a program in your programming language.

Learn Basic Constructs and Test Them out with Real Problems

Now comes the point where, if you have a book on your programming language or tutorial of some sort, you could start reading or working through it.Piece Testing

At this point, what you are reading or consuming shouldn’t be quite as mysterious as it would have been if you just dove in.

What you want to do now is familiarize yourself with each of the basic constructs of the programming language you are learning, and then write some code that uses these constructs.

You’ll want to try and think of problems or applications associated with what you are learning that are as realistic as possible because, when you apply a skill to an actual problem, you understand and remember it better.

Here is a list of some of the basic constructs most programming languages should contain:

  • Ability to write output to the screen
  • Basic math capability
  • Storage of information as a variable
  • Organization of code into functions, methods, or modules
  • Invoke a function or method
  • Performance of boolean logic evaluations
  • Branch conditional statements (if / else)
  • Looping statements

Here is some good news.

Once you know these basic constructs and how to use them, you’ll have the basics of programming in any language. Yes, the syntax might be different, but this is the core of programming.

You will probably spend a good amount of time in this phase.

Just work your way through, learning each of the constructs of your programming language one at a time, and apply each construct by actually writing some code.

If you are working on your own, you’ll need to identify what all the constructs are and in what order it makes sense to learn them.

If you are going through a book or tutorial (or preferably multiple books and tutorials), the path should be laid out for you and should even have some examples and challenge assignments for you to do.

Try to make sure you always understand what you are learning and how it is applied.

Now is a great time to go back to that original source code you looked at in the first step and see how much more of it you understand.

Know the Difference Between Language Features and Libraries

One thing that often trips up beginning programmers—especially with the programming languages of today—is knowing what is part of the language and what is part of the standard libraries that come with the language.

Often the distinction is not very clear because, idiomatically, you are going to write code that uses the standard libraries very often.

That’s ok. You are going to need to know the conventions for programming in the programming language you are learning, but you should take special care to try and figure out what is part of the actual language and what is part of the libraries that are often used with the language.

This might seem like nitpicking, but I think it’s important because it will take that scrambled mess of syntax that you probably have floating in your head at this point and help you categorize and organize it to make more sense.

What you’ll realize is that, for most programming languages, the actual language part itself is not that large and is relatively easy to learn, but the standard libraries are large and knowing your way around them is going to be the more difficult endeavor.

Programming today is more about knowing how to use libraries and frameworks than being an absolute expert in the language.

That is one of the reasons why this distinction is important.

By realizing what is not part of the language but is rather part of the library and learning how to look up libraries for common tasks you want to accomplish in the language, you’ll become a much better programmer.

Review Existing Code and Work Through Understanding Each Line

Review Code

At this point you should be familiar with all of the major concepts of the programming language you are learning, and you should have used most of the programming language features in real examples.

You also should have a decent understanding of the difference between the language itself and the libraries that are used in conjunction with the language.

You still might not exactly feel comfortable with the language or that you actually know it.

This is the stage where you may sort of feel like you can understand how everything works, but you have no idea how you would put it together to write a real application.

Many beginning programmers tend to get a bit stuck at this stage and feel frustrated, thinking they’ll never be a real programmer.

One of the best ways to push forward from here and make sure you don’t have gaps in your knowledge is to start looking at existing code, line by line, making sure you understand exactly what each line and statement in the code is doing. (Even if you don’t always understand the why, being able to know the what is still progress.)

You can take the existing source code for a project you looked at in the first step and start randomly going through files in the project.

Open a file and go through each line of code in the file, making sure you understand exactly what it is doing.

If you don’t understand—and there will be plenty of things you won’t—take some time to think about it, and look up anything you don’t understand.

This is tedious. It might even be boring, but it’s totally worth it.

When you get to the point where you feel like you can read any line of code and understand what it is doing—again, the why is not as important at this stage—you are ready to move on.

Build Something… Lots of Somethings

Writing Code

Now it’s time to really start using the programming language.

At this point, you should already have written a few small programs and utilized most of the features of the language, but you’ll get a greater feel for the language once you start actually building real applications.

Pick a few small project ideas—nothing huge—and start building applications.

Don’t pick anything too ambitious and don’t try to do anything platform specific or UI intensive at this point. Preferably, your applications will just print text to the screen and take input from the keyboard for now.

The idea is to build some simple applications that focus on utilizing the programming language you are learning and the standard libraries, not additional frameworks for platform features—we’ll get to that next.

By doing so, you will build confidence in the programming language and your ability to use it, and you’ll learn what language constructs to use to reach the goal you are trying to accomplish.

Here are some simple project ideas to get you started:

  • Create a program that solves a mathematical problem by getting inputs from the user.
  • Create a Choose Your Own Adventure type of program where the input from the user determines what happens next.
  • Create a very simple text-based adventure game where the user can issue commands to pick up objects, move through rooms, etc.
  • Create a program that is able to read input from a text file and write output to a different text file.
  • Create a chatbot that talks to the user and pretends to be human or gives humorous responses.

Apply the Programming Language to a Specific Technology or Platform

Up until this point, you should have mainly been learning about and using the programming language you’ve chosen in isolation.

This is intentional because you need to understand and be comfortable with the programming language itself and its standard libraries before adding the extra complexity of the environment and other frameworks you might use to build a real-world application.

In order to create something useful with a programming language, you are going to need to apply it to a specific technology or platform.

At this point, you should decide on a few small projects you can complete which will require you to utilize the programming language on a specific platform.

For example, let’s suppose you are learning Java.

Up until now, you would be writing Java code that would work on any platform that Java could run on, since you’d be mostly using the standard libraries and just working with input and output to the screen or a file.

At this point, you might decide to use Java to build an Android application.

You will have to learn how to build Android applications and about the Android framework. (This is a good place to utilize the “10 Steps to Learn Anything Quickly” program.) However, you’ll already be familiar with Java, so you won’t be trying to learn a huge amount of things at once without knowing what Java is or what Android is.

You can, of course, learn Android and Java together—in fact, I did a Pluralsight course teaching exactly how to do that—but to get a real mastery of the language and avoid confusion, isolating the language from the platform or technology and then combining them is probably going to be much easier.

Now you will be developing specific, specialized skills with the programming language you are learning that will be useful for getting a job.

Pick whatever platform or technology you think you are most likely to want to work with in the future and start creating a few small applications using it.

I’d also recommend that you specialize in just one technology or platform at this point. You can always learn more later.

By specializing, you will not only limit what you have to learn at this point, but you will allow yourself to gain a deeper knowledge and competency in a particular technology, which will make you much more confident and greatly increase the marketability of your skills.

Solve Difficult Algorithm Problems with the Language to Master ItAlgorithm Problems

By now you should be pretty comfortable with the programming language you are learning.

You should know it pretty well and have used it in a variety of different applications.

You should have a specific technology or platform you’ve applied your skills to and feel comfortable creating basic applications using that technology.

Nevertheless, you still might not feel like you have a mastery of the programming language.

Don’t worry; this is also normal.

When I was first learning C++, I remember how even after I understood everything about the language, had actually used it to create several applications, and was even working as a developer writing C++ code, I still didn’t feel like I had a real mastery of the language.

I felt like I was a good C++ programmer, but not a great one.

I really wanted to get my C++ skills up, but I didn’t know how.

Then, I discovered this coding competition site called Topcoder.

Every week, there was a new set of programming challenges where you could compete against other programmers to solve some fairly difficult algorithm problems.

At first I was horrible. I couldn’t even solve the easiest problem.

I would look at other people’s solutions, and I would have no idea how they came up with that solution or even how their code worked.

They were using C++ in a way that I never imagined.

But then, over time, as I kept trying to solve problems and I looked at how other people had solved the problems, I started to get better… much better.

I started to see patterns in how certain types of problems were solved.

I started to really understand how to utilize features of C++ that I had previously ignored.

I learned how to effectively use the standard libraries and language features along with data structures to solve complex problems.

I became not just proficient at C++ but excellent at it. I finally felt as though I had mastered the language.

That’s what I want you to do.

You don’t have to go on Topcoder to compete, but there are plenty of places where you can practice solving algorithm-type programming problems.

I’ve already mentioned one good resource for these kinds of problems, but here are some more:

These problems will be extremely difficult at first, and that is ok. They are supposed to be.

What you’ll find is that, over time, you’ll start to recognize that there are only a handful of types of problems, and you’ll start to be able to identify how to solve them immediately.

At first, you’ll have no clue what to do, and like I said, that’s ok—just keep trying.

Also, don’t forget to look at how other people have solved the problems you are struggling with. Try to understand why they solved particular problems the way they did.

This was one of the best ways I was able to learn how to solve these kinds of problems.

I would look at the solutions of the top coders on Topcoder, and I would learn a great deal.

Once you can solve these types of programming problems with the programming language you are learning, you will not only be pretty close to mastery of the language, but also coding interviews will be a piece of cake for you while other candidates are sweating through their shirts.

During this phase, you’ll be absorbing lots of information. There are good and bad ways to do this — check out my course 10 Steps to Learn Anything Quickly for some tips.


The post Learning Your First Programming Language appeared first on Simple Programmer.

]]>
https://simpleprogrammer.com/learning-your-first-programming-language/feed/ 7
What Programming Language Should I Learn? https://simpleprogrammer.com/learn-programming-language/ https://simpleprogrammer.com/learn-programming-language/#comments Mon, 01 Aug 2016 12:00:46 +0000 https://simpleprogrammer.com/?p=17340 One of the most common questions I get from new programmers starting out in the field of software development is which programming language they should learn. For some aspiring developers, this question ends up being a stumbling block they never get over. I’ve coached plenty of developers who were always second-guessing themselves or changing their...

The post What Programming Language Should I Learn? appeared first on Simple Programmer.

]]>
One of the most common questions I get from new programmers starting out in the field of software development is which programming language they should learn.

For some aspiring developers, this question ends up being a stumbling block they never get over.

I’ve coached plenty of developers who were always second-guessing themselves or changing their minds, jumping from programming language to programming language, always worrying about making the wrong decision. They stress over the question, “What programming should I learn?”

If you’ve stressed over this, then this post is for you.

First, I’m going to dispel some of that doubt; then I’ll give you some real practical considerations for choosing your first programming language to learn.

The Actual Language Doesn’t Matter All That Much

What Programming Language Should I Learn First?

Yes, you read that right. What language you learn doesn’t actually matter nearly as much as you might think it does.

There are several reasons I make this statement, but one of the main ones is because so many programming languages, at their core, are very similar. Yes, the syntax is different. Yes, programming languages may look different. They may even have completely different sets of features.

However, at their core, all programming languages share more than you might first suspect. Almost all programming languages will have:

  • basic constructs for branching
  • basic constructs for Looping
  • calling methods or procedures
  • a way to organize code at a high level

Many programming languages are so similar that if you know one language, you almost already know the other. C# and Java are pretty good examples. JavaScript is very similar to both of those.

Learning your first programming language is always the most difficult. Once you learn a programming language, though, learning a second one is easier. After you know two or more programming languages, each additional programming language is exponentially easier to learn.

If you don’t even know one programming language well—or at all—it might be difficult to believe these statements, but I’ve learned at least 10 different programming languages over the course of my career. I can guarantee you that the first and second ones were by far the most difficult.

Not only are programming languages more similar than you might think, but you’ll also easily be able to switch to a different programming language and learn it later on.

That means, even if you learn one programming language and decide it’s not the right one, or you get a job where you’d be using a different programming language, it’s not a big deal. You’ve already done the hard work of learning your first programming language.

You’ll also probably find that many developer jobs—especially at big companies like Microsoft or Google—don’t require that you know a specific programming language. I’ve even had plenty of interviews where I was asked to solve a programming problem in whatever language I felt most comfortable doing it in. There were no constraints and no one specific language that I absolutely needed to know.

Considerations for Picking a Programming Language

Pick A Programming Language
Therefore, I really don’t think it matters all that much what programming language you decide to learn first when you’re looking to become a software developer, but if you are still having some trouble making a decision, here’s a list of 5 things to consider:

  • Job prospects and future
  • Technology that you’re interested in
  • Difficulty level
  • Resources available to you
  • Adaptability

1. Job Prospects and Future

I’d say, for most of you, the most important thing to consider is what jobs a particular programming language is likely to help you get and what the future of that language is.

Now, for most popular programming languages, at any given time there are going to be plenty of jobs available. Different programming languages may rise or fall in popularity, but if you are concerned with job availability, you might want to consider one of the main, popular programming languages.

At the time of writing this book, I’d say the most popular programming languages are:

  • C#
  • Java
  • Python
  • Ruby
  • JavaScript
  • C++
  • PHP

There is no shortage of jobs for developers who program in one of these languages.

That said, depending on where you live in the world, you may need to be a bit more selective if you aren’t willing to relocate. For example, if you live in some small town in Arkansas and there is only one technology company and that technology company does everything in Java, I suggest you learn you some Java. I would imagine for most people this won’t be the case, but if it is you, then I guess your decision is pretty easy.
Freelancing

If you are willing to relocate or you are planning on doing freelance programming, you could probably specialize in a more eccentric and less widely used language and do pretty well being an expert in an area where there are few experts. But, if you are just starting out, I’d try to stick to something a bit more mainstream.

Another consideration to take into account, along with job prospects, is what the future is likely to hold for the programming language you are considering.

At the time of writing this book, Objective-C would probably not be a good choice of a language to get started in, simply because most iOS developers are switching to Swift, and Apple is heavily investing in the Swift programming language.

If you’ve already been programming in Objective-C, I wouldn’t worry; there will still be plenty of jobs and legacy Objective-C applications to maintain. It just might not be the best choice for the future. Of course, none of us have a crystal ball, so it’s pretty difficult to predict which languages are going to be popular and which ones aren’t.

A while back I predicted the death of JavaScript. That didn’t exactly happen. I just went to a conference where one of the speakers was a co-inventor of Objective-C, which first came into being in the early 1980s.

The speaker, Tom Love, wrote a book in which he basically stated that the JavaScript language was dead. At the time of writing this book, it’s now one of the top five most-used programming languages in the world. (I’ve heard it claimed to be number three.)

The point is, you never know what is going to happen.

Ruby took years before it became popular. JavaScript is arguably one of the worst designed languages ever and was originally used for making little pop-up or alert boxes on web pages; now it’s an extremely popular language.

So, don’t try and guess the future, unless you do have a crystal ball. In which case, forget programming. Wall Street is where you need to be.

2. Technology That You Are Interested In

One excellent consideration when picking a programming language is simply what technology you are interested in. If you start with a technology, the programming language choice may be easier.

I know plenty of developers who are interested in developing Android apps because they love the technology. For most of them, Java is going to make sense because that is the native language in which to develop Android applications. (Although, you could also develop Android applications in many other languages, like C#, Ruby, and even JavaScript.)

It definitely doesn’t hurt to pick your first language based on what you are most interested most, because learning your first programming language can be difficult. The more you are interested in and excited about what you are learning, the easier it will be to stick with it and get through the difficult parts of the learning curve.

I really wanted to develop an iOS application because I had just gotten an iPhone, and I was excited about the technology. That excitement made it much easier for me to learn Objective-C and build my first iOS app.

Had I not been excited about the technology, I probably wouldn’t have made it very far.

Don’t be afraid to pick a programming language based on what excites you or what you are interested in. Your enthusiasm can carry you through the rough patches in the learning process.

3. Difficulty Level

How To Learn Programming
Another major consideration would be difficulty level.

Some programming languages are just much more difficult to learn than others.

I usually don’t recommend starting out by learning C++ because, in comparison to many other programming languages, C++ is rather difficult to learn. C++ has you dealing with managing memory and pointers and quite a few other nasty constructs that can throw a beginner for a loop. It’s a great language—still one of my favorites—but not the easiest one to learn.

A language like C#, Lua, Python, Ruby, or PHP is going to be much easier starting out. There are even beginner languages specifically tailored to learning programming, like Scratch or Basic.

I don’t want to discourage your from learning a more difficult language like C++ if that is what you really want to do, but you should at least know what you are getting into and decide if you’d rather your first language be something easier.

4. Resources Available to You

You also might want to consider what resources are available to you for learning a programming language.

Some obscure programming language may not have as many books, online videos, or other resources available, which might make them more difficult to learn. Other more popular programming languages may have plenty of tutorials online, bootcamps you can enroll in, and books and other resources you can utilize. So, be sure to look into how many and what resources are available out there for you.
Available ResourcesYou can learn JavaScript online through your web browser without installing anything on your computer.

While this isn’t as big of a concern today as it used to be since there are so many resources for beginners out there, it’s still something to take into consideration.

You might also want to consider what resources are specifically available to you, like a computer or software. A somewhat difficult to learn programming language may be a better choice, simply because of how many interactive online tutorials there are.

You can learn JavaScript online through your web browser without installing anything on your computer.

A language like C++ will require downloading some tools and software, which might not be easy to do or as easily available.

For the final resource, I’d consider looking to the people you know. Who can you turn to for help? Is there someone that can answer your questions if you get stuck or help accelerate your learning?

I certainly wouldn’t make resources the biggest consideration to take into account when choosing your first programming language, but it’s still one you should contemplate.

5. Adaptability

Finally, let’s talk about adaptability.

Different programming languages are going to be more adaptable to different situations and technologies.

For example, the C# programming language, at the time of writing this book, is one of the most adaptable thanks to companies like Microsoft and Xamarin (now part of Microsoft). If you learn C#, you are not just constrained to Windows or web programming. C# is available on just about every platform today, so it is highly adaptable. You can use C# to write Linux and Mac applications, and you can even write Android and iOS applications, completely in C#.

Plenty of other programming languages are also highly adaptable. For instance, Ruby has been ported to many different platforms and is used in quite a few areas of technology. JavaScript is also highly adaptable. You can even use JavaScript to control Arduino boards and do robotics. (Check out my good friend Derick Bailey’s article on how to do it.)

Other programming languages are not as adaptable. If you learn R or Go, for example, you are going to be a bit more restricted to the technologies and platforms those languages were designed for.

More and more programming languages—especially popular ones—are being ported to more platforms and used in a variety of different technologies, but there are still some that are not as versatile.

So, if you think you might want to be a web developer today but do Android development tomorrow, or you want to get involved in a bunch of different platforms or technologies, you might want to consider how adaptable the language is you are trying to learn.

Some Final Thoughts on Picking a Programming Language

Become A Programmer
Even though I’ve given you some considerations to take into account when choosing your first programming language, I want to stress the point that the actual language is not all that important.

What is important is that you pick something and stick with it long enough to get through the learning curve required to gain proficiency. Plenty of programmers who are just starting out get frustrated, because they feel like they are just not getting it.

I’ll talk about this more in the next chapter on “Learning Your First Programming Language.” Just hang on and stay the course, and you will gain proficiency. I promise. It can be tempting to get bored, or think you are learning the wrong language, and so keep switching languages, but—trust me—that is not a good idea.

Finally, consider this. When I was first starting programming, knowing a language in-depth was one of the most important skills a programmer could have. I would pour over C++ books and try to learn every intricacy of the language. That is no longer as important a skill today.

Today’s programming is done at a higher level. Programming today involves utilizing libraries and frameworks much more than language features.

Sure, it’s important to know a programming language—and to be good at it—but absolute mastery just isn’t as valuable a skill as it was. That is why I say don’t worry about that looming question, “What programming language should I learn?”. Just make sure you do learn one and stick with it—at least for now.

While the actual language itself isn’t too important, how you learn it is. Take a look at my course: 10 Steps to Learn Anything Quickly for a better way to learn.


The post What Programming Language Should I Learn? appeared first on Simple Programmer.

]]>
https://simpleprogrammer.com/learn-programming-language/feed/ 12
tlhIngan pejatlh (I Speak Klingon) – Programming in Many Languages https://simpleprogrammer.com/multilingual-programming/ https://simpleprogrammer.com/multilingual-programming/#comments Mon, 21 Dec 2015 13:00:21 +0000 https://simpleprogrammer.com/?p=15207 Admittedly, I actually used this to get the Latin Alphabet translation for this title. I got the idea for the title because of Weird Al’s White & Nerdy. While I do speak at least some JavaScript, my proficiency in Klingon is a definite cause for dishonor.\n\nPerhaps like many of you, over the course of my...

The post tlhIngan pejatlh (I Speak Klingon) – Programming in Many Languages appeared first on Simple Programmer.

]]>
Admittedly, I actually used this to get the Latin Alphabet translation for this title. I got the idea for the title because of Weird Al’s White & Nerdy. While I do speak at least some JavaScript, my proficiency in Klingon is a definite cause for dishonor.\n\nPerhaps like many of you, over the course of my career I have been consistently surprised by my capacity to change technology stacks while still matching my peer group’s standards of technical ability.\n\nHere’s the collections of technology I’ve worked with so far (not counting my internships):\n\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

First Job Second Job Third Job Current Job
ASP .Net ASP.Net Java / Spring / Hibernate / Groovy PHP / Symfony / Doctrine / Composer
MS SQL Server MS SQL Server PostgreSQL and DB2/400 SQL MySQL / InnoDB
No JS Frameworks or usage VB6, WinForms, WPF Vanilla JS / AngularJS / jQuery / Dojo AngularJS
No Build System TFS Build Agent Jenkins Bamboo
File System… not really version control SourceSafe and TFS Git Git
No Configuration Management VMWare Puppet Chef

\n\n \n\nHopefully this doesn’t come across as bragging (or overwhelming or ludicrous) that I’m sharing it with you. I’m mostly using this to help me reiterate something that John recently made exceptionally clear while he marketed his course about learning in his emails to his newsletter subscribers (you can sign up too if you haven’t already!).\n\nOur biggest asset as programmers/engineers is our ability to learn, quickly. It’s also something that many of us struggle with, day to day. John brought this to our attention, and shared that he has some material about being a better learner. Thankfully, with teachings like this, even though I had a sharp learning curve to deal with each time I changed jobs, never once did I feel like it inhibited me from rapidly becoming an active contributor to my team.\n\n

Learning a Foreign Human Language

\n\nDepositphotos_21160265_m-2015I’ve only got a barely rudimentary knowledge of the Spanish language – but it’s enough of an understanding that I could say the wrong thing and end up with a live chicken instead of some McNuggets. (Chicken the animal and chicken the food have different words in Spanish, you know, like Cow vs. Beef. Chicken in a farm = la gallina. Chicken on the table = el pollo). One of the things that always helps me when I brush up on my Spanish is finding ways to compare its words and phrases to ones I know in English. A couple of trivial examples, then I’ll explain how my autodidactic learning applies to programming languages, too:\n\n

    \n

  • calor = hot\n
      \n

    • Calorie -> the energy needed to raise the temperature of 1 gram of water 1°C
    • \n

    \n

  • \n

  • amor = love\n
      \n

    • Amorous -> showing, feeling, or relating to sexual desire. (This one’s a small stretch because love ≠ lust, but it’s close enough that it works.)
    • \n

    \n

  • \n

\n\nThe main thing to understand about learning a language like Spanish is that it’s got Latin roots, i.e., it’s a Romantic language. Much of English also has Latin roots, so the easiest way for me to learn Spanish is to associate it with English words that really seem to make sense in the same (or very similar) ways.\n\n

Programming A Foreign Computer Language

\n\nSo, let’s say that you’ve spent 3-5 years getting comfortable in the Java ecosystem. Specifically, you’ve started using the Spring framework and all that it implies.\n\nMost of the patterns you use in Spring (and other related dependencies) can translate easily to patterns that apply in Symfony (a version of Spring I’m now using for PHP programming). AngularJS offers a similar dependency injection (at least in 1.x).\n\nThe most important things to look for when you’re trying to translate your current knowledge into a new environment are patterns that you can use as metaphors to help you understand the way the new language does things that the other one does, too.\n\nWhile every OOP type of language implements these shared patterns a little bit differently, you can count on all of them being present and use your metaphorical shorthand for them when changing it up. What follows are some of the helpful patterns I lean on, though I’m sure others are out there, too.\n\n

Getters and Setters

\n\nThough it may seem like a really obvious statement, one of the first things to look for in a programming language is the way that domain classes manage their properties. By looking at the getters and setters for a given language, you can gain at least a rudimentary starting point construct for how they work.\n\nBy looking at the simple constructs in getters and setters, you notice that PHP uses $ for variable names and -> for setting values, Java uses ‘.’, and .Net tends to favor PascalCase over camelCase. Here’s a contrived and very trivial example to show you what I mean:\n\n

C#

\n\n\n\n

Java

\n\n\n\n

PHP

\n\n\n\nOne of the more obvious things that you can see by looking at this is the difference between a statically typed and dynamically typed language. Both Java and C# explicitly define that boolean is the property storing this Starfleet Cadet status as a Klingon speaker. PHP has no such requirements or assumptions, and, in fact, the only way you can even indicate that these functions expect a boolean is with good documentation. This method of association is not going to help you learn the more complicated constructions of the language, but at least it will help you to see how your current language skills might translate syntactically into one that’s new to you. Once you’ve done that, you can start looking for other things. Some suggestions follow.\n\n

Database Access

\n\nProgrammers work with databases. Whether or not we enjoy it, avoiding it really isn’t an option. One way or another, we have to convince someone else’s machine to put an application into a given state, and the most ubiquitous way of doing that is storing object data within the database. These days, most major players will make use of some kind of ORM (Object Relational Manager). A friend of mine calls these “object relational mangler.” While I’m not leaning towards disagreeing with him, nevertheless you’ll often find that your codebase also makes use of ORM technology. That will give you a good comparative starting point for working in a new codebase, too. Don’t get me wrong – I’m not a fan of mangling to fit ORM patterns. But, when they’re already present, they’re a good tool for finding parallels. All of the languages I’m most familiar with offer more direct access to database constructs as well. PHP has PDO, Java has JDBC, and C# has ADO.Net. All three of these more or less resolve database data into the concept of an array/map/collection where each row is represented by a single indexed entry in the collection, and each column is referenced similarly by a name. If you find plain SQL, hopefully it will serve as a building block for learning how data objects are transferred back into your application.\n\n

Documentation

\n\nPlenty of people feel like code should be self-documenting, myself included. However, working in a place that enforces strict discipline of modularity and variable naming that allows self-documenting code to work isn’t always a reality we can depend on. If you don’t work in a place that has code which is self-documenting, hopefully you’ve got the next best thing where all of the PHPDoc/JavaDoc/etc. are well formatted, well groomed, and accurate. And, hopefully your inline documentation tells a good story about the code too. Trusting your code to adhere to decent self-documenting standards is kind of iffy. Sometimes documentation can actually be really helpful in understanding an unfamiliar language. And sometimes you get this:\n\n\n\nHonestly, I’ve got mixed feelings about how documentation works in a codebase. For more reading on the subject (and many other amazing topics about the right way to code) check out this book: Clean Code: A Handbook of Agile Software Craftsmanship. Seriously. This is one of the books that most developers should read at least once and reference often.\n\n

Unit / Automated Testing

\n\ntest-buttonHopefully you’re working inside of a codebase where you can run unit tests to get an idea of coverage and functional acceptance. I think that regression protection through an appropriate automated test pyramid is one of the foundational building blocks of being on a good project/product/team.\n\nOne of the biggest reasons that I advocate heavily for test automation is that it also teaches a person how to use the code in front of them. Hopefully, the tests are well written and can act as a guide through the code by allowing you to learn little bits of functionality as you understand what each test proves.\n\nIf you really want to dive in headfirst into a code base, start with the test suite. I promise you no test suite is ever done. You can always find some place to add another test that can help make your code a little more regression resistant. Plus, it’s a very low barrier to entry – if you start learning the code by writing automated tests, you’re not going to break anything.\n\nJust make sure you don’t check in a test that fails to compile (or turns red) unless you want a senior team member sending you here.\n\n

API Routing

\n\nI live in the world of Web APIs that communicate with JSON. If there’s one thing you can absolutely count on to map out cross-platform similarities, it’s that HTTP request and response patterns all follow a strict contract regardless of the back-end server infrastructure in use.\n\nIf you can figure out how your application server turns /api/v1/starfleetCadets/ into traffic that goes to your services layer regardless of which language you’re learning, you’re going to see similar patterns emerge.  As long as you have a well groomed code base, the only thing the web API controllers should do is direct traffic from the HTTP request to the application logic.\n\nThis is one of the first places I start looking when I’m trying to learn a new language. JSON is pretty universal and ubiquitous in the web API world, so it’s also a great springboard for finding areas of comfort in a new place.\n\n

So, which language is my favorite?

\n\nIn short, all of them. Programming languages are like tools in a handyman’s belt. You wouldn’t use a screwdriver to cut a hole in drywall, and you wouldn’t use a saw to drive a screw. The same exact concept applies to programming languages. Some are better suited for large data sets and statistical analysis (like Scala or R), while others are better suited for making programmers pull out their hair and curse at browsers (like JavaScript).\n\nMan in ballet tutu isolated on whiteAs I’ve heard before, though, there are two kinds of programming languages. Those that everyone hates, and those that nobody uses. And then there are those that just make you want to quit programming and go join the ballet.\n\nAll of the languages I’ve used are my favorites for different reasons. They all have drawbacks, sure. But they all have strengths that I find appealing and love applying to the right solution spaces when it makes sense.\n\nMost of us don’t work in a place where we get to choose which language(s) are the right ones for the specific task at hand. Usually, we’re coding to a part of a technology stack and have to make do in the space we work in. However, that shouldn’t limit our understanding of the other options at our disposal.\nProgramming is as much an art form as it is a science. No one language perfectly solves every problem in a given domain. By striving to create consistency in the chaos, you’ll end up mastering more languages than you ever thought possible.

The post tlhIngan pejatlh (I Speak Klingon) – Programming in Many Languages appeared first on Simple Programmer.

]]>
https://simpleprogrammer.com/multilingual-programming/feed/ 5
Do You Need To Know More Than One Language? https://simpleprogrammer.com/do-you-need-to-know-more-than-one-language/ https://simpleprogrammer.com/do-you-need-to-know-more-than-one-language/#comments Fri, 25 Sep 2015 12:00:24 +0000 https://simpleprogrammer.com/?p=14510 I had just committed career suicide. Well, that’s what I had been told.\n\nMy coworkers had just learned that I would be leaving the company. Most understood that. What bothered them was that my current company was a Windows shop and we wrote code in C#.net. However, the position I was moving into developed in a...

The post Do You Need To Know More Than One Language? appeared first on Simple Programmer.

]]>
I had just committed career suicide. Well, that’s what I had been told.\n\nMy coworkers had just learned that I would be leaving the company. Most understood that. What bothered them was that my current company was a Windows shop and we wrote code in C#.net. However, the position I was moving into developed in a Linux environment where the main programming language would be Java. They saw the change in programming language as me throwing away years of experience. Many people would agree with them.\n\nThere are hundreds of programming languages. Some are pretty common, such as  Java, C#, PHP, Ruby, Python, and Javascript, while others are more on the fringe or are new, such as  Awk, Go, Julia, Rust. With so many choices, how do you know which to focus on? So, I started to think – do you really need to know more than one language? \n\n

9 Reasons You Would Want to Know More Than One Language

\n\n

    \n

  1. the right pathYou have multiple ways to tackle the same problem. Knowing different languages gives you more options. After all, when all you have is a hammer, everything looks like a nail.
  2. \n

  3. You’re more marketable, thus you have more job opportunities. Learning a second language can sometimes double the number of positions you could fill. It depends on which language you learn, however. Either way, you become qualified for more opportunities, which improves your job search.
  4. \n

  5. It shows that you’re able to learn new languages. Your potential employers understand you’re not rigid or traditional.
  6. \n

  7. It can be fun. Learning something new gives your brain a rush. It will help you grow and improve in a new area.
  8. \n

  9. You stay current with technology trends. You get an idea of where the industry is headed, and can capitalize on riding the wave. Your skills don’t become outdated.
  10. \n

  11. It reminds you why you like your “main” language, or how things could be better. Sometimes you just don’t know how good you have it in your main language until you try something new. You’ll appreciate the concepts of your favorite language. At the same time, the new language might have some features that you’re surprised you lived without for so long.
  12. \n

  13. You become a better computer programmer. Learning new languages helps you improve skills that are transferable between all languages, e.g., designing and building algorithms or handling different data structures.
  14. \n

  15. You can use the best tools for the job. There is no perfect language; some languages are better than others at particular things. Knowing more than one language gives you the option to choose the best tools for the job.
  16. \n

  17. It indicates that you are a quick learner. Nothing shows you can learn quickly like knowing  a second language.
  18. \n

\n\n

9 Reasons Why You Wouldn’t Want to Know More Than One Language

\n\n

    \n

  1. It’s easier to master just one language. Mastery normally comes through focused attention and dedicated work. If you’re continually switching between multiple languages, the probability of mastering one is lowered. Knowing only one language helps you focus.
  2. \n

  3. Most people only need one job and most companies only use one language. After you’ve been hired, knowing multiple languages won’t necessarily help you. If you know the language for the project, you’re set.
  4. \n

  5. There’s always something to learn; even if that means diving deeper into just one language.
  6. \n

  7. Specialists can demand a higher salary in most instances because people are willing to pay more money for an expert. John Sonmez talks about why being a generalist isn’t always the best idea in his video I’m Not Sure I Want To Be A Specialist.
  8. \n

  9. Even with just knowing only one language, you can still be considered a great developer. Being a great developer has nothing to do with how many languages you know. The thing that matters is what you build. By knowing only one language, you can spend more time building.
  10. \n

  11. You only need to learn a limited number of software development tools. Most languages only have a few tools. Switching languages normally means switching tools as well. By knowing only one, you can master the tools more quickly. This can help you be more productive.
  12. \n

  13. It is easier to market yourself. By knowing only one language, you have essentially niched down (even if it’s not by choice).
  14. \n

  15. You can solve most software problems in any language. Regardless of what many people will tell you, most languages can be used to solve any problem. If making things is your main goal (which it should be), knowing more languages won’t necessarily help you with that.
  16. \n

  17. It’s better to know one thing well than ten things only on the surface.
  18. \n

\n\nThis isn’t a black or white issue. Like most issues, the best solution is somewhere in the middle; there’s always a gray area. If you’re a beginner, it’s easy to learn just one language and use it for your first dozen projects. After that, I would suggest you become a T-shaped software developer.\n\n

What is a T-Shaped Software Developer?

\n\nA T-shaped software developer has deep knowledge in a specific area, and is an expert in one language. This is represented by the vertical line of the T. They also continue to learn another skill more broadly which is represented by the horizontal line of the T.\n\nConfused man using a notebookSo what does this have to do with software development and, more specifically, learning programming languages? I would recommend that you learn one language very well. That will become your bread and butter, your go-to language when solving most problems. You should try your best to master this language. From there, you can learn a second language or skill that is best for the job. Check out my previous post on Finding What To Learn Next if you’re having trouble figuring out what skills to choose.\n\nA T-shaped software developer is a jack-of-all-trades, but a master of one.\n\nBy becoming T-shaped, you gain the flexibility of knowing multiple languages, while still having the benefits of being an expert in one area.\n\n

What Programming Language Should You Choose to Master?

\n\nA very common question that you normally see floating around is what language you should select to learn. Or, if you’re just starting out, which language should you learn first. For your main language, I would choose something that has been around for a while. The language should be used in multiple industries and have a solid community with plenty of development tools. Java, C#.net, Ruby, Python, and Swift are a few of the languages that meet these criteria. \n\nTiobe Software keeps an index that  tracks the popularity of software languages based on a few of these criteria. You can see the full list of programming languages here. The index is updated every month, but most languages in the top 20 are great choices. Will all these languages be around in the next 10 years? I’m not sure.  They will likely be around for at least the next four years, which is long enough for whatever project you may be starting soon.\n\n

Needing to Know More Than One Language Depends on Your Goals

\n\n

Depositphotos_23697855_m-2015

\n\nDo you want to start a new side project or business? You probably only need to know one language.\n\nDo you want to change industries or ride the technology trends? You probably need to know more than one language.\n\nDo you want to work in an enterprise setting? You probably only need to know one language. \n\nDo you want to work on cutting-edge projects? You probably need to know more than one language because the trends are always changing.\n\nHonestly, when deciding if you need to know more than one language, there’s no right or wrong answer. In the end, the choice is really up to you. \n How many languages do you know? What’s your area of expertise and how do you broaden it with interests? Share with us in the comments.

The post Do You Need To Know More Than One Language? appeared first on Simple Programmer.

]]>
https://simpleprogrammer.com/do-you-need-to-know-more-than-one-language/feed/ 25
The Ultimate List of Programming Books https://simpleprogrammer.com/the-ultimate-list-of-programming-books/ https://simpleprogrammer.com/the-ultimate-list-of-programming-books/#comments Mon, 23 Mar 2015 15:00:00 +0000 https://simpleprogrammer.com/?p=13335 Quite often I am asked about the top programming books that I’d recommend all software developers should read. I’ve finally decided to put together a list of the programming books that I find most beneficial and that I think every programmer should read. Now, just like my Ultimate List of Developer Podcasts, this is my...

The post The Ultimate List of Programming Books appeared first on Simple Programmer.

]]>
Quite often I am asked about the top programming books that I’d recommend all software developers should read.

I’ve finally decided to put together a list of the programming books that I find most beneficial and that I think every programmer should read.

Now, just like my Ultimate List of Developer Podcasts, this is my list, so I get to make the rules. (Which means I get to advertise my book at the top of this list–actually both of them.)

First, off:

My most recent book is a massive tome called “The Complete Software Developers Career Guide.

And it is massive, weighing in at about 800 pages for the printed version.the complete software developer's career guide

I wrote this book primarily because there just wasn’t a good book out there–or really any book for that matter–which told software developers everything they needed to know about how to have a successful career in software developer and to answer all the common questions I get like:

  • How do I get started as a software developer?
  • How do I learn a new programming language?
  • College, boot camp, self study?
  • How do I deal with my asshole boss? My coworkers? Discrimination?
  • How do I find a new job? My first job?
  • How do I get a raise?
  • What do I actually need to know to be a software developer?
  • How do I MAKE MORE MONEY and advance my career?

I could go on and on, but I think you get the point. Anyway, the goal was to create the one stop how-to guide for all software developers, regardless of career level, to manage their careers.

The book has been a huge success so far actually debuting #5, yes that’s right, #5 on the Wall Street Journal Non-fiction Best Seller list on the week of it’s release.

It’s a book every software developer should have. Period. (And not just cause I wrote it.)

Next…

After reading all the books on this list, being in the software development field for over 15 years and training hundreds of thousands of software developers through my online courses at Pluralsight, I wrote my own book called “Soft Skills: The Software Developer’s Life Manual.”
sonmez_cover150
Now, obviously I highly recommend this book—but not just because I wrote it.
I wrote the book because I felt that there was a large gap of knowledge missing in the programming books that were out there.

There are many excellent books—as you’ll no doubt encounter on this list—but, there weren’t any books that provided a comprehensive treatment of the soft skills required to be successful as a software developer—and to live a better life in general.

So, that is what “Soft Skills: The Software Developer’s Life Manual” is. I wanted to write the book that I wished someone would have given me 15 years ago when I first started my career as a software developer.

Ok, that is enough plugging my own book. If you want to check it out, you can find plenty of reviews for it here.

(And before you binge read this whole list, you might want to check out my guide: 10 Steps to Learn Anything Quickly)

Foundational programming books

This first list of books are ones that I consider to be a good starting point and provide a solid foundation for any software developer:
codecomplete
Code Complete: A Practical Handbook of Software Construction, Second Edition

This book is one of the most transformative books I’ve ever read. Immediately after reading this book, the way I wrote my code and the way I thought about writing code completely changed.
The book is full of great advice about how to write good code, regardless of architecture or programming language. Code Complete goes into the details of the structure of writing good code. I’ve never found another book that even comes close to touching many of the topics in this book. I consider this book a must-read for all serious software developers. The book is a bit dated, but still has extremely valuable information.

Clean Code: A Handbook of Agile Software Craftsmanship

This is another one of those books that completely changed the way I wrote code. I can neatly divide my programming career into pre-Code Complete, pre-Clean Code and after. I recommend this book after reading Code Complete, because while Code Complete deals more with the structure of individual lines of code and methods, Clean Code deals with some of the same concepts, but at a slightly higher level.

It’s pretty difficult to read this book and not become a better programmer.

Structure and Interpretation of Computer Programs

I debated putting this one on the list. Is it really foundational? It depends on how solid of a foundation you want to have. If you want to have a really solid foundation, then the answer is a resounding “yes.”

The book is challenging. It deals with functional programming. It was written for the famous introductory programming course at MIT. But, I’d recommend you not only read this book, but go through all the exercises in it. It will be a difficult journey, but you’ll come out the other side a much better programmer than you were before.

Design Patterns: Elements of Reusable Object-Oriented Software

This classical book is critical reading to really understand what design patterns are and become familiar with the most common design patterns you are likely to encounter in your career. It’s not a particularly easy read and the descriptions and examples might be a bit difficult to follow—especially if you don’t have a solid grasp of UML—but, it’s a book I consider a “must read.” If you are having trouble with this book, you might want to start with “Head First Design Patterns.” which teaches the design patterns in this book in a much more digestible way—still, there is no substitute for the original.

Head First Design Patterns

Read the classic first, then read this one, then go back and read the classic one with a renewed understanding. This book makes design patterns much easier to understand. It’s also a useful book for learning how to teach complex topics and make them interesting.

Refactoring: Improving the Design of Existing Code

Although modern IDEs have automated many of the refactorings mentioned in this book, refactoring is still a very important concept to understand in order to write good, clean code—especially in today’s Agile environments. This book covers just about all of the major refactorings that all software developers should know how to execute in any code base. Learning how to refactor your code allows you to breathe new life into it and to have it improve over time as it is maintained, rather than rot.

Working Effectively With Legacy Code

Unless you are fortunate enough to always work on green-field projects, you’ll mostly likely encounter legacy code in your career—and lots of it. I included this book, because it is the foundational programming book on working with legacy code. If you are working on a large code base more than 5 years old, this book might be your new bible. Read it and take it to heart.

Professional development programming books

This section contains programming books that I have found most beneficial to my professional development as a software developer.
pragmatic programmer
The Pragmatic Programmer: From Journeyman to Master

When I first read this book, it wasn’t my favorite. I still don’t agree with everything said in the book, but even with my misgivings, I have to acknowledge this is a programming book that every software developer should read when they want to transition from being just a coder to something more. There is some extremely pragmatic advice in this book that will bestow upon you lessons that otherwise would take years or even decades to learn.

The Clean Coder: A Code of Conduct for Professional Programmers
This book is all about being a professional programmer. This is a tough read. A lot of developers won’t like this programming book, because the advice is sometimes difficult to swallow. But swallow it if you can, because Bob Martin, the author of the book, is a veteran in the industry and has managed to stay relevant decade after decade of pumping out code. I really found this book helpful in shaping my career and making tough decisions.

The Passionate Programmer: Creating a Remarkable Career in Software Development

This book was one of the main programming books that influenced me to treat my career in software development as a business rather than just something I did. The book is full of all kinds of wisdom about how to increase your skills, maximize your time, keep your career and passion alive and more. I highly recommend reading this book if you want to move beyond programming as just a job.

The Mythical Man Month

All those problems you thought were unique to your project, well I’ve got news for you, they aren’t. They are inside this book. If you want a very practical programming book about complex software development projects, this is it. This book is like a catalog of the most common problems that plague non-trivial software development projects and the book has more than stood the test of time.

Architecture based programming books

These are programming books that an aspiring architect or software developer who cares about architecture should read.
domain driven design
Domain-Driven Design: Tackling Complexity in the Heart of Software

Buckle your seat belt, this is a difficult read. The first time I read this book, I didn’t get it. The second time I read it, I sort of got it. It wasn’t until my third pass through the book that it finally clicked all the way. This book will help you learn how to create a maintainable architecture that is based on domain modeling. Once you learn what is in this book, you can’t go back. You won’t think about software development architecture in the same way again.

Patterns of Enterprise Application Architecture

If you are doing any kind of enterprise application development, you’ll find this book extremely useful. It contains great information about how to design and build an enterprise application from start to finish. What I found most useful though, was the many patterns contained in the book that are often seen in enterprise applications. This is a book I referenced all the time when I was building large enterprise applications for my job.

Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions

This is the absolute guide-book for implementing message bus or service bus architectures. Don’t let the name of the book fool you, this book is all about message buses and all of the patterns used to implement them correctly. If you are doing any kind of integration between applications or services using a bus, you will absolutely love this book.

Refactoring to Patterns

It is one thing to read and learn about design patterns, it is another thing to implement them. It is yet another thing to actually take existing code and refactor that code into design patterns. This is a programming book that teaches you—scratch that—shows you how to move existing code into patterns and how to even move it out of patterns. Should be on every architect’s bookshelf.

Agile programming books

These programming books are some of the best books on Agile development that I have found. I recommend them to anyone working in an Agile environment, whether you are using Scrum, Kanban, XP or something else.
agile software development
Agile Software Development, Principles, Patterns and Practices

Yes, this is another Bob Martin book, and it is excellent. There is also a C# version of this book. This book takes you through all the core tenants of Agile development without all the fluff. Not only that but it introduces the SOLID design principles which are fundamental to understanding how to write clean, maintainable code. This book was the book that convinced me to actually start doing pair programming.

Agile Estimating and Planning

So many teams get this wrong. This book shows you how to do it correctly. The first time I read through this book, I realized that sound principles could be applied to estimation and planning on an Agile team. Highly recommended for anyone working in an Agile environment.

User Stories Applied: For Agile Software Development

Another great Agile book that helps with a major trouble area: user stories. I’ve worked with some pretty crappy user stories when working on Agile teams, simply because no one knew how to make good ones or what user stories were actually supposed to look like. This book solves that problem.

Extreme Programming Explained

What I consider to be the classic Agile book. A little extreme for some—this is not SCRUM, this is real XP. This programming book is an extremely prescriptive description of how to implement extreme programming, but the ideas in this book can be applied to many different kinds of Agile environments.

Algorithm and interview question programming books

These programming books will make you better at writing algorithms and will help you pass interviews—especially programming interviews where you have to write code.
programming pearls
Programming Pearls

The classic book of programming problems. Read this book and actually do all the exercises. If you survive the ordeal, you’ll be a much better programmer and garner a deep understanding of algorithms and algorithm design as well as some critical problem solving skills.

Cracking the Coding Interview: 150 Programming Questions and Solutions

This book is not only one of the top-selling programming books on Amazon, it is one of the top selling books on Amazon, period. And for good reason. The book is full of great interview advice and real programming problems that will not only help you pass a coding interview, but make you a better programmer overall. Go through the book and do the exercises. If you can master the exercises in this book, it will be very difficult to stump you in a programming interview.

Introduction to Algorithms

This book is considered one of the best books on learning algorithms, and for good reason. It is a solid programming book for anyone interested in increasing their ability to write and understand algorithms, which is the core of writing code. If you are going to read any book on algorithms, start with this one for sure.

Language specific and programming language related programming books

This is a mix of really good language specific programming books and books that are related to programming languages in general. I know I’ve probably missed a few here, so help me out.
javascript the good parts
JavaScript the Good Parts

This book might become outdated as JavaScript evolves, but for now, this book is essential. JavaScript was a language that was never designed for the use it is used for today. That means there are quite a few pitfalls in writing JavaScript code. This book has saved me on more than one occasion. If you are going to write JavaScript, you are going to want to read this book.

Thinking in Java

This book not only teaches you how to start programming in Java, but it teaches you how to teach a programming language. I don’t think I’ve ever encountered a better book on learning a programming language than this book. Even if you have no interest in Java, I recommend reading it.

Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14

I’ve linked to the modern version of this book, but the whole series of older books is damn good. I learned so much from reading the original Effective C++, More Effective C++ and Effective STL books, that even though I don’t write any C++ code today, I still have fond memories of these books. I’ll admit, the earlier books probably won’t do you much good today if you are writing in modern C++, but if you are obsessed with becoming the best C++ developer possible, you have to read this updated version of the classic.

Effective Java

The Java counterpart is almost as good as the C++ original. Some of the recommendations are dated by the changes to the language, but overall this is still a really good book.

C# In Depth

Do you know C#? Do you really know C#? If you read this book you will. I’ve never read a book that dove as deeply into a language as this book does. Before I read this book, I considered myself an expert in C#. I would have given myself a 10. After, I realized how far from the mark my original estimation of my knowledge was.

Seven Languages in Seven Weeks: A Pragmatic Guide to Learning Programming Languages (Pragmatic Programmers)

I love this book, because it stretches you and makes you a more open-minded programmer. This is a programming book that has the potential to take you to the next level and see beyond pretty religious technology tendencies. This book helped me to see how similar so many programming languages are, appreciate their differences and see just how fast I could learn.

OPs, QA and deployment related programming books

These books are programming books related to anything outside the scope of normal programming activities, including testing, operations and deployment.
testing computer software
Testing Computer Software

Every developer should read this book to gain a good understanding of QA and testing. This book is very easy to digest, yet a comprehensive book all about testing. After reading this book, I was able to communicate with QA better, write more testable code and avoid defects by learning how to test my own code before throwing it over the wall.

Ship it! A Practical Guide to Successful Software Projects

Lots of great content and practices in this book. Some of them are a bit extreme, but they are all very effective. This book can help you take your software development shop to the next level. It’s a great book to read and then to give to your manager to highlight the value of some best practices like: continuous integration, automated testing, scaled back planning, etc.

Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation

I didn’t really believe continuous delivery was possible until I read this book. This book actually shows you how to build an entire system that will build and deploy tested code right into production. This book goes well beyond continuous integration and takes the entire delivery process into a continual flow. A programming book I highly recommend if you want to automate your entire deployment process—and trust me, you do!

Soft Skills and other fun programming books

These programming books are really not programming books at all, but are books that I have either found immensely valuable in my career, or books that most software developers have really enjoyed.
soft skills
soft skillsSoft Skills: The Software Developer’s Life Manual

Yes, this is my book. I mentioned it before, but I wanted to include it in its proper place as well. In this book I cover everything non-technical that a programmer could possibly be interested in, from career, to personal branding, blogging, learning, teaching, being productive, finances and even a bit on fitness and relationships.

How to Win Friends and Influence People

I really can’t praise this book enough. Yes, it has nothing to do with programming. You might be surprised to find this on a programming books list, but this is a life-changing book. As a software developer, you will deal with people during your entire career. If you learn how to deal with them effectively, you’ll have a much better go of it. So, I highly recommend reading this book. This book changed my life and set me on the path I am on now.

Code: The Hidden Language of Computer Hardware and Software

This is a fascinating book. Again, it’s not explicitly a programming book, but it is all about how computers work at the very lowest level. After reading this book, you’ll understand what the code you are writing is actually doing and how a CPU actually executes your code. This is both a fun and fascinating read.

Gödel, Escher, Bach: An Eternal Golden Braid

Another non-programming book on this programming book list, but a book that almost all programmers will find fascinating. This is a huge book that is one of the most pleasurable books I have ever read. I didn’t ever want to put this book down and I was extremely sad when I reached the end.

The War of Art

This one is another stretch. It is in no way a programming book—not even close—but it is a book that helped me achieve an extremely high level of productivity. This book is the reason why I can sit down and spend 4 hours writing this blog post. It’s an excellent book that will inspire you to be your best, and finally beat procrastination.

What programming books did I miss?

Any programming books that should be on this list?

If so, let me know and I’ll add them.

And if you’d like to see my “top 10” list of books I think every developer should read, I’ve put together a list you download.

Just click the button below to grab your copy:

The post The Ultimate List of Programming Books appeared first on Simple Programmer.

]]>
https://simpleprogrammer.com/the-ultimate-list-of-programming-books/feed/ 80
Test Automation Framework Architecture https://simpleprogrammer.com/test-automation-framework-architecture/ https://simpleprogrammer.com/test-automation-framework-architecture/#comments Mon, 14 Apr 2014 15:00:25 +0000 https://simpleprogrammer.com/?p=11207 Test automation framework architecture efforts are often complete failures.\n\nIt’s true. I’ve worked with many companies who have given up on creating a good test automation framework architecture, because after investing a large amount of time and money and resources in doing it the wrong way, they have incorrectly assumed the entire effort is not cost...

The post Test Automation Framework Architecture appeared first on Simple Programmer.

]]>
Test automation framework architecture efforts are often complete failures.\n\nIt’s true. I’ve worked with many companies who have given up on creating a good test automation framework architecture, because after investing a large amount of time and money and resources in doing it the wrong way, they have incorrectly assumed the entire effort is not cost effective.\n\nIn this post, I’m going to simplify the process of creating a test automation framework architecture and show you that—if you do it right—it can be a very good investment.\n\n

Test automation framework architecture basics

\n\nLet’s start off by talking about what the goals of a successful test automation framework architecture should be.\n\nThere are two goals I am interested in when creating a test automation framework:\n\n

    \n

  1. Having the ability to easily create simple automated tests that use the framework.
  2. \n

  3. Decoupling cosmetic application changes from the tests so that when the application changes, the tests do not all have to be updated
  4. \n

\n\nA good test automation framework architecture should at the very least provide these two important services. We create a test automation framework to allow us to support the creation of tests and to keep those tests from being dependent on the actual UI of our application—as much as possible.\n\nI’m going to break down these goals just a little more to make sure we are all on the same page.\n\n\n\n

Creating simple automated tests

\n\nFirst, we’ll start with having the ability to easily create simple automated tests that use the framework. Why do we care about this goal? And why would this be the responsibility of the framework?\n\nI have found that one of the biggest failure points of test automation efforts is test complexity. The more complex the tests are, the harder they are to maintain. If tests are difficult to maintain, guess what? They won’t be maintained.\n\nSo, we really want to make sure that when we create a test automation framework architecture, we focus on making sure that test automation framework makes it as easy as possible for someone to create tests using it.\n\nIt is always a better choice to put the complexity into the framework instead of into the tests. The framework is usually maintained by developers and does not contain repeated code. But, tests are often created by QA or even business folks and the code found in tests is usually repeated across many tests, so it is vital to reduce the complexity on the tests, even if it means a large increase of complexity in the framework itself.\n\nWhen I create a test automation framework architecture, my goal is to make it so the tests can read as close as possible to plain English. This requires some effort to pull off, but it is well worth it.\n\n

Decoupling the UI from the tests

\n\nNext, let’s talk about what I mean by decoupling cosmetic application changes from the tests.\n\nThis is also a vital goal of any test automation framework architecture, because if you fail to decouple the UI of an application from the tests, every single UI change in an application will cause possibly hundreds or thousands of tests to have to be changed as well.\n\nWhat we really want to do is to make it so that our test automation framework architecture creates an abstraction layer that insulates the tests from having to know about the actual UI of the application.\n\nAt first this seems a little strange, especially when I tell automation engineers or developers creating an automated testing framework not to put any Selenium code into their actual tests.\n\nAll of the Selenium examples show you creating tests that directly use a web browser driver like Selenium, but you don’t want to write your tests that way—trust me on this one.\n\n(By the way, I haven’t found a good book on creating an actual test automation framework architecture—I’ll probably write one—but, for now if you are looking for a good book on Selenium that starts to go into the topics I discuss here, check out Selenium Testing Tools Cookbook.)\n\nInstead, what you want to do is to make it so the test automation framework is the only code that directly interacts with the UI of the application. The tests use the framework for everything they want to do.\n\nSo, for example:\n\nSuppose you are creating a simple test to check to see if a user can log into your application.\n\nYou could write a test that looks something like this: (C# and Selenium in this example)\n\n

\n\n\n\n

\n\nBut, what is going to happen when you change the ID of your “User Name” field? Every single test that uses that field will break.\n\nOn the other hand, if you properly create a test automation framework architecture that abstracts the UI away from the tests themselves, you would end up with a much simpler and less fragile test, like this:\n\n

\n\n\n\n

\n\nNow, if the ID of your “User Name” field changes, you’ll just change the code in your automated testing framework in one place, instead of changing 100 tests that all depended on the specific implementation of the UI.\n\n

A simple test automation framework architecture

\n\nOnce you understand those two very important goals and why they are important, it is easier to think about how you should design a test automation framework architecture.\n\nI’ve created quite a few test automation framework architectures, so I’ll give you a basic design I use for most of them.\n\nTake a look at this diagram:\n\n\n\nHere you can see that there are four layers to my test automation framework architecture.\n\nFrist, we have the browser layer or the web app itself. This just represents your actual application.\n\nNext, we have the Selenium or web driver layer. This layer represents your browser automation tool. Selenium is basically just a framework for automating a browser. It doesn’t know anything about testing, it is an API that lets you interact with the browser programmatically. (By the way, you don’t have to use Selenium. I just use it as an example here, because it is the most popular browser automation framework.)\n\nAfter that, we have the framework layer. This is the actual framework you create which uses Selenium, or whatever web driver you want, to actually automate your application. The framework is acting as an abstraction between your application and the tests. The framework knows about the UI of your application and how to interact with it using Selenium. It is your job to create this layer.\n\nFinally, we have the actual tests. The tests use the framework to manipulate your application and check the state of the application. These tests should be simple to understand and should not have to know anything about the actual implementation of the UI of your application. These tests should rely on the framework to give them the ability to do whatever they need to do in your application.\n\n

Now what?

\n\nObviously, creating a test automation framework architecture is more complicated than what I have shown you in this article, but with these basics you should be off to a good start.\n\nIf you want a more in-depth and detailed explanation as well as an example of how exactly to create a full test automation framework architecture, you might want to check out my Pluralsight video on the topic:\n\nCreating an Automated Testing Framework With Selenium\n\nI also frequently blog about test automation topics and other topics related to becoming a better and more profitable software developer.\n\nSign up here to make sure that you don’t miss any of my posts and get access to the content I only share with my email list. (Don’t worry I hate spam as much as you do.)\n\nIf you have any question, post them in the comments below.

The post Test Automation Framework Architecture appeared first on Simple Programmer.

]]>
https://simpleprogrammer.com/test-automation-framework-architecture/feed/ 19