Friday, May 13, 2011

Reading My Way to Better Design

I realized recently that I am completely capable of coding up a website frontend, but I struggle to make that website frontend look really good. My webdesign tends to be either too simple (“austere” is how one observer described it) or too tacky (my love for everything 80s seeps into all parts of my life). I was okay with this before when I was just making developer-facing demos, but now I’m at a stage where I want to make user-facing webapps, and I want the users to experience them and think “Wow, slick.”

So, I’ve set out to acquire a better taste in design, and I decided one way to do that is to surround myself on a daily basis with examples of great design. After Google’ing around and reading this HackerNews thread, I set up a folder in my Google Reader of 10 design-related blogs, and I now spend every morning reading through the posts (after drooling over my recipes feed, of course). It’s a great mix of topics, ranging from web design how-tos to well-designed physical products. It's hard for me to quantify if my design skills are improving, but I am at least thinking much more about it than before and acknowledging its importance.

If you want to do the same as me, you can subscribe to my folder feed or subscribe to the individual blogs listed below:

Please let me know in the comments if you have other suggestions for great blogs to read (and books too, while you’re at it).

Wednesday, May 11, 2011

No, Really, I'm Shy: My Ignite I/O Talk

Update: I've now created a site with all my tips for event attendees and organizers that grapple with shyness. Check it out at ProjectIcebreak.com

As many of you know, I'm kind of an Ignite junkie. I love the format - 5 minutes, 20 slides, 15 seconds auto-advance - and I love that I can use that format to talk about topics that I can't fill a whole hour with. At this year's Google I/O 2011 Ignite show, I got to give a talk on something that I think about a lot: my shyness. Most people don't believe me when I tell I am actually quite shy at my core, and so I dedicated my five minutes to explaining what shyness is to me and how I workaround it. The talk went well, and multiple folks approached me afterwards about their own shyness and hacks around it. Mission accomplished!
You can watch the video on Youtube - I'm at 24:09:

And/or you can read the slides on Slideshare:

Friday, May 6, 2011

Roundup: Developer Documentation Generators

While researching what developers love about their favorite API documentation sets for my last post, I also investigated what tools the API teams use to generate the documentation. Some teams just hand-write HTML, but most use code-based generators for the references and/or some sort of markdown for writing the guides. A good tool or toolset should make it easy to update the reference for every API release (outdated documentation should be avoided at all costs) and painless to write documentation about how to use the API (writing is one of those tasks that people put off - the less obstacles there are, the better). Based on my experience, here are the questions you should be asking when picking a tool:

  • What is the input for the tool?
    • Does it run over code and/or supplementary files? It's great to use a tool to automate your reference generation, but even better if you can use the same tool to write your developer's guide as well.
    • What languages will it process? If your API is written in multiple languages (like Flurry, the company I did this research for), you probably want to pick a tool that will work over all of them so you can have a consistent process and output.
    • What style of comments does it parse? If you're already using comments to instruct your compiler, you won't want to use a different format just for the docs.
  • What is the output for the tool? HTML is a must, even better if it can do multi-page and single-page. PDF and other formats can also be quite useful.
  • What is it written in? It needs to work in your development environment, and ideally hook into your build system.
  • How easy is it to customize for your needs? The ideal tool includes easy customization options that don't require digging into the code, but is also open-source in case they don't do it for you.

To give you an idea of (just a fraction of) what's out there, here is a breakdown of the documentation tools used by the APIs from the last post.

 

Multi-Language Generators

ToolInput filesInput languageInput commentsOutputWritten in?Examples
Natural DocsIn code or other filesC#, Perl, AS2, partial support for other languages.JavaDoc, or custom "natural syntax"HTMLPerljqPlot, Users list
DoxygenIn code or other filesC++, C, Java, Objective-C, Python, IDL, Fortran, VHDL, PHP, C#JavaDoc or QT style, with some support for other stylesHTML, TEX, RTF, PS, PDF, ...C++KDE, Users list
doccoIn codeCoffeeScript, JS, Ruby, PythonMarkdownHTMLCoffeeScriptdata.js and drops.coffee
SphinxIn code or other filesPython, C/C++RSTHTML, TEX, PDFPythonPython, Django
DocBookGenerated from XML filesXMLHTML, PDF, CHM, RTF, ...PHPPHP.net

 

