Archive for the ‘Coding’ Category

Transition Out? Nah… Beat that Dead Horse… Er… Cow, Eh?

Thursday, May 20th, 2010

cow.jpg

This is an interesting experience. When I have given notice that I'm leaving at other companies, it's been "Thanks, let's get everything out of your head before you leave" and I'd go through a series of meetings - some with just a few folks, others with a much larger audience, and I'd present, they'd question me... You know - a typical debriefing. That's what I expected here.

I couldn't have been more wrong.

While there have been a few emails and a few conversations, the largest component of my transition period is doing work. I can see taking the time to finish up things that I can fit into the two weeks I have left. That makes sense - I'm spending a day or so on something that would take another developer several days to get up to speed on. It's just reasonable efficiency.

But Ralph is going much farther than that. He's asking me to start and finish new work. He also wants me to stay for three weeks. Well... following this logic, why don't I stay for another 3 years and do all the new projects?

Oh that's right... I quit!

This transition time is me being nice and professional, and in return, I'm being treated like a cow (again) - stay as long as I say... do all that I ask... Sorry Ralph, I don't think so.

So if it continues tomorrow, it's time to go have a talk with HR. This isn't what they want to have done, I'm sure. It's my final impression of this place, and they'd rather it end on nice, friendly terms, than have me walk out of here and tell everyone I know of the lunatic managers in this place.

Google’s Font Directory

Thursday, May 20th, 2010

google-labs-logo.gif

This was an interesting bit of news today: Google is hosting web fonts now in their Google Font Directory - very interesting. The idea is that you go to this page, find a font you want to use by seeing how it's rendered in your browser, and then you get a line of HTML to download it, and you can then use it in your CSS as a font.

Impressive.

First, the preview tool is the browser - so you can actually see what you're going to be getting. Then, just as with the Google Visualization widgets, you have a single line to "import" the font, and then you're free to use it.

Clearly, they will see who's asking for what, and in doing that they are one step closer to world domination, but what the heck... It's a very nice way to preview the font for a web page, and then be able to be sure that your client will be able to see it in the way you wanted - regardless of what machine or fonts they have.

Very neat. I'm going to have to remember this.

Interesting Issue With CVSweb on frosty

Wednesday, May 19th, 2010

cvs.gif

So this morning I got email from easyDNS about the new system they are now rolling out, and it got me thinking about my CVS repository at home, and wanted to check and make sure that the new system would work properly and that I had the right name on the CVSweb root page. So I got to the main page, and clicked into one of the projects and got an rlog error.

Crud.

I hadn't done a lot of checking on the site since I moved it from the old machine that died, and clearly, while the server and it's repositories was fine and intact, the same could not be said for the web access of same. So I had to go digging.

First thing was that I hadn't changed the name on the front page of CVSweb - that was easy and took only a minute. The rlog problem was a little different beast. Actually, it was a hold-over from the NT world where this perl script originally started.

The code I had originally was:

    if ($tag) {
        #can't use -r<tag> as - is allowed in tagnames, but misinterpreated by rlog
        open($fh, 'rlog "' . $filenames . '" 2>nul |')
            || &fatal("500 Internal Error", "Failed to spawn GNU rlog");
    }
    else {
        open($fh, 'rlog -r "' . $filenames . '" 2>nul |')
            || &fatal("500 Internal Error", "Failed to spawn GNU rlog");
    }

and I overlooked the obvious problem for about 10 mins until I realized that the redirection wasn't right. It's not trying to send it to a file, it's trying to dump it. So the correct code looks like:

    if ($tag) {
        #can't use -r<tag> as - is allowed in tagnames, but misinterpreated by rlog
        open($fh, 'rlog "' . $filenames . '" 2>/dev/null |')
            || &fatal("500 Internal Error", "Failed to spawn GNU rlog");
    }
    else {
        open($fh, 'rlog -r "' . $filenames . '" 2>/dev/null |')
            || &fatal("500 Internal Error", "Failed to spawn GNU rlog");
    }

The great thing about Apache is that I found this by looking in the error log. It was telling me that it couldn't create the nul file - but rather than looking for permissions because this is a read-only CGI script, I knew then it was the /dev/null problem.

So... simple to solve and now I'm back in business. This server is backed up by a 1.5TB TimeMachine volume, so I'm not going to have to worry about losing these changes the next time the system dies. Whew!

Very Interesting CoreData Framework for PostgreSQL

Wednesday, May 19th, 2010

PostgreSQL.jpg

This morning I was looking at all the latest updates to software projects on the Mac - like you do, and noticed BaseTen 1.8 was released. This looks interesting in that I'm a huge PostgreSQL fan, and using it in the context of CoreData would be very interesting.

