Category Archives: kaizen

Deploying to servers

I’m heading to the Philippines tomorrow, and to make life easer for the two other Windows-based PHP developers on my team, I updated the web-based deployment script I mentioned in
Development kaizen: deployment and testing. I added the ability to push a specified revision to the production server. It took me less time than I thought it would (I love it when things Just Work!), so I decided to spend time documenting it just in case I ever need to do it again (almost certainly) or just in case it breaks while I’m away (hope not).

Behind the scenes, there are a number of moving parts:

  • Key-based authentication. Because I need to copy files and run commands on the production and QA servers non-interactively, I needed to set up key-based authentication using SSH. I’m somewhat nervous about using a passphrase-less key, but I couldn’t see a way to work around this.
  • Rsync. I use rsync over ssh to transfer files to the remote system. It’s good at efficiently transferring changed files. I couldn’t use –delete to get rid of old files, though, as our source tree does not include the complete system.
  • A shell script with the suid bit. The shell script is responsible for exporting the requested revision to a temporary directory, rsyncing it over to the selected host, and running a few commands on the server in order to reset file permissions and clear the cache. The suid bit is there so that it takes my identity and uses the key that I set up. I resorted to suid because I couldn’t figure out how to make sure that Apache had its own key. I tried associating it with the user that Apache ran as, but I kept running into “no tty”-type errors. The suid workaround solved the problem quickly.
  • A PHP script that displays a form and the last 20 revisions. The form includes a drop-down box of the revisions displayed, a button for deploying to QA, and a button for deploying to the server. When submitted, the script does some error-checking, then uses system to call the relevant shell script. The script determines the list of revisions by using shell_exec to store the output of svn log … -limit 20 in a string, then using preg_match_all to match all instances of /r([0-9]+)/. Seems to work.

Why automation matters to me

The release engineer working on our Drupal project is happy. He manages the deployment of four Drupal projects (each with three multisites), and the project I’m on takes the least time to deploy.

In the beginning, it took two hours to deploy one set of Drupal multisite because of many manual configuration steps. The team had gotten it down to fifteen minutes thanks to node imports and other time-savers, but it still required someone to click on buttons, type in text, and upload files from the source code tree.

Shortly after I joined the team, I started automating as much as I could. This helped me because I could quickly test my configuration from a clean install. I also wrote a web-based deployment script based on the script I’d written for my previous Drupal project. This script made it easy for any team member to deploy a selected revision to the site and reinstall all the microsites. Any time a manual step entered into the installation process, I ruthlessly automated it. Now deployments take a single click (or three, if you want to select a revision other than the latest one), and the build process has shrunk from fifteen minutes to five minutes, with no manual interaction required.

So the release engineer is happy, the team’s happy, I’m happy, and we can quickly deploy and test new code.

I like automating repetitive tasks. It’s not just about showing off a clever shell script or Makefile (although my scripts are clever) or about saving myself time (although I do). It’s about freeing people up to do better work.

One of my best friends was on an internship at a large computer company. A large part of her work involved copying and pasting data between spreadsheets, a task she detested. However, the cost of getting interns to do the work had been lower than the cost of automating the process, so she was assigned to copy and paste the information. If she were more comfortable with programming, she might have automated it herself, but she wasn’t familiar enough with Microsoft Excel to do so. So she did the mind-numbing work. When she left her role, no progress had been made on automating the work, and she knew that the next intern would probably also need to copy and paste information manually.

I remember hearing her frustration with the kind of work she was doing. I wished I could do something about it. I couldn’t, but at least I can automate whatever routine tasks I come across so that people can work more effectively.

AutoHotkey scripts for switching to windows

Muscle memory helps you be more efficient. Here’s some AutoHotkey code I use to toggle Chrome (F10), Windows Live Writer (F11), or my Freemind mindmap for Life (F12). Make your own! =)

