Archive for the ‘Cube Life’ Category

Had a Tough Weekend, but Found What I was Missing

Monday, January 12th, 2009

cubeLifeView.gif

This past weekend I took an online C++ test and received a score of 90% - which was in the 60th percentile. I also took a programming test that ran, but they may take off points based on the assumptions I made for the source of the data stream. In the end, I think I did OK, but the tests got me a little bummed out. I was thinking "Who's going to want to hire me when all I can do is a 60th percentile on the C++ test?" I then got to thinking about all the things I'm missing - all the things I wanted to do with my career.

I was pretty bummed out.

I wasn't looking forward to coming to work either.

But all that changed about an hour into my day when I chatted with a co-worker in London. He's taking over the duties as the lead developer on this project that I didn't want to be involved in. His statements were, without a doubt, the defining moment for me and why I do deserve to be paid what I'm paid.

It started out with an email from him about changing the settings in your .vimrc file to change the tab stops and expand tabs so that all the files you edit are spaces, and spaced properly. This is because his project relies heavily on Python scripts, and in Python the spacing is critical.

I wrote back to the group saying that the same thing could be accomplished within the file by using the Vim tags as part of a comment. Then, no matter what the individual's preferences are, the file in question is going to be formatted in the proper way.

His response was that "no one uses Vim, and this is what you should have as the standards anyway - for Perl, Python, Java, C++, Shell Scripts..." Amazing.

There's a need for Python file formatting, so let's modify Vim for everything to make it easier for this one set of scripts? When I asked him if that was his professional opinion that Vim should be modified as opposed to using the in-file tags, he said "Yes".

Now I saw why I can draw the salary I do. People who don't learn from history are doomed to repeat it. He made the statement:

You need to use some frameworks... and to be honest, development in vim is probably not as efficient as it used to be

Let's set aside that the frameworks questions is idiotic as it has nothing to do with the point at hand, but how on earth can a professional developer say something has become less efficient with time? Beats me.

So I'm sitting here laughing to myself about this exchange. He believes that HTML needs to be written by an optimizer, and IDEs are the way to do things. I have to laugh. I remember my High School Trigonometry teacher teaching us the half-angle/double-angle formulas for the trig functions - the 30/60/90 and 45/45/90 triangle - so that we could calculate all the trig functions without the calculators was all carried to class each day. Why? Because in order to learn what's going on, you need to understand it. Trust a machine too much, and you're liable to get burned.

Forget that the best development tools are the mind, a pencil and a pad of paper, and you're going to be just like this guy. A poser, thinking they know what's really going on when all they are doing is following the latest development trends. It's all shiny objects to them, and no substance. That's while I'll always have a job, and not have to worry about how much I've forgotten about the syntax of C++. The real work is done between the ears, not in a window.

Good, Solid, Code Needs Maintenance – Even Mine

Wednesday, January 7th, 2009

bug.gif

Last night I got a call from the second-shift operators here at work about a problem with my fast-tick risk engine. Basically, a process that gets the information on all the options in the system was handing and timing out and therefore was failing. This code hasn't been changed in years (so I thought) so I had no idea what to make of the problem. Time to dig into it.

I got online and looked at the stack trace of the error. I tried to match that up to the code in CVS, and couldn't. Great! Someone changed the code and didn't check it in! ran through my head more than once. So I had to get the manager of the unknown coder that had to have changed this online as well. He looked at the diffs in ViewCVS and came to the conclusion that the changes were all cosmetic. I had said that I could track this down, but I'd need to be able to rebuild the code to add in some debugging/logging statements that were very much absent in the existing code. But to do that, I had to know that I had the right version of the source or we'd be in even bigger trouble than we already were.

He gave me the go-ahead and I updated a few libraries of mine to make sure that it wasn't a flaky problem I'd fixed in the last year or two, and then rebuilt and deployed it. I got the same errors, but this time, the line numbers lined up with the stack trace. Finally! I could get to the bottom of this.

What I found was that even though the server appeared to be working properly, it most likely had a locking problem that was causing this issue and while I could not be positive on this, it certainly appeared that this was the cause. So I let everyone know and restarted the server. When it came up, everything worked as it should. Good.

This morning, I then dug into the effected code and noticed that since it was very old I hadn't updated it to the more consistent locking scheme I'd put in place for the rest of the app. I didn't have the read-lock on the master list of instruments - and it needed to be there so I'd be safe from any additions/deletions, and there was a read-lock on the instrument which wasn't necessary because the data I was looking at is set at load time and there's no way to change it during the run-time. I replaced it with a safer retain()/release() pair, and this will also protect me from having the instrument deleted out from under me.

With these changes, the dev server worked perfectly and I've been able to get several large queries through it without any problem. Nice.

