Skip to content

Instantly share code, notes, and snippets.

@pragdave
Created March 30, 2020 19:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pragdave/ec9f79e542a38768f90694734fa0aad2 to your computer and use it in GitHub Desktop.
Save pragdave/ec9f79e542a38768f90694734fa0aad2 to your computer and use it in GitHub Desktop.

Wow! Fantastic conference. I'm sure at the end we'll have a nice summary, so I'm not going gush too much.

But I must admit, I always enjoy these conferences, so thank you to everybody involved.

How many people have seen me speak at a previous elixir event? Oh, a fair number. «How many have heard me speak» twice?

All right, so the ones that have seen me speak are kind of nervous right now. Those that have seen me speak twice are wondering if they could get out of the room, because I have a bit of a nasty habit.

I tend to be the person that has talks like "OTP is overrated"; we shouldn't be using OTP that much; we should do it ourselves. Why not? I actually claim Joe Armstrong agreed with me on this, but no one's going to contradict that.

Or a talk like "Phoenix favors Monoliths." No one's going to argue with that, obviously, but I get in trouble. People don't like that. You know, I'm attacking the gods, and that doesn't go down well.

Or "Web Apps are Boring." If I see one more damn Web app; Oh, kill me. Come on. Non Web abs outweigh Web Apps by three orders of magnitude, if you look at just processors. There are 1000 times more processors in small devices than there are in browsers. And that doesn't mean phones. I mean, smaller than the phones. We have the best technology in the world for talking to those devices. And yes, we do have some projects that are looking at that. But as a community, we should be pushing that.

But I'm not going to do that«talk about how we're doing things wrongly» because that would be nasty and mean. And I'm not nasty and mean.

And we are not Elixir programmers. That one, I'll defend to the hilt. First of all, this is an American thing, right? America is the only country in the world where the first thing you say to someone you've never met before at a party or something, it's not "How are you" or "that's a really nice haircut." It's "What do you do?" Implicitly «you're asking» how much do you make because then I could judge myself against you.

«Someone in the audience says that they do this in France, too»

All right, You do. Okay. Okay. Thank you.

You are not an Elixir developer. You are a developer. But more to the point, you're a problem solver, and you're someone who is changing the world. Stop holding yourself in elixir programmer.

All right. So the problem is, I keep giving these talks. I've done, like, five or six of these talks of various elixir events, and I end up with an audience looking at me like that.«picture of a dog looking confused or stunned»

I'm sick of it.«"it" here means talking negatively» I'm sick of it because I am not that kind of person. All right, that's me. I'm sweet. I'm kind. I'm the little pussycat in the room.

So this talk is not going to be «about» why you suck.

Well, actually it is, but it's indirect. You won't notice it.

«picture of smiley»

This is me putting on a happy face. And what I'm going to talk about is how I'm becoming a programmer.

Yes, it's all about me, me, me, me.

No it's not.

Here's the reason I'm saying how I'm becoming a programmer. I am sick, sick, sick, off people telling other people how to do things. No one can tell you how to be a programmer; how to be a designer; how to be a good father or mother. It's none of their business. And what's more, it's beyond their understanding. No two of us are the same person. They're not in the same environment, in the same situation, doing the same work on the same code, using the same tool set (particularly for a JavaScript programmer «joke»).

So given all of those things, it's impossible to tell anybody the best way of doing anything. There are no best practices. So I am going to tell you what I do, and you are free to ignore it, or say it may be interesting, or what a fool he is. Whatever. So I am going to tell you how I'm trying to become a better programmer now.

I added it up, and I have been programming for something like 48 years and I think I have probably coded, I'm not going to say every single day. I know that's not true. But every single day within 0.5% or something. Most days, vast majority of days in that time.

And I used to joke: People would say "what do you do?" And I'd say "are you French?"«joke out previous audience comment». And I'd say, "Well, I'm a programmer, and one day I'm hoping to get it right", you know? Ha ha. That was a little joke. «the joke is that after 48 years I still don't program correctly. It isn't supposed to be a good joke; it's just the kind of thing people say»

And I've now realized that that's stupid, because I'm never going to get it right, And that's okay.