F10::
WinGetActiveTitle, Title
If Instr(Title, "Google Chrome") > 0
{
   WinMinimize, A
}
Else If WinExist("ahk_class Chrome_WindowImpl_0")
{
   WinActivate
   WinMaximize
}
Else 
{
   Run, "C:\Documents and Settings\Administrator\Local Settings\Application 

Data\Google\Chrome\Application\chrome.exe"
}
return
F11::
WinGetActiveTitle, Title
If Instr(Title, "Windows Live Writer") > 0
{
   WinMinimize, A
}
Else If WinExist("ahk_class WindowsForms10.Window.8.app.0.33c0d9d")
{
   WinActivate
   WinMaximize
}
Else 
{
   Run, "C:\Program Files\Windows Live\Writer\WindowsLiveWriter.exe"
}
return
F12::
WinGetActiveTitle, Title
If InStr(Title, "Life.mm") > 0
{
   WinMinimize, A
}
Else IfWinExist Life.mm
{
   WinActivate
   WinMaximize
}
Else 
{
   Run, c:\sacha\Life.mm"
}
return

Dealing with weaknesses: calendars

Okay, I’m starting to get really annoyed at the weakness of my calendar system. The Google Calendar integration into Notes would have worked… if I hadn’t confused myself badly. Fortunately, I can redeem myself, but I need to either get better at handling appointments or find ways of minimizing them entirely.

I had a tentative entry for a chat with Sambhavi Chandrashekar. We chatted over the phone and pushed that out a bit, because she’ll be busy for a few weeks. Having briefly scanned my calendar, I assumed that the somewhat-vaguely-named “Lunch with Sacha Chua” entry was related to that chat. No, it wasn’t. It was with someone else.

I got the Google reminder on my phone and (eventually) in my Lotus Notes calendar, so it’s not about setting up a better reminder system.

And to think I suggested the date and place, too! Embarrassing.

So, how can I avoid making mistakes like this in the future?

The key problem was that the meeting notice I added to my calendar had insufficient details. I had received an event invitation through e-mail and I couldn’t figure out how to add it to my Lotus Notes calendar, so I tried accepting it through Gmail. However, I must’ve accepted it incorrectly, because it didn’t contain any reference to the original sender. Next time, I should double-check that calendar entries have all the relevant details, and that these details are included in the subject line whenever possible.

If that’s in place, then the second thing I need to do is slow down and be more mindful during my morning reviews. It’s very hard to catch yourself assuming something, particularly when you’re distracted. Maybe I should make this a morning ritual: savor a cup of tea and go over all the important details of the day. It’ll be worth avoiding these spikes of stress.

I can also minimize the risk of this happening by moving more social appointments to flexible times whenever possible. Instead of meeting people over lunch, I can invite them to tea at my place. This has the added benefit of being able to bring interesting people together. I can’t do this for all appointments, though, so I really do need to improve my process here.

… and no, even handy services like I Want Sandy won’t help, because the problem was that I glossed over the reminder because I assumed it was related to a different event that had been cancelled.

The key thing, then, is to slow down when my calendar is involved, because that’s one of my weak points. The times that my calendar system tends to fail are when my Lotus Notes application is closed because I’m having software problems and when my calendar is too crowded or I know parts of it are out of date. I’m dealing with the first case by copying all my appointments into my Emacs Org planner during my morning review, which _should_ have caught today’s error if I had put enough information in the subject line. So I should slow down and click on all the details to make sure I know the full details of each appointment, especially if it was one I’d made several weeks ago.

Okay, how can I practice this? I’ve forwarded the details of another interesting event to the person I failed to meet today, and we might meet then. I can practice by inviting other friends out to lunch or dinner. I can give myself a minimum amount of time for my morning planning (that’s a strange idea, but it just might work). I can practice making scheduled commitments. I can practice by working on tasks that require several days’ or hours’ lead time, too.

I can hack this. Grr.

Being less stupid is harder than being smarter

With all due respect to @adamclyde, who tweeted being smarter is a lot harder than just being a little less stupid… and to Dennis Howlett, who blogged about how to be less stupid in 2009, I suspect that being less stupid is a lot harder than being smarter.

