Writer’s Block: Lunch Break

Do you bring or buy your lunch during the work week? How much money do you spend on food consumed during working hours?

Sponsored by Microsoft Small Business

Live Journals Writer’s Block

Used to bring lunch, but it was a waste of time lol.

Get up, get dressed, get ready, go to work, work straight through, come home and either eat lunch or wait for supper time, depending on the time of day.

I’m generally used to eating twice a day plus an occasional snack. My living habits have conditioned me against eating a breakfast, to the point that if I do, I won’t be hungry for lunch until hours later then normal. Some times when work is heavy, I skip eating until dinner, just to much bother: especially if work is early the next day, and eating dinner late wouldn’t be that much good. Then again, until recently I almost broke my inhale dinner, take nap routine :.

Lunch however, is generally my favorite meal of the day hehe.

Plan of Attack — tongiht through the weekend+monday

In no specific order:

0/ Train Ez, Spawn, possibly Ghost/Medic as well — operation marshal

1/ Write new interface for the ‘custom’ library on sas <---- implemented, remaining code is 'features', need to test it and place under revision control, along with other changes to the lib. 2/ Build mock-ups for GCHQ of the new docs

3/ Implement the install code for ‘that project’ I’m doing with a few guys from forums.pcbsd.org

4/ Test pythonic bindings to libxml2 (I may need this __soon__) <---- lxml interface to libxml2 accepted 5/ Evaluate gtkmm and py-gtk (I don’t think I like the wxWidgets api after spending so much time with Qt3/Qt4) — run tests under Winsucks, because linking against gtkmm and friends will be the big pain.

6/ look up the api docs for interfacing C/C++ code with Python πŸ™‚

7/ eventually get around to placing my .vimrc, .exrc, .Terry_shrc, and various .site_shrc files under CVS (or other scm) on Vectra. <---- vimrc and Terry_shrc imported, other files being less portable, some name convention needs to be worked out. 9/ try to complete social studies homework before [SAS] SOP Prototype Due Date.

10/ eventually catch up with posting more on my LJ then todo snippets

11/ download Wiz’s latest mix and let’er blast <--- it rocks 12/ Implement my admin scripts 13/ Update cougars settings

14/ Implement my ‘lister’ PHP script <--- done, just need to write the password locker. You know, life would really be sweet…. If I could get paid to use my brain, instead of saving it all for my off-work hours lol. No if I new any companies in this burg that hire and train self-educating-geeks :

Japanese beaver or Blackwidow spider?

Well I’ve taken care of most of the stuff in need of doing, realising that I couldn’t take care of the paper work until I hear from Valroe, saved time lol.

Since I’ve been unable to find anything suitable, I’ll probably end up creating a new library of code for the website…. One that obey’s a policy of not shooting the next coder in the foot, like the bastard taking pot shots at me through years old code >_>. The sad thing? I thought about the ideal implementation for hours at work (my job leaves me with my brain free 90% of the time). Yet, between various business…. It is approx 15 hours later……. I’ve still not had the freedom to work on it!!!

Yet implementing it,a nd making code on the website would improve a heck of a lot. Especially debug times, and probably save me more time in the long run. Which reminds me, looking at the code I’m charged with maintaining/fixing:

Judging code by WTF/Min

But what do you do, if the WTF’s are rapid enough to be measured in seconds?

0/ fill out paper work
1/ complete assigned work form hq
2/ test code

rest, I can’t think, I’m to busy thinking about food >_>

Muttering about my task list

I managed to fix the issue quite easy, I still can’t believe it was that simple… I wonder though, if this is what will hit me in the next fix-it task to come up:. I’d also love to punch people that don’t check errorous return codes in the face!

I remember the 6th commandment of C Programmers,

If a function be advertised to return an error code in the event of difficulties, thou shalt check for that code, yea, even though the checks triple the size of thy code and produce aches in thy typing fingers, for if thou thinkest “it cannot happen to me”, the gods shall surely punish thee for thy arrogance.

Especially since I’m the one being punished for anothers dickheadedness!

