How I tend to build projects, or why it’s usually painful on build tools

I’ll typically setup what I call a tripple-tree, or a quad-tree layout. Each project has three top level tree structures that represent a phase of “Getting it done”. Hacking it, building it, and distributing it.

A source directory (typically src or Source), that houses  the projects code, and basically everything you/I want under version control. Structure varies but I tend to create modular bundles out of habit.

A build directory (typically Build/Architecture/OS or Build/Architecture.OS), that houses all essential build time files for that configuration, that won’t be distributed. I test builds against multiple Operating Systems, and synchronise the work directory between machines; so being able to have builds of each concurrently tucked away is a bonus. Sometimes I go further and subdivide the build tree into different configurations, such as Release/Optimised/Debug builds, but I rarely have need to.

A distribution directory (typically Dist/Architecture/OS or Dist/Architecture.OS), that contains all the files needed for a user to simply extract to a folder on that given system, and run the program. Worth while for me, for the same reasons as the build tree, plus the added benefit of simple a zip/tar installation!

Sometimes I also create a fourth tree called ‘Vendor’ or ‘Deps’, that functions like the source tree, but instead contains the code for whatever libs are required. Plus customised project files/build scripts to compile them when needed.

Like wise, I’ll often have an associated set of FILES in the top level, and a documentation directory providing all pertinent information. I particularly pay attention to writing down notes about boot strapping builds, and porting the system to a new environment; because you never know when the next sap sending patches will be you.

Oh so many people ship IDE project files that reek of laziness or brain damage. Me, I’m so damn lazy that I don’t want to have to explain it, in fact, I don’t even want to edit it later. I just want the thing to *work* when I tell it to build sth. It takes time to do it that way, but it is usually worth it. At least, for cross-platform freaks like me.

Programming is a subject that I do take seriously.

Quick & Painless C/C++ header installations using rake

In wrapping up and refactoring my new rake driven build system, I’ve written numerous utility functions. Most stuff specific to compiling crap is in a custom “Builder” module that provides a templated interface to the current OS/Compiler kit, via environment variables and methods like make_object, make_shared_library. My top level rakefile also has a neato inference rule rigged together for handling my triple-tree and quad tree build patterns.

The real fun of the day however, is this baby:


#
# A magic function that generates file tasks that copy all headers from
# directory ind # to directory outd.  Any missing directories are created as
# needed.
#
# The return value is a list suitable for the right hand side of a task, e.g.
#
#   task :headers => header_magic(src, dest)
#
def header_magic(ind, outd)
  dirs = []
  hdrs = []

  find_files(ind, /.*.h[hxp]*$/) do |p|
    outdir = File.dirname p.sub(ind, outd)
    outfile = File.join(outd, File.basename(p))

    directory outdir
    file outfile => p do
      cp_r p, outdir
    end
    dirs.push outdir
    hdrs.push outfile
    CLEAN.include outfile, outdir
  end

  dirs+hdrs
end
find_files is another custom function, it simply takes a block and yields and file names matching the specified pattern. (In this case, more liberal than the usual header extensions but sufficient for my needs)
I call it header_magic, because it after all the other stuff I played with, it’s the closest to Clarke’s third law. Which is exactly what I want!
footnote: I just have my top level clean task nuke the entire build tree; so the CLEAN part hasn’t been tested.

Getting late but sleep is about the last thing I feel like right now. What’s the point really? I’ll just wake up in an hour or three, and be looking for ways to forget my dreams, or end up thinking my brains senseless. My dreams have been horrible lately.

It usually takes a few weeks of non stop moving before my body demands a proper crash landing. Now if only I could work myself that tired, and get real rest.

Something about having a dozen windows open and a gazillion tabs of everything running, reminds me just how much I hate task bars. Alt+tab ftw.

Just a fluke or signs of an impending FML moment?

The desktops entire display blanked out, yet the monitor continued to display that it was receiving signal. Regardless of what I did, it wouldn’t display anything! Managed to RDP into it from the laptop and found everything working perfectly fine. On reboot everything worked as normal. Obviously I made sure the male VGA connector was properly inserted, and reseated it, but that didn’t make any difference.


The big question is it a fluke, or associated to the freak overheat a while back? Either way, it doesn’t bode well be it the hardware (GPU, Mobo) or software (crap driver, crap Windows kernel).


Just woke up, couldn’t have dozed off for more than 15-20 minutes. Dreamt everything ended up suitably close to exploding or agonizingly ambiguous, that by the time dreams became peaceful, I could sense my mind grepping to find it’s way back and sort things out. I nearly woke up screaming.

I really think my sleep patterns are setting a new level in ridiculousness.

I have a lot on my mind, one could say much to much food for though. While I try to live in the moment, for the most part, my mind never ceases, it’s even worse when more on the idle side.

For some reason, I feel very tired..

When people say work, this is what comes to mind

