Inspiration from Civic Tech Leaders: The Snippets

For the past 3.5 weeks, the Benjamin Franklin room has been graced by a roster of amazing speakers and mentors. Almost every day we have been inspired, galvanized, and challenged by the stories and personalities of civic tech leaders including:

I wish I could have better captured the raw emotions (or even verbatim quotes) but I was too enraptured in the here-and-now listening to be taking detailed notes.

These are the snippets — the partial sound bites.

Jennifer Pahlka

  • 99% perspiration & iteration — no geniuses.

David Eaves

  • We’re not here to hack code. We’re here to hack bureaucracy.
  • Get in their shoes and imagine what’s possible.

Tim O’Reilly

  • Show government what’s possible when you use tech.
  • Platform beats an app every time.
  • Platforms get driven forward by amazing apps.
  • Start from the outside in. Start with user needs, not government needs. The ultimate customer is the people of the city.
  • Recognize different types of people not in the frame. Reframe and reformulate. Don’t just accept the frame given to you.

Brett Goldstein

  • Don’t build what you want, build what they need.
  • Speak their language. Straddle the worlds.
  • Deliver small things fast. Deliver shiny things fast.

Todd Park

  • Precision and ferocity of response.
  • Do sh*t. Don’t underestimate the power of precedence.
  • It’s not about you. It’s about what you do to catalyze people.
  • Not just about tech. The tech is not hard. We need people who have rocket science EQ and are mission-oriented.
  • Your pain is irrelevant compared to the story of those suffering.

Day 6

It is Week 2, Day 3 of Code for America. I stepped foot into Code for America as a Fellow only a week ago. Wednesday last week was the inaugural day, the kick-off to a 10-month civic tech building adventure with an amazing cohort of 24 developers, designers, data scientists, and product managers. Still jetlagged after over a month traveling to two continents (three if you count my home base), I was a bundle of nerves on Day 1. But I had been a bundle of nerves for months, ever since I received that quite unexpected but truly delightful acceptance email and even more so after I learned of the amazing caliber of Fellows. How much more nervous could I get?

Well, rest assured, I didn’t let myself down. By the end of Day 1, I was on a jittery high. But beyond these escalated nerves and pure exhaustion, I was also incredibly excited and eager for the journey to come.

To be continued …

Power of 10

“I finished Tom Piketty’s Capital in the 21st Century!”, my friend giddily exclaimed as if she had just crossed the finishing line of grueling triathlon. Indeed that is probably an apt metaphor. In a couple days, she had finished reading the 696-page behemoth during her 10-minute commute to and from work. Her 10-minute claim was likely a gross underestimate of her commute from Balboa Park to FiDi but I got the point: a few minutes of reading here and there adds up.

Screenshot 2014-11-09 00.17.05

I used to be a reader. I used to curl under my covers, hovering a flashlight over my John Grisham suspense novels (… I know, not great literature). I used to have my head in the books so much so that it probably didn’t do much good for my -10.0 eyesight already before puberty. Back then, I always made a way to sneak in a few pages even after my mother turned off the lights goodnight — and even after scare tactics warning me that I would go blind (I am still scared of that one).

But, as an adult, I seemed to always have some excuse when it came to reading books: “I am too busy”, “I don’t have time”, “I can’t carry heavy books around”. But really, were these valid reasons? I wasn’t too busy and I didn’t NOT have time for a few minutes of reading. I had 30 minutes during my lunch breaks and easily 4x that in the evenings before hitting the sack (where my usual nightcap would be at least 2 episodes of Sherlock, Elementary, or Person of Interest). And, as for heavy books weighing me down? I didn’t have to carry bulky books around. That’s what my $99/month unlimited AT&T plan + iPhone was for!

I decided to take on this “10-minutes a day” habit. Well, it wouldn’t quite be a habit yet but I decided to incorporate it into my everyday routine so much so that it would become almost a second-nature habit: just like my nightly rituals of brushing my teeth, washing my face, and lathering on my please-keep-me-looking-16-minus-the-pimples cream. I strategically coupled my reading time with my lunch time. It was a chunk of time that I took every day, that I knew lasted a minimum of 10 minutes, and that I wouldn’t be distracted by anything much other than eating.

So what happened?

Well, I didn’t stick to at least 10-minutes of reading a day but on average it came out to several minutes of reading a day: 5 minutes on the bad days and 1+hours on the good days. The exact number of minutes didn’t really matter though. And, really neither did reading every single day. It was more that reading became an enjoyment again. I re-discovered a pleasure, a past-time renewed. Most surprisingly though and more importantly, it became a catalyst for change and a source of inspiration.

