why my productivity goes down the drain when using computers...

today i wanted to write a simple c++ script that prints out a row of five different values based on inputs from 1 to 5, the highest value being highlighted in red, displaying ninety rows (days).

i'm using winxp at work. yesterday i installed the borland compiler. today i started out by looking up the syntax for loops. the first step was to make the program print out the number of days using a tab for alignment.
the code wouldn't compile because the first include read "#include <studio>", not "#include <iostream>" because the first script was written using ms visual studio whereas now i'm using vim.

anyway, then i got pissed off with the behaviour of the compiler to put the compiled exe in the same folder as the compiler as opposed to the source folder of the script (what i wanted actually). this can actually be changed by using different options but still....

so i created a .bat file in my homefolder (c:\documents and settings\<username>) - where the cli opens by default. the batch file should take the source file name as argument, compile and put the newly created .exe file in the same folder as the source file.

as the next step, i have to look the batch argument syntax but in the meantime i'm writing this text. i have this urge to go brush my teeth, too. oh, and a mail just came in....

thus my productivity will not soar due to the following circumstances:

write script for displaying values (the goal >> productivity) {
looking up usage of vim {
browsing web because i can't frickin' remember the command although i used it yesterday (:set number // :set nonumber)

}
looking up syntax {
write batch for compiling {
browsing web
looking up syntax
trial and error (that part was surprisingly short because the argument %1 in batch files is replaced and concocted even within a filename e.g. if %1 were dumb then the following commands would be: run %1.bat --> run run dumb.bat || my, what a %1ass --> my, what a dumbass
}
}
}

insert anywhere:
answer mail
write this text file as it might make good fodder for my website which needs work resp. more content too

i'm sure my employer would hate me for all of this...

add-on:
writing the batch took me 30 mins inc. looking up the info i needed. i even threw in an additional batch which took me 30 secs but allows me to run the compiled exe from the same directory

in the end it wasn't that bad... did get some work done and it's even more comfy now compiling scripts and running with less windows open. yawza!
the only thing that's still eluding me is the coloured code. apparently it's not that simple and even if i write a scipt on xp there's no way to be sure it's gonna run on fedora too.

and just in case you've become greedy,
here are the two batch files available for download:
-compile (description available inside the batch file)
- run (same as above)


back to index