04/09/2018 Programming Presentation of the course Learn to code from scratch with Python and Java

Presentation of the course Learn to code from scratch with Python and Java

Do you want to learn to code? Congratulations: you're in the right place for it! And you will not learn to program with just one language but you will do it with two languages: Python and Java. And best of all: it's totally free.

Why two languages?

We could answer this in a simple way with: because two are better than one. But no, we have a reason for that. On the one hand Java is a statically typed language with a syntax and structure very similar to C language (we could say of it: a more low level language than Java) with a readability level for those who face it for the first time significantly smaller than other languages such as Python; on the other hand, Python is a dynamically typed language with a syntax very different from Java or other C-based languages. Some people argue that separating programming languages in only two categories: ** high** and low level is simplifying things too much and propose another category, above the high level, for languages such as Python or *Ruby *, whose philosophy is to simplify its syntax and make the code readability the most important thing without overfilling its performance.

Everyone knows that a programmer spends more time reading code than writing code, therefore, doing it with a language whose philosophy is based on a principle of clarity and readability makes this task much easier. In addition, Python has conventions, like Python's PEP8, in which they explain about the Pythonic way in which the code has to be written, this means: although to solve a problem can be written an algorithm of multiple forms you have to always prefer the one with the greatest readability to whoever is reading that code (another person or you, weeks or months after writing it).

Why not learn only with Python?

Because it is always good to acquire knowledge should be a strong reason, but as the course progresses you can see that Python facilitates some tasks that you should know how to do them manually, simply by increasing your coding-related knowledge, but also because if you learn how to do something in a more-laborious way, when you know how to do it in Python, and probably with fewer lines of code and much more easily, then you can better appreciate what this programming language offers, why there are so many people in love with it and why it's so great to write and read code written in Python.

Static vs. dynamic typing

In the second point, static and dynamic typing have been mentioned, but without clarifying what these concepts mean. Let's go for it!

The typing in a programming language refers to the types of data that can be stored in that language; We'll have an entire post about this topic next, but as an introduction: in all languages you can store characters, lines or paragraphs, integers, decimal numbers, and so on. These data can be saved in temporary variables (we'll also see this in depth later), which are a fraction of the ram available on the computer, and during the execution of the program we are coding, the call to this variable will be equivalent to the data we've assigned and with the type of data we've assigned.

Now that we know what we mean by typing, or with the type of data, it's time to look at the differences between static and dynamic typing. The static typing is a type that has some languages (like Java, C y C++) in which when defining a variable you have to specify what type it is and this type of data will never change (a different value may be assigned, as long as it's of the same type);these languages require a compilation (convert the code we have written in binary code, which is what really understands the machine on where you will run it), these typing errors are detected during compilation time, so when executing them, they are free of this type of bugs and the programs run faster. Dynamic typing is easier to program but it's easier for careless errors to appear (although these errors are mostly solved by all IDEs and also by most current code editors), with this type you don't have to specify what type a variable is, but according to what it has been assigned is the programming language who defines the type for us depending on what is assigned at each moment, i.e.: with this type the same variable with the same name could be assigned an integer at one time, in another text and at a different time a decimal number; it's not a good practice (it's better that each variable deals with a single thing, with a name that allows us to know exactly what it will be used for).

What can we expect to find in this course

The idea is to explain in each post a different concept, and when you finish reading it you have understood it, but maybe it will not always be like this and it will be divided into several posts so that you don't spend a lot of time reading it. If the post is short probably in the same post you can find the explanation of both Python and Java; if it's an extensive topic or requires a more in-depth explanation, the part referring to Python and Java will be divided into different posts.

Something that will highlight this course over the many you can find online is we'll put special emphasis on good practices, among others the obligation to write clean code and the use of battery tests that will allow us to know if what we are coding works in the way it's expected or not. In addition, when you reach a level with which we know the minimum necessary to do exercises related to the subject learned, you can find proposals for exercises and one of the (maybe many) ways to solve them. This is very important: there's no single way to solve a problem in programming, our solutions to those proposed exercises aren't the absolute truth; if there are other ways to solve these exercises, respecting the basic principles of clean code and that the written code is as optimized as possible according to the knowledge reached so far will be perfectly valid even if it differs at some point to the proposed solution.

The Python Paradox

Finally, and to dismiss these lines leaving you with more desire to learn, it remains to make reference to The Python Paradox (a term coined by Paul Graham in 2004) which means that Python is outside of what is normally taught when you study a regulated course (programming lessons are usually taught with C/C++, Java or C#) if someone knows how to program in Python (or any other language or framework that isn't taught regularly) is because someone is self-taughted and has gone beyond what is usually learned simply because one likes to program and voluntarily in their free time has wanted strive to learn something new. And as in SargantanaCode we want to train great programmers we will do everything possible so that eventually the recruiters of the future work of your dreams prefer you over the other candidates for that job.

And if you follow us regularly (if not, what are you waiting for?) you already know what our farewell is: never stop programming! Stay tunned!

Javi Palacios

Javi Palacios


Computer Padawan and real reader enthusiast. The first day that I code I knew that I wanted to continue programing for the rest of my life. Compiling things on Linux since 2003 and enjoying the stability of macOS since 2006. Free software and technology lover.

New comment

Enter your name and email to comment, or sign in and these fields will be filled in automatically