Mac OS X 10.5.3 is Out!

May 29th, 2008

Leopard.jpg

This morning I was able to use Software Update to get Mac OS X 10.5.3 which look pretty tame - about the only thing I really look forward to is the fixes to Spaces where it doesn't re-order the windows when hopping from one to another. I'm sure there are other things I'll like that I don't see right away, but it's not like getting 10.5 in the first place.

Still... it's nice to see that Apple is fixing security issues in iCal and the like. Not bad for a few minutes of my time.

Learn Something New about Solaris crontabs

May 29th, 2008

Solaris.gif

I learned a new thing - at least it appears to be new, about crontabs on Solaris 8 - maybe later versions as well. It seems that if you have blank lines in a crontab it's going to give you errors. This is news to me for I've had a crontab on a Solaris 8 box for about 4 years that has blank lines in it and it's working fine. But today I had to update my crontab on my main Solaris development box and it was giving me fits about an illegal end of line.

I tried a ton of things, finally I dug into the man pages on the Solaris box and it said right there that blank lines should be avoided. Odd. I looked at another Solaris box and it's crontab has blank lines and it's working fine. But sure enough, take the blank lines out of the crontab and it's working fine.

Odd... but at least I know what to avoid on Solaris.

It’s Amazing What Vendors Call Support These Days

May 28th, 2008

pirate.jpg

I know I shouldn't be surprised given the recent history I have had with software Vendors recently, but today was once again an eye-opener. I have known that an upgrade of a certain vendor's API was coming for many months. It took a lot of negotiations, explanations of the usage patterns, etc. to get to the point where things are all signed and executed so that we can actually get the software. Today was the day we could finally start the process of actually getting and using the new API.

It started out with the same problems I've come to expect from this vendor - the software was for Windows, Solaris, and Linux - yet in order to download it, you had to be running a Windows client app. Why? Why not just have a password-enabled web site where you can get the files? It seems that when you're charging what these cats are charging, you can invest the modest sum to get someone on your staff to figure this out. Nope. It was a sign of things to come.

After getting the packages I asked the 'installation specialist' what I needed to know during the install. What questions would be asked, etc. so that I could have all the proper data available to me before the install started so that I wouldn't have to start over or back up during the process. Also, I like to have all this documented so that when I do it on the next box, I'm ready to go and the delays will be minimal.

'No problems, it's self-explanatory' he says.

Wrong. Several times I had to email him to get the specifics of what the question is asking for - things like the version of the API to install? What's the difference in the versions? Why choose one over the other? Things like this are essential in an install app, and there's no documentation - nothing, to help.

I get him on the phone and work my way through the install questions. Then I'm passed off to an 'installation technician' that is going to assign a login and certificate for the installed software. I'm asked if I have my key fob - What key fob?

Clearly, they have forgotten to tell me I needed this, what role it plays in the software, and so on. It's a ridiculous situation. A simple text file would have explained all the steps and why each was necessary. I'm not sure if I'm the first that's asked these questions, but I'm betting not. Why I had to get as many people on the phone and have them explain these things to me I do not know. In the end, I'm not really sure that I have the real explanation, but it appears that the software is working, so I'm willing to take a few things on faith. But how easily this all would have been avoided with a simple installation guide.

Once I got that working, the production box running the old version of the software stopped working! I was not surprised. They had made so many mistakes like this in the past that it wasn't an amazing surprise that by turning on the new version on the development box, they disables the old version on the production box. I had to call back and yell that they had taken my production box offline and they needed to get it back up ASAP. 45 mins later, it was back up, and I was able to tell my users things were back to normal.

The software upgrade itself is a welcome upgrade. There are fewer libraries to link and they are all shared libs as opposed to static libs - which is nice. So it's clear that someone was thinking when they did this, but it's also clear they didn't give a lot of thought to the converting users. There were no code changes - just a recompile and re-link and we're good to go. But what an ordeal. It's amazing what some vendors call support these days.

Transferring Daily Journal to WordPress

May 28th, 2008

wordpress.gif

Today I finally got the WordPress installation for my daily work journal up and going the way I wanted it. I then started back-filling the entries from my old manual HTML journal to the WordPress blog. It's slow work, but in the end, I'll have the complete, searchable, history in WordPress for management to see.

It's not that the old system was bad, it's just that this system can be used by all the developers to make a consistent journalling system for all the daily work which makes the generation of management reports far simpler. No one has to guess or search their memories to remember what they were doing when. Just throw in a paragraph on every topic worked on in a day and you're good to go. Simple.

Simple for me, anyway. In a few weeks I'll have the complete history moved and I can take that old journal offline. It'll be nice.

Getting WordPress 2.5.1 Going on RHEL3

May 27th, 2008

wordpress.gif

