This is why I have a love/hate relationship with C++

To make the About This App dialog appear from the System Menu (what comes up when you right click on the icon of the application), considering the About Dialog was already working from the Help menu…

Typical of C++, this requires editing 6 different files, header files, source files, resource files, etc, 98% of which is adding boiler-plate un-original code. There is no reason it needs to be this complicated. On the other hand, a lot of other programming languages don’t even give you that option to add things to the system menu…

The Break Room

There’s a sign above the sink in the break room that says not to dispose of food in the sink because there’s no garbage disposal. Apparently someone recently thought they’d offer their two cents to facilities by adding a handwritten note on the sign “maybe you should put one in.” And while you’re at that, would you put an ice-maker or toaster oven in our building? 😉 I mean…building 2 has those things…course building 2 also doesn’t have a sink in their break-room so its really about even…

Success!

Wheee, I finally got to work what I’ve been trying to work on for the past half a week or so at work; something I’ve never done before in a language I’m not very familiar with. But it does what I was supposed to be making it do now!

I’m trying to “integrate” a new sub-app into our existing application. Like, y’know, so you can click on a button and then it goes *poof* (Microsoft OLE COM Magic) and suddenly a certain new window pops up on the screen–Something that seems like it shouldn’t be that complicated, but in C++ it really is that complicated and has plenty of nuances to deal with that you never realized existed. Ah well, its working :).

I like Fridays

Yes, I could be saying that just because its payday, and this is the first non-puny paycheck I’ve gotten in two months that actually covers two consecutive weeks I’ve been at work (well, actually, no it doesn’t, Christmas shutdown doesn’t net me as many paid hours as going into work would have, but I’m not going to complain…)

Right now I’m writing a unit test for a chat application, I decided to go with a “Starwars” theme and named the two chat nicknames for each of the machines in the unit test R2D2 and 3CPO.

My supervisor just gave me the bestest idea too! Dump my candy bowl (yes, still leftover from halloween) over by the printer so its out of sight out of mind (and I’m not tempted to eat it), and replace it with a fruit bowl and keep apples or oranges or pears (you know the fruit that lasts nearly forever) on my desk instead (hmmm, and maybe some ritz crackers or raisin bread or something too). That would be brilliant. I often try to bring a snack of fruit to work for when I get munchy cravings mid-afternoon, if I have anything in the fridge, but usually I forget because its not a consistent routine.

Today I implmented SHA-1 in Java

SHA-1 is a secure hash algorithm (called by some the successor to MD5), to be used as some sort of password generator for an application that I understand about as little about as I do the mechanics of how the SHA-1 algorithm works. It does a lot of crazy math and bitwise math to come up with this fixed length magic number.

But I guess none of that’s really important. What it comes down to is that I was given a website with some javascript source code, and they (work) wanted that in Java with some trivial changes to the input/output types.

Converting JavaScript to Java is Ugly with a capital U. Mostly because the more I work with JavaScript the more I’m fully convinced weakly typed languages are inane and obnoxious…especially if you should ever have the misfortune of debugging anything gone awry in such a language. But even though its ugly, it’s kind of fun, I like making things less ugly.

“Yes we should re-label the Terminator Video.”

First line of an email I received at work today (yes, it WAS really actually work related):
“Yes we should re-label the Terminator Video.”

I was poking around on the server to see whether there were any video clips in the testing directory that I didn’t have, for variety, or maybe that test some aspect of the system better than the ones I already had. I found The Terminator. Well, a clip from Terminator 3. How rad of testing material is that? 🙂

The other two main clips I’ve been using for testing are called “drug runners” and “high wire”. The drug runners one is about this girl who flies a helicopter and chases down these guys in a boat who are illegally importing drugs. The high wire one is about this guy who climbs out of a helicopter onto high voltage power lines to fix them. He wears this special metallic suit and uses this metal stick to “make lightening” so he doesn’t get electrocuted (the lack of a ground connection also helps) and then he climbs off the helicopter onto two power lines to go out and repair them while they are live (because nobody wants their power shut off). They’re kind of entertaining compared to say…”the clock” video (which is simply an 8 frame per second video of an analog clock hand ticking) or the tank videos (just tanks driving around splashing through puddles and whatnot) or the guy in the engineering lab waving his hand in front of the camera.

