Ruby Rogues
164 RR Staying Sharp with Dave Thomas
The Rogues talk to Dave Thomas about keeping up and staying sharp in programming.
July 09, 2014
Episode 164
164 RR Staying Sharp with Dave Thomas
Ruby Rogues
0:00
0:00
Speed:
Share This Episode
Show Notes
The Rogues talk to Dave Thomas about keeping up and staying sharp in programming.
Special Guest: Dave Thomas.
Transcript
DAVE:
Yeah. Iâm jolly good, yâall.
[Laughter]
[This episode is sponsored by Rackspace. Are you looking for a place to host your latest creation? Want terrific support, high performance all backed by the largest open source cloud? What if you could try it for free? Try out Rackspace at RubyRogues.com/Rackspace and get a $300 credit over six months. Thatâs $50 per month at RubyRogues.com/Rackspace.]
[Snap is a hosted CI and continuous delivery services that goes far beyond letting you do continuous deployment. Snapâs first class support for deployment pipelines lets you push any healthy build to multiple environments automatically and on demand. This means with Snap, you can deploy your staging environment today. Verify it works and later deploy the exact same build to production. Snap deploys your application to cloud services like Heroku, Digital Ocean, AWS, and many, many more. You can also use Snap to push your gems to RubyGems. Best of all, setting up your build is simple and intuitive. Try Snap free for 30 days. Sign up at SnapCI.com/RubyRogues.]
[This episode is sponsored by Codeship.io. Donât you wish you could simply deploy your code every time your tests pass? Wouldnât it be nice if it were tied into a nice continuous integration system? Thatâs Codeship. They run your code. If all your tests pass, they deploy your code automatically. For fuss-free continuous deliver, check them out at Codeship.io, continuous delivery made simple.]
CHUCK:
Hey everybody and welcome to episode 164 of the Ruby Rogues Podcast. This week on our panel, we have David Brady.
DAVID:
Now with 100% more Daves.
CHUCK:
James Edward Gray.
JAMES:
Not a Dave.
CHUCK:
Avdi Grimm.
AVDI:
Hello from Pennsylvania.
CHUCK:
Saron Yitbarek.
SARON:
Hi from New York.
CHUCK:
Iâm Charles Max Wood from DevChat.TV. And we have a special guest, Dave Thomas.
DAVE:
Hey everybody.
CHUCK:
So Dave, for the handful of people who arenât aware of who you are, do you want to introduce yourself?
DAVID:
Sure, I think programâŠ
DAVE:
UmâŠ
DAVID:
Oh, sorry. [Laughter]
DAVE:
Alright. Yeah, Iâm Dave Thomas or pragdave on the net. I wrote âThe Pragmatic Programmerâ, was one of the authors of the Agile Manifesto, and in terms of Ruby Rogues, wrote the original Pickaxe book back in 2001.
CHUCK:
But your nameâs on the current Pickaxe book.
DAVE:
Oh, yeah. It is indeed. A labor of love is to keep maintaining that as Ruby grows.
JAMES:
And that has to be challenging as heck as things like complex and stuff make it into the core. I canât imagine how hard it is to redo that back section every time.
DAVE:
Actually, you know what? The back section, the reference, thatâs the easy part.
JAMES:
Really?
DAVE:
Oh yeah. And itâs infinitely easier. The first time I did that, I had to do it by reverse engineering the C code, because there was no documentation at all. And thatâs actually one of the reasons I wrote RDoc, because I thought if I give them a tool that they can use to document the core as they go along, then itâll make my life easier, because Iâll be able to see what they think these things do. So, that was totally self-interest. So, because of RDoc itâs now a lot easier for me to do that.
Whatâs really hard is the first section, the first half of the book. When things change, you can make lots of little small changes to reflect the various small changes that happen. But over time, this is tension that develops because we discover better ways of writing Ruby. And so, every now and then I got get in there and basically just slash and burn and change a whole bunch about the way things get done.
But thatâs not too bad. The real challenge for me recently has been keeping up with Elixir, because that revs about once every two weeks. And typically, it is not compatible, because itâs still pre-1.0, so very happy to break things. So, that has been a challenge.
JAMES:
Thatâs right. So, youâve been doing a lot of Elixir. Why donât you tell us how you got into that?
DAVE:
Well, I got into it because Iâve been looking to find a functional language that I could practically.
CHUCK:
Good luck.
DAVE:
Yeah, yeah, yeah. [Chuckles]
DAVE:
And I never quite, Clojure came closest I guess, and that was relatively recent. Iâve been looking for a long time. And I wanted a language that I could use, I could explain to people, I could show people why I thought functional was cool, and never really found one I liked. And I was talking, oh, a couple of years ago to Corey Haines. He said, âWell, you should have a look at Elixir.â And Iâve had a look at it once already and I donât know what, I was in a bad mood or something, I didnât like it. So, that night I was in a hotel with him. We were doing a course together. And I went up to my room and I downloaded the latest Elixir and I was still playing with it three in the morning, which is bad because I was supposed to be teaching the next morning.
And I felt the same way I felt the first time I downloaded Ruby in that here was something that was useful. It thought the way I thought. And it had that same kind of slightly sloppy feel that Ruby has. It doesnât tell you exactly how to do things, but you get to play around a bit. And I really enjoyed that. So, I started writing more and more Elixir code and just experimenting with stuff. And I was having a blast, because itâs the first time Iâd really done any volume of functional code. It was the first time Iâd had any volume of concurrent code done in a way I thought Iâd be proud of. And I was just, like I said, I was having a blast. So I thought, âOkay. Maybe this is the next language I want to get into.â And the way I learn a language typically is I try writing something about it. And so, I started writing about Elixir and ended up with a book.
JAMES:
What was that you said, slightly sloppy feel. I like the sound of that. Can you explain what that is?
DAVE:
Well, Ruby and Elixir have ambiguities in them. They have multiple ways of doing things. They donât feel as prescriptive as many other languages. So, as a programmer, it makes me feel like I have choices and I can express taste, because I can choose to do things this way or that way. And I can think of a reason why I want to do it that way, or just it looks better or whatever it might be. And because of that, I think they draw you in. They make you more involved in the programming that youâre doing. And so, to me thatâs a big deal.
JAMES:
Do you like being on the forefront of the language curve? Because I feel like you pretty much brought Ruby to the western world. And so, you were definitely on the front of that curve. And now youâve been doing a lot as Elixir is coming of age. Do you like the languages that are still finding their place in the world?
DAVE:
Well, yes and no. The reason I found Ruby is that back in the 90s, I was subscribed to Compline [Misc], the Usenet group. And I would download every new language anybody ever mentioned just because I enjoy programming languages. I enjoy trying to find ways to express myself. And for me, a programming language is one of the tools I use to do that. So, I like looking around at different languages. I donât typically like something because itâs shiny and new though. So, a lot of the new stuff I see coming along, I avoid like the plague, because mostly thatâs faddish. And it doesnât actually add much to the art. Itâs all just bright, shiny things on top of the same old, same old. So, Iâm not particularly drawn to the vanguard of languages as much as Iâm looking for something which actually moves things forward. And Ruby, I thought, Elixir, I think is doing that. And Iâm sure there are other languages as well.
CHUCK:
So, can I ask? I have a friend that has a podcast called Mostly Erlang. Heâs doing an episode today about why the cool kids donât use Erlang. And Iâm wondering, is there a major difference between Erlang and Elixir that makes you like one more than the other?
DAVE:
Yes. And interestingly, this is not particularly contentious in that Joe Armstrong pretty much agrees. The evolution of Erlang is basically it came from Prolog by way of Haskell. And it as a syntax which is very much a kind of compile and run syntax. Itâs fine. Itâs a bit quirky, but thatâs just syntax. You get used to it. But what Erlang doesnât have is a dynamic side to it. Itâs very much a fixed language. If you look at Elixir, it instead has a full macro system, which means meta-programing.
That means in terms of the Erlang environment, is that it makes it a whole bunch easier to use the facilities of Erlang like OTP. So, if for example youâre writing Erlang code and you want to write an OTP server, the canonical way to do it is to copy and paste about 100 lines of boilerplate into a buffer somewhere and then start filling it in. With Elixir, because you can meta-program all that boilerplate code, you just say, âI want to be a server,â and thatâs it, using what is it, gen_server or using server.
DAVID:
That is an interesting approach. Thereâs a book that was really enlightening to me years ago. I think Iâve even picked it on the show. Itâs called âPrinciples of Object-Oriented Design in C and C++â. And the first half of the book, they build up things like encapsulation, privacy, inheritance, everything. And youâre just using Struct. And when you call a method, itâs like Python where you have to pass the âthisâ object as the first argument. And then he finally reaches a point where you need templates. And C++ can do templates. Actually, thatâs also inheritance you canât do in C either without using macros. And at the point when you get to inheritance and templates, he basically says, âAt this point, we do actually have to go to C++. Sorry.â And he moves onto the next level of dynamic.
And I watched a programmer build a suite of tools in C that used this inheritance. And literally what he did is if the compiler would say, define my favorite class name to be this model, now include this .c file. Not a .h file, but include this .c file. And it had macro insertions for all the structure names and elements. And then he had an endif and then he had the next thing of define and it was the same constant and he gave it a new class name. And then he did an include on the same .c file. And it was god awful. It was just absolutely byzantine. And I cocked my head and Iâm like, âWait a minute. Youâre implementing inheritance using C macros.â And heâs like, âYup.â Iâm like, âWhy donât we just do this in C++ because this is a C++ compiler,â and he went, âOh.â [Laughter]
CHUCK:
Itâs not as fun that way.
DAVID:
Well, heâd been programming since 1970. It was like, âIâve been programming since before C++ was a thing.â
JAMES:
Iâd say that Iâve played a fair bit with Erlang back a couple of years ago now. Not as much with Elixir, though Iâve seen Dave show it off a couple of times. And I would say that the syntax I think did bother me more than some languages. One of the things that really bug me in Erlang is the three different line endings. So, you got comma, period, semicolon at the end of each line, which basically means anytime you have you reorder lines, youâre basically guaranteed to be wrong in multiple places. [Chuckles]
JAMES:
And so, itâs really annoying to fix.
DAVE:
Youâre absolutely right. That does suck.
JAMES:
Another couple of problems I had with it were interacting with Unicode. And I believe thatâs gotten better, but I did before that. And then using a simple regex, I had something and I just need a simple regex to do this, and that was a nightmare. But I love the pattern-matching and the processes of course are what make Erlang amazing. So, I think Elixir is a neat twist because you get those niceties of the underlying stuff, the pattern-matching, the processes, and stuff like that, with a much prettier interface painted on top.
DAVE:
Itâs not just the prettiness of the syntax. Itâs for me, I always was sad that things like method definition and most of the control statements in Ruby were hardcoded. And in Elixir, theyâre all macros which means that if you want to, the kind of meta-programming that you do to do things like say decorate a method or add advice to it or something, is really, really straightforward to do. It also means that because pretty much everything can be invoked via macros, that you get incredibly good control over the scope of the changes that you make. So, I can change the behavior of a particular thing for one particular parameter in a method call. Itâs the accuracy that you get from that is fantastic. Although it is in a way just like lipstick on top of the pig that is the Erlang virtual machine, it does a lot more than that. It does a whole bunch of stuff at compile time very, very smart. So, that really does make it a joy.
CHUCK:
I want to go a little bit meta on this conversation. And the thing that really fascinates me about you and about your approach to a lot of this is just your, it seems like you just go out and explore things. You see something that looks interesting and so you dig into it. How do you pick the things that youâre going to jump in on? How do you know which projects look interesting and when do you decide to give up on them?
DAVE:
Ooh. The first part, easy in that many things just⊠itâs taste, isnât it? How do you know what movie to go see? Itâs the same kind of thing. You look at what people you respect are interested in. I used to have this rule that if something came up three times in a month then Iâd go look at it.
DAVID:
[Laughs]
DAVE:
And thatâs still a pretty good bet.
JAMES:
That is a great rule.
DAVE:
So, Iâll go play with things. The trick is knowing when to abandon them. And thatâs exactly the problem, because if you get in there and get, say frustrated or you decide that somethingâs not very good, it could just be your own stupidity. Youâre not getting it and you need a bit more experience. There are some things that I get into and I donât like simply because of taste. Honestly, every probably two years, I say to myself, âOkay. This month I am going to like Python.â And Iâll sit down and Iâll spend that month writing Python code. And I have never ever managed to make it stick. So, there are some things which are just purely taste that you abandon.
But the rest of the time, itâs really, I guess the decision is, âIs it paying back?â So, Iâm sitting here. Iâm investing time in this thing. Am I getting something out of it? What Iâm getting out of it is insight. What Iâm looking for is ways of developing my craft and getting better at what I do. So, if itâs not paying back in terms of giving me new insights, then Iâll move on to something else. And Iâve reached the point in my career where insights donât come from sexy new syntax. It comes from new ways of thinking about things.
So, one of the things that are keeping me really interested right now in the functional programming side of things is realizing that functional programming and pattern-matching is actually equivalent to writing programs as parsers. And so, itâs really interesting to me to explore how to think about general purpose programming problems in terms of parsing and transformation. To me, thatâs really quite exciting.
CHUCK:
Okay, that was mind blown right there for me.
JAMES:
Yeah, Iâm still thinking it over, too.
DAVID:
Yeah.
CHUCK:
[Chuckles]
JAMES:
Yeah.
DAVE:
Alright. So, okay letâs take a simple case. Imagine you had to do a [run length] encoding a list. Okay? So, you have a list of numbers. And 1, 2, 3, 4, 5, okay, so thereâs no compression you can do there. But if it was 1, 1, 1, 3, 5, then youâve got three 1âs there. So, you can replace that with 1 three times followed by 4, 5, or whatever it was. So, if you think about writing code to do that in say Ruby or anything else, you know damn well that youâre going to write that code and there are going to be edge cases that youâre going to have to deal with. And itâll take you three or four goes to get it right, have a little flag here for what happens if youâre accumulating the run and you hit the end of the list and itâs got to stop.
If youâre doing it in a pattern-matched functional language, then it actually is you basically write the thing as if you were writing a parser for it. So, you say okay. So, if Iâm looking at a list where the first two elements are the same, then Iâm going to replace them with some kind of indicator that I got to repeat, where I have the element and a count of two. If I have a list where the first element is one of those repeat things and the next element in the list is the same value as in the repeat, then Iâll take that second element out and up the count in the repeat. Otherwise, Iâll just copy the front element to the result. Okay. So, itâs a parse. And by doing that, the code just works. Thereâs a little bit of housekeeping to do with the empty list and stuff. But fundamentally, the code just works.
And I actually wrote that code this morning for a talk Iâm giving in Texas. And literally, it just worked first time. And I expected it to, because it was just laid out as a simple parse transform. And you think, okay, thatâs an abstract example. Iâm working on a Markdown to HTML translator using exactly the same techniques. Think about Markdown. So, if you have a paragraph thatâs immediately followed by underscores, then itâs actually a heading. Yeah? Well, thatâs just parsing a stream of blocks. And you look for that pattern and you replace it with something else. So again, itâs just a stream transformation. And thatâs really exciting. And then you take that nextâŠ
JAMES: SoâŠ
DAVE:
Sorry.
JAMES:
So, I was just going to say, obviously we can write code like that in Ruby. In the worst case, we could use a parser generator and handle it that way or whatever. But youâre saying that you think the big thing about pattern matching is that it puts that as a first-class way to divide the program. And thusâŠ
DAVE:
Right.
JAMES:
It makes you think about it that way.
DAVE:
You could do class-based OO in C [chuckles] as weâve discovered.
JAMES:
Right.
DAVE:
But itâs not natural. And this makes it natural. And actually, youâre encouraged to do it that way. And then you take it a step further, because one of the other things that you get in languages like Haskell, Elixir, and OCaml is lazy streams where the results are presented to you as you need them. So, these are effectively infinite streams if you want them to be. And you can do exactly the same rules on those. And that gets really interesting because if you have the ability to have lazy streams and if you have the ability to perform operations like reduce and zip on them, then what youâve basically got is reactive programming, but in a functional environment. And I think that is possibly how weâre going to be writing servers in the future.
DAVID:
Yeah.
JAMES:
Reactive programming being where you respond to events?
DAVE:
Basically. Yeah, but what you do in reactive programming is you convert your events into streams. And then what youâre doing is youâre using your regular stream operations to combine and process events. It takes some of the time issues out of event processing.
CHUCK:
Yeah, we did an entire episode on functional reactive programming on JavaScript Jabber so Iâll get a link for that and put it in the show notes. I wanted to talk to you about something else. I know that itâs not a clean transition, but you signed the Agile Manifesto what, forever ago. And itâs interesting how that ecosystem has changed. And you wrote a blog post about Agile not being Agile anymore, is what I got out of it. Iâm curious, not so much what your thoughts are on that because I think the blog post pretty well summed it up. But what do we do about that?
DAVE:
Well, I think we have to work out why weâre all so keen on Agile I the first place. And the reason is that it helped us write our code better, whatever that means. We were writing more accurately. Weâre maybe writing a bit faster. Weâre having fun as a team. It was basically, we all felt it was a better way to write code. And that still holds true. But whatâs happened is we were having too much fun. And so, people came along.
JAMES:
[Chuckles]
DAVE:
Hey, whenever people are having fun, there must be a way of monetizing this. And a whole bunch of people jumped into the fray and started finding ways of monetizing, little M. So, some people were charging money. I know the scrum people have made a fair chunk of change out of doing the scrum master training. And thereâs people like, well, thereâs the new safe agile framework, god help us, and things like that. But also, people were making non-cash money in terms of writing books, conference talks, all those kinds of stuff. And all of it was really ignoring the underlying principles and ignoring the underlying reason we were doing things. So, what we can do is to get back to that basics and just say to ourselves, âOkay. Letâs not worry about are we doing this right? Are we following this particular creed?â or whatever. Instead, letâs just go back to the principles and find something that works for us and do it.
The reality is that no two teams should be doing âagileâ the same way, because the best practices, best anything, is always contextual. Thereâs no such thing as universal best. So, whenever youâre looking for something which is like best practices, it always has to be local to what youâre doing. And so, teams need to be exploring the way that works for them. And they need to be using the Agile principles to do that. So, you try a little change. You monitor to see whether or not it is better or worse, and if it is you adopt it, if itâs not you donât. And you just keep repeating that. And if you keep repeating that, youâll get better and better every time. So, I think thatâs what you do about it.
Thatâs what I was trying to say in the blog post, too, is letâs just abandon the word agile because itâs now being abused so horrendously that I donât think weâll get it back again. And letâs just do things with agility. And I think if we do that, we can just carry on doing what we have been doing and probably be a lot happier for it.
DAVID:
So, how do you find the balance between adapting, this is the first time Iâve heard somebody come out and say agile, because everyone says, âOh, turn everything up to 11,â right? Well, thatâs extreme programming. But when we talk Agile, we think about take these 11 principles of extreme programming, dial them up to 11 and thatâs Agile. And this is the first time Iâve heard somebody say, find the tradeoffs that work best for you.
How do you tell the difference between that and when somebody basically says, âWell, for our team, the tradeoff weâre going to make is weâre not going to unit test or weâre not going to pair program at allâ? How do you tell when somebodyâs basically saying, âOkay, youâre not making a tradeoff, you are actually abandoning, youâre at the other endâ? Instead of dialing it to 11, youâre dialing it to 0 and youâre doing it without consideration of the tradeoffs. How do you crucify those people, is what I want to know.
JAMES:
[Chuckles]
DAVID:
Maybe thatâs the wrong question to ask. [Chuckles]
DAVE:
You donât. Who are you to judge?
DAVID:
Right.
DAVE:
Not you specifically, but who is one to judge?
DAVID:
Yeah, yeah.
DAVE:
First of all, there are no 11 practices of Agile or whatever it might be. XP is an implementation, which actually preceded the Agile Manifesto. So, if it follows agility, then itâs more by luck than judgment. It does. Iâm not going to argue with that. But XP is one particular instantiation of agility. I think agility is simply you are being agile if you follow a process that says, âWhere am I now? Where do I want to be? Take a small step towards it. Analyze what happened. Go back and do it again.â Thatâs agility. And there really is nothing else to it but that. You apply that fractally. So, you apply it to variable naming, you apply it to coming up with a release schedule, whatever it might be. And you do that over and over and over again and youâll be successful.
Now, one of the times that you do that is this meta-time where you sort of step back and look at what youâre doing and apply that same iteration to the way that you do things. Now, if for example you were to say, âYou know what? Letâs not pair.â Well, the âagileâ way of doing that on my list would be, âOkay. So, letâs decide a period.â And typically you donât want to do something until you have a test to say whether Iâve done it or not. So, in this case youâd say, âSo, what is a reasonable period in which to analyze this?â Maybe it would be, oh I donât know, three months.
Okay. So, you say we wonât pair for three months. And then weâll look at these metrics and work out whether it was better or worse. And then at the end of that time, weâll say, âOkay. In our particular team, on our particular project, at this particular date, pairing actually doesnât work better than not pairing.â Or weâll say, âGuess what? Pairing does work better and weâll go back and adopt that.â And youâll know, instead of having some consultant come in and tell you to do this. So, thatâs what Iâd say.
CHUCK:
But the consultantâs always bringing such fun games.
DAVE:
Oh, absolutely. They do, because thatâs a proxy for thinking, isnât it?
AVDI:
Thereâs one piece ofâŠ
DAVID:
[Laughs]
CHUCK:
I love that. I love it. [Laughs]
AVDI: [Chuckles]
CHUCK:
Itâs a proxy.
JAMES:
I want that t-shirt. Go ahead, Avdi. [Laughter]
AVDI:
Thereâs one piece of that I want to dig into a little bit deeper, because it seems like the deciding whether it worked portion can be one of the hardest pieces. It can be very subjective and you can have effects of, well, you can try something very briefly and say, âWell, that wasnât any fun at all.â And I donât know. There are a lot of ways it seems like that can go wrong. Do you have any thoughts about that?
DAVE:
Yeah, well how do you know that agile works?
JAMES:
Because you told us so, Dave.
DAVE:
No.
JAMES:
[Chuckles]
CHUCK:
Because weâre smart people.
DAVE:
No, I never did. See, that is the thing. And thatâs the thing that makes me very sad, is that at no point did anybody in that room, well maybe thatâs not true. Most people in that room did not go out and say, âHey world, do it this way.â
JAMES:
Right. I would say we know it works because we are now able to deliver more software faster and with less problems of, âWell, we spent three years building this and it had nothing to do with what they actually want.â
DAVE:
I think thatâs definitely true. I think that for teams that are following that kind of path, they are capable of iterating a lot faster. And I definitely think thatâs good. How do we know thatâs the best they can do?
CHUCK:
I was about to ask that. What metrics do you need to be looking at in order to measure that?
DAVE:
I donât think we have them. I donât think we really honestly yet are in a position to have metrics. I think weâre I the position of 17th century bridge builders. Actually, even 19th century bridge builders, where weâll keep stressing the system until something falls down and then weâll back away from it. We donât really have the analysis tools, I donât think, to be able to optimize. So, weâre going to have to do it, I think, based on a kind of intuition, a kind of, âIs this working for us in these environments?â And I think what you do is you try and codify that intuition by saying for a particular team, this is what we value.
So for example, we may value delivering, or we may value low bug rates, or we may value something more client-oriented like client conversion rates, or whatever it might be. These are our values. Now, what weâll do is we will work out a way to measure how well weâre doing against those values. And then weâll try iterating the process to see what effect it has on those measurements.
And I think thatâs the best you can do.
SARON:
So, it sounds like the measurements themselves are going to be contextual. So, having these universal metrics really doesnât seem to make sense.
DAVE:
Absolutely not, absolutely not, because can you think of any single truth that is not contextual?
JAMES:
Yeah, I think itâs a great point. You used the example of pairing earlier and Iâve been experimenting a lot with that this year and just with six months of really trying it in different scenarios and stuff. What I feel like I can say pretty confidently is it helps a lot in some areas and then thereâs other areas where I think it actually hinders, which doesnât surprise me at all.
DAVE:
So, can I throw a gauntlet down to you guys?
JAMES:
Sure.
DAVID:
Sure.
DAVE:
Alright. For three months, write no tests.
DAVID:
No. [Laughter]
DAVID:
Iâm out.
JAMES:
And David Brady raids [29:04].
DAVID:
[Laughs]
JAMES:
So, I think thatâs really funny. Iâm sure youâre aware of the DHH keynote and that was highly controversial, right, his ideas about testing being âfad dietâ, or TDD I guess more specifically is what he said.
DAVE:
For what itâs worth, we talk about context and we talk about experts and consultants coming in and basically crapping on a team and walking out again. He and I do the same thing. We have experiences and we have ways of doing things that work for us. And for him, TDD doesnât work. And thatâs great. Now, one of the things that he does and 37signals does is, âHey, this worked for us so you should do it.â And I think you got to ignore that because again, itâs contextual. They happen to be in a certain place at a certain time. It worked for them. Good for them. It wonât necessarily work for everybody else.
For me personally, I did that experiment. I have been writing tests since the 70s. And I have always written them. Well, thatâs not quite true, but since the mid-80s, I viewed them as being a design technique more than anything else. And so, my tests would inform the way I designed my code. It helped my code be decoupled. It helped me modularize it better, et cetera, et cetera, et cetera. So, Iâd been writing a lot of tests. And I noticed that I was getting into very much a routine, that it was almost like there was no thinking involved. And I was coding, I was writing tests. I typically didnât do test-driven or test-first, because I saw that as stupid. But I would be testing as I went along and blah, blah.
And I realized that actually, I was thinking about the testing as I was writing the code and then write the test. But the test didnât actually contribute anything because Iâd already done the thinking about the test. So, I almost never ran into the situation where I then wrote the test and went, âOh, wait a minute. I got to refactor this code.â Just basically, I got to the point where it had become automatic. It had become tacit he said, to key a second conversation at some point.
And so, as an experiment, I stopped writing tests. And I actually measured informally things like bug rates. And they made no difference whatsoever. But that was to me. And thatâs because I have a certain set of experiences and I write code a certain way. I cannot say to you, because of this, âHey, guess what? Iâve just come down from the mountain. Hereâs a tablet that says stop writing tests.â Itâs always going to be an individual or a team decision. And itâs something to experiment with. However, the interesting thing to me was the sharp reaction I get whenever I say to people, âStop writing tests.â [Chuckles]
DAVE:
Thatâs all like, âOver my dead body,â blah, blah, blah.
DAVID:
[Chuckles]
DAVE:
And itâs like talking to the NRA. Youâll pry these tests out of my IDE over my cold, dead keyboard. But you know what? That is every bit as dogmatic as the people that are telling you to do it this way, or that way. Unless you are prepared to experiment with our process, then you are stuck in a hole and youâre not going to get better. Now, Iâm not saying that youâre better off not writing tests. But I am saying that if you want to challenge yourself and if youâve reached a level where you are on autopilot when youâre writing tests, or when youâre writing code from those tests, whichever way around you do it, if you are at that point in your career, then I think you owe it to yourself to see what happens when you stop.
DAVID:
Thatâs very interesting, because I came from a long history of not testing. And so, I had a compiler and I worked in statically compiled languages. And I was very heavily dependent on the debugger. And the test people came in and said, âStop using your debugger.â And I said, âScrew you guys.â And then I started using Ruby where the debugger never works and so I finally stopped using the debugger.
JAMES:
[Laughs]
DAVID:
And now, Iâm very much test embracing. And yeah, that was my first reaction, was no way am I going to stop writing tests. And as you were talking about this, I did, I started considering what are the other things that I get from my tests? Well, the ability to communicate to my teammates that stuff works. Well, thatâs actually the subject under test isnât it? Itâs not saying I canât communicate to my coworkers that my code works if I donât write tests. Itâs asking the question how do I
communicate to my coworkers that my test works if I donât write tests? And thatâs an interesting question.
DAVE:
Thatâs a really good point. That really is a good point. Iâd also say that I think there are things that you have to test, like for example things to do with money or whatever else. And those are just classical unit regression-style tests. I just think that the practice of TDD is one which has become religious. And I think that youâre absolutely right. Once you start thinking about doing it a different way, and this is like that going from OO to functional, it expands your thinking as a programmer. So, maybe changing our practices does the same thing. And this idea of, âOkay, if I donât use tests to communicate, how else do I communicate?â maybe itâs a question of naming better or having more expressive APIs or whatever it might be. I think that changing what you do A gives you the ability to improve, but it also makes you think about what you do, do.
CHUCK:
Did you just say doo doo?
DAVE:
I just said do, do. [Chuckles]
DAVID:
That was my joke to Chuck. [Laughter]
CHUCK:
Sorry.
DAVID:
I have one job on this podcast. [Chuckles]
JAMES:
You said that I think there are things you should test. Can we also finally admit that there are things you canât test? Because Iâm pretty sure I believe that, that there are things weâŠ
CHUCK:
Well, given enough mocks, right? [Chuckles]
JAMES:
So, to give an example, in our current system we have an SOA architecture. And requests come in and they get filtered out to several different sub-bots. They handle various purposes. But the pool of bots grows all the time. And we only have to interact with one or two of them at any given time for complicated reasons. But letâs just say that pool is currently, weâll say 40, somewhere in there. We would love it to be 500. Well, at the point when it is 500, which each one of those being a web app, I probably donât have enough resources on my development machine to being up the entire system at once to throw some integrations [inaudible]. So, then what? [Chuckles]
DAVID:
Eventually your staging server is a copy of the entire internet.
JAMES:
Right. [Chuckles] Yeah, there has to be some line, no matter where that line is, there has to be some line where it literally becomes impractical. And we handle that by different ways. Weâre saying, âOkay, we canât guarantee that all these things are doing this thing. So, we try more to guarantee interactions between them.â So, this thing should respond to this interface and this thing should understand that. And then if we keep up those contracts on both sides, then when we plug the two of them together, that gives us hopefully enough. And then the rest you have to monitor with business metrics. Is that particular service still getting regular calls or whatever? If not, something may be wrong there and we should look into it.
DAVE:
Is this application like running a pacemaker or anything else, [inaudible] software?
JAMES:
No. Nope, itâs not that critical. [Chuckles]
DAVE:
Alright. So, hereâs another way of thinking about, when youâre talking about testing in this context, youâre really talking about, âIs my software working?â not, âHave I designed it right?â
JAMES:
Thatâs right. Youâre right.
DAVE:
So, your tests are integration, regression-style tests.
JAMES:
Right.
DAVE:
So, there is an alternative. Letâs come back to the Agile way of thinking about things. Deploying is one of those activities in that list of steps. I have 17 bots. I need to make it 20 bots. So therefore, my action will be to deploy whatever else, right? I think a whole bunch of development would be so much easier if the cost of failure was less. Thatâs the entire basis of how Erlang OTP gets its reliability. It says, âFail early and weâll handle it.â So, the same thing applies there. If you rolled out a system that N bots and then you want to add N+1, you add N+1. And if you suddenly see it fall down you go, âOops,â and you take that +1 out and you go back to a working state.
Agility doesnât necessarily mean you have to get it right. It means you have to be able to get it right eventually, or quickly. And so, I think agility in deployment, and one of the things that Rails gave us until the asset pipeline came along, was ability to deploy and then un-deploy very quickly. And the number of times Iâve deployed our store and some untestable non-functional requirement went bang and I just rolled back, itâs phenomenal. And that takes a whole weight off my mind. I donât have to test all those really weird hard, impractical to test edge conditions. I just roll back.
DAVID:
Have we talked about Wicked Problems on the podcast in the past?
JAMES:
I think so, but itâs been a while. You can bring it up.
DAVID:
So, a Wicked Problem is a problem that defies resolution, let alone testing. And I think it applies really well to testing. Dave mentioned⊠Avdi says we just talked about them. Was it on the show that I missed in Scaling Rails?
JAMES:
Oh, yeah, yeah.
DAVID:
Okay. Then Iâm not going to rehash them. The point that I wanted to make is that I see wicked problems as a pattern for things that are very hard to test, because they have no stopping rule, right? Thereâs no way⊠Well anyway, go listen to the other podcast where we talked about that.
But yes, there are things that are not testable because there are things that are not solvable.
JAMES:
Right.
DAVID:
And go read the wicked problem page on Wikipedia if you donât know about them because theyâre awesome. And knowing the points of a wicked problem are a really good way to keep yourself out of getting into a land war in Asia, in software.
DAVE:
[Chuckles]
DAVID:
Dave, you talked about lowering the cost of failure, right? But what if I am programming a pacemaker?
DAVE:
Oh, I think that, yeahâŠ
DAVID:
Cost of failure is kind of high.
DAVE:
Sure, absolutely. There was a story. When I first started working, my boss used to work for a software company in England and he tells a story of, they had a contract with the Royal Air Force to develop hover autopilot software for rescue helicopters. So, the idea was that you were on a side of a mountain and you were lowering the cable down. And the pilot wanted to be able to push a button to say hover and the thing would just maintain altitude. And he swears that the acceptance test for this was the project team got into a helicopter, the pilot took it up to a certain height, and then pushed the hover button.
DAVID:
Wow.
DAVE:
Yeah.
CHUCK:
Aaaah!
DAVE:
[Chuckles]
CHUCK:
[Splattering sound]
JAMES:
Thatâs a great motivator though, right?
DAVE:
That extra little minute gets you [inaudible]. [Laughter]
DAVID:
Now, this works from a physics standpoint. This works. We just have to assume that helicopter pilots are uniform spheres oscillating in perfect harmonic motion. [Laughter]
DAVE:
But yeah, I think I would never, ever⊠Well, first of all I would actually never, ever work on software like pacemakers or something like that, because I donât know how to write software that well.
JAMES:
Yeah, me too. Iâve seen my code. [Laughter]
DAVID:
I have. I have worked on that kind of software and it is not, you donât write software well. You write software awfully, because your test criteria are so paranoid, youâre not dealing with Murphyâs computer where anything that can go wrong will go wrong. Youâre dealing with Satanâs computer, where everything that can go wrong will go wrong at the same time, at the worst possible moment.
SARON:
Wow.
DAVE:
But how do you know youâve covered all the cases?
DAVID:
You have really lots and lots of good insurance for malpractice suits.
CHUCK:
[Laughs]
DAVID:
That may not be the answer to the question you asked,
JAMES:
[Chuckles]
DAVID:
But thatâs the answer to the reality that that question implies.
DAVE:
Yeah, because the same guy who told me the helicopter story told me story, and again this is probably just apocryphal, of software that heâd written again for the Air Force I think it was. And they got called in because it would restart itself once every, I think it was seven seconds or something. And it was just some real-time software. And they noticed it was crashing every seven seconds. And it didnât do it anywhere apart from when it was installed. It worked absolutely fine on the bench. It worked fine during acceptance tests. It turns out that they were installing it in the same building that had a radar on the roof. And the radar dish was rotating around once every seven seconds. [Chuckles]
DAVID:
Wow.
SARON:
Wow.
DAVE:
You canât test for that kind of thing.
DAVID:
Works on my machine.
DAVE:
Yeah, exactly, exactly.
AVDI:
But itâs also worth noting that with stuff like that, you always have a separate testing organization. Itâs not like a lot of the stuff that we work on where the programmers are mostly or solely responsible for testing their own stuff. You have somebody else who probably has very little idea of how the software even works whoâs responsible for building test sets and elaborate test scenarios, and basically annoying the ever-loving heck out of the programmers every time they try to release some software.
DAVID:
Thatâs a great point of harking back to the tradeoffs and how agile should adapt. Because from XP, one of the principles is you have on-site customer. And the idea is the testers are embedded with the programmers like wartime journalists in a battalion. And thereâs this high transparency and low barrier to communication. But yeah, when youâre writing something that could kill somebody, itâs actually a good tradeoff to have the QA team be actively hostile to the programmers, and to actually take a perverse glee from, and Iâve worked on teams like that. And AvdiâŠ
AVDI:
[Chuckles]
DAVID:
Youâve come from a government background so Iâm sure you know what itâs like to have a QA team who, their entire joy in life is ruining a programmerâs day.
CHUCK:
I was one of those QA people.
DAVID:
I know. [Laughter]
CHUCK:
But at the same time, if itâs not mission critical stuff, a lot of times the edge cases can be allowed to slip because if they happen once in a great while, itâs actually cheaper and more effective to just have a human handle it.
JAMES:
Thatâs the credit card scenario. We actually know lots of techniques to make credit cards more secure. And the credit card companies never do them because those techniques, if you add up how much they cost versus how much credit card fraud costs them each year, it doesnât make sense.
CHUCK:
Yup.
JAMES:
They just swallow the fraud.
DAVID:
The PCI Compliance spec actually stipulates that your servers must be in a building and it specifies which direction the hinges face on the doors. They canât be exposed to physical attack. And every accessible entrance has to be manned by an armed guard. The PCI government spec actually says a human has to be there to handle, because the edge cases will happen.
AVDI:
Dave, youâve been challenging us on this show to try things that break our usual models. And youâve been challenging people and me indirectly to do that kind of thing for a long time. 14 years ago or so, you challenged quite a lot of people to learn a new programming language every year, to do crazy things like valuing plaintext over really awesome fancy formats, and all kinds of stuff like that. Now youâve challenged us to not write tests for three months. Are there any other things that you can suggest to break our brains and get out of the box?
DAVE:
Well, basically everything you believe in. And thatâs an impossible target, because no oneâs ever going to even actually enumerate their assumptions.
AVDI:
I guess part of my question is do you see any sacred cows that are so embedded that weâre not really thinking about them right now? Like I guess this Ruby podcast, so particularly in the Ruby and agile communities.
DAVE:
I donât know if theyâre⊠They used to be sacred. A lot of them are no longer quite as sacred. I think I am really distraught that the crowning achievement of the Ruby community is a web framework. I think that the browser is dead. It just doesnât know it yet. And I think that we are helping perpetuate it. I think the idea of server-side code that renders pages is absolutely ludicrous, particularly as we move towards the so-called internet of things. The world is going to change dramatically. And so, I think one sacred cow I would love to see killed is this idea of the web-centric nature of development at the moment. So yeah, thatâs one thing.
JAMES:
Can I talk about that one, just to try and getâŠ
DAVE:
Please, please.
JAMES:
This year, I gave myself a couple of challenges. One of them was to try a bunch of things Iâd never tried before and do them in different ways. And one of the things Iâve been doing is using Ruby for a list of manner of things that Iâm pretty sure if I showed them to you, you would list which language you would use for that. And Ruby would not make your list. [Chuckles] So, Iâve just been trying random things. This morning before I jumped on the podcast, I was playing with a game in Ruby. So, literally drawing sprites on the screen and animating things and stuff like that, which you, yeah, most people donât use Ruby for very much, I donât think. Itâs taught me a lot.
DAVE:
And I think thatâs excellent. I really do. The idea of doing things that are uncomfortable or doing things which are against your intuition is how you learn. And so, I guess that is a perfect way of doing that. Knowing upfront that Ruby is not suited to writing real-time pacemaker software or whatever, but trying it anyway will teach you where itâs good, where itâs bad. Itâll teach you what the constraints are of that environment that youâre working in. So, I think thatâs an excellent, excellent way of doing things. As long as itâs done in the spirit of, I know this is a silly thing to do, but I want to learn.
DAVID:
Yeah.
DAVE:
A lot of people do that because I know Ruby and therefore thatâs what I will write all my programs in. But thatâs not the way youâre doing it, and thatâs perfect.
DAVID:
So, a follow-on to that question, you mentioned earlier about just trying something crazy. And like you said, you jumped into Python ad youâve tried it two or three times and it just hasnât stuck. Iâll leave it for my pick, but this sounds a lot like trying to identify pseudoscience before 50 years have gone by and weâve really established that something is a pseudoscience. And it actually turns out that itâs very hard to prove something is pseudoscience before a longitudinal study has occurred, even though the idea is crazy. How do you jump into something? If you were going to jump into Python or if you were going to jump into Go or Dart or another programming language, or no testing, what do you do to help jump in with both feet? I guess is what Iâm asking.
DAVE:
Well, you have to make a commitment. So, you have to find a project that youâre actually going to do, I think. Whether thatâs a live project or whether thatâs a play project, it depends on your circumstances. I try to carve out for myself maybe about a day a week where I can just play. And itâs typically not consecutive hours. But over the week, Iâll spend eight, ten hours just playing with things. So, if for example I was looking at say Go, then Iâd say, okay so I want to get an example here where I can have lots of little actors playing around with each other and doing something. So, Iâll come up with some toy program that would let me experiment with that and see what I thought. Something that was open-ended so that when I got to what I thought might be the finish I can keep developing in a different direction or whatever else.
I have a little suite of things I can do in different languages. So, I have, I guess you can call them kata. Some of them are trivial. In any language, the printing hello is just to make sure you actually get the environment set up. But then youâll always move on to something else. So, you might want to do, I donât know. It depends on the style of the language, but some list processing. I do typically my little anagram server. And I do that because it allows me to play with agents and concurrency and synchronization, this kind of stuff. And if Iâm really getting into a language, Iâve only done this a couple of times, maybe three times, Iâll try and write a Markdown parser for it, because that is, whatever you do, Markdown is an incredibly ugly thing to parse.
DAVID:
Yeah.
DAVE:
And so, it really, explores the outer edges of how to stretch your code in that language.
DAVID:
Cool. Can I give you a suggestion for a kata to add to your list?
DAVE:
Please.
DAVID:
Coming from the video game world, the hello world in video game programming is to put a 3D spinning cube on the screen and animate it as it spins. And thatâs really hard in Ruby, because graphics in Ruby is really hard. But itâs trivial if you can get a canvas and get access to OpenGL.
DAVE:
Right. Thatâs interesting.
SARON:
I wanted to ask you a question about your Agile is dead blog post, how you talk about weâve lost the word agile but we have the word agility. And you say that itâs our job to make sure that we keep it meaningful and that we protect it. How do we as developers do that?
DAVE:
We use it correctly, I think. Ultimately, the word is less important than what we do. in a way, itâs a bit like a design pattern in that itâs really just a codification of a certain structure, a certain way of doing things. So, if we donât call it anything at all, but we actually still follow the basic practices, if we still value the values, then weâre doing it. We donât have to call it agile or agility or some trademark name or whatever. Itâs what we do. And they really cannot take that away from us by devaluing the name. Itâs just really a question of living a life.
JAMES:
So, all this weâve been talking about is about how to stay sharp, I guess you would say, that youâre trying to break your brain, as you say, use different languages, try different ideas, do them in unusual was, stop doing things that donât seem to work, things like that. This is how we grow and change as programmers you think? This is how we get better over time?
DAVE:
Well, plumbers do it. I donât see why we shouldnât. If youâre a plumber, then you have to go for annual, whatever it is, to keep your license. You have to keep up with the new techniques, the new trends. So, when different materials come along or different codes come along, you have to go and learn those. I donât see why we shouldnât do the same. But I think thereâs a different reason to do it as well. And that is that we are in possibly one of the fastest moving industries there has ever been. And it is very easy as a developer to become a specialist. And so, you learn Ruby, then you learn Rails, and then you learn all the various libraries for Rails, then you have to learn some CoffeeScript or whatever it is you use in the frontend. And you can slap together a blog in 10 minutes and everybody thinks youâre a hero. And you can keep doing that and making money doing that for year after year after year.
But eventually, the world will have moved on. And youâll be sitting there looking at a big gap between where you are because all youâve done is Ruby and Rails and whatever else. And everybody else is out there doing whatever the magic is of the day. And suddenly you have to bridge a five-year gap in technology. And in our industry, five years is an entire generation of technology. So, unless you are doing incremental improvement to yourself as you go along, if youâre not investing a bit of time each month to keep up with whatâs new and what may or may not be big, then you are going to be way, way behind. And that gap gets to be really, really hard to bridge.
So, I think you have a duty to yourself to experiment and keep current. Now, youâre never going to know whatâs going to be big next. No one could have predicted Ruby would take off the way it did. You donât know that. So, what you have to do is to be broad in your experimentation. You have to choose experimentation that actually pays back. So, if youâre a Ruby programmer doing Rails donât go and experiment by looking at a different web framework. Go and experiment by looking at Python or Erlang or Elixir. Or experiment by writing totally different kinds of server code, or iOS development, whatever it might be. But do something that is wildly different, because thatâs what pays you back in the end.
SARON:
I think thatâs something that I struggle with, being a new programmer, is how in depth should I get into the framework that Iâm comfortable with? And at what point do I start exploring? Because I can see a situation where if youâre new to programming and you try a bunch of things, nothing really sticks. No conventions really sink in for you to then go out and challenge them. So, Iâm wondering at what point do you get comfortable and then when do you start exploring and breaking your brain as you say?
DAVE:
So, I think thatâs a really good question. And I think it depends on where you are in your career. I think when you are just starting out you have to dig deep, because it takes a while. You havenât really done, Iâm not talking about you particularly, but people in general who are just starting out, youâre learning a whole lot of things at the same time. And as a beginner, youâre going to have to learn those by experience. Youâre going to sit there and try it and do different things, and put in the hours. So, maybe learning Ruby and Rails to the point where you are comfortable I think is the trick. So, the point where you can sit down and write an app and most of it just flows. And yeah, you got to stop and look up an API every now and then, but pretty much you know where youâre going and what youâre doing.
things:
you carry on doing what youâre doing, but at the same time you fork off a little process I yourself to go and look at doing something else. And what youâll find is that the second time youâre doing that deep dive, then itâll be easier, because youâve learned the techniques of learning, a little bit. And then the third time would be easier still. So, I think that as a beginner, you go deep. And you get to the point where youâre comfortable. And then you got to move back to something else where youâre not comfortable, do it again. And if you keep doing that, after a while it gets a lot quicker to pick these new things up because youâve shown yourself how to do it.
SARON:
Makes sense.
AVDI:
I just want to say I think thatâs fantastic advice, because I think when youâre a beginner it can be tremendously frustrating if you donât have some set of tools that you have facility with where you can see a problem and have some idea of, okay, I know the point A to point B that I need to go through to solve that problem. And if you donât have anything where youâre that comfortable then just all of programming is a frustrating experience. And Iâve worked with, I feel like Iâve worked with some newbies that I think had, what they had picked up from the industry, the impression they picked up from the industry, had just filled their minds with so many different shiny objects that they felt they had to just keep running back and forth from one to another. And it held them back.
DAVE:
Itâs not just newbies. Experienced people. If you look at the sheep mentality of people flocking between all the various JavaScript libraries nowadays, or even the new gems in the Ruby world, âOh, we canât do that anymore. Weâre going to do it this way,â the same thing applies. You got to ask yourself, what am I really going to get out of this? Before you invest the time in it.
JAMES:
I would argue a little bit that even your challenge that you gave to use today, Dave, donât write tests for three months, I think you can do that because you have so much experience now and so much test practice that when you stop writing tests, I bet your code is still pretty well-structured. You just have these habits that youâve ingrained and stuff. And I have played with this idea thatâs interesting. And I notice that when I do write code now, even if I donât write the test, I still set my code up and it looks like it was written by tests, because Iâm just thinking that way now. So, I think itâs easy for you to do that, whereas at earlier stages of development in programming, they probably do even more for you, because theyâre training you to set things up that way.
DAVE:
Oh yeah, absolutely. And thatâs why, you asked that question, the context, DHH and his keynote, and I was saying both he and I are in a position where we can say that because it works for us. And the people on this call all have experience and I believe that I wasnât being too radical I suggesting that youâve probably all reached that point where that kind of code structuring is pretty much automatic for you. Yeah, if youâre a beginner and youâre just starting out, then obviously, thatâs not the way to do it. And thatâs why this one-size-fits-all idea of, this is how you should do things, is clearly wrong.
SARON:
Yeah. Itâs not just being agile in building your apps. Itâs being agile in your own learning, too.
DAVE:
You got it.
CHUCK:
Iâve got to go. So, Iâm going to push us into the picks.
JAMES:
Alright.
CHUCK:
I know. Itâs horrible. I could sit here and talk to Dave all day otherwise. James, do you want to start us off with the picks?
JAMES:
Sure. I have a couple of Pragmatic Programmer inspired picks, and based on this discussion as well. One of the languages Iâve had the most fun playing with lately and learning new things from is Dart. I figured that out because I read the Chris Strom book, âDart for Hipstersâ. That is a Pragmatic Programmer book. And itâs fun and itâs light and you can go through it quick. And then playing around with Dart has been fun for me. And itâs taught me lots of new things. I enjoy the syntax more than I do JavaScript, which means I play with it more, which means Iâm figuring out more things and stuff. So, thatâs been a good brain-breaker for me.
Also, the Pragmatic Programmer developed PragPub a while back, their magazine. And itâs spun off into its own thing now but still co-done with the Pragmatic Programmers, I think. And they have, first of all their recent issue on Swift was really good, if you want to just learn quite a bit about Swift in one fairly cheap magazine. But the real pick I would say, they have a free issue that you can grab on their site thatâs teaching kids to code. And it has six articles in it, but theyâre putting a new article in it all the time, so one a month, I think. And anyway, the six articles there already in it are fantabulous. If you have kids, this is an absolute must-read. So, itâs really great.
And then just for a fun pick, there is an excellent TED talk by, I donât want to ruin it. The title of the TED talk is Gorgeous Woman Shakes on Stage and Crowd Goes Wild. So, Iâll just leave it at that.
DAVID:
[Chuckles]
JAMES:
But itâs not what you think it is and you definitely need to go watch it. So, thatâs it. Those are my picks.
CHUCK:
Alright. Saron, what are your picks?
SARON:
Sure. So, my first one is a documentary. I think this weekend I watched it for the fourth time. Iâm obsessed with it. Itâs called Something Ventured. Itâs available on Netflix. I think free on the site, as well. But itâs a story of Silicon Valley and different tech startups from the VC perspective. And it highlights the story and the beginning of Cisco, Atari, Apple, Tandem, and a bunch of other pretty well-known tech companies. And itâs really, really fascinating to hear how the business side of it got started along with the technology, too. So, if youâre interested in that, I highly recommend it.
Another that I just found out about yesterday is a gem called fake_braintree, which Trace Wax from thoughtbot told me about. And Iâm really excited to use it. When we use the Braintree gem, weâve just been stubbing out a bunch of its responses and itâs been a pain. And then he said, thereâs a gem that does that for you and we built it. So, if youâre using Braintree and youâre doing testing, I think you should definitely give it a try.
And the last one, which is more just for fun, is called the Bit-Shadow Machine. And it renders different particles entirely in CSS box shadows. One of the animations is of two cats, because itâs the internet and that is a must-have. Another one is of a milk carton running.
DAVID:
[Chuckles]
SARON:
Which is very exciting. And thereâs a couple that simulate gravity and other physics things. So, itâs just really pretty and really fun to look at. And thatâs all I got.
CHUCK:
Alright. Avdi, what are your picks?
AVDI:
I have so many picks. But Iâm going to try and pare it down and go through these quickly. First up on my list is an article I read recently called âThe Thermocline of Truthâ. And it deals with a particular organizational dysfunction in large organizations that rang pretty true for me, which is basically that there is a point in the levels of the organization that has levels, there is a point toward the top where the amount of information that penetrates through that point suddenly just drops off really fast. And itâs a great explanation of why a lot of projects are on schedule until right at the end where suddenly, theyâre six months off schedule.
This is going to seem like a really weird pick, but one of my picks is XML.
JAMES:
Yeah, thatâs weird. [Laughter]
DAVID:
I can either do that or not write tests. One of the two. [Laughter]
AVDI:
XML is a terrible format for configuration. It is a terrible format for data interchange. It is a wonderful format, oddly enough, for marking up documents. And I spend a lot of time working on my digital book binding framework called Quarto. And I built it around a core of doing transformations on XHTML 5 documents. And that has helped so much. A lot of reasons I shouldnât really get into all of them right now because it would take a while, but XML is rich and flexible enough that pretty much any input format I can translate into it in a way that isnât lossy, which I canât say about a lot of other formats.
Itâs easy to put information next to other information even if they come from disparate sources without them interfering with each other, which is hard to explain but it's true. Things like namespaces and flexible XPaths and stuff like that make it possible to add new information to a document without breaking your old processes because they can basically just ignore the old information. And also, a lot of the tools that have built up around it just make working with it, doing semantic transformations on it, really, really easy. Nokogiri and CSS selectors and XPath selectors and stuff like that just make it so easy to do transformations on it without worrying about breaking text formatting and stuff like that.
DAVE:
XSLT of course is a functional and pattern matching programming language.
AVDI:
Yes, probably the worst syntax for a functional and pattern matching programming language ever, ever devised.
DAVID:
[Chuckles]
AVDI:
I think itâs almost an answer to the challenge can we make a functional programming language that has a worse syntax than Prolog? But [chuckles]
DAVID:
So, itâs the Befunge of functional programming? [Chuckles]
AVDI:
But yes, it is actually, yeah, XSLT is very powerful. I donât use it. I mostly just use transformations in Ruby using Nokogiri. But Iâve thought about using XSLT. But yeah, there are a lot of really neat things you can do with it. There are other cool aspects of it like the fact that it has a well-defined canonicalization and you can canonicalize two documents and then see the things that are actually different between them rather than the things that are unimportantly different between them. A lot of cool reasons that XML makes a ton of sense for documents, not really for anything else.
TorGuard, thatâs another pick for me. After the Heartbleed fiasco, I decided to take another look at anonymous VPNs for when Iâm out and about and logging into public Wi-Fi networks. And I did a little bit of research, not a ton of research, and decided out of the ones that were out there to pick TorGuard. And itâs worked pretty well for me. Basically what it does is you set it up on your computer and turn it on and all of your data use goes into a wormhole and then pops out somewhere else in the country that youâre in, or even somewhere else in the world. And itâs very anonymous and very secure and keeps you from exposing your stuff on the local Starbucks Wi-Fi. There are a lot of options. Some of the reasons I picked TorGuard were that it was relatively inexpensive, very cross-platform, the tools that they offer are for everything, and theyâve got very good ratings from some of the organizations that classify the security and privacy guarantees of these various anonymous VPN services. So yeah, TorGuard.
One more, real quick. The unitwise gem. There are lots of Ruby gems for representing physical quantities. This is one of them. But itâs a pretty nice one. And itâs very comprehensive when it comes to representing all kinds of different quantities and compound units of quantities and stuff like that. Alright, Iâm done.
CHUCK:
Alright. Iâve got a couple of picks. I donât know if Iâve picked this before, but I use Chrome for my browser mostly and the Chrome Developer Tools are actually really, really handy. I was using a website and I couldnât find a button. And so, I actually went and used the Chrome Developer Tools to find it and then used jQuery to click it. And then I got everything that I needed out of it. So, Iâm going to pick the Chrome Developer Tools.
Iâve also been using in Chrome a plugin called Tab Wrangler, which if youâve ever been in that position where you have 10 million tabs open on a single Chrome window, Tab Wrangler will actually close them if you havenât used them in a while which is very handy. And you can actually get them back just by clicking on the Tab Wrangler icon and then you just click on the site and itâll bring it back. And so, thatâs been really helpful.
And then I also read this book. Itâs called âDad is Fatâ by Jim Gaffigan. It was pretty funny. And if you have kids, itâs hilarious. If you donât have kids, itâs probably still funny, just because you get a glimpse into all the wacky stuff that you donât realize kids put you through. And anyway, I really enjoyed it. I thought it was funny.
And finally, Iâve been using a task management system called Redbooth. It used to be Teambox. And Iâve been using it to manage my to-do list. Iâve also been using it for the stuff that I delegate to Mandy. And Iâve really been liking it so far. So, Iâll pick that as well. Dave, what are your picks?
DAVE:
So, about two years ago, I made the decision to move away from my desktop system where I had two massive big monitors and a Mac Pro under the desk and everything else. And I moved down to a 13-inch MacBook Air. And I have never regretted it. However, I did have envy for the vi, tmux people because they could manage their desktops way better than I could as an Emacs user, until I discovered MultiTerm. And thatâs my first pick. MultiTerm is a really easy way of basically creating shell windows inside Emacs. So now, I start up Emacs, I run it full screen, and that is basically my entire environment. I run my shells, I run my editing, I run my code, all from there. Nice tiled environment, very flexible, easy to use, et cetera, et cetera.
A second pick is one of those bend your brain ones. I remember I talked about writing Markdown as a kata. Well, I came across an implementation of Markdown in OCaml called, not surprisingly, OCaml-Markdown. Itâs on GitHub. The user is gildor478. And itâs worth it just to have a look at some of the ideas, in a way that captures the idea of parsing, because it starts off by defining types. And the types are basically what you would write as the BNF of Markdown. So, itâs actually showing you how types correspond to non-terminals in parsing, so thatâs interesting.
Making:
What Managers Need to Know about How Artists Workâ. And it basically describes how people like theatre companies put on a show. And when you think about it, as a project team we have deadlines and weâre in theory supposed to meet them. But every now and then we go over by a couple of weeks and everybody goes, âOh, thatâs software development. Ha-ha,â right? Well, if youâre a theatre company and youâre putting on a play, you have an opening night and you better damn well be ready by opening night. Otherwise, youâre going to be really, really embarrassed. And so, how does something as artistic and as soft as putting on a show manage to deliver a show on opening night and then deliver a show thatâs repeatable night after night after night. Itâs an interesting book.
DAVID:
Wow.
JAMES:
I havenât read that, but I want to now. [Chuckles]
CHUCK:
So Dave Brady, did I skip you?
DAVID:
You did.
CHUCK:
Do you have some picks?
DAVID:
And in the interest of your time, I have three picks but I will do them as quickly as I can. The first one is to point out that yet again weâve had somebody on the show who refuses to plug his own stuff. So, I canât believe this isnât in our picks. But thereâs a book called âThe Pragmatic Programmer: From Journeyman to Masterâ by Andrew Hunt and some other guy.
JAMES:
[Chuckles] And some other guy. [Chuckles]
DAVID:
By Dave Thomas. And this book came out in 1999 and it immediately became like scripture for me. This book was revelatory. And so many epiphanies flowed from that book. If you havenât read it, it is not by any means out of date. Go back and read it. Everything is text, learn a new programming language every year, your information portfolio has a half-life of 18 months, itâs all still very valid.
And I highly recommend to people, pick that up and look at it.
JAMES:
Thank goodness for Andy Hunt.
DAVID:
Oh, yeah.
DAVE:
[Laughs]
DAVID:
So, my second pick is because I just mentioned plugging your own crap, Iâm going to plug my own crap which is my own blog, because it touches on something we talked about on the show. I wrote a blog post a few months ago called âTeach Yourself a New Programming Language in 21 minutes (Or 2-3 years. It Depends)â. And Iâve said on the show before that one of the reasons I got into Ruby was that it was one of the first languages Iâd learned in 10 years that required me to actually learn a new language. Because once you learn C and C++, you can go to Java, you can go to C#, you can go to gosh, Lua for crying out loud, and all you have to do is learn how it encapsulates data, how methods are invoked, and where the semicolons and braces go.
And Ruby is not a block-oriented lexically-scoped language. It acts like one, but you can break a lot of rules with it. And so, I highly recommend that. And that blog post, basically itâs a heuristic that I use to determine, is this a language that I need to just figure out, bash something out, and then walk away from? Or is this a language that Iâm going to have to really dig down in and learn. And I
present some use cases where one language that I discarded and it saved me years of grief by never learning it. And another language, Lisp, Iâve never learned but I get bitten by it every six months. And I really ought to sit down and learn the language.
Wars:
Immanuel Velikovsky and the Birth of the Modern Fringeâ by Michael Gordin. And the reason, Iâm picking the first two chapters of this book. The rest of the book, sure why not? But the first two chapters are worth the 10 bucks that you can get this on Kindle for. And basically, he talks about, there is a branch of philosophy that concerns itself with the theory of science. Basically, where do we get the scientific method from and how do we take a new idea in science and determine if it is pseudoscience? And we have a lot of rules.
And we talked about on the show about diving into something new, how do you tell early on that jumping into this language is just going to a waste of your time? And the answer is you canât. Not without doing a true longitudinal study. Thereâs no way. You can search the web for how to spot pseudoscience. And he goes through and he basically says, âOkay. Let me teach a little bit about the theory of science.â And he takes all of the points for identifying pseudoscience and he shows that without 20 or more years to look back on how the science has played out, itâs impossible to determine if something is pseudoscience in the moment when itâs first coming out. We talked about extreme claims require extreme evidence and that sort of thing, but it is everything from alchemy to quantum physics. When it first came out, it was impossible to distinguish it from a real science or a fake science. And some of the things that we have today, the jury is still out on.
And I want to give a caveat that the point of the book is not to say science is useless, because he does. He basically says the theory of science is we donât actually have a working theory of science. And heâs not trying to demolish science. Heâs trying to say, all of the things that you believe about the scientific method are based on beliefs. And those beliefs are based on tradeoffs. And every one of these has a point where thereâs a divide by zero error in that belief. And you have to keep those in mind as you do your experiments and as you move forward. And you have to be ready to be confronted by new evidence and learn and grow. And thatâs where Iâm going to stop. The rest of the book might be good. It might be awful. But the first two chapters are absolutely worth it. So, those are my picks.
CHUCK:
Alright. Well, thanks for coming again, Dave.
DAVE:
Hey, my pleasure. I enjoyed it.
CHUCK:
Alright, well I guess thatâs all weâve got. So, weâll wrap it up. Weâll catch you all next week.
[A special thanks to Honeybadger.io for sponsoring Ruby Rogues. They do exception monitoring, uptime, and performance metrics and are an active part of the Ruby community.]
[Hosting and bandwidth provided by the Blue Box Group. Check them out at Bluebox.net.]
[Bandwidth for this segment is provided by CacheFly, the worldâs fastest CDN. Deliver your content fast with CacheFly. Visit CacheFly.com to learn more.]
[Would you like to join a conversation with the Rogues and their guests? Want to support the show? We have a forum that allows you to join the conversation and support the show at the same time. You can sign up at RubyRogues.com/Parley.]