Single Language Generators

ToolInput filesInput languageInput commentsOutputWritten in?Examples
JavaDocIn codeJavaJavaDocHTMLJavaAndroid
joDocIn code or other filesJSMarkdownHTMLPerlPhoneGap
JSDoc 3In codeJSJSDocHTMLJava/JSNone yet, in beta.
JSDoc 2 (JsDoc-toolkit)In codeJSJSDocHTMLJava/JSGoogle Maps API v3
JSDuckIn codeJSMarkdown, HTML, some JSDoc tagsHTMLRubyExt-JS 4
ErlDocsIn codeErlangHTMLErlangErlDocs.com

 

If you're interested in exploring tools further, check out the Documentation Generators section of my Developer Support handbook and this nearly comprehensive comparison of documentation generators from Wikipedia. There are always new tools being built out there by developers not quite satisfied by the current offerings and going at it their own way - and that's a great thing for all of us.

Let me know in the comments what tools you use (or are building yourself!) and your experience with them.

Thursday, May 5, 2011

Roundup: The Best Developer Docs

As I mentioned in my previous post on "What makes a good Developer Experience?", I'm currently consulting with Flurry to advise them on improving their developer experience. They're starting with a revamp of their documentation and API reference. Per what I wrote in the Documentation chapter from the Developer Support Handbook, good documentation should include tutorial style content, an API reference, and sample code, and should be fully linkable and searchable.

To confirm that my criteria for good docs aligns with what developers in the wild think, I conducted an informal survey on Twitter asking developers for their favorite and least favorite docs. I reviewed their picks, and as I guessed, here's what was common amongst the favorites:

  • Easy navigation: everything linked, clear table of contents, every page just takes 1-2 clicks to get to. Example: Yii.
  • Easy search:. prominent search box with autocomplete for method/class names. Example: Sencha.
  • Reference *and* guide: most offer both a technical breakdown of every part of the API (the reference) as well as a step-by-step narrative guide for using the API. Example: Twilio.
  • Inline code samples: in the reference, every class/method comes with example code below the definition, and sometimes that code can even be run in the browser. (Or for HTTP APIs, sample request and responses in every data format are offered). Example: CoffeeScript.
  • Comments: a threaded comment system on every page, for developers to discuss issues or usage. Example: jQuery.

And here are some cool bonus features from the favorites (that may not work for everyone):

  • Community edits: The Mozilla Developer Center lets anyone login and edit the information themselves.
  • Feedback loop: The PhoneGap docs prompt the developers to give them feedback on every page, and they use that to improve the docs.

Many of the favorites are written by the engineers themselves, which likely keeps them more up to date and accurate (and proves that engineers can write!).

The least favorite documentation sets typically suffer from basic usability issues, like lack of search or deep links. When you're writing documentation, you need to remember that your developers won't benefit from it unless they can find it - searchability and linkability should be a top priority.

I've rounded up the documentation sets in the tables below, with links, short description (including how they were generated, if known), and a thumbnail. I've also embedded a slideshow of the screenshots. Feel free to comment with your own opinions on what makes for a great set of developer docs!

Screenshots




Rave Reviews

Ordered by popularity, these documentation sets received all positive reviews. Great work!

jQuery
  • One page for each method. Includes code examples and discussion.
  • Manually written.
jQuery
Django
  • One page for each topic, narrative tutorial-like structure.
  • Generated with RST and Sphinx, More info here.
docs_django
PHP
  • One page for each method, includes examples and comments.
  • Generated with DocBook (XML), More info here.
docs_php
CoffeeScript
  • One page developer's guide with interactive code examples in each section.
CoffeeScript
Twilio
  • One page for each topic, includes example requests and responses for REST API and example XML for XML API.
  • Manually written by the engineers.
Twilio
Mozilla Developer Center
  • One page for each topic, includes example code, encourages community edits.
  • Uses wiki/social CMS system, MindTouch
MDC
PhoneGap
  • One page for each class, includes both short and long example code, and a popup feedback widget.
  • Uses joDoc for automated generation.
PhoneGap (Method)
Backbone.js
  • One page for each method (and example code), with framed (but still linkable) navigation.
  • Manually written.
