A guide to using Github for non-developers

I’m constantly being asked by friends to help me with their websites, and I’m constantly not at all enthusiastic to do it. I mean, I enjoy helping friends out and creating things, but web development is not at all the “fun part.” It’s a complex field, but more annoyingly, it’s difficult to scaffold a site so that a web-novice can maintain it. So you either have to settle for being the site’s maintenance person in perpetuity, or, not be bothered that your friends will waste countless hours hacking and breaking a brittle, barely visited website.

Github Pages has been a great and convenient way to publish websites. So I’ve been telling my non-dev friends, hey, just create a Github account and publish away! Unfortunately, while there are many great Github and Git resources, all of them presume that you actually want to use the many cool collaborative, developer-focused features of Git/Github. Whereas I want my non-dev friends just to piggyback off of Github to quickly build a website from scratch.

So in the past month, I’ve slowly been putting together a guide that is as basic as possible, even to the point of showing which buttons to click, and explaining how HTML is different than raw text. Check it out here: Build a Web Portfolio from Scratch with Github Pages.

Check out the Reddit discussion here. To my surprise, even aspiring developers have found it useful, even though the guide is aimed at people who do not intend to be web developers.

Creating this guide isn’t an act of altruism for me, though. It’s another way to experiment with online publishing, namely, how to reduce the friction between thinking of things to write about and getting them onto the Web. I stuck to using Jekyll but kind of wish I had gone with using Middleman. In any case, I feel much further along in having a refined CMS-workflow than I did with the Bastards Books and with my Small Data Journalism site, which is also built on Jekyll.

Fran Allen and the social relevance of computer science

If you haven’t read it yet, Peter Seibel’s Coders at Work (2009), is one of the best books about computer programming that doesn’t have actual code in it. It distills “nearly eighty hours of conversations with fifteen all-time great programmers and computer scientists,” with equal parts given to fascinating technical minutiae (including the respondents’ best/worst bug hunting stories) and to learning how these coders came to think the way they do.

So in a book full of interviews worth reading, it’s not quite accurate to say that Fran Allen stands out. It’s better to say that Allen is different; as a Turing Award recipient for her “pioneering contributions to the theory and practice of optimizing compiler techniques,” Allen spends much of her interview arguing that compiler optimization is woefully unstudied. Allen even argues that the popular adoption of C was a step backwards for computer science, which is kind of an alien concept for those of us today who almost exclusively study and use high-level languages.

Allen is also different in that she’s the only woman in Seibel’s book, and understandably, she has a few thoughts about their place in computer science. The summary of it is that she’s not at all optimistic about the “50/50 by 2020″ initiative (the goal to have women make up half of computer science degree earners by 2020). And the problem, Allen (who was a math teacher herself) is not in the curriculum:

I feel it’s our problem to solve. It’s not telling the educators to change their training; we in the field have to make it more appealing.

What I found particularly insightful in Allen’s interview with Seibel is that it’s not just about the need for more role models, because the current lack of women programmers is going to place a limit on that. In Allen’s opinion, girls have shown an equal aptitude for science, especially in medicine, biology, and ecology. So she suspects that the problem is with how _limited_ computer science can appear as a profession.

At my little high school in Croton, New York, we had a Westinghouse person nationally come in fifth. And they have a nice science program. Six of the seven people in it this year at the senior level are women doing amazing pieces of individual science.

What’s happening with those women is that they’re going into socially relevant fields. Computer science could be extremely socially relevant, but they’re going into earth sciences, biological sciences, medicine. Medicine is going to be 50/50 very soon. A lot of fields have belied that theory, but we [in computer science] haven’t.

I don’t necessarily think this perception that programming doesn’t seem to have a purpose behind obsessively sitting in front of a computer all day is exclusive to women. Even for those who’ve pursued a degree in computer science, it’s not clear how programming has relevance that is not an end to itself.

Check out this 2008 Slashdot thread, in which a recent computer science undergrad asks for suggestions of “Non-Programming Jobs for a Computer Science Major?” because he can’t think of ways to use computational thinking that doesn’t directly involve code. Or more recently, this screed by a NYU journalism professor, who sees coding as a trend du jour, little more than a pointless struggle to learn more code before a new language becomes hot and makes you obsolete.

I can’t claim to have insight myself, because when I left college with a computer engineering degree, I had no idea how to use it except to be a computer engineer, which I didn’t want to be, so I ditched it entirely at my first journalism job. Years later, I’ve slowly learned how to use programming to, well, practice journalism’s core function of interpreting and disseminating information. However, I attribute this to how much our world has become digitized with far fewer bottlenecks in applying computational thinking. So now it seems much more obvious that computer science can be as directly relevant to general society as medicine and ecology.

