Learning the Pick and Roll

The last few days we’ve had some nice weather (not today), and the kids and I’ve been playing basketball in the backyard.  With a little two-on-one, I’ve been teaching the kids how to take advantage of their numbers to beat Dad.  Once I taught them what a pick was, they took to it rather enthusiastically.  In fact, part two of the training had to be reinforcement of the stationary pick versus the follow Dad hanging on to his leg pick, which while successful is also highly illegal and somewhat dangerous for all parties.

It’s also been fun teaching Lauren how to back in with your dribble and establish contact so that you can get position and pivot into the basket.  She’s suprisingly good at it, with the exception of only being able to dribble with one hand which kind of limits her pivot to one direction.  Even so, she scores pretty regularly on it.  I guess I’ve only been waiting about 10 years now for my kids to actually want to be taught anything about sports.  Fun times.

1st step in preparing for Dallas Rock & Roll Half-Marathon

As you may already know, I decided that New Year’s Day starts the day after Lotusphere is over, which this year, meant January 22nd.  I always use New Year’s as the opportunity to say, “Time to get in shape, eat right, etc…”  then Lotusphere comes along to ruin it with conference food and free booze for a week.  Usually I need a week after that just to detox and sleep, and all New Year’s plans are already shot to heck.

This year I knew I’d start afterwards, making the whole stressful runup to Lotusphere much easier.  It also helped temper my intake knowing I’d have to get started the day after.  So, I’m 2 weeks into it now.  Turns out my mother-in-law is going to be visiting us in March because she’s going to run in a half-marathon.  I checked it out this morning and it’s the Dallas Rock ‘n’ Roll Half Marathon.  This got me thinking…hmm, 42 days away, my current long run is about 3 miles, could I get ready in time?  Going back to my Jeff Galloway training days, you can increase your long run 2 miles every week, at least until you start hitting +12 distances.  So I went out this morning to see what I could do.  Two keys that I remember, use the 5 min running, 1 min walking to build up endurance, and find the pace you can run forever (or in my case, keep a heartrate between 150 and 160).

I ran a route I thought would put me between 4 and 5 miles which you can see at walkjogrun.net, what a neat site by the way.  I came home, could plot the route, put in my time, and see what my pace was, elevation change, and calories burned.  My pace right now is about 12:30, which is pathetic, but perfectly ok with me right now.  When I ran the marathon I was on an 11 min pace, and guess what, it’s not about speed.  It’s about being able to finish, and being able to keep doing it.  I never had an injury when I trained for and ran the marathon, and I know lots of people who could run 7-8 minute miles who never got close to it.

So, I’m in town all week, I need to get at least 3 3-mile runs in this week and next Sunday I can shoot for 6 miles.  Off to walkjogrun.net to see what route I can create to do that.

We're doing fine in Texas

Recession, recession, recession. It seems to be screaming from the headlines every day. Well, don’t believe everything you read. It’s been a big concern for me as I gauge where our business is and what it should be doing. In a small company, every decision is magnified. That 1 extra hire that turns out to be a bust, or who you let go a couple of months later because of a business downturn, has a significant impact on the whole business and the morale of a close-knit group.

So I’ve increasingly found myself at odds with what I see day to day, and what I read in the paper. Workflow’s in the midst of our biggest expansion ever. We’ve doubled our staff in the last year, expanded our practice and have had record profits. Most recently, you can welcome John Pugh to our staff who will be our Lotus Learning Practice Leader. (We all pick our own titles around here.) John’s done some amazing things with the IBM Learning Management System -> Workplace Collaborative Learning -> Learning Accelerator product set, pick your name du jour. We have more hiring announcements to make in the near term, and I’m very excited about all of them.

But…what about the economy. Isn’t this a rash move. Won’t it all come crashing down on us anytime now? Well, the business says no. We’re choking our growth and running off customers if we don’t act. So, I was relieved when David Bockes (Development Manager, and resident Gears of War multi-player victim) pointed out this USA Today article to me. Yes, parts of the country are experiencing recession symptoms. Many areas are not, in fact, many areas are growing. Texas is one of them.

Texas, where exports account for more than 14% of the state’s economy, has one of the best job growth rates in the country. It’s not only those selling abroad who appear to be benefiting.

Al Bussmann, sales and marketing director at Perfect Lawns and Landworks of Austin, expects business at the firm, which provides lawn maintenance and landscaping services, to grow by double digits this year. He notes that for most people, having someone mow their lawn or plant shrubs is an expense that can be cut in tough times. So the fact that business is growing suggests the local economy is doing well. The city had a 3.6% unemployment rate in December, presenting a challenge to Bussmann’s company.

“Our biggest challenge is hiring people, because the unemployment rate is so low in Austin. Overall, the economy is good,” he says.

The article points out that exports and tourism are big drivers for Texas. The housing crisis isn’t really applicable here as we never really had the run up in prices that the coasts did, and while there is a slowdown in housing starts, there is still a lot of relocation to Texas occurring and those people need places to live.

Funny how the article doesn’t focus on oil and gas. I’m sure for a large part of the US, the impact of higher gas prices is a negative thing. Here though, I think it’s a big contributor to the economic growth. It drives so many businesses, direct and ancillary, that the impact is felt well beyond just traditional oil and gas companies. It’s probably a major factor in our continued growth.

So to borrow a line from a song of my native state of Oklahoma, “You’re doin’ fine, Texas.”