What a typical working Thursday used to look like some years ago:

  1. Stay in bed until the last minute, because I barely had any the previous night.
  2. Get dressed for work in like 30-60s or something. Having shoes with nether laces nor Velcro helped.
  3. Cart 4-5 buckets of cleaning supplies across a drive way, up a staircase (maybe 15-18 steps, whatever it was, it was a stretched one), and half way down a hallway. Back then they were organised into palletised “Groups”, e.g. kitchen cleaning, bathroom clearing, etc; which her royal pain couldn’t stand but made it easier to deploy. So I had to be driven nutso over that.
  4. Clear the floors: piles inches deep of cloths, toys, food, dishes, papers, and dog faeces; much of it soaked in dog piss and often things were covered in the modern equivalent of gak. There was literally so much crap in every room, that stuff had to be scrapped off the rotting hard wood floors with an old trowel or something. I shit you not. 
  5. About three trash bags and countless dustpan-fulls later, the floors had to be swept.
  6. Make sure the cloths either made it into the washer, or got piled up for next week.
  7. Strip and change sheets for three beds
  8. Help dust every thing and wipe all the grime
  9. Prep the bathrooms for clearing; e.g. ditch the towels, bring in the supplies, shake the rugs, etc.
  10. Bleach and scrub two tubs and a shower; usually get cussed a blue streak over it. I don’t even want to know about some of the stains. Ventilation was like a bolted window or something; think the smaller room had a fan and an open door.
  11. Provide ‘backup’ with the mopping of the floors; usually by scrapping crap off the deck with my finger nails.
  12. Cart all the supplies downstairs and try not to trip over anything, *oy*.
  13. Sweep down the stairs.
  14. Start cleaning the living room an the den: see above points 4, 5, 6, 8, and 11.
  15. Be expected to leave 5+ Windows streak free that I’d rather throw myself out of.
  16. Cart all the supplies into the kitchen.
  17. Repeat above points 4 and 8 in the kitchen floors and counter tops using disinfectant. The once white counter tops were usually closer to bronze or burgundy esque colour; not even bleaching the freaking things could make much headway in getting them to *look* clean.
  18. Try to put away whatever pots/pans/dishes were still clean, while ma saw to the devastated ones.
  19. Help scrap out the Microwave, someone would always managed to nuke the MW instead of nuking the food.
  20. Clean and scrap out the oven.
  21. Scrub the walls all around the ground floor, while ma assaulted the stove top; interrupts being to get her other supplies /or help.
  22. Take a moments break to lean against a wall, while ma cleaned the wc next to the kitchen. While chewing me out over anything and everything.
  23. Cart the supplies back across the drive way and stuff them in the car. On a good day it might be windy, so there would be fresh air: and chasing after crap that flew away.
  24. Repeat point 11 for the kitchen and associated wc. If you tried eating off the floor at any point, I would suggest a Cyanide chaser.
  25. After six hours or so of that shit: go home or get dragged across a supermarket on the way.
  26. Fling every ounce of clothing into the wash and scrub…
  27. Grab something quick to eat and pour a drink; be thankful if my allergies settled down by then. Working out there blew through paper towels and sneezing attacks, like a hot knife through water.
  28. Try and catch a few hours of game time; be happy if not interrupted every 5-15 minutes.
  29. Hope to catch my favourite show, assuming we hadn’t had to work even further over time…
  30. Work on my studies; be happy if not interrupted every 5-15 minutes.
  31. Eat dinner; usually left overs or something quick.
  32. Eventually “Bed time”.
  33. Be glad that at long last, I’m no longer being cussed at all damn day long or treated like a pack mule.
  34. Actually get cracking on my studies, various projects, and, ahem, anything but a restful sleep…
  35. Finally tend to closing clandestine odds/ends, and pass out around 0500.
  36. Be thankful that Friday was a different job.
  37. Wish Sunday would inch by, so there would be something to do other than working on things.
My GOD, I can still see those filthy floors… the happiest day of my entire fucking life, was when they could no longer pay for the cleaning.
I swear, I have never danced like that in my entire life lol. Imagine finding 10k in gold under a rock, fuck yeah, it was that kind of joy at being let go. In my life, I’ve had to work three different weekly jobs like ‘that’ trip at the O’s place. One such job was working both a full and half day every week, but at least they didn’t have so many dogs like the O’s and the F’s did.  Some gigs were more tiring (especially the two-three years at the F’s place) but I don’t think any where was that bad on the grime. It was the kind of place you would feel like disinfecting your ass hole if you ever had to sit somewhere.
The jobs I get stuck doing now’re days, are a total breeze by comparison. For all the years I suffered through of Thursdays like that over the past 6-7 years, that when I wake up and don’t have to work on a Thurs’, you can bet that I’ve got a sigh of relief inside. Whenever I have to pass by that particular house on the way to somewhere else, the hair on the back of my neck stands up.
If you’ve ever thought your house was a mess, you ain’t seen jack shit until you’ve been in the real cleaning business.

When stuck using a dead monitor as a weight, I can’t help but wonder if a comparable barbell  or kettlebell would be as easy to lift off the deck, as a 21kg CRT lol.

A note on teaching what I know

When asked to teach someone something in RvS, I make it a personal policy not to use the [SAS] server or the NTF servers for doing it; I would consider it rude. Ofc, being able to host my own private server helps, lol. I can also always tell people no, hehe, a big change over being assigned to training details.

Now that I’ve spent plenty of years and several thousand hours at the tactics and techniques, I obviously know how to play the game. The part I like however, is since I am free of [SAS]—I don’t have to water down my techniques to that level of game play. I can just play like I want, and treat the clearing like I would if it was a real house. Damn, how many hours did I spend working on that stuff out of game… lol.