Year In Review 2010

The anniversary update continues with a look back at the projects I worked on this year, many of these with the help of Learning Lab members and various people throughout WCIT, and a few accomplishments. I’ll highlight a few of these in the next several posts.

  • A port of INSEAD’s Market Power Games to SQL Server and the LL VPS
  • Regular Expressions Tech Talk and associated Word Jumble Game
  • An RCmdr plugin for use in introductory stat classes
  • A common WordPress instance for Wharton and migration from MTE (Thx to the WordPress-admins!)
  • Various GIST enhancements
  • The Startup Game, a role-playing game to simulate and learn about entrepreneurship
  • The CAOS logo
  • Various OTIS stuff
  • Spike Mobile style modifications and a general Wharton mobile theme
  • A yet-to-be released iPhone app
  • An upgrade of Tuna to Flex 3
  • The Byrd iPad app (big ups to Lew and Hector)
  • So many code reviews
  • SQL Administration tasks
  • Various committees and events (UI Conf, HigherEd Camp, Philly Give Camp)
  • Finished an MBA at Temple
  • Started a Master’s degree here at Penn
Posted in learning | Tagged , | 2 Comments

Administrative Heritage

An organization’s history shapes it’s day to day operations. I’ve heard this referred to as administrative heritage. We may have policies today that we follow because of past events that made sense at the time but make little sense now. Once a policy or behavior becomes ingrained in the organizational consciousness, it is difficult to reverse. It is all too easy to stay with the status quo, because that is what has worked, and if it isn’t broke, don’t fix it. This type of reasoning leaves an organization mired in the past without a path to the future.

This is another challenge for me, and would be at any organization. Understanding and trying to attempting to change administrative heritage is especially difficult for those new to an organization. Others may question his experience and its relevancy to the current situation. Changing policy requires a large effort that involves important people through the organization. Administrative heritage has a momentum that must slowed, turned, and set off into a different course. Sometimes it may feel like rerouting a runaway train. Sometimes it takes an emergency or disaster to change policy. The sudden sense of urgency (nod to Kotter) can drive change in ways that would surprise the uninitiated. This sense of urgency doesn’t have to come from a disaster. Sometimes getting an damning external evaluation can be the trigger.

Posted in management | Tagged , | 1 Comment

Organizational History

In my anniversary update, I mentioned administrative heritage being a challenge. As a precursor to discussing that, here are my thoughts on organizational history.

It’s always interesting entering a new organization. There are dynamics because you are the “new guy” (or girl). People are feeling you out, and vice-versa. You’re trying to find your place, and decide what your unique contribution can be to the organization. Maybe you will be a little stone, making a tiny ripple in the organization. Maybe you will be a dam that changes the course of the whole darn thing. This part is like initial phase of a romantic relationship, where things are new and curious and unknown.

Then there is that other part. Like finding out about all her ex’s. Finding out that she blew her college tuition on Coach bags and gambling trips to AC. Figuring out it taught her to be responsible with her money, and that’s one of the reasons you like her. An organization has a history too. There’s a history made together by each and every employee. The decisions they collectively make affect organizations down their lifetime.

New employees that come after others have long gone will wonder why things are a certain way. It might seem illogical. Like the partner that’s really scared of going out alone, and then you find out it’s because she got mugged a couple years ago. Like the organization that has really stringent computer security, so tight you can barely get anything done on the computer, and you find out it’s because someone hacked the system a couple of years ago.

One of the key challenges I’ve found working here is dealing with the length and sheer amount of history with an organization this size. It’s almost too much to consume. There are too many aspects to trace, too many groups to consider, too many platforms to question. Part of it is that we’re in academia and there seems to be a tendency towards decision by committee. The more people make a decision, the harder it is to figure out why the decision was made. Part of it is the decentralized nature of the organization.

Why do you have to deal with history? Earlier this year, I made an offhand remark about switching to WordPress from MoveableType as the blogging solution. It awoke a larger issue dealing with blogging and the history of a committee decision to use MoveableType in the first place. Had I known about all the thought and planning that went into the decision originally, I may not have been so flippant about the issue.

Posted in management | Tagged , , , , | 2 Comments

External constituents

In my Anniversary Update, I pledged to talk more about my challenges working here. One of the challenges is working with external constituents.

I must admit, I don’t have a great track record dealing with external constituents such as support teams and consultants. I mismanaged a small team of consultants that worked on an accounts payable workflow application. My primary mistake in that case was assuming that since one of the team members was a business analyst/project manager, that he would effectively manage the project for me, and I would just be able to check in now and again.

I have since learned that before that kind of management can happen, you need to develop a keen sense of the skill sets of the team and build a relationship of trust. This is the type of relationship that comes naturally working with internal stakeholders. There is a clear sense of common, organizational purpose that exists that helps build that relationship.