BP 106: Query View SQL statements from the session

The code for the QueryViews Tom Truitt and I demonstrated in the BP106 session at Lotusphere20008 is not in the downloadable slides or in the Analyzer application so I thought I’d write up something quickly here.

The first QueryView was simply a re-exposure of the Domino Access View (DAV) that was created from the data on Company forms. Normally, you’d just create a regular Notes view to show this data, but the idea was to do a Hello World like example for the first Query View. So, assuming you had a DAV out there for the Company form that you called Companies, you could construct a Query View with a SQL statement like this:

Schema := @DB2Schema(“”:””);
“SELECT COMPANYNAME, #NOTEID FROM ” + SCHEMA + “.COMPANIES”

This first query does nothing more than ask Domino to tell us what the db2 schema is for the current database which we then use to construct a SQL statement for the CompanyName and NoteID for records stored in the Domino Access View (DAV) we’d originally created. SCHEMA.COMPANIES tells DB2 we’re looking for a specific schema within the NSFDB2 database created for us by the setup of Domino for DB2 and within that schema, we want the Companies view which was created when we created the Companies DAV. All in all, it’s not a very useful Query View as it could easily be more useful as a normal view, but it establishes that our QV process is working.

Schema := @DB2Schema(“”:””);
State := @Prompt([OkCancelList]; “Select State”; “Select the state to return companies for”; “TX”; state_list);
“SELECT COMPANYNAME, #NOTEID FROM ” + SCHEMA + “.COMPANIES WHERE STATE = ‘” + State + “‘”

This second Query View is a little more interesting in that it introduces the idea of soliciting end user selection of data before any query takes place. In this case, we’re building a short list of states to select from. After the user selects one, we add it to the where clause of our SQL statement to bring back only records within the selected state.

state_list := “TX”:”OK”:”LA”:”AR”;
Schema := @DB2Schema(“”:””);
State := @Prompt([OkCancelList]; “Select State”; “Select the state to return companies for”; “TX”; state_list);
“SELECT COMPANY.COMPANYNAME, CONTACT.FIRSTNAME, CONTACT.LASTNAME, CONTACT.#NOTEID FROM ” +
SCHEMA + “.COMPANIES AS COMPANY, ” +
SCHEMA + “.CONTACTS AS CONTACT ” +
“WHERE COMPANY.COMPANYNAME = CONTACT.COMPANYNAME AND ” +
“COMPANY.STATE = ‘” + State + “‘”

In this Query View we introduce the idea of a join by joining two DAVs to combine the data for a Company and the Contacts associated with that company. Where in the earlier code, the #NOTEID would have resulted in opening a document for the associated company, in this Query View, the #NOTEID is associated with the Contacts table and therefore opens the associated Contact record.

state_list := “TX”:”OK”:”LA”:”AR”;
Schema := @DB2Schema(“”:””);
State := @Prompt([OkCancelList]; “Select State”; “Select the state to return companies for”; “TX”; state_list);
“SELECT COMPANY.COMPANYNAME, INVOICE.INVOICEDATE, INVOICE.AMOUNT, COMPANY.#NOTEID FROM ” +
SCHEMA + “.COMPANIES AS COMPANY, ” +
“DB2ADMIN.INVOICES AS INVOICE ” +
“WHERE COMPANY.COMPANYNAME = INVOICE.COMPANYNAME AND ” +
“COMPANY.STATE = ‘” + State + “‘”

In this Query View, we’re branching out a bit. While before we were selecting from a single DAV or from 2 DAVs joined together, here we are joining a DAV to an external DB2 database table that contains invoicing information for our customers. The join will result in only showing company records where we have matching invoices for the selected state. This example introduces the idea of federated data structures. Given that the demo environment was all running on one machine, federation was only to data external to the NSFDB2 database (but still in the same DB2 server and instance). In the real world, that data could also be external and living in a separate DB2 server, like one that might be running on an iSeries…a point we ran out of time to make in the session.
Again, if you have any questions, don’t hesitate to ask 😉

BP106: NSFDB2. Session slides and analyzer code available here for download now

BP106: Converting applications to NSFDB2. What, how and why

Tom Truitt and I thank anyone who made it to our session and hope you got some good information and ideas from it. You’ll find the Analyzer here, and here are the session slides as Open Office odp, or as ppt. I’ll also make sure they make it into the hands of the official Lotusphere site and to the Genii sessions db as well. If you have any questions or feedback, please let us know.

Dim myData as String * 256

You C-coders have known about this for years I’m sure. Many of you Lotusscript types probably have known about this for years. Hell, once upon a time, I probably knew this. But yesterday, I ran across a line of code like this and was intrigued… “What the heck is that?”

If you peruse help for the String data type, you find:

The declaration of a string variable uses this syntax:

Dim varName As String [* num]

The optional num argument specifies that varName is a fixed-length string variable of num characters. A fixed-length string variable is initialized to a string of null characters (the character Chr(0)).

When you assign a string to a fixed-length string variable, LotusScript truncates a longer string to fit into the declared length. It pads a shorter string to the declared length with trailing spaces.

Fixed-length strings are often used in declaring data structures for use in file I/O or C access.

I don’t know about you, but I don’t know how many times I’ve written some kind of padding function so that my data was exactly the length I needed, whether for some kind of data export, or funky display table thing.

Oh well, old dogs can learn new tricks.