It came up amongst my fellow developers that having a simple blogging install on one of the machines would make it easier for them to maintain a list of what they do each day, and therefore make the creation of monthly reports a lot simpler. Seems reasonable, as I keep a simple HTML journal each day, and converting it to WordPress would be very nice. So I set out to do just that.

The first thing was identifying a machine. Since the requirements for WordPress are PHP 4.3 and MySQL 4.0, it would have been nice to have found an RHEL5 box that could be used, as RHEL5 has those in the standard install RPMs. But that was not to be. I did, however, have a good RHEL3 box that I could use. Unfortunately, the MySQL RPMs with RHEL3 were at 3.2.x - no good. So I had to do some searching.

I ended up finding what I needed at the MySQL web site and downloaded:

    MySQL-client-standard-4.1.22-0.rhel3.i386.rpm
    MySQL-devel-standard-4.1.22-0.rhel3.i386.rpm
    MySQL-server-standard-4.1.22-0.rhel3.i386.rpm
    MySQL-shared-compat-4.1.22-0.rhel3.i386.rpm

I also had to get the PHP RPMs from the CentOS site:

    php-4.3.2-40.ent.i386.rpm
    php-mysql-4.3.2-40.ent.i386.rpm
    php-pgsql-4.3.2-40.ent.i386.rpm

and then I was ready to go. Or so I thought.

The default install for MySQL places the data files in /var/lib/mysql and that worked great. The problem was that I wanted to have them in a different location. Ideally, all I'd need to do was simply move them and put in a symlink back to the /var/lib/mysql directory. But it was not that simple due to where I wanted to put the files and the rules governing placement there.

Basically, I was unable to set the user/group for the files in the location I wanted to put them based on some rules in-place by the Unix engineering team. Understandable, I just needed to find another way. The simplest way to make it work was to have the MySQL server run as another user - in this case, gomer. The trick was that it wasn't that simple to figure out all the places it needed to be changed. In the end, I was able to get it by using the following file as /etc/my.cnf - the default configuration file for MySQL:

    #
    # Point the MySQL server to this location for the databases
    #
    [mysqld]
    user=gomer
    basedir=/home/data/rooster/
    datadir=/home/data/rooster/mysql
    socket=/home/data/rooster/mysql/mysql.sock

    [mysql.server]
    user=gomer
    basedir=/home/data/rooster/

    [client]
    user=gomer
    socket=/home/data/rooster/mysql/mysql.sock

where the location of the files is /home/data/<machine>, and in this case the machine name is rooster. I chose this to make it easy to distinguish the data files for one instance from another - put the machine name in the path and you're pretty sure to not have conflicts.

With this, I could start and run the MySQL server without error. Whew! That was an important step to take. Now we need to get PHP talking to MySQL. In order to do this we need to edit /etc/php.ini and set the MySQL socket reference to:

    ; Default socket name for local MySQL connects. If empty, uses the
    ; built-in MySQL defaults.
    mysql.default_socket = /home/data/rooster/mysql/mysql.sock

and then restart the web server with:

    /etc/init.d/httpd graceful

The next thing to do is to create the user and database for WordPress to hold all it's information. Interestingly, what you need to do is to make the database first, and then assign the rights to the user (thus creating a new user in the process). To do this, we first need to log into MySQL as the root MySQL user and create the database:

    mysql -u root -p

and enter the root MySQL password. Then create the database:

    create database wp_drbob;

I've chosen the convention wp_login so that the databases are easy to tell apart. Then you need to assign right to that database to a new user:

    grant all on wp_drbob.* to drbob@localhost identified by "coder";

where the last argument is the new password for the local account. At this point you can verify the user's database is set up properly by logging out of mysql with a quit and then log in as the new user:

    mysql -u drbob -p

...and enter the new password (coder), and then have a look at all the available databases:

    mysql> show databases;
    +------------+
    | Database   |
    +------------+
    | test       |
    | wp_drbob   |
    +------------+
    2 rows in set (0.01 sec)

One little wrinkle with the PHP 4.3.2 using the MySQL 3.23.58 Client API is that the passwords in MySQL 4.1.22 are stored in a slightly different way. This means that you need to do the following in order to get the password into the old format for PHP. Log in under the root MySQL account:

    mysql -u root -p

give it the root MySQL password, and then issue to following:

    mysql> UPDATE mysql.user
        -> SET password=OLD_PASSWORD('coder')
        -> WHERE user='drbob'
        -> AND host='localhost';
    Query OK, 1 row affected (0.00 sec)

the flush this out to the system:

    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)

At this point we have a database and we're ready to install WordPress and configure it.