Non-scientists often assume that all scientists, and similarly left-brained people, can equally grok the concepts of programming. But this is as wrong an assumption as thinking that any programmer can easily pass the MCATs. Within the field of biological research, for example, there’s a difference of roles for biologists who can program and those who cannot.

The two fields of research are described as “wet-lab” and “dry-lab” work. In a recent issue of Nature, Roberta Kwok writes about how “biologists frustrated with wet-lab work can find rewards in a move to computational research“:

During her master’s programme in genetics from 2005 to 2008, Sarah Hird dreaded going into the lab. She was studying subspecies of red-tailed chipmunks and had become discouraged and frustrated by the uncertainties of molecular-biology experiments. She spent six weeks trying to amplify repetitive sequences in chipmunk DNA as part of an experiment to identify genetic differences between populations — but to no avail. Hird tried replacing reagents, switching to a different machine for running the polymerase chain reaction and decontaminating the sample-preparation area. Nothing worked. And then, for reasons that she never quite deciphered, the technique suddenly started working again.

By the end of her master’s, Hird had come to dislike working in a wet lab, and she decided not to apply for PhD programmes.

About six months after finishing her master’s degree, while working as a part-time technician at Louisiana State University in Baton Rouge, she discovered a better direction. The lab’s principal investigator had suggested that she learn a computer-programming language so that she could help with a simulation project. Hird, who had never programmed before, taught herself the language using a book and online tutorials, and quickly became engrossed.

“Once I started, it was like an addiction,” she says. She enjoyed developing algorithms, and she found the software-debugging process less frustrating than troubleshooting wet-lab problems. The work felt more under her control.

Later in her article, Kwok interviews a German biologist at the Max Planck Institute who offers this insight:

He notes that newcomers may stay more motivated if they can apply computational skills to real scientific problems rather than to the ‘toy’ exercises in a computer-science class. For example, a researcher who works with many image files could write a program to automatically perform processing steps, such as contrast enhancement, on thousands of images.

If young students – male or female – are turned off at the prospect of learning computer science, it’s not enough to just have role models. The usefulness of computational thinking are far too broad for just that. Why should only dedicated computer scientists benefit from the techniques and theory of programming, as if the importance of writing should only be left up to published writers?

Ideally the importance of computational thinking would be part of the general curriculum, and not just as a separate programming class, but integrated in the same way that you must read and write and perform calculations in your biology, physics, and economics class. But while we wait for that change to come about eventually – if at all – those of us in the field can help to increase diversity in computer science by increasing the visibility of computer science’s diverse impacts and applications.

After Allen complains about computer science’s too-narrow scope, Seibel simply asks, “So why do you like it?” She responds:

Part of it is that there’s the potential for new ideas every day. One sees something, and says, “Oh, that’s new.” The whole field gets refreshed very frequently. It’s very exciting to think about what the potential for all of this is and the impacts it can have.

Isaac Asimov made a statement about the future of computers-I don’t know whether it’s right or not-that what they’ll do is make every one of us much more creative. Computing would launch the age of creativity. One sees some of that happening-particularly in media. Kids are doing things they weren’t able to do before-make movies, create pictures.

We tend to think of creativity as a special gift that a person has, just as being able to read and write were special gifts in the Dark Ages-things only a few people were able to do. I found the idea that computers are the enablers of creativity very inspiring.

There’s a lot of other great stuff and stories in Allen’s interview, including her attempt to teach Fortran to IBM scientists, the need for compiler optimization in the age of petaflop-speed computing, and how other women in the industry, including one “who essentially was the inventor of multiprogramming”, have been robbed of their achievements. Read the rest of Allen’s interview, and 14 other equally great interviews with coders, in Seibel’s book, Coders at Work.

Peter Norvig on cleverness and having enough data

I’m reposting this entry, near verbatim, from The Blog of Justice, which picks out a keen quote from Google/Stanford genius, Peter Norvig, from his Google Tech Talk on August 9, 2011.

“And it was fun looking at the comments, because you’d see things like ‘well, I’m throwing in this naive Bayes now, but I’m gonna come back and fix it it up and come up with something better later.’ And the comment would be from 2006. [laughter] And I think what that says is, when you have enough data, sometimes, you don’t have to be too clever about coming up with the best algorithm.”

I think about this insight more times than I’d like to admit, in those frequent situations where you end up spending more time on a clever, graceful solution because you look down on the banal work of finding and gathering data (or, in the classical pre-computer world, fact-finding and research).

But I also think about it in the context of people who are clever, but don’t have enough data to justify a “big data” solution. There’s an unfortunate tendency among these non-tech-savvy types to think that, once someone tells them how to use a magical computer program, they’ll be able to finish their work.

The flaw here is, well, if you don’t have enough data (i.e. more than a few thousand data-points or observations), then no computer program will help you find any worthwhile insight. But what’s more of a tragedy is that, since the datasets involved here are small, these clever people could’ve done their work just fine without waiting for the computerized solution.

