Student Experience and EDUCAUSE 2010

Earlier this year, I took a new job within Wharton Computing: “IT Director of Student Experience,” a position that acknowledges the need for a dedicated liaison between students and the various contingents of our large IT organization.

Students are challenging constituents because they’re transient and incredibly busy—there’s little opportunity to develop long-term relationships.  Aside from that challenge, the whole not-coding-for-a-living thing has been an adjustment.  Now when I do something wrong, there’s no error message to explain the problem.

But so far it’s been a fun ride.  Last week I had the opportunity to attend EDUCAUSE 2010 and, along with a colleague, tell the story of why we created the Student Experience role and what we hope to accomplish.  I’m especially proud that Spock, The Dude, Harry Truman, and Wile E Coyote make appearances the presentation.

Comments { 0 }

Higher Ed Web Symposium: Don Norman and Cory Ondrejka

Cory Ondrejka's outstanding Angry Dinosaurs keynote

Last week, the third annual Higher Ed Web Symposium was held at Wharton.  Despite being a speaker at the inaugural symposium in 2008, this was the first year I’ve been able to enjoy the event as an attendee.

The keynote sessions were especially outstanding.

Don Norman, a user interface legend and personal hero of mine, spoke about Living With Complexity, also the title of his upcoming book.  Basically,  he argues that complexity is good for us as long as it’s accompanied by good design.  Mr. Norman is a personal hero because so many principles from1988’s The Design of Everyday Things still hold true.  Also, because his work is a comfort whenever I’m confused by an elevator or walk into a glass door.

Watch Don Norman’s talk here.

Cory Ondrejka, a Second Life co-founder, blew away the audience with his Angry Dinosaurs talk on Day Two.  In 75 minutes and 300+ slides, Cory talked about institutional incompetence and hacks for accelerating change by citing examples from the music industry, the newspaper business, and the 19th century US Navy.  A fast-paced, fascinating talk.  I’ve already watched it twice.

Watch Cory Ondrejka’s talk here.  It has implications for everyone in an organization, not just designers and technologists.

To all of my colleagues who organized the Higher Ed Web symposium and its virtual counterpart, congratulations and thank you!

Comments are closed

Van Pelt’s mobile landing page

I’m currently working on a project to upgrade the mobile version of Wharton Computing’s student portal. As we searched for ideas, my colleague Erin stumbled across the Van Pelt Library’s new mobile site.

Like us, the library hasn’t yet gone native (though we are planning a app store adventure in the near future). Instead, they stuck with the web but incorporated iPhone-like icons.

Take a close look at the Video Search icon. Although the cat is meant to represent VCat (Penn Library Video Catalog),  it doubles as a brilliant acknowledgment that online videos are synonymous with cute kitties.

I love it, and I love the underlying sense of fun.  Stay crazy, you library icon designers!

icons on Van Pelt Library's mobile website

Comments are closed

Regular Expression for dollar amount validation

I’m finishing up a small project that required validating dollar amounts on web-based form fields, and luckily I was using the wonderful Validation jQuery plugin.

Although this plugin doesn’t come with an out-of-the-box dollar validator method, it’s very easy to add your own. The trick was to find an appropriate regular expression. Although Google turned up several regex examples for validating dollar inputs, none met my exact criteria (the ultimate goal being to provide users with the greatest amount of data-entry leeway):

  • Allow the user to type in the $ (or not)
  • Allow amounts less than one dollar (i.e., 0 – .99)
  • Allow an optional one or two decimal places
  • No negative dollar amounts

So this is what I came up with, and it seems to be working. Two notes: (a) this expression allows inappropriate commas, but I’m stripping those out during the server-side validations, and (b) it is used in conjunction with the max() validator function to ensure the user doesn’t enter anything that could blow up a SQL Server money column:

^\$?[0-9][0-9\,]*(\.\d{1,2})?$|^\$?[\.]([\d][\d]?)$

The final jQUery validator method:

1
2
3
4
//custom validator for money fields
jQuery.validator.addMethod("money", function(value, element) {
	return this.optional(element) || /^\$?[0-9][0-9\,]*(\.\d{1,2})?$|^\$?[\.]([\d][\d]?)$/.test(value);
}, "Please provide a valid dollar amount (up to 2 decimal places)");

Comments { 6 }

Swiz framework for Flex

Swiz sample application

View the sample app code.

Some folks in Wharton Computing, namely Nathan and Adam, have had positive experiences using the Swiz framework for Flex applications.

I haven’t used Flex frameworks in the past because a) I was still learning Flex and wasn’t ready to throw a framework into the mix and b) the only real option was Cairngorm, which seemed like complete overkill.