BackboneJS
Yii
  • One page for each class, lots of internal linking, prominent search with autocomplete. Includes code samples and links to original source code.
  • Generated with custom, open-source PHP tool.
Yii Framework
NodeJS
  • One page for each topic, or can be viewed all on one single page. Includes code examples for each method.
  • Generated using doctool and Markdown.
NodeJS
Play! Framework
  • Includes step-by-step tutorial and developer's guide (no reference).
Play! Framework
Sencha ExtJS
  • One page for each class, highly linked, inline code examples, and search with auto-complete.
  • Generated using JSDuck and Markdown.
Sencha
SimpleGeo
  • Organized by topic with one page for each. Written in a narrative form and includes code examples.
  • Generated using Django and templates, More info here.
SimpleGeo
Twitter
  • One page for each API endpoint ("resource"), with example request and responses in XML/ATOM/JSON.
  • Partially generated from code, manually curated by engineers.
Twitter
Android
  • Javadoc style, with ability to change language and API level, plus search with auto-complete. Incudes tutorial style articles as well.
  • Generated from code using JavaDoc.
Android

Mixed Reviews

These documentation sets had both positive and negative reviews. (What works for one developer doesn't always work for another).

Python
  • One page for each topic, with embedded references and code examples. Complaints: no search/comments.
  • Generated using Sphinx and RST.
Python
Facebook
  • A mix of reference style docs, articles, and github-hosted readmes. Includes search and (Facebook) comments. Complaints: too loosely organized.
Facebook

Not-So-Great Reviews

These documentation sets had all negative reviews. (Well, they can always improve!)

Ruby
  • Javadoc style with framesets. Complaints: can't be searched or linked, no per-topic organization.
  • Generated from code using RDoc.
Ruby
Amazon Products API
  • Frameset docs, both tutorial and reference style. Complaints: takes many clicks to find the reference, provided sample code does not work.
Amazon
Paypal
  • Includes articles and reference docs. Complaints: instructions are dumbed down, deprecated information isn't marked as such, there are too many places to find a piece of information, not enough example code.
Paypal
OpenLayers
  • Wiki and reference. Complaints: No code examples, hard to find docs.
  • Generated using NaturalDocs.
OpenLayers
CouchDB
  • Wiki with articles by topic. Complaints: Hard to navigate.
  • Uses the MoinMoin wiki engine.
CouchDB

Thursday, April 28, 2011

What makes a good "developer experience"?

(Short version: To help me answer this question, fill out this survey. Thanks!)

We are all quite familiar with the term "user experience" (UX) because as developers, we are typically spending our time developing products that we want people to use, and we want the UX to be positive so that they continue using them. However, we are now in the age of web APIs and developer platforms, and increasingly more of us are spending our time developing products for developers themselves to use.

Just like with user products, we want the "developer experience" (DX) to be positive so they continue developing on top of our service, and so they feel good relying on us to be part of their app's technology stack. When we talk about user experience, we focus on the usability of the user interface and the various user actions (like sign-in, search, share). A developer experience is very different, though, and when we talk about it, we should be focusing on the usability of the API and the developing-and-debugging experience. How does a developer first learn about your service? Where do they go when they need help? How easy is it for them to develop arbitrary apps on top of it? Can they use it successfully in their preferred environment? Those are the sort of questions that we need to ask to figure out what the developer experience is like.

Developer experience is important and non-trivial, but unfortunately, it's been nowhere near as discussed as user experience - a quick Google search yielded mostly this one article from UXMag. When I worked in developer relations at Google, we were basically tasked with designing the DX for our APIs and tools, and when I wrote up the Developer Support Handbook, I was attempting to document some of what I learnt from my years on the Maps and Wave APIs. That handbook only talks about some aspects of the experience - it doesn't talk about API usability at all - and it's only based on my own limited experience. I know that there is much more to be documented and discussed, and that there are many different types of developers and developer services out there, and just as with UX, there may not be just one set of DX principles that fits everything.

Why do I bring this up? A few weeks ago, I met with a mobile analytics company called Flurry to discuss their developer experience and how they can improve it to better support their current developers and encourage future developers. I gave them my own opinions, but I really would love to hear the opinions of more developers to give me a broader perspective. To find out what you guys think about what makes a positive developer experience, I've put together a short survey. Please fill it out if you have the time, or feel free to leave comments on this post. Thank you for your thoughts and for caring about what it means to have a good developer experience.

Sunday, April 17, 2011

SF jQuery Conference 2011: My Learnings

For the last 5 years, I've really only attended conferences that I was speaking at or somehow representing Google at, and I was always paid by Google to attend. This past weekend, I convinced myself to pay out of my own pocket to attend a conference for the first time, and it was completely worth it.

jQCon was a 2-day event in the Microsoft Mountain View campus with a wide range of well-known speakers, like Nicholas Zakas, Steve Souders, Paul Irish, and of course, John Resig, plus equally skilled but lesser known contributors to the world of jQuery and JavaScript programming. It was a great way to learn new techniques and tools for client-side web app development from the people that are doing it 24/7 for some of the biggest sites on the web.

I personally gravitated to the more mobile-oriented talks, as I've recently become interested in mobile webapp development (I finally use my phone here!) and have been using jQuery mobile for the next version of SpeakerMeter. I learnt a lot about how people are currently writing mobile webapps, and more importantly, I realized that this is a rapidly changing area, particularly as the line between desktop and mobile becomes increasingly blurry. I was hoping to find the "one true way" of making a HTML5 mobile webapp, but I've realized instead that I need to try the current ways out there (like PhoneGap + jQuery Mobile) and be ready for that to change.

I took notes throughout the talks on tips and resources, and am sharing them here both for my own reference and to give you an idea of what was discussed. I look forward to learning more at the next jQCon, whenever that may be. :)