So yes, having lots of data can make up for a lack of cleverness, because computers are great at data processing. But if you’re in the opposite situation – a clever person with not a lot of data – don’t overlook your cleverness.

W3rules – a modern HTML and CSS reference

I’m a passable web developer, but one who still needs to constantly Google things like “css box shadow” because I don’t do enough front end design to justify memorizing all of the syntax. Problem is, doing a websearch for HTML/CSS terms returns entire pages of not-quite-up-to-par links to W3schools, a site that has dominated web dev references in search engine results since I first started coding.

Lots of failed attempts have been made to displace w3schools. So I won’t aspire to that. I just want a site, even if I’m the only user, where I can refresh my aging mind on the vagaries of CSS syntax.

I call it: W3Rules. Here’s a sample page for font-family. This will be a good chance to get more familiar with Middleman, which looks very fun to use.

Github activity for 2013: 1,500+ commits, 52-day-streak

Just noticed that because of that damned Thanksgiving break, my latest Github commit streak ended at 52 days in a row. My public profile doesn’t show most of my commits as I’ve been using Github for Skift company projects, but I’ve been tentatively trying to design some open-source utilities. One of them is yearbook, yet another attempt (for me) to wrap face-recognition and mugshot-cropping into a convenient command-line interface. Another gem, which I just started on today, is spodunk, probably a futile attempt to make Google Spreadsheets more of a CMS. And of course, there’s small-data-journalism, which contains all the content for my Small Data Journalism site.

In the heat-graph of my private and public Github commits, you can see how relatively intense my commit activity has been in the past couple of weeks. The fruit of that labor is SkiftIQ, a site for better tracking how the travel industry performs and behaves on social media.

Earlier this year I made it a goal every day to contribute to someone else’s project, even if it was simple grammar and spelling fixes. I’ve fallen away from that but not for lack of interest: being able to wade through a large codebase and isolate (and sometimes fix) even just minor bugs is probably the best programming/critical-thinking exercise I’ve put myself through…and sometimes it actually helps other people.

Lonnie Johnson, the Millionaire Super-Soaker-Inventing Rocket Scientist Who is Trying to Save the World

This recent headline caught my eye (which reflexively winced from painful memories of point-blank encounters):

Super Soaker creator awarded $72.9M from Hasbro.

Not just because it involved one of my favorite pre-video-game toys, or because of the money involved. But that there was a creator behind the Super Soaker, a single person who had a passion to make industrial-powered squirt guns. The Super Soaker was great, but I just figured it was the product of committee, the natural evolution of toy guns trying to emulate the power of real ones. And as a kid, you don’t think of toys being actual engineering achievements.

But the story behind the Super Soaker is even more interesting than the millions it earned Lonnie Johnson, a former NASA rocket scientist. For one, Johnson stumbled upon the idea at a time when his day job was building a nuclear power source for the Galileo spacecraft. And in this particular Eureka moment, he wasn’t at his day job, but at home in the bathroom, trying to come up with a new kind of refrigerator cooling system that would save the ozone layer.

From this fantastic New York Times profile in 2001:

On his day job in 1982, Lonnie G. Johnson, a 32-year-old aerospace engineer, was preparing an interplanetary spacecraft for its atomic battery. But he dreamed of inventing something that would change life on earth.

He often worked at home as his wife and children slept. One weekend, while tinkering in his bathroom, Mr. Johnson hooked up to the sink a prototype cooling device.

Meant to run on water, it bore at one end a length of vinyl tubing and a homemade metal nozzle. The rest, as they say, is history.

”I turned and shot into the bathtub,” he recalled. The blast was so powerful that the whoosh of accompanying air set the bathroom curtains flying. ”I said to myself, ‘Jeez, this would make a great water gun.’ ”

Mr. Johnson is the inventor of the Super Soaker, what industry experts call the world’s most powerful and popular squirt gun.

Since the Super Soaker’s introduction in 1990, it has earned nearly $1 billion in revenue. Johnson was not a poor man before the recent $72.9 million windfall of royalties, one of the rare tireless inventors who reap financial rewards in their own lifetimes. The Super Soaker was just a bullet point in a long list of envy-inspiring achievements. From the AJC:

  • As an Alabama high school senior, Johnson finished building a remote-controlled robot with a reel-to-reel tape player for a brain and jukebox solenoids controlling its pneumatic limbs
  • After graduating from Tuskegee he joined the Air Force and worked at the Air Force Weapons Laboratory at Sandia
  • Worked for NASA’s Jet Propulsion Lab on the Galileo mission to Jupiter and the Mars Observer project
  • He also helped design the Cassini robot probe that flew 740 million miles to Saturn.

The best part: Johnson hasn’t been satisfied with his fortunes. He continues to work on and create renewable and efficient energy sources, the same thing he was doing decades ago when tinkering around with his bathroom sink.

Read this MIT profile of him in 1998. One thing that sticks out to me about Johnson is that, unlike the archetypal business-minded inventors, real and fictional, who have been lucky to have become rich while they were alive, he seems to have kept a low profile, even as he continues to attempt moon-shot engineering projects (“Super Soaker Inventor Invents New Thermoelectric Generator”). His Wikipedia entry seems far too short for someone best known for the farthest-shooting water gun.

small data Journalism – practical lessons of data journalism

Next week, my short course on data journalism at New York University (SCPS) begins. It’s only five weeks long, but I wanted the material and readings I used for the class to be accessible for anyone. You can check it out at smalldatajournalism.com, a site I built using Jekyll and which will serve as the home for future musings and data projects.

Writing advice from Woodrow Wilson

President Woodrow Wilson, on how to write sentences:

The best teacher I ever had used to say to me, “When you frame a sentence don’t do it as if you were loading a shotgun but as if you were loading a rifle. Don’t fire in such a way and with such a load that while you hit the thing you aim at, you will hit a lot of things in the neighborhood besides; but shoot with a single bullet and hit that one thing alone.”

The studious and correct use of language is an act of precision; it is the process of eliminating suplusage and embodying only those things which are of the substance of the statement itself. It is an attempt always to fire for the one thing.

In the use of language, we ought to be like the Boer in South Africa, who when he goes out intending to bring back one piece of game carries only one bullet.

As printed in the Educator-Journal, Vol. VIII, February 1908.

“Better know a developer” at AAJA 2013

I had the privilege of being on a panel with the New York Times’s Chase Davis and former YouTube designer Hong Qu at this year’s Asian American Journalists Association convention

The panel was titled, “Better Know a Developer” and my part of it was to discuss how non-programming journalists can work best with programmers.

You can see the slides here. The advice boils down to: Don’t believe in magic. Think about how you would do it yourself. And use a spreadsheet.

Innovations in India’s Health Care

After reading this Bloomberg article, Heart Surgery in India for $1,583 Costs $106,385 in U.S., I couldn’t resist thinking about the end of Atul Gawande’s book, “Better: A Surgeon’s Notes on Performance“…cost comparisons to India inevitably bring up discussions along the lines of, “Well, just how good can their health care be?” Certainly, it’s hard to think of apples to apples metrics that would allow us to compare quality of care between the U.S. and India due to selection bias: patients in India who are able to go through heart surgery (and pay for it) may have a different health profile than the average American who undergoes that treatment.

Still, Gawande’s closing chapter in “Better” argues that even in relatively poor conditions, real, industry-changing innovation can occur due to necessity. In this final chapter, Gawande describes spending time in India as a visiting surgeon to see how innovative medical care was possible in comparatively squalid circumstances. The Nanded hospital he describes below serves 1,400 villages, about 2.3 million people, with just 9 surgeons (Gawande says that’d be comparable to the state of Kansas having 9 surgeons):

Among the many distressing things I saw in Nanded, one was the incredible numbers of patients with perforated ulcers. In my eight years of surgical training, I had seen only one patient with an ulcer so severe that the stomach’s acid had eroded a hole in the intestine. But Nanded is in a part of the country where people eat intensely hot chili peppers, and patients arrived almost nightly with the condition, usually in severe pain and going into shock after the hours of delay involved in traveling from their villages.

The only treatment at that point is surgical. A surgeon must take the patient to the operating room urgently, make a slash down the middle of the abdomen, wash out all the bilious and infected fluid, find the hole in the duodenum, and repair it. This is a big and traumatic operation, and often these patients were in no condition to survive it. So Motewar did a remarkable thing. He invented a new operation: a laparoscopic repair of the ulcerous perforation, using quarter-inch incisions and taking an average of forty-five minutes.

When I later told colleagues at home about the operation, they were incredulous. It did not seem possible. Motewar, however, had mulled over the ulcer problem off and on for years and became convinced he could devise a better treatment. His department was able to obtain some older laparoscopic equipment inexpensively. An assistant was made personally responsible for keeping it clean and in working order. And over time, Motewar carefully worked out his technique.

I saw him do the operation, and it was elegant and swift. He even did a randomized trial, which he presented at a conference and which revealed the operation to have fewer complications and a far more rapid recovery than the standard procedure. In that remote, dust-covered town in Maharashtra, Motewar and his colleagues had become among the most proficient ulcer surgeons in the world.

BTW, I whole-heartedly recommend Gawande’s “Better”, written in 2008. It extends upon his previous work, Checklist Manifesto, which was best known in its New Yorker incarnation.