The lesson here is that all good code needs to be maintained regularly to make sure that changes in one part of the code make it to all other effected areas. This hasn't happened in this codebase simply because there isn't time to do so. When something breaks (like last night), there's time to fix it, but not before. I've said it many times before, and it's still true - the best time to fix a hole in the roof is not during a monsoon. Too bad we just don't have the time.

Entering the Land of XML and C++ – Xerces-C

Monday, January 5th, 2009

cplusplus.jpg

Today I started looking at the XML tools available to me in C++ as I have a project coming up that is going to need to have XML document creation and accessible from C++. There are certainly several libraries to choose from, but after talking to friends about it (at some length) I think the best thing is to use Xerces-C from the Apache Project.

It seems complete, feature-rich, and as with all Apache projects, it's got to have been hammered on for a long time to make sure there are so few bugs it's as good as fool-proof. There was one issue, however, and that was with the documentation.

In the package for Mac OS X (version 2.7.0, 32-bit) the formatting of the DOxygen comments is not very nice. In fact, after looking at the web pages on the Xerces web site and the docs I downloaded, the difference was two little CSS includes:

    <link href="doxygen.css" rel="stylesheet" type="text/css">
    <link href="tabs.css" rel="stylesheet" type="text/css">

I was fixing up the HTML files in the doc/ folder, but then realized there were a ton of them and needed an easier solution. So I did a little digging, and noticed that the one CSS file that was properly imported was XercesApi.css in the same directory. So to that file I simply added the two lines:

    @import url(doxygen.css);
    @import url(tabs.css);

With this, and a few other well-placed <br> entries before the <h1> tags, things are looking much better. Now I can build this on my Mac as well as linux and things should be fine. I really needed the docs online, and this does the trick.

I’m a Sucker for Rules, and I Pay for it Every Day

Tuesday, December 30th, 2008

cubeLifeView.gif

I'm sitting here thinking how much I dislike the situation I find myself in and I realized that I'm as mad at myself as anyone else. Face it - they're doing everything they can get away with, and I'm the idiot playing by the rules. Who's the smart one? Not me.

I work with some people that I have to wonder what their motivations really are. They are a lot like people on the interstate - they push the rules until they think they can't get away with anything more, or they see people getting in trouble for similar actions. They are realizing that the "rules" aren't really rules, but just guidelines in case someone asks so it seems to be a level playing field.

But it's not. Not even close.

If I were a little smarter I'd see this daily and simply push back. I'd say "Hey, yeah, I'd love to, but I'm a bit busy now. You can do it." and then be done with it. Or I could tell people that I needed something today when I don't need it for a week and then when they give it to me tomorrow I still have it in plenty of time to meet my deadlines.

But silly me... I tell the truth.

So I get to do all this crap work, and I do it. I don't say "No." I don't think what I can get away with - I think what's the right thing to do. I'm going to pay for that every time in this environment. No question about it. There's always someone willing to undercut an honest person when there's no real cost to it. It might even been seen as clever by some.

The question is not if things will change - I know they won't. The question is when will I learn that it's time for me to leave. That's the only real solution. I'm not going to be someone that competes with them on their own level - I'm no good at it, and I don't want to.

Mounting a USB Thumb Drive in Linux

Monday, December 29th, 2008

Fedora.jpg

I got a thumb drive for Christmas and I wanted to put a few things on it from my linux workstation but I wasn't really sure how to mount it properly. What device did it show up as? There are a few things that I needed to know, but it seemed pretty difficult to find out. Then I talked with a friend that had done this before and he had a few great pointers.

First, find out the device by looking in /dev/disk/by-label. It's got them organized by their labels, and all these thumb drives are going to come with some default label. So now that we have the device it's a simple process of mounting the filesystem:

  $ sudo mkdir /mnt/thumb
  $ sudo mount /dev/disk/by-label/MY_DRIVE /mnt/thumb -t auto

and then it's ready to use. When you're done, simply unmount it:

  $ sudo umount /mnt/thumb

and you can pull it out. Pretty sweet.

Everything Old is New Again – X11 and the Mainframe

Thursday, December 18th, 2008

X11.jpg

I was thinking about the current state of web development - where it's used well, where it's not, and what people are trying to force it to do, and it lead me to giggle as I realized that George Santayana could as easily have been talking about computer developers:

Those who don't learn from history are doomed to repeat it.

I guess the extension is more on point:

Those who don't study what was written are doomed to rewrite it.

The Web 2.0 craze is trying to take a great static-content system and make it interactive. Why? Because the client footprint is so small and you can collect hardware in a central location for easier support and maintenance. Again, we have the re-birth of the mainframe/centralized computer resources. Just now they are called clusters and web server as opposed to AS/400 or IBM mainframes.