So I was reading more into this and while it looks nice, I'm not sure in it's current version it's something I'm going to spend a lot of time with. There are a few things that bother me about it in it's current version:

  • Not Really CoreData - it mentions CoreData-like semantics and APIs, but it's not really a PostgreSQL adaptor for CoreData. That was what I'd have expected as it would then have leveraged all of CoreData for a different database type.
  • Using the GPL but Paid for Commercial Use - this is something I didn't think I'd see in a long time - the code is GPL, but to use it commercially you have to pay? That seems to fly in the face of the GPL for if you use GPL code, you have to stay GPL code, and you can't charge for it or lock it down. Very odd.
  • Dodgey Code - when I started looking at the code I noticed that for GPL code, I was going to be spending a lot of time documenting this code as it was really pretty scarce. Not really my idea of "useful" code.

Maybe in later versions it'll have a true CoreData adapter, but maybe that's not what they are going for. We'll have to see. Interesting idea, anyway.

Apple Java for OS X 10.6 Update 2 on Software Updates

Wednesday, May 19th, 2010

This morning I noticed that Apple had updated Java for Snow Leopard to 1.6.0_20 - which is a nice update given that I'm starting to get more serious about Clojure, and it's use of the JVM. While I don't think it's pushing the JVM, it's always nice to see improvements there.

Nothing special about the update - it's just moving up to what Sun (Oracle) releases. OK, good enough.

Starting to Move On

Monday, May 17th, 2010

cubeLifeView.gif

This week marks the real beginning of the end for my work here at The Shop. Late Friday, I got word that my current CEO gave me his blessing to get an offer from another firm - a friendly one, and the Head of IT said that he'd be working on an offer letter for me. So this week I'm expecting some kind of letter which I'll respond to immediately and then put in my two-weeks notice here and work my way towards the new place.

It's nice to see a little progress on this front after so many weeks of interviewing with the new place, and talking about potential solutions to my reasons for leaving here. It's been very stressful. But hopefully now it's really starting to clear and I can see a little light at the end of the tunnel.

Lots more going on in my life these days, but one step at a time... one at a time.

Google Chrome (dev) 6.0.401.1 is Out

Friday, May 14th, 2010

They changed the designation of the Google Chrome (dev) stream from the 5.x to the 6.x stream today. I happened to notice when I decided to check for updates and there it was. Very interesting. I expect a big change on the "release" stream as well - jumping from 4.x to 5.x which would be a very welcome development for my work at The Shop.

Transmit 4.0.4 is Out

Thursday, May 13th, 2010

Once again, the guys at Panic have updated Transmit to 4.0.4 with a series of fixes and improvements. It's taken the top spot away from Cyberduck for me. It's just incredible. Amazing work.

Experimenting with Java Garbage Collection Options

Thursday, May 13th, 2010

java-logo-thumb.png

Well... this morning I'm tinkering with Garbage Collection (GC) options for the JVM and I've seen two that look like they may have real promise to reduce these performance-robbing GC pauses in the current install on my development box. They are:

  • -XX:+UseParallelGC - this guy is supposed to be a little more adaptive than the other, but it's got a limitation in that it can't function with some more advanced options. Alternatively, this guy is meant to work with very large heaps, which we have.
  • -XX:+UseParNewGC - this guy is meant to be the successor to the other, and has no such limitations with more advanced features. The issue is whether or not it's really tuned to handle the larger Heaps, and if it's fixed algorithm is good enough.

What I'm hoping is just to get rid of the GC events where one CPU is pegged to 100% for more than a minute and everything else on the server just stops. If I can keep this guy running on a more even keel, it'll really help.

I'm running with the -XX:+UseParNewGC now and we'll see how it runs today. I can't believe it'll be worse, but the real question is will it remove the big pauses? We'll have to see.

UPDATE: I tried -XX:+UseParNewGC and I ran into the exact same issue. So I'm going to try -XX:+UseParallelGC and see if it's going to be any better. If not, I'll go back to the -XX:+UseParNewGC and see if I can try something else.

UPDATE: Yeah, the -XX:+UseParallelGC wasn't as good. I'm back to -XX:+UseParNewGC and Googling to see if there's something else I can try.

UPDATE: I saw this on Oracle's (Sun's) web site: it looks interesting:

  java -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=8 \
       -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31

with decent explanations of the options. The use of two different GCs is interesting, but they make the point that they are for different regions (young and tenured). Also, the target survivor ratio is at 90% - up from the default 50% making it more efficient on the long-term storage of which this app is heavily weighted.

More tests, hopefully these will look significantly better.

[5/14] UPDATE: In the end, the defaults were just as good, and while the memory footprint was a little bigger with the defaults, there were fewer pauses and the overall throughput of the application was better. In general, I guess they tune it about as well as it can be tuned. Shucks. But hey, it's "done", then.

Transmit 4.0.3 is Out

Wednesday, May 12th, 2010

Today I got a tweet that Transmit 4.0.3 was released, with a significant list of fixes and additions. It's really quite impressive, and love what they've done with it.