Entries Tagged 'Programming' ↓

Sorry, Digital Ad Exec, I Probably Don’t Want To Work For You

I’m your next potential dream boss. I run a cool, rapidly growing company in the digital field, where the work is interesting and rewarding. But I’ve got to be honest about some unfortunate news: I’m probably not going to hire you. … If you want to survive in this economy, you’d be well-advised to learn how to speak computer code.

— Kirk McDonald, president of PubMatic, writing in the Wall Street Journal, 10 May 2013

This is another article beating the “everyone must learn to code” drum. Employers can’t find enough people with programming skills, schools aren’t turning out enough engineers, jobs at these cool companies are left unfilled because American students are too lazy or short-sighted to spend a summer learning “basic computer language.”

If only it was that simple. I have some complaints about this “everyone must code” movement, and Mr. McDonald’s article gives me a starting point because he touched on so many of them.

A dilettante is not a programmer

That isn’t writing at all, it’s typing. — Truman Capote

Learning a little bit of programming is probably worse than not learning it at all if you are going to be working with professional programmers. Anyone who has worked in the software business has had to deal with a manager or marketing or sales person who took a BASIC or Pascal class back in college. Although their exposure was shallow and short, they will refer back to it as if their mastery of a FOR…NEXT loop qualifies them to make decisions about programming projects. Consider Mr. McDonald’s example: “Suppose you’re sitting in a meeting with clients, and someone asks you how long a certain digital project is slated to take.” How exactly does knowing a little bit of Python help answer that question? I’d rather hire someone who said “I can’t tell you offhand but I will find out,” and then consulted people who can help estimate.

There are lots of people who have training and degrees in computer programming who can’t program: see Jeff Atwood’s article Why Can’t Programmers.. Program?. I can’t see how adding more amateurs to these ranks is a good thing. I specialize in debugging and fixing code that is abandoned or unsupported by the original programmer, so I see plenty of what happens when someone who half-understands programming tries to develop real programs.

Programming languages are not programming

Teach yourself just enough of the grammar and the logic of computer languages to be able to see the big picture. — Kirk McDonald

The grammar and logic of computer languages are not the big picture. Programming languages are not the hard part of programing; not even the most important part. Programming is methodically using software to solve problems — business problems, rocket guidance problems, selling ads online problems. Programming languages and APIs are tools to write programs: they aren’t programming. By analogy you know you are in a group of amateur photographers when they have $3,000 cameras but don’t know what an f-stop is or how it affects depth of field. Professional photographers talk about composition and lighting, not camera features.

Good programmers can construct, hold, and analyze complex models in their head. They can translate business requirements into code. They know how programming languages and software tools can be applied to solve a problem.

Not everyone has the talent or inclination to program

I never learned to skateboard. I can’t dance. I can’t play a musical instrument. I struggle learning foreign languages. I know people who can do those things well. They apply themselves because they are interested and motivated, in the same way I applied myself to computer programming, for years, until I got good at it. I used to tutor college students and teenagers, and I learned that very few people find programming interesting or fun. Students sit through the courses because they have to. Their experience paying me to write their Fibonacci sequence assignment while they tried and failed to understand recursion will be cited later in their career as programming expertise. Maybe they will estimate important projects based on that half-remembered exposure to Visual Basic.

I’m not saying programming should be exclusive. I’m all for the kind of curriculum upgrading and partnerships with business that Mr. McDonald supports. Anyone who wants to learn programming should be able to, and experienced programmers should help and mentor. But let’s not kid ourselves that everyone wants to program, or will have the combination of talent and interest to get good at it.

It’s setting people up to fail

Most people who try to learn to program are going to fail or lose interest. Telling high school and college students and job seekers that they don’t have a chance because they didn’t learn to “speak computer code” is creating a phony bar to entry. At best it’s a distraction, like business students forced to take a programming class they will forget about. At worst it’s another demoralizing episode—like trigonometry was for a lot of us— where students are told they must master something that most of them will find uninteresting and difficult and inapplicable to their life.

In most jobs some level of familiarity and comfort with computers and technology is required. But you don’t need to know how to write code to do most jobs. I’ve worked in ad agencies and most of the employees didn’t program but could do the job they were supposed to be doing just fine.

Programmers have worked hard to learn their skill

So the book can only be talking about a superficial familiarity, not a deep understanding. As Alexander Pope said, a little learning is a dangerous thing. — Peter Norvig

Suggesting that just anyone can learn programming in a summer spent with Python tutorials and getting “acquainted with APIs” trivializes the amount of real time and effort required to learn programming. Peter Norvig wrote Teach Yourself Programming in Ten Years, and I think he got it right. Malcolm Gladwell came to similar conclusions in “Outliers.” As a professional programmer with 35 years experience, much of it continuously upgrading my skills, I’m a bit offended at the suggestion that everyone and their mother can be programming after watching some videos online.