Working here, my most stressful work is dealing with external (non-Wharton) stakeholders. On some level, I suppose it’s because I don’t have the same feeling of camaraderie that I do with internal people. That feeling helps me to be more empathetic, understanding, and diplomatic.

Another problem is that I often don’t have a clear understanding of the history behind the working relationships. Why is it that we work with this particular group? What is the recourse for poor performance? This kind of information is less easily gleaned from casual conversation than information about internal stakeholders. Having a clear understanding of the chain of command and the formal procedures of alien organizations would help to dispel some of the misunderstandings.

Finally, it may that my own path of career development that negatively impacts my current outlook. I used to be on the other side of the relationship, when I was a consultant right out of school. My employer was a consultancy born out of the shards of Arthur Anderson. For all of our client engagements, we were expected to make the customer happy no matter what, and expect to work long hours. I will discard humility and state that I often had excellent customer satisfaction. So, perhaps part of the problem is that I just expect too much.

Posted in management | Tagged , , , , , | Leave a comment

On Legacy Code

I mentioned in a previous entry that legacy code was a challenge here.

What is Legacy Code?

While Wikipedia defines it as being “source code that relates to a no-longer supported or manufactured operating system or other computer technology,” I see it as something broader, something like: non-robust, unmaintainable, passively maintained, or antiquated. For lack of a better term, I’m going to call it Legacy.

Legacy code is something you will find in any organization. The key difference you will find is the strategy for dealing with it. There are several non-mutually exclusive approaches:

  • Triage and Containment
  • Retirement
  • Renewal

At Wharton, I have found all 3 strategies depending on the application. Before I delve deeper, I want to reiterate that this type of code exists everywhere and Wharton is not an exception. I have been guilty many times of creating code that I know will become legacy.

Triage and Containment

There are several apps that I have encountered that we are responsible for trouble shooting, fixing major issues, and handling user support, that we do not actively improve or modify. I think the primary reason is that these are relatively stable, and the primary authors have long since left in some form or another. Another reason is that we are often off working on the next big thing. I know that I would rather work on something new than work on an old application (especially not written by me). Often these apps run fine, but there are minor annoying bugs that could be fixed to make administrator or user experience much better.  Sometimes these are apps that should never have been written in the first place. They replicate functionality existing in other apps. They do something that a paid for service might do better. The functionality they offer is offered out-of-the-box by an open-source application.

Retirement

Some apps have been marked for retirement–just as soon as something better comes along or people just stop it! Bugs are likely to go ignored unless mission critical. Very little effort is committed in terms of support and there is no thought about upgrades or even minor feature enhancements. These apps are unmaintainable and sometimes the authors never thought they’d be used more than once or longer than a couple weeks.

Improvement

What’s old is new again with this strategy. The app is frequently updated with bug fixes, new features, and support is responsive and quick. When there is a platform upgrade, these apps are the first to be tested and migrated. The only problem is that refactoring existing code is limited or absent. As time progresses, apps like this can become a huge drain on resources. No one is sure why things are the way they are, and since there is limited refactoring, things wills stay that way.

Documentation

When an application was designed and written, some combination of forces: lack of time, lack of desire, or lack of knowledge resulted in a system that lacks documentation. This is an indication that the code will become what I call Legacy. The challenge for us as developers, as we mature, should be to be mindful of the people that come after us, and how they will be able to use and improve the systems that we build.

Posted in maintainability | 3 Comments

TYIL

This year I learned…

I mentioned in the last post that I was accustomed to working 80-hour weeks. One thing this does is make you strive for efficiency and automation. The more things you automate, the less things you have to handle. So, at my last job, I learned how to automate things, how to quickly diagnose and patch problems, to write code very quickly, and how to write and support multiple projects at once. Each experience in life holds different lessons.

Here, I’m learning more about organizational dynamics, teamwork, administrative heritage, and emerging technology. Here is a list of some of the themes of this year in these areas:

  • Organizational dynamics
    • What each group does
    • How the various groups are run
    • How the various groups interact
    • Some of the major stakeholders in each group
  • Teamwork
    • How to work collaboratively on small software projects
    • The value of getting “more eyes” on a problem
    • The collegiality possible in working teams
  • Administrative heritage
    • Why we are on certain platforms
    • The purpose of different custom programs we operate
    • The legacy of past employees
  • Emerging Technology
    • Work with mobile platforms
    • Work with A-Grade browsers
    • Git!
Posted in employment | Leave a comment

Anniversary Update

I’ve been working at Wharton about a year now and wanted to reflect on some of the highlights and challenges of the year.

