Adam Fields (work stuff)

Month

January 2009

8 posts

Responsive UI should be priority #1

I just can’t get over how many product managers there are who seem to think that it’s okay to release products that don’t have responsive UIs. If a device locks up for a few seconds when I press a button, you’ve failed. If I get some feedback a few seconds after I push a button, you’ve completely failed.

It is really important for the user experience that every time a user does something to interact with your tool, _something_ happens immediately. If that something is a notification that the machine needs to think about it for a while, that’s fine, but make it abundantly clear that the user’s input was understood and processed. It is not okay to just leave the user hanging.

Particularly, I’m stunned at how many recent cellphones suffer from this problem.

Jan 28, 20091 note
#ui #responsive
The main reason I loathe Python

I’m not a huge fan of the general syntax, and I find some of the libraries inconsistent, but far and away the biggest dealbreaker for me with python is the fact that whitespace is significant. I don’t understand how this isn’t a problem for everybody who writes python code. I’ve spent literally days of effort unraveling problems with shared code because someone botched an indent somewhere. I cannot think of a better way to introduce invisible logic errors into your code than making whitespace significant.

Code isn’t just written in a text editor anymore - I work almost exclusively with distributed teams, and we do code sharing via email, skype, IM… whatever. With most languages, this works fine. With python, it’s a complete disaster. Skype is almost entirely useless, because it collapses all leading whitespace, destroying all semblance of structure in a block of python code. I even have problems pasting between some code repositories (e.g.: Code Collector) because they use tabs instead of spaces or vice versa. Pasting a bit of code into an interpreter window is impossible, because it just throws errors. This makes it very difficult to reuse useful bits of code, and hard to do one-off tests.

If you love python, how do you deal with this?

Jan 28, 2009
#python, #whitespace #significant #coding
http://layersapp.com/ → layersapp.com

Layers is an OSX app that takes a screenshot of all of your open windows and produces a layered PSD, which you can then easily manipulate. (Via daringfireball.)

Jan 26, 2009
#layers #osx #apps
“If it isn’t written down, it doesn’t exist.” —Adam’s First Law of Project Management
Jan 26, 2009
Jan 26, 2009
git is good, but has some gotchas

The development world used cvs for a really long time. I’ve never been happy with it at all, and found it very tedious and often not worth the trouble. Then came svn, which solved many of those problems, but left a whole world of other ones. I was impressed at the extent to which svn mostly replaced cvs (for web development, at least), but I’ve been totally blown away with the rate of adoption of git. It seems that every public project has switched over to using it in a matter of a few months.

On its face, git seems to offer some advantages over svn - primarily no dependence on a central repository (though I like having one for distributed teams so there’s a canonical revision to push to production from) and significantly better branching and merging.

So I started using it on one of my projects. I created a new repository on my laptop in /Users/fields/workstuff/newproject, and git cloned it to my desktop’s home directory in /Volumes/fields/workstuff/newproject. And I think I really confused it. It seemed to be working fine. I made some changes on my desktop and did a git pull to bring them back to my laptop, and that went fine. Then I went away for a while and made some changes on my laptop. When I tried to push them back to my desktop again, it was clear that something wasn’t working.

On my desktop, git status showed:

# Your branch is ahead of ‘origin/master’ by 18 commits.

and then followed by a lot of deletes. But I shouldn’t have had any deletes, because I only added new files on my laptop. When I tried a git push from the laptop, it said the desktop was up to date, but it clearly wasn’t.

As far as I can tell from looking at the config file, what’s happened here is that by mounting the directory remotely, and then having it be in the same path as the source master, I’ve confused it, and the one on the desktop thinks that it is its own origin (which is /Users/fields/workstuff/newproject in both places).

Oops. I guess I need to look into this further and presumably find a different way to publish these for synchronization. I haven’t yet found my way through the decentralized source control pattern yet, and I still miss having one central server to write to. (Yes, I know it’s possible to configure git to do that, but I’m trying to break away from it and fully embrace the distributed git approach.)

The issue seems to be that git is unable to deal with the same path being referenced in two different ways i.e.: /Users/fields (locally) vs. /Volumes/fields (when mounted remotely). You should be able to pull changes from one git directory on your machine to another, but this seems to not work properly when one of those directories is a remote mounted directory.

To be clear: Directory A is in my home directory on my desktop. Directory B is in my home directory on my laptop. On each local machine, these have the same path. I mounted Directory A on my laptop (referencing it by a different path), and cloned Directory B to it.

Jan 26, 2009
#git svn
My preference for ruby

I’m often drawn to program in the easiest language that will do what I want. Some of this is just run-of-the-mill programmer’s laziness, but mostly it’s because ruby comes as close as any language I’ve found to expressing how I think of algorithms. Only slightly secondarily is that it’s one of only two languages I’ve worked with, and the only object-oriented one, in which I’ve routinely been able to drop down into the middle of someone else’s uncommented code and understand what it’s doing with enough confidence to make modifications. This is huge to me. Code is only written once, and continuously maintained after that, sometimes years later. There are a number of different techniques for dealing with maintaining code that other people have written - documentation and commenting standards, logical interfaces and encapsulation, pair programming, etc… - but by far the easiest one is simply being able to read it and understand what it does. Ruby encourages this in a way that other languages do not. Sure, it’s possible to write ruby code that’s not understandable, but it’s more difficult, and it’s usually (but not always) a signal that you’re doing something wrong.