Over the two months, I finished three books.

  • Brene Brown’s The Gift of Imperfection: Let Go of Who You Think You’re Supposed to Be and Embrace Who You Are
  • Tom & David Kelley’s Creative Confidence: Unleashing the Creative Potential Within Us All
  • Nick Morgan’s Power Cues: The Subtle Science of Leading Groups, Persuading Others, and Maximizing Your Personal Impact

While my 5-star rating rate was only 1 out of 3, that “one” – as cliche as it sounds – changed my life, or at least my perspective on life moving forward. The “one” (Creative Confidence) shone a spotlight on and forced me to look into a mirror of all my paralyzing insecurities. Face-to-face with these fears of failure, fears of judgment, and fears of change, I realized how much these insecurities had hampered my confidence and how with a little bit of courage, one step at a time, I could regain my power to do what I really want to do and simply be me: “What’s the greater risk? Letting go of what people think or letting go of how I feel, what I believe, and who I am?”

creative_confidence_art

Long story short, I officially resigned from what the Kelleys call a “looks good, feels bad” job. I am now taking my first step into a new adventure that I hope will lead me towards realizing my true calling.

I am scared. I am very scared. I still have many fears but I keep repeating the words that first inspired me to be courageous: “If you want to transform your life from mere duty to real passion, you have to start by realizing that your current situation is not the only option open to you. You can change how you live and how you work. Look at setbacks as the cost of trying new things. Don’t be afraid to try and fail. The worst thing you can do is to play it safe, stick with the familiarity of the status quo, and not try at all.”

So, what is your power of 10?

 

 

Practicing Creative Confidence

I hadn’t picked up a book for much too long. The leisurely read. The lay-on-the-beach kind of reading. The curl-up-before-bed kind of reading. The zone-in-on-the-commute kind of reading.

creative_confidence_art

I picked up Creative Confidence because, well, I was in a rut. The routine of waking up at 8 am, planting myself at my desk from 8:30 am-12 pm, grabbing a quick lunch to bring back to my desk, planting myself back in front of the computer until my lingering departure at 6 pm (sometimes 7 pm, sometimes 8 pm, sometimes 9 pm) had stripped me of any fresh-faced enthusiasm for what’s to come.

I enjoyed my job. And, I was good at it but it no longer gave me joy: the joy of being challenged, the joy of learning something new, the joy of contributing something tangibly “good”. I knew I needed a jolt of inspiration to push me out from behind my desk. An external push. I had become a bit too comfortable. I was strapped down by a fear of the unknown and a complacency for the known: a looks-good but feels-not-so-good (but good enough) job.

I needed more. I wanted more. But I was otherwise lost.

creative_confidence

Creative Confidence was exactly the dose of inspiration I needed to awaken me on how to “unleash the creative potential within us all”. With powerful anecdotes of those who were once (knowingly) lost but took charge of their creative potential through the lessons put forth by David Kelley (IDEO founder and Stanford d.school creator) and Tom Kelley (IDEO partner), I gained a better know-how to take the first step towards harnessing my own creative confidence.

So much of Creative Confidence resonated with me that I collected the words, literally carrying them in my pocket to remind me that latent creativity can be developed into creative confidence through everyday practice. One step at a time.

