Writing Design Docs

August 26th, 2009

I know it's a good thing to do, but there are times, like today, that I just find it so hard to sit down and write design docs for something I've already written before. OK, sure... I haven't written it here before, and that's the same as not really ever having written it, but when you're writing the design docs from memory, it really doesn't have the same effect as those design docs that you really need to think about.

Still... it's something that has to be done. I just have to push through it and get it done.

Centering a div is Not Terribly Obvious

August 26th, 2009

WebDevel.jpg

I was once again trying to center a div on a page and I ran into the same problem I'd had before - centering that div. So when I looked this guy up this time, I decided to make a note of the solution so I could always find the solution no matter what.

This is that note.

The solution should be:

  div {
    align: center;
  }

but for some reason, the internet powers that be decided that this was not nearly as obvious and clear as the real solution:

  div {
    margin-left: auto;
    margin-right: auto;
  }

Don't get me wrong, the margin-left and margin-right attributes are nice, and they have a lot of use in a lot of cases, but to use them to center a div over the more obvious align attribute is a little... well... let's just call it non-obvious.

So there we have it. I'll probably never forget this again. Figures.

Fission 1.6.5 is Out – Snow Leopard Compatible

August 26th, 2009

Fission.png

This morning another of the updates for Snow Leopard (10.6) compatibility is out in Fission 1.6.5, the lossless audio editor from Rogue Amoeba. I was just using Fission yesterday to convert some sound files to iPhone ringtones, and it's simply amazing how simple it is. You simply tell Fission to "Save as Ringtone" and you look and it's there in iTunes, waiting to be synced to your iPhone. Wild.

I'm sure this isn't the last of the updates, but it's good to see that this one is ready to go for Friday.

MarsEdit 2.3.3 is Out – with Snow Leopard Fixes

August 25th, 2009

MarsEditIcon128.jpg

Well, it's started. Updates are trickling out for the much anticipated release of Snow Leopard this friday, and today it was MarsEdit's turn. The 2.3.3 release notes indicated:

  • Fix a performance problem that caused slow typing for some users
  • Fix a rare crashing bug that became more common in 10.6 Snow Leopard
  • Fix a bug that caused occasional distortion of text in the post editor
  • Fix a bug that caused double-clicking a table header to open selected post
  • Fix a crashing bug when adding categories to a blog with no existing categories

but I'm not sure if he's fixed the bug about the refreshing of the CSS file for preview. I'm hoping it does, but we'll have to see.

UPDATE: No, it's still got that bug where it's not properly rendering the table's CSS the way I want. Too bad. Maybe next update. Thankfully, WordPress at HostMonster works just fine in that regard.

Interesting Problem with log4j, Tomcat and NullPointerExceptions

August 24th, 2009

log4j.jpg

I ran into a very interesting problem today with NullPointerExceptions and log4j. Specifically, it seemed that I was getting NullPointerExceptions on calls to log4j. I couldn't believe it at first, and I did several things to "clear up" the error, but the NullPointerException persisted on the statement:

  log.info("Time to clear the daily data.");

and in theory, that shouldn't happen when we defined at the top of the class the value for log:

  protected static Log  log = LogFactory.getLog("my.package.ClassName");

It should just always be there. Very odd.

So I hit Google and got a really good hint from one of the answers there

...when using Tomcat, it will unload the ClassLoader that held the webapp, and if you 'un-deploy' the webapp, and maintain the thread, it'll keep going. However, it's lost it's static variables in the unloading and now you're going to get a NullPointerException.

Since there is no way to close out the class that's loaded and instantiated for an H2 trigger, I had been just shutting down the chat interface of the alerts. But what I needed to do was to kill the alert thread(s), and then stop them for good, and clear all references so that they could be cleaned up.

So I did just that. I'm thinking that this is going to make a big difference in the overnight roll-over, as we'll have shut everything down and if the class loader had been dropped, there's no chance of it making a call and getting a NullPointerException.

GraphicConverter 6.5.1 is Out

August 24th, 2009

GraphicConverter.jpg

I haven't been using GraphicConverter a lot lately - I just haven't had the need. But today when I heard about the update to 6.5.1, I got it - like I typically do. I then started looking at it a bit - playing, really, and then I noticed something I hadn't seen before - GPS functionality. It's not tied into GPS hardware that I can see, but with the geotagging feature of the iPhone's camera, and other's, it makes sense to be able to edit/update/add this kind of data to the images. Amazingly neat!

