Scrutinizing different design decisions

A few days ago I shared a bit of source code from twitch, and suggested possible ways to improve it. After publishing my post, I approached one of the most qualified developers at the company I work for, and told him about it. We had a nice constructive conversation, in which he helped me seeContinue reading “Scrutinizing different design decisions”

Twitch banned user names

Twitch source code was leaked into the internet, revealing emails and passwords, streamers salary, and also – a rare look inside a profitable piece of code. A certain code snippet has found its way into r/badcode: What entails it as a “bad code” exactly? Obviously seeing a long list of or statements is code smell,Continue reading “Twitch banned user names”

The average programmer is probably worse than you think

Today I came across a problem from code wars. Someone posted it online and felt bad because he’s always off from the best solutions, asking how can he improve. Here’s the problem: You can solve the problem yourself before continuing – Here’s the solution, which is considered “best practice” and “clever” – I don’tContinue reading “The average programmer is probably worse than you think”

Primitive obsession – why you should stop using int and string everywhere

From high-school through college or university, the most basic of things is learning the primitive types: int, string, byte, etc. That’s why I was astounded to learn these are frowned upon, in my transition from the academy to the industry. In case you haven’t stepped out of the academy yet, this might seem natural forContinue reading “Primitive obsession – why you should stop using int and string everywhere”

Tests – enforce behavior with your unit tests

What should be your guidelines when writing tests? Especially these targeting “simple behaviors”? I’ve just finished working on a bug – some function raised an error we didn’t take care of, so I added a proper handling mechanism. Next thing I need is to get my code approved in order to merge it into master.Continue reading “Tests – enforce behavior with your unit tests”