I really wish PHP had exception handling, WAIT !!! (a quick google of the reference manual later), PHP 5 added them, YKYMF! I smell a few additions to my utility library… unless what I need has already been universally implemented by someone hehe.

And in likewise reflection upon The 10 Commandments of C Programmers:

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest “foo” someone someday shall type “supercalifragilisticexpialidocious”.

Some people just don’t know how true that is!

Thumbing through the annotated edition, I can’t help but chuckle at this… And hope such a thing befalls the bastard that did this to me lol.

verily there be many, many ancient systems in the world, and it is the decree of the dreaded god Murphy that thy next employment just might be on one. While thou sleepest, he plotteth against thee. Awake and take care.

Ok, so maybe I am a jerk sometimes ^_^

Anyway, I got a little bit of time before bed. I’ll use that to take care of a few odds and ends, and I’ll finish the other work I need to do tomorrow night.

GIGO, How to debug and fix code the hard way

THAT SON OF A BISCUIT BAKING PIECE OF HOG CRAP OF A MODULE !!!!!

I’ve finally found the problem that, i spent 3 hours trying to prove was broken. Only to find out, the ‘contract’ behavior it expected from it’s environment at fault. And the rest of the module, is such a hopeless pile of shit, that I didn’t realize it, until I found the simple fact.

Garbage In, Garbage Out, but no Error message.

I never checked the data stream output, because the interface test failed. But it actually did do exactly what it was supposed to do, just with garbage values, which through off the rest of the code… That ignores errors rather then handling them.

If I h ave got to kick the bitch in the teeth twice a day to do it, this website will furfil the [SAS]’s needs.Or it will get ripped apart bit by bit and rebuilt as something that will serve them well!

Song of the day: 2008-09-08 / Highwayman



[Willie Nelson]
I was a highwayman. Along the coach roads I did ride.
With sword and pistol by my side.
Many a young maid lost her baubles to my trade.
Many a soldier shed his lifeblood on my blade.
The bastards hung me in the spring of twenty-five.
But I am still alive.

[Kris Kristofferson]
I was a sailor. I was born upon the tide.
And with the sea I did abide.
I sailed a schooner round the Horn to Mexico.
I went aloft and furled the mainsail in a blow.
And when the yards broke off they said that I got killed.
But I am living still.

[Waylon Jennings]
I was a dam builder across the river deep and wide.
Where steel and water did collide.
A place called Boulder on the wild Colorado.
I slipped and fell into the wet concrete below.
They buried me in that great tomb that knows no sound.
But I am still around.

[in unison]
I’ll always be around, and around, and around, and around, and around.

[Johnny Cash]
I fly a starship across the Universe divide.
And when I reach the other side,
I’ll find a place to rest my spirit if I can.
Perhaps I may become a highwayman again.
Or I may simply be a single drop of rain.
But I will remain.
And I’ll be back

[in unison]
again, and again, and again, and again, and again.

— title: Highwayman; written by: Jimmy Webb; performed by: Willie Nelson, Waylon Jennings, Johnny Cash & Kris Kristofferson, “The Highwaymen”

And this appears to be the old music video, mmmm:


Of languages, libraries, and tools

I have been contemplating my standard language/library issue with care, although I’ve yet to finish most of the tests…. Courtesy of work, laziness, and to much work on the website lol.

So far, it seems to me that language wise my best thoughts:

Python, I don’t really ‘like’ python but I can do a tremendous amount of work in it compared to other languages, time wise. And it’s fairly easy to implement and test stuff — worst thing I can say about it is it’s interpreted and the regular expression support is done via a standard library module. Although jython (compile to byte code, but compares to a smaller version of an old CPython release) and ironpython (python for .net clr) should help the former, and the api for regex ain’t that bad, but sucks compared to Perl lol (like most languages seem to, that don’t steal Perls syntax or likewise make it a core element of the language syntax). Python also can handle interfacing with other languages well enough between the CPython, Jython, and IronPyhon implementations.