These quotes speak for themselves.

  • “What’s the greater risk? Letting go of what people think or letting go of how I feel, what I believe, and who I am?”
  • “In our experience, one of the scariest snakes in the room is the fear of failure, which manifests itself in such ways as fear of being judged, fear of getting started, fear of the unknown. And while much has been said about fear of failure, it still is the single biggest obstacle people face to creative success.”
  • “Fear of failure holds us back from learning all sorts of new skills, from taking on risks, and from tackling new challenges. Creative confidence asks that we overcome that fear. You know you are going to drop the ball, make mistakes, and go in a wrong direction or two. But you come to accept that it’s part of learning. And in doing so, you are able to remain confident that you are moving forward despite the setbacks.”
  • “György Konrád once said, ‘Courage is only the accumulation of small steps.'”
  • “When ideas are in short supply, it’s tempting to become possessive or territorial and limit your options. If you have only a few ideas in your idea bank, you’re more likely to settle on one of the few you have and defend it fiercely, even if it’s not optimal.”
  • “The best kinds of failures are quick, cheap, and early, leaving you plenty of time and resources to learn from the experiment and iterate your ideas.”
  • “Little changes can eventually add up to a big impact. Starting small gets you from a state of rest to a state of motion, and you’ve started to build momentum for the bigger challenges ahead.”
  • “Whether your resources are abundant or scarce, embracing experimentation can help fuel the fires of innovation. Experiments, by their very definition, are expected to have a higher rate of failure. But if you recast the traditional failure-is-not-an-option attitude as a series of small experiments, you can actually increase your chances of long-term success.”
  • “So don’t sit back and let circumstances determine your fate. Take action yourself, and influence the actions of others. As one of our favorite radio journalists, Scoop Nisker, used to say at the end of every one of his broadcasts, ‘If you don’t like the news … go out and make some of your own.'”
  • “When work is strictly a job, it may effectively pay the bills, but you’re living mostly for the weekend and your hobbies. Those who see work as a career focus on promotions and getting ahead, putting in long hours to achieve a more impressive title, a larger office, or a higher salary. In other words, you are focused on checking off achievements rather than pursuing deeper meaning. In contrast, for those who pursue a calling, their work is intrinsically rewarding in its own right— not just a means to an end.”
  • “What matters most about your career or position is not the value that others put on it. It’s how you view your job. It’s about your dream, your passion. Your calling.”
  • “Once you start to think about your life and career as just another creative challenge, many different possibilities may come to light.”
  • “While everyone has enormous potential for creativity, our experience suggests that successfully applying creativity in your work and life requires something more: the courage to leap. All that potential energy will just fade away if you don’t work up the nerve to unleash it, again and again. To make that leap from inspiration to action, small successes are key. Just as fear of the first step holds us back at the beginning of a project, the weight of the status quo hinders us from making significant career changes. You may have entertained the thought ‘I could have been a writer,’ or ‘I wish I worked in health care,’ and stopped there. However, if you make the first step small enough, it can nudge you toward your goal. But you need to take that first step.”
  • “If you want to transform your life from mere duty to real passion, you have to start by realizing that your current situation is not the only option open to you. You can change how you live and how you work. Look at setbacks as the cost of trying new things. Don’t be afraid to try and fail. The worst thing you can do is to play it safe, stick with the familiarity of the status quo, and not try at all.”
  • “If you are stuck in a ‘looks good, feels bad’ position or job, think about the overlap between your personal passions and the workplace options that might be available to you. Learn new skills. Start writing the new story of your working life. Keep searching for and moving toward a role that will feel as good as it looks. When you reach it, you may realize that you have found your calling.”
  • “Thoughts become words, and words become deeds. If you get the language right, it affects behavior.”

One Week in Hacker Paradise

2014-09-06 07.57.13

Paradise. That is how it was pitched. Hacker Paradise, to be exact: “a programming retreat in the beautiful country of Costa Rica” where “participants come from all over to get away from the hustle and bustle of everyday life and spend 12 weeks writing code and building things with other passionate individuals”.

hackerparadise_4

I was technically not a participant of Hacker Paradise. I was joining as a plus-one of a Hacker Paradise facilitator/mentor: ZYX. I had technical creds of my own, not to be dismissed as a mere tag-along simply there to soak in the sun and wade in the ocean. That said, coming in, I had a tinge of intimidation, of impostor syndrome, of a party crasher. Not being a one of the “chosen ones” cherry-picked from a pool of already self-selecting applicants, I anticipated the feeling of “what is she doing here?” eyes on me. Plus, the caliber of participants was quite impressive in itself: digital producer turned Mozilla-Knight fellow turned Times data journalist, science PhD turned med student turned data scientist, English major turned poker player turned developer (and owner of a popular coffee shop to boot!). Meeting everyone in flesh and listening to their “this how amazing I am” stories was going to be a bit like a more intimidating version of teenage summer camp where you go around the circle sharing “What is your favorite …?”.

My favorite food is Kraft mac & cheese!”

Oh, my favorite food is my homemade mac & cheese “seasoned with salt, pepper and nutmeg, and combined with butter, grated Gruyère and Parmesan cheeses, and very red tomato purée, and combined with a julienne of very lean cooked ham, tongue, mushrooms and truffles, heated in Madeira”.

“My favorite color is red.”

“Oh, red? Mine is vermilion.”

That first night though, what surprised (and intimidated) me most was not the intensity of everyone’s “well, I am …” stories but the silence that permeated Paradise.

* * *

