In this first series of posts from Warrior Minds I will write about Software Development basics. You will learn the basic building blocks of software development so you have all the tools you need to start developing. This series of posts will use Java as programming language and Eclipse as IDE, but these basic building blocks will apply, mostly, to all Object Oriented Programming languages. Once we get finished with the Basics series, I will continue with more advanced series like mobile and web development.
The idea is that each post will explain a couple of software development topics and they will also have sample code that you will be able to download from GitHub so you can try for yourself and play with it to be sure you understood the concepts explained in a specific post.
If you need help in anything related to the post, or if something was not clear or if you have suggestions for a new post or series, or if you need specific help contact me at firstname.lastname@example.org and I will try to answer as soon as possible.
After this brief introduction, let’s get started!
Welcome to the amazing world of Software Development!
Software development is certainly one of the most amazing things to do: you can write software to create a web page, or make use of all the technology in your mobile phone or even you can write software that controls the next Mars Rover. This is what is incredible about software dev: you can use it in a wide range of applications.
BUT…. it doesn’t matter if you write code for the ultimate spaceship that will take humanity to the stars or you write code for a “Hello World” web-app using Java, Python or .NET, you NEED TO KNOW SOFTWARE BASICS!
First thing to know: What is programming? This one is easy: It is telling the computer/device to do what you want to do. As simple as that.
You might be wondering: “How can I tell the computer what I want it to do?”. Of course you need a way to talk to the computer, a set of instructions that you write, then the computer processes and executes what you wanted it to do.
After some thinking, I came up with some blocks that I think make the basics everyone who wants to write software should know:
Now I will briefly explain each block, since each block will be deeply covered in one, two or more blog posts during this series.
Variables & Operators
When you program, you need to handle information from numbers to strings of characters or even more complex data and then you need to do some operations with them like addition, subtraction. You will learn Java’s data types and operators that will help you do your software. This is the most basic knowledge you need. You will be using this EVERY DAY once you become a software developer.
Classes, Objects & Methods
You need some structure to your code. You shouldn’t just write operations and variables as you wish. You will use methods, classes and objects for this. This are the basic blocks for Object Oriented Programming, discussed later.
If you think programming is a straight-line business, you are completely wrong. In your code you will need to make decisions at some point or execute a set of instructions repeatedly until a condition is met. Here you will learn all the control statements available for you to achieve this.
Object Oriented Programming
This is a BIG block. I mean really BIG. This will use everything you already know and transform it so you can write quality code. This is a way to write code that will allow you to achieve many things, including code reuse and most important of all, a software developer mind. This block involves a lot of concepts: abstract classes, objects (again), interfaces, polymorphism (what?) and many more. You will see when we get there and you will understand it all. I will dare to say this is the Holly Grail of software development.
Collections & Enumerations
Sometimes you will need to have a collection of items to work with. And sometimes you will need to give names to constant values and use them in your code. This is what collections and enumerations are about.
Exceptions & Error Handling
You make mistakes, face it. It will also happen in your code. There are some ways to handle errors in your code. Because if you don’t do this, your program will CRASHES during execution and this is not good. Do you want an example? You expect certain data type to make some operation and you receive a different type. Result? Your program crashes. You need to do something about it.
IO? Jupiter’s moon? NO! This stands for Input/Output. What use it will be if you have a code that always has the same data and everything happens within it and you don’t see a result? You need a way to input data and see the results.
OK so you think you are an expert now? Well… almost. Answer this question: what happens if you have a program that has a user interface and you need to run some process while the user tries to input his or her data? He/she won’t be able to do it, because the program will be frozen waiting for the process to end. This is not good at all. But we have a way to solve this: threads. This one is tricky.
Annotations are not part of the program but they provide some information. They help you to indicate the program or compiler to do something when you need it. For example, you can use an annotation to indicate that some method is deprecated. More on this later.
When we get here you will see that you seemed to be dependent on the type of the data that you use. Generics change this idea so you can use the same code but with different data types. Maybe this seems a little weird but you will see how this works. We are still a long way from here, but it will be worth it. I promise.
OK this is all for today. It seems like much, and it is. But keep up to it and you will understand, learn and discover an amazing world.
See you next week
** Questions? Leave a comment or email me.