So my three goals:

  1. I want to be happy doing what I'm doing, and that's a two-edged goal. I want to do something that makes me happy. And I want to be happy while I'm doing that thing.

  2. I really want to keep developing. Not as in coding. But developing as a human being. A nd learning.

    I think the word for a developer that's not developing is "maintenance programmer;" um, or actually "unemployed". We, of all the industries on the planet, put the strongest among demands on our participants to learn. I don't know any other industry has the kind of half life off in information that we have. It's measured in a small number of years, not decades, not centuries, maybe five years, 10 years.

  3. And then last thing, obviously more modestly. I think it's really important that we change the world for the better. And that doesn't necessarily mean that we get new treaty signed with different countries or that we cure some disease. I think we all recognize when what we do has an impact when what we do has made things better than they were; and it could be better in a really small way.

    I remember when I was working in England the eighties. British Telecom had these terminals called Prestel Terminals and they were 40 columns by 24 columns deep, eight colors and they connected over a 300 baud modem eventually upgraded to, I think, a 1200 baud and that's basically all you could display. You start at the top and you wrote 24 times 40 characters, and that was the screen. Then you sent again, and that was the next screen. And these took off for some reason, I have no idea why. One of the things my company produced was a system for travel agents where they could make simple flight reservations online using these press tell terminals because the other alternative is to use the airlines terminals, and they were like four years worth of training before you could even log into them. So we did that, and I remember the first time I walked down a High Street in England and I looked through a window and I saw my code running on one of their terminals. The sheer pleasure that gave me just to see something I done was being used. And I think that motivates a lot of us. So changing the world for the better is important.

So goal number one be happy. Zach talked about this earlier on.«A talk on the first day that argued that the best measure of how well you are doing is how happy you are when you do it.» It's really important to be happy. As you know, the Carnation Company, back in 1904, came out with the marketing concept that their cows were contented and therefore their milk was better. In fact, there has been a research on that. So these two doctors actually performed a study that showed that if your farmer gave a cow and name and treated her as an individual, they increased milk yield by 500 pints a year. So I was going to stop software development and open a farm. And I was going to have, like, a day spa, maybe a walk thru McDonald's. Well, that's a little bit close to the bone... Has anyone seen the film about Temple Grandin? Same idea, right? Reduce the stress, contented cows make better milk. And I think that's very true off all of us.

So, Andy, I updated pragmatic programmer last year and and we actually rewrote a lot of it. It's kind of surprising how much got changed. I'd say about 1/3 of the topics are new, and one of the new topics is actually the very first tip in the book. It's called "It's Your Life." What it says is that we are blessed as developers. We are all probably in the most mobile industry that you can be in. We get to choose so many things about our lives. We get paid well. We get to be able to travel if we want to; get to be able to work at home if we want to (and if we work at it). But a lot of us don't take advantage of that. A lot of us take what we're given and then maybe grumble about it a little bit. And the idea of "its your life" is to say that you actually control this. You can think about what would make you happy, What would make you work better? What would make you more contented and then how to work for it, Have the courage to ask for it, Have the courage to make yourself happy, convincing people using Zach's points that it would actually make you more productive and altogether a better employees.

In fact, the very first tip in the book main part of the book is labelled "the most important tip in the book." One of the cool things about having an audio book is that I can actually save myself some work. «audio in book narrator's voice»Tip Three. You have agency«end of narrator»

You do get to call the shots. Make yourself happy. You deserve it.«that's supposed to be slightly funny because the idea that everyone deserves to be happy has been a large part of the American consciousness, and yet no one works to make it happen...»

But seriously, that's a strong goal. I have discovered in my career that whenever I find myself groaning when I have to do something, it's time to make a change. Not short term. That would be stupid. But if every day for a month you have to drag yourself out of bed, think about it and fix it.

All right. Goal number two: growing.

It is one of the privileges of our industry that we get to learn the whole time. It's also one of the burdens. It's incredibly hard. I mean, we're sitting there drinking from a fire hose of new information, new techniques. But it is vital that we actually start sipping from it, at least? Because if you don't, you stagnate. If you stagnate you're out of date. If you're out of date, you're employed.

Now, if you've gone to any of my talks back who 10 12 years ago, I was talking a fair amount about these two guys. Stuart and Hubert Dreyfus. Anybody remember the talks about the Dreyfus Brothers? No.