This means I can transfer the GPS data from one picture to another, and even add GPS data to pictures shot with previous cameras that don't have that feature. Slick! Glad I saw this, it's liable to come in quite useful.

The Amazing Pitchers in Middle-School Softball

August 21st, 2009

trophy.jpg

This evening Liza, Nina and I went to Nina's Softball Party where the Varsity (and parents) played the Junior Varsity (and parents) in a simple 3-inning game. We then had Portillo's hotdogs (yum) and lots of little cookies and brownies, etc. It was a fun little party that the Coaches put together for the teams.

What amazed me was the arms of these middle-school pitchers. I mean Wow! I've gone to the batting cages for fastpitch softball, and it's pretty fast - face it, I can't get a complete swing in time. I can get my bat in front of it, but that's about it. But these pitchers make the machines look almost slow!

Middle-School!

I can't get over it. By the time they get to High School and College these ladies are going to have Rocket Arms! I was simply stunned at the speed and control. Thankfully, I didn't have to bat - there were far too many people there to get through everyone in the 3-inning game, but it was enough to play a little outfield and be amazed at the skill of these players.

Hats off to these girls. I was certainly put in my place.

It Always Feels Good to Make Progress.

August 21st, 2009

cubeLifeView.gif

Intellectually, I know that there are people that really do enjoy doing nothing. The Dilbert Wally's of the world. They enjoy the amount of work they don't have to do. I'm not one of them. Today was a very un-Wally day for me, and I loved a lot of it. While not everything was going my way, the vast majority was, and it was really fun.

I was able to get several things done for my webapp. They weren't terribly hard, and it didn't take more than an hour each, but the cumulative effect is to make the app seem like I was really making progress. Lots of little things that had been nagging at the users were cleared off my TO DO list.

It's great to have that feeling of accomplishment.

A Bit of Personal Growth – Keeping My Mouth Shut

August 20th, 2009

Today I was in a meeting about a service/project and realized that the best thing I could do was to keep my big mouth shut. This is a big step in personal growth for me, folks. There are a lot of ways to write systems - lots. You can do the huge design docs and then go off in a room and code, you can sit with the users and have them involved from the jump, lots of ways. But today I ran into yet another person that wanted to do what they thought was best - regardless of what the users were asking for.

This isn't new. Letting technology drive the project is common, and often a horrible mistake. Today I saw a user of this project ask (twice) for a C++ wrapper for the low-level RPC calls that the group felt was their interface. I would have written the wrapper before it was asked for, but that's OK, being asked isn't so bad.

But this manager said they were going to write it. Several people very gently objected, and it was still maintained that this was what was going to be delivered.

The funny thing is, they have to write some kind of wrapper in order to test their code, so why not take a few more days, make it nice, and let everyone have it? Don't know the answer to that one, but I was glad that I saw what I saw as it led me to believe that my opinion wasn't being requested (on this topic), and I should therefore just let them do what they want.

In the end, I can write a wrapper for the service, and probably will. If someone wants to use it, great, if not, then that's OK too. I'm not trying to make my stuff used in every project in the Shop. I'm just interested in doing a good job.

After the meeting I talked with my Manager - a nice guy that's trying to understand my point of view. After about 30 mins of talking to him I think I made it clear as to why I was feeling the way I was, and why it was futile for me to try and express those opinions and feelings to the group responsible for the project - it'd be completely unwanted and make me look like a judgmental individual.

While the latter may be true, it's not exactly the point. They asked for feedback on the project, someone asked for something that was very reasonable for them to provide, and it was rejected. Period. End of story. Done.

I really don't like working with people like this, but there are people like this in all walks of life. You just have to do your best to identify them and hope you don't have to deal with this too awfully much.

NetNewsWire 3.2b19 is Out

August 19th, 2009

NetNewsWire3.2.jpg

Again this morning there are a ton of updates for the latest beta cut of NetNewsWire 3.2. I have noticed a faster response time to most things, and that's nice, but the nicest thing of all is the smooth transition to any new feature. I don't have to learn a new app just to upgrade. I like that.

So it's worth getting on this beta, as it's good software.

[8/19] UPDATE: there's now 3.2b23 out already. It's moving fast and furious there. Exciting times.