After a prolonged 24+ hour flight delay from Croatia to the Dominican Republic to Costa Rica and a 6+ hour drive from the San Jose airport to Playa Carrillo, home of Hacker Paradise, I unloaded my bags and immediately headed up to the restaurant/bar area (the “Summit”) where the early arrivals were hanging out. We had arrived around dinner time and the sun had already set the scene to black. With a rumbling stomach, I was ready to gobble up my first taste of Costa Rican food: casado con carne or some other rice-and-beans with plantains dish. I brought with me only the necessities – or so I thought: myself and my appetite.

2014-09-13 12.03.54

I was also eager to put faces to LinkedIn profiles: who were these adventurers, these nomads, these dreamers coming to a remote village in Costa Rica for 3 months to hack on technology?

That excitement was soon dampened though and replaced by heavy weight, much like the humidity that was already drenching me in dripping sweat.

As I stepped into “Paradise”, all I heard was silence and all I felt was stillness.

***

A long table of 6-7 people were heads down on their laptops. No one budged. No acknowledging smile let alone a welcoming “hello”. This was in exaggerated contrast to the vibrancy of the “Summit”: every flat surface – from the walls to the tables – were hand-painted with tropical scenes; ceiling beams were dripping with rainbow hammocks.

2014-09-06 08.50.56

Sure, I was only the plus-one and other than a brief intro on the Hacker Paradise Facebook group, I wasn’t involved in the pre-retreat chatter online. I could have been a random resort guest. But by my side was ZYX. He was a Hacker Paradise facilitator, second in command, and active in the pre-retreat Facebook-ing. And, unlike my less pattern-matchable attire, he did not look like a random resort guest with his Meteor t-shirt and pre-release Google watch).

But no one stood up from their seats to say hello — only a few glances up and back down to their laptops.

Strange but I shook it off. Maybe they were all really in the flow and couldn’t break from their coding. Maybe they were all shy folks — a feeling I understood being the shiest of the shy.

We sat down at the end of the table and ZYX – an extrovert to my introvert – started chatting with the guy next to him. Not having any distractions (laptop or cellphone) and not having the chutzpah or rank to interrupt with a “Hey, whatcha working on?“, I leaned in on ZYX’s conversations nearby.

“What are you working on?”

“… Ruby … poker … bets …”

“Ah, that’s cool! How are you implementing …?”

“…”

“You should look into … Excited to see what you build!”

He continued down the row.  Barely audible even one chair away, he was soon too far for me. No longer able to gracefully extend my torso or perk my ears to hear more than a mumble of jumble, I recoiled in my seat twiddling my thumbs. After a much-too-long 15 minutes of staring at the backs of laptops (the many stickers helped pass the awkward seconds with visual narratives), I had to escape.

I headed over to the bar and plopped myself next to a middle-aged brunette who was not engrossed in anything in particular: no cellphone, no laptop, no iPad, no book. Ah, perfect! But after the polite chat of “How are you? What’s your story?” winded down, I again found myself in eye-wandering, lip-pursing silence.

The Hacker Paradisers were still heads-down and ZYX still had half the length of the table left. I estimated that with 4 persons remaining I had at least 40 more minutes until his lap was complete and I sure wasn’t going to return to the table empty-handed to wait. Without a room key to retrieve my laptop or escape into privacy, my only reprieve was circling the grounds: down the stairs, past the cabins, up the stairs, through the pool area, down the stairs, past the cabins, down the stairs, past the cabins, up the stairs, through the pool area.

For almost one hour, I walked in the wet darkness, my only companions being the companions I did not want to keep: mosquitos.

* * *

That first night was actually an anomaly. It could have become the status quo but the next day, fresh blood arrived with self-proclaimed title of “Dream Catalyzer”. He too had noticed how only a couple people stood up from their tables to introduce themselves when he arrived. Unlike me, he would not let it slip. Soon enough, the “Dream Catalyzer” convinced the facilitators that – for the sake of much-needed team building – icebreakers were worth any initial embarrassment. And so with that, for two consecutive nights, ridiculousness, awkwardness, laughter (and a bit of consternation) ensued as we circled around shoulder-to-shoulder breaking the ice with “Where the West Wind Blows”, “Yes and …”, “I have Failed!” and many more.

  • “Where the West Wind Blows”: sharing common interests and experiences
  • “Yes and …”: communicating with positive reinforcement however ridiculous
  • “I have Failed!”: not being ashamed of failure but owning it

The icebreakers brought the group together, literally, to get off their chairs and out from behind their laptops. It was not without the mortifying dread of “Are you seriously going to make me [run around playing musical chairs] [beatbox about myself] [yell “I have FAILED!” while in a yoga pose] […]?”, but by improv night’s end, we had gotten to know each other beyond the “Hi, my name is … I work on …”: our near-death experiences, our secret crushes on Taylor Swift, our guilty pleasures watching odd animal coupling videos, etc.

