Good and Bad Practices – a Limiting Perspective

good and bad practices are a limiting perspective
Photo by Berke Can from Pexels

Growing up as software engineers, we typically spend the first few years of our careers studying various technologies and concepts from the programming area - what a list is, what a hash table is, what's JavaScript, what's HTTP, what is a client-server architecture...

The goal of this venture is for one to accumulate the necessary skills & knowledge to land their first jobs.

But apart from understanding "what" something is, over the years, the preliminary knowledge required to land your first job has expanded to also cover topics which help one not just write software that works, but also write "good code".

Most aspiring software engineers nowadays are advised to read up about the SOLID principles, about what "clean code" is, they're also taught to split up their applications using the MVC "architecture" and have separate models, views and controllers.

Continue Reading

My thoughts on Java Concurrency in Practice

My thoughts on JCIP

One of my key goals this year was to gain a good understanding of concurrency and multithreading. I've always had a tangent understanding of it at best. The book Java Concurrency in Practice was one of my first picks.

Sure, I've used multithreading concepts like promises & ajax in JavaScript before. I've also spawned go routines & used mutexes in Go. But I've never felt I'm proficient enough to state that I have a good understanding of this subject.

Hence, to bridge this gap in knowledge & skills, I decided to invest in several concurrency related books & courses. My intention was to start from JCIP and then move on to some additional courses. Initially, I felt that just reading this book won't be sufficient to understand the subject thoroughly.

However, after going through this book I didn't bother looking into any other concurrency course at all. It is one of the most succinct and yet thorough books on a given topic that I've ever read.

Additionally, I would recommend you to go through this book even if you're not using Java at all. It will give you a very profound understanding of whatever framework/mechanism your language of choice uses to tackle concurrency.

Here's why...

Continue Reading

Eliminate the undocumented TODOs with todocheck

todocheck logo

Yesterday, I released todocheck - a new kind of static code analyser for annotated TODOs.

Way too often, we let leftover TODOs slip into our main branch, which leaves your coworkers puzzles, looking at it a year from now.

They're thinking - what did I mean by "TODO: Move this to the users package"? What is the users package? It doesn't seem to exist anymore.

todocheck helps you fix this by forcing you to mark all your TODOs against an existing, open issue in your issue tracker.

That way, if you, at some point, close the issue, thinking you're done, the CI pipeline will sparkle in red as there is an open, unaddressed TODO in your main branch.

No longer can developers close a half-baked issue, rushing for the weekly sprint review to say "I'm done!".

Continue Reading

How can vim make you a better developer

The first time I encountered vim was during a Linux System Administrator course I attended a while ago. Didn't really know much about Linux back then. It just sounded quite fancy. During the course, the lecturer often typed in that 3 word command vim and edited some stuff. "Gee, that looks cool", I thought! So, determined to look cool myself, I got back home, opened a terminal, typed in the magic words and voila! - I was inside vim. So, with a great wish to write my first Hello World txt file in vim, I started hitting keys on my keyboard. And nothing was happening. Some strange beeps started coming out of nowhere and I felt utterly frustrated! So, my goal quickly shifted from typing anything, to exiting vim. Yeah, you probably know what follows. A key-hitting berserk got me while doing everything I can to exit vim. Finally, after failing my first clash with the editor, I was so thankful to have the X key at the top right of my terminal emulator. Now, this story should sound pretty familiar if you ever tried using vim. Well, eventually you learn how to exit it, and you learn how to type in symbols. But there is so much more to it. The endless sets of key-combos can leave you wondering what the heck you did after accidentally hitting a key. Nowadays, vim is the most popular text editor out there. Even some Windows users tend to use it although being an indigenous Unix utility. But what's the point? There are so many IDEs out there. Why would anyone bother poisoning his life with an endless vim frustration, when he can just install the first Javascript IDE google suggests. Well, although it is probably not suitable for any project, there are some great benefits in sticking with vim at least for a while. The greatest one being the user interface. However, the focus of this article is not that. Many articles can be found on the subject and perhaps I will make one in the future. Today, we will explore the much less highlighted merits of the vim editor.
Continue Reading

The ultimate challenge for aspiring developers

When I first started programming, I started creating some simple console applications following some course materials. I had to create some simple algorithmic-type programs such as implementing factorial, Fibonacci, etc. Although creating these programs might be fun at first, it's not like creating your own project from scratch. Shortly after that, though, I created my very own game. That was simply amazing! I never thought that you can create some of the most popular arcade games with so little knowledge. That's what hooked me up for programming. It was the step that made me look at programming not simply as a vocation, but a calling. But I realize that I was lucky to find someone from whom to learn how to make my own game and do it myself afterwards. Most of the newbie programmers don't have this experience and I think that is a shame. Today, I want to recreate this journey for you and help you create your own game.
Continue Reading

Languages High and Low

languages high and low

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.

When I started programming, I got introduced to C# and I thought it was pretty fun. As I advanced in my studies, I learned other programming languages as well. I learned JavaScript, PHP, Java. Even though I learned to code in these languages, what I didn't understand is why are there so many languages? What purpose did they all serve? Furthermore, I was curious where did all these languages came from? How did they come to be? What is a low-level language and why does it still exist? The goal of this article is to try and help you find the answers for some of these questions and to further fire up your curiosity in the nature of programming languages and computers. I will walk you through the evolution of modern programming languages. Why did they come to be and what problem did they solve.
Continue Reading

A computer science course for craftsman

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

Site Footer

BulgariaEnglish