Firstly, I want to thank all of my excellent co-workers for making this the best year of my working career yet! I have learned more, had the most fun, and had the greatest diversity of things to do than I have ever had. While I cannot say that I have been the most challenged I have ever been, I think that is probably because I am not compelled to work 80 hour weeks, which I had been known to do before. This is definitely a welcome change.

Some of the highlights:

  • Working on a variety of things and learning a lot of it as I go:
    • All of the various committees
    • ColdFusion and Flex
    • PHP/MySql
    • Native iPhone and mobile web development
    • R and Tcl/TK
    • Various admin activities: MS-SQL, WordPress
    • Ruby Sinatra/Rails
    • Sammy.js, REST APIs, a lot of jQuery
  • Enjoying time and collaborating with great colleagues
    • Running games
    • Conferences
    • Dev talks
    • Happy hours
    • Various projects
    • Coffee runs
    • Softball
    • Book club

One of the best things about working here is the flexibility I’ve been given to work on various things I’m interested in. I think that having some time to work on things that are not your primary responsibility is one of the best ways to encourage teamwork and innovation in an organization. Having contact with people in each group and participating in various groups and the code reviews has definitely made my work easier.

Challenges

I will be further discussing the challenges I’ve faced this year in the next post. These include:

  • Working with external (non-Wharton) constituents
  • Institutional/administrative history
  • Legacy code
Posted in employment | Tagged , , , | 3 Comments

Regular Expression Example 1

A coworker was cleaning up some HTML and wanted to remove unnecessary css styles from article markup. Specifically, he wanted to remove font styles from the markup, but retain other styles. CSS styles appear in HTML in the form: <tag style="style1: value; style2: value;">content</tag> There is a bit of variation possible in the style definition. Whitespace is ignored, and the ending semi-colon is optional. If a style appeared like this: style="font-family: arial; color: #000; font-size: x-large" He wanted to strip the font styles so that the new style definition would look like: style="color: #000; " First, he tried a regular expression like: /(font-(face|size|family): *.+(;|"|'))/i

Which consumed too much:

Then we tried to modify the expression to consume less: /(font-(face|size|family): *[^;"]+(;|"|'))/i

re2.gif

The problem was that the ending quote of a style attribute was being captured. We changed the regex to avoid this: /(font-(face|size|family): *[^;"']+;?)("|')?/i

re3.gif

A final modification, the addition of a ?: modifier at the beginning of the capturing parentheses, will avoid unnecessary captures.

/(font-(?:face|size|family): *[^;"']+;?)(?:"|')?/i

re4.gif

Posted in programming | Leave a comment

Word Jumble: Part 5

I used jQuery for the UI. I am a recent convert to jQuery, having mostly used Prototype + Scriptaculous. The word list is embedded into the page script as a javascript array. On document ready, html is generated, which writes the first and last word to the page, and creates blank input boxes for the intermediate words. There is a keyup event bound on each input box, which will determine if the word is correct. If it is, a css class will be added which shows a green underline underneath the box. Otherwise, a red underline will be shown. Finally, there are buttons on the page which are created dynamically and provides hints or reveal all of the answers.

Posted in programming | Leave a comment

Word Jumble: Part 4

Search
The problem of generating the chain of clues is a simple search problem. In this case, depth-first search was used, because the algorithm would attempt path depth-wise and only explore another branch if the generated chain was not long enough.

Another tactic would have been to use a breadth first search. To use breadth-first search, we could have modified the regex pattern to find all words that differed from the base word by just one letter.

Using water as the base word, that regular expression looks something like: /([^w]ater|w[^a]ter|wa[^t]er|wat[^e]r|wate[^r])/. This would find all words in the dictionary that differed by one word (let’s call this word set B).

If we were using breadth-first search, we would then repeat the process with all of the words we just found (word set B).

If you were to visualize the difference between breadth-first and depth-first search, breadth-first would look like a tree with wide but shallow roots. Depth-first search would look like a tree with few but deep roots.

Query Params
The flexibility of the puzzle is enhanced by optional query parameters that may be applied. The word param allows specification of the starting or seed word. The length param specifies the maximum length of the puzzle.

Recursion
The program uses recursion to perform the search. This almost goes without saying, for it is difficult to do general search without recursion (although you could do so with macros and similar programming constructs). Search may be done using loop control structures but I can’t imagine an elegant solution using loops.

The pseudocode for the recursion is basically:

func build(baseWord, chainWords, maxLength)

regex = generateRandomRegex(baseWord)
wordSetB = getPossibleWords(regex, notIn=chainWords)
for(word in wordSetB)
chain = build(word, chainWords+word, maxLength)
if Length(chain) >= maxLength
break

return chain

Posted in programming | Leave a comment

University of Pennsylvania Logo
Copyright © 2012 The Wharton School, University of Pennsylvania