Day 1:

jQuery Mobile (Todd Parker & Scott Jehl)

  • Many developers are using jQuery Mobile in combination with PhoneGap to deploy mobile-optimized webapps.
  • jQuery Mobile now supports more mobile browsers, including Kindle Webkit.
  • The jQuery Mobile team put a lot of work into making all the controls accessible.
  • The team is working on an improvement that will include better URLs (hash-less) for browsers that support it (HTML5 pushState).
  • The team made sure that it was easy for developers to make custom themes/colors, and they want more developers to take advantage of that.
  • Browse the jQuery Mobile gallery to see what other developers have done.
  • The M Project is an open source project to make it easier to make mobile webapps with jQuery mobile.
  • The team recommends specifically optimizing the UI for iPad/tablets and not just using the standard narrow mobile layout. They hope in the future that the framework can do more of that for developers.
  • CSS3 media queries can be used to change the UI for different device sizes.
  • jQuery Mobile can be used with grids frameworks (can be useful for tablet layout).

Mobile Performance (Steve Souders)

  • Its better to have your site be fast when users first experience it - study showed slow sites lost users (and it took a while for them to come back).
  • Use Blaze.io for seeing the mobile performance of your site (like webpagetest.org).
  • Use PCAP Web Performance Analyzer to analyze performance of websites (can be used locally).
  • Use JDRop with mobile bookmarklets to store performance data in the cloud for later analysis.
  • Use data URIs and localStorage for better mobile performance.

Progressive Enhancement 2.0 - Because the Web isn't Print (Nicholas Zakas)

  • Read: "Understanding Progressive Enhancement"
  • "The relationship between a web browser and a webpage is like a television and a TV show."
  • Examples of progressive enhancement in the real world: escalators and electric toothbrush.
  • Websites don't need to look exactly the same in every browser.
  • Don't try so hard to make old browsers do what new browsers can (consider effort versus value) - like rounded corners, drop shadows, and gradients.
  • Developers use multiple browsers, but most users only use one browser - they won't know if the experience is different.
  • Progressively enhance for browsers that support newer technology - Facebook chat is an example of a progressive enhancement.

Integrating Code Quality tools into your jQuery Development Workflow (Anton Kovalyov )

  • JSHint is the alternative to JSLint - does not enforce so many "crocklamations" by default.
  • Recommends using git precommit and postcommit hooks for running JSHint, to make sure all team members are using it. Break the build if it errors.
  • Many community-written addons for integrating JSHint with IDEs. He likes Sublime.
  • Read: Perfection Kills, A minute with Brendan

Prototyping and Unit Testing with Mockjax & mockJSON (Elijah Manor)

  • MockJAX is a jQuery plugin for simulating AJAX requests and responses.
  • MockJSON is a library for generating random JSON responses based on JSON templates. Works well with MockJAX.