Soon more activities enlivened the initial reserve. The tables (for working and eating) initially set up as a long station were broken up to encourage more intimate conversations between the participants. Facilitators scheduled morning standups, office hours, and demo nights. Participants organized activities to break up their work day: morning runs, surfing lessons, and game nights.

Day after day, Paradise become less a group of individuals working remotely at the same retreat but a community of individuals working together to build, learn, and enjoy working (and living) in “Paradise”.

2014-09-11 18.28.14

* * *

All this said, this is more a story of me than of Hacker Paradise. In the one week I was at Hacker Paradise, despite all the talk of walking into downturned heads and hoping instead for a “Hey, welcome! Join us in Paradise!” bear hug, if I wanted to make that connection, I needed to initiate it. I needed to have the courage to create that connection myself, not expect it as something someone else would do nor something that would happen spontaneously.

The “Dream Catalyzer” knew this.

I wasn’t able to get quite out of my shell by the end of my one-week stay at Hacker Paradise. I remained on the sidelines, sort-of a self-prophecy of the “what is she doing here?” insecurity I came in with. And while my nerves will still probably get the best of me when stepping into the social unknowns such as Hacker Paradise, I’ll probably not be alone in my jitters. So, from hereon, I will challenge myself to make each “hello” an icebreaker of sorts — because what’s the worse that can happen? I may look silly and sound ridiculous but at least I won’t be stuck in awkward silence.

So I say, my parting words:

“The west wind blows to anyone who is a Code for America fellow!”

“Yes and … let’s build a social app that let’s you have a conversation only one word at a time to only people in the same room as you!” 

“I have FAILED! I have FAILED! I have FAILED!

 

DataMonkey

I first learned about DataMonkey about a month ago on DataTau.

20140908_datamonkey_tweet

As a voracious consumer of MOOCs and a lover of all things data, I was curious about this new CodeAcademy-esque learning tool on databases (and, honestly, the monkey theme was too catchy to ignore). Offering two tracks in 1) Spreadsheets and 2) SQL, DataMonkey looked like a fun way to pick up the basics of creating spreadsheets, manipulating data, and querying databases. But, if you are already an Excel wizard or SQL programmer, learning how to input formulas in spreadsheets and write SELECT statements isn’t quite anything new. While not a expert in either, I’ve clocked enough hours munging data in Stata and R that these are far from foreign concepts. Trying out DataMonkey was thus less to learn spreadsheet formulas and SQL queries but to check out how – if at all  – this new learning tool may add that extra “je ne sais quoi” to the many, many already out there.

datamonkey_2 datamonkey_1

Spreadsheets

  • Learning the Spreadsheet Basic
  • Formulas and Conditions
  • Basic Text Formulas
  • Nest Formulas

I did not complete all four lessons in the track, though not out of waning motivation. I was only minutes into the track, starting Lesson #2: Formulas and Conditions, and was excited to rack up my DataMonkey points when I hit up against a snag. An #ERROR! falsely flagging that an inputted formula was incorrect blocked me from moving forward. I double-checked that my eyes weren’t somehow playing games and replicated the formula successfully in Excel. What is going on? Seems like a bug.

20140908_spreadsheets

True enough, after contacting the co-founders, I got a response: “Your formula doesn’t work because of error in the program code. Now we fix it and you can continue education.
Thanks a lot for your help and callback.” I checked back on the lesson ~8 hours later and the bug wasn’t fixed yet. I decided to skip the rest of the Spreadsheet track and jump to the SQL track. I wasn’t picking up anything new and had the gist of DataMonkey’s approach. Nothing exciting.

SQL

  • Lesson 1
    • Guess SQL. Beginners level.
    • Guess SQL. Basic level.
    • Guess SQL. Test I.
    • Guess SQL. Level 3.
    • Guess SQL. Level 4.
  • Lesson 2
    • Preamble. Or what to do when you see SQL console.
    • Story I. Part I. About select, where and their logical friends who help our buddy Buggy.
    • Story I. Part II. About select, where and their logical friends who help our buddy Buggy.
    • Story II. Part I. About group by, having and how math functions can help in punishing bad guys.
    • Story II. Part II. About group by, having ad how math functions can help in punishing bad guys.
    • Case I. Online shop.

Lesson 1

