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

This entry was tagged on #c++ and #rant

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

This entry was tagged on #c++ and #rant

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

This entry was tagged on #rant, #spaces and #tabs

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

This entry was tagged on #c++ and #rant

« Page 2 / 10 »