Java, great syntax and fairly logical. The byte code is portable enough between Sun JVMs and it even has the portable Swing GUI toolkit, although I’d probably end up using SWT or the WxWidgets bindings. The bad things about Java, although you can compile to native machine code, ya need to get the GNU Compiler for Java (GCJ) working first. Regular expressions are done via it’s libraries rather then syntax, and. Well the only _nice_ way of saying it, most of the tools with the JDK eventually piss me off, but I like the language aside from that. The only major con is it is as OOP-centric as I’ve ever seen, and it’s that way by design.

C++, lower level then any of the others and offering the best level of interface to C code of any of them around ;-). I personally prefer Java’s syntax over that of C++ but it still gets the job done. It’s just a question of how often you want to press Shift while typing… One of the best things, the STL is quite nice and well enough supported now to be worth using. Although, in my experience when working around C interfaces, the STLs value can go out the window, but maybe that’s just how long I went before using the STL. One plus, unlike Java or Python, you get a more traditional pointer, not to mention a few interesting things in the std::namespace and boost libraries. Not sure what shape exceptions support is like under various system compilers, but I don’t think that I’ve ever seen C++ code using exceptions outside of examples or perhaps the FAQ :.

Useful points of interest:

WxWidgets for the GUI — portable to target platforms of most interest and in all three of the above languages (and a few more too).

libxml2 for XML — portable to target platforms, but seems to only have C++ and Pyhon bindings easily available, libxmlj (for java) I think would need compiling and I haven’t tried that under FreeBSD or Windows yet.

Semi-Native Regular Expressions — Boost libraries for C++, Pythons own regular expression module, and ditto for Java (not that I like them).

std::string, str, and String classes — basic string handling in C++, Python, and Java. Boost and WxWidges also provides wxString.

MySQL bindings — database operations; quickly available for C++, Python, and Java (JDBC based). Using SQLite in C++/Python is also easy enough but I’m a bit leerly of Java-related connections for SQLite3.

As to the other stuff that was on my list:

C++ and Python provide suitable IPC systems, never have looked at Java in that light. Most of the stuff I need, is basically provided by the C libraries under POSIX systems and Windos, Python has a suitable interface to it, so I’m happy hehe.

Python has good enough built in support for common compression and archive formats. Whatever can’t be done via java.util.zip hopefully could be done via JZlib, I’m not familiar with anyhing ZLib under C++, but there is always the traditional interface ^_^.

I haven’t considered the network side that much. Although I sometimes find it a bit lengthly, I don’t really mind working with the C-style sockets library I’ve used here, using the windows sockets library shouldn’t be to far off from the ones used on *BSD and GNU for my needs (aside from headers/linking). Python has support for a number of protocols (and pwns Ruby on documenting the classes for most protocols IMHO), Java well enough out of the box, and both Python and Java provide usable interface to TCP/UDP. WxWidgets also has a few things as well but more limited, that might be worth looking at, since I’d rather like to use a similar interface in each language, while still leaving code that can be read.

As to the ease of use and deployment, that is always a tough question. Under FreeBSD and Debian at least, they are all ‘easy enough’. Windows of course, always has to be the pain in the ass. But for total portability this is an AoR where Python excels. When it comes to deploying stuff, it gets tricker. Windows lacks a package manager and you eventually have to draw a line between what you’re stuck bundling and what your stuck making a dependency. One of these days I need to look at py2exe and see how it would work out for what I’ve a mind to setup.

Big pluses:

