BrainsToBytes - page 6

The Open/Closed Principle

The Open-Closed Principle is responsible for the “O” of the S.O.L.I.D principles. Originally coined by Bertrand Meyer, it states that: Software entities (classes, modules, functions, etc.) should be open for extension but closed for modification. It seems like an incredibly simple principle, but it’s behind most of the best practices we us...

Read more

4 Unhealthy developer habits and what to do about them

All professions have occupational hazards and risks, and software development is no exception. While it’s true that we rarely have to deal with man-eating sharks or explosions, ignoring some of our profession’s challenges can lead to lots of trouble. The good news is that most of our problems are the result of some form of neglect. Fixing them ...

Read more

Ruby modules in-depth

Modules are incredibly flexible and powerful constructs that help you organize your code in a more… modular way. They let you package related functionality in a cohesive unit you can use to extend the behavior of objects and classes. Using modules to bundle together related behavior Ruby gives you two options to bundle behavior into units: clas...

Read more

Things I wish I had known when I started programming, Part 3

Yepp, more things I wish I’d known when I started, 3rd edition. You can find the first article in the series here. And the previous article here Beware of the arrogance trap Arrogance is one of the worst traits a professional can develop. It’s not only about how it affects our relationship with other people, but that’s also worth considerin...

Read more

Defensive Programming Fundamentals

When your program starts running in production, the conditions and cases you thought impossible will happen, period. In reality, it’s impossible to ensure that your code will have optimal running conditions all the time. As a developer, you’d like to ensure your projects will be able to cope with the imperfections of the real world. That is why ...

Read more

Writing good variable names

There are only two hard things in Computer Science: cache invalidation and naming things _Phil Karlton Despite being one of the easiest ways of improving the quality of code, writing good variable names is perhaps the most overlooked skill in a developer’s toolbox.  Sharpening your naming chops is a sure way of improving your code’s readabi...

Read more

Things I wish I had known when I started programming, Part 2

Let’s take a look at some other things I wish I’d known when I started my career. You can find the first article in the series here. Write your own side projects Do you know what’s one of the best ways of polishing your software writing skills? Sitting down and writing your own software projects. Shocking, isn’t it? Programming is a practic...

Read more

Things I wish I had known when I started programming, Part 1

Learning to program is a long journey, and it can take years of constant effort to become good at it. When I started writing my first lines of code, I felt super excited that I could make a machine do things. Granted, they were very simple things, but I felt I could achieve anything with this cool new skill. After a while, I started to notice t...

Read more

Welcome to Brains To Bytes

Hello!, and welcome to Brains To Bytes. Software development is an incredibly exciting field full of opportunities and great ideas. It’s also unlike lots of other crafts in an important sense: the end product, instead of being a tangible thing, is materialized thought running inside a chip. This notion of programming as a translation of your i...

Read more