Now that I’m more comfortable with Flex and understand some of its limitations, however, I can endorse Swiz.

Why do I like Swiz?  Because it doesn’t impose a strict structure and because it solves actual problems.  Even if you don’t care about separating your model from your views or abstracting service calls, Swiz is worth investigating for these reasons:

Event Handling: You can dispatch events at will and add the corresponding event listeners where required.  You don’t have to worry about the fact the Flex events bubble up and not down—Swiz just takes care of it.

Command Chains:  It’s often the case that Flex remote object calls need to occur in a particular sequence or that a series of remote object calls needs to complete before moving on to the next piece of code.  The logic required to ensure everything happens in the right order can get messy and only gets worse over time.  Swiz allows you to define a series of commands (called a CommandChain) and execute them together (sequentially or in parallel).

The Swiz Google code page and the Swiz Framework site have some instructions for getting started with Swiz.  The code samples are piecemeal and outdated, however, so I created a small project that demonstrates basic Swiz functions.  It’s a pretty silly app, but I created it so the Wharton Computing developer community could reference some well-commented code that works in our environment.

Because the back-end services are written in ColdFusion and it’s not especially practical to invest in CF hosting just to demo this, what you see here is just a screenshot* and the code.

Thanks to Nathan, who unknowingly provided some of the code for this sample app.

*Note the Phillies colors on the demo app. The default Flex theme is not meant for public viewing.  Ever.  It’s not hard to spiff up your apps a bit!

Comments are closed

Beware the change scripts created by SQL Server Management Studio

Part of my job is moonlighting as a SQL Server database admin, so a co-worker recently asked me to run a script against a production table. The task was simple: add a few new columns and create some indexes. He had generated the script by using SQL Server 2008 Management Studio’s (SSMS) Generate Change Script function.

Although the general sequence of steps in the generated script made sense, I have some complaints about the SSMS output. Here’s a very simple recreation of the scenario.

Consider a table with two columns. One is a primary key, and one has a default constraint:

1
2
3
4
5
6
CREATE TABLE phillies (
   phils_id INT IDENTITY(1,1)
,  phils_year CHAR(4) NOT NULL
   CONSTRAINT df_phillies_year DEFAULT (2008) 
,  CONSTRAINT pk_phils_id 
      PRIMARY KEY CLUSTERED (phils_id))

Using the SSMS table design view to add two columns to the phillies table and saving the change script results in the following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
BEGIN TRANSACTION
GO
ALTER TABLE dbo.phillies
   DROP CONSTRAINT df_phillies_year
GO
CREATE TABLE dbo.Tmp_phillies (
   phils_id INT NOT NULL IDENTITY (1, 1),
   phils_year CHAR(4) NOT NULL,
   division_champ_flag bit NOT NULL,
   national_champ_flag bit NOT NULL
)  ON [PRIMARY]
GO
ALTER TABLE dbo.Tmp_phillies 
   ADD CONSTRAINT
   df_phillies_year DEFAULT ((2008)) FOR phils_year