Great great This is all new material I just did for this talk.«joke» Excellent.

So the Dreyfus Brothers were a kind of jack-of-all trades in the philosophy, psychology, learning. They were asked by the Air Force to help out because the Air Force found that they were having problems training pilots. They had a manual after manual after manual on how to train pilots, and they claimed that they were telling the pilot's everything they should do. And yet they just weren't doing it right. So they got the Dreyfus brothers in to look at this. And they produced a report. It has been argued about and the details of being picked at. But I think fundamentally, there's a lot of truth in it.

Their report is declassified. You can get online. This tells you something about the environment. There are nine separate rubber stamps on the cover of it, approving its declassification. Plus, I think, four sets of initials.

The report is called "A five stage model of the mental activities involved in directed skill, acquisition."

The important words There are "mental activities" and "skill acquisition."

Directed skill acquisition: That's what we're doing. We're trying to learn something. Yet, we're not just being like a toddler who's experiencing the entire world and gradually soaking it in. We need to know some particular thing, and this is what they're talking about.

And they came up with a model which is slightly arbitrary. It doesn't matter. The details may not be right. They'd never really claim that they are. It's the overall model that's important.

In their model, you have five phases that you go through achieving some kind of mastery.

Obviously, you start out as a novice. If you've never done something before—you don't know anything about something—you are, by definition, a novice.

After a while, they claim you move from being a novice to be competent. That move must be one of the proudest moments in your life. Imagine. Go home and you tell your partner "darling, I'm competent!." Yeah, I know.

Then after a while, you graduate to being proficient, like being a Boy Scout. Then maybe you become an expert. And then finally you try achieve mastery.

Here's the thing and its ties into the previous talk really strongly.«from Randall Thomas» The thing that takes you up that set of steps is experience. It's not reading. It's not talking, not thinking. It's doing. That's what they found.

And I think it's interesting just to go through this in just a little bit more detail.

So if you're a novice, you have no experience whatsoever. You don't know anything about this environment, and therefore you have to be given explicit rules about what to do when because you have no way of interpreting what's happening. You have zero context in which to work. If I'm about to jump out of an airplane with a parachute the very first time, I really do not want to have a lecture on Bernoulli numbers. I want to be told what to pull and when.

HAs anybody here either learned to drive recently, or taught someone to drive? What do you think about the conversational possibilities of talking to a learner driver for the first couple of weeks when they're driving. Zero. They have no bandwidth for any kind of philosophical discussion about, you know, road etiquette.

They are white knuckle; «thinking»How do I not kill people?

That is a novice. I'm quoting from the report here because they describe all of this in terms of pilots, and it's nicer to talk outside the industry about someone being in office.

"The novice pilot knows how to read cockpit instruments and how to manipulate the controls in response to such features as instrument readings and context-free visual cues such as the angular displacement of the horizon."

"Otherwise known as "We're dying.")

But that's what the novice can do, right? The novice can respond: they've been told "If this is high, pushed that;" "if this is low, pull that."

As a novice you'll fly around four or five hours doing that until you've worked out the ropes. At some point, you'll become competent. And now what you're starting to learn is patterns. You are dealing with stimuli, and you have started to develop the ability to respond to stimuli quasi automatically. If the nose starts to drop, you may find yourself pulling back slightly on the stick without realizing that you actually went through the conscious process of saying, "Oh, the nose is dropping. I need to pull back."

So now, rather than rules, you're using guidelines. A guideline is a rule that you can break. It's a suggestion. In general, if you see that the nose is dipping, you want to pull back on the stick. Maybe, though you also want to put in a bit more throttle. Maybe you want to check for icing on the wings. It's less than a rule. It's a guideline.

So now you're developing context. You're beginning to see what you're doing as part of being a bigger picture. Again to read from them«the Dreyfus report»

"The competent pilot can recognize such aspects as high in the landing approach envelope, verging on stall conditions, and dangerous crab angle, and knows guidelines for correcting such conditions."

They know the kind of things they're supposed to do to correct. In a way they're beginning to use macros to execute what they're doing. The next step up, though, is a really big step: it is the step up to proficiency.

Up till now, we've been dealing with individual tasks. These tasks had become more complicated, but they're still just a task. Now we're dealing with meeting a goal, and we have to work out what tasks to do to meet that goal. So we're strategic, and that is a lot harder because we need to have a recipe and you need to have ingredients that we you can call on to meet that particular need.