The idea that programming is something anyone can learn if they just sit down with a book and type examples is not just offensive to programmers—it’s a dangerously misleading idea for management to hold. It feeds the idea that programming is a rote skill that can be trained into anyone, and that programmers are therefore more or less interchangeable. Many of my friends and almost all of my colleagues are programmers, but I would flail for a while trying to do their jobs if I was rotated in as a new “resource” or headcount. Programmers tend to specialize. Our underlying expertise and experience, and our innate interest in programming, means that we can do another programming job better than someone fresh out of school, but we aren’t interchangeable.

So what do I tell my kids?

I tell my own kids to invest in learning useful skills, whether the skill is programming, plumbing, writing, or fixing cars. Learning any skill well enough to make a living from it takes a lot of time and commitment. I also teach them that credentials are not the same thing as expertise, and the more competitive the job market gets the more skills and experience will be valued over credentials, especially as we figure out how degraded a lot of credentials really are. I teach my kids that they can learn anything they are interested in, but I can’t make them interested in any specific thing. And I tell them to be skeptical of advice like “Everyone must learn to code.”

The many things programmers optimize for

Programmers love to optimize their code and their tools. Why then is there so much slow and bloated code and so many arcane and fragile tool chains? Because programmers aren’t always optimizing for efficiency. There are many things programmers can optimize for, and a team can quickly end up working at cross purposes when everyone is optimizing for something different. Here are just a few of the things programmers optimize for:

Speed, memory usage, efficiency
What most of us think we mean when we talk about optimizing: making the code as fast and efficient as possible.

Conciseness
There’s a line between concise expression and obfuscation that we recognize when we see it, except in our own code. If you can’t easily understand someone’s code because it’s too terse, and they defend it by citing Occam’s Razor, that line has been crossed.

Complexity
The flip side of conciseness. Some programmers enjoy making code more complicated than necessary, but usually this optimization is a side-effect of forgetting YAGNI (You Aren’t Gonna Need It) or going off into the weeds with a new language.

Obsessive-Compulsive Disorder
When a programmer spends a lot of time lining up comments, converting tabs to spaces, converting all variable names to a single style, etc. they are optimizing to relieve their OCD. Converting all variables to Hungarian notation and forcing the team to comply “for consistency” is an extreme form of this optimization and may require an intervention.

Showing off
Looking ahead to the next code review or scrum, the programmer writes code that they can show off to the team. The code will be just clever or obscure enough to require the author to explain it to everyone and show how clever he or she is.

GitHub, StackOverflow, etc.
Showing off in public, and usually looking forward to either adulation or picking a fight in an online forum.

Job security, technical debt
Code is written with an eye to making maintenance and future enhancements difficult for anyone else. When a programmer is recognized as the only person who can work with a code base they are guaranteed employment.

Ritual, ideology, purity
Everything must comply with a methodology or fad. Programming decisions are defended by appeals to the authority of scrum, TDD, functional programming, etc.

Passive-aggression, being right
Failing to persuade co-workers to do it their way, the programmer changes a big chunk of code over the weekend to force the team to come around. Replacing a crucial piece of the testing or build process with something written in that cool new language is an example of this optimization.

Style, usability
Nothing will be released until everything conforms to the opinion of an expert. Tufte and Nielsen will be referenced.

Novelty
The project is optimized to make a new language or tool seem like a good solution. Programmers read about something cool online and suddenly the project can’t succeed without it.

Testing
The code is optimized so all unit tests are green.

CYA
Not wanting to be blamed for anything leads to code that can be defended against any criticism.

Meetings
Creating roadblocks and diversions in the code to force a meeting about the new problems. Meetings are an opportunity for schedule and specification changes.

Marketing
The code is optimized to meet ever-changing marketing requirements. These are frequently in conflict with each other, to say nothing of core business requirements, leading to HAL 9000 syndrome.

Ignorance
Code has to be written so the least-skilled programmers can understand it and work on it.

Linus Torvalds goes off on Linux and Git

I was in a coffee shop in Portland, Oregon and happened to spot Linus Torvalds sitting alone at a window table. I asked the creator of the Linux operating system and the Git source code control system if I could join him. Over the next fifteen minutes we talked about programming and programmers.

Typical Programmer: It’s been 20 years since Linux was released. Now it’s one of the most widely-used operating systems. How does that make you feel?

Linus Torvalds: Surprised, frankly. It was a hobby project I didn’t expect to do much with. As interest in Linux grew I saw it used mainly by the hardcore programmers and computer geeks to separate themselves from the herd. There are a lot of people in the software industry who like to show off that they’re using the latest software or programming language. It’s a status thing, like the people who talk about obscure indie bands or foreign movies. Whether it’s Linux or Haskell or MongoDB or whatever, every workplace has at least one guy who spends most of his time talking about closures and how he is moving his blog to NodeJS so it will scale. Continue reading →