20140908_sql_fillin_1 20140908_sql_fillin_2

Lesson 1 is MadLib-style: you select words to fill in the blanks in a SQL statement. Of course, unlike MadLibs, each word must be in its correct spot to make sense. Unfortunately, you can blindly click, click, click in the word bank and the words will fill into their appropriate spots automatically.

I am not the fan of this approach. Sure, it may be a less intimidating than writing SQL statements from scratch but it doesn’t quite lay the groundwork of how to build out a complete SQL statement from an blank slate, starting with a question like “What are top 10 MOOCs by number of active users?”. I’ve seen this approach before in kids’ math workbooks e.g., fill in the blank with the correct operator: 5 __ 2 = 3. I’m not an expert in teaching methods so I am not aware of the potential merits to this fill-in-the-blank approach but I prefer the approach of learning while doing — and specifically, doing it how you will do it in “real-life”.

Well, sure enough, Lesson 2 addresses this concern.

Lesson 2

Lesson 2 uses the console where you are prompted to write SQL statements . The approach is CodeAcademy-esque though DataMonkey is more barebones in its features and functionalities e.g., hints, Q&A forum.

20140908_sql_console

Also, DataMonkey more often than not simply gives you the SQL statement to type in. The exercise then simply becomes a mindless act of copying rather than an active process of figuring out how to query from plain English to SQL.

20140908_sql_1

20140908_sql_2

20140908_sql_3

Another thing you may notice from the example SQL statements above is the inconsistency of how the tables are called: clients, CLIENTS, Clients. For especially newbies, this would be incredibly confusing. Are table names not case-sensitive? How about variable names?

Similarly, looking at queries of specific values, the question may arise: are variable values not case-sensitive?

20140908_sql_4

20140908_sql_5

I had to Google to figure out exactly what was going on. I knew that SQL keywords such as SELECT, FROM, WHERE were case-insensitive but I wasn’t certain about table names, column names, and variable values. Coming from Stata, where these are all case-sensitive, I had assumed that Gender = ‘female’ is not equal to Gender = ‘Female’ is not equal to gender = ‘FEMALE’ and so on. Well, I learned something new:

Is SQL case sensitive?

SQL case sensitive string compare

Identifier case sensitivity

Case sensitivity in SQL statements

I still have some homework to do on how case sensitivity differs by DBMS e.g., Oracle, MySQL, PostgreSQL,  SQL Server, etc and operating system e.g., Windows vs. Unix/Linux. But all this considered, even if we don’t have to worry about case-sensitivity within DataMonkey’s environment, I would have appreciated consistency or, if not, an explanation of the why this works:

20140908_sql_6

Wish List

I’ll definitely keep an eye out as DataMonkey develops its content and polishes its learning tool. My wish list for DataMonkey includes:

  • ability to save my latest state i.e., where I was last in the sequence of lessons
  • ability to move between sections within a lesson
  • consistency in code examples
  • detailed error messages to help debug
  • more advanced levels (currently levels range from [beginners of beginners, medium complexity])
  • new lessons in R and Python

 

Review: The Art of Readable Code

Title: The Art of Readable Code: Simple and Practical Techniques for Writing Better Code

Authors: Dustin Boswell & Trevor Foucher

art_of_readable_code

Contents

  1. Code Should Be Easy to Understand
  2. Packing Information into Names
  3. Names that Can’t be Misconstrued
  4. Aesthetics
  5. Knowing What to Comment
  6. Making Comments Precise and Compact
  7. Making Control Flow Easy to Read
  8. Breaking Down Giant Expressions
  9. Variables and Readability
  10. Extracting Unrelated Subproblems
  11. One Task at a Time
  12. Turning Thoughts into Code
  13. Writing Less Code
  14. Testing and Readability
  15. Designing and Implementing a “Minute/Hour Counter”

art_of_readable_code_cartoon

Source: The Art of Readable Code

My Story

When I first arrived at Stanford a few years back, I was shocked by the disarray in which project files were being “organized”: no discernible structure, no standardization, no version control, etc. It was sheer confusion as I waddled through the files trying to figure out what was what. For example:

  • Is “analysis teacher turnover v3.do” or “analysis teacher turnover final.do” (same date-stamp) the latest version of the program file?
  • Does “analysis teacher turnover.do” have to be run before or after “analysis student turnover.do” … or does order not matter?

It was not only how files were named but the content of the files i.e., the code. It was as if I was reading someone’s diary and getting a gist of the underlying story swathed in inside jokes, unique lingo, and subtle inflections. The problem is code shared and collaborated across a team cannot be a personal journal of more or less rambling thoughts. If a graduate student or staff researcher on our team had left, his/her replacement would have little idea of how to replicate or update the code — or at least would have to spend an inordinate amount of time playing Sherlock Holmes. I wouldn’t even be surprised if the author wasn’t able to figure out the code without jolts of memory defibrillation.

Hence, as soon as I settled in, I wrote a manual of best practices for planning, organizing, and documenting code. Adopted by 30+ professors, graduate students, and staff, I called my manual the “POD”, drawing inspiration from J. Scott Long’s “The Workflow of Data Analysis Using Stata“. I wasn’t an expert on the topic but I had enough experience to share my know-how to lead an otherwise blind team towards adopting basic efficiencies (e.g., readability, consistency, etc) for reproducible research.

Some of the best practices in my “POD” manual echoed those in “The Art of Readable Code” including:

  • Packing information into your variable, function, and class names (8)
    • Choose specific words
    • Avoid generic names (or know when to use them)
    • Use concrete names instead of abstract names
    • Attach extra information to a name, by using a suffix or prefix
    • Decide how long a name should be
    • Use name formatting to pack extra information
  • Aesthetics (34)
    • Use consistent layout, with patterns the reader can get used to
    • Make similar code look similar
    • Group related lines of code into blocks

The Art of Readable Code

Boswell & Foucher lay out a lot of useful tips and step-by-step examples demonstrating the “art of readable code”. While the purpose of the book is not to teach the art of architecture or design patterns, the essential basics are covered: naming variables, including comments, formatting code (e.g., column alignment, blocks, logic order, etc), simplifying loops, etc. Sure, many of these things may seem intuitive or could have been figured out on-the-job but if not, this is a great place to start. And, for those who have already mastered these practices, reiteration of the “why?” and “how?” is always a helpful reminder of what can be dismissed as common-sense or second nature.

The key idea behind the teachings is:

“The Fundamental Theorem of Readability: Code should be written to minimize the time it would take for someone else to understand it.” (3)

What I love about this book is its plethora of examples illustrating the multiple ways in which you can implement the Fundamental Theorem of Readability. Examples are provided in C++, Java, JavaScript, and Python. But fear not if you are a newbie to programming or an expert in some other language, say, Stata! You do not need to be proficient in any of these languages to understand the concepts being illustrated: the beautiful code “art” vs. the uglier stuff. And, if you do get lost or intimidated, each chapter is wrapped up with a summary that bullets the key principles and techniques so you will always have the takeaways in plain English.

Review: Team Geek

Title: Team Geek – A Software Developer’s Guide to Working Well with Others

Author: Brian W. Fitzpatrick & Ben Collins-Sussman

teamgeek

Contents

  1. The Myth of the Genius Programmer
  2. Building an Awesome Team Culture
  3. Every Boat Needs a Captain
  4. The Art of Organizational Manipulation
  5. Users are People, Too

Mission Statement

“The goal of this book is to help programmers become more effective and efficient at creating software by improving their ability to understand, communicate with, and collaborate with other people.” (xiii)

Team Geek is a light and fun read with insightful commentary on how marrying the human “soft skills” with the technical “hard skills” can create the foundation for a great team. While Team Geek is written for software engineers (and their managers) in mind, its takeaways are relevant to anyone — engineer or non-engineer, lone wolf or team player. Though common sense at times with lessons already picked up from experience, what makes this book worth the read is the packaging of these lessons as entertaining stories and analogies like:

  • “Strengthen what we call the bus factor … the number of people that need to get hit by a bus before your project is completely doomed” (7)
  • “Your team’s culture is much like a good loaf of sourdough” (27)
  • “A boat without a captain is nothing more than a floating waiting room” (54)
  • “Engineers are … like plants: some need more light, and some need more water (and some need more bullshit, er, fertilizer).” (81)

Three Core Principles

The building blocks for a great team are based on “three pillars” of social dynamics: Humility, Respect, Trust — or HRT (12).

  • Humility: “You are not the center of the universe. You’re neither omniscient nor infallible. You’re open to self-improvement.”
  • Respect: “You genuinely care about others you work with. You treat them as human beings, and appreciate their abilities and accomplishments.”
  • Trust: “You believe others are competent and will do the right thing, and you’re OK with letting them drive when appropriate.”

What does this mean in practice? Actions of HRT include:

  • lose the ego
  • learn to both deal out and handle criticism
  • fail fast; learn; iterate
  • leave time for learning
  • learn patience
  • be open to influence

