Archive for March 13, 2012

#include "commonsense.h" (or .hpp)

danielsaucen:

Though I’ve only been a programmer for around five years; I do have some tips to throw at those who decide it is elite to post nonsense about programming. This list also applies quite well to those who have no experience in programming.

  1. Creating a “Hello World” program does not entitle you to regard yourself completely fluent in a programming language. (Much like knowing the word “Si” does not make you a master at Spanish)
     
  2. Being unable to grasp a fundamental syntax (such as using 2-D arrays) does not mean it is poorly implemented. It simply means you have not done your homework.

Read More

Read more

C++ errno Values

For those of you wanting to know what exactly the numbers that errno is set to correlate to, I have listed them below: (this way you can set errno and then when someone uses strerror(errno) they'll get the right error)

Read more

Make A Custom, File Oriented Debugger!

My logging function looks like this, it's very handy (especially since my server automation programs run for no more than a few seconds). It basically appends the error to the file saying what time the error occurred, what the error is, and the name of the exe that generated the error (pulled from argv so even when the exe is renamed it is still accurate).

Read more

File System Library

After doing some looking around, and trying to get the Boost File System library to work I realized that had I spent the same amount of time and energy into writing my own file system library, it'd be done and usable by now.

Don't get me wrong, the Boost libraries are very comprehensive, I just had trouble building the extra libraries, getting them properly integrated, and when all was said and done it didn't even work properly due to "Improper Permissions" (despite running my .exe as an administrator).

So I'm going to make a library/dll combo to manage some basic file operations (copy, move, delete, rename).

If there's a file op you want just comment and I'll work it into the C++ source.