Day 2:

Filling the HTML5 & CSS3 Gaps with Polyfills and Shims (Rey Bango)

  • Rey is both a Microsoft employee and a jQuery team member - MS is a big supporter of jQuery.
  • A "polyfill" mimics a standard/future API and makes it work in older browsers, whereas a "shim" provides an arbitrary API for achieving some functionality. "Polyfill" was named by Remy Sharp after the British term for spackling - it's like filling holes in old browser cracks.
  • When you are using a polyfill or shim, vet them carefully: see how many developers are working on them, how frequently they update them, etc.
  • Long list of polyfills and shims.

How jQuery is helping Pixar to make their movies (Philip Floetotto)

  • Pixar is a big Python user. For their project management system, they used Django for the backend and jQuery for the frontend.
  • They built their UI on top of the TableSorter plugin.

Presentational jQuery (Doug Neiner)

  • Be concious of when you use linked stylesheets vs. STYLE tags vs. inline style setting. Never use jQuery to set initial state. Reduce use of .css() as much as possible.
  • "Use selectors like you run errands" - try to do as much in one call as you can.
  • Experiment with easing (on different properties) for better animations.

Breakout Session: jQuery Mobile

Much discussion on using jQuery Mobile to build static sites that are deployed as WebViews inside of native apps.

  • Advantage of PhoneGap over Titanium is that it deploys to more mobile platforms.
  • Phone Gap Build lets you deploy mobile apps without needing to download anything.
  • Use something like JSON Template or Handlebars for client-side templating of the jQuery mobile headers and footers.
  • Use HT Track or Hyde to use Django templates locally and still output a static site.
  • Recommended reading: Responsive Web Design.

The Middle Way: Developing Hybrid Mobile Apps (Alex Kessinger)

  • Use localStorage to store data locally, and use LRU to stay under the 5MB size limit.
  • If using AppCache, inline everything (CSS, JS, HTML) so everything stays in sync in the cache.
  • For a better user experience, render *anything* to the user first (versus nothing), even fake DIVs.
  • For easier mobile debugging, try JSConsole.
  • OpenAppMkt is a marketplace specifically for mobile-optimized webapps.

Breakout Session: CouchDB + jQuery

Wrote a small JQuery & CouchDB app (with this view).

Creating mind-blowing UX - "Building great user experiences with the help of jQuery" (Darcy Clarke)

  • User experience is about emotions - you want your users to have positive emotions when using your site. Surprise is an emotion that can be either positive or negative.
  • Inspirational design agencies: F-I, Zurb, Blitz

Wednesday, April 13, 2011

Twenty Questions (With Myself)

It's always fun to answer questions about yourself - remember those "About Me" books you would fill out as a kid? Well, I do, and I loved them, so when people ask me if I'm up for an interview, I always say yes. I recently answered a series of long & short questions for a Mexican development agency's internal newsletter, and since that newsletter isn't online, I figured I'd share them here instead. Enjoy!

Short Questions

  • Linux, Mac or Windows? Mac. I was raised in a Windows-using family - back when Macs weren’t Unix-based, but I recently converted to Mac and love it.
  • Twitter or blog? Both. I like the challenge of expressing something in 140 characteres, but I also like to write up my experiences and projects in much longer blog form.
  • iPhone or Android? Android...only because I got free Android phones from Google. I’d happily accept a free iPhone if it were to come my way. :)
  • Bread or tortilla? Neither. I’ve recently stopped eating grains of any sort (as they’re not actually that good for you). I miss tortilla more than bread though - growing up in Los Angeles, I was raised on quesadillas!
  • Wine or tequila? Wine. I save tequila-drinking for when I’m in Mexico and can drink the good stuff. :)
  • Day or night? Day. I’m afraid of the dark.
  • Warm weather or cold weather? Warm.
  • Sunny or rainy? Sunny! The rain is only fun if there’s a hot bath waiting for you at home.

What is your favorite…

  • Book: I can’t come up with just one. My favorite book genre is short stories, and Roald Dahl has some of the best stories out there.
  • Gadget: Kindle. It stays charged forever, and since I hate charging things, that makes it my favorite thing.
  • Videogame: Puzzle Pirates. I don’t play it anymore, but it’s the only game that I’ve come close to an addiction with.
  • Programming Language: JavaScript. It’s weird, but it works.
  • Browser: Chrome.