Software developers will recognize the truth in that assertion. It is a lot easier to tack on new features than it is to chase down all those defects. It is also true as the number of new features increases, the number of potential defects increases at a much faster rate. This is because each new piece you add can interact with existing pieces in any number of ways.

Sigh.

And so it is in life. It’s easier to make a resolution or try something out than it is to get rid of a habit or figure out how to deal with one of your weaknesses. Being smarter is fun. It’s motivating. It’s great. Sure, it takes imagination to see how you can be smarter in the first place, but if you keep your eyes open and learn from people around you, you’ll find all sorts of ways to improve.

On the other hand, being less stupid requires that you not only recognize and deal with the fact that you can be stupid, but push yourself out of that rut of stupidity and into a slightly-less-worn rut of slightly-less-stupidity. And then you do it again, and again, until you can get used to being a little less stupid. Then you do it again, and again. This is difficult, demoralizing, and not at all fun. Oh, and you’ll start off doing badly, too, because if it were easy to get rid of your bad habits or your weaknesses, you probably wouldn’t have picked them up in the first place.

This is not to say that focusing on being less stupid is the way to go. That well-intentioned path leads to being well-rounded but not exceptional. (See books like First, Break All the Rules for more thoughts on that.) If you want to be exceptional, focus on becoming smarter and smarter, and neutralize or work around the weaknesses you do have.

There are easy ways to become a little less stupid. There are easy ways to become a little smarter. To become a lot less stupid or to become a lot smarter requires deliberate practice. Our brains are wired to enjoy doing things well – to be in the flow – so the deliberate practice needed to become smarter is easier to do, and the feeling of achievement is sweeter. Our brains are wired to notice presence more than absence, so even if you’ve managed to work around your weaknesses for five straight days, the one you remember is the time that you tripped up badly. (This is also why you may think the phone only rings when you’re in the shower; you don’t notice when it doesn’t.) We also tend to pay attention when we’re trying something new or learning something interesting. On the other hand, it’s hard to catch yourself being distracted (almost by definition)…

So you tend to get good feelings about working on becoming smarter, and bad feelings about working on becoming less stupid. It tends to be easier to pay attention to becoming smarter, and it’s harder to drag your attention back when you’re being stupid. Which one will take more energy and will to do?


There are a lot of things I want to get smarter about: organizing and hosting events, illustrating abstract concepts, helping people connect and collaborate. I want to be a little less stupid about calendars. Maybe if I phrase that as a glass-half-full kind of thing, everything will flip around. Maybe if I focus on being smarter about calendars, take my current status as okay (so I stop making myself feel worse about it ;) ), and work on making things a little bit better each time (look! I actually did the morning reviews all this week!)… Hmm. I’ll keep you posted. Anyway, I just wanted to tell you – being less stupid is _hard!_ =)

Braindump of conference networking tips

I enjoyed reading Jeff Widman’s interview about networking tips. It reminded me of my rants about the “you’re just a student” brushoff and how typical schmoozefests are neither fun nor useful.

Unlike Jeff, though, I find conferences to be an awesome way to connect with people, and I do manage to scale up. I’ll scale up even more once I figure out a couple of things. ;)

So I thought I’d braindump what I’ve learned about making the most of conferences. Someday, this will grow up to be a proper blog post. In the meantime, enjoy, and add your own tips!

If you want to scale up, speak, organize, or volunteer

Speaking is _the_ best way to meet lots of people. It’s fantastic if you’re shy like me, because you can skip all the small talk. Heck, people will come up and start the conversation. People will recognize your name from the program. People will e-mail you afterwards asking for copies of the slides or asking questions that didn’t occur to them during the session. You’ll also usually get into conferences for free, hang out with really interesting people during speakers’ dinners, meet great organizers, and have a much better conference experience than practically anyone else.