Qt4 for C++ and (generally) Python is great and works on all my systems, QtJambi I’ve never tried on FreeBSD yet, but would be interesting if it works. The only thing I hate about Qt, the commercial license costs an arm and a leg :-(, but most of my needs fit within the (free) Open Source Editions license terms with a smile.

WxWidgets seems to be less painful then GTK+ under Windows while still supporting many languages, although GTK+ would probably be more fun to learn in my case. It also has nifty things, including string/regex classes.

MySQL and SQLite are generally portable and have bindings to other languages quick & easy enough. I’ve never used SQLite on a project, since I run MySQL on one of my own systems to service all my SQL-related needs πŸ˜‰

When it is all said and done, I really think Pyhon is the best choice… I dunno why or how, but it seems that way! Hmm, to re-dive into using Python for most tasks, or to get C++ crazy… Or live with using both side by side? For my own sake, I think I should sake fuck Java! But it is a great language in it’s own right.

Oh well, maybe in a few months I’ll have figured out which path to take. I can always make use of other languages and tools, but I very much need to find a “primary” set to work with!

think:
switch(choice) {
case PYTHON_ONLY:
// Python becomes my primary language
break;
case CPP_ONLY:
// C++ becomes my primary language
break;
case PYTHON_AND_CPP:
// use both side by side
break;
default:
goto think;
}

My laugh of the day, 2008-09-08

β€œTo bring a MicroVAX to its knees, try twenty users running vi β€” or four running EMACS.”

I just couldn’t help but smile, nod, and laugh lol. Vi is a fairly light weight program in todays world, and was designed in a time when just moving your text editors cursor was probably slow as watching paint drying. Emacs on the other hand, tends to be rather hefty in most good implementations, I think it was once a cottage indrusty to make light-weight emacsen.

And to this day in the form of GNU and X Emacs is, one small operating system, but a huge text editor compared to the nimble Vi. I don’t go much in for the Vi Vs. Emacs stuff and vice versa, because I use the Vim which is the only thing better then Vi πŸ˜‰

The days woes

I think if I have to look upon another line of code on the website tonight, I’ll go mental! Maybe it’s lucky for me, that tomorrow is such of a hell of a long job, that I’ve got to go to bed early to survive it lol.

Even a spider needs sleep eventually

The best way to describe old code on the site, is a scripting language with many globals, almost no regard for scope, rarely any indentation, extremely long lines, and compounded with (often shitty)HTML embedded in multiple layers, and designed in such a way. That if you so much as add a comment somewhere you’ll probably break something lol*. It’s an exaggeration of course, but it is essentially _that_ bad to work with. Much worse when you consider that system upgrades can often make subtle changes that only an asshole would’ve assumed never would change. I’m tired of having to think up band aids around shit that shouldn’t have been written in the first place. I’m no brilliant programmer, but for the love of HAL, at least try to do a decent job!

[SAS] has had one very negative impact on my life, I can’t stand assholes that do things half-assed, whether it’s running around like a headless chicken, or making toxic waste look pretty.

In a lot of ways, I wish I could just rip the website part… Build it anew, as Operation Excalibur was meant to experiment with locally. But people would likely not like that idea, because all they get to see is the ‘outside’ of the site, not the innards. *SIGH*, I don’t like rewriting stuff from scratch, but I don’t like being forced into bubble-gum solutions with bubble gum on the bubble gum either. I know Wiz isn’t a code monkey, tbh he would have a good excuse to write putrid code, but the sad thing? The jackasses who wrote the code we’re working on, were supposed to be an educated man. I really hope, if that person ever gets a job that involves computers and programming or webwork, they stick a cattle prod up their ass at the sight of the work being done. At least Wiz makes an effort, that’s more then I can say of the person that hashed out most of the websites less-nice modules.

I still need to fix one module used in the selection course, and after having spent more then 3 hours reading, thinking, and testing. I still can’t find the reason why it stopped working lol. The S.O.B. in question doesn’t even have anything to do with our recent changes, but no… It’s gotta be a prick and break, without reason, without word. To be honest, I never knew how much I would miss exception handling before I had to live without it, even if I never really used exceptions in most of my code lol.

Tis the nature of my sort, I think, to be pissed off and frustrated with such crocks. Including the kind that I wouldn’t even wish on a machine let along a programmer. One thing I do know, it’ll have to wait until at least Wednesday to get fixed, because I’m going to be working like a dog tomorrow and Tuesday. Oh man, what I would do if I had a week or two of nothing else to do but wage code-warfare upon building a more robust website.

* For those that don’t know, a comment is a section of code that is totally ignored when running it, e.g. int foo = /* comment */ 1; is treated as if /* comment */ was never there.