It's funny, because each time I think about the goal of the Web 2.0 I come to the same place X11 was over a decade ago - a way to have an interactive experience on the client machine while having the processing done on heavy iron at a remote location. Why not drop Web 2.0 and just do X11 again? I'm convinced that it's because the developers doing this never learned what the old X11 was all about and why it was created.

OK, X11 didn't have a lot of pretty graphics by today's standards, but it was designed to be a remote application delivery platform and optimized for that. Give it better graphics like a decent widget set on all machines and all of a sudden you don't need all the interactivity of the Google Docs - you can run it locally and get just the display in the native widget set.

The other extreme is to take the AJAX and build it up to the point that it also includes a widget set on the client end - much like Firefox, et. al. has done with it's markup. It gives you a complete widget set on the client-side (just like X11) and then a way to communicate with the back-end. I'm amazed at the similarities between these two. But one has 20+ years of development and the other is "cool and new".

Before you spend time to write something that you think is clearly so unique that it's never been done before, stop and think. Ask. I'm willing to bet that a lot of the ideas that are so "new" are really just re-inventions.

Learn from the past.

Seriously… Even Cowgirls Get the Blues

Wednesday, December 17th, 2008

cubeLifeView.gif

I was sitting here after a hard day looking at a few of my systems restart and pick up a bug fix, and thought: Yup, some days are easier than others... Not every day can be a winner. Even when you do good work, and get a lot of stuff done, you can feel run-down and tired, and that just casts a shadow over how you feel. Good day, but with a headache, it feels crummy.

Well... not every day can be sunshine. Today's my day to take a hit for the team. Hopefully, tomorrow will be better. Get started on something new, get a fresh look at things... get rid of this headache.

Here's to tomorrow...

VoodooPad (Pro) 4.0.3 is Out

Tuesday, December 16th, 2008

VoodooPad.jpg

The more I use VoodooPad Pro, the more I like it. Version 4 was a great update - the best part being the singular palette like Acorn (another FLying Meat product), which makes it very easy to manipulate things in the notebook.

With 4.0.3 released today, there are a lot more things to like. Most of these things are bug fixes and a few extensions. Nothing hit me, but it's great to stay up to date.

More Fun Debugging Other Groups’ Code

Monday, December 15th, 2008

Detective.jpg

Today I spent several hours trying to figure out why loading a collection of windows was exhibiting different behavior than loading the windows individually. Basically, I use a visualization system that was written and maintained by another company (a vendor) and it's pretty decent - and terribly complex. There is a way to load a window with multiple views, and a way to load a collection of windows.

Unfortunately, the collection of windows wasn't loading properly. I'd get the first window up just fine, and then the second window would appear to start loading but then all the views from the second window would get sent to the first window. Very odd.

Reverse the loading order and things are reversed. Everything seems to want to go into one window - regardless of which one that is - save it's the first one loaded.

So I wrote an email and sent the window definitions to the vendor's support contacts. I'm not sure what's going to come of it, but it's a bug, and recently introduced, as this used to work. We'll see what they come back with.

Simple iCal Calendar Publishing on iCal Exchange

Friday, December 12th, 2008

NetworkedWorld.jpg

Last night, I had a mix-up with my daughter's basketball practice schedule - I was sent to the wrong school by my wife. I realized that I needed to put the schedule into iCal, and once there, there should be no reason I couldn't publish it and let her have a look. Even if she didn't, there was value for me in learning how to publish iCal calendars.

I knew the publishing is over WebDAV, and so I started looking for public WebDAV servers that would host this content for me. I have been disappointed that HostMonster doesn't have WebDAV support - but I decided to send them an email this morning just in case they may have recently added it.

[UPDATE: no they do not have any plans to support it.]

I also looked at a site called Box that said it was WebDAV, but I think that's been pulled and it's a less-general web-based file sharing system now. Shucks.

I ended up seeing iCal Exchange a lot, and it turns out that's an incredibly easy way to do it. They have public and private calendars, and it's got adds if you look at the calendars online, but it just works if you don't.

I ended up getting an account, and then publishing the calendar from within iCal to the base URL of: http://icalx.com/public/drbobbeaty/ - this, they tell you right on your account page at iCal Exchange. Very slick.

Once it's published, you can subscribe to the calendars by using the URL: webcal://icalx.com/public/drbobbeaty/nameOfCalendar.ics - it's pretty much idiot-proof. You can even make it a link on a page so that people don't need to know how to type the URL. That's not anything new about URLs, but it's a nice thing about the integration of iCal into Mac OS X.

So I ended up publishing the calendars for our volleyball team, the Rampage and Angelina's basketball team, the Comets. If I update the calendar in my iCal, it pushes these changes to the server, and each subscribed iCal picks it up. Sweet.