Software Engineer, Consultant, Speaker & Technical Trainer

Category: Computer science (Page 2 of 4)

A computer science course for craftsman

When I started studying programming and computer science, I was capable of doing it from morning until dawn. It was an addiction. It felt like those days, when I was playing World Of Warcraft. Only this time I was doing something a lot more useful. The reason for my dedication was my deep interest in learning how things worked.

How do you make your own exe file?
What is it like to make a game?
Can you make your own Facebook?

But as you advance more and more into programming, you find out that much of the things you are interested in are hidden behind various abstractions. Nowadays, when you want to draw a pixel on a screen, you call the magic function Draw(x, y), from some library and it does the work for you. You don’t get to manipulate the bits of the screen yourself.

And this high level of abstraction is what keeps the industry going forward and lets you focus on higher-level tasks such as choosing the best algorithms for processing the data you are working with, or focusing on more sophisticated topics such as machine learning.

But I am that kind of guy, who always strives to delve deep into the details of the low level nature of machines. I am not satisfied from knowing how to use a function for drawing a cat on the screen, I want to know what are the actual mechanics done on the bare metal for achieving that.

I’m not satisfied with knowing that you build a C# program by clicking Ctrl+F5. I want to know what is the process of transforming a stream of text into a stream of bytes, that the computer knows how to interpret. This genuine interest in the nature of computers is what fuels my passion for computer science.

And if you are like me, then I have a challenging conquest for your weary mind, young padawan.

Continue reading

Understanding Standard Input and Output


This article is part of the sequence The Basics You Won’t Learn in the Basics aimed at eager people striving to gain a deeper understanding of programming and computer science.

Somewhere in the first lectures of a programming basics course, we are shown how to take input and show output on the terminal. That’s called standard input/output or just Standard IO for short.

So, in C# we have Console.WriteLine and Console.ReadLine.
In C++, we have cin and cout.

All these things are associated with the topic of Standard IO. And what they tell us is that the standard input is the keyboard and the standard output is the screen. And for the most part, that is the case.

But what we don’t get told is that the Standard IO can be changed. There is a way to accept input from a file and redirect output to another file. No, I’m not talking about writing code to read/write files. I am talking about using the Standard IO for the job, via the terminal.

Continue reading

What you don’t know about sorting algorithms


This article is part of the sequence The Basics You Won’t Learn in the Basics aimed at eager people striving to gain a deeper understanding of programming and computer science.

Last time, we delved into bitwise operations. This time, we will look at a more high level computer science concept – algorithms.

When we first get introduced to algorithms, we normally start with learning sorting algorithms. In comparison to other algorithms, they are easier to grasp. And if we pay attention in class, we will do a good job at understanding them. However, what we don’t learn in these classes is when can they be useful.

Continue reading

Introduction to bitwise operations


This article is part of the sequence The Basics You Won’t Learn in the Basics aimed at eager people striving to gain a deeper understanding of programming and computer science.

Last time, we talked about character sets and encoding. This time, we will return to dealing with binary numbers. However, this time we won’t examine how binary numbers work and what is their nature. We have covered that in previous articles. Today, we will see how to apply that knowledge in practice by examining how bitwise operations work.

This topic is usually neglected in a traditional computer science curriculum (At least it is in some universities I know). But I think that this knowledge can be useful for two reasons:

  1. Expanding your computer science knowledge by gaining a deeper understanding of binary numbers and of low-level computer science aspects.
  2. Gaining a valuable tool which can be useful when pursuing specialization as a low-level programmer (Embedded developer, for example).

We will start by examining what tools do we have at our disposal – the operations which modern programming languages provide us with. Then we will move on to applying that knowledge for actually manipulating numbers in a binary fashion and finally – we will see some real-world examples of how bitwise operations are used to achieve a highly efficient system.

Continue reading

What you need to know about character sets and encoding


This article is part of the sequence The Basics You Won’t Learn in the Basics aimed at eager people striving to gain a deeper understanding of programming and computer science.

My last article was about different data types and some tricks with them. We talked a little about characters as well. However, working with them can be a little bit strange due to the presence of a fancy term in computing called encoding.

Today, my friend asked me to go and fix the subtitles for his movies. He had been telling me that some strange symbols appear all the time. So he tried reinstalling windows and changing all sorts of options but nothing seemed to work. He clearly had no idea what an encoding is. However, I guess that is normal since he doesn’t have a CS background. But there seems to be a lot of developers out there (me, including, in the old days) who don’t know what encoding means. Surely, they might have heard of UTF-8, but what is it? We have ASCII right?

Well, I am going to address the issue of encoding in this article as I think it is fundamental to anyone getting his hands dirty with programming and computing. It seems not many programming basics courses cover this topic in much detail.

Continue reading

« Older posts Newer posts »

© 2020 Preslav Mihaylov

Theme by Anders NorenUp ↑

BulgariaEnglish