And that also means we become responsible. Up until now, people have told us what to do. Now we are deciding what to do.

"The proficient pilot, intent on making a safe landing, sees ... the landing envelope and crab angle as salient while ignoring the terrain beyond the far end of the runway."

Okay, so that's what they're doing in that particular moment. But then they suddenly decide, "Oh, you know what? I'm going to have to go around because there's a cow on the runway being contented."

So what am I going to do now? Not only do I have to go around, but I have to switch what's important to me. I now no longer care about the landing envelope. What I care about is the train at the end of the runway. That changes my entire perspective. And if I'm proficient, I can do that.

So next on the list is you become an expert. You stop thinking about what you're doing in terms of all the individual acts, you know, aware of the fact that you're taking in all this information, it just happens. And this sounds a little bit mystical, but it's not really. Another word for this is "intuition."

People say to me, "That is ridiculous Dave. We are engineers, we are scientists, we use math. We are not intuitive. We're deterministic. We do everything according to rules, by the book. There is no room for intuition in software development."

Let me ask you a question. How many of you have been working on a problem? So maybe right about lunchtime some problem pops up and you look at it and you're late to lunch because you're trying to solve this problem. Nothing happens. Come back from lunch and you still can't work it out and you're sitting there the entire afternoon. You bring people over to look at it. No one can see it. It's really, really frustrating. And you keep doing stuff; you end up doing stuff you'll regret later, changing stuff you really shouldn't have changed. But you do it. You stay late that night. You go home. You're miserable to be with because your brain is still going "I don't get. I can't see what's wrong with this code." You go to sleep, you're tossing and you're turning. Finally, you fall asleep.

The next morning you wake up knowing what the problem was. How many people?

«everyone raises a hand»

Yeah, there's no room for intuition in suffer development.

Intuition. I'll get to that in a second.

«Looking at quote»I love this one.

"The magnitude and importance of this change from analytic thought to intuitive response is evident to any expert pilot who has had the experience of suddenly reflecting upon what he is doing, with an accompanying degradation of his performance and the disconcerting realization that rather than simply flying, he is controlling a complicated mechanism."

They've measured this. They've actually gone into airplanes. They pointed out to pilots in the middle flight how hard what they're doing is, and they've measured their performance in terms of number of corrective inputs per second. Their performance drops dramatically once they tell him that they're doing something like this.

And then lastly, we get to master.

"...the expert is capable of experiencing moments of intense absorption in his work, during which his performance transcends even its usual high level. «dave: We're getting a little bit gushy here.»... this masterful performance only takes place when the expert,... can cease 
to pay conscious attention to his performance and can let all the mental energy previously used in monitoring his performance go into producing almost instantaneously the appropriate perspective and its associated action."

We have a word we use for that. Its flow.

Now I'm not necessarily a big fan of flow. I think you can be really productive. But you can also screw a whole bunch up in flow state. But it's there. People recognize that.

Okay, so they have this mental model. The reason you know that this is kind of artificial is just how convenient this ends up being.

They have four axes that measure things along.

  1. Recollection. That's how Well can you work out what it is you need to know. Sorry. That's how much you know of what's going on.

  2. Recognition is how do you actually see things.

  3. Decision making,

  4. And am I actually aware of what I'm doing? Or is it just happening naturally?

And they go from being recollection being non situational, as in I don't know anything apart from the context of what I'm looking at, to situational.

Recognition is going from decomposed individual components to holistic.

«lets audience read rest»Oh, you can read.

And the reason I think it's all a little bit contrived is they show this really beautiful little graph that comes out of that.

As you move from novice to master, then you gradually turn each of those things green.

I could say I don't believe that's necessarily the five steps. I don't necessarily believe all of their descriptions. I don't care, because in their model is one really fundamental facet which I know is true. And that is: as you progress up the steps you move from being rule based to intuition based. You're developing intuition and you develop intuition the same way you develop intuition doing anything. How do you learn to ride a bicycle? You get on the bicycle, you pedal and you fall off. You get on the bicycle, you pedal and fall off.