Assuming that the WordPress distribution is in a tgz file called wordpress-2.5.1.tar.gz then as the user gomer go to the location where the blogs are going to be stored and unpack the distribution. It'll be named wordpress - change the name to the user's login (our convention here again). This looks like:

    $ cd /home/data/rooster/blogs
    $ sudo su gomer
    $ tar zxvf wordpress-2.5.1.tar.gz
    $ mv wordpress drbob

at this point, you need to go into that directory, rename the file wp-config-sample.php to wp-config.php and then edit it and put in the correct values for the database connection:

    // ** MySQL settings ** //
    define('DB_NAME', 'wp_drbob');
    define('DB_USER', 'drbob');
    define('DB_PASSWORD', 'coder');
    define('DB_HOST', 'localhost');

You can then install WordPress by going to the web page: http://server/blogs/drbob/wp-admin/install.php (assuming that you have the directory symlinked into the var/www/html/ directory of the web server). This will pull up a simple page where you can set the name of the blog and the email address of the administrator. They will receive an email with the login information which they can then use and customize as they see fit.

It's certainly no easy, and a lot of the little details took me hours to figure out. But in the end, I have something that's working and it's not too terribly hard to set up another. That was the goal, and it's achieved. Good enough.

Twitter Outages Part of a PR Stunt? Not Likely…

May 22nd, 2008

Twitterrific.jpg

Making the rounds this morning is an implausible idea that the Twitter downtimes are actually planned to keep people 'wanting more'. While drug dealers have used this in the past, to great success, I don't think the geek-mentality would think this trade-off on the pride of creating a stable, useful system would be worth it.

Take a look at Slashdot... the ultimate geek hang-out. If they went down, it's a scream-fest and they loose credibility - not gain it. Twitter is a communication channel, no one thinks the phone company is good for killing service. Nope. This is something they are trying to prevent, and simply can't. I'm not sure why, but it's got to be that there are things going on behind the scenes that the casual user doesn't see.

The excuse for the latest outage is a database outage due to a routine update going bad. Now this I know about... if you're updating a 'production' database during working hours you need to make sure that you have a back-up, or a fail-over, or something so that if, on the one-in-a-million chance that something goes wrong you aren't out of business. They messed up on their disaster/recovery plan. Maybe it's not big enough to have one of them, but I think it's time they think about it.

In the end, it's nice, and people will use it, but they'd use it more if it were more reliable - not less.

Creating Some Interesting Data Storage Templates

May 21st, 2008

CKit.jpg

Today I've spent a good bit of time adding two interesting (and useful) data storage template classes to CKit. The reason I added them today was that I had noticed their use in a few other projects I've been working on, and they are just complex enough to cause 'clutter' in the project and not enough to be a significant part of the project. They're right where I find the things to strip for re-use.

The first is a 1:1 map where the data is added with a simple put() command but the underlying data structure is really two STL std::map objects - one going from keys to values and the reverse going from values to keys. This 'bi-directional' map allows me to be able to quickly and easily get a key for a value and a value for a key. In a few of my projects I do encoding mapping or translational mappings - where the map is 1:1, but it's as often that I need to go in the 'reverse' direction as the 'forward' direction. Scanning the map was far too inefficient and the size of these guys wasn't an issue, so it made sense to have two 'opposing' maps and place (and remove) the data in pairs using both maps.

The second is a many:many cross-reference map where the pairings do not have to be unique - similarly to the STL multimap, but in this case, the data is maps of std::sets which makes it easy to get iterators on the values for a key - or the keys for a value. This guy is used in a project of mine where there are several representations of the same thing, and a 1:many is a simplistic case of the many:many. I'm not sure if I'll go back and retrofit the code in the projects for these new template classes, but it's nice to have them should the need arise again.

When Not to Realize Your Car has No Brakes

May 21st, 2008

cubeLifeView.gif

I was having lunch with a good friend of mine today and we were swapping stories of things that have been happening recently - both at home and at work, just like we always do. My friend tells me a story that I must say had me in tears I was laughing so hard. Not that the situation was itself very funny, it wasn't. It was that his delivery was wonderful.

It goes like this: The time you don't want to realize you car has no breaks is when you're flying down the highway. By then, if you have no brakes, you're in a world of trouble. Best to check the breaks before you hit 65.

That's not what happened, it's just the lack of planning management did on this project he's involved in. They are in the final stages of testing and they haven't even really stopped to ask if they have the support system in place to maintain this additional system. So much energy has been put into finishing this, yet none has really been put into seeing if it can be supported long-term. Nothing like getting there and then realizing that you can't really use it because there's no one there to hold it up.

No brakes in the car.

While everyone can claim that they were heads-down getting to the finish line, my friend recalls several conversations (quite humorously) he's had with his boss about this, and other long-term maintenance points. All the while being told that things will work out, and we'll cross that bridge when we get to it, etc.