Ruby is elegant, and it takes its commitment to being object-oriented seriously. In ruby, everything is actually an object, even low-level datatypes like integers. Combined with the block structures that let you pass bits of code around, this is both very powerful and expressive (which translates into readable). It’s a simple one, but I like this example, which shows off both this iterator concept and ruby’s type awareness:

» x = “yes”
=> “yes”
» 3.times {|n| puts n.to_s + x}
0yes
1yes
2yes
» 3.times {|n| puts n.to_s + x * n}
0
1yes
2yesyes

I like that the object methods are well thought out and consistent. Again, it’s a simple example, but it pleases me to no end that the join method is part of the array type and not the string type.

Here’s how you concatenate an array into a comma-separated string in python:

» numlist = [1,2,3,4]
» numlist
[1, 2, 3, 4]
» “,”.join([str(i) for i in numlist])
‘1,2,3,4’

In ruby, this is much more concise:


» numlist = [1,2,3,4]
=> [1, 2, 3, 4]
» numlist.join(‘,’)
=> “1,2,3,4”

Just about the only place that ruby falls down for me is in raw performance, though that looks set to improve significantly with ruby 1.9 and 2.0, which I’m eagerly awaiting. For the time being, I’m still using python in places where I need more speed but still need the rapid application development turnaround time of a scripting language that would preclude writing it in java or C (I’ve long since largely given up on perl as being unmaintainable as soon as its written).

For me, in most cases, the extreme readability and ease of coding far outweighs any drawbacks. I’ll post more examples as they come up - this is the tip of the iceberg.

Jan 14, 2009
"You should write a blog about work stuff."

Most of my online creative work has been personal output that isn’t directly tied to work.

I take a fair number of photographs and periodically post the ones I like most to Flickr, but that’s an artistic outlet. I could have been a professional photographer had I dedicated myself to that, but I don’t love it enough to do it day in and day out.

I post to twitter. Sometimes that’s technology related, but most of it is just random thoughts and responses to other people’s comments on twitter.

I write on my blog. Sometimes that’s technology related, but mostly when it is, it’s about technology policy, or the impact of technology on society. Usually, it’s something about privacy, or security, or online tracking, or politics, or lead in toys, or education. Often, it’s just something about food or cooking (another thing I think I’m very good at, but don’t love enough to do for a living).

Work has remained mostly work, with the people I’m working with. I write about technical things on mailing lists, but those are generally not public, and I’d like to share more.

So here we go. I think it took a long time to get to this point because I have a hard time defining what it is I actually do.

I’ve worked on too many client sites to list here, as well as my own applications.

On a day to day basis, I have my hands in everything needed to build and run a web application, from the ground up. With the exception of making it look pretty, I could do most of it by myself if I had to, though I prefer to work in teams. Often, I find myself doing aspects of:

  • requirements analysis
  • technical specifications
  • business process integration
  • listening, distilling, and drawing detailed informational diagrams
  • systems design and technical architecture
  • project management
  • development in a number of different languages, and learning new languages if needed
  • caching system design and implementation
  • user interface design / user interaction design
  • general application performance and scaling engineering
  • api / network protocol design
  • security
  • data modeling
  • database implementation, tuning, and maintenance
  • server hardware installation, tuning, and maintenance
  • server OS installation, tuning, and maintenance
  • backup and backup strategies
  • load balancing / routing configuration
  • testing and deployment mechanisms
  • setting up some piece of packaged software that I didn’t write
  • developing and carrying out QA plans
  • probably a whole bunch of other stuff I’m forgetting at the moment

I don’t have a single name for all of that, but I’m open to suggestions.

My ideal job is about 40% coding and data modeling, 10% solving weird optimization problems, and 50% designing intricate-yet-elegant processes for both user-facing and machine-facing problems. I strongly prefer ruby to other languages because of its staggering elegance, but I’m comfortable working in other languages when they have strengths that ruby currently lacks.

I primarily use Linux (Gentoo if possible) and BSD for server environments, and I’ve completely moved my desktop/laptop workspace over to OSX as of 2008.

That’s the work stuff I’m going to talk about here.

Jan 14, 20097 notes
Next page →
2012 2013
  • January
  • February 1
  • March 4
  • April 1
  • May 1
  • June
  • July
  • August
  • September
  • October
  • November
  • December
2011 2012 2013
  • January
  • February 1
  • March 1
  • April 3
  • May
  • June
  • July 1
  • August 2
  • September 1
  • October 1
  • November 3
  • December 2
2010 2011 2012
  • January 1
  • February 1
  • March
  • April 3
  • May 2
  • June 1
  • July 1
  • August 1
  • September
  • October 2
  • November
  • December 1
2009 2010 2011
  • January 1
  • February 1
  • March 12
  • April 2
  • May 2
  • June 1
  • July
  • August 3
  • September
  • October 2
  • November
  • December 3
2009 2010
  • January 8
  • February 4
  • March
  • April 1
  • May 1
  • June
  • July 2
  • August 4
  • September 2
  • October 3
  • November 1
  • December 1