There was a fad in the mid 1970's called inner-sport. The idea was that real performance comes from your body being able to do things without your mind being involved. When you think about it, that's true. If I said to you "describe the actions you take two catch a ball," you probably couldn't do it because you're solving a differential equation in your head. And not only that, you're actually judging the correct amount to move, I don't know, 50 muscles to intersect with the trajectory of a ball. That's not something you can do consciously.

The inner tennis thing is kind of cool. Say you were learning how to serve. What happened was the coach would take a chair and stick it at some point on the far side of the court, probably on the little T. Then they get a laundry basket full of tennis balls and they would say, "Throw the ball up in the air and hit it. Do not aim for the chair. Instead, say aloud whether your ball is to the left, to the right, in front of, or behind the chair."

So you hit the ball and say "behind and to the right", hit the ball, "behind," hit the ball, "...whatever." And you would do that for an hour and then the instructor would say, "Okay, stop now. I want you to hit the chair." You throw the ball up in the air and you hit the chair, and you throw the ball up in the air and you hit the chair; every single time. What happened is you had trained your subconscious, your nonconscious I brain, and that's the thing that's doing all the work. That's the thing that's doing all the differential equations and moving the muscles and everything else your conscious brain can't do. That's way too stupid to do that. It's your subconscious that does that.

And so this whole process of learning is a question of internalizing. It's a question of training your reflexes, your intuition, so that you can do this thing without having to think. Because the less you have to think about the mechanics of what you're doing, the more you can think about the bigger picture and therefore the better you'll be.

Question: Where do you think you are «on the Drefus scale» juggling? We're going from one (never done it) to five (give me eight balls and a chain saw).

«Polls audience» Okay, so one, two, three. Oh, there's a hand back there. How many balls? Okay, four. I can't see five. I guess not.

All right, driving: One, two, three, four, five. Yeah, Everybody's a great driver is the other people who are idiots. You're right. Actually, you are a all probably three four, or five, because most of you, I'm sure, can drive without having to consciously remember which one's the brake and which one's the accelerator. Most of you can probably get to the store and not actually remember having driven there. The times that you remember driving is when you say "Oh, look at that. An accident up there. I'm going to take a detour" When your override in the stuff that your automatic brain can do.

Anybody better than a one at robbing banks? «one person raises hand» You, sir, and I are going to have a talk after this.

And here's the crucial one. Where you are you in software development: One, two, three, four, five.

You're all wrong! Mostly Bruce «Tate, the organizer». You're all wrong because it's a trick. And the trick is there's no such thing as software development.

Anybody who said, "Yeah, I'm a four at software development." If I gave you a SNOBOL program and said debug this, you'd be like What the hell? Suddenly you're not a master anymore. Or, ah, expert. Suddenly you're a beginner. The actual reality is people have done measurements across many, many industries, and it actually looks the distribution of people has what I have come to pull a belly curve where most people sit around a high "two."

Why you sit around a high tow.

«audience:I got it to compile» You got to compile. Oh, okay. «audience: because things change so quickly» Yes, to some extent, it's because things change so quickly. However, we can factor that out by saying you're a high two at doing whatever you were doing.

Here's the reason. What's the difference between the two and the three in terms of your planning; in terms of your direction? When you're a two, you're told what to do. When you're three, you work it out for yourself, and a lot of people don't like to do that. And when you don't like to do that, you don't. And you sit there, fat, dumb and happy doing the same thing all day, every day, because that's what you're comfortable doing.

So why am I going through all of this about the model? I'm doing it for a couple of reasons. First of all, for you, because constantly learning means you're constantly going to be putting yourself down at level one. It means you are constantly going to move from "I'm the king of everything I survey" to being "help! I don't know what to do. Tell me."

Most people who feel that they've earned some kind of respect in the industry hate having to go to someone and say, "I don't understand, Tell me what to do."

So it's a feeling that I think you have to become comfortable with. In fact, you have to embrace it because every time you sit there thinking I haven't the faintest idea what's going on here, it means that you are on an accelerated path to learning something, because the incremental learning from 3 to 4 is all fine tuning. Yeah, you're good at something. You're just going to get a little bit better. But the difference between one and two is like 80% of the entire amount of things you need to know. It's phenomenal. So every time you get from one to a two, or to a three because that would you be comfortable, then find something where you can shoot back down the curve to a one and start again.