It's sad, but funny in a way. I think we help each other by letting off some steam, and I know he gave me a wonderful laugh with this tale of woe. I just hope it does work out for him, he's too nice a guy to get really hurt by such foolishness.

Compiling MAGIC 7.5.140 for Mac OS X 10.5 Leopard

May 20th, 2008

MAGIC.jpg

Today I decided to try and see if I could get the latest source of MAGIC (7.5.140) compiled on Mac OS X 10.5 without a lot of major hassles. Turns out there are a few things you need to know, and I'll detail them here, but the end result is that yes, you can get it compiled and it'll use the X11/OpenGL display and it's not bad at all.

I used MAGIC on some old DEC VAXStations and even an Amiga 1000 back at Auburn University when I taught there. It was a lot better than the home-grown layout tools that I had been using in my graduate work at Purdue - but most of that was likely because the guys at Purdue had to write their own tools - there just weren't any layout tools for the old TEK 4014 screens they had, and they didn't get color screens until late in my work. So it was probably a necessity. But MAGIC is just beautiful.

It can display the overlaps with different visual cues so that you know you have a gate when the poly crosses the n-diffusion. Also it had design rule checks built-in which made it a hundred times easier to really make something in MAGIC as you didn't have to constantly worry if your layout was going to fail in mask fabrication or in the actual foundry. The real kicker for grad students was the MOSIS rules and the pads they created.

With the MOSIS rules and the 'tiny chip' pad, we could have designs sent out to be fabbed at any of a number of silicon foundries in the country. It was an amazing thing to send out the file and see the chips come back and have the students see what they had made. Pretty cool stuff. Anyway, let's get to the building.

First thing is to get the source. I went to the MAGIC site and got the source for 7.5.140. I then unpacked it into a directory and went into the magic directory (a symlink is made in the un-tar).

The only change needed is to edit the configure command due to a linking issue with X11 and OpenGL - as OpenGL is referenced in both the X11 libs and the OpenGL Framework. Apple discusses it here and the fix to the configure script is pretty easy. Replace:

  -lGL

with:

  -lGL -dylib_file \
  /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
  /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib

where it's all one line - I just put in the line breaks for readability sake.

Then it's the standard configure, make, and make install and it's installed in /usr/local/bin with supporting files in /usr/local/lib. Make sure you have the path right and you're golden.

I did notice that wish 8.4 segfaulted when I tried to run it, but that was fixed by using the configure command:

  configure --with-interpreter=scheme

so that the default Tcl/Tk interpreter is not used, but the built-in scheme interpreter is used, and then there aren't the issues. I'm sure if I built Tcl/Tk 8.4 from scratch and used that, it'd work, but I don't need an interpreter for MAGIC - I'm not doing that fancy of layouts and I didn't have one in the past, so I'm OK for now. If it gets to be an issue, I can deal with it later.

That's it... it runs.

  magic circuit.mag

and up comes the file. Just like I remember. Pretty sweet.

UPDATE: I tried getting it to work with the Tcl interpreter and it just wasn't going to fly. I'm not sure why, but the segfaults were in wish and that's not a good sign. Also, I had a hard time getting the scroll bars to work and the middle-button emulation wasn't working as I had hoped. So all in all, it's working, but only barely. It's not something I'd use for real. Oh well... it was a good try.

UPDATE: they have implemented the scrolling with the arrow keys, so it's not the scroll bars that's the problem, it's user error and remembering it the way it used to be. So I think I'll keep it for a while. Also, I figured out the middle-button issue - I had to enable 3 button behavior on X11.app in the Preferences. WIth that, I get the same one finger = left... two fingers = right... and Option+one finger = middle. Perfect. Now it's good enough to use. Good.

Blender 2.46 is Out

May 20th, 2008

Blender.jpg

While I'm no artist, that doesn't mean I don't wish I were. Several years ago, I got an SGI Indigo2 workstation with the HighImpact graphics card off eBay. I wanted to do lots of things - including a little graphics work because the graphics capabilities of that Indigo2 were so bloody awesome! I've done a lot with barney over the years, lots of web development, database work, application icon creation - everything I wanted to do but the graphics work.

Back then, there was blender for the SGI - it was free then, even though it was owned by a company, and I was amazed at the speed and grace with which you could create 3D objects in it. When I moved to the Mac a few years ago, I was following the 'buying' of the blender code from the company by an open source group. It was interesting to see them get to the point that they had the money, and then took it over.

They even had a Mac OS X port.

Well today, they have released 2.46 of blender and it's as nice as it ever was, and just as snappy on my MacBook Pro. I'm still no artist, but if I get to the point in my life that I have months and months of time, I'm liable to try my hand at this. Take a few classes at some local college and then practice, practice, practice... Maybe I'll do this as a second career - I could do a lot worse.