First Week of Crush Down – Not Looking Very Promising

March 25th, 2011

Well... the first week of the four week "delivery cycle" of the new Greek Engine has come and gone, and I have to say, if we get done with it in the next three weeks, I'll be surprised. Maybe not off by much, but there's so much to do, and with two new guys on the team, one very junior, it's a lot of work on my part just to keep them for imploding.

On the other hand, I have to say that things are coming together. They are taking shape in the code, and things are getting written - just not fast enough, and the hardware was always going to be an issue. There's just not enough time to get all the hardware purchased, installed, built and running. It'll be close, if they hurry, but I've already found out that I'm going to be delayed at least a week on some hardware coming from another data center. Doesn't sound like much, but that's 25% slippage.

But progress has been made. We have better integration between the two projects - my ticker plant and the greek engine, and we at least know the sections of code we need to build in order to make this thing work. That's a big help. It's just a matter of time.

Google Chrome dev 12.0.712.0 is Out

March 25th, 2011

GoogleChrome.jpg

This morning I saw the expected update of Google Chrome dev to 12.0.712.0, marking the move to 12.x. I say this was expected because they just announced that the 10.x series was in beta (or release), and that meant that they needed to "up the voltage" a bit on the 'dev' channel. The third number is all that seems to matter, and there are still a few nice things to find in this update.

What seems to be missing is any new features that they might want to add after Firefox 4 went final a week ago. I've played with Firefox 4, and it's OK, but the rendering is the biggest issue, and while that's not quite right, I'll stick with Chrome. But Firefox is smooth, and the "Spaces"-like support is very cool and keeps the tab count to a minimum. Very nice indeed.

Note: the old icon is back, too. Seems "plastic" now.

Getting SQLAPI++ Hitting MS SQL Server on Ubuntu 10.04.1

March 24th, 2011

Ubuntu Tux

One of my very favorite database libraries is SQLAPI++ because it's very well designed, works with a huge number of databases, is thread-safe, and doesn't require you to link in the underlying database libraries when you build your code. It's nice. So when it came time to hit a database from linux here at The Shop, I naturally turned to an old friend. But there were some ugly truths lurking there for me, and I had to spend quite a bit of time getting things sorted out.

First, off, SQLAPI++ on linux doesn't talk to MS SQL Server through any libraries like FreeTDS. Nope, you have to go through iODBC. Ick. Thankfully, FreeTDS has the ability to work with iODBC, but getting things set up and tested was a pain, so here's what I had to do.

Get everything installed:

  • iodbc
  • libiodbc2
  • sqsh

then start to configure things.

Get FreeTDS going by editing /etc/freetds/freetds.conf to look something like this:

  [devSQL]
     host = dbhost
     port = 1433
     tds version = 7.0

Now you can put in the default .sqshrc and prove that you can talk to the database with sqsh:

  $ sqsh -S devSQL -U me -P secret
  1>

Success. That's a good first step. Now let's configure ODBC. Edit /etc/odbc.ini to look something like:

  [ODBC Data Sources]
  devSQL = Devel SQL Database

  [devSQL]
  Description = Development database
  Driver      = /usr/lib/odbc/libtdsodbc.so
  Trace       = No
  Server      = dbhost.yoyo.net
  Database    = master
  Port        = 1433
  TDS_Version = 8.0

and then edit /etc/odbcinit.ini to look something like this:

  [FreeTDS]
  Description = TDS driver (Sybase/MS SQL)
  Driver      = /usr/lib/odbc/libtdsodbc.so
  Setup       = /usr/lib/odbc/libtdsS.so
  CPTimeout   =
  CPReuse     =

At this point, we can run the iODBC admin utility to see that it was set up properly:

  $ iodbcadm-gtk &

and the driver should be right there. Use this to "Test" the connection, and you should see that it's there and working.

Finally, use the SQLAPI++ test client to see that everything is working there as well:

  $ test64
  1.    Oracle
  2.    SQL Server
  3.    DB2
  4.    Informix
  5.    Sybase
  6.    InterBase
  7.    SQLBase
  8.    MySQL
  9.    PostrgeSQL
  0.    ODBC
  0
  Client version: unknown before connection
  Database name (connection string):    devSQL
  User name:   me
  Password:    secret
  Server: Microsoft SQL Server Release 10.00.2714
  Server version: 10.0
  Client version: 0.82
  $

Sometimes STL Really Impresses Me

March 23rd, 2011

Sgi

I was talking to a developer today and we got to talking about the fact that the STL map spec says that it's iterator is not invalidated on insert or removal - except in cases where the iterator is on the removed object. So it got me to thinking - what happens when you invalidate an iterator?