If you’re interested in a conference, submit a session for it. What you’re interested in will probably be something other people are interested in. Submit a proposal with a catchy title. Show the organizer you know how to communicate – link to your blog, mention your previous speaking experience, maybe even link to a video of you on YouTube. If you’re entertaining and at least a little informative, you’ve got good chances of being selected. If you don’t get accepted, well, no problem! If you do get accepted, you’ll rock the conference so much more.

If public speaking scares you and you don’t want to work on that yet, see if you can help organize the conference. You’ll need to do a lot more running around, but you’ll connect with a lot of people before and after the conference. Every aspect of organizing conferences has lots of rich networking opportunities. Not only that, you’ll also get to hang out with lots of really interesting people during the speakers/organizers’ dinner.

If you can’t commit to organizing the conference, see if you can volunteer to help out during the event. The registration booth is a terrific place to meet everyone and start matching names, faces, and organizational affiliations. If you’re helping with speakers, that’s a great way to chat with them, too.

One time, I wanted to get into mesh conference, but all their student tickets were sold out. I volunteered for the first day. When they asked if anyone wanted to help at the registration desk, my hand was probably the first one in the air. I checked tons of people in, greeting each of them a cheerful good morning, trying to remember as many names and faces as I could. It was _so_ much fun for me to greet people and make sure their conference got off to a great start! After the morning rush, traffic dwindled to a point where I could catch the last part of the keynote. All throughout the afterparty in the evening, people kept coming up to me and complimenting me on what a great job I did at registration. I was surprised to find out that people noticed and valued something like that! (I also got quite a few job offers and half-joking VC offers at the event… ;) )

So try to speak, organize, or volunteer. Your conference experience will be _so_ much better.

Pre-conference homework

Blog about the fact that you’re going. Check out other people’s blogs. Find out the Twitter tag for the conference. Tell your coworkers you’re going, and ask if there are any sessions they’re particularly interested in. Read the program and plan your attendance, making sure you have plenty of time for hallway conversations. Blog about the sessions you’re planning to attend. Look up the speakers. Look up other participants. Look up friends in the same city. There’s plenty you can do before a conference to make the most of your travel and event time.

During the conference

Even if you’re just a regular participant, you can do a lot to make yourself memorable and make it easy for people to connect with you.

Guide the conversation

Don’t let people inflict the “What do you do?” conversation-killer on themselves or other people. Use more engaging questions that take advantage of your shared context, like:

  • What do you think about that session?
  • What else are you looking forward to attending?
  • What’s the best thing you’ve learned at this conference so far?
  • What other conferences do you go to?
  • What kind of session do you wish they had here?

Or ask people about what they’re passionate about, not just what they do. Ask them to tell you a story about a recent accomplishment or challenge. Ask them what one thing would help them be even more successful. Ask them about why they got into their line of work. Keep an ear out for things you can help with or people you can introduce.

If you find yourself in a group conversation in the starting stages, you can really improve the conversation experience by shaping the conversation with questions. Get people talking.

Nametags

If your nametag is on a lanyard, it’ll almost certainly be too low for people to politely read it during the handshake. Shorten the lanyard or pin it close to your right shoulder. If you have a stick-on or pin-on name badge, it goes on your right shoulder, not your left, following the path people’s eyes follow when they shake your hand.

I typically carry my own nametag, which I might wear in addition to the conference-supplied nametag. My nametag makes sure both my first and last name are readable, and includes a tagline. I’ve used variations of “Tech evangelist, storyteller, geek”, or “speaker, writer, storyteller, geek” (for non-technical audiences), and I usually get interesting conversations started around those keywords.

Business cards and homework

Carry business cards, a notebook, and a pen. Women’s blazers often don’t have pockets (grr), but I’ve seen both men and women use the back of their conference badge to hold business cards for quick access. If possible, put your picture on your business card, or have personal cards that include your picture, tagline, and a few suggested things to talk to you about. Putting a list of talking points or topics on the front or back of your business card is a great conversation help, because it makes it easier for your conversation partner to learn more about potentially common interests. As for the picture – we’ve all had those moments of going through stacks of business cards and not remembering who they came from. Make it easy for people to remember you.

Have a blog, and put its address on your card. That makes it easy for people to look you up afterwards, get to know you, and feel that you’re worth talking to.

Create value with your card. I sometimes make custom business cards for an event. For example, at a networking event, I might put a list of my top five networking books on the back of my business card. It’s a nice little thing, and it sometimes gets people talking about you.

Many people won’t have their own business cards, which is why you should have a notebook and a pen. The Moleskine notebooks are great because they have pockets in the back for business cards. Notebooks are also very important because they give you a way to write down stuff about people you talk to, which makes it easy for you to remember why you have someone’s business card. See networking with moleskines for why you should keep your ears open for the opportunity to give yourself homework. THIS IS KEY. If you find out that someone has a problem you can address or needs to meet someone you can introduce them to, you have a good reason to follow up with them. Don’t just collect business cards – that’s like collecting friends on Facebook. ;)

Food and drink

Carry your drink in your left hand, so that your right hand doesn’t get cold and clammy. This is important for handshakes.

Eat very lightly, if at all. It’s hard to talk with your mouth full, and it’s hard to circulate with a plate full of stuff. Sometimes I snack on a granola bar before going to an event. Hanging out near the food or the drinks is still a good idea, though, as most people will go by you at some point. Having some of the food also makes it easier for you to make conversation about it.

Words

“Nice to meet you” is a dangerous phrase, especially if you’re like me and you often forget names or faces. “Nice to see you” is safer because you can use it for people you’ve just met and for people you’ve already met and should remember.

Don’t be afraid to confess that you’ve forgotten people’s names. Ask them again, and make a point of using that name.

If you’re on the receiving end of this–someone has forgotten your name, or they say “Nice to meet you” when you’ve met before–don’t embarrass the other person by pointing out the error or putting them on the spot. If there’s the least bit of hesitation about your name, introduce yourself again, and give a few keywords that may help jog people’s memories. Good manners is about making other people feel at ease.

If you have a networking buddy, conferences are much nicer. They can step in and introduce themselves in order to elicit a name from someone you don’t want to admit you’ve forgotten. If you’re looking out for potential introductions for each other–interesting people your networking buddy might want to meet–you’ll cover more of the conference and have more interesting conversations.

After the conference

Blog about what you learned from the conference. If you can do this during the conference, great! You can tell other people about your blog. People often want to be in more than one session at a time, and your notes can be quite valuable. Blog a post-conference summary, too.

Follow up with people through e-mail or phone calls. It helps to have a good e-mail system that makes it easy to dash a quick note off to everyone saying it was nice to see them, sharing a link to your conference notes, and adding any notes on what you promised to follow up on.

A conference is a fairly big chunk of time, but it’s a great way to catch up with old friends and make new connections. Make the most of it.

Further reading

Here are a few of my favorite networking books with conference-related tips:

Relentless improvement

This is how I think I might scale up even more:

  • I can plan the conferences I’m going to on my calendar, so I don’t end up missing anything interesting (like last time – I totally forgot about the Toronto Tech Week!)
  • I can get better at asking my manager for education budget allotment so that I can go to more conferences, showing that I share a lot of that value through blog posts and conference reports
  • I can get better at following up with people by allocating more post-conference time for follow-ups
  • I can get better at following up with people by scheduling regular follow-ups or setting up some kind of clipping service ;)
  • I can get better at matching names with faces, maybe by taking pictures of people
  • I can learn more so that I can submit more session proposals
  • I can improve my presentation style and record more of my talks so that I have a fantastic “demo reel”
  • I can learn more about organizing conferences – working on that by helping out with #drupalcampto!

Someday, I’ll get to the point where I’m organizing conferences and other events, bringing lots of interesting speakers and attendees together for great conversations, and introducing people all over the show. =)
I’ll also have built a system for making it easier for other people to do pre- and post-conference networking. It’ll be lots of fun. Someday… =)