Tell us how did you get your first computer, and what age were you?

I don’t actually remember a time when we didn’t own a computer - since my parents were effectively computer scientists since the day I was born, we always had computers in the house. I first remember using DOS to play a “Garfield” and a “Dinosaurs” game, and then we upgraded to Windows 3.1.

Why did you choose to be a programmer?

I was always very in to computers as a kid- I loved using them to make posters and to browse the web. When I discovered programming - specifically web programming - I loved them even more. I made fun little games, I made a “cyberclub,” and I made websites for everything I did.

When it came time to deciding what to major in at college, I found it easy to pick Computer Science. I knew that no matter where my interests went, I could use my computer science skills to complement those interests, and I knew that I could always get a job with those skills.

As a programmer/developer, what is the thing that motivates you the most?

I like the ability to make something, and to easily share that something. If I wasn’t a programmer, I think I would be an artist of some sort, so that I could fulfill my need to create that way.

In which programming language do you feel the most comfortable on?

I am generally the most comfortable in “scripting languages,” and these days, I am the most familiar with JavaScript. I have always been attracted to scripting languages over compiled languages because I love the speed at which you can develop with them, and I find them generally more approachable.

On the server, I tend to use Python, but would love to try out using JavaScript there as well. I like the idea of getting to use the same language for both the frontend and the backend. The lines are blurring between them, so it makes sense for the language to be the same.

Do you have a hobby that is not related to technology?

Lately, I’ve gotten really into cooking. I’ve discovered that I get a similar creative rush from cooking as I do from coding. When I cook a meal, I get to enjoy the end result, I get to share it with whoever is around me, and I get to share with the world how I did it. When I code an app, I get to use the app, share it with other users, and open-source the code.

The main difference between cooking and coding: far fewer bug reports, and no long-term maintenance required!

How do you feel as a woman that works in a predominantly male environment?

I usually don’t think about it that much. I grew up around a lot of males - I had a brother with a lot of male friends, and I tended to make a lot of male friends myself. So, I didn’t find it that weird in college or work to be surrounded by males, and in fact, I somewhat preferred it.

(I wrote a much longer blog post about this here.)

Do you feel that you had to break the gender barrier or any stereotype because you are a woman in order to be considered a good programmer?

I have to admit, I don’t actually think I’m a great programmer. I think I’m a pretty good programmer, but not great. I am able to achieve beyond my core programming skills because of my ability to combine multiple skills, my desire to create, and my desire to share my knowledge with others.

I do often wish that I was a crazy-good programmer like my colleagues and peers, and I think to myself that I should take some classes or read some books to increase my skills...but then I think that I’m pretty happy with my diverse skillset.

I do sometimes feel as if I have to break stereotypes when I am giving talks to new audiences, as some people see a girl on stage and immediately assume she’s not going to talk technical. By the end of the talk, they know better. :)

What's your achievement that you feel the most proud of?

Looking over the past five years, I am most proud of my “teaching moments” - the times when I taught someone something new, and could see their knowledge grow as a result. I’m sure I had many virtual teaching moments with developers in forums, but I am most proud of the in-person moments with students in classes. There’s something very real and very gratifying about watching students grow from the first day of a class to the very end.

How do you do to keep your life under balance, I mean, keep learning, spend time with your family and friends, work hard, etc?

I don’t. My father is a workaholic, and he instilled a similar work ethic in me. When I am working, I’m putting all of myself into that, and I find it hard to justify making time for family and friends. I instead wait for them to force me to make time for them, and if they force me, well, I can’t say no.

I recently left my job, and I’m looking forward to finally putting friends and family first, at least for a few months. In the end, it’s the people that you remember more than the work anyway.

What projects do you have in mind for the near future?

Generally, I want to make apps that I would use, and if I’m lucky, a few other people would use as well. As I am currently obsessed with food and nutrition, I am experimenting in that area to see what apps might make it easier for me to eat healthily, to cook delicious meals, and to share nutrition information with others.

My basic strategy is this: Every day, when I encounter a situation that would be made better with an app, I write down the app idea. If I end up writing down an app idea multiple times, well, there’s a good chance I will make it.