
Sign up to save your podcasts
Or


Kyle Simpson:
Show Notes:
“If you’re waiting until you’re already an expert on a thing to share it with somebody else, you’ve waited far too long because we missed out on the most important part which was the journey.”
"I want to inspire people to be uncommonly curious."
Resources:
Transcript:
CHARLES: Hey, everybody and welcome to the Frontside Podcast episode 50. I'm your host, Charles Lowell. With me, also from the Frontside, is Stephanie Riera. And with us today is a very special guest, Kyle Simpson, a fellow Austinite. We're going to talk about education and teaching JavaScript.
You hear this name everywhere you go. I remember when I first moved to Austin, back in 2009, I moved back to Austin, I went to my very first JavaScript Meetup and there was this guy sitting there doing some live coding on this crazy thing called LABjs which was just like mind-blowing stuff that was going on that was doing crazy on-the-fly modules floating. And this was like back in 2008/2009, so awhile back. And that was my first experience. And then just moving inside tech circles, he just like popped again and again and that’s just like the story. It seems like Kyle is like ubiquitous.
I was at Clojure Conf last weekend and one of the speakers actually gave a shout-out to Kyle Simpson. So, I don’t know Kyle if you do much Clojure, but you definitely have an impact, an outsized impact in the JavaScript community and outside the JavaScript community at large, all throughout tech.
It's really a pleasure to get to have you on the show. So, welcome Kyle.
KYLE: Thank you so much. It’s a huge honor to be here. I'm glad to be doing this in our home city of Austin. It's fun to actually get a chance to pull again with the Austin community because a lot of my work takes me on the road. I sometimes joke that I know more about JavaScript communities in other cities than in my own since when I'm home, I'm usually with the family. And when I go to meetups, it's usually in other cities. But it's fun to be here.
It's interesting you bring up that JavaScript Meetup, the original Austin JavaScript Meetup. It started in January of 2009. Actually Joe McCann, most people will know that name. He's kind of a rockstar in the Node community and one of the founders of NodeSource. I think he's up in New York City now. But he started the Austin JavaScript Meetup in January. February, I started kind of came on and we ended up kind of tag teaming running that meetup for the next couple of years.
In the early days of that, you're talking about LABjs, I remember that was summer of 2009. The early days of starting up a meetup when you have 5 or 6 attendees on a really good night, mostly consists of about a week before the meetup, "Oh, we don’t have a speaker. One of the two of us has to figure out something to speak about." So, I would often kind of take on that task and I would say, "Okay, what's something I'm interested in," or, "What's a library I could write that I could talk about something when I was coding?"
CHARLES: So that actually born out of the need to actually present something at the Austin JavaScript Meetup?
KYLE: Yes, actually LABjs, it was something at work at that time that I was trying to solve but I wasn’t really making a library out of it. It was just some code that I was toodling around with. I was like, "Wow, crap! It's 3 days before the meetup. I better come up with something to talk about."
So I wrote the very first version of LABjs to present at that meetup and I got a bunch of good feedback from people that were looking at it and saying, "Oh, that’s cool." So I kind of ran with it. That’s literally my first kind of major open source project. Most people probably originally heard of me if they’ve been around the tech world for a while, they originally heard of me because of that one.
CHARLES: Wow! I had no idea I was there.
KYLE: You were there for the origination. I was the unveiling to the world of LABjs.
CHARLES: It's like the Woodstock of JavaScript.
KYLE: Those were some early days of meetup stuff. You're like pick up a pizza and a couple of beers from the store on the way to the meetup and there wasn’t a lot of organization but we had a lot of fun. Now, the Austin JavaScript Meetup 6 or 7 years later is, it rocks! There's 50 or 60 people every single month that attend. There's been several change-overs of leadership over that couple of years but it's still fun to think about kind of helping Joe get that off the ground way back in 2009.
CHARLES: Yeah, that was fantastic. You’ve been in it a long time and that actually kind of brings me to one of the things that I'm curious about is you’ve been doing this for a long time. You’ve been writing JavaScript for a long time and yet you're very much connected to the Day 1 learners and the people who were coming in just kind of from at the very bottom floor. And one of the things that I find in my interactions with the people who are starting out or people who are beginning is that it can be very difficult to know what's appropriate to teach a style that’s effective or teaching them because you don’t have that empathy of you're so far removed from the experience, that struggle and that challenge of really clawing your way into programming. And yet that doesn’t seem to be an issue for you or maybe it is. I'm just curious, one, do you perceive that as something that you have to deal with and how do you do it?
KYLE: I would say that part of the way that I'm able to keep a pulse or a finger on what it’s like to first start learning something comes from my own learning style which is that I, to learn a thing, I can't follow tutorials. As a matter of fact, every time somebody comes up with a new major awesome tool or framework and they put out this great tutorial and everybody raves about it, I secretly have that huge flare up of impostor syndrome because I know that I will feel really dumb if I try to go through a tutorial and learn it in that fashion. That’s just not how I learn stuff. The way I learn stuff is very, very slow and methodical. It generally is taking a thing apart and trying to figure out what each of the different pieces is doing, understanding at that deeper level, and then reassembling the pieces.
The reason I mentioned that is because I like to describe my process of teaching and I really think this generalizes to people beyond me that it's my process. I think that my process for teaching is just to have a narrative journey and that it's all about a process. It's not about a single event because I don’t think that learning is transactional or I don’t think it should be. I think learning should be a process.
And so, for me, that process starts with an initial thing that I'm looking at. I get an idea of what it’s about, the problem domain that it's in. I probably develop an instant sense of 'ooh, I don’t really like that' or 'ooh, that’s kind of interesting'. But if I'm going to learn a thing, it's not going to come through a tutorial. It's not going to come through reading a Read Me and being like, "Okay, I'm good to go," and I can sort of copy and pasting. For me, it's going to take, in some cases, reinventing parts of it as I put those pieces back together so I can really understand the choices that were made. I do a lot of reading of somebody else's source code.
As an example of this ongoing journey that I'm learning, I was recently at a conference and I heard a discussion of Redux. And of course, Redux is something that tens of millions of people, I mean everybody seems to be an expert on this stuff and I don’t know Redux. I don’t know React. I don’t spend a lot of time at that layer of the stack. But I was listening to a talk and I was thinking, "Well, that sounds interestingly similar to the stuff that I was playing around with back in 2010." It's kind of event oriented and single source of truth for the model and stuff like that. "That’s cool. I should go and learn that more." So, that’s on my pretty near future to-do list to kind of learn stuff. And there's a really good chance that that process, that journey that I go on to learn about Redux is going to spin off at least some sort of code that I play around with, whether that’s using Redux or writing something kind of like Redux to show off how I've been thinking about the idea. And then I’ll probably write about it. I know for sure that I'm going to be mentioning it in one of the chapters of my current book on functional programming. So, I'll be talking about it, at least a little blurb about how it fits into the overall scheme of things.
And then probably eventually once my journey has gone a little bit further, eventually there'll be some kind of class that I spin up in a module or in one of my classes that I talk about Redux and where that comes from. And that’s not because I've been on the high training. As a matter of fact, it's the opposite. I'm the latest adaptor for most of these things but that is a very long slow methodical process for me to learn something and then turn around and try to teach it to other people.
CHARLES: Is the idea then that you want to kind of share that journey that you’ve taken or try to encourage the next learner to take a similar or different journey? How do you structure that learning once you do decide to package it up?
KYLE: The structure of the journey -- I think that’s an interesting way of articulating the question. What is the structure of the journey? And I would say that the structure of the journey generally, from my perspective, starts from understanding a concept, the why behind the concept, what is the problem I need to solve, and what is motivating solving the problem. And then it moves into the how are we going to do it, what are the possible ways to do that, and that really is the part of that process that you spend most of your time digging into and understanding the deeper level of the thing. So, not just using the library but understanding really how it does it and the choices that it made. And then it moves to the what. And that is inverted from the way most people's learning seems to go about because people learn most typically by, "I find the cool thing because it was in some newsletter that I read about. It seems like it would help on my job project, so I dropped the thing in, put in a couple of the snippets from the Read Me and it's working great, and maybe someday later, I'm going to go back and dig into it a little bit." I'm completely reversed.
So, that’s my structure for learning and I recommend that people, at least from time to time, take a similar path. It doesn’t have to be exactly that way, but take a similar path to breaking down the learning. I'm sure as we go along in this discussion, I'll be able to elaborate on that more. I don’t want to just churn on and on forever. But I really do think it's important for people to dig in deeper.
So my process is that and the way that I teach is to take people on that journey with me. The way that I teach is to say, "This is the journey that I'm going through. This is the stuff that I understand."
For the listeners that aren’t teachers, there's some interesting -- I don’t want to get too much into the weeds about teaching -- but there's something interesting about teaching. There's this fancy word called Pedagogy which is not the thing that you're teaching but the strategy that you want to use to teach it, the narrative that you want to take a person through. And I spend an awful lot, probably more of my time thinking about that than about the topic itself. So, my practice is to use a lot of silly metaphors. Like I'm teaching promises and I talk about future cheeseburgers and stuff for those that have read or heard from me before, they’ll know the future cheeseburger. I use silly stuff like that because this stuff can be really dry and difficulty and I want it to stick in your head. I want the how to stick in your head.
So, I invite other people. That doesn’t mean that you have to take the entire journey that I did to learn a thing, but I really want to inspire people to learn at that level to be uncommonly curious. And I hope that when they see that I've done it and that I'm transparent about how my process works, I hope it inspires other people.
CHARLES: Yeah, and I think wrapped-up in that is tied back to my usual question is because you yourself are in fact you're going through this process, it's very easy then to empathize people who are going through the same process. I really like that.
KYLE: And I think everybody should look at the process of getting up to speed on the thing as an opportunity to go on that journey and to document and share that journey with others. You don’t have to have the word 'teacher' in your job title to be a teacher. I think all engineers should be seeking to go outside of themselves and to explain things, if for no other reason than the purely selfish reason which is you learn it better by re-explaining it to somebody else, but all boats will rise with the tide. And so, I have taken, for years now, the perspective every time I learn a thing, I'm going to turn around and share it with somebody else. It's exactly the same thing that’s interesting and almost ironic that we started our discussion today about that meetup and about LABjs. I was learning a thing and figuring out a thing and I turned around and shared it with other people and it turned out to make an impact. But the impact isn’t the important part. The important part was the journey, it's not the end goals.
I was always tell people, "If you're waiting until you're already an expert on a thing to share it with somebody else, you’ve waited far too long because we missed out on the most important part which was the journey."
STEPHANIE: Kyle, you touched on something that I wanted to ask you about. You talked about the first phase being understanding a problem, and then the second one being how do we fix this. And last week, I believe, CodeNewbie has her own podcast. And she released a post on Medium and it's called 'I Don’t Belong in Tech'. And she talks about how her instinct is to understand the problem versus solving it. It seemed like she feels she is an outcast in the tech community because most people are really excited about solving problems and she doesn’t feel like she is solution-oriented. And I kind of wanted to ask you, is that the case? Do you think the people that excel in programming are people that are just naturally excited about solving problems? And if that’s not the case, then what do you recommend for people that may not think in that fashion, they don’t intuitively feel like solving problems and they feel like they approach it in a different manner? It seems like people have different learning styles.
KYLE: I agree completely that people have different learning styles. And that question you just asked is so rich with so many things to mind. So, I'm excited to dig into that a little bit.
I 100% agree that people have different learning styles and I think that it is why it is important for there to be people in the community who are spending their time and attention thinking about teaching and about improving educational processes. I do not think that curriculum teaches itself.
And I'm somewhat suspect of the movement that we have as an industry towards almost praising or taking it as a badge of honor the label of self-taught. It's almost become its own cult that you're a self-taught person versus somebody who came through it from a more traditional path where a person was carefully thinking about how to present to you and how to teach you whether that was at a university or a tech school or mentorship or any of the others. People that are self-taught often wear that as a badge of honor. It's almost a rite of passage that you got to a level of understanding and experience and expertise because you boot strapped yourself up as opposed to the more top-down approach.
And I am suspect of whether or not that’s healthy for us to suggest to people that there are these two factions. It's kind of like the old Dr. Seuss book of the star bellies and the non-star bellies. I have the star belly because I got my Computer Science degree. And if you know that book and if you don’t know the book, you should go look it up. But what happens in the book is at some point, there's a flip and now the people with stars are the excluded ones and the people without aren’t.
So I don’t think it's healthy for us to promote the idea that we need two entirely different approaches that there's a person who can only be a self-taught and that’s a thing, and then there's a person who gets more formal education. I really think it's important for people to spend time thinking about how stuff should be presented and not just throwing information out there for people to learn themselves.
This is kind of a crazy metaphor. But if you had a one or two year old kid and you wanted them to learn to swim, the developer mindset often says, "Well, just throw them in the deep end and they’ll figure it out." But that isn’t how we actually would teach them to swim. We would be very, very patient, very, very cautious with them. We'll start with the shallow end, there being an adult there and they would guide them through that. And I think there's virtue in having some of your learning even if you're one of those listening that does value the whole self-taught thing or that has worked for you in the past. I think there's also value in people going through a more formalized process. Like I said, there's lots of different channels for that modality. But I think the formalized modality has value to it. And of course, that’s what I spend my time thinking about.
I put out a lot of information - my books and my training videos. There's a lot of that material available for people to self-teach but I really hope that what that does is not encourage people to stay disconnected but rather, to attract people to create relationships around learning because I think relationship-based learning is the most effective modality for leaning. And we've proven that for thousands of years in lots of other parts of society, but we haven’t really taken that to heart in the developer world, and I think we need to more.
You're right, going back to the original question that there are lots of different ways that people learn. I know CodeNewbie. What's interesting about that premise, I share a similar perspective on those that want to learn to solve a problem versus those that want to learn to figure out how to solve problems.
I have a statement that I make which I will preface with I understand that sometimes it can be a little bit off but I hope that listeners will take this from the spirit that I'm trying to give it in. I think that one of the things we can do is begin to think a little bit more about what we're doing even though all of the other structure and process scaffolding around us incentivizes and encourages the opposite.
I think what we see is that the developer-oriented mindset typically is more interested in first solving a problem and maybe later understanding it. Whereas I think the engineering mindset -- for lack of a better label, I'll call it the engineering mindset. That’s my bias because I came up through a more traditional engineering CS degree. But I think the engineering mindset, the one that most people would say is heavily focused on problem solving and that kind of thing. I think the engineering mindset seeks first to understand the problem and maybe later solve it.
If you have developer mindset that wants to solve a problem without really fully understanding it, I think one of the outcroppings of that is the churn that we see in the development community. We see people constantly every two or three years trying to go recreate a whole new stack of things because we're saying, "We need to do this thing differently." And I have seen that cycle four or five times in my career.
And so, I can say with pretty strong certainty right now that somewhere in the world, there is a guy or a girl that is a 16 year old that is working on what is going to eventually replace React. I don’t know what it is, I don’t know who the person is, but I'm pretty sure that we're at some point going to say, "Wow!" And when that shift happens, we're going to come back and think to ourselves, "How could we have ever thought that React was the most amazing thing in the world," and we very quickly forget.
So, one of the outcroppings is that continuing cycle because people are seeking to fix problems as quickly as possible and not everybody takes the time to really think about it. The authors of those tools, they think really deeply about these problems. They think so deeply about them. I am amazed the kinds of thought that goes into creating one of those frameworks or libraries. And I have a lot of deep respect to the Ember community, the React community, the Angular community. Those people spend a lot of time thinking about those problems. But the people that use them, use them as tools to get their job done honestly and earnestly so. But they very rightly focus on what can I get done with React rather than 'can I understand what React is really trying to do and use it to its best ability'. And we incentivize that. We incentivize that by saying that the people that advance at work, the people that become the senior developers at work are more likely the people that shipped more code. They're more likely the people that closed more bugs.
And one path to getting there is you're just a really quick coder or you're one of those mythical unicorn 10x developers. But a lot of people aren’t. I'm certainly not. I am not a fast developer. I'm one of the slower developers. I am very, very careful about what I write. So, I can't survive in that environment where I have to advance because I can write code quickly. Rather for me to survive in those environments, I advance or up my stature, if you will, because I understand the thing deeper than anybody else.
And I think there's places in the workplace for both, so I'm not disparaging those that write a lot of code quickly. But one of the outcroppings of writing code quickly if jumping as quickly as you can to solving a problem, is that you often times find a local maximum. A mathematic theory about -- just visualize a curve kind of like the landscape of hills. If you're climbing a hill as quickly as possible and you get to the very top of the hill, it might not have been the tallest hill that you could have climbed. But you got to the top of the hill really quickly and you got the next promotion, you went on to the next thing. So, I think those value.
Sometimes in your career and some people in the community who want to take a step back and understand a thing deeper, dig into a thing deeper, and I encourage people to have that as part of their toolset, that they would be that uncommon level of curiosity. Take a moment and by a moment I mean a couple of months, maybe a cycle at most of six months, take a step back from the just everyday churn of shipping a feature and fixing a bug and making the button blue, take a step back and say, "What are some of the things that I have been touching or I have been hearing people talk about," and dig into that thing and learn it. And learn it really deeply and really understand it, and maybe reinvent it if you need to. But really deeply get it. And then kind of resurface and look around and say, "All right, let me find the next thing."
And so, I think those cycles are healthy for people. And I think the engineering mindset should be something that each of us strives to adopt at least some in the workplace as opposed to being almost drunk on the idea that the best developers among us are the ones that ship code the quickest.
CHARLES: I think also too there is like if you do take the time and you then make that investment upfront, it engenders a lasting speed. In the same way that if you look at a child taking its first steps which is kind of the initial solution of a problem, it takes intense concentration. And it takes all the muscles or trembling and stuff just to coordinate the balance to take those first steps. But then once the child kind of understands the process fully -- like none of us, at this point in our lives, think about walking. It's just something that we do naturally.
But because the human brain is wired at that point to take whether it's walking or any other kind of motor skills to really understand the motion and rewire the brain optimized for that motion so that it becomes second nature, so that you benefit from that again and again and again. And I feel having spent a long time in the industry seeing the speedups that can actually be gained by doing it slow. In other words, you expand that understanding to fill the room and then the door is only a few millimeters away, if that makes any sense.
KYLE: I think it does. And I think for those that are listening just to address what questions may be popping up in people's heads because as a teacher, you learn to anticipate questions ahead of time.
So I can see, even from our discussion so far, that somebody may be asking, "Okay, you're talking about some really nice theory here, but what about the practicality of it? What are the benefits of the thing? I don’t have time to go learn React but I can get my job done by applying React to my business process." So, I think there are some practical things that we can point to that that come from being that uncommon level of curious, that deeper and slower and more methodical learning.
One of those, I'd like to say -- and people always kind of smirk at me when I say this -- I call them getify's laws. They're just statements that I make. They're statements of my opinion and really the only thing that I'm an expert on is my own opinions and I'm never at a lack for those. It's just an opinion but I believe that you can't hope to solve a problem if you don’t first understand it. Or to put another way the getify's law - if you don’t understand why a piece of code works, you have no hope of understanding why it broke and how to fix it.
So we do a lot of code that works and we don’t know why. I would say probably the majority of code that gets shipped were just sort of only kind of tenuously understand it. And sometimes it's really tenuous. Sometimes it's house of cards development where you build a thing and you're not really quite sure why it works but you put a comment there that says 'don’t touch this' and 'don’t break it' or whatever. And then we back away and hold our breath and hope that it stays in place. That is a way to ship code quickly.
The agile mindset has permeated so deep down that on every line of code we're thinking [inaudible], we're thinking, "Just get the thing working and get the test passing and then we'll worry about whether it's the appropriate way to solve the problem. We'll worry about that later." Many times we don’t get a chance to worry about it later until there's a fire, until something's broken. And that fire could be that bug or that brokenness could be it's not doing what it's supposed to do or more often, that fire is it's doing it but it's impossibly slow, it's impractically slow. And now, we have to go back and think, "We thought we only had five pieces of data to ever work with, but now we have 50,000 and the algorithm completely falls apart. We can't do an [inaudible] scan anymore," or whatever.
So that very narrow myopic short term mentality can be effective for people to get stuff shipped and to advance in their jobs, but it falls apart when things start breaking. If you're talking about a car and you said, "I don’t need to know how a car works, so I can just drive a car." And that’s entirely true. But if we took that to its logical extreme, you could say, "I don’t even need to know that my vehicle runs of gasoline or electricity," or whatever. "I don’t even need to know anything about the liquids that go in that make my car work. I just sit down behind the driver wheel and drive and it works." And that will work until your gas tank runs empty. And then at that point, you have no idea how to fix your problem. So you're going to have do some reading and worse, you're going to be at the mercy of somebody else.
Having an instinct, having a clue about something about what's going on into the hood is pretty important when we go off the happy path and start trying to fix problems, whether that is fixing bugs or improving performance. Those are, I think, some very important practical takeaways that come from some people some of the time being the uncommonly deep learner.
Just for fun, for my son in his school, I've been working on building a game that he's doing as part of his school through this Mathematics competition, I've been building a computerized version of this game. And those that have been following my Twitter have seen some interesting tweets about that. But I've been building an AI, a strategy turn based AI so that you can play against the computer for this thing. Tackling that requires you to kind of really understand or at least be able to fiddle your way through some deeper "CSC" kind of topics. But I got it working and it was too slow. You have to wait for the computer for 20 or 30 seconds for it to figure out its next move and that’s slow. So then I started thinking about how I'm going to optimize this. Do I need an object pulled to pull stuff in and be able to reuse arrays or something? I was at a loss as to how to do that efficiently. I was completely lost. And so, I had to learn that thing. I had to think very carefully methodically.
If I had let some sort of artificial deadline and say, "No, you just got to ship the game," it would have worked but it would have been impractical. And so, taking that time to think about it -- actually, I finally did. It took me days but I finally arrived at a solution for managing, sharing references that actually works from a performance perspective. It is practical now. I think there are practical takeaways. It's not just all the theory behind being a deeper learner.
CHARLES: I've been thinking like where do you know where the stopping point is? Because the world is just packed with knowledge. When I was starting out as a programmer, there were people who just code assembly for fun and assemble their own microprocessors and stuff because that’s what they did when they were coming up. But all of that stuff exists like we're standing on it. We've kind of lived on the level of the city street but beneath that is the subway and beneath that is the power grid and the gas pipes and the hog water pipes and all that stuff. Who knows how much more layers of urban development lie beneath some of these cities that are certainly way more rich than Austin. None of that stuff is present here.
KYLE: I was going to say I didn’t know there was a subway. I wish there was.
CHARLES: Once I realized what the analogy was, I was standing in the Austin streets, I kind of transitioned to New York without telling anybody.
My point is that in the computer world -- let’s just keep it there -- let's say you're working with JavaScript and you're running on top of the browser. Most of modern browsers are written in C that are also using C libraries that are written on native platform tool kits whether it's OSX or Linux or Windows which then are written on top of these operating systems which then are written on top of these compiled assembly language that run on these microprocessors. It's a deep, deep ocean, so to speak. And we spend most of our time skimming around on the surface in our boats.
And so, I guess the question is how do you know when to stop and how do you know when enough is enough? Ultimately, there is a tension between a deadline and the amount of time that you're going to invest in learning. And I think that there are definitely -- I feel very strongly that it's skewed way towards the deadline and that we need to kind of pull that tug of war back in the other direction. So the question is then how far is far enough? Or is it just really until you feel comfortable?
KYLE: I see the world of what we do in computers and in software development as layers of a cake if you want to mix in a whole bunch of different metaphors here. There's lots of layers of abstraction that we create to utilize technology more effectively in our lives. And in a sense, the technological revolution from the 1940's onward has really been a story of adding layer upon layer upon layer upon layer just like a big tall cake of different abstraction because lots of different people need to eat at different layers. They need to get their jobs done, if you will, at different layers. There are people who need to get their job done the assembly language, the deep guts of your computer talking to the 1's and 0's kind of thing.
And then there are people that need to work in the C libraries. And then there are people that need to work in the operating system tool kits. And then there are people that need to work in the browser. And then there are people that need to work in JavaScript. And then there are people that need to work on frameworks. And then there are people that need to work on transpilers that build the frameworks that then get compiled down. So we just keep adding more and more layers because there's more and more people that were opening up the world to, to participate. And not everybody is going to play on the same level.
If your choice is to be a JavaScript developer, if your choice is to be a React developer, if your choice is to be somebody who builds those almost meta tools like the transpilers that go from one language to another, if you're a ClojureScript developer or whatever, my recommendation is that whatever layer of cake you eat out, whatever layer you’ve chosen to make your primary focus, I think you should be striving to become an absolute expert at that layer. And that is not a transactional thing when you just go watch the right video or read the right book and then you check it off. That will be, in most respects, a lifelong process. But I think you should strive to be as much of an expert at that layer as you can.
But to become an expert at that layer, one of the most important things is to begin to have an understanding, a level of competency at the layer below it. So if you're a React developer, having a layer of JavaScript below it means that you want to have some pretty good core competency in the JavaScript language. In a sense, that’s what my job is dedicated to doing is assisting people at playing at these higher levels at the frameworks and tools levels by understanding JavaScript more deeply. But if you're a core JavaScript developer and that’s all you do, you should have some competency at the layer below that which we might say would be the browser API level or maybe the C level and understanding something about how memory is going to get managed to let you have some intuition about that.
And so, the further you go down in the stack, you start to see that diminish but it never gets to zero. I don’t think there should be any engineer out there that aspires to have absolutely no knowledge whatsoever of what a processor is or what 1's and 0's are or any of that. But that might not be your everyday task. If that’s 4 layers removed and you have a lot less understanding of that layer, to be effective in your job, you should be an expert at your layer and be seeking to have a core competency level of understanding at the layer below that.
I think that’s how you start to answer, Charles, your question of how do you figure out where to stop is at this point in your career -- because many people will dance around and eat at different layers of the cake as they go. But whatever point you are at in your career now, be looking to understand how to eat all that layer of cake and then understand the one below it. I would say that would be the most effective strategy that I've come up with.
CHARLES: I like that. I like that a lot.
STEPHANIE: I want to become an expert in JavaScript. But sometimes I have doubts in my ability to "become a programmer" or think like a programmer. I feel like the people that excel in programming, and you could tell me if I'm wrong, I don’t know if you’ve noticed this as well or haven’t. But it seems like the people that excel at programming are the people that are naturally good at math. It’s like they think in terms of math. I don’t know if they're seeing algorithms in their brain or what it is. And I don’t know if other people relate to this as well.
But I'm a natural problem solver. I like problem solving but I don’t think in terms of math. And I've taken a lot of math courses for my undergrad degree. I took Calculus for Biosciences like two and a half times, and so I beat my brain enough to understand those concepts. But I don’t know if you have also seen that, if that is the case. And if it is the case, is there any advice for the hopeless programmers like myself that are not naturally good at math. But I am interested and I do want to be good at this.
KYLE: There's hope, Stephanie. There's definitely hope.
STEPHANIE: [Laughs]
KYLE: Again, lots to unpack here and I thank you for asking that question because I actually do have a particular sensitivity to the mindset that seems to come around between people - again, the haves and have-nots. There are people that naturally gravitate to or understand math and there are people for whom math has always been an opaque topic that they keep running into over and over and they haven’t been able to really fully engross themselves in or wrap themselves in. They haven’t been able to get it, if you will. And as an educator, I don’t teach math for a living. But as an educator, it deeply troubles me.
As a parent, my son, Ethan, is about to turn six. He's in Kindergarten for the first time, so it is right on the front of my radar screen to think about how we teach these things. And I want for everybody to be able to grasp important concepts like obviously reading is important, but Math is one of those core concepts that I think is important for people to not be intimidated by. And I think we do ourselves a really big disservice and have for many, many years by approaching the teaching of that topic as there's one right way to know how to do math. In a sense, I think, we're seeing a shift to know there's lots of ways to learn and we should embrace that. Just like we said there's lots of different ways that people learn. There's lots of different ways to approach. There's lots of different pedagogy, if you will, around approaching math and I embrace that idea that we should be doing that. I think we should be starting that with our Kindergarteners and working all the way up.
And I'm glad that there are educators that are thinking about that because my generation was taught that either you get it this way or you're just "not a math person". And I sat and sat alongside in my Science and English classes all the way through schooling even at University, I sat along people that were math people and on the other side of me were people that were "not math people". It's sad and it sucks that we would divide people that way or that people would choose to divide themselves that way because they struggle with math.
My sphere of influence right now is my two kids - my son, Ethan, and my daughter, Emily. I really want for both of them, whether they become math nerds or nor, whether they have a minor in math like I do or it's just a thing that they learn, I want them to not be intimated by that. I want them to understand it. And I hope that I will be able to, in the sense, partner with the educational system.
Our kids are in Austin IST Public Schools and they will be for their whole lives, as our plan, but I hope to, in a sense, be augmenting that by saying, "I understand that this is struggling for you, but let me help to at least not be intimidating, at least be a thing that you can grab on to and understand even if it’s not interesting to you, it won't be scary to you," because I have family members and I see it personally that have self-labeled and self-[inaudible] themselves as "not math people" and they struggle their entire lives as a result. And I don’t want that to happen. So, I'm glad I got at least a little chance to have some advocacy there to say I hope that people aren’t being that way and aren’t promoting patterns that treat people as either you know math or you don’t.
I was one of those people that gravitated towards math. But I can tell you for a fact that I do not use most of my math background on a regular basis as a programmer, and even if I try. As you're asking the question, I was doing some self-assessment here. What are the things that I know from math? Like I understand for example that a function is putting in an X value and getting out a Y value and when we plot that, we see a parabola on the graph. I get that concept. So, there's a tie in between the visual and the actual written out math for me. And I understand in calculus when we have the integral. I understand that’s the area underneath the curve. So, I get those concepts. But does any of that stuff actually play into my day-to-day work? Not really. Maybe a little bit about functions since I'm starting to be a bit more attuned to the functional programming these days, but it really doesn’t play into my job.
But there is a part of math that really does play in almost daily, and that’s what we call discrete math. That’s more of the computer science-y take on math. And discrete math is things like understanding number systems, things like understanding the difference between representing something as a binary or representing it in base 10 or hexadecimal. There are certain concepts that we talk about like Big O Notation - that’s one of those computer science-y concepts.
When I was writing this game AI, I had an intuition about a loop inside of a loop is going to perform worse than just a single level of loop. But I didn’t spend any time whatsoever actually calculating the Big O complexity of my algorithm. I just had some intuition about it. And the reason I have this intuition about it is because I took a discrete math class. So, if I could say anything to the people listening, for those that aren’t math people or for some reason or another didn’t really gravitate towards it, to be better at programming, I would encourage you to at least think about discrete math as an area to study to get some better understanding around, because I do think those things help.
But I don’t think that most of math, the stuff that most people struggle with, like algebra and matrices -- I was terrible at matrices. I hated them for some reason. I don’t think most of that ever comes in. I learned what an icon vector was but I've never once coded it. So I don’t think that you have to feel intimated coming at programming if you weren’t one of those "math people" but there are some parts of math that do end up playing quite a bit into the programmers' everyday life.
CHARLES: I think for me certainly whenever you have a particular problem, then that’s an opportunity to actually explore the math behind it. I think a lot of times we put -- there's this kind of inverse relationship -- we put the cart before the horse. It's like you got to learn math and then you learn the programming.
But it's almost like the equation ought to be reversed in the sense that it's like trying to -- let me just cast about for a random analogy here -- it's like learning the theory of fishing without actually living on the coast and going out on a boat every day. You can certainly study it and it can be interesting. Yes, we tie the line to the pole and we put it in the water but unless you actually have that problem of like, "Now, I'm trying to catch fish," you actually are connected to it in a way that’s going to help you understand what solutions work and which ones don’t.
I often feel like we frontload way too much on the theory. I feel it has to be connected to practice, I guess is what I'm saying. Because certainly my experience, I come from a CS background, but I didn’t switch to CS until my junior year of college. And that after I'd basically dropped out of school for two years to work at a startup. And I remember it made a lot more sense because I had this prior programming experience. It's like, "Oh…" Whereas, I think a lot of my classmates, they were kind of dumbfounded by, "What does this even mean? I don’t understand. I don’t understand how this connects to anything." But if you have that kind of experience, then the learning can come in hand with it but it has to be more of an organic process as opposed to one coming before the other. That’s my experience.
KYLE: I love what you're saying there and I want to build off of that to unpack some of my most recent passion and focus in the area of education and with developers because I really think what you're saying is the foundation is the same belief I have. So, I'm right there with you.
If you look at humans and the way humans have passed along information and skill to the next generation, if you look at that over the course of history, we have mountains of precedent around the idea that skills are passed along through the mentorship model. Some like to call it the master apprentice model. It's the more classical way to think about it. But just the more modern way is to call it mentorship.
For example, chefs. You would never suggest that the best chef at the best restaurant in town and the way that that chef got there, the way that that chef got to be the best chef in town and have the best restaurant was that they sat in a classroom and learned all the theory about how to bake a chicken. First, before going and baking the chicken, there's lots of ways that they could have gotten to be better but probably the least effective way would have been for them to learn all the theory upfront and then just go work in a kitchen for year after year after year after year and almost accidentally -- we call it the School of Hard Knocks -- accidentally learn all those experiences. That’s how a lot of people define experience is experience these mistakes over time getting practice making perfect. That does work and lots of people have done that.
And I certainly would say a lot of my story is that way, but I wish that I'd had a mentor. I wish that I'd had somebody like what happens with chefs to sit there and say, "I'm not just going to let you figure it out on your own and screw up a bunch of chickens. What I'm going to do is give you a little bit of information about cooking a chicken. Like for example, what the temperature of the oven needs to be, how to tell what the temperature of the chicken is to know that it's fully cooked, what materials you need and what utensils. But we're going to spend 10 minutes in the classroom talking about it and then we're going to go sit in a kitchen and you're going to watch me bake a chicken. And you're going to watch very carefully. And I want you to ask a lot of questions about what I'm doing and I'm going to talk to you about it every single step and the decisions that I'm making. And then I'm going to do that again and again and again and again. And over time, you're going to start to pick up on and glean some of my experience from observation. And then eventually, once you are starting to feel more confident about it, we're going to flip the tables and now, you're going to start baking the chicken but you're going to do it step by step methodically and I'm going to watch you and be very closely paying attention. And I'm going to ask you questions and I'm going to say 'why did you squirt that there and why did you do this and why did you turn on the oven right now'. And I'm going to ask you about that stuff and challenge you to make sure that you really got all the different pieces of what it takes to master this skill. And then I'm going to do that again and again and again. And after we feel pretty good about chickens, we'll go back to the classroom and we'll talk about cooking steak and then we're going to repeat this process over and over."
That is much more the picture of how that mastery of that skill is replicated in another person is that mentorship model. And we've seen that with stone masons and carpenters and plumbers and chefs and caterers. And on down the line through most of human history, we can see that that is how skills are passed along. What I think we're missing is that there's a lot of value to be gained by applying those models to software development. As a matter of fact, I think if you ask most developers, regardless of the skill level even if they were a senior developer -- although certainly the intermediate and junior developers are more willing to admit it. But I think if you really ask in their heart of hearts, almost all the developers would say, "Oh, I'd love to have a mentor to help me get better but I don’t know how or I can't afford it or there aren’t any available or I don’t know what to do," because we haven’t prioritized as our part of the industry making education more effective.
And so, when you talk about 'I need to practice a thing, not just know the theory', you're absolutely right. You're absolutely right that sitting in a classroom and learning a bunch of stuff which ironically that’s what I do. I teach corporate training classes, I threw out a bunch of information then I know as I'm throwing out that information, the vast majority of it isn’t going to be retained because the only stuff that will be retained is the stuff that somebody gets a chance to practice pretty quickly. And by pretty quickly, I think probably that horizon level is about three days beyond when you’ve learned it. If you don’t get a chance to really practice, and I don’t mean just the artificial stuff that we teachers come up with like a silly little toy examples and the foobar kind of stuff, I mean really practice in a context of something that matters and that you're thinking about it and you need to solve it. If you don’t get a chance to practice some of that theory within about three or four days, you're going to lose it.
So, I present to you a set of information in a week-long training course that you really ought to actually learn. And by learn, I mean more than just hear the theory but also practice it. You really should learn that over 12 to 24 months. But I give it to you in 40 hours because that’s, again, the industry incentivizes how quickly can I check off the check box then my developers learn how to become React developers or that we learned about JavaScript. Instead of focusing on how do I really get them to know it. And the only way to really get somebody to know it is to have somebody watching over them as they practice what was taught. You teach a little bit and you have a bunch of practice. And that practice can't be just the developer has to figure it out on their own and make their own mistakes and figure it out through Stack Overflow, it has to be monitored, it has to be proactively mentored. And they have to take a little bit of learning, a lot of guided practice. Pipeline that across, that’s how we make this educational process for developers become much more efficient, much more effective.
And so in a sense, what I'm trying to do is disrupt my own educational model and try to [inaudible] myself as a business by saying, "I teach it in the classroom but every time I walk out of that classroom, I feel empty inside," because I feel not just tired physically because it is exhausting, but I also feel empty inside because I know that what's really missing is that I just contributed to yet another transactional learning experience. But what really is important is for people to know that learning that is most effective is learning that’s relational. Learning has to be paired with people because at its heart, what we do as developers is a people game. It's not an 'instruct the computer' game. The 'instruct the computer' is a side effect of what we do in connecting with people and passing along information and skill and knowledge. We've got to do that because we are throwing all kinds of money and time and effort at figuring out how to make people learn better through books and videos and conferences and tech schools and the list just goes on and on and on. And it's good that there's a wide buffet for people to pick from, there's no question. But most of that stuff isn’t as effective as it ought to be, and that is why people have to keep doing it over and over and over again. They have to try all these different things because they don’t get satiated by picking the one right thing that they ought to have fixed.
I happen to be obviously very bias, but I happen to believe that a lot of the problems that developers face, a lot of the overhead of code maintenance and all of that stuff, it could be solved if people were trying to implement mentorship for developer education. And that’s what I'm trying to do. My recent efforts are around upending or reimagining the normal corporate developer training. Of course I still offer that. And if anybody wants me to come teach, I can still do that. But what I'm moving towards and building a startup to offer mentoring at scale because I believe that’s where we move it from transactional relationship. We make it about people and then we get a chance to really practice what we're learning. That’s how you take a person, and get them from being junior to being intermediate or from intermediate to senior is that they have to have practice. Would you rather them figure it out on their own and make lots and lots of mistakes or would you rather them be guided and monitored as they go through that process of practice? I think the latter would be a lot more effective.
CHARLES: For people who are excited about this, who want to figure out ways in which to engage in this relational learning, this can be a very expensive proposition especially for smaller companies. But even for larger companies, one of the things you're hoping to address is a way to make this when you say 'do it at scale, make it more accessible' in terms of those time and resources.
KYLE: In a sense I would be failed at the start if I didn’t feel like I had a model for scaling mentorship. If I was just on here and [inaudible] saying, "Hey, everybody. You should go mentor," and I had no way of doing that, then everybody will say, "Okay, that’s all well and great. Thanks." And as soon as this podcast ended, they'd just go on back to their normal day jobs and fix anything. I really do believe that there are ways to scale out and to make it effective. That doesn’t necessarily mean that the price tag is cheap because time is expensive. And what we're saying is you need expert time paired with your people to get them to where you need them to go. But I want to push back on the notion that expense makes things inaccessible, because I want to point out -- this is almost like I'm doing a customer pitch. But I just want to point out that there's an awful lot of things that we spend money on as managers of software development teams. For example, I've talked to managers of software development teams and they’ve said, "We probably spend 70% to 80% of our time maintaining our existing code and fixing bugs, and only maybe 20% of our time implementing new stuff." Some people listening would say, "Good lord, I'd love to have 20%. We probably spend 5% of our time on that and 95% on maintenance." So those numbers differ. But there's a lot of overhead associated with running a software development team. And one of my theories which I believe we will prove out as we scale this out, one of my theories is that if you want people to avoid having to come back and return on something. One of the ways to do that is to empower them with better education before they write that line of code. I think even though yes it will be more expensive to get your developers mentored, you will actually not spend more as a company, you will spend much less because you'll be investing that money much more effectively in the things that actually make them retain and get a chance to practice that. It also means that hiring will be cheaper because you'll know much more deeply what your company wants and needs and that will make it a lot easier to identify the right candidates. It means that the total cost of ownership of yourself will be vastly less. So there's lots of dollars here that I think we can pull that we are, in a sense, wasting or misappropriating to make it more effective to invest in mentorship. I think what we need is a process and a model instead of tools to do that, and that’s my mission. That’s my goal.
CHARLES: I am very, very excited to see that, because I know that that is something that one, holds the value. Here at the Frontside, we see as one of our core beliefs and one of our core aspects or mission is to level people up and make sure that they can improve themselves as a developer and improve the quality of the products that they develop. But it's definitely something that we've struggled with. So, I'm really curious and excited to see the outcome of this. So, we'll be on the lookout for it. Is it still under the radar?
KYLE: There's no company name to announce yet. There's no website or Twitter account. But I can say that it's been under active development now for four to six months. I have a team of founders with me and we are formalizing our process in trying to get funded for that. I hope within the next few months that there’ll be a much bigger announcement about where we're headed with it because I'm all in on believing that it's not just good enough for me to keep churning. I get emails and tweets weekly. I get a couple to maybe five or ten sometimes in a week of people saying, "Hey, I read your book," or, "I watched your Frontend Master's training video," or whatever, "And that’s awesome. I'd love it if you could help me with something. Could you spend some time? How much would I need to pay you to get a few hours of your time to sit here and talk with me?" And it pains me to get these kinds of requests. And the reason it pains me is because I would absolutely love to spend that kind of time with people, but that kind of time is so valuable right now. Time is so valuable because the process of mentoring currently is incredibly time intensive. It's very, very expensive to do this. And that’s why I think it's not done very widespread is because people haven’t figured out how to make it effective, from time and money perspective. And I know that pain personally. I have to turn people down and say, "I'd love to but I'm too busy because…" and then fill in the blank with a thousand things. I'd love to have that time.
What I really want is I really want to be able to do this effectively and to scale it, because people are hungry. They want to learn. I believe that what we need to do is unlock that hunger, not necessarily inspire people. I think we need to unlock and empower that hunger that people naturally tend to have to want to get better at what they do. And I think this is one of the ways that we can help people get better.
STEPHANIE: I also wanted to point out that for companies that are interested in doing this, not only do junior or apprentices benefit from this model but the senior developers also benefit from this. I have personally seen someone on my team, Alex, from all the times that we've been pairing and talking about JavaScript concepts, I have seen an exponential growth in just the way that he explains things. And they do say the one that does the teaching does the learning. And I have seen that in him and I think it's something that every team could benefit from.
KYLE: I 100% agree. And to build on that, I would say what we're really doing with that is we're helping people find more purpose for what they do. And who doesn’t want to have more purpose and more meaning? We're giving people a way to -- as I said, all boats rise with the tide. We're giving people a way to help other people around them. And it doesn’t have to be like some macro scale thing where you become an international conference speaker. You don’t even have to speak at your local city meetup. You can just pair with the person next to you and help them learn the thing that you're learning, and then learn from them. And you’ve made the world better, you’ve made the workplace better, you’ve made yourself better.
It goes back to what I said before - I think we have to get better. The biggest thing that’s lacking from us developers right now, in my opinion, the emotional muscle that we need to work on the most is recognizing empathy for our fellow human beings for the people around us because I really deeply in my core believe and my DNA I believe that what we're about is people and not about the code that gets written as a result of this connections.
If we can focus on building the relationships around this. You don’t have to go pay for the service of the startup that I'm building. You can implement this just like what Stephanie just said, by looking for opportunities whether it's coding, whether it's code review used as a way to learn, whether it’s doing a brown back lunch, you can look for ways to build the culture of learning into the workplace around you and people will benefit from that. You will inspire people to get bigger and better as a result of providing that environment.
CHARLES: Fantastic! If people need to get hold of you, Kyle, what is the best way to reach out to get in touch?
KYLE: The best way to get in touch with me is to find getify. That’s how people know me online. That’s my Twitter handle, that’s my GitHub handle, it's also my Gmail address. So, [email protected]. Reach out to me in any one of those channels, probably through Gmail is best. If you’d like to talk more about education, if you'd like me to come and help your team, I would love to come and do a workshop and then build a relationship with you or we can begin this mentoring process as I spin that up. If you're interested in that, if you're hoping to learn from some of my resources, you can check out my book series. I have the You Don’t Know JS books that I wrote that many people know about. That’s up on my GitHub. I'm almost done with my next book which is Functional Light JavaScript, you can check that out on GitHub. All that stuff you can read for free. You can also buy it if you'd like to -- and I always appreciate people if they want to support me. But check out my books. I have training videos available on FrontendMasters.com. I think I have nine courses and we've already scheduled a few more that I'm going to be teaching later in the Spring. That’s a fantastic platform. There's 50 or 60 really incredibly well-versed experts that are teaching on that platform. So, check out Frontend Masters. Some of those videos are also out on Pluralsight. You can check them out as well. Check out books, check out the training videos, get in contact with me if I can help you in some way with training at your company. But I would love it that even if that isn’t the channel, if you take nothing else away from the podcast, go talk about learning stuff deeper within the workplace. That will be the best takeaway that we can get from this podcast.
CHARLES: Yeah, definitely. I think the things that we talked about here really apply far beyond JavaScript and even really far beyond the technical trade of programming.
All right, that’s a wrap. Bye everybody!
Jamison Dance:
Show Notes:
Resources:
Transcript:
ALEX: Hey, everybody. Welcome to The Frontside Podcast Episode 49. I am your host, Alex Ford, developer at The Frontside. With me as well is Chris Freeman. Chris, do you want to introduce yourself?
CHRIS: Hi, everybody. I'm Chris. I'm also a developer at The Frontside.
ALEX: We have a really special guest for today. I'm really excited. Jamison Dance is with us.
JAMISON: Hello.
ALEX: Jamison runs Fivestack Software Consulting Company, hosts Soft Skills Engineering Podcast, organizes React Rally Conf, and spells 'array.length' incorrectly sometimes. Is this true?
JAMISON: It is true, yeah. I think I have a special ESLint plugin to yell at me now when I do that or something. But that has caused some pain in my life.
CHRIS: Oh, that was very brave. Thank you.
ALEX: We're going to be talking Elm today and writing better JavaScript with Elm. This is really exciting for me. I've gotten the chance to dive into the Elm tutorial a little bit, which is an absolutely beautiful tutorial if you haven't checked it out yet.
JAMISON: Yeah, Elm is a programming language that runs in the browser and compiles down to JavaScript. It's a pure statically-typed programming language, which if that doesn't mean anything to you, don't worry. The take away for you is that Elm tries really hard to make it easy to write programs that don't crash and are easier to refactor and easier to work on and maintain, basically.
CHRIS: And Elm is a language in of itself but it is pretty specifically intended for front-end development. Is that correct?
JAMISON: Right now, there are some long term plans, but yeah. For now, it's front-end for building UIs and applications in the browser.
ALEX: I heard about Elm. When should I check it out? Who do you see jumping into this language?
JAMISON: I think it's aimed at people that want to build robust applications which is so vague, it sounds meaningless. Maybe I talk about what attracted me to it. The two things where I was interested in functional programming -- that's kind of like the technical language wonk, like geeky side of it. But the other side is I've worked for a while in some fairly large JavaScript applications and I've seen the nightmares that I can create for myself In just building something that works and is just really hard to work on.
So the idea of a language that's focused on keeping your productivity high as the application skills and as the team skills was really attractive to me. Like the bio says, if I spell array.length wrong, sometimes I catch it, sometimes I don't, then my program breaks. Elm has a compiler that runs on all your code and basically, make sure that your code cannot crash. You could still have bugs and you can still just make your code do the wrong thing but it helps eliminate whole categories of errors. It just makes them impossible to create in Elm.
If you're interested in functional programming or if you're interested in just building stuff that is easy to work with, like this kind of this curve of productivity over time where some environments and some languages start out really high, it's really easy to build something fast at the beginning and then maintaining it is just really hard so the productivity drops over time. Elm is trying to kind of flatten that out so your productivity stays high throughout the lifetime of your application.
CHRIS: I actually have a question about that. I'm planning on bringing this up later but you gave me such a good segue that I feel compelled. You mentioned that one of the things that is nice about Elm-type system is that it helps scale an app, especially when it comes to a team. My experience there are kind of true different facets to what scaling an app across a team looks like.
One is the categories of bugs that something like [inaudible] compiler helps you catch. But the other is, and this is totally coming from the fact that I use Ember every single day, that conventions also help scale across a team. I'm curious like what I've looked at with Elm, it looks like they definitely have the type system there and error messages there to help quite a bit. But I haven't seen conventions arising yet in terms of a lot of things, about how you build a front-end application.
I'm curious, is it that those conventions are there and just haven't found them yet or they're still very much in development? Or is that not even really a goal for Elm in the same way that it might be nothing like Ember or Angular.
JAMISON: You mentioned first the kinds of bugs that the compiler will help you catch. I want to talk about that really quickly. If people aren't familiar with what a compiler or type system will do at build time, it checks all of your code to make sure that all of the variables and inputs and outputs from functions match up.
So you say this function takes in an 'int' and returns a string and it will go find everywhere that calls that function and make sure that they're always passing in an 'int' and return it, so that it always return a string. It kind of does that throughout the whole flow of the program. It eliminates those kind of areas where you just get the interface wrong.
The program is huge. You don't remember all the inputs to a function so you just like passing an object when it expects a string or something and then later on it will explode. You don't get those errors with Elm which is the first kind of thing you're talking about.
You mentioned that conventions and I'm not on the Elm core team or whatever. I don't have any special insight but my experience is Elm very much wants to create strong conventions around how you build applications. The Elm architecture is kind of a way to build front-end applications that is basically baked into the language. There isn't like a UI framework for Elm. It is Elm. That to me is a huge point on the strong convention side. There isn't like an Elm fatigue because there isn't a choice between a hundred different UI frameworks in Elm.
Some patterns around how you build apps this small, I think are still being established but I think there are strong conventions already and the trend of the Elm community is towards picking strong conventions. You’ll see Evan, the creator of the language, He'll talk about how he wants to have one really good library instead of 15 overlapping libraries of varying quality to solve the same problem.
Elm has conventions already. The places where it doesn't have strong conventions are I think places that will get filled in but the goal is to pick up the language and you get everything you need to build an application attached to it that's all kind of figured out for you.
CHRIS: It's been interesting you mentioned the thing about it's better to have one good library, rather than 15 libraries of varying quality. I've seen that a little bit in practice. One of the things that I started looking for pretty early on when I was messing with Elm was what client-side routing look like. There are a couple of different routing libraries. But if you look at them, you can see that they're actually kind of this progression, like you can see how they have built on each other and they're kind of like building up the stack of abstractions toward one final solution.
It’s very interesting because it's not like those other libraries that are still there. If you really wanted to use just a regular URL parser and build your own, you could. But you can also see this development towards something that anyone could take off the shelf and start using.
JAMISON: Yeah, and Elm has been around, I think it was 2011 when it first started. But really, Elm as like a popular thing that people hear about and use in production is only a couple of year’s old maybe. There are still some things that are evolving like that. I think you're right that they're evolving towards convention instead of, in my mind JavaScript values, the proliferation of tons of different ideas and just wild exploration. Elm seems like it values a little more consensus and aligning the community behind one solution. I think it's happening, if it's not there yet, it'll get there, I guess.
ALEX: I have a question about writing test in Elm and how that feels different than writing tests in JavaScript because the way I find myself writing tests right now is I understand the language to be fragile and I understand some frameworks have some fragility because of that language so I find myself writing really strong tests that are easy to break. I imagine that maybe in Elm, that's a little bit different with this very strong convention that you're talking about.
JAMISON: Yes, some of it is around not having to be as defensive in your testing. If you wanted to get really, really down in the nitty-gritty in JavaScript, there are just an incredible array of different inputs you would have to test to make sure someone doesn't pass in like [inaudible] to this function where you think it's an array or whatever, like you just don't have to write any of those tests because the compiler catches that.
We haven't talked about purity at all and this concept in functional programming where your functions can't cause side effects. They can't just go make a network request or write to disc or console.log like right in the middle. The functions take an input and return an output. You can do that in JavaScript. You can write your functions that way but because that feature is built into the language, it's the only way to write functions in Elm which makes it really easy to test functions because you just pass them stuff and you check what they return.
In my experience, that makes them easier to test. You still build UIs and you still make network requests so you still construct some HTML at some point in your program. You can if you want to test that the HTML looks right or that elements have certain classes and stuff. But I guess what I'm saying is the tests feel like they're testing the behavior more than the edge cases when I write tests in them just because the compiler eliminates a bunch of weird edge cases you don't have to worry about.
ALEX: Coming from a component-based JavaScript framework, what is going to be my experience jumping into Elm? How is that going to feel different for me?
JAMISON: That's a great question. Myself and almost everyone I've seen get started in Elm that comes from something based around components that the instinct is to create components in Elm for everything. You have a select box in Ember or React or whatever and you wrap it in components. You can just reuse it everywhere.
In Elm, if you try to do that, you will hate it and think Elm is broken and horrible and just sucks. It’s because the Elm architecture comes with, I guess, you could call it boilerplate, there's some work you have to do to build a component that can do IO and respond to events and stuff. That work is... I don't know, maybe like a dozen lines of code.
Then there's some work to wire those components up together, that's maybe a couple more lines of code. So if you have like 300 components in your Elm application, you'll have... I don't know, like thousands of lines that just wiring stuff together code which won't really buy you that much because in my experience, using components is an attempt to make things understandable and isolate concerns. You get a lot of that from having peer functions and having a strong a static-type system.
In Elm, you end up making a lot wider components, instead of having this deep tree of lots of components nested inside of each other. You'll have a much flatter but wider tree. That took a while to get used to but I think it makes sense for the language now. You can still create reusable things but you focus more on creating reusable functions instead of creating components that are black boxes, that you kind of package up and pass around. You can still do reuse but it's a little bit different than reuse in a component-based framework.
This is a thing. I would say, in the last year, there's been a lot more discussion on blogposts and screencasts and stuff on a year ago, a couple of people were talking about it but there weren't really lots of great examples of this and now, I think, even the Elm Guide has some examples of reuse without components.
ALEX: Yes. One of my favorite things about component-based JavaScript is because I've learned to test them so well. Even though, sometimes they can turn into a configuration ball, I've been able to make them very reliable, even if they are deeply nested so going away from that scares me.
JAMISON: Yeah, it totally scared me. It felt wrong and weird and bad. But now, it doesn't. I don't know, I'm used to it, I guess, and I still write a lot of JavaScript. It’s not that hard switching back and forth between those two mental models but I definitely had to develop a different mental model when writing Elm code.
CHRIS: I'm interested in talking about some of the tooling. I know Elm has a lot of tooling. They have elm-reactor and they have the compiler. But I think I know that you also do the kind of dip into some of the JavaScript tooling if you are getting into bigger Elm application. You're probably still going to need something like a Webpack or Browserify, I guess. I'm curious what's your experience with that has been?
JAMISON: You can definitely just write an Elm application and then compile it into this JavaScript file then drop that in a script tag on your page and it will all work. The complexity can get very low. If you want to do more advanced stuff like talking to JavaScript, You can still do all that without any additional tooling, if you would like.
If you have a lot of dependencies in your JavaScript or you have a large JavaScript application or code base that you want to integrate with Elm, then you can use something like Webpack or Browserify. In my experience, it's no more painful than Webpack or Browserify. All the rest of that stuff already is. I don't know, there's an Elm Webpack plugin that will run the Elm compiler and allow you to import your Elm application into JavaScript file and I think there are similar stuff for Browserify and some of the other module bundlers.
I don't think there's anything radically new on the Elm side as far as bundling up your application or anything like that. It just kind of works like you expect. The places where, I think Elm tooling is cool in ways that I haven't seen that much in JavaScript are in the Elm package manager. If you are building a package yourself, it has automatic semantic versioning built in so they have a type system. They can detect when your interfaces change automatically. If you try and release a version that you change the interface and you don't bump the version, they will like yell at you because that's a breaking change. There’s some cool stuff around that that you get with the language having a static-type system.
The debugger is a new thing as of a couple of weeks ago. That's built into the language. You might have seen similar stuff in other frameworks but it's all kind of extra add-ons. In Elm, because it has kind of a framework built into the language, they can also build in a debugger for that framework in the language. You can enable debug mode, pull up an application, click around, do a bunch of stuff, and then it'll record a log of all those actions and you can scroll back through them and jump to any point in that timeline to reload the state of the application to that point. You can export that log to a JSON file and then kind of send that around, have someone load that log in, and it'll get your application back into the same state. It’s a really good for creating bug reports.
You click some button 15 times and then it breaks -- do that, export the logs, send that to someone else. Instead of having to follow all the steps, they can just load your state and then figure out what's broken about that.
I think that there are some tooling advances that are enabled by both the language itself, like the static type system and also the focus on strong conventions and frameworks built into the language. Does that makes sense?
CHRIS: Yeah, absolutely. As you were talking, I thought about was that some tooling that you lean a lot on in JavaScript is kind of rendered unnecessary by the error messages in Elm. All of the things that you may bring in an extra tool to catch in JavaScript when in Elm will just tell you when it compiles and it will give you this just unbelievably friendly, informative, and easy to diagnosed error message that tells you like, "This is the exact line where this happened. Maybe you mean to do this instead," because it can make all sorts of inferences about, like what you probably meant to do based on the type signature you gave to a function or something. I could see that going a long way toward making a subset of tools just unnecessary in Elm.
JAMISON: Yeah, a lot of tooling around JavaScript has sprung up to address... I don't know, not weaknesses but areas where people have identified JavaScript needs a little help now. If that's passive aggressive enough way to say it. The language is 20 years old. It was created way before people were building giant, million line code bases in it. But Elm is much younger and has the benefit of a lot of history and hindsight. It turns out you can avoid a lot of tools if you eliminate their need.
I have had that weird feeling where I'm building a JavaScript project and it feels like I'm flying a 747. There's a thousand switches everywhere. I'm like powering up a bunch of different things. It feels like I'm being really productive because I'm configuring ESLint in Webpack, in Flow, and all these different tools. Then I go to Elm and I just start typing and it feels like I'm less productive but I've just skipped so many steps. It is a different feeling.
ALEX: Would you say that maybe you feel so productive in JavaScript because it has such a strong community, with so many examples and so much shared code? Elm being a younger community, and this is strictly an assumption, may not be at that maturity level where you can share code and have that particular level of productivity.
JAMISON: Yes. There are definitely third party libraries in Elm. There’s probably a few orders of magnitude difference in the community sizes between Elm and JavaScript. There are just way more people writing JavaScript. The likelihood that someone will have ended up at your weird feature that you need for some random program is probably a little higher. There are some numbers differences.
In my experience, the people that are really into Elm right now enjoy solving their own problems because it does feel like they're a little bit more of your own problems to solve. It’s a tradeoff. I was going to say, if you value 100% focus on building business features, JavaScript might be better but I don't necessarily think that's the case. Using a bunch of third party code comes with a cost and some of that cost is you have to understand the API and some of it is you have to kind of take some responsibility for knowing where it breaks down.
In Elm, I think that responsibility is lessened by the language because the API is a lot easier to understand when you can look at the types that the API creates and uses. It’s a lot harder for it to just break your stuff. I think you could make the argument that even though there's a giant repository of JavaScript code out there, a lot of it might not be great for your program. But if you're using Elm, the smaller amount of code that is out there already could be easier to use and help you even more productive.
ALEX: I would like to try to segue into the Elm community now and what that looks like? What is this Elm community? How do you get involved, say, I'm coming from JavaScript or any language and I love it? Maybe my work doesn't use Elm just yet but how can I contribute? How can I continue to write more Elm code for not just my specific use cases?
JAMISON: I think my favorite thing about the Elm community is its focus on friendliness and learnability. I call it 'ruthless focus'. They are aggressively committed to building a language that is easy for people to pick up. If you are coming to Elm for the first time, you're pulling your hair out because it looks totally different from JavaScript. That might not make any sense to you.
But a lot of the ideas that Elm has come from other languages like Haskell or ML languages and those languages, I would say, are proudly hard to get into. It’s like a badge of honor to learn Haskell and then you like bleed to do it and then you enter this elite club where you got to talk about monoids all day.
Elm is like a strong negative reaction against that, like they want this to be a language that people can learn and get some of the benefit. Because there are cool things in languages like Haskell so the goal is to take some of those cool things and other cool things from other places too. But put them in a package that is easy for people to pick up without devoting their life to an arcane branch of mathematics.
I think they do a really good job of that. I've done Haskell pretty hard a few times and I'll bounce off it some more. I don't feel confused about Elm at all in anyway. In Elm, it's not like I'm some genius that can pick it up. It's that they have eliminated a lot of complexity and made it friendly and easy to learn.
I think that carries over into the community. They’re really interested in helping people who are new to functional programming or are new to programming in general. They’re also just nice. if there's an Elm Slack channel that you hang out in and like any internet chat channel, sometimes people will get a little testy and in the Elm one, they're so good at defusing situations, calming people down, like apologizing, and like being human beings. You don't see a lot of rage-y arguments where people say mean things about each other. I've been really impressed with that.
I want to talk a little bit more about what the community is like and then maybe talk about how to get into it, if that's okay. I would say the community is -- I know, it's evenly split but it seems fairly evenly split between people coming from JavaScript’s who don't have any functional programming experience and people coming from functional programming who don't have any UI experience. It’s interesting seeing those two very different groups come together and they're both attracted to Elm for different reasons and they kind of pull it a little bit in different ways. But it makes an interesting group of people to be around because you learn a lot of cool UI stuff, a lot of cool functional programming stuff.
ALEX: Sounds like a recipe for success, really.
JAMISON: Yeah. I think if they can make functional programming not have the snootiness that it has sometimes in genders and people, then I think functional programming is great technically. I think the culture around it can be just obnoxious. So I think if Elm can take the good things without the bad things, that’s amazing and that's kind of what it's trying to do.
As far as getting into the Elm community, are you talking about writing open source or contributing to open source or just where they hang out?
ALEX: Yeah, I was talking about contributing to open source but maybe Elm is just a better community for a certain style of contribution and maybe that looks like a blogpost and a coding example of how to do something yourself.
JAMISON: Like any new technology, there are definitely in the kind of evangelism phase. If you do write a blogpost that says nice things about Elm, there's like a horde of people that will swarm all over it because they like people to say nice things about Elm. There’s a bunch of people like writing books, doing screencast, speaking on it, introducing people to it, and that's well received very well. I think there's at least one podcast on Elm already.
So all that to say that I think the community receives kind of education and I guess, you can call it evangelism stuff very well and they're excited about that. If you are interested in contributing to open source, you can actually go to Package.Elm-Lang.org and you can see all of the Elm third party libraries and they all have these GitHub for the backing of its package manager. They all have source links right there. You can just find any random library and get to its source.
I think the community is pretty open to contributions from people. If you want to see Elm source code and contribute to it, they’re very open to that. This is kind of a culture shock to me coming from other communities where you can't just like show up, submit a patch to Elm core, and then have a discussion, and get it accepted or rejected. They’re not super open to direct code level contributions. They would prefer more use case feedback, discussion, and suggestions. Then the core team will take all these feedback in, think about it, come up with a plan, and then implement it, instead of take a lot of little patches from people.
Some of the core libraries are a little bit harder to directly contribute code to but they are very open. If you try and use it, you run into something that doesn't work the way you expected and you can create a small example that demonstrates that. They’re super open to discussions about that to influence the direction of the API.
CHRIS: I think over the course of JavaScript and front-end development, there has been kind of waves of abstraction over JavaScript. There were just libraries and there were things like backbone and then it kind of moved into doing something like CoffeeScript or TypeScript and a couple others where the idea is --
ALEX: Good old Objective-J.
CHRIS: Yeah, exactly. You might be transpiling down a JavaScript but there are still very much a clear link between something like CoffeeScript and JavaScript. Elm seems like it is one of a new batch of approaches where we're actually going to just sidestep JavaScript almost entirely. Like it is going to be like JVM bytecode or a browser and we're going to build an entirely new language on top of that.
I know there's also a bit like ClojureScript, Scala.js, and PureScript and I'm curious, do you think that is going to be a continuing trend that front-end development is going to land on a mainstream solution that might not actually be JavaScript at all? Or do you see it as eventually circling back and pulling a lot of these features into JavaScript itself?
JAMISON: I don't think that front-end development will be Elm in like five years or whatever. I don't think it's going to replace JavaScript at all. I think it might definitely influence tooling libraries or the language itself. The Elm architecture looks a lot like Redux because the Redux author read Elm and they're like, that's cool and then they wrote it in JavaScript.
There are other places where like time-travelling debugging. I believe the JavaScript thing came from the Elm time-travelling debugger as well. There are cases where it has influenced JavaScript’s already and I think that will continue to happen. Flow is a gradual-type system. You can lay it on top of JavaScript and they have done a lot of work on their error messages influenced by Elm. It’s super cool to see all those influences back into the JavaScript community as a whole.
I think there are classes of people who are more interested in doing some sprinkling of JavaScript on to pages. They might not even be like programmers really. They’re kind of like designers who do a little bit of coding and I don't know if Elm makes sense for that kind of role where you just need to add a little bit of interaction. You can do that but it doesn't seem like a thing that group would focus on.
It’s just really hard to change the world. I write a lot of JavaScript so I'm bias but it feels like it's the most popular language in the world and being the most popular Language in the world is not a thing that's easily overthrown. But I think it will grow, like programming will look more like Elm does just in general in the future and I think JavaScript will as well. But I also think Elm will continue to grow. There’s a lot of excitement about it and there's not a ton of people bouncing hard off of it. There's some people they're looking at it and they're like, "Eh, not yet." Some people just look at it and hate it.
But from people that use it, I don't see a lot of those people dropping out. I've seen most of them sticking around. I think the trend is definitely -- Elm will grow. But I don't know if that will take over the world.
ALEX: Then what lessons are developers bringing back to say and to write better JavaScript?
JAMISON: I think a lot of people are learning about types and data modeling. If you learn programming through JavaScript, the idea that there's this defined shape that your data has and some tool will help you make sure that your data always looks like that is kind of like strange and foreign. I think a lot of people are learning that there's value in that.
If you grew up in the MongoDB / Angular world like everything is schema-less, you just kind of slam some JavaScript objects everywhere, it all works, then it breaks, and you don't know why and you need to track it down. But I think seeing the value and thinking a little bit more clearly about what your data looks like and then forcing that through tooling is one lesson. That is taking a little bit more root in JavaScript.
All the stuff around functional programming in JavaScript is like achieved buzzword status by now. But there is definitely still some education happening around how it's easier to test peer functions, how they're easier to understand and reuse, and how it's good to write them. I think Elm will continue to push that.
Some of it though is there are some ideas you can take from Elm but it's just so much easier to use them to their fullest potential in a language and environment built around those ideas. You can kind of like cram a type system on to JavaScript. It's still really easy to get around and it does not model side effects at all. The elm type system modeled side effects so it helps you reason about where my program can talk to a network, where it can do things that are going to take a while to come back, and kind of sandbox those things into a place where you expect them, instead of have them sprinkled all over your program.
CHRIS: I definitely feel that uncanny valley of trying to bring FP -- functional programming -- things back into JavaScript when it comes to pattern matching. That’s something that in Elm or Elixir or any number of more functional languages. Pattern matching enables a lot of these higher level patterns that don’t always translate super great back to JavaScript land.
JAMISON: Yeah, the uncanny valley is a great way to put it. There are a lot of things that you can do that will lead to better JavaScript. But you always have to take the environment that you're working in into consideration. There are just some things you can't do or some things that are going to be more pain than they're worth to do.
On the other hand, it is kind of nice to just type console.log wherever you want or type like '$.getJSON' or whatever. The added security that Elm brings comes at a cost of locking you down a little bit and that can be a little frustrating to people sometimes. But I think the payoff is worth it.
ALEX: A side story. About six months ago, I tried to get into the Haskell programming book. That’s currently being worked on. That’s because I want to learn some functional programming lessons, maybe bring them back into my JavaScript, or just learn something new. It’s useful to learn a new language and bring it back to your work.
Of this 1300 page book, I got just past Chapter 2 and I was in a Haskell book club like everybody held each other accountable to finish this book. I did not make it. I could not figure out how to bring any of these lessons back into my code which is what I wanted to do here.
Elm takes that functional programming concept and says, "We're applying it to UI right away." There's no, "How do I apply this? How do I side step this?" No, you're doing it immediately.
Really, you're getting me excited to jump back into this tutorial and learn it and check out the community, just to be able to bring this back to my day to day and bring those lessons and do it.
JAMISON: Yeah, the first time I tried to learn Haskell, I learned that I could sort an array of integers in memory and that was it. That was as far as my Haskell skills took me so I definitely feel you there. In Haskell, they'll tell you it's a research language so they have a lot of reasons why it kind of works the way it does and learning it takes the pathway it does.
Elm is definitely not a research language. It’s trying to be incredibly pragmatic so you build UIs. In the guide, that's how they teach you the language. It’s the stuff you normally build. Thank you for bringing that up. I think, it's a thing that they focus on. I'm glad you picked it out.
ALEX: Yeah, at the learning curve is the syntax but you're still solving those same problems. If you're coming from UI, you already have that context. That is probably the majority of the hard work -- it's solving problems that are meaningful to you.
JAMISON: Yeah, for me the syntax, I had learned enough Haskell that the syntax wasn't hard -- how to make HTTP requests and do site-affecting things like that. It was the hang up for me but Elm, there is a way to do it and they show you and that's how you do everything and it all works the same way and it's fairly easy to understand. I don't want to call it easy because that makes people that struggle to feel that but they put a lot of work into making that both robust so it won't break your program and also learnable.
CHRIS: One thing I would love to mention about the syntax, I have learned a number of languages, I guess and the Elm syntax was definitely one that threw me the most and it put me off for, I guess it wasn't so much just the syntax, it was the syntax combined with how people do things that I would call more like style choices.
JAMISON: The formatting?
CHRIS: Yeah, Elm formats things in weird ways. Except that there is a tool called 'elm-format'. Once I've discovered that it has a really great editor integration for a lot of editors, it effectively remove that problem because I discovered that I can essentially write garbage basically in my editor and I can say that anything will make it look beautiful. It's fantastic. It removes such a big barrier for me when I was trying to learn it.
JAMISON: Yeah, elm-format, there were some great debates about it while it was being created but now that it exists, it's awesome. Speaking a little bit more of tooling, Elm comes out with new releases of the language with some backwards and compatible changes. But along with that, they release a tool to upgrade your Elm code automatically.
It’s not perfect and it won't run on 100%. It won't fix everything but with most projects, it fixes everything. Again, the benefit of having such a strict language is there's tools that will just upgrade all your stuff for you. That’s pretty awesome. It lowers the cost of evolving the language because they can keep adding new things and changing things without just leaving the community in the dust like we've seen in some other stuff. That’s kind of an Ember-ish thing, I guess. Ember has the whole stability... What is it? Something without stagnation? Stability without stagnation?
CHRIS: Stability without stagnation.
JAMISON: Where you just get all these free upgrades that are really easy to opt into and Elm has that same philosophy.
ALEX: What made you decide to check out Elm, to check out this community? Do you like to jump into new languages, new communities, and poke around and see what sticks? Or is there something that attracted you to Elm in particular.
JAMISON: Yes to both of those. I do poke around in a lot of new languages. I have a good friend, Sean Hess who's really into functional programming and he's a Haskell true believer. I am not but he is, so he teaches me stuff by Haskell. I think, he told me about it. I might be misremembering though. It might have been just some random blogpost or podcast somebody did a few years ago. But I was already excited about new languages and functional programming and I had tried to learn Haskell and bounced off so the idea of a functional programming language that takes some good ideas from Haskell, that runs in the browser that's new. It was like all the shiny things that I look for altogether in one thing. I tried it and I liked it.
I, also was really impressed by Evan Czaplicki, He's the creator of Elm. His philosophy around creating a language and the goals he wanted to accomplish with it. There's a really good talk he gave and called 'Let's be mainstream' which talks about some of the stuff we talked about around if functional programming is pure statically-typed functional programming is so amazing and it has all these people that love it and swear it's the only way to write software, why no one does it? Why the number of people use it is so small?
His thesis is basically because the languages that do this are kind of user hostile so he's trying to make it a user friendly, the one that takes all those ideas. I just really liked that philosophy.
CHRIS: I want to go back to something that you mentioned a little bit ago and that was data modeling because that is definitely something that I noticed being extremely helpful, any time I'm using a statically-typed language. It is very much something that I brought with me back to JavaScript. But I was wondering, Maybe you could talk a little bit more in depth about what data modeling really means in terms of Elm, the type system, the record type, and that kind of stuff.
JAMISON: Yeah, if you've worked with statically-typed languages like Java or C++ or something, you might have an idea of things like classes as a way to model data where you create a class and you say it has all these fields on it. I think, in the Elm type system, I'm going to say it's a lot better than those languages because it has a lot less ceremony and it is a lot more powerful.
Elm has type inference which means you don't have to declare the type of everything. It can just figure it out from a lot of places. That’s the thing that makes your code a lot friendlier to write. To model data in Elm, there are two main ways to do that. One is with these record types that you mentioned, Chris. You basically declare an object that has a certain shape like I'll make a type called 'user' and it has a user ID and a hash password and... I don't know, a list of my favorite cats or whatever.
Then you can just refer to that user type in function arguments or in return types or anything like that. In Elm, because you created that type, it knows that these are all the fields it has. If you try to access a field that's not on there, it'll yell at you because you're doing something that won't work. Because you have to think through all of the different fields that are on your types, it forces you to do a little bit more. It's kind of like the other side of TDD instead of writing test first. You have to think about your data first. You could call it type-driven development, I guess.
CHRIS: That's awesome.
JAMISON: In my experience, that's helpful. In the same way, TDD is, right? It helps you to do a little bit of design first. Think about how you're going to interact with the program in some way. Instead of writing tests, you're thinking what data do I need here.
They also have these things that you could call them -- there are a bunch of different names for them: algebraic data types, I guess. Some people call them tagged unions. They're kind of like enums where you say this type can take any of these finite list of values. But instead of an enum being like an integer, like it is in some languages with a fancy name wrapped around it, the enum types can contain other value.
You can say... what's a good example for this? You could say a user is either an authenticated user with a user record inside it or an unauthenticated user. Then when you're using that type in your program, you check, "Is this user type the authenticated user?" Then, if so it has this user field inside of it that you can pluck out and use. Or, "Is it an unauthenticated user?"
Those two different things, the super enums, the algebraic data types plus the record types are really powerful for modeling what data looks like in the real world. I haven't run into that many issues where it's been hard to do something I want to do with just those two concepts. Type systems are hard to explain over the air but hopefully, that helped a little bit.
ALEX: I thought that was great.
CHRIS: I think a good example of the algebraic data type thing is looking at messages in Elm versus actions in Redux. If our listeners are familiar with those, they are very, very, very similar at a high level. But in Redux, you just have string then you do a switch statement or something and you match on some strings. You hope that you synced everything up correctly.
JAMISON: Yeah, you say, "This action has a message and then has a payload that looks like this." See if it match against the message and then hope that the payload somebody sent actually looks like you expect it to look.
CHRIS: Yeah, whereas in Elm, you can actually say, "My message type is a union of all of these different things," and now, Elm knows exactly what you're saying and you can't accidentally send the wrong payload to the wrong update function or something. It's one of the cases where I found that there's a very, very clear similarity in JavaScript and it highlights, I think a lot of the nice features that Elm brings to that equation.
JAMISON: Yeah and there's even more strictness around that, like you have to handle every message type in Elm. So if you say, "This function takes in a message and does something with it," and then you check against what kind of message it is, you have to check every case or Elm won't compile because they don't want you to just blindly miss something, I guess.
But in Redux, you could just happily forget a thing in your case statement and then you send a message and it doesn't do anything and then you have to kind of trace through it and debug why that's happening. There’s just more helpful stability stuff built in.
CHRIS: Cool. I am so incredibly happy with how this podcast went. I'm just excited to start coding and start getting into Elm. I think people and developers maybe at an inflection point with JavaScript and just going and checking out something else that they can immediately apply back to their day to day. I think, it's so incredibly valuable and something that I'm going to be looking to explore very certain.
JAMISON: The value pitch is pretty strong because everyone that's written JavaScript has just written code that breaks when things get passed around that they don't expect. I do that all the time and Elm makes that impossible. You can break it in other ways but you just eliminate this class of errors that plagues your existence in JavaScript. If you want to experience that life, check out Elm. It's got a lot of other good things too but just writing code that does not crashes is a pretty strong pitch, I think.
ALEX: Jamison, are there any resources that you might recommend for someone who wants to get started with Elm?
JAMISON: Somebody mentioned the guide a few times. Everyone says that about every language, check out the official tutorial or whatever, and they have wildly varying quality. The Elm guide is the thing that worked a ton on. It’s pretty good, I think and geared towards people that have no knowledge of Elm, no knowledge of functional programming stuff. That’s a Guide.Elm-lang.org.
Then there's a Slack channel. If you just go to Elm-lang.org, it will have links to the Slack channel and there are lots of helpful friendly people there. I think those are the two best resources because with those, you can find all the other stuff.
CHRIS: There's also another one that I really like to mention which is the elm tutorial. I think, it's Elm-tutorial.org. I found it to be a really great compliment to the official Elm Guide. I think it walks through a little more in building a full app where the Elm Guide kind of touches on a bunch of different related topics. But they're not necessarily one narrative. The Elm tutorial did a really good job of tying all that together for me.
JAMISON: Yeah and this is been around for a long time and has kept it up through the evolution of the language. This is good stuff.
ALEX: Jamison, thank you for coming on the Frontside Podcast. We really appreciated talking to you.
JAMISON: Thanks for having me.
ALEX: If you love Jamison's voice, you should check out his React Conf talk from 2016 also about Elm. It's a wonderful talk. Go check that out as well.
JAMISON: Thank you. Can I pitch my other stuff too? Is that kosher?
ALEX: You can absolutely pitch it.
CHRIS: Soft skills engineering!
JAMISON: Yeah, I do a podcast called Soft Skills Engineering with my friend Dave Smith where we talk about all of the non-technical stuff in writing code. It's like you [inaudible], you can submit questions, and we answer them. If you're interested in talking about building software together, you should talk to the Frontside first. But after that, you can find me at Fivestack.computer. That's where my consultancy lives.
Consults is maybe a strong way of describing it. That's like saying the three toddlers standing on top of each other in a trench coat is like an adult. But if you want to work together, then check that out.
ALEX: Great. All right. That wraps it up for us. Thank you very much for listening and we'll talk to you next week.
We say goodbye to our friend and co-host of The Frontside Podcast, Brandon Hays.
Brandon Hays:
Transcript:
BRANDON: Hello, everybody and welcome to Frontside Podcast Episode 48. It is a podcast, as you can tell from the intro music, about woodworking and dads and dads working with wood.
CHARLES: And power washing wood.
BRANDON: Yes and power washing, sanding decks. Today, we'll be talking about the difference between mortise and tenon joints and dovetail joints and when it's worth going through the extra effort for that dovetail. Our guest today is Charles Lowell, woodworking expert.
CHARLES: Hi, Brandon.
BRANDON: Hi. I think I've never heard anybody acknowledge the fact that there's new music in the intro. I don't know if that has been publicly acknowledged in the podcast yet. But I was on the selection committee for that music and we had many options and we went with the one that sounded most appropriate for, I don't know, a woodworking show on PBS but I like it.
CHARLES: I like PBS. I like woodworking. I like the music too and the best part is I didn't have to choose it. I just had to promise to make music myself for 50 weeks running.
BRANDON: It was about 150 weeks.
CHARLES: About 150 weeks.
BRANDON: Yeah. Charles, we are here in the new Frontside HQ, which is sort of still under construction. It's kind of cool, though. It's a different space. I haven't been here much so it doesn't feel like home to me yet, I don't know if it does to you yet.
CHARLES: It's beginning. It’s still unfinished in many ways. It’s not painted. We just kind of have the bare minimum for survival. The kitchen is stocked, there's coffee in the cabinets, the grinder is set up, the bar is set up, the wall sockets are set up, and the wireless router is set up.
BRANDON: Home is where the vermouth is.
[Laughter]
CHARLES: And cavernous is really the word to describe it.
BRANDON: This is a shop that's clearly set up for a version of the Frontside that does not yet exist and it's interesting to see current day Frontside in a space that is clearly marked for a future version of this.
CHARLES: Yeah, you feel small walking in. There are not enough people to fill all the seats that we have in here.
BRANDON: Which is kind of cool. I don't know if you recall, maybe we'll save that discussion for later but there was a prior iteration of this company where that was very much the same thing. So it's kind of cool, like a little bit of an emotional journey to see this process start over again.
CHARLES: Yeah, it is definitely a new space and it's a new era.
BRANDON: Yeah, for you. Not for me.
[Laughter]
BRANDON: You guys can go right to hell.
CHARLES: Well, it is a new era for you too.
BRANDON: Yeah, that's true -- a new era of fun-employment. We wanted to do one final 'dadcast' because basically, as of officially 10 days ago or so, I no longer work at the Frontside and I've had people ask me and I was like, "I don't want to talk about it." And so, I think it’s probably time that we -- I don't want to belabor it. Nobody handed me a card when I quit as the co-founder of the Frontside that said, "You are officially invited now to Medium.com to write a think piece about my incredible journey."
CHARLES: [Laughs] You'll get that in the mail.
BRANDON: Okay. It may be sent to my old address. It’s sent to our old office, which is the problem. It’s lost in the mail. So yeah, instead I'm going to do my incredible journey podcast and really just regale everyone with stories of what an incredible, incredible journey it's been -- truly incredible.
CHARLES: Don't leave out the travelling with the fish and the cat, and like a little pug dog. You know like all those incredible journey stories when we were kids.
BRANDON: Yeah, like Homeward Bound.
CHARLES: Yeah, there you go.
BRANDON: I think it is like Homeward Bound.
CHARLES: That time that you fell into the water with the kitten, that was adorable.
BRANDON: I don't know where I'm stealing this joke from but there is an Incredible Journey sequel with a squid and a cow, truly the most unlikely of friends.
[Laughter]
BRANDON: Here we are giving my swan song on this podcast. I've actually actively took a month off to think about basically to try to recuperate and think about like, "Is this something that I can continue to do." I purposely took off from the podcast which was agony because I so wanted to have those conversations that you all did with Noel, and with Yehuda, and with Sarah. They turned out really good. I'm so happy with the result of stepping back and realizing, "Wait a minute, I think I'm redundant."
CHARLES: It was your idea to create the podcast, in the first place and the podcast has been infused with your personality. Even on the episodes where you weren't present, like you were behind the scenes, arranging it, making sure that it all happened. I can understand like missing that part of it. It really was like your baby, so to speak.
BRANDON: What's cool and agonizing is first off, I want to acknowledge that talking about a podcast that you're on while you're on the podcast actually should cause the podcast to collapse in on itself in a recursive loop.
CHARLES: You're witnessing a podcast singularity.
BRANDON: Then I'm commenting about the fact that we're commenting on the podcast on the podcast. So before we jump into a stack level too deep, I just want to acknowledge that I've had this experience before where I've stepped down as an organizer or a maintainer of something and I've watched the project get better as a result of me leaving.
The biggest fear a person has when they step away from something like this is that the thing will collapse as a result of them leaving. The second big biggest fear is that it will not collapse as a result of you leaving.
CHARLES: [Laughs]
BRANDON: It’s sort of like, "Oh yeah. Okay, well, you know..." And the amazing thing is watching it get better. It feels a little guilty like, "Why did I let go of the steering wheel of this thing sooner so that..."
Yes, the podcast was definitely my baby and I took care of everything and then I realized so much of that work, there are people that are actually better at this than me. When we brought Mandy Moore in to help with the editing and then organizing and she's taking a bigger, mega-role in all that stuff, she does a way better job than I did. I think that's true of anybody who does a bunch of things and that means, if you are the founder of a company, that's you. You do a bunch of things if you are a founding member of a small organization.
As you start letting those go, you find that there are people that like doing the stuff that you don't like to do or are better at the stuff that you do like to do. It’s always an interesting, humbling process. Just that alone right there was sort of the lesson I took out of it was that letting go is something can actually improve it.
CHARLES: That's actually, I think, critical to the process whether it's open source, whether it's a company, whether it's some side project that you have. There’s a phase where -- and really, I guess it applies to the whole start up cycle in of itself, right? There’s a phase where you do have to do everything. But then at a certain point, the critical path is you do not do those things.
BRANDON: It's before you think it's going to be too, so you always feel like there's always a leap of faith you have to take to say, "I think it's time for me to hand this off and pay somebody else to do something that I've learned to survive doing." And it's before you're comfortable letting go of that thing. And so, people that are uncomfortable letting go of stuff will just hold on to everything forever because there's no clear point where you just point at that and go, "This is the time to let that go." It feels natural. It’s time. It’s like your kids' first day at school. You’re going to cry. They're going to cry and then everything's going to be okay. That was one big thing.
Actually, it's kind of linked to why I left in the first place, which is I have historically been so bad at that skill. I have not exercised the muscle of letting things go and it doesn't feel ever appropriate to let things go. So I just took on more and more physical and emotional work and tried to cover more and more bases and did so like borderline adequately in all these different areas to where I just really burned myself out to the point where I couldn't get up and go to work in the morning anymore.
I think anybody can relate to this feeling of getting up and being like, "Please don't make me do this again. I don't want to get up." It's like getting up and driving to a place where you eat dirt all day.
CHARLES: That's a division of the Frontside.
BRANDON: And you're like --
CHARLES: Eating dirt.
BRANDON: You know what? It's okay but I had that yesterday.
CHARLES: Yeah, it was hard to watch especially like standing right next to you and seeing that process unfold month to month and then compound over the years.
BRANDON: Yeah, 'Hard to Watch' is the title of the lifetime movie of my life.
[Laughter]
CHARLES: Also, I believe it's the title of a Steven Seagal movie from the early 90's.
BRANDON: It was a Steven Seagal documentary about getting his hair plugs.
[Laughter]
BRANDON: "I'll take you to the bank, the hair plug bank."
CHARLES: Oh, you beat me to the punch. That’s the exact joke that I was going to make.
BRANDON: I did it. "I'll take you to the bank, senator."
CHARLES: What am I going to do? I guess, I have to carry the torch of early and late 90's movie references around here. You just got to let that fart go.
BRANDON: Yeah, there is a dearth of the 40-year old contingent here. Yeah, in the process, I learned a lot of stuff. But the problem was that it was too late to fix it in a way that felt super repairable so it was too late to try to like, "Okay, we'll just make these small tweaks and your life will get better. Okay, let these things go."
I was advised by several people like, "Hey, man. You should totally see this thing through. The Frontside is right on the cusp. It's just having its breakthrough moment. The business is doing really well. The employees here are fantastic. Everything is just kind of teed up for 2017 being a banner year." And I just went, "Yeah, but it doesn't matter like how awesome the next city is if you broke down on the side of the road, out of gas."
CHARLES: Right. There’s a certain point where it doesn't matter if there's more water coming down onto your bucket, like your bucket is full, the bucket is full and it's just the fact.
It’s a bummer because I love the people here but I knew I couldn't do it anymore. There may be people with Psychology degree who is listening to this and they are like, "No, no, no. there's plenty more to say about your stupid brain." That's all I've got. It's just I kind of ran out of gas. I stepped away about six weeks ago and you all are doing amazing work, you're in this awesome new space. I don't know... There are a couple things I wanted to talk about. One of them being maybe do a little bit of a retrospective about --
CHARLES: Yeah, let's wind back the clock. Do you want to have a flashback?
BRANDON: Let's have a flashback.
CHARLES: All right. You actually joined on, was it September of 2013?
BRANDON: And we had been talking for about six months before that. Potentially longer but it was really like we started talking in earnest in early 2013.
CHARLES: Yeah, it was a long process, like everything we do. It’s painfully slow sometimes but that process, by which we came together to try and really do something special unfolded over a long time because there was a lot to talk about. There were so many conversations, meet-ups after meet-ups, phone calls, and just like discussing what would it look like, what are we trying to accomplish. At that time, we're really very focused on pinning down like, "What are we going to do here?"
But that was what the focus was. We were talking about the details of how we're going to make it run, who we're going to hire, all that stuff. It was all about what is the purpose of this. It turns out that a lot of people give that short trip but it can be and should be a conversation that takes six months.
BRANDON: I don't think I've really acknowledged this too much. But I didn't really have a purpose at the time. I just wanted a shot at trying to build something. Eventually, I knew that if I didn't take it, I would regret it. I found your vision very compelling. You had a vision from the minute we walked through your space. All that was in it was a ping pong table and in the corner, you crammed yourself an intern. At one point, two interns and you were all crammed into one corner room of this big office for some reason.
CHARLES: Underneath a marionette.
BRANDON: Yes.
CHARLES: A marionette from Mexico.
BRANDON: Yeah, from Juarez or something and I had you walk me through the space and you're like, "I have a really clear picture in my mind of what's going to happen here." You probably can describe it better than I can. It was like, "Over here..."
CHARLES: I actually want to hear you say it.
BRANDON: I don't remember this, maybe but --
CHARLES: I do. I remember it very vividly but I'm actually --
BRANDON: Okay, so I remember you walked me through the space and you were like, "Over here, I see two people pairing on a really hard problem. Over here, I see somebody writing open source software. Over here, I see somebody writing documentation for some open source program." You had this really compelling vision of like a beehive of activity around collaborative, open source oriented, good engineering work that grew developers into great developers.
It was super clear in your mind that there was a way to do this that what you needed was an engine of growth to hook that vision up to. And I was like, "I've never done this before. But I'd sure give it a shot."
CHARLES: Yeah, and the thing is part of what was missing was this understanding that to make all of those things happen, to build that great software, and give engineers the chance to really grow into that role of producing that good software, that you need so much focus on that growth pattern and to foster. You can't just say like, "We're going to adhere to these engineering practices," and boom! Voila! Out of the mix will just pop great engineers.
BRANDON: There's a tremendous amount of intentionality in the process of doing that side of it and then there's a tremendous amount of infrastructure underneath that to create. That was the part I think, we both underestimated was how much infrastructure work you and I would have to do over the ensuing few years. But you cannot let go of that vision because if it's all infrastructure, then congratulations. You have a business that makes money and has no reason to exist.
Nothing is a bigger turnoff to potential employees in a hard to recruit industry like software development than like, "Show up and we'll pay you." I have a lot of those opportunities. Thank you.
So, it was never that. We would rather pack up and go home than that happen. It was always driven by, "If we can't make the kind of place that we want to work, then we should just shut it down."
CHARLES: That's definitely was a mantra and it's hard too because in order to make that place, you have to earn that right which means ultimately, you have to have a solid business. You have to take in more money than you spend.
BRANDON: I don't want to sugarcoat the initial because we needed money in the beginning anyway. So my first three or four months here was drowning in -- like I showed up on the client and they're like, "Oh, good. You’re the Rails expert." And I was like, "I've been a professional programmer for OO for like 14 months." I had worked really hard and studied really hard and I was able to perform job duties. But I was like, "I didn't come here to be a Rails expert."
CHARLES: Yeah, but also what was interesting is they wanted you to be a Rails expert. I think I might have sold you as a Rails expert.
BRANDON: Yeah.
[Laughter]
CHARLES: But the thing is as you came in, with an uncanny ability to wrap your hand around what they actually needed so you are probably an expert. While there was the implementation side, I think one of the best things that we brought to that project was focusing on the code that we didn't need to write and only writing those pieces which were critical. But yeah, so you came in for the first, about four months?
BRANDON: Yeah, between four and six months. It was September to like January, February.
CHARLES: Right. You've got to be the Rails expert in order to have a business so that you can actually play these things out.
BRANDON: Yep. And I remember thinking, before I came on I was like, "I want to run a business but here's the stuff that terrifies me -- I don't know how to set up QuickBooks. I don't know how to set up payroll. I don't know how to sell a client. I don't know how to even find clients." And you're like, "I have all of that stuff set up already." So when people are like, "Wow, how did you get the guts together to start a business?" I'm like, "I didn't. I totally [inaudible] one.
CHARLES: Well, the thing is you have to start a business at multiple phases, right? I had a business running that could adequately support four people. But then, obviously, we ended up growing and we ended up growing beyond four people. Then the infrastructure of the place, alarmingly, became inadequate so we didn't have to build from the beginning.
BRANDON: Another thing that is difficult to learn in business is like it's a truism that is so often repeated that has become trite, which is the things that got you to where you are, are not the things that are going to get you where you want to go. It's trite because it's also not always true, like having a vision is permanent.
I was describing this to somebody. Basically, the Frontside policies for a long time were very much like a startup, where people go, "You do the laziest version of whatever you can do in a certain area," so HR practices are lazy. "Hey, we don't have HR people." And then you pat yourself on the back for being a laid back work environment.
[Laughter]
BRANDON: We're really laid back. We don't have any policies or procedures or payroll? Hang on, hang on. Too laid back.
CHARLES: We take a relax policy for vacation. We don't have any.
BRANDON: Yeah, you either do or don't go. We don't know. We don't care. That vacation policy of like not having a policy, turns out the laziest form of that winds up being harmful to the people that work there. So we had to discover a lot of the stuff the hard way and start designing and crafting the experience of working here.
CHARLES: The thing is that part becomes difficult, like having a clear vision and an idea of what it is that you want to accomplish with this company, it puts you in chains. I don't want to say bad but basically, what it does is it sets very hard parameters on actions that you can take in the things and the practices that you can engage in. It is a good thing but it can feel like you're being squeezed by your own parameters at times.
BRANDON: Yeah, I think you and I in the past have called that 'value death', where we had all these values and we started the company as a manifestation of these values where other people may start a company as a manifestation of a business model.
CHARLES: Right.
BRANDON: It sounds pretty awesome.
CHARLES: It does sound pretty awesome. But a concrete example of that is our health plan. We want a place where people feel secure in their living situation so we want to pay them a fair market rate and what benefits we do offer if we want to make sure that they're second to none, that is a really, really expensive value to have.
BRANDON: A lot of places will buy that value back out of profit and we want it back out of our first dollar.
CHARLES: Right, so it's hard then because it really puts you and the tradeoff is you have a lot less flexibility when it comes to your finances and you see that again and again.
BRANDON: I talked to other people that ran businesses in the other direction. When they started with a business plan and a business model, then layered values on top as they were able to afford them. I was like, "Man, that's such a better strategy." And they're like, "No. it's just as painful," because now every time you add a value, you watch it take away the business that you've built. So it's almost the same emotional work, if not more, to try to layer and add those things on top as you go along because you watch your business become less and less of what it was and every time you do it, it feels like you're risking your business.
So by absorbing a lot of that risk upfront and defining what we wanted, we actually kind of like we didn't have to move the stake in the ground. It was already planted there and we just had to figure out how to build the business around that. I never recognized that as a tradeoff because it's always like grass is greener over there.
CHARLES: It's true and I don't bring it up like a complaint because I don't have any regrets.
BRANDON: I got regrets all over the place.
[Laughter]
CHARLES: I don't have any regret for doing it that way, in the sense that maybe it's just because I have to compare everything to the way that we write software or maybe I just think about software too much. But it really is the outside in paradigm, right? You start from your intentions, your purpose and the system that you want to have and then you infer the processes and tactics that are required to realize that and make it real.
BRANDON: As long as it's not crystalline and you can adapt it, then that's a great strategy.
CHARLES: Yeah, but when you set those lofty goals, it means that the implications for the infrastructure are bigger than either one of us estimated.
BRANDON: Vastly so. And you're right that we didn't quite grasp the costs associated with embracing those things. One of the costs is it requires a lot of thought. It requires a lot of time to manage and it requires defining processes. It just requires a lot of like mental and time overhead that goes into, and then financial overhead that goes into managing all these things that we really cared about. That collected together, we said, "This is who we are." And we've had to back off of a couple of them because we got in over our heads on, "Hey, we're going to try to reinvent apprenticeship." Instead of doing exactly what other people are doing, I know that 8th Light takes a year to design their apprenticeship and it takes about eight people. They weren't able to even take their first apprentice until they hit eight or nine people so they had enough infrastructure of support underneath that apprentice.
Instead of learning from them, why don't we just do exactly whatever we want to do, whenever we want to do it because we've met a really cool person and experienced a lot of pain at trying to reinvent things that exist elsewhere, instead of trying to look at what else is out there?
Again, this is not by way of regret. This is just one of those things that people do when they have their own thing is they feel like, "Okay, I'm going to do it different," and then they realize why other people all do it the same.
CHARLES: Yeah, and I certainly learned like you have to stick strong to your principles but make sure that they're within scope. You know, make sure that be aware that for every value you hold that sits at the top of the pyramid and there's a whole base that needs to support that value. So by all means, hold the value but be aware that's the top of the cone and you have to account for the volume of the rest of it.
BRANDON: It comes back to like how closely does this align with your vision of where this thing is going and why. Like, "This is going to allow us to recruit. This is going to put us in a situation where 12 months from now, we've got more senior engineers to help mentor the mid and junior level engineers." And being able to play that really long game is key and it's really difficult and requires patience that I had never possessed in my life before this.
CHARLES: You are an enigma in that sense and that you're both impatient yet incredibly patient.
BRANDON: Anything that I have that looks like patience is 100% fake.
[Laughter]
BRANDON: I will put myself in a situation where I can't have the thing that I want to do right now on purpose because if it was up to me, I would have every stupid trinket and gadget the minute like --
CHARLES: Man, I got my eye on a drone right now.
BRANDON: Yeah?
CHARLES: Yeah. I'm taking it a little bit of Charles to Charles. But yeah, I see what you mean.
BRANDON: But you learn the law of the harvest which is you have to plant the seeds. If you cannot, there’s no such thing as impatiently getting the return of the values that you want to instill.
CHARLES: For me, I don't view patience as a personality trait. I view patience as a behavior.
BRANDON: Yeah, it's a muscle that you learn to exercise.
CHARLES: Yeah, it's a muscle. It is about impulse like understanding. You said it best -- the law of the harvest that you plant the seeds and you wait and you will get corn or wheat or pumpkins or whatever it is that you harvest and like dance under the moon or whatever.
BRANDON: Obviously, pumpkins. I guess you figured out my plan now is to live out to a farm. It's Decorative Gourd Season.
CHARLES: This is G-rated podcast.
BRANDON: Yeah, all right. Yeah. I want to kind of pivot the discussion with the few minutes that we have left. I want to talk about because it's fun kind of reminiscing about how we got together. Before we pivot to where the Frontside is going, I want to talk about why this partnership worked. There were a couple things wrong with it. Namely, that you and I are both big picture people. My strong recommendation to people that are like, "I need a partner for my business. Cool. Make sure one person is big picture and one person is more detail-oriented," because somebody is going to have to fill that gap and handle details and you'll both hate it if you're both one or the other.
But barring that, I would say this is one of my favorite partnerships I've seen in our business, in our industry. I'm very lucky to have participated in it. So I want to talk about a couple of things that have worked well with that. I think the most important thing in any relationship or particularly business relationship is trust. That sounds obvious and stupid but you don't understand how hard that is to maintain because so much is at stake.
You're going to have differences of opinion. You’re going to have differences of priority. There's going to be money involved, sometimes large amounts of money and that makes enemies of people really quickly. Our relationship of trust has been founded on six months sussing each other out for the fact when like I recognized this the minute I met you but it took six months to confirm that you were going to be the kind of partner that put my needs above yours and I need that because I'm going to be the kind of partner that tries to put your needs above mine.
So when two people are striving to do that, you're going to have a solid foundation for a partnership and everything else is secondary. You hope that they have the right skill sets and you hope they have the right other personality traits. But the ability to put the other person's needs above your own, on both sides of that exchange is like with a bullet, to me the most important piece of this.
First off, thanks for continuing to be that kind of person, as I've bowed out, that has not changed one wit and even the conversations we've had. I have a few other things but I'm going to bounce it over to you to talk about stuff that makes a partnership work in your experience.
CHARLES: I think having that trusting relationship absolutely is the cement in the foundation. Throughout all of this, for example, it did not come to me as a surprise that you were burnt out on this work. I was able to be there the whole time and we were having very honest and very candid conversations about this throughout the entire course.
While you did mentioned that we're both very high-level, big picture thinkers and you do want to have someone who is very detail-oriented to make sure that the operations are going to happen, I think that it's amazing what you can accomplish when you have two big picture people who approach a problem from two radically different perspectives.
I think your mind works very differently than mine and I really appreciate the way that your mind works. It was always so wonderful to be able to attack a problem. I'm thinking in terms of pairing sessions, in terms of when we were selling something or presenting to a client together, when we were doing trainings, being able to recognize that this person is grappling with the exact same problem than I am and they're bringing a completely different skill set and they are pushing the ball forward using a set of moves that I actually don't even possess. Yet we're focused on the same goal and both even find the process of pushing it forward like enjoyable.
I know there have been so many times over the course of this time, this last three years. Even quite recently, I think the last time this happened was when we were interviewing a candidate and it was like you were talking to one of the candidates and kind of explaining who you were and what it would be like to work here. I was like, "Wow, I just really appreciate your mind." Almost like if I could take your mind and hang it on a wall. I know it sounds kind of like Hannibal Lecter.
BRANDON: That’s super creepy.
CHARLES: Yeah, I know.
[Laughter]
BRANDON: You're like Sylar from the first season of Heroes.
CHARLES: Yeah, I was like, "Should I go for it?" Yeah. So let's go there. No, but really, I do. I really have an admiration for the way that you approach things. I don't know, it's just I feel like it's very rare to meet somebody that you have such a strong values alignment with and you get along so personally with and their tactics are completely and totally different than your own. Oh, not totally different, right?
BRANDON: Yeah, different enough.
CHARLES: The angle of approach.
BRANDON: Yep. I loved that I wrote down a blog post about what constitutes a senior developer and at no point did I have any evaluatable technical criteria because that is how my mind works, because I don't care about that. People were like, "What sort of evaluatable technical criteria do you use?" And I was like, "I don't know. That's Charles' territory." And then you did that podcast with it and I just sat there and I re-listened to that a couple times actually as I was writing my conference talk about because it's actually really important to develop those and it's really important to have the signifiers that you have developed those.
I couldn't have done any part of this without you. So I will always be deeply, deeply grateful for the fact that you saw something in me that you kind of gave me the shot that I was waiting for somebody to give me, which is weird. Like I was waiting for somebody to ask me to come and found a company with them then you did. That doesn't happen.
I don't recommend to people to sit around and wait for the perfect partner to come along and ask them to co-found a company. I think what I learned through the process of all of this is, "Go ahead and be bold and do that." The rest of that is that stuff but do find a partner that you can have that level of trust with and don't settle for one that you can't, that would be like all the horror stories I know in business.
CHARLES: I cannot even imagine.
BRANDON: I've seen it and it's really sad. When you said it wasn't a surprise to you that I was burned out is because we had such a deep relationship of trust that when we finally started having one-on-ones, I was able to confide everything in you because I knew that you would take that information in the right context. You could be trusted with the raw part of my feelings. The fact that I was scared, the fact that I was frustrated and you wouldn't turn that into either a weapon or you wouldn't turn it into something that made you like me less or trust me less. I just could always trust you that I could tell you unvarnished truth.
CHARLES: Yeah, that's certainly when you talk about lessons learned, that's actually a very personal lesson that I took away from this experience. And really this relationship is something that you show is like you can give somebody very direct, very frank feedback and how it is received and how it affects the relationship going forward has everything to do with your emotional intent towards that person. So if you are coming from a place of love, you almost have a free reign of the things that you can say because you're just stating facts and people know that there is that love in there.
BRANDON: Charles, I love you but you have cream corn on your face.
[Laughter]
CHARLES: But it's true that you can get the same feedback from someone who is trying to use that as a weapon and trying to make you flinch. It doesn't even have to be malevolence. It can just be --
BRANDON: Indifference?
CHARLES: Indifference but it makes all the difference. So I always try and replicate that with the other relationships in my life, with varying degrees of success but I learned that here. That’s a very personal but very powerful lesson that I took away in having experienced that first hand.
While we're talking about different skills and different lessons learned and very personal lessons learned, another thing that I took away from here, I said I always like to bring things down to the concrete. I feel like obstructions are dangerous.
BRANDON: Yeah, they could obscure your intent.
CHARLES: Exactly. So when I say like, "I really appreciate your mind," one of the things that I like is when you're talking, you paint a very clear picture, like your analogies and your metaphors. They're just always on point and you're always able to relate, whether it's we're doing something with software, whether it's an interview, whether it's designing one of our business processes, always able to paint a very clear picture and tell a very compelling story around why it should be that way.
So it is focused me that I feel like I've been able to grow as a communicator and really kind of perceive that communication is really the one true best practice, so to speak, and making clear so that you can build consensus around people who are trying to cooperate to do something. It’s affected the way that we write pull requests, making sure that you're laying out the facts in the order in which they should be.
It means that if you want to accomplish something, you're going to have to convince people that it's worth doing and that is the key thing. Sometimes you can convince them with code but not always.
BRANDON: It is a lever that can give you leverage when you're trying to make a point. But you have to recognize it for what it is. It’s just an additional lever.
CHARLES: Right.
BRANDON: All right. Well, as we continue this, I'll volley back one more thing and then I want to ask you about the future of the Frontside. I kid you not. I think I'm actually going to do this. I'm going to change my iPhone lock screen to say, "Is this something Charles would say?" I've told multiple people this so I apologize if I've said this on the podcast before but we were partners for three years, which is as intense a relationship as marriage, if not more so.
In those three years, you have said nothing that could even be construed or misconstrued to me as unkind. Not even neutral. Just kind, like inquisitive kind, caring, and the reverse is not 100% true. I don't have anything that I sit around and regret. But I want to thank you for giving me a standard of kindness that I can hold no other people to but I will try to hold myself to. You have made me a better person as a result of our time working together and that you just the deep, deep example of human kindness and thoughtfulness in your approach to the way that you communicate with people.
I just want to thank you for all the things that I've learned here, other than my own ability to kind of make my own way in the world which I did not have before this company. The other big thing as an example of this is the kind of kindness that a person four decades into their life can continue to have, the lack of cynicism, the lack of snideness, the lack of anything resembling superiority, so I just want to thank you for that. Thanks for being such a wonderful person. I assume that's inborn and cultivated. I love you so much.
So let me shift the topic in our last few minutes here and ask because I'm curious and I'm sure people will be curious. Let me phrase it this way. We walked around a big empty building and said, "Oh, I see this over here. I see this over here. This is going to be a great place where people are encouraging each other and growing as developers." Has anything changed as you're in this new building and walk around in a big empty space that doesn't have enough people in to fill it? And is anything changed as your vision for the Frontside, like I know you're hiring a salesperson and there are a couple watershed moments.
CHARLES: Absolutely, and I think this is a watershed moment. I think tying it back to where we were when you came on. It was basically you and me are the two full-time employees. We had this company. We had this idea. We had this dream and we were able to, I think, realize that dream to a large extent.
There were people pairing and it was right next to me this morning and I was listening into the conversation and I was not even a part of it. My heart's desire was to jump in the middle of it and get right in there because it sounded like such a fun conversation to have. But I held back and I just listened to it and appreciate it. For all of the wonderful knowledge and value that was being generated right before my very eyes, like it very much was a realization. I think of those dreams that we had back in 2013.
In order to make that happen, we had to grow this company beyond just you and me. Now, we were up to almost nine people. I think, with you leaving, we're going to back to seven because we're going to bring, like you mentioned, a salesperson. So there was definitely a couple of phases of growth. We’ve talked about this on a previous podcast but we kind of had another watershed moment back in March where we realized, “Wait a second. We've cowboy-coding our business. We need to actually write tests, we need to write documentation, we need to shore up these internal structures to make sure that this vision is financially viable and sustainable.” And so we did that.
I think that I want to actually like call out and say like, "I don't see that I could have done that without you. That’s been the story of this place for the last six months. It is a fundamental transformation of how this company operates. You know just as well as I do that those changes that we put in place, those checks and those parameters and those processes had a profound impact on the viability of this company. But in the process, it also like it did. It burned you out. I think that this last six months and this last year in particular, were incredibly hard.
So the next question and part of the problem was that you and I were kind of the single points of failure in that system. We stop cowboy-coding, we put in these checks, we put in the balances, we put in these measurements but we still had a system that had these two single points of failure.
I'm not going to lie with your departure that is going to put a lot of stress on the company but it begs the question now, "Is a company that has one point of single point of failure a viable company?" So for me, I don't think the vision has changed that much. I still want to be a place where great engineering happens and where there is a space where engineers or people can come in and grow to be great engineers.
But the thing is the change that I want to make is scalable. It needs to be distributed so the changes that we're making right now, the air that is beginning now is going to be introducing scalability so that I can exit or I am not necessary and the people who are here, whether it's eight people, 10 people, 20 people, they can continue this process and live under the umbrella of that vision without there being any one that's critical to success of the entire network. That’s what I see coming and that's where I'm focusing all of my energy.
BRANDON: Well, I'm excited to see what happens with it. Not excited to show up here to work anymore.
[Laughter]
CHARLES: But you got to come by and podcast.
BRANDON: Every once in a while.
CHARLES: Every once in a while.
BRANDON: All right. I really love this place and what it stands for. Not just because I got to help define it. It's sort of like everybody loves their own kids. But I think even if this was somebody else's kid, I would love and admire this company because it has stood on principles that are hard to stand on. It’s done things that are harder than just getting a business up and running and it survived, which says a lot.
I ran out of tenacity juice but it doesn't mean this company has and I'm really grateful to have had a great co-founder that made that possible. It made me feel like I was capable of more than I felt like I was capable before I came here. So this has been a tremendously life altering experience for me. Because of your willingness to give me a shot to risk your business on this guy that you just felt like, "I like this person. I like [inaudible] together."
CHARLES: Don't sell yourself short. You shine and you burn brightly. That’s apparent to anybody who stands in proximity.
BRANDON: Well, thank you and I am so grateful for having had this opportunity. I hope I can use you as a reference.
[Laughter]
CHARLES: "To whom it may concern..."
[Laughter]
BRANDON: I guess my wife is like, "Are you going to get a job?" And I was like, "I don't know."
CHARLES: I promise not to [inaudible] you on the internet.
BRANDON: Yeah, that's the best I can hope for. Charles, this has been really great. I appreciate getting to do this with you. I will miss these 'dadcasts'.
CHARLES: I will miss them too.
BRANDON: I wonder if anybody listening doesn't know what those mean. Let me reiterate the story. We obviously didn't talk about being dads. But we totally are dads. Stanley, when he used to work here would call the podcast, with just me and Charles, 'dadcast' so that stuck. The problem is if we started a side podcast called 'Dadcast', people would expect us to talk about dad stuff and we're not going to do that pretty much.
CHARLES: Yeah, no. It really has stuck, It's like, "So, what's the format of the podcast this week. Is it going to be a dadcast?"
[Laughter]
CHARLES: "Or should we try, you know, organize a panel."
BRANDON: I've heard from other people are like, "When are you going to do another dadcast?"
[Laughter]
BRANDON: So the answer now is '???' but we'll figure it out.
CHARLES: Yeah, we'll figure something out.
BRANDON: Oh, yeah. You all are moving to weekly, which is a pretty big deal. Maybe, we'll be able to slip one of those in there in a few months.
CHARLES: We're definitely thinking about taking our podcast game up to the next level. We had Mandy, actually came to Austin last week and we ran over a bunch of different options. So yeah, we're thinking about going weekly and I'm actually pretty excited about the content of the podcast. But it's going to be distributed. It’s going to be a lot more people doing a lot more stuff.
BRANDON: I love that you're removing a single point of failure thing because I think a lot of what my inability or unwillingness to do that was part of what contributed to my burnout, which is obviously not a great way to run your business, to burn yourself out of being able to go back in. I'm glad that you're doing that and I'm excited to see where the Frontside goes.
So Charles, thank you for letting me come on for one last show here.
CHARLES: Yeah. Well thank you, Brandon. When I think about the future and you can take this as one last contribution, I feel like this is somewhat of a daunting task but I actually take solace in the fearlessness that you've given me, in the sense that I've seen you be fearless in learning Emacs. I've seen you be fearless and having really hard conversations with clients and be fearless in having those same hard conversations with our own employees that we see every day and just watching you operate gives me knowledge, just in the sense of an incontrovertible fact that, "Yes, I can do this and I can try." And so thank you for that. Thank you for everything that you've done over the last three years.
BRANDON: I love you, Charles.
CHARLES: I love you too, man.
BRANDON: Okay. All right. Everybody, please if you have questions for this podcast, send them in. It's the @frontside on Twitter and if you have any feedback, it'd be really awesome if you leave an iTunes review on iTunes that helps people find the Frontside podcast and share with people. Tell them that I won't wreck future ones as best as I can. I won't interject and remove the opportunity to listen to cool guest that you have coming up. Anyway, thanks everybody for listening. And Charles, thank you for being a friend.
CHARLES: [Singing] You have a friend and a confidant... and you know what?
BOTH: [Singing] And if you threw a party, invited everyone you knew. You would see the biggest gift would be from me and the card attached would say: THANK YOU FOR BEING A FRIEND!
In this episode, Noel Rappin, developer at Table XI, comes on the show to talk about his new book, Take My Money: Accepting Payment on the Web.
Noel Rappin:
Transcript:
CHARLES: Hello everybody and welcome to the Frontside Podcast Episode 47. I'm Charles Lowell and with me today is Noel Rappin.
Before we get into who you are, because I know that a lot of people know you already and you need no introduction, you're actually calling in from Chicago today, right?
NOEL: That’s true, yes I am.
CHARLES: Did anyone actually show up for work today?
NOEL: Yeah, people did actually show up for work a little bit later. So, this is being recorded the day after the Cubs won the World Series last night. I will say that my commute in the parking lot at the commuter rail station in the suburbs was surprisingly empty this morning. The people were a little bit slow to come in. The game didn’t end till about midnight last night.
CHARLES: I'm neither a Cleveland nor a Chicago Cubs fan but it was a harrowing game. It almost gave me a heart attack.
NOEL: Oh, man.
CHARLES: I can't even imagine what it was like.
NOEL: A Cubbie Blue since I was a kid. So yeah, it was something.
CHARLES: So, you're from Chicago?
NOEL: Yeah, I grew up in Chicago. I grew up in the Chicago suburbs. I went away for school and I worked in Boston for a while, but came back about 12 years ago.
CHARLES: Okay. So, that kind of leads me into the perfect setup for one of our questions is how did you get into development? I've known about you since I got into the Ruby community, probably back in 2010 or something like that. How did you come to be there?
NOEL: I was one of those kids who was a developer at a certain age, I guess and I had an Apple II. I started programming Applesoft BASIC in the mid-80's, I guess, and eventually decided that I enjoyed it enough and got pretty over-educated at that and that’s just a very traditional background.
I went and worked at what we would now call web consulting company around 2000, my first professional job was '98 - 2000. I had done a lot of different languages as a student. That job was mostly in Cold Fusion and then eventually bounced around doing a bunch of different web development solutions.
At some point along the way, I picked up the Ruby Pickaxe book and then eventually came to Rails. I started Rails as a hobbyist, either pre-1.0 or very early 1.0. I used it to build some task tracker for my team and a couple of other little tools like that. And relatively shortly thereafter, I started doing it professionally.
CHARLES: I think you're kind of the same generation that I am. I call this [inaudible] from that early 2000's web development background where it's kind of fueled by [inaudible] network.
NOEL: Yeah, a little bit. My first professional job was at a company that is a very, very small consulting company based in Miami and Boston and they were not developers who run the company. They’ve been documentary film makers and there's like a whole 90's technology trajectory here because they were documentary film makers and then they were documentary CD makers and then they were asked to add interactive stuff to the CDs that they were putting out and then they became web developers as a sort of a natural extension. And suddenly, it was like 1998, every company in the universe wanted to be on the web and they were like, "Oh, this seems like a good business to be in." And they started trying to hire actual programmers who knew what they were doing even though I was just out of grad school and didn’t know what I was doing but it was convincingly put in.
We did all the stuff then that would be like the first application that I worked there, the production server lived under my desk and was also the staging server and the development server. We didn’t use, at that point, search control although eventually we did. There were no established conventions on what was the good thing to do.
CHARLES: Yeah. The production server under the desk: a more elegant weapon for a more civilized age.
NOEL: [Chuckles] Certainly old.
CHARLES: That was a while back but you’ve obviously been doing a lot more structured, a lot more formal development over the course of your career. So, most of us, myself included, were kind of content to write the software, maybe blog about it every once in a while, give the occasional conference talk, but you’ve really, really delved in to those activities and really kind of taken the time to really, for the topics that you're interested in, really kind of research them very thoroughly to the point where you’ve actually written several books. When I think about the concept of writing a book, it sounds like, "Oh, my goodness! That sounds terrible. That sounds like a hundred of my teeth pulled out," or something like that. But you’ve done it multiple times. I'm curious, did you experience that kind of fear and uncertainty and what was kind of the decision making process that led up to, "No, this is something that I've got to do. I'm going to sign up for this. I'm going to do this. And I'm going to make this commitment."
NOEL: Fear and uncertainty is a different question. I've always written things. I was a writer in some ways even before I was a programmer. So, being able to combine the two is something that I really enjoy doing. And I've always really enjoyed teaching. The more cynical way to doing that is I enjoy explaining things in a way that makes me sound smart.
But I've always enjoyed doing it in whatever context. So, when I'm not writing, I've always often been involved in training at the places that I work or other things like that. And I've always been a little bit of a theater background and a little bit of a performance background and conference talks are a way to still scratch that itch a bit.
CHARLES: You mentioned that you have a graduate degree.
NOEL: No, my graduate degree isn’t Computer Science but I did a lot of amateur theater things in high school and college. It's not something that I have a whole lot of other outlet for other than talking about development.
CHARLES: [Chuckles] You wouldn’t think that it's a natural thing but I think the best talks and the best walks. What's it like to have that element of theatricality to them?
NOEL: I try in the books to give them a little bit of a voice. Sometimes you get interesting responses when you try to make a technical book a little bit funny. Some people really don’t like it and other people really respond to it. I do it sometimes just as a way to maintain my own interest in the 14th page of this chapter or something.
As far as fear and uncertainty, that never really goes away. I have a book out that I'm writing now about payments which is a very serious topic. And as much as I've done work in that and as much as I've done research on that, there are obviously people out there who have done more work and know more certainly about individual pieces of it. And there are a lot of people who are going to take anything that I write and implement it that way. They're going to take it as the way that things are done. So, that does introduce a tremendous amount of unsettling.
CHARLES: Yeah, you're on the hook. They're like, "But Noel told me that this is the way to do it and I ran out of business."
NOEL: Yeah. Actually, the payment book which is called 'Take My Money' is actually only a second book in the history of Pragramatic Programmers to have a legal disclaimer at the beginning which I'm very proud of.
I think that the thing that is the most worrying especially when writing something long is not so much factual errors because I can check facts. Facts can be checked. Emphasis is much, much harder to check and the cultural community practices are much, much harder to check. And so, I'm often much more worried about the idea that I might spend a lot of time on something that nobody really is interested in or that I might not spend time on a really important thing just because it's a part of the world that I don’t know as well as other people in there, and therefore, I miss something. Factual errors, I worry about them too. But factual errors are relatively easy to catch often, not always.
Many, many years ago, I wrote for Rock's Beginner Rails book which was purchased by approximately nobody. But it's got one of those beautiful rocks black and white cover pictures of the author on it looking terrible. At that point, I had worked in Rails professionally but only for a very, very short time and there were certainly people who had a lot more experience than I did. But for whatever reasons, I had the book contract. In that context, there's a lot of uncertainty around not being sure that I know what the newest tools are or what the best practices are.
CHARLES: How do you mitigate that? How do you address that?
NOEL: Research is one way. There are pluses and minuses to not being the greatest expert or something when you're writing a book like this. One of the pluses is that your experience is a little bit more immediate and it's a little bit easier for you to make it relevant to somebody coming to it for the first time. But then a lot of times, you wind up doing the kinds of things that you might do if you were actually trying to learn it. But then I am a pretty good researcher and then I can compress that down into something that took me 4 or 5 hours to Google or research, or days to figure out the best practice, or talk to some experts sometimes and then I can hopefully distill that down to something so that you don’t have to go on that entire journey. You can just cut the chase a little bit.
It's researching. It's finding the people who do seem to be prominent in a particular technology or a particular skill and finding out what they're doing. Sometimes, it's getting it wrong, hopefully not very often. And sometimes, it's just like this is the best I can do and I have to like, "I can't solve every problem."
CHARLES: Right, just being satisfied with that.
NOEL: Yeah.
CHARLES: I get it. That makes a lot of sense. You mentioned that the book you just wrote, the one about taking payments on the web, I saw that. I looked at it and I was like, "Oh, that totally needs to be this book. This book totally needs to exist." And thanks that it actually got written.
But in hindsight, it's obvious that there wasn’t really anything that like it treated web payments as this holistic topic that needed to be addressed and yet, when I look at the last 5 years or the last 10 years, this is a body of knowledge. It's been part of 90% of the applications that I've developed and it's been something inter-rolling like they’ve been patterns and stuff developed around it but I've never really thought about it, "We need to draw this circle around this practice." And this needs to be researched and there needs to be at least some guide on how to do this.
And so, I think from my perspective looking in hindsight, seeing why it was published, "Oh yeah, that’s totally obvious that that should have existed." But being on the other end, looking into the future of, given the infinite number of things that I could write about or I could research, I need to go about kind of the selection process and say, "This is something that really ought to exist."
NOEL: This came about kind of interesting to me, I guess. The purpose of the book states it out pretty clearly. I, a few years ago, started working on - not a large web project by any means, but certainly one that had a fair amount of complicated business logic around their payments. And we inherited it with the payment gateway in place and I kind of thought that, "Oh, the payment gateway is there. That’s the hard part." We just basically sat and pretty quickly learned that that was not the case.
As I was really looking for best practices, things people who had delved to more problems on the assumption that a lot of people had to solve some more problems. One thing in particular that I was looking at was handling the failure case where I have to do something in my database and I have to process the credit card and they can't happen simultaneously but the failure of one affects how I process the other. I'm just looking around for how other people had solved that and really being surprised how little information I found about something like that.
I kind of filed that away. About a little over a year ago, I had this weird idea that I was going to start doing some self-publishing again and sooner writing about this or thought about writing this as part of that, writing about payments and data modeling and something like that. And as I started getting into it, I was like, "I had enough issues here. This is longer than like a blog post and this longer than a magazine article. There's kind of a lot here."
I worked with Pragmatic, so I know the editors there and I sent them a proposal and they pushed back a little bit on the idea of, "Aside from the documentation, what else do you need?" And I was like there are all these issues here. They know, Dave, they run their own web store, they wrote their own code and I actually was - part of when I got the contract because I got to interview Dave Thomas about how the Pragmatic store works which was great. It was really neat.
CHARLES: Did that material actually make it into the book itself?
NOEL: Not as such because I was a little reluctant to directly quote him about the internals of the Pragmatic store, but some of the principles Dave talked about. It was actually kind of reassuring that about 85% of it agreed with stuff I already thought I knew, and about 15% of it sort of went beyond that. They have some problems that are -- because they're actually managing physical inventory which a lot, not all web stores do, which introduces a whole host of other problems.
It became a combination of I actually really do think I've worked on a lot of these problems and they're interesting. And a lot of people seem to have similar problems and there's now a whole lot here, and so it seemed like a book was a way for me to go on that. Other people might have gone a different direction.
I am getting kind of an interesting reaction from people. I get a lot people who are saying, "Well, I really could have used that book two years ago." And not a lot of people say, "I really need to buy this book right now," which indicates maybe the marketing needs to be tweaked a little bit. I'm pretty sure it will. It's not even fully out yet, so it will find its audience. But it’s interesting how I think people still even seeing the book is there assume that they know more about what they're getting into when they start doing payments. And then they come out the other end a couple of years later and they're like, "Oh wow! I really wished I had the guide on that."
CHARLES: So, what you need to do when marketing this, you need something along the lines of 'you don’t need this book two years from now' or like 'don’t be the person who wishes they read this two years from now, read it now'.
NOEL: If I had this book when we started, I would have saved so much time and not made so many mistakes.
CHARLES: Yeah. It's always interesting to me the interplay between kind of the patterns evolving and documenting the patterns and how eventually that kind of precipitates code that makes those patterns automatic. But it feels like there's always this kind of knitting edge where you have to kind of explore the problems phase and do the research and then eventually you can kind of turn and digest and write little pieces of it, but eventually it becomes like code.
Have there been actual code like plug-ins or stuff that has fallen out of this, or that people can reference directly?
NOEL: Yeah. Not as such. There's a reference application in the book, but I submitted a couple of patch requests to a couple of gems along the way but nothing significant. It's pretty unusual for me to co-model a book like this with a lot of new open source tools. I'm usually more about using the things that are already there. But the book definitely has an opinionated set of thoughts about how you design a Rails application and it's pretty upfront about that. We're going to put all our workflow logic in their own objects and we're going to not put a lot of stuff in the active record models and we're going to do it for these reasons.
The first chapter of the book actually is not even payments. It's just shopping carts and a way to talk about the data model and the design because ultimately, money has some word aspect but a lot of it is just principles of doing good software design, encapsulated software design, and the way you will deal with any big external 3rd party dependency. But then on top of that, you have the specific pieces of money is weird, like money has real world implications and has legal implications and things like that.
CHARLES: Yeah, definitely. Whenever you're dealing with money, there's an elevated level of pressure that seems like it's put on. And I know personally when I think of -- lately, I was writing my very first payment system. We actually maintained for a while the stripe-rails gem which had moderate popularity but we don’t maintain it anymore. But it was that project where we did that where I kind of became an information recorder. And it kind of started me on this journey of never destroying information, kind of that immutability and like functional programming and stuff like that because I was so worried about over-writing any information about the payments coming in. I was like, let's capture it from the web hook and write it to the database and replicate it and back it up and let's never throw away a fact.
NOEL: The specific advice in the book is save as little of your user's personal information as you can and as much of the transaction information as you possibly can. It definitely recommends saving the entire response in the payment gateway. It recommends making sure that you store all of the pieces of your partial price calculation so that you can recreate it even if the logic changes because that is something that has specifically bitten me in actual world.
CHARLES: Can you elaborate on that when you say partial price information?
NOEL: Yeah. The application that I work on, it sells tickets. And it has a processing fee. Originally, the processing fee was whatever the processing fee was and I hard-coded it as a constant in the code base because I thought I do not need to write this processing fee to the database for every individual transaction because I was wrong. And eventually of course, they changed the processing fee which would be fine if you never had to look backwards at all and try to run a report of old transactions and try to validate that the prices on old transactions still held.
So, they changed the transaction fee and then they started running reports and all of the reports are off by whatever the changed amount was.
CHARLES: Right, I see. So you could still maybe store that constant in the code base but you have to at least write out what it was at that point when you did the transaction.
NOEL: Yes. Not all of this has managed to make its way back to the legacy code mass that I'm actually dealing with. But what I would recommend is saving all of the individual pieces. Unit price, any processing fees, any shipping fees, any tax fees, any discounts, saving all those as they were calculated as part of the transaction so that you always have them and they're not dependent on the code or the logic staying the same because all of that logic will change.
CHARLES: I'm all about the information hoarding. I think it's useful stuff. [Chuckles]
NOEL: I even started recommending originally a failed transaction was in a database transaction so it would go away. But I think that it's a bad idea. I think that you need to save -- whether you actually save a partially failed transaction in your database or whether you log something, the information of those failed transactions is really important and you want to make sure that you hold on to that stuff and you can go back and look at it. The idea that a bunch of transactions are always failing and you don’t know about it, that’s problematic.
CHARLES: It sounds like you're still working on this application which [inaudible] the book.
NOEL: Although I'm a lot more critical of the code now that I've gone through -- the book made me sort of think about this stuff a little more systematically that I had and made me make a lot of things concrete that weren’t quite in the original application. So, the code in the book is actually better than the code in the application.
CHARLES: Of course.
NOEL: It's also a lot simpler.
CHARLES: Exactly. [Laughs] Because it doesn’t actually have to do the real work, it just has to capture the principles.
NOEL: It just has to be a good enough façade to show the ideas.
CHARLES: Right. So, you're still working in this application that kind of service [inaudible] for the book. But I'm curious then how you manage that because for me, writing a blog post is hugely time consuming. Writing a book must be even more so. Do you just have it dialed in that well that you can just bang it out or do you mix doing the book writing with working on the application because obviously, it sounds like both are kind of crucial to each other. You’ve already said, "The fact that I wrote the book is actually informing the way that I structured the code that made me write the book in the first place." And so, how do you interleave those activities to make a continuous workflow?
NOEL: There's a separation there because the book is the thing I do not at work, it's my side project effectively. I'm not ever mixing them in the sense that I'm really going back and forth between one thing and the other. The application is the thing I do at work; the book is the thing I do at home. They inform each other, obviously, but separating them is not usually a problem. They're not the thing I do at the same time, so they don’t relate to each other that directly.
CHARLES: I see.
NOEL: It's time consuming but it's what I do instead of maintaining an open source project or doing some other community thing in what would be side project kind of work.
CHARLES: So you just do it on your spare time.
NOEL: Usually, the book is written between 10 and midnight for people who are reading between 10 and midnight.
CHARLES: [Laughs] I like that conception. Do you think it would work at all if say, with your job there were some amount of time allocated for writing the book because I think there's some interplay and hopefully, it's [inaudible] interplay between the two activities.
NOEL: The way my work job is structured right now, I actually do a certain amount of time for blogging but that’s company blogging. It wouldn’t necessarily cover working on the book. It would certainly go faster if I had time because certainly trying to squeeze some parts of this into my allegedly spare time becomes challenging. Writing a book like this is not just writing a book. You're actually writing to some extent an application and it's not a fully featured application but it does have to work and the tests have to pass and things like that. It has to work well enough so that if somebody were to copy it, it would run. That can be frustrating when to come to writing the book and find out that, "Some gem is updated and now, there's some weird test failure in my book," is sometimes a little frustrating.
CHARLES: Yeah, I know. I can imagine. You said that the book, most of the examples are in Ruby on Rails. Would you see it being valuable to someone who was not doing Rails development at all, maybe he was doing something in Python or Clojure?
NOEL: Some of it is in JavaScript because the client-side Stripe library is in JavaScript. That’s kind of the central part of it especially for security purposes. Some of the code would carry because the Stripe API is actually pretty similar across a lot of these languages. I think some of the principles would still hold. Some of the tools are a little bit Rails specific but some of the basic ideas of separating things in the background jobs, the way that you need to think about the administration, handling failure, like some of that I think would have some value outside of the Rails world.
CHARLES: Were you explicitly thinking of how the developers with the web payment problem in
NOEL: The tricky part here is that it becomes very, very hard to write a book simultaneously using the Rails API and the Python API. It's very confusing. It's a 300-page book as it is and you have to make some decisions there. While I would like it to be valuable to anybody who's doing web payments as sort of a practical matter, Rails and the Ruby API are the ones I know best and that’s where the examples are because they have to be in something and they can't be in everything.
CHARLES: I remember a lot of those books that I read that used Java kind of as the one [inaudible] of the system that they were talking about. But it really was like, you're right, there's a line that we have to tread there because you can't just wave your hands and talk in one piece abstract principles that have no ground in reality. But at the same time, by giving concrete examples, you may limit the potential audience. I do think there is a path in there where your examples are accessible to people from different backgrounds.
NOEL: Examples are really hard, actually. It's a very tricky thing to have an example that is complicated enough to get the point across but not so complicated to get buried in extraneous details.
It's really a problem actually when you try to write about testing because almost any problem that is simple enough to be an example in a book is not complicated enough to show why test-driven development is a good idea. [Inaudible] has the same issue a lot of times like you start bringing these relatively robust methodologies to this little toy problems and it's hard to get across why they're valuable when you're working on a toy problem. Not impossible. There are people who do it.
CHARLES: If I can count the number of tutorials that were like modeling cats and dogs and people, it's like I've never written a single class that even remotely resembled any of that stuff.
NOEL: You're bringing in more complicated problems but then you become so sensitively dependent on the weird crooks of whatever problem you’ve chosen which can be difficult if you make it feel like it's less universal. If the idea is that these techniques or these tools are going to help you manage the complexity in your application, then you need to show an example that actually has enough complexity for them to sort of work. It can be really challenging.
CHARLES: You mentioned also the examples [inaudible] some of them are in Ruby that you're actually opinionated about making sure that the main logic is captured in objects which I think actually furthers that goal where you're not really bound so much to the Rails APIs. But then you said obviously, the other stuff is in JavaScript just because the client side Stripe library is implemented in JavaScript.
You wrote a book on JavaScript a few years back. So clearly, it factors into your development story. I like to often kind of try and tell people like we are all JavaScript developers, whether you know or not. Do you have any advice for people who were approaching JavaScript from outside the core of [inaudible]? What's the best way to make your [inaudible] approach?
NOEL: I have opinions on this. The problem is that I don’t do big single page JavaScript apps, for the most part. It's just not part of my nutritional background at the moment. Mostly the JavaScript I'm doing is relatively at the kind of thing they sort of derive as sprinkles of JavaScript.
CHARLES: Like I said, I think it's a far larger attempt than anyone cares to acknowledge.
NOEL: I feel like my decision to try very hard to stay out of the JavaScript ecosystem battles has paid off for me tremendously in most ways. At the same time, I don’t have really strong opinions about JavaScript build tools because I hadn’t really had a whole lot of occasion to use them. I very strongly recommend that people coming into JavaScript now that you use some of the ES6 features especially things like classes and stuff that like to give you a better structure. Structure in JavaScript gets a little bit more consistent than what you see in other programming languages. A lot of those changes were I think pretty beneficial to how I work with the language.
One thing that I like to do when I am doing something that is smaller, too small to really bring in a framework because I'm still doing mostly kind of jQuery, is I have a style where I really do try to isolate the jQuery in the DOM from the logic in a way that they don’t always see people do on the theory that the DOM is a big 3rd party dependency in a way that on the server side, the database is a big 3rd party dependency. And in both of those cases, we kind of pretend that they're not big 3rd party dependencies because it's easier to integrate them, but eventually that kind of hurts. And I find raw jQuery and raw JavaScript is very hard to read and hard to understand. So, I think it does a little bit better if you start burying it behind some stuff that has some more semantic [inaudible] and things like that.
And then we get to the point where you need a framework that actually has data binding even if it's a small framework like Vue.js or something like that, then you have some habits that will help you as you start building them.
CHARLES: I think it's been interesting. Obviously, you did JavaScript a lot here but having that separation in kind of a mental model of what is my representation of the data and how am I actually presenting that to the user. It's kind of scary how universal that concept is and how well it will serve you as you grow from the simplest little one liner JavaScript thing to a whole full-fledged single page application using whatever framework you choose. If you abide by those principles, it may not be easy but it's going to be a lot more tractable.
NOEL: Your transition to using one of those tools is going to be a lot easier if you already in habit of separating out your display logic from your actual logic.
CHARLES: Yeah. Believe me, I'm not looking to like draw you into any kind of controversy here with JavaScript or Rails. But in the last several Ruby conferences that I've been to, there's been a lot of talks and a lot of discussions about 'where's the Rails community headed', 'where's the Ruby community headed'. How does it fit into this kind of new ecosystems that are emerging and what's the role that it's going to play down the road? And so, I'm just kind of curious to get your take on that as someone who operates in a bunch of different environments. Is Rails something, if you're starting an application from scratch, you would pick up again?
NOEL: Yeah, I still pick up Rails for new applications. I think that, especially because the ecosystem is still so far ahead of all the newer tools ecosystems, I still think it's still the best way for a small team to act like a big team. We're definitely investigating other stuff, other tools.
All of our Table XI developers are trying to pick a framework that they don’t use everyday ideally in a language that they use every day and build a common app in it just to try out some new muscles and get a sense of what the strengths and weaknesses of some of these other tools are. We're starting to bring them in slowly to our server and client side repertoires where they're appropriate.
I think that Rails is great but it's not perfect which leads the possibility that there will be something better eventually. I think it will take a while for something like Phoenix and Elixir to build up the ecosystem and the number of 3rd party tools that the Rails community has.
CHARLES: We've been playing around with a bunch of different tools here. I actually started a side project and I was using Rails and I was blown away. I was like, "Oh, I forgot how easy it actually was." And that actually can't be discounted and things like speed and things like this lightweight feeling, you can [inaudible] for the lack of an ecosystem. I certainly made that mistake with Node.js. NPM installs at the very beginning were super fast and that was the reason that you weren’t installing anything at all.
[Laughs]
NOEL: Rails still prioritizes a certain kind of developer experience in a way that is really great for projects up to a certain size. I think there's a significant dispute of where that certain size is.
I have a coworker who did a Rails project recently after also having done a bunch of JavaScript projects and had a very similar reaction, "I forgot how easy some of the stuff actually can be." Eventually, you get to a size where some of that easy search could be less [inaudible] in terms of something a little more structured. But there's still a lot of value there.
I find the Node ecosystem honestly really complicated and confusing relative to the Ruby ecosystem. And some of that is just my lack of experience with it.
CHARLES: We're [inaudible] everyday and it's complicated. It's just that it's huge. It's just mammoth compared to the Ruby ecosystem and I don’t think it started out that way, but it certainly is like that today.
NOEL: Rails is at least somewhat focused on a particular size problem. And I think that that makes the ecosystem a little bit more manageable. I think the JavaScript tools are trying to solve a lot of different problems for a lot of different people sort of under the same umbrella and it gets very hard to do that.
CHARLES: Well, that’s about it for our time. Thank you so much for coming and talking with us.
NOEL: Thanks for having me.
CHARLES: Yeah. The name of the book that you're currently writing is?
NOEL: It's 'Take My Money: Accepting Payments on the Web'. It is available at PragProg.com. And then you can find anything I'm doing at NoelRappin.com. Keep an eye out there because there's going to be a new project that hopefully will start by the end of the year. I'm a little less confident that it's going to than I was, but I'm still hoping. Also you can find me on Twitter @noelrap.
CHARLES: All right, fantastic. Bye everybody!
In this episode, Yehuda Katz, co-founder of Tilde, OSS enthusiast, and world traveler, talks about what's in store for Ember.
Yehuda Katz:
Transcript:
ALEX: Hey, everybody. Welcome to the Frontside Podcast, Episode 46. My name is Alex Ford, subbing in for our usual hosts, Brandon and Charles, today. We have an awesome episode. We have a really special treat for you. Co-creator of Ember, Yehuda Katz is joining us today. Hello, Yehuda.
YEHUDA: Heyo!
ALEX: We also have a first time Frontside podcaster, Chris Freeman. Chris, do you want to introduce yourself?
CHRIS: Hey, everybody.
ALEX: We've also got a podcast Frontside favorite, Robert DeLuca.
ROBERT: Favorite? I don't know if you say that. Hey, everyone. How are you doing?
ALEX: I'm really excited about our guest today. Yehuda was just in Austin a couple of days ago. He gave a great meet up talk and a deep dive into Ember and it looks like you're going on-tour with that talk, Yehuda. Is that what I saw from your website schedule?
YEHUDA: Yeah, I'm not sure exactly. I change it up every time, largely because things happen. So if I say this thing is 'active' or 'in progress', and then it actually shifts, I have to change it up. I've been talking a little bit about what's up on what we were working on.
ALEX: Do you want to give us a brief outline as to what's going on in that talk for those podcast listeners who might not be able to attend? What's going on with Ember? What's new? What is it that you're trying to get across here?
YEHUDA: Sure. Actually, the talk I gave in Austin was, you're right, it was basically a deep dive. It was really focusing on a few targeted things that we're working on. I would say that at a high level, we're basically working on a couple of things. One of them is generally more integration with the ecosystem, things like ES6 modules, classes, components that look more like HTML and more graphic components and things like that, also improving EmberCLI so it's more integrated with other tools that people are using.
A lot of that stuff has to do with the fact that Ember started a long time ago now, like five years ago or so. And so, I think we've actually done a pretty good job of keeping up with things. For example, we adopted ES6 modules and promises a while ago now, and I think generally speaking, we tend to keep up with the ecosystem. But because we've been around for so long, there are certain things like classes, where it took a while for that feature to catch up with the functionality that we were using in Ember. Decorators landed a little while ago as a stage 2 feature in TC39, and that lets us really take a bigger chunk of the functionality that we have in our class model. I make it work for everybody with class syntax and that's something we're pretty excited about. So that's one area just generally taking things where Ember had its own stuff and try to integrate a better ecosystem.
Another big area is this mobile readiness and also, a lot of that has to do with the fact that things like service worker have just recently landed. For example, AppCache was a nice feature in some ways. Some people at Google will kill me for using the word 'nice' in AppCache in the same sentence.
[Laughter]
YEHUDA: But AppCache was trying to accomplish something for a long time. I think it did some version of what it was trying to do. But really, using AppCache is a default behavior for all users having - there's too many caveats to make it work well where service worker, because it's more of level one and more directly controllable is a better fit for something that we could ship with all Ember users. We basically want to use Ember and EmberCLI, you build an application, you get a good mobile experience out of the box.
Some of that has to do with trimming down parts of Ember that we don't need to be using in simple applications. Some of it has to do with service workers, some of it has to do with things like Glimmer 2, just making the performance better. But generally, that's the other [inaudible] so it's basically mobile readiness on the one hand and just integrating better with the one ecosystem are both big picture things we're work on.
ALEX: Something that you brought up in your talk where private Ember methods and how a lot of people use private methods and you have to keep them around, what you we’re just talking about that was unifying around the conventions of programming in Ember. Whatever JavaScript people bring in to Ember, you want to try to incorporate that as the language moves forward which is, I think, a really interesting problem.
Also, something you could talk about a little bit further is what you look for in the way people use Ember going forward and how you have to kind of bend the framework to allow it to be backwards compatible. I'm curious what that decision making is like.
YEHUDA: What you're talking about and what I talked about yesterday is what we call 'intimate APIs' and that basically means APIs that we never intended to be public. But for some reason or the other, people got their hands on them and started using them. I gave a somewhat elaborate example of funky case yesterday. But basically, the way we approach generally dealing with compatibility is pretty similar to how the web itself does it.
First off, there's a thing that we mark as a public API. We just don't break it unless we make a major version which is very rare. We have basically one of those the entire Ember, and I don't think there's anyone coming in the near future.
One option is if we don't like something, we just break it. That's very uncommon. Another option, and this is way more common, is that we try to build -- it's for public APIs -- we try to build a new API and we try to nudge people away from the old one.
One approach for nudging that is probably the most common is deprecation. So, deprecations themselves don't violate semantic versioning because we're allowed to say, "Please don't use this anymore."
The one area that's annoying about deprecations is that if backup code that powers the old feature has to still stick around. And so something that we've been working on around that aspect, around deprecations is something we called svelte build, which is basically the idea that we'll mark every deprecation with the version, that it will start to be deprecated in and people can ask for, "Please don't include any code that was deprecated out of 2.4, or 2.5, or 2.6, or whatever." Then, we'll automatically slip it away. You could think of it sort of like as a reverse feature flag.
CHRIS: Wow, that's actually super interesting. I didn't know that.
YEHUDA: We haven't finished it up yet but the RFC that talked about it and actually some old guy who actually wrote the RFC along with 1.13 when I noticed that 2.0 was going to end up being a pretty painful release for a lot of users.
We did a lot of things around 2.0 to make things less painful, like we made sure that 1.13 contained all of the deprecations that you could possibly need, as well as all the new features. So if you went to 1.13, you could look at all the deprecation warnings, switch to the new functionality. As long as you have no deprecations left, 2.0 was just the exact same code without any of the deprecated features. But as we're working on that, I realized that there is no real reason to give people such a heartbreak, if we could instead just slip away the code. So that's one approach and I think, more or less deprecations, and then eventually, svelte builds are the normal path.
With regard to intimate APIs, those are cases where people came to rely on very specific timing or very specific API, very specific details in some internal API and for those things, if we know that a lot of people use them -- usually they get used to like a couple of add-ons. Maybe Ember Wormhole, which is really popular, we'll use it. Then it's really hard for us to remove those things. Those APIs are harder to maintain compatibility for because the exact details of what they even did was never really well-defined in the first place because they were never documented. So usually what we'll do is we'll look at the usage of the API. We'll come up with a new API that is satisfying the exact same use case, and then we'll deprecate the old API.
Let's say, you want to deprecate something now, make sure it's deprecated in 2.8. And you'll know that if you were actually doing the whole song and dance that deprecate what is intrinsically a private API, so it would be within our rights to say like, "Sorry guys. You used the private API. We're not going to help you."
But we really think it's important that for Ember, if something feels like a breaking change, that we're not doing it willy-nilly. If somebody upgrades to 2.9 and all of the sudden, Wormhole stops working, they're not going to understand that the reason that happened was because Wormhole did a bad thing. We basically need to do a clear pass.
So we'll do a deprecation in LTS release, then we'll wait a couple of releases before removing it. Then usually what happens is, in the meantime, we'll go ahead and we'll submit pull request for the big add-ons that we're responsible for, and we'll also try to talk and write down why it happened.
Historically, we've done that a few times and it's worked okay. There was an example of this, which is the lookup factory API in Ember which is really a boring API but it's used by a bunch of high profile add-ons. So the reasons why we needed to deprecate it were silly. They were just a bunch of bad behavior in the old thing that was making everything super slow. We can make things faster by giving people exactly the same functionality without exactly but identical guarantees.
So there were some 'guarantees' which don't even make sense for private API. But there were some things that in theory, the API did that we didn't want to support because of performance reasons. And so, we gave people a new API that is, for all intents and purposes, identical. All users will be able to use it in identical way. But it doesn't have exactly the same weirdness and that weirdness was pretty expensive.
ALEX: So you've trained Ember developers to be on the 6-week release cycle? They're looking at the blog posts. They’re looking to upgrade but you've been involved in a lot of open source projects where I'm sure that wasn't really the case.
Say, jQuery has a huge API and obviously, some things have to be deprecated on that and you were on the jQuery core team, I should mention.
YEHUDA: Rails has the same story whereas API releases every year, more or less.
ALEX: So, I'm just curious. The fact that you have Ember developers, I would like to think bingeing on your word and hinging on those updates, how would you go about, say, the Rails API? Or the jQuery API?
Maybe, now you're involved with Rust, and maybe the plan is to have Rust on a 6-week release cycle. I'm curious, if you don't have your developer’s attention, as you do the Ember developers, how do you deprecate an API like that?
YEHUDA: That's a good question. How do you deal with deprecations if you're releasing quickly? I think there's a couple of important points to make here. First of all, Rust is on the 6-week release cycle. Sometimes, as the same kind of story with intimate APIs, it's much less common with a strong-type system like Rust.
I guess, important things to point out, first of all, deprecations don't intrinsically break things. When we talk about intimate APIs and deprecations happening pretty quickly, those are APIs that are large, if someone is not paying super attention to Ember, they're probably not using those APIs, like they would not have known to use them in the first place. They might be using an add-on that use those APIs and the intimate API deprecation process causes the add-ons to update relatively quickly.
In terms of regular deprecations, those deprecations stick around forever so you could come back a year later. For the most part, you could make an app that was 2.2 and upgrade it to 2.9 as long as you upgrade the add-ons that you are using at the same time and everything will work.
We also realized that some people can't upgrade every six weeks and that LTS release process which is basically a six-month process, more or less. It basically gives us a communications channel to people who want to pay less attention. The way that that works is that, every four release cycles, so that six times four is 24 weeks -- about half a year. Every 24 weeks, there's another release.
We assume people are on that release channel. Some people operate at 2.4, 2.5, 2.6, 2.7, 2.8. Some people go directly from 2.4 to 2.8. For those users, we [inaudible] ecosystem, please make sure you support the last LTS release, which means that if your user's on 2.4, and 2.8 comes around, you know that you could have stuck to 2.4 and generally got add-on support and when 2.8 comes around, you should probably upgrade. Also, with intimate APIs, we make sure we always deprecation them one LTS release before we move into an LTS release.
Now, what that means is that if we want to remove something by the 2.8 LTS, we have to have already deprecated it in 2.4. If we want to remove something by 2.12, we have to remove it at 2.8. So six months is still not quite the one-year Rails release cycle but it's starting to get to a reasonable state.
Also, I would point out that the LTS releases, the support policy for them is that they're four cycles long. We do bug fix support for six cycles and security releases for 10. What that means is that we're actually supporting LTS releases. We were supporting two at a time for security patches -- two and half basically -- and we're supporting one and half at a time for critical bug fixes. The one and a half basically means that when 2.8 comes out, you have two release cycles which is basically three months to upgrade. If you're on 2.4, and 2.8 comes out, it's not like, "Oh, my God. Panic! I got to upgrade right now." You can take a few months to upgrade. Basically, 2.4 came out, you got all the deprecations you need to care about. You had six months to deal with deprecations and then another three months after that.
Even in terms of intimate APIs, where in principle, like Rails and jQuery don't even care about those things for the most part -- ah, jQuery cares about it even more. But most projects will get private APIs and say, "Sorry you used the private API. Why did you do that?"
Ember is a rare project in that we actually deprecate things that we know where we actually use them. We have a process for dealing with them. Even that process, like I said, it's not a six-week process. We don't deprecate something and remove it. We deprecate something and then give it a pretty long horizon before removing it.
ROBERT: I'm curious. You brought up that you are the common element between jQuery, Rails, and Rust. I know that there are, at least, between Rust and Ember and from Rails to Ember, there have been a lot of commonalities and lessons learned in how the projects themselves are managed. But I'm also curious with Rails, Ember is clearly pretty heavily influenced by Rails, which you were doing before. You've been working on Rust quite a bit and I'm curious, does your usage of Rust, even though it's a very low-level language, does that influence Ember at all? Does that change how you think about the framework or JavaScript in general?
YEHUDA: The number one thing that I got out of all those projects that I think used to be a thing is something like a conventional reconfiguration idea which is really not - I think the mentioned of reconfiguration is probably not even the best description of what it is. I think the idea that communities that are all working together on the same thing to build that thing bigger and better and better and better and build ecosystems around that thing, those communities are able to build much higher than communities that ask every single developer to put together a bunch of pieces themselves for profit. That's the basic idea.
If you look at Rust, which is conceptually very low-level, you’ll find that there are things like Cargo, which is a tool that not only builds your thing and not always package manager but it has a convention -- not only a convention -- it has a built-in support for documentation. So you're on Cargo docs, you get all your documentation for all your dependencies. You run Cargo bench. That's a built-in thing that runs your benchmark. You run Cargo test that runs your test. To mark your documentation as being Rust code, it will automatically run your tests for you when you run Cargo test. We will build your examples for you and make sure your samples keep compiling.
There's all this stuff in Cargo that you would not necessarily consider, like it's basic [inaudible] helping you get your workflow the same. Then there's things like Rust format which you've been working on and there's been a huge debate in the community about exactly how much configuration we want to allow in Rust format. But the irony of it is something that most people agree with is that we should try to come up with some kind of default style for Rust that everyone agrees to, that most people can pick up and use the Rust products where it's often used.
Then there's things like Futures and [inaudible], where the goal of those libraries is really to make there be a single central way that everybody does [inaudible] in Rust. These are all things that if you look at like C or C++, which are languages that are sort of in the same low-level in this space, in the same kind of area, you'll find that those languages have billions of ways in doing all of those things and there's so many different styles and so many different workflow tools, so many different things that you can make in then a million things that [inaudible].
Even the Rust is conceptually low-level, it doesn't really affecting every single environment as some sort of things that everyone doesn't need to do themselves. I think, an important thing that people don't always get about convention configuration is that it's not just that everybody doesn't have to do all of those things and it saves you some time, it’s that when everyone is doing the same thing, it’s a lot easier to build another level on top of that.
For example, a fast food is a great example of this in Ember. The fact that everyone initializes their application using an Ember initializer, the fact that services were these global things that are sort of global- there's no better word than 'services' but global services, the different components could share the fact that those are all going in the same place. The fact that the way we manipulate DOM is always in a constraint single area.
Almost things mean that when it comes out and to build something like fast food, it’s pretty easy to take almost any Ember application and make it run in the fast food environment because we know what we're looking at, and that's something that isn't necessarily true about other tools.
For me, Chris, the number one thing that, I think, all of those sharing, including jQuery, actually, like jQuery said, "There's so many different ways that people do DOM manipulation, why don't we unify it into one thing that I everyone can use?" You know, the 'jQuery plugin', which is something that has falling out of favor over time. The reason it was so popular was largely because people knew, "Okay, I'm dealing with jQuery object. If I just put a plug into the jQuery object, it makes sense." People understand how to use it.
I think that's something that a lot of projects that I used to share and it's also something that is not close to ubiquitous. It's very uncommon, actually. So that's one thing -- the conventional configuration story.
I think, another major aspect of all this, and this is something that jQuery and Rails do not share, but Rust and Ember have the RFC process, which more or less, is just a wave as a community of saying, "The way that we agree to add new features to the project is not something coming down the [inaudible] with a tablet every year."
At a conferencing, we have agreed to add these features but sometimes people are core team, but sometimes they're not. Sometimes, they're actual contributors, coming with an idea, write their view down in a format that we all know how to do with. Then there's a community discussion about it. Sometimes it takes a very long time. Sometimes it's not. But then we eventually come to a conclusion about what it is that we're doing. Eventually, the core team agrees to merge the RFC.
I think one of the nicest things about RFC process is that it produces an artifact that you can come back to a year, two years, three years later. If you say, "Oh, I wonder why they've made that decision. I wonder why that's the thing that they did," and the reason why this is great is that the RFCs are not gospel. They’re not something that we should hold onto forever. But at the same time, we don't want to reel it again, things that we already discussed that in-depth over and over and over again.
If a person comes back and they say, "Oh, why do they do that? The modification of RFC, why are these instructions directors are like that?" If they go back and look at the RFC and the thread associated with it, and the thing that they want to bring up is something that was already discussed, it's really no reason to bring it up again.
But maybe someone have thought of a different idea or a different reason to dislike or to disagree with the decision that was already made. That was already discussed. That's a much better rationale for bringing up for re-litigate. In other words, re-litigating is actually good but if you re-litigating five times a day, on every decision, that's not why you move.
So RFCs, by their very nature, the fact that the core team is doing things in public like anybody else and everybody else is also participating in that same process, the fact that artifact tells you, more or less, exactly what was discussed, makes it really easy to decide when is a good time to revisit some of the questions.
ALEX: Do you find that poll request has the same process as an RFC and it's an artifact you can go back to, it's a place to have communication that is visible to everybody, unlike say, this micro message service such as Slack where context is just lost for the public. I'm curious if you want to see that modeled in poll requests or if an RFC is where something like that belongs.
YEHUDA: I think, poll requests are great. I remember that when I was somewhat like the first user on GitHub who's not a founder of GitHub. I remember one of the things that excited me about GitHub early, although, the very beginning, didn't have poll request yet. but one thing that excite me about poll request is that before poll request, every single time I would use an issue tracker so they were like a billion issue trackers like [inaudible] whatever, and at that time I called it 'patch management'. I want something that helps me manage patches because the actual discussions are not the higher of it. The higher of it is something that submitted a request for me to merge in this patch. How do I merge it? How do I discuss with them? Those things were always really hard so I might ask people to upload patch files or whatever.
It’s hard to remember how bad things were but the number one thing that was just so obvious but also so terrible about the ecosystem before GitHub was patches were like old mailbox approach. Like you'll make a patch, and hopefully, get it to the right place at the right time. So I think, poll request and comments of poll request and many of the improvements that have been made for poll request are great.
The reason, I think, RFC are really important in addition to poll request is that, by the time someone actually took the time to write some code and submit it, it's very easy to look at it and say, "Well, I don't necessary agree on all the things here but I don't want to give a person a hard time that will do the work," whereas somebody submit some idea early on and they say, "I have this idea --" It's actually a lot easier to sort of get into details at that point and say, "Don't do this. If we should do this or it doesn't fit that well with this other RFC or this other poll request that's already open --"
But once somebody actually does start and actively working on the feature, I think, poll request are great, like most open source project these days. Ember doesn't ever committed anything to master. Everything goes to poll request, and even core team stuff. I also find that when I submitted a poll request or anybody in the core team, there are almost always people who are not in the core team that saves or fix in the poll request, for various reasons.
Of course, poll request also are the usual mechanism by which people run things like CI and linting tools and things like that, called quality tools. I think, the poll request workflow is really good. In terms of other messaging services, I think, there just sometimes the need to have conversations that are faster than poll request and I don't really have any problem with check conversations. But I definitely agree that it has a deep conversation.
This is something that happened in the [inaudible] a lot where we having this conversation with the core team and somebody will say like, "We should really move this out into a public discussion, or move it into RFC. If you don't agree with this thing that somebody said public, can you say [inaudible]."
So I totally agree that if there's a thing that people want to say in private about something but it's just in private for convenience, it's not private or transient for any good reason, actually getting out there onto the issue or the poll request and say your opinion and letting the conversation back and forth happen there is, for the exact same reason as you said, very useful.
In fact, Aaron Turon from Rust brings this point out repeatedly. We just had a conversation this past week about the fact that we have sort of a normal Rust project that, let say in the core team room and it's a technical topic, and it doesn't have anything sensitive about it, people always say like, "Hey, can you move that into Rust Internals," which is a public room. Or like moving this course, we have internals at Rust-Lang.org and I keep thinking Ember could use it.
Basically, this sort of a hierarchy of private to public or transient to sort of a free-form discussion forum like this course to something like a GitHub issue, something like an RFC to something like poll request. There's like a hierarchy of how much of those artifacts are easy to search and find.
But I think, you're totally right that there's no reason why, things like the core team needs to exist because at some point, the buck has to stop somewhere. Somebody has to make decisions. Somebody has to actually responsible for laying out the cross-cutting vision for the entire project.
But those things are actually pretty lightweight. The core team when it's doing its job, it's just sort of making an omnibus of everything that the community is thinking at a particular point and making it more concrete. While, I think that's important that there are spaces which are core team spaces, or spaces that are transient, I think, a lot of questions that people have in the Ember slots are important that people who can just jump in and ask them. I think, getting things out into both public and more of permanent artifacts spaces is good.
ALEX: Rob, you are a co-runner of Ember ATX and I was hoping you could speak on the fact that we've gotten some core team members down to Texas to come talk. It’s nice that they're able to share their message with what's going on in the core team. But also, they're doing work. They’re seeing how real people use Ember and then taking that back to the core team. I was wondering if have just want to comment on that and your work on bringing some really excellent people who make decisions down to Austin.
ROBERT: As a meet up runner, like a co-runner, I guess. It's me, Jeff, and Lydia that run Austin Ember ATX. We really like to try and bring people that are deep into Embers core into Austin to talk about the framework that these people work in daily. It's always awesome because whenever you get them there in the flesh, you can ask questions. I guess, we can go back to where Slack is, like you have the higher bandwidth communication but it's even higher bandwidth when you're in person. Getting those people to talk to people that are actually working on the framework daily is I think, hugely important and that's why we work really hard to try and bring out people that work on the core.
YEHUDA: For what it's worth, I think that Rails and Ember shares a common core value, like other projects have, more or less. Ember core team people almost exclusively actually work on Ember apps as part of their jobs so I work on skylight. Having some responsibility in the real world for apps that you are working. It's a big difference in just [inaudible]. I definitely noticed a few.
Sometimes, I'll be working on a project for a while, like when I was working on Rails for 18 months and never actually used Rails. I mean, I used it but not for anything significant during that time. I, sometimes, get into a rut where I'm working on Ember a lot and I haven't had a chance to work on an app at all.
Then, you go back to work on that for a day and it's like, "Oh, my God. There are so many obvious things that I can make better here." Like the kind of things that you would think about when you're working on your framework stuff is not necessarily- as quick it gets, the quickest things that you can fix. The Ember welcome page is a good example of this.
I think, when someone is training, it's very easy for them to notice that it would be great if there was some kind of welcome screen for people. But it's not something that a framework author would necessarily think of on your own. Similarly, getting down to places that are not my usual haunts and hearing people bringing stuff that I just hadn't heard before. Like things, "Oh, that's a good idea. But I haven't heard that."
A lot of that just come from the fact that the core team has a lot of different kinds of users in it so the people doing training, there are people doing apps or people doing consulting, there are people doing rescue projects in that kind of combos is pretty good. There’s a long tale of all kinds of stuff, like people using web sockets for network people using React. People are trying to do Redux in Ember, who knows?
That long tale is impossible to represent all that long tale. In a core team, we try to get as much as possible. It's impossible to represent all of them so going out there and talking to people doing weird stuff and weird doesn't meant pejoratively, just unusual stuff.
Like Ember, really wants to be pretty flexible under the hood. Even though, it's a pretty conventional tool, we want it to be flexible under the hood so I kind of no way of flexibility is but sometimes, I'll talk to somebody and I'll be like, "Oh, in retrospect, that particular thing, I thought that was flexible as missing as little knob that we can add." So I really enjoy it.
CHRIS: Since you've been pretty heads down on Glimmer 2 and you are actually traveling out and talking to people, I'm curious, are you noticing any common themes from the feedback that you're getting recently in terms of what users are saying? Do you have an indication of what the next move might be? Or what people are asking for?
YEHUDA: For Glimmer specifically?
CHRIS: For Ember in general, or Glimmer specifically. But I imagine, you're probably getting general Ember feedback.
YEHUDA: Yeah. I talk about this a little before like the two big areas of interest are mobile readiness and better integration with the ecosystem. Integration is the wrong word. There's nothing wrong with Ember to that extent but people want classes.
I think, those are the biggest picture things. I actually noticed a couple, somewhat interesting things when working with Ember. We ship the Glimmer Beta six weeks ago and we're doing another beta just because there's a couple of bugs that we got that were trickling and we want to make sure we get it right.
I've actually noticed the people have on the one hand, the story of Glimmer is that we're pretty similar to React in the sense that you should think of what we're doing as a top down, you render the whole time and that there are some nice [inaudible] that use Ember.set or the set API, then we are able to do what people should do with component update automatically for you. For [inaudible], then we know, "Oh, this whole area, doesn't need anything to be updated."
If you think about it that way, if you think about it as how can we render [inaudible] around set, I think, you'll notice that Glimmer updates are always faster than React's updates. But people have come to really rely on the sort of quasi-guarantee that if you didn't update something, it doesn't change the DOM associated with it, or even execute code associate with it.
I find it sort of interesting. This is like meta problem, which is React actually got some things right about how to make this story performance. Part of that has to do with not assuming that you need as much bookkeeping as Ember always assume that you need. In exchange, you get much faster initial render and you have to do more work around updates.
We actually have a pretty good story here. Ember.set is pretty nice because it lets us use API that our users are used to, say, generate [inaudible] upon updates for you and that's nice. But people get very upset when things run that they didn't expect, which of course, is not how React people think about it. The way React people thinking about it is, of course, [inaudible]. That's the whole API. It runs until you told not to. In Ember, things run at people who don't expect to get very angry.
I think, you have to be one that I'm thinking about and that's a lower [inaudible]. But in terms of low-level, like thinking about how to shift the mental model of an Ember user so that we can get away with less and less bookkeeping upfront. I still do too much bookkeeping as part of initial render but in order to keep reducing the amount of bookkeeping, we need people to get into mindset of things are fast initially and the tradeoff is that your updates are slower, unless you do whatever.
There are mighty things like React does this wasted time debugging tool or they basically tell you, "Hey, you didn't tell us not to render this but it never render," so you should try and do that. To be honest, I think, having to write something once your component updates, that exactly, "Do I [inaudible] is not okay. I'm not willing to do that." But there are a lot of things that approximate that were more similar to Ember existing APIs that we can find.
I guess, my medium-term goal here is to make it so that we have the sweet spot so that the initial render is always very efficient. I think, we're getting closer. There's still some back problems that we can deal with so. Initial render is very efficient, fast components are fast, and more or less, you get good updates performance until you reach a certain amount of scale and then the escape valves are much nicer [inaudible] before an update. They're basically little [inaudible] where you say, "You know this thing can't change." It would be hard for me to explain. It would feel like it’s [inaudible] we talk about.
We’ve had a bunch of discussion about different escape valves, and the thing I'm most interested in is finding once that feels semantic. Should there a component update doesn't feel like you're describing anything other than React's API. I'm more interested in things that feel like you're talking about your app or your data.
ALEX: Yeah.
ROBERT: Keeping with the Glimmer 2 topic. Glimmer 2 is written in TypeScript, right?
YEHUDA: Yep.
ROBERT: Do you see that creeping its way more into the Ember community? I guess, I kind of want to get your general thoughts on TypeScript and what your experience was writing in Glimmer 2.
YEHUDA: I actually really like that. But the story with TypeScript was that I was writing the Glimmer 2 originally in regular JavaScript and I came back from a long trip. I want to show Godfrey what I've done and I was having trouble explaining some of the interfaces. I happen to know that TypeScript is a lot of it is just interface so I'll just use their syntax and I think, I open the playground and I type in some TypeScript interfaces. Then I was like, "Oh, it's annoying that if I reload, I'll lose it so let me copy the interface into the ReadMe, basically and to the app."
Then over time, like not very much time, I was like, "Oh, it's very annoying that now that I have this, I really wish I could just use it inside of the code." So we started doing that. It took us maybe a week of actually being to be able to use TypeScript for real. But honestly, the code base is pretty big at that point, and the actual was not so bad.
A lot of the reason why it was at the time, TypeScripts like VS Code, TypeScript was still younger and it wasn't a slam dunk. For example, in today's TypeScript, you can just have JavaScript files in your directory and just tell it to [inaudible] that works. At that time, you couldn't so you have to really change all the files and there are some things like TypeScript requires you to specify in classes. It requires you to specify all your fields and I think that's fine, that's good for TypeScript. But you're not going to have already done that in JavaScript so you can't just like rename all your JS files with TS and have a nice day.
So it took as a little over a week, I think, and we also have to write the Broccoli TypeScript thing during that same period of time. That was another thing we have to do.
ROBERT: Yeah, that's a [inaudible].
YEHUDA: Then, with TypeScript change the compiler API a few times so we have a bunch of [inaudible] to do. But other than that initial like [inaudible] to get it working, I would say that it was every single point in time, there was always a [inaudible] win, in terms of what we had to do to make TypeScript happy and what wounds that we got out of it.
You get things like, obviously, people know about code completion. I personally like code completion. I think, it's helpful. But I think, jumps to definition is actually more important feature than code completion. Just like what is this method? I want to look at it. You can jump directly to it.
Also, for me, the code completion of parameters is way important the code completion of method names so when someone teaches you about code completion, they will usually show you, "Oh, look [inaudible]." It gives you the list of all method names, and you're like, "Well, that's fine. But I probably know all of those method names."
But you don't necessarily know all the parameters. Especially, once you start using types, the parameter or information is actually quite rich, like it's telling you this is a component definition, this is a string or this is whatever.
All that stuff, I think, I basically come to realize from using TypeScript that Microsoft has done a really good job with [inaudible] code of distilling down to just what part of ID experience is really good and just bring you that to an editor, that feels a lot like Atom or Sublime, or other than that. So if you get like a pretty good ID experience, without all of [inaudible].
ALEX: I've seen some talk on GitHub about people who want to write their Ember add-ons on TypeScript and I did not know Glimmer 2 was written in TypeScript until just now. I'm glad that was brought up. But we as Ember developers have been trained to use convention over configuration.
The convention is Ember is not written in TypeScript. We're starting to see convention now where logic has crept into the template, or it's not as much as convention as people are doing it right now. I'm curious what your thoughts on that and more is treating Handlebars as a programming language and something that we're seeing now in real production Ember code, so what is the path going forward there because it is happening?
YEHUDA: Yeah, I agree. I just want to say, I didn't actually answer the previous question in full. I think my expectation is we have no interest in ever making TypeScript as rudimentary part of Ember. I think Ember should always work and work nicely with regular JavaScript. I don't want to do anything that would lean to heavily on people having TypeScript around. Certainly, I don't want to do with Angular did, which they use the types as semantic markers for dependency injection and something like that. But I do anticipate things like Ember-metal for sure, Ember runtime being written in TypeScript because anything that's pretty low-level and a lot of algorithms benefits a lot from clearly delineating interfaces.
I think, another thing people don't realize is that there are all these [inaudible] interfaces floating around your code in JavaScript. But like you are in a class, it's pretty easy to document what the class does. But if you have an interface, it's not really any good mechanism for describing it and it can become very [inaudible] and it's Like, "Please give me an object as these methods on it and build these methods."
It’s funny because you don't realize until you start using TypeScript that it's a very recursive problem. It’s like, it has these three methods on it have these six parameters and these parameters have these interfaces and those have these. So you can actually start describing a very complicated thing and it's like those complicated things didn't exist before, they were just very implicit. The explicitness of the interfaces is not you can write [inaudible]. You can write the three interfaces and have the methods with all types of networks [inaudible].
I think, I expect Ember-metal, Ember runtime, other low-level parts Ember, certainly the component library now it's like directly linking in with Glimmer and Glimmer were written in TypeScript so that stuff would really benefit with TypeScript.
In terms of Ember itself, using TypeScript, I think we have sort of a medium term goal of letting Ember apps use TypeScript if they want. I would say that making that story really nice, pretty much leans on ES6 modules and ES6 classes so we have some of the ES6 modules but there's still a lot of Ember [inaudible] whenever module story.
In terms of classes, were still using the old-style class system and that class system is actually just really hard to get the types working in TypeScript. It's hard, period. But like React has a similar problem and there's lot of advance features that only really exists in [inaudible] express ES5 class [inaudible] and TypeScript doesn't have all the features.
My expectation is that sort of along the same path as getting ES6 classes. We will also get a lot of TypeScript support in Ember and I think a lot of people are interested. A lot of people have work on Glimmer now and they're like, "I would love to use it in my app so we'll probably have that happen."
Coding your templates, was the other question. I sort of have a mixed feeling about this because on the one hand, I actually do want Glimmer to be the programming language in production way. So either templating engines are just using the programming language embedded like the ERP. Or they are like Mustache or like the general templating engine -- forget what that thing is called -- but there's a bunch of template engines that use like the curly syntax and those things aren't very rigorous in terms of how they think about scope.
Like lexical scope, it turns out to be a pretty important thing about how programming language work. If you have a shitty scope story, people don't have a good sense of what's going on so like the Angular 1 templating story was you basically find your scope on wherever and you attach to a part of your template and that basically means that if you're looking at just temple, you have no idea what the actual variables mean, anyway, because any part of it could be choking up the scope to be whatever.
I start with Handlebars but have refined a lot overtime and I'm pretty happy with it now. The Glimmer templating engine is basically defines a programming language. It has scoping story. If you want a variable, name it. Use the as-pipes syntax and you get some variables there. Your function, your output, your components, and your helpers are functions and sometimes it's written in JavaScript, just like in Ruby cellular functions that are written in C. But ultimately, just like a C extension, it can't magically change the scope of Ruby program, helper or component in Glimmer. It can't magically change the scope of your template.
With all that needs, if you look at a Glimmer template, it's actually really clear what are the names mean. That sound boring but ultimately, that's one of the things that needs to you look up at a lot templating engine and not only really know what's going on. I don't understand what's going on, without thinking of what every single one of those custom helpers is doing.
I think Jinja is the name of the templating engine in Django. If you look at some of the templating engine like that or even like Handlebars before Ember 2.0, you really have to go that like 'for x and y' is a magic syntax that needs a particular thing. Because a lot of these templating engines are very flexible in the sense that they let users have or whatever, any particular piece of syntax could actually be creating random names that mean whatever.
I've just found, having worked through that in the Ember community, I'm very happy that we took the time to get that stuff solid. One of the nice side effects of that is that it makes some of the usual optimizations that people do on code work very nicely. Once we know all the names mean and know all the scopes mean, things like in lining specialization from invocation. This component is invoked here. It has these parameters, but those parameters are all strings and I can see the receiving end. The receiving end just fix those strings into attributes or something. At compilation time, like to combine all into one thing. This is an optimization that we haven't done yet because we been working on compatibility.
But there's a lot of normal 'programming languages standard optimizations' that we can do because we design Glimmer to be a programming language. The fact that we've done that is actually mean the root cause of people doing more programming language stuff in their templates, in older versions of Ember before, we had done such a good job of rationalizing everything.
You would start doing that stuff and you would start hitting clips where the behavior didn't work the way expected for some reason, then you just use a sub-expression as something and then depending on exactly which things you put into the slots, maybe it didn't update on the inside of the template. We always consider those things as bugs so we would fix the bugs that we encountered.
There’s an explosion of different kinds of things in a programming language and if you don't model variables as variables basically, then it's hard to know callbacks are callbacks, variables as variables. There's a lot of doubt so they would start using the APIs as part of them [inaudible] hit someone and they would pull back.
But today, the implementation of Glimmer, especially with Glimmer 2 is extremely [inaudible] standard, and what that means is that you want to do very [inaudible], parenthesized expressions with as type something and then you want to go and take that and send to the component and you have that and you put that value and put it to a service and you do all that and it works. That doesn't necessarily mean that it's a good idea for your template to be in a large program. That’s generally that. I think that's main question that you asked me and it is generally, for things to get really complicated.
But I think there is a reason for it and I think it's something we're doing to make it better. I think, the reason for it is that, if you think about the Glimmer core language, the main escape of what you have to get complicated expressions out of Glimmer and back into a reasonable place is helpers.
Let's say you have a big bunch of [inaudible], and/or whatever people are doing inside of their Glimmer templates and it's like a multi-line thing and you want to pull that out to a more reasonable place. The natural way to do that is to make a helper. But it's also pretty common that you have a complicated piece of expression that isn't reusable. It's not being reusable for multiple places and helpers in Ember right now are global so you may have this big block.
Another [inaudible] of computer's property, but computer property's don't have a nice- like I have a few internal parameters and I just do something that they always require you do something against it, the components off of this, and that is usually what’s you are doing. You're usually have what is effectively a function with a bunch of parameters in it and those parameters combine some way like with 'and', 'or', maybe there's some comparisons like 'greater' or 'less than' or whatever.
One of the things that comes out of module modification RFC and makes everyone pretty excited is the ability to have helpers in your templates that are local so it's a helper that is just sitting right next to your template. I think, those kind of things -- helpers that are right next to your template -- will give people who like you do not want to see so much code in your template, a much nicer story to explain to people why we're doing it, and what we should do instead.
A template has a three-line, fifteen is privacy expression and you want to convince the person not to do it. The re-factor is literally just to make a local helper, put the code in there and use the local helper. I think that's the better story to explain to people than, "Hey, I don't like that. It feels bad. What should I do?"
CHRIS: This brings up an interesting point that we actually encountered recently at The Frontside, we use helpers a lot and are frequently trying to get them to do all sorts of weird things. But recently, it occurred to us that one kind of blocker was that you can't compose helpers.
We had an existing helper and we kind of needed to make a helper on top of it and it suddenly dawned on all of us that, "Oh, we can't go up a level." We can't build a helper and its abstraction over another one because you kind of have to hit the dump. You have to have a component or a template or something to invoke that. Is that's true?
YEHUDA: I would expect that you could call the function with the arguments that looked ugly but I would suspect and I would say that you can call it and just pass the parameters and hash these [inaudible] and --
ALEX: Like a helper that invoke or something? Because to write a new helper, you would have to go back to JavaScript.
YEHUDA: That array an object. I expect that to work. Do you just need a helper calling another helper?
ALEX: Well, a helper composing, like composing several helpers into a bigger helper and then just calling in the template, much like how you might write some functions and that write a function that closes over them or something.
YEHUDA: Are we talking about a helper that takes the helper?
ALEX: I guess it could be. I guess, higher order helpers could be a thing in this case.
YEHUDA: Helpers that call helpers are helpers that close over helpers really should just- helpers are more or less functions. It would just be able to use them directly. I think, what you're saying is an interesting Ember phenomenon. I actually don't know which of two categories this discussion is in.
Basically, either. Either there is some good reason why this turns out to be difficult and there's like a missing API that usually fix it. Like in general, my mental model here is you're talking about a function so if you can just [inaudible] the function, it really should work and in that, it is hard. There's something weird.
Basically, what I'm saying is either there are some 'gotcha' that how it was structured right now, that's like an accident. That means they're not exactly as much like functions as we think or the mental model that you have using them doesn't make you think of them like functions. So you think that there are hard to compose but actually there are functions. Basically, those two things are equally likely Ember. I think that's unfortunate.
ALEX: I think that with them, you can certainly combine them in a template and you could even pass one into the other. What we ran into an issue was, similar to functions, if you are writing like an npm library, you may write five functions and only export one of them. That one function will compose the other four and call them.
In some cases, you may not realize, do you want to export that composed abstracted function until much later and it's okay, because you just import the function from somewhere else, then you say like, "All right. I'm just going to consume this function from another and now I have this combination put together."
Well, with a helper, if you already have a helper that does something and then you realized, "Oh, actually, I need to build an abstraction on top of this helper in a new helper," we so far have not found a good way to combine them like that.
YEHUDA: So probably, it will not succeed and having this conversation through to the completion year. I'll just say for listeners, what I find surprising about this, although, I can believe that there is something that makes it true is that helpers in Ember are really just functions and increasingly they really are like helpers in Glimmer are functions. They have a weird arguments signature. They take positional parenthesis in array and named arguments as dictionary and that's a convenience basically because otherwise, you have to scrape of the last parameter and try to figure stuff out. So that's a signature issue.
But generally speaking, helpers are supposed to be functions and if there's something that you could do with regular functions you can’t do them with helpers, that sounds to me like something is wrong. Like I said, I can definitely believe I should talk to Chris about this and he should write a blog post about it. I can definitely believe that there is something that makes it true but it's hard for me to imagine what it is.
CHRIS: Well, I'm glad to talk to you about it offline.
YEHUDA: Yes. We will figured it out.
ALEX: Yehuda, thank you for this deep dive into open source process into Ember. I could drill deeper into your brain and just extract as much knowledge as I can. I hope to be able to do that someday soon.
We're going to wrap up for today. Thank you very much for Yehuda Katz and your time.
YEHUDA: Yeah. Thank you. I apologize for people who didn't understand half the things I said.
ALEX: Yeah, it's a podcast for everybody. But we have a lot of Ember developer's listening and I'm sure that they loved it and hated it all up so thank you very much.
From the publisher's feed