So I wrote this code:

  #include "map"
  #include "string"
  #include "exception"
  #include "iostream"
 
  using namespace std;
 
  int main(void) {
    map<string, string> map_test;
    map<string, string>::iterator iter_map_test;
 
    map_test["AAAAA"] = "11111";
    map_test["BBBBB"] = "22222";
    map_test["CCCCC"] = "33333";
 
    iter_map_test = map_test.find("BBBBB");
 
    map_test.erase("BBBBB");
 
    try {
      string value = (*iter_map_test).second;
      cout << "got : " << value << endl;
      ++iter_map_test;
      cout << "next: " << (*iter_map_test).second << endl;
    } catch ( exception & e ) {
      cout << e.what() << endl;
    } catch ( ... ) {
      cout << "generic exception." << endl;
    }
    return(0);
  }

and the results are amazing (to me):

  $ g++ maptest.cpp -o maptest
  $ maptest
  got : 
  next: 11111
  $

So the iterator is resetting itself when invalidated. That's very interesting! Now it's not what I expected, and I'm not certain I want to risk it, but it's nice to see that there is something non-fatal about the process. That part, it seems, the spec is right on the money about.

Clever dudes.

MarsEdit 3.2 is Out!

March 23rd, 2011

MarsEdit 3

This morning I got a tweet that MarsEdit 3.2 was out with a nice little list of goodies for the blogging public. Honestly, I think he'd be well-served by including a decent editor like SubEthaEdit or Vim, but that's his choice, and that's what makes life great.

Great app. Can't imagine using anything else for my journal.

Mac OS X 10.6.7 is on Software Updates

March 22nd, 2011

Software Update

Late yesterday I noticed that Mac OS X 10.6.7 was out on Software Updates, but I just didn't have any time to download the 300MB+ update and get everything going on my laptop. But this morning I wanted to get it installed before the day started. The big changes seem to be in the App Store - it doesn't get confused by already purchased software, and for the continual list of bug fixes, etc.

It's nice to see the update, but I know a lot of their attention is focused on Lion (10.7), and this is more maintenance than new features or cool stuff.

Starting the Crush: T-20 Days and Counting

March 21st, 2011

Today starts the push for the next four weeks to get out a new greek engine at The Shop. I'm not at all sure it's even possible, but I'll give it everything I've got for the four weeks to see if it can be done. There are a lot of things that have to happen in the right order, and pretty quickly. I've been told they'll all get done, but I have my doubts. It's just a lot of things that have to happen just so.

This morning already I'm spending too much time getting the next release of ZeroMQ checked out. It should be a pretty simple thing to check out, but it's taking far longer than the previous versions. Still, I have to get this done, and then I have to get SQLAPI++ working for the FreeTDS drivers we have on the boxes. All this in order to load up the data from the MS SQL Server databases that holds it all.

Yup, it's going to be tough to get it all done, but I'm willing to give it a try.

Joined the Apple Mac Developer Program

March 18th, 2011

xcode.jpg

This morning I decided that $99/yr is only $8.25/month, and I pay more than that for my NNTP feed, so I decided that getting Xcode 4 was best achieved through joining the program as opposed to paying $4.99 at the Mac App Store. Plus, I get a lot more stuff in the Mac Developer Program - like access to radar bugs, pre-release software (if I want it), and I think it's even a decent discount on buying machines.

So I plopped down the PayPal card, and away we go! I'll be able to get Xcode 4, and while I may not love the single-editor pane interface, I'll see if I can't get used to it as it seems to be a big win for a lot of things.

Just kicked it up a notch... Nice.

Google Chrome dev 11.0.696.14 is Out

March 18th, 2011

This morning I noticed that Google Chrome dev 11.0.696.14 is out, and it seems to have several updates for a small minor point change. OK with me, I'm glad to see the continual improvement of the dev channel. I was also interested in the about:gpu, and tried it on my MacBook Pro - very neat. Glad it's used in rendering.

Updated Git to 1.7.4.1 on My MacBook Pro

March 17th, 2011

gitLogo.gif

This afternoon I realized that git on my Mac Mini at home had the 64-bit version of git installed from the Mac OS X git installer, and that was a big mistake as it's a simple Core Duo CPU which can only run in 32-bit more on Snow Leopard. I had the 64-bit version for my MacBook Pro, and my iMac, but forgot to get the 32-bit version for the Mac Mini. Bummer.

Clearly, it'd be great if they had a universal build so I didn't have to deal with this, but hey... they build it and I can just keep things straight. My bad. Plain and simple. So I got the most recent builds for x86_64 and i386, and put the 64-bit package on my MacBook Pro, and tonight I'll install the 32-bit version on my Mac Mini. There. It'll work.

It's nice to see:

  $ git --version
  git version 1.7.4.1

Nice. Love it when things "just work".

[3/18] UPDATE: this morning I installed the latest updates on my Mac Mini (i386) and on my iMac (x86_64) so all boxes are up to date and working fine.