I Love My Job

Seriously…today I “had to” to test out the rudimentary paint program features built into the snapshot tool of the video capture program… this is kind of fun 🙂

Geek humor

I saw this licence plate frame today: “you can’t spell geek without EE”.

Ohhh I’m such a geek. That totally made me smile and laugh…at least after a moment once I’d processed why it was funny….”oh EE like Electical Engineering…yep, total geek joke, obviously an engineer’s car”… If that had been my major I’d totally want one of those frames ;-).

I just had Word go crazy

all of a sudden I start trying to type quotation marks and question marks and instead I keep getting braces and dashes. Okay, this is weird. What hotkey did I accidentally press to get in this mode? It was only when I started accidentally getting “enyays” (tilde-ns) that it hit me itd probably switched me to a spanish-key-layout without my knowing. Poking around in windows language settings I finally found the culprit. Apparently leftalt-shift is a hotkey to switch key layouts. So even though it was saying “english key layout selected” visually in the settings…it wasn’t…but a quick repeating of the hotkey restored nomalacy.

Lesson in Microsoft Word

Microsoft Word has lots of powerful features that unless you have taken a class on Microsoft Word (or have obtained equivalent training or experience through other means) you probably have never used. Today I got to play with a fun one called “No-Width Optional Break”.

<lj-cut>(Menu) <EM>Insert -&gt; Symbol</EM> brings up a Symbol Dialog. And it has this big table of fancy special characters–and this isn’t too strange, a lot of people have used this to insert Wingdings symbols into their document. But there’s a second tab in this dialog that is much more under-utilized–the “Special Characters” tab. This is where it has the curly quotes and a bunch of other more obscure symbols.

But I think some of my favorites are the special characters for telling word where to split words–because having words wrap at a random character is kind of lame, but having words wrap at spaces only can sometimes lead to random funky whitespace. I’ve seen a lot of people “fix” the columns to be neat (especially when you do justified alignment where both the right and the left line up neatly) by manually hyphenating words by putting “- ” where it should split. In and of itself that is well and good and does the trick, but there’s something else that often happens–you realize a word near the beginning is misspelled or you forgot some key word and suddenly, all your “fixes” to the hyphenation are off and suddenly you have “over-&nbsp;view” in the middle of one line and it just looks like you didn’t proof-read because you couldn’t find all the places you needed to go back and fix *again*. But if instead of inserting minus and a space you insert a “optional hyphen” (either by using the special characters dialog or using the shortcut key ctrl-minus) word will automatically remove the hyphen if the word no longer spans a line break.

But there’s some cases where the proper way to split text is not with a hyphen. For example, urls, code, or file directory paths. in any of those cases (lets ignore the exceptions for now) you would not use a hyphen to mark the continuation as it would be confusing and ambiguous as to whether the hyphen is a literal character that is part of the url/path/or code or whether the hyphen is an indicator of “this didn’t all fit on one line” so they modified the convention slightly to say you just leave out the word-continuation symbol (hyphen) and continue the URL/path/etc on the next line. So in that case, optional hyphen doesn’t quite cut it and you need an even more fun symbol, the “no width optional break” which will tell word where you want to split a really long word if it doesn’t all fit on one line.

For example: C:\mydocuments\jessica\work\foo is a nice (semi-)long path without spaces. However, if it doesn’t all fit on one line, the default way of wrapping is ugly and will probably look something like

C:\mydocuments\jess
ica\work\foo

But by inserting a no-width optional break it will display as:

C:\mydocuments\jessica\work\foo

if it appears on one line and as:

C:\mydocuments\
jessica\work\foo

if it must be split across multiple lines.

By using optional breaks it makes word automatically remember to take those out if you change the width of your table cells or change the page from portrait to landscape or change the number of columns or something else that severely changes where your line-breaks are.

This concludes a lesson in microsoft word. was this of any interest? useful? did you already know how to use this feature?