Entries tagged “#rant”

Tue 21 August 2018

My system's time was so wrong, that even ntpd didn't work

Hi, Time management is always hard. I mean, it's hard for ordinary people -- the internets are full of ebooks and tips on how to organize your time, and there are lots of books about the problem. It's also hard for programmers -- you need to take into account different timezones, those … read more
Thu 01 March 2018

C++: Shooting yourself in the foot #3

Hi, Everyone says that programming is complicated. Is it? Well, actually it is, especially if you're using your programming language in a non-recommended way. Take file input/output for example. In C++ there are some ways you can perform file I/O: std::ifstream is one example. Multiple frameworks like … read more
Sun 11 February 2018

C++: Shooting yourself in the foot #2

Hi, There are people in this world who are forced to use C++ against their will. Those people often defend themselves by writing C code, and by compiling it with a C++ compiler. Then hope that noone will notice. There are a lot of problems with this, and this short … read more
Sun 11 February 2018

You're using TABs in a wrong way

Hi, Tabs or spaces? I'm sure you have a strong opinion on this subject, as probably everyone. Can we summarize the arguments for each side? Advantages of TABs: Using TABs means the source code uses less space. Each 4 bytes (2 bytes if you're a Ruby programmer, or sometimes 8 … read more
Sat 20 January 2018

C++: Shooting yourself in the foot #1

Hi, Recently I was browsing some code, and I saw some construct that maybe is not very obvious to everyone. The code was located inside an important function, which took a hash in the argument and performed some action based on the contents of this hash. Pseudocode: typedef process_t { // ... uint8_t … read more