GO
SET IDENTITY_INSERT dbo.Tmp_phillies ON
GO
IF EXISTS(SELECT * FROM dbo.phillies)
   EXEC('INSERT INTO dbo.Tmp_phillies 
      (phils_id, phils_year)
   SELECT phils_id, phils_year 
   FROM dbo.phillies 
   WITH (HOLDLOCK TABLOCKX)')
GO
SET IDENTITY_INSERT dbo.Tmp_phillies OFF
GO
DROP TABLE dbo.phillies
GO
EXECUTE sp_rename 
   N'dbo.Tmp_phillies', N'phillies', 'OBJECT' 
GO
ALTER TABLE dbo.phillies 
   ADD CONSTRAINT
   pk_phils_id PRIMARY KEY CLUSTERED 
   (phils_id) ON [PRIMARY]
GO
COMMIT

This script contains BEGIN TRANSACTION and COMMIT TRANSACTION statements but doesn’t accompany them with any kind of error handling. So if you run it as-is and encounter an error, nothing gets rolled back.

Any error handling that you might add, however, is thwarted by the fact that the script’s statements are contained in individual batches (i.e., separated by GO statements).

Say you individually check each statement for errors and issue a rollback/return if something goes awry.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
BEGIN TRANSACTION
GO
[snip]
CREATE TABLE dbo.Tmp_phillies (
   phils_id INT NOT NULL IDENTITY (1, 1),
   phils_year CHAR(4) NOT NULL,
   division_champ_flag bit NOT NULL,
   national_champ_flag bit NOT NULL
)  ON [PRIMARY]
GO
[snip]
-- throw an error
SELECT 23/0
IF @@ERROR <> 0
BEGIN
   PRINT 'error!'
   ROLLBACK TRANSACTION
   RETURN
END
[snip]
GO
DROP TABLE dbo.phillies

In this scenario, changes that occurred prior to the error will be rolled back. However, although the RETURN statement exits the current batch, subsequent batches (for example, the one that deletes your table) will execute.

A TRY/CATCH block is another potential error-handling method, but TRY/CATCH blocks can’t span multiple batches.

So what’s with the batch-happy SSMS? In older versions of SQL it might have been necessary to separate a CREATE TABLE and subsequent ALTER TABLE statements into separate batches (I haven’t tested this). But SQL 2005 and 2008 provide statement-level recompilation, so the multitude of batches is not necessary.

When I tested a “GO-less” version of the script, it worked swimmingly. It’s understandable that SSMS can’t generate the error-handling, but if it would reduce the scripts’ number of batches to the minimum required, it would be easier to add the error handling yourself.

Conclusion: don’t rely on these SQL Server Management Studio-generated change scripts for any serious work, and definitely don’t use them as a model for how to write robust T-SQL.

Comments are closed

Database Design Presentation

I’m extremely happy to work in an organization with an uber-smart and supportive group of developers. Once a month we meet for a lunchtime “tech talk” presentation on a topic chosen via Google Moderator.

This month, Tim Allen and I collaborated and spoke about database design. Working with Tim to research and organize the material was a blast, and even though we put silly pictures of ourselves on the slides, I’m posting them.

We focused most closely on normalization and indexing, with a few of our other best practices thrown in the mix. The concepts should be applicable to any RDBMS, but the details are specific to MS SQL Server, the database used in most of the organization’s applications.

wcit-techtalk-database-design

Comments are closed

Hypnotic B-Tree Video

While preparing a database design presentation with my co-worker Tim, I discovered this hypnotic video demonstrating inserts into a b-tree data structure. For some reason, the music compels me to leave the cubicle and pay a visit to Rami’s falafel truck.

Comments are closed

Daniel Pink and the Evolution of Learning

link to Daniel Pink's keynote

Daniel Pink's keynote

On May 13th, 2009, Wharton Computing sponsored the inaugural Evolution of Learning Symposium.  I’m proud to have served on the planning committee for this successful event that featured a keynote by Daniel Pink and a panel discussion by some great educators:

  • Chris Lehmann, founding principal of Philadelphia’s Science Leadership Academy
  • Doug Lynch, Vice Dean of Penn’s Graduate School of Education
  • Karl T. Ulrich, professor of Entrepreneurship and e-Commerce at the Wharton School

It was pretty amazing to sit in a room and listen to these brains hash out some of the issues facing higher ed (and by extension, K-12) right now.  A complete recap, including speaker videos, photos, and a copy of the obligatory live Tweets* are available here.

*For the record, still not a fan of the live Tweeting.

Comments are closed

Lesson From the Jury Box

Serving as an alternate juror is one of life’s more frustrating exercises.  It’s all the inconvenience of attending the trial and none of the decision making.  In terms of actual hours worked, however, it’s an easy job:  arrive at 9:30, start working at 10 or 10:30, take a two hour lunch, and leave by 4:30. This schedule leaves plenty of room for deep thoughts. I even broke a longstanding policy and bought a pretentious Moleskin notebook because I wanted my deep thoughts to be important and stylish.

Deep thought number 1:  what do we miss by not paying attention?
Our judge instructed us not to take notes—we had to sit in the jury box without the aid of external mnemonic devices, which seemed like an impediment that could well lead to a travesty of justice.

I found the opposite to be true, though. When was the last time you sat in a room without phones, newspapers, iPods, or conversations and just actively listened? It’s the freedom to find the truth by not only listening but by studying clues like body language, demeanor, and facial expressions, which you can’t do when your head is buried in a notebook. There’s a place for conversations, questions, and notes, but it’s during deliberations, when twelve people bring their individual observations to the jury room and render a verdict.

Outside of the courtroom, we spend a lot of time and money to go places and do things, only to cheat ourselves by not paying attention.  It’s become more important to broadcast and perfectly capture our trips, conferences, and nights out than to live them. What contextual information do we miss when live-tweeting a keynote address?  How can we form mature, thoughtful, and independent judgments in a world of chatter and soundbytes? Information might be free, but knowledge and wisdom require a price, part of which is knowing when to listen.

Comments { 0 }