Using anecdotes and accompanying illustrations, the authors emphasize the importance of HRT not only for one’s own growth but for the success of the larger team. While the rare specimen of a “unicorn” or “lone craftsman” may exist, none of us work in a vacuum. Successful leaders are especially important in managing the team – particularly when attacked from within by poisonous threats (e.g., ego, over-entitlement, paranoia, perfectionism). Patterns (and anti-patterns) adopted by leaders to build a resilient (or dysfunctional) team are collected from first-hand accounts:

Antipattern (for Unsuccessful Leadership)

  • Hire pushovers
  • Ignore low performers
  • Ignore human issues
  • Be everyone’s friend
  • Compromising the hiring bar
  • Treat your team like children

Pattern (for Successful Leadership)

  • Lose the ego
  • Be a Zen master
  • Be a catalyst
  • Be a teacher and a mentor
  • Set clear goals
  • Be honest
  • Track happiness

All in all, HRT must be taken to heart by each and every team member in all interactions, big and small.

What I took to heart

As I find myself in a transitional phase seeking to learn what I am lacking (currently be on a team of a lonely one without strong leaders and mentors to learn from) and what I am searching for to find that happy spot in a Team Geek, the following resonated with me:

  • “If you spend all your time working alone, you’re increasing the risk of failure and cheating your potential for growth.” (5)
  • “Working alone is inherently riskier than working with others. While you may be afraid of someone stealing your idea or thinking you’re dumb, you should be much more scared of wasting huge swaths of time toiling away on the wrong thing.” (10)
  • “Your self-worth shouldn’t be connected to the code you write. To repeat ourselves: you are not your code.” (17)
  • “Let’s face it: it’s fun to be the most knowledgeable person in the room, and mentoring others can be incredibly rewarding. The problem is that once you reach a local maximum on your team, you stop learning. And when you stop learning, you get bored. Or accidentally become obsolete. It’s really easy to get addicted to being a leading player; but only by giving up some ego will you ever change directions and get exposed to new things. Again, it’s about increasing humility and being willing to learn as much as teach. Put yourself outside your comfort zone now and then; find a fishbowl with bigger fish than you and rise to whatever challenges they hand out to you. You’ll be much happier in the long run.” (20)

Even if we think we can stand on our own and detach from the human dramas, software engineering (and essentially all personal relationships and professional endeavors) is a team sport and in order for us all to win, especially in the trenches of conflict and bureaucracies, everyone must play the game by the social rules: Humility, Respect, and Trust.

* * * * *

Check out Fitzpatrick & Collins-Sussman’s Google I/O 2009 talk “The Myth of the Genius Programmer”: http://youtu.be/0SARbwvhupQ

What are the Trends for the Top 10 GitHub Languages?

 

github_search_top10totals_coloredbylanguage github_search_top10totals_coloredbylanguage_forkfalse

 

The graphs above display the annual top 10 GitHub languages over time in terms of repos and projects (data source: https://github.com/search/advanced). One important note is that the full history of a language’s presence in GitHub from inception to demise is not shown.

For example, a drop-out in the graph does not necessarily mean that no one is pushing repos or projects in that language anymore but may simply illustrate that the language is no longer ranked in the top 10 for that given year. Of course, the distinction cannot be explicitly tweezed out. Maybe the language has completely vanished! However, we can assume quite confidently that a top 10 language didn’t just suddenly die off. Conversely, a language that pops up is not necessarily a hot “new” language but simply may not have been previously ranked in the top 10.

Example: Shell is not observed in 2013 as it was replaced in the ranks by CSS, which in turn is in existence prior to 2013 but not in the top 10 (and hence not plotted in the graph).

The fun of taking simple numbers such as this and visually plotting the trends is to see if we can tell a story. So, what can we make from these graphs? How do the patterns jive with the known trends in programming languages?

A few starters:

 

Playing with GitHub Data: The Start (Part 2)

In continuation to the questions raised in “Playing with GitHub Data: The Start (Part 1)”, I decided to ask the Man. The man being Ilya Grigorik: the man behind GitHub Archive.

Surely, he will be able to provide insight on the differences observed between the GitHub search and GitHub Archive query search counts.

github_total_comparison_projectsgithub_total_comparison_repos

 

I reached out to Ilya.

20140317_github_ilyagrigorik_email1_v2

 

He responds.

 

20140317_github_ilyagrigorik_email2_v2

 

So let it be known. Keep it in mind when playing with GitHub Archive via BigQuery.