Don't throw away the other stuff. That's what pays the bills.

It's the «level» one that pays tomorrow's bills.

It also is really deeply significant because every single one of you is a mentor. Every single one of you is helping other people learn. And as you do that, bear this in mind.

If you are teaching someone who is a novice in a particular situation, I always used to be really careful and encourage them in their mistakes, all this kind of like airy-fairy kind of stuff.

They don't want that. They want to be told what to do. They want to be told how to learn what to do for themselves. When I learned to fly a long time ago my instructor was excellent. I don't know if he was trained to do this, or he worked it out for himself. I'd be in the one and two phases, and I was flying along and maybe I was about to stall. He would say things like, "Hmmm, it's getting quieter" or h'd say, "do those controls get feel a bit mushier than they used to?" It would never be, "you idiot, you're about to stall."

It would be a clue. It would be something where I could go, "Oh, the controls feel mushy. Therefore, I'm losing authority. Therefore I'm about to stall. Ah, I'll push the stick forward."

He would ask the questions that would help me move from a one to a two because he would be giving me the correspondence between the situation and the response. So when you're teaching people, it's a really important thing to do. When you're teaching beginners, tell them what to do. When you're teaching people who are just above beginners, give them situational clues. When you're teaching people that are threes and fours, make sure you are actually teaching them and teach them in terms of metaphor. That's why we're constantly using metaphor with each other. That's what a pattern language is. That's what all of the jargon the industry is. It's all metaphor. And that's how you communicate with experts.

Oh, and never, ever, have someone at level five try to teach you anything.

So here is my personal plan for growing. Yours will be different. Do not copy mine. There's only room for one at the top.

1st rule. It is your responsibility and your responsibility alone to do this. People sometimes say, "but Dave, my company doesn't give me time to read or study or do whatever else" and I say, "No, they don't because it's none of their business." They don't care. It doesn't add to them particularly. Yeah, sure, maybe every now and then. But this is you investing in you. This is your time, investing in your future. You are all paid probably twice what you would get in any other industry. Part of the cost of that is keeping your value and keeping your value means growing. Sorry, that's a bit naggy. But it's true.

How do I know what to look at? Well, I have something I call the Rule of Three. If I come across something I haven't heard of before three times in about two weeks, then I'll say, "that might be interesting." And I have a little list of things that I research. I try really, really hard not to go and do it immediately (but that's what I do).

«audience says: why not two times?» Two times isn't enough. Two times is A copying somebody else's post and then B going "I agree."

Research. When you do research, do research. Don't follow every single fad. Don't go "that's got a really cool name. I'll go see what it does." Look at things wisely. What's this going to do for me? How's this going to help me? In what way is this interesting. In what way is it something I don't know anything about? And that's my last point.

Diversity is important. You're investing in yourself. Anybody who does investing will say diversity is how you protect yourself from change. But diversity means becoming a novice. So be prepared to diversify.

And then last, just because I've noticed this in myself, I have a calendar entry that repeats every six months. And all it does is it says "comfortable question mark." It makes me think about it. If I say yeah, then I immediately have to stop what I'm doing and go and find something else because I don't want to be comfortable. Not too long.

This leads me to the last point, and this was covered. by «Randall» Thomas, and that is the idea of doing good. In fact, it was so important to us that it became the last tip, actually the last entire chapter in the book. The last tip in the book is about you doing good; about being conscious of what you do. It's about calling stuff out when you're asked to do things that are wrong. It's about thinking about the consequences of what you do. When you think about Twitter. An application that originally allowed you to send 144 character messages to people that didn't care. Twitter has actually changed the world. People have died because of Twitter. Revolutions have been won because of Twitter. It's an incredible responsibility for what was just kind of throw away, cool app.

So one of the things that we really recommend is that the Nuremberg defense didn't work at Nuremberg, and it's not going to work for you. "I was just following orders" means that you're not a human being. We actually have three tips in this chapter because it was important enough. First

«audiobook narrator» tip 98 first do no harm

«audiobook narrator» tip 99 don't enable scumbags

«dave».You have to love way she said the word scumbags.

And then, just because we felt were getting just a little bit negative, the last tip in the book is

«audiobook narrator» tip 100. It's your life. Share it, celebrate it, build it

«dave»and have fun. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment