Design, Open Source, Productivity Writing Drupal Themes
One of the many things that I do here is create custom themes for Drupal. It’s kind of an artsy thing, and since I’m the resident designer (or so it says on my card), I tend to be a bit artsy about it. One of the things that being artsy means to me is being off-site. The Innova office is a very cool space, but I like to have a change of pace every once in a while. A change of lighting or a change of atmosphere does a world of good.
But one thing that becomes a problem is remote access. Sometimes, I really like to get off the beaten path, and away from it all. I have a laptop, but I’m not going to be able to connect to anything when I’m sitting in the middle of a park. And even if I could, I certainly don’t want the lag time in connection, especially if I’m tweaking css. “Okay… just one more pixel to the left. Right. Save. Okay… Now I’ll go make a sandwich while that goes through the VPN.”
In be beginning stages, I like to do everything remotely. Most of the time, the client has only sent a spec, maybe some rough ideas about what they want the design to look like, and maybe some color ideas and or photos. Usually, I don’t have any content at all, besides a tentative site name, and I can’t sit around waiting for content.
To develop locally, and rapidly, I use MAMP (what do you want? I’m on a Mac). You can do the same thing with a windows machine, with a stack called XAMPP. It’s a full Apache-Mysql-php stack that you can kickstart whenever you need to, and can shut it down when you don’t. In short, I love the thing. I didn’t at first, but I didn’t like Drupal at first either.
Until I get content here’s what I do:
- I have two different setups: one for Drupal 5.x and one for Drupal 6.x.
- I keep two seperate databases: called drupal5 and drupal6. These databases contain only the most generic of content. It’s basically all lorem ipsum but it has the content that I expect clients to want (stories, pages, blog entries, etc.)
- Copy one of the stock themes in /themes to /sites/all/themes/projectnamehere. This keeps all of my new themes separate from the stock ones, and if this directory gets clogged (which it will after a few projects) it’s easy to offload the directory to somewhere else.
- I’m not usually trying out modules at this phase, but if I do need to, I try to keep them sequestered out from the stock modules and keep them in /sites/all/modules. That way, I remember that there are modules that I need to upload to the production environment.
And away I go. I can take my laptop anywhere I want, and I can sit down pretty much anywhere and get things knocked out pretty quickly.
Getting out of the office is often a great way to get things done. If I can work without a network connection (as I generally do when working as outlined above), it’s a great way to shut down a lot of the distractions. I can’t check the news. I’m not going to be pinged with IMs. I’m not going to be sidetracked with new mail. It’s a lovely world out there, so go out and get to work in it.
Productivity, Software SVN choking on TextMate’s metadata files? Not any more!
The Innova Mac Guys, whose number swells daily, tend to use TextMate as our editor of choice. Most of our files live on SMB-mounted network shares from our various Linux development servers.
TextMate has two problems with this scenario: one, refreshes can take a while because TM is rereading every file in the project directory. If you’re on an Intel Mac, and you suffer form this “feature”, try ReMate, which will offer a “Disable Refresh on Window Focus” option.
The other issue is that we use SVN for our revision control. TextMate, when it can’t put setxattr metadata on a file, such as over our aforementioned network shares, it defaults to writing a bunch of .\_filename files everywhere. This is fine, but now running svn status produces a list of garbage: SVN will happily inform you that you have a hojillion .\_filename files lying around that you haven’t told it what to do with, which makes locating the one actual file you want to know the status of pretty painful.
You can make TM stop generating these files by doing a defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1 at a terminal (with TextMate closed), but I find that to be overkill. The metadata stored (caret poisition, bookmarks, what text is folded, etc.) is useful as hell to have.
Or you can also set the svn:ignore property on every single project you have, but that sucks when you’ve got 50-some odd projects. Besides, this isn’t really a project-specific property, it’s more of a global, machine-level, “do not touch” sign on these files.
So, it should come as no shock that SVN has a global and a per-user configuration file, On sane, UNIX-y oeprating systems, you can find your personal config at ~/.subversion/config. The line you’re looking for is global-ignores. My default config had this line commented out, so uncomment it. By default it looks like this:
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store
Each entry (separated by a space) is a glob to match files against. The default line has all of the standard things a UNIX geek would want to ignore: object files generated by the C compiler, files ending in ~, and even the Mac OS X .DS_Store metadata file.
To get this to cooperate with us, add the glob ._* to the list:
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store .\_*
This will force SVN to ignore those ._filename files when doing svn status, svn add, and svn import, effectively making these commands useful again — especially when working with Windows users whose file managers don’t hide dot-files for them!
Productivity Communication between departments
I’m going to divert away from my recent trend of only blogging about Apple-y things. (Even though I broke down and bought an iPhone.)
One of the perennial problems we run across at Innova is communicating between our Elite Programming Unit and our Crack Network Team. Frequently, our hotshot programmers will start a project, but only tell the network team about it two days before it needs to go live. So, our Crack Sysadmin has two days to put together a vhost on a production server, enter in internal and external DNS entries, fiddle with the mod_rewrite stuff in the vhost until it works right, and all that. And Elite Programmer has two days (minus the time Sysadmin took to set things up) to verify that there aren’t any dumb bugs in the move to production.
(Yeah, we occasionally run into inconsistencies between our staging servers [ha] and our production boxes. We’re working on those, too.)
That sucks hard, so recently we set up a Project Whiteboard. So if Elite Programmer A starts a new project, FuzzyMuffins, then FuzzyMuffins gets it’s own space on the project board. The information we put up includes the name of the project, the project’s owner, the launch date (or a good estimate), and any dependencies. (For instance, some projects require complicated mod_rewrite crap. Another might require libxml to be compiled on production. Whatever.)
It’s a low-tech solution (this, coming from the company that uses a Wiki to coordinate lunch orders), but we’re confident that it works. We’re open to other suggestions, especially software that can do the heavy work for us — we’re programmers, we don’t like leaving our desks. Sunlight confuses us and human interaction is awkward.
I’ll let the General Interweb Population know how it goes.
Productivity .ssh/config
It’s been a busy busy few weeks here at Innova. Catering to your top-paid clients during a particularly busy time for them affords little time to maintain an online blog, but we still try. Our singular subscriber is probably desperate for content by now!
If you’re like me, you spend a lot of time in terminals, and have little respect for systems that don’t ship natively with bash (Hi Windows!). Also, you spend a lot of time sshd into various servers. There are a bunch of nifty things you can do with ssh to make it easy, but one of the nicest is the .ssh/config file.
Productivity random.txt
For the first year of Innova’s life, I was traveling to the New York/New Jersey area nearly every week, doing a mix of management and technology consulting that paid the bills but reminded me that living out of a suitcase isn’t my path to happiness.
Finding myself doing new kinds of work, I used to keep a text file of thoughts I’d fill in on the plane ride home. Limited battery life (to say nothing of my own failures) kept these from being too profound, but I often come back to them for a reminder that some really simple things can dramatically improve my effectiveness. This isn’t an exhaustive list–but those who consistently do 90% of these things would be superstars in nearly anyone’s book.
- Make decisions easy for your client. Clients are paying you to tell them what to do.
- Good consultants suggest what is done, not just how it is done.
- NEVER embarrass anyone at your clients’ business. People are smart enough to know who is at fault.
- Professionals are interested in outcomes. Your job is to create positive outcomes, not to go through the motions. It follows that there is no such thing as a bad outcome that isn’t your fault.
- Being effective nearly always means helping your client make more money. Your client may review financials before and after your work. Ask for a copy of the financials if appropriate.
- Help your client use you effectively. Steer your work away from things which are ineffectual, but remember that your client is paying you and therefor has final say in what you do.
- People love enthusiasm. Be sincerely positive with everyone you meet (and if you can’t be positive, you owe it to yourself to find something else that does make you happy).
- Identify the “so what” not the details
- Don’t create too many reports. It is easy to confuse a client’s love of knowledge with a love of reports. It helps to remember that your phone bill is also a report.
- People hate the word “No.” Translate the word “No” to an alternative suggestion if you can’t do what is asked. Continue Reading…
