Because this book was really long, I figured it could be useful to have a section that briefly summarizes what you read previously.
Yes, you really can learn to code – this book made it clear that anyone can learn software development if they really want to. You don’t have to be some math genius or computer whiz to get started in this field. If you know how to solve 2x + 5 = 25, then that’s all the math you need. And if you know how to download and install a program, that’s about all the computer skills you need to start. You don’t need to be an IT guru to be a software developer.
Important people – there are some tech equivalents to celebrities, like Bill Gates, Mark Zuckerberg, or Linus Torvalds. But for every famous software developer, there are tons who contribute to important software but aren’t known by the public.
Languages – there are many different ways to write code. The way you write code is in a programming language. There are many different programming languages to choose from.
Don’t waste time learning obscure programming languages. Stick with popular ones, because that’s where the money is.
CLI – Command Line Interface. Text-based programs with no graphics.
GUI – Graphical User Interface. A graphical program with buttons, menus, and images. Most people prefer to use GUI software these days, but when you’re starting to learn programming, you’ll be making CLI programs instead because it can be easier. That being said, CLI programs can still be useful in some situations.
Operators and operands – in the example of x + 5, + is the operator and x and 5 are the operands. Sometimes, an operator can do different things based on the types of operands you use with it, such as “hello ” + “world” meaning concatenation (putting text together) instead of addition. When an operator’s meaning changes based on its context, it’s called operator overloading. An operator with two operands is called a binary operator. + is an example of a binary operator. A unary operator is an operator that only takes one operand, such as x++.
Boolean logic (true, false, and, not, or) – Boolean logic comes up a lot in software development. It’s from Boolean algebra, which was made by George Boole. A statement can be true or false. 1 + 5 = 6 is true. 1 + 2 = 537 is false. The most commonly used Boolean operators are AND, NOT, and OR. AND is only true if both of its operands are true. True AND true is true, but true AND false is false. NOT gives the opposite. NOT true is false, and NOT false is true. OR is true if at least one of its operands is true. True OR false is true, false OR true is true, true OR true is true, and false OR false is false.
Variables – you can make things called variables in programs. They have a type, a name, and a value. An example of a variable is string myName = “Alan”.
Arrays – instead of making a single variable, you can make a bunch of variables of the same type, all in the same group. An array is basically a group of variables. An egg carton is an array of eggs.
Data types – variables have types. Some types include int (integer, meaning whole numbers), float or double (meaning decimal numbers), strings (text), and Booleans a.k.a. bools (things that are either true or false). Basic data types are referred to as primitive types. But you can make your own, or use more complicated ones.
Functions – instead of copying and pasting the same code over and over again, you can use functions, which are reusable pieces of code. Think of a function as a sub-program within a bigger program. A program might have many functions. A function is basically a machine that takes inputs (called arguments) and returns outputs (called return values). Variables are things, but functions do things.
Control flow – control flow is how the execution of a program is determined. Instead of running from beginning to end, the flow of a program is based on conditions. Some examples of control flow include if/else (if the pot of water is boiling, turn the heat down), while (while you’re awake, study more), and for loops (repeating things back to back without writing the same code multiple times).
Computer hardware – the most important computer hardware concepts to be aware of are the CPU, RAM, storage, and IO. The CPU performs instructions and is basically the brain of a computer. RAM contains data that is only kept temporarily. Storage devices (such as hard drives, SSDs, or flash drives) are for files, which stick around even if you turn a device off (but RAM doesn’t). IO means input and output, and includes keyboards, mice, monitors, printers, speakers, headphones, and networking (ethernet, wifi, or 4G/LTE/5G). Technically, there’s other stuff too, like the motherboard, power supply, graphics card, etc. but that’s not as important for programmers except in some niche situations.
Memory – RAM and storage are two types of memory. RAM is fast and used for storing program data. If you make a variable in your program, it gets stored in RAM. RAM loses its contents when it’s powered off. This means it’s volatile. Storage keeps its contents even when it’s turned off, meaning it’s non-volatile. Things that are in RAM have memory addresses. However, newer programming languages abstract this concept away from the developer. But in older languages, like C++ or C, you might deal with memory addresses.
Exception handling and errors – sometimes, things go wrong. If your code does something that might go wrong, such as trying to open a file that may or may not exist, there could be an error. To deal with uncertain stuff, you should use exception handling. It’s a way to check if something is going wrong. Of course, sometimes you will encounter errors even if you try not to. It’s something every programmer deals with at some point.
Bug – when your software doesn’t do what you want it to do, it’s called a bug.
Debugging – the act of figuring out what’s causing a bug so that you can fix it.
Debugger – a tool for pausing the execution of a program (with things called breakpoints) so that you can see the status of variables and whatnot, and see just what is going on before a program crashes or otherwise encounters a bug.
Print debugging – instead of using a fancy debugger, some people might use print statements, like print(“the value of x at this point in the program is: ” + x). It’s not a best practice to do this, but many people do it anyway.
Programming paradigm – a way of thinking and doing things in programming. Some examples of programming paradigms include imperative (very old), procedural (old), object-oriented (current), and functional (used in academia and not much else).
The object-oriented paradigm:
- Abstraction – you don’t need to know how a car engine or transmission works in order to use it. You don’t need to know how something works in OOP. All you need to know is what it does and what you need to do in order to use it. Technology is all about abstraction.
- Encapsulation – code should be self-contained. If code is doing stuff all over the place, it becomes very messy and hard to fix or extend.
- Extensibility – the ability for code to have additional functionality added to it later on. If you get a job as a software developer, you will most likely be working on code that someone else wrote before you got there. As such, it helps if it’s extensible, meaning they designed it with future add-ons in mind.
- Classes and objects – you make a house using a blueprint. In programming, a class is a blueprint and an object is a house you make from said blueprint.
- Inheritance – you can have a class for a very general type of thing, and then make a more specific version of it. Instead of rewriting all the shared stuff a second time, you can make the more specific thing inherit from the more generic thing. Sedans and hatchbacks are both types of cars, so you could make a car class and then have the sedan and hatchback classes inherit from it. If a class inherits from another class, it’s a subclass. A class that has things that inherit from it is called a superclass.
- Polymorphism – the same thing can have different behavior based on the context. Overloading and overriding are examples of polymorphism. Overloading is when something has multiple meaning based on operands or arguments. Overriding is when a subclass changes the definition of a superclass’s method.
- Abstract classes – a class that you can’t make an object from. Maybe you have an abstract car class because you only want someone to be able to make objects from more specific types of cars.
- Interfaces – inheritance is used in “is a” relationships. For example, a sedan is a type of car. But interfaces are used for “has a” relationships. A person has a phone, so they could implement a phone interface. But a person is not a type of phone, so they wouldn’t inherit from a phone.
- Constructors – a special method within a class that prepares an object when it’s made. If you have a class called Person, maybe the constructor will help set up its instance variables, such as first name, last name, and so on. You can use a constructor that gives default values, or a constructor that takes arguments so that the person who is making an object can specify how to set it up. If you have multiple constructors in a single class, it’s called constructor overloading. They need to have different arguments. Not all programming langauges support constructor overloading though.
- Destructors – a constructor gets called when an object is created. A destructor is called when an object is destroyed. Not all languages have destructors because newer programming languages will deal with memory management for you, automatically deleting things that are no longer in use.
- Generics a.k.a. templates – a way to make something that can be used with many different data types rather than just one. Instead of making different addition functions for ints, floats, and doubles, you could make a generic addition function that has a generic type. If you see angle brackets with a type name inside them (such as <int>) then it means something is a generic.
Input and output – input and output, or IO, is important. If you want the user of your software to see something, you will need to ouput something to the screen, such as using print() to display text. If you want the user to be able to make a decision with what to do in software, you will need to get their input.
File IO – instead of just getting input from the user typing on their keyboard, you might want to get input from a file. You might also want to save data to a file instead of only keeping it in RAM.
Regular expressions – if you want to check that text matches a certain pattern, such as 5 numbers followed by two letters, then you’d need to use regular expressions, also known as regex.
IDEs – an IDE is an Integrated Development Environment. It contains a text editor for writing code, a debugger, compiler, terminal, and more.
Toolchain – all of the tools you use in order to make software.
Dependencies – software that your software relies on in order to run. If you make a program in Java, then you need to have Java installed in order to run it.
Java – a primarily object-oriented programming language, though with some multi-paradigm features (such as lambda expressions, which are borrowed from functional programming). Java is very popular. You can use it to make multi-platform computer programs or even Android apps. It can also be used for back-end development using something called Apache Tomcat.
JavaFX – if you want to make a graphical computer program in Java, you can do so with JavaFX.
Strong typing – you need to specify the type of a variable in Java (and any other strongly typed language).
Static typing – Java is an example of a statically-typed language. Static typing means a data type system where a variable has to stay the same type of variable, even if you change its value. For example, in a statically-typed language, an int variable has to be int. It can’t be changed to a string.
Bytecode – Java compiles to bytecode. It can be run on any desktop OS, just as long as it has Java installed.
JVM – the Java Virtual Machine. Java bytecode will run on any OS that has the JVM installed.
Garbage collection – Java automatically handles memory for you. You don’t need to worry about freeing up RAM, deleting stuff, or using destructors. Newer languages tend to be garbage-collected, but olders ones (like C++) are not.
Java weather project – this book demonstrated the features of Java with a program that downloads weather data.
APIs – an API (Application Programming Interface) is something that allows you to interact with a service without necessarily knowing all of their company secrets. If you interact with a weather API, you get their weather data, but you don’t get to see their code that makes it work. That’s a remote API, anyway. However, API can mean something else too. Java refers to their default library (prewritten code that you can use in your software) as an API. If you want to make use of Windows-specific features, you need to use the Windows API, formerly called the win32 API.
Python – an object-oriented programming language that was designed to be easier to use than most other languages.
Tkinter – if you want to make a graphical program in Python, as opposed to a text-based one, you will need to use Tkinter.
Interpreter – an alternative to a compiler. Instead of writing code, then taking time to compile it, an interpreted language such as Python lets you run it right away. Interpreted languages are often more convenient for software developers when they’re writing code, but they can be slower when they actually run.
Python weather bot – this book demonstrated the features of Python and how they can all be used together in a Twitter bot that uses both the Twitter API and a weather API in order to tweet about the weather.
Library – a library is a set of prewritten code that you can use in your program so that you don’t have to reinvent the wheel when doing common tasks. A library that comes with a programming language is usually called the standard library. But there are third party libraries too.
Qt – if you want to make a graphical program in C++, use Qt. You can easily make a Qt program in C++ with Eclipse.
Compiling – taking code that a person can read and turning it into code that a computer can read. If you code in C++, you will have to compile a lot. And unlike Java’s bytecode, compiled C++ programs usually only run on one particular operating system. You will need to compile a different version for a different OS.
Prime number project – the C++ chapter showed a simple prime number-finding program, with a link to a more fully-featured prime-finding program on GitHub.
Command line – some software has buttons you can click on. Some software requires text commands. A software developer will need to get familiar with using the command line, such as for remote access (SSH), copying files, compiling things, and command line text editors such as vim.
Shell – a shell lets you use text-based programs and control a computer without graphics. A very popular shell is Bash.
Shell script – a shell script is an easy way to make a simple text-based program. Shell scripts are commonly used to run other command line programs. A shell script is usually not as advanced as a program in a “real” programming language. Shell scripts are often like glue for other programs, putting multiple things together in a way that is useful, rather than doing things from scratch. For example, you could make a shell script that installs software updates and backs up files in Linux.
MinGW and Git Bash – if you want to do coding on Windows, you should install MinGW and Git Bash. macOS and Linux don’t need this stuff, because they come with a lot of useful programming things already.
Homebrew – if you want to code on macOS, it is highly recommended that you install a package manager called Homebrew. You use it at a terminal window, such as brew install htop.
Linux – even if you prefer to use macOS or Windows on your computer, every developer needs to learn at least the basics of Linux. Tons of web servers run Linux. You might write your code on a Windows laptop or MacBook, but that code might end up running on a Linux server in production. As such, it’s crucial to keep up with Linux. Linux is a free and open source OS kernel which is basically a ripoff of Unix. A Linux-based operating system is called a distro, short for distribution.
Package managers – a package manager is kind of like a free, command line, developer-centric version of an app store. A package is a piece of software, such as a program or a dependency for other programs, like a library or programming language. Package managers make it easy to install, update, or uninstall software. Linux distros have a built-in package manager, and Mac users can use the Homebrew package manager. And although there isn’t a great package manager option for Windows, you can still use MinGW to install a lot of useful command line stuff which you can use within Git Bash.
Important command line software – cd changes the directory you’re in. ls lists the files in your directory. !! will run the last command you used. pwd prints the directory you’re in. echo is kind of like print. ./ is used for executing a program, such as ./my_program.exe or ./my_program.py. git is used for version control and you use it with command line commands. history shows your previous commands. vim is a text editor. ssh is a tool for remotely logging in to a server (such as if you have a website with a web server). chmod will change the file mode bits of a file, such as chmod +x to set the executable bit for a program so you can run/execute it. Pipes (|) are used for combining programs by taking the output of one program and “piping” it to the input of another program. cat will show the contents of a file. > is used for writing over a file, such as echo “hello” > test.txt. >> is used for appending to the end of a file, such as echo ” world” >> test.txt. grep is used for searching, which is useful in conjunction with ls, such as ls | grep .py to show all python files in the current directory. touch is used to make new files. rm is used to remove files. mv is used to move files. cp is used for copying files. env shows environment variables. less lets you scroll through the output of a program more slowly rather than showing it all at once, as in env | less. tar is used to put files into a compressed archive (a tape archive), or to take them out of one. wget can be used to download a file from the internet. kill is used to kill a process. top and htop are used for showing currently-running processes.
Version control – a way to keep track of edits to files. A version control system also helps people collaborate and all code on the same project as a team. If you make a change to your code that breaks things, you can always roll back to a previous version, just as long as you made a previous commit.
Git – a version control system.
Repository (repo) – a place to put a project. For example, if you make an open source project, you could make a repository on GitHub.
GitHub – a place to put your repositories. It’s a good way to build up a personal portfolio.
Common Git commands:
- Make a repo on GitHub
- Copy the link for cloning the repo
- Open a terminal window
- Run the command git clone [url of repo that you copied]
- cd to the cloned repo directory
- Edit files
- Use the command git add . to add all edited files to be commited
- Use the command git commit -m “insert description here”
- Finally, do git push
Markdown – a markup language that lets you make simple documents with things like links, images, bold text, italic text, code markup, and more. It’s not a fully-fledged programming language, just something that makes it easy to make documents, for things like readme files or code documentation.
Open source – when someone lets you see the source code of their program, rather than only letting you use a compiled version of it, it’s called open source. When you can use an app but aren’t allowed to see the source code, it’s called closed source or proprietary. Open source is like someone giving you their recipe for apple pie, whereas closed source is like someone baking you a pie but not telling you the ingredients or recipe.
License – there are many different software licenses. Some licenses are for proprietary software. Some examples of open source licenses include Apache, MIT, BSD, and GNU GPL. And there are many versions of each, such as GPLv2 and GPLv3.
Readme – a file that has info the user of a program should read. It might contain a description of the program, instructions for how to use it, and things like that. On GitHub, readme files should be called README.md.
Waterfall development – writing code until you’ve finished the features. The emphasis of waterfall is on software, not time. Waterfall is an older style of software development. It means making big but infrequent software releases.
Agile development – a newer approach to software development. It’s based around time rather than features. You do a short agile sprint, where you have features you need to do, and then some features you want to do if you have time left over. Agile is all about deadlines.
DevOps – combining IT with software development. If you write it, you have to deploy it.
UML diagrams – a way to make a mockup of what you want your code to do before you actually go ahead and code it. A UML diagram will be used for something like a class or interface. A UML diagram has basic info about a class, such as its name, variables, and functions. Some people think UML diagrams are useful, but others think they’re a waste of time.
Web development – making software that is accessible in a web browser. Some people think web development means HTML, but HTML is just the tip of the iceberg. Modern web development is actually quite complicated.
Back-end – the code that runs on a web server rather than on a user’s device. Some examples of back-end stuff include Linux, Apache, MySQL, and PHP.
Responsive design – people browse the web on many different kinds of devices, such as phones, tablets, and computers. Because phones have smaller screens than computers, sites need to look simple on mobile to make up for the lack of space. Back in the day, websites were computer-centric, which was bad for mobile users. Then, people made two separate websites for the same site: one for computers, and one for phones. The server would try to figure out which one it should show you. But now, responsive design means making a front-end of a website that adapts based on its screen size. So instead of making one front-end for computer and one for phones, you have one responsive front-end that is used for every type of device. Bootstrap is a popular front-end framework.
Hamburger menu (☰) – if you go to a website and see ☰, that’s a hamburger menu. It basically means “we don’t have space to put everything on the screen all at once, but if you want to see additional options, then click/tap on this.” Hamburger menus are a staple of responsive design.
UX – user experience. It means the entirety of what the user sees and experiences. It’s like the term GUI, but a little more involved than that. A UX designer combines graphic design with technical skills.
HTML – HyperText Markup Language. It’s the structure of a web page. It’s a front-end language. It is not a fully-fledged programming language.
CSS – Cascading Style Sheets. It’s the style of a page, such as fonts, font sizes, colors, positioning, and things like that. CSS is used for front-end development.
Stack – a software stack means all of the different things you use to make something, and it’s usually used in the context of web development, because web development involves learning many different languages and tools. Full stack means front-end, back-end, and interactivity between the two. Two commonly used stacks are LAMP (Linux, Apache, MySQL, and PHP) and MEAN (MongoDB, Express, Angular, and Node.js).
WAMP/LAMP/MAMP – web development stacks. WAMP is LAMP but for Windows. MAMP is LAMP but for macOS. WAMP and MAMP are usually used for a software developer’s computer so that they can write website or web app code on their computer. But LAMP is what will run on actual servers on the internet. Bitnami is a company that offers premade LAMP/WAMP/MAMP stack programs that you can install on your computer to start with web development without the need for a separate server.
Databases – a way to store data in an organized way.
Relational database – like a more advanced version of a spreadsheet. Relational data consists of rows and columns. Relational data means there are associations between different parts of it. For example, a customer record in a database might have related columns for their phone number, email, password, and customer number. If a customer calls a company and needs help with their account, a customer support representative can find all their related info once the customer tells them their account number.
DBMS – Database Management System. Software that manages databases.
SQL – Structured Query Language. Used for querying databases.
MySQL – a popular free DBMS for relational databases. MariaDB is a DBMS that is MySQL-based. PostgreSQL and SQLite are also somewhat similar. This book uses MySQL.
Schema – the structure of a database.
SQL injecton – one of the many security issues that a database can have. However, there are ways to protect against it. Even though it is preventable, many people don’t code their back-end software very well, leaving them susceptible to attacks.
Apache – the server program used in the well-known LAMP stack.
PHP – a server-side programming language. It’s used for back-end web development. Among other things, PHP can interact with databases.
Security – if you have a website or web app, you need to consider security. The OWASP wiki has a lot of great information about web security. https://www.owasp.org/index.php/Main_Page
Password hashing – if you store passwords in a database, they need to use a one-way hashing function in order to be more secure. If someone performs SQL injection and exfiltrates private data from something like a users table, and the passwords aren’t hashed, then the hacker will be able to log in to any account.
Form submission – instead of only having static front-end pages, you can make it so that a web page can have a form that the user can fill out, and then they can submit it, sending data to the back-end.
Input validation – you can’t trust input from a user. Most users might be nice, but some users will try to hack your server. As such, you need to validate any input that comes from a user. This applies to both text and files.
Data structures – instead of just using ints and strings for variables, you might want to use something more advanced and useful. Data structures include stacks, queues, linked lists, trees, maps, graphs, and heaps.
Algorithms – step-by-step instructions for how to solve a problem. Two main categories of algorithms come up a lot in software development: searching and sorting. There are other kinds too though.
Big O notation – not all algorithms are equally efficient. You can measure how long it will take for an algorithm to run, based on the size of its input N, to measure something in big O notation, such as O(n), O(n^2), O(log n), and so on.
Design patterns – solutions or patterns that are useful in a wide variety of things in coding. One example of a design pattern is a singleton, which is a class that only allows one instance of itself to be created. In coding, some types of requirements or problems come up a lot, and that’s where design patterns can be useful.
Virtualization – computers these days are very powerful. You can divide up the resources of a single physical computer into multiple virtual computers. This process is called virtualization. A hypervisor is a piece of software that can run multiple VMs. A VM is a virtual machine, which is like a software-based computer.
Containers – a more modern alternative to VMs.
Networking – how computers can talk with one another over a network. An IP address is a network address of a device. A MAC address is a physical address of a device. Ports are used for different kinds of traffic. For example, port 80 is for HTTP, port 443 is HTTPS, and SSH is port 22 by default.
Cloud – this book mainly covered computer software development and LAMP stack web development, but cloud computing is getting more and more popular. Amazon Web Services, or AWS, is a popular cloud provider for developers. Some important concepts in cloud include elasticity, Infrastructure as a Service (IaaS), utility-like billing (pay for what you use rather than a fixed monthly bill), containers, and microservice architecture. Cloud is an alternative to having your own on-premises servers. Using a combination of on-premises servers and cloud servers is called hybrid cloud. Developers like cloud providers because it means a developer can concentrate on being a developer rather than having to be both a developer and a system administrator.
Multi-cloud means using multiple cloud providers rather than just one. So instead of going all-in with Amazon Web Services, you might have some stuff in Microsoft Azure, and some servers with some other provider. This way, you don’t feel locked in with a single vendor. If a vendor changes their prices or policies in a way that you don’t like, being multi-cloud makes it easier to switch from one to another, because you’re not too deeply entrenched in any one provider. However, multi-cloud is something that larger organizations will utilize. If you’re just making a solo app or website, you might only need one server or container, so there isn’t much point in having multiple cloud provider resources at such a small scale.
Personal projects – in order to prove to employers that you know what your resume says you know, you might want to make some personal projects, such as apps or websites.