Charles Scalfani, Author of Functional Programming Made Easier: A Step-by-Step Guide
A Leanpub Frontmatter Podcast Interview with Charles Scalfani, Author of Functional Programming Made Easier: A Step-by-Step Guide
Charles is the author of the Leanpub book Functional Programming Made Easier: A Step-by-Step Guide. In this interview, Charles talks about his background and career, remote work, how programming can be like dreaming, writing screenplays, his book and his approach to teaching programming, and at the end, they talk a little bit about his experience as a self-published author.
Charles Scalfani is the author of the Leanpub book Functional Programming Made Easier: A Step-by-Step Guide. In this interview, Leanpub co-founder Len Epp talks with Charles about his background and career, remote work, how programming can be like dreaming, writing screenplays, his book and his approach to teaching programming, and at the end, they talk a little bit about his experience as a self-published author.
This interview was recorded on June 23, 2021.
The full audio for the interview is here: https://s3.amazonaws.com/leanpub_podcasts/FM184-Charles-Scalfani-2021-06-23.mp3. You can subscribe to the Frontmatter podcast in iTunes here https://itunes.apple.com/ca/podcast/leanpub-podcast/id517117137 or add the podcast URL directly here: https://itunes.apple.com/ca/podcast/leanpub-podcast/id517117137.
This interview has been edited for conciseness and clarity.
Transcript
Len: Hi I'm Len Epp from Leanpub, and in this episode of the Frontmatter podcast I'll be interviewing Charles Scalfani.
Based in California, Charles is currently the CTO for Panoramic Software, where he and his team recently developed a system that helps US military veterans file benefits claims, a process which can literally save lives.
Charles has over 40 years of experience with software development and has worked on many cool projects over the years in a number of industries, which I'm looking forward to talking with him about.
You can follow Charles on Twitter @cscalfani and check out his Medium blog at cscalfani.medium.com.
Charles is the author of the book Functional Programming Made Easier: A Step-by-Step Guide.
In this interview, we’re going to talk about Charles's background and career, professional interests, his book, and at the end we'll talk about his experience writing and self-publishing.
So, thank you Charles for being on the Leanpub Frontmatter Podcast.
Charles: Thank you,
Len: I always like to start these interviews by asking people for their origin story. So, I was wondering if you could talk a little bit about where you grew up, and how you found yourself becoming interested in computers and software and technology?
Len: Sure. I was a physics major. I wanted to be a theoretical physicist when I was 15. When I was in college, I was standing outside my calculus class, and this guy came from down the hall, an area I didn't really know before. I'm like, "What's down that way?" And he said, "Oh that's the computer lab." I go, "Oh, computer, yeah. I've heard of that." And he goes, "You want to see?" And I go, "Yeah, let's go look."
He showed me a teletype, and he showed me a three line basic program. It was so confusing. I walked out of there, and I said, "I will never understand computers."
The very next semester, a buddy of mine was taking a Fortran class, and he was really excited. He said "Oh come, come, come." I go, "Ah, computers - nah, not interested." And he said, "Well, no - come with me, come with me."
So I go with him to the computer lab. But this time, he walked past the teletypes - and we walked into another room, it had CRTs. And I'm like, "Woah, what are those?" And he said, "Well, those are the terminals." And I'm like, "Wow - it’s like a TV, right?" And he said, "Well, yeah." We sat down, and I watched him program on that. I was hooked at that point. I thought, "This is just awesome, watching him type certain things, and getting a program to work."
Because I had been programming my calculator in high school, and had a - oh, the old TIs, just massive calculators back in the day. I mean, we're talking the 70s, so they were huge. I just watched people program for that whole semester, and basically learned how to program watching other people do it. People would look at me like I'm a crazy person, like, "What are you even doing here, you don't even have a class?" And I'm like, "Well, I'm just interested."
I'd spent all my time in college doing that, and decided that I didn't want to be a theoretical physicist any more, I really wanted to learn programming. I started programming and learning microprocessors, programming. Back then, it was 6502 8-bit microprocessors. I got my first job at 19, I was professionally programming at 19, and -
Len: Can I just pause you there for a second?
Charles: Yes.
Len: And so you were self-taught?
Charles: Yes, completely - yes.
Len: And how did you learn at that time?
Charles: Books, all books. Everything was a book. There was no internet, there was not even - you couldn't even go to BBS, the old bulletin board systems. There was none of that. It was all books.
I've always been a book person. Sit down, work through a book. I Programming the 6502 by Rodnay Zaks, that was the book that I learned microprocessor programming from. I just sat down with that book and I went through it page after page after page - until I understood that page, and then went to the next page. So I was completely self-taught.
Len: And do you remember what your first interview was like? I'm thinking - there you are, 19 - you studied physics, but you've now trained yourself up reading books, and auditing classes or something. And then - do you remember what your first interview was like?
Charles: Well, sort of. I remember how I dressed. I think today, "Oh, I would've never dressed like that for an interview." I was 19, and I had just gotten my retainer. So the whole drive to the interview, I'm like trying to sing with the radio and talk. Because when you first get a retainer - I got my braces off, then I got a retainer. You can't talk. So I'm thinking, "Oh, of all days - I have an interview, I have a retainer". I don't remember what I talked about. It's one of those moments where you're so panicked, that you forget everything. It's sort of like - something bad happens, you just - it’s all a blur. So I do not remember what I talked about. But they did ask me a bunch of technical questions. I don't remember it, that's 40 years ago.
Len: And what was the company doing that you worked for?
Charles: They made systems, it was an S-100 bus system, written in ZD assembly for like MIT. You name any large school, and they had their system in it. You'd get these little cards with a magnetic strip on it, and your meal points would be kept on that.
We stored our programs on a cassette tape, so they would boot the system off a cassette. And this massive - what was called the "card reader," it would have also the cassette. It would boot the S-100 bus system, which had you know the 8-inch floppies. And then they would just keep track of all of the card readers all over the campus. Keeping track of the information in each individual account. It really didn't store it on hard drives and stuff. Yeah, it's a long time ago.
Len: And was all this in California?
Charles: Yes, I grew up in California, and I've only been working in California.
So, that's the beginnings of like how I started. That job was sort of my university. I worked there for two years, and really got to learn stuff. I remember - my boss walks up to me, and he throws a book on my desk, and he says, "This is supposed to be the next new thing, I want you to learn it." I love learning, so I'm like, "Oh great, this is awesome." It turns out that was Kernighan and Ritchie C book, right? There literally was no other book.
And there was no real compiler to be had. We used a [?] compiler, which is the deck, users group compiler on old PDP11. I learned that way, and I just - well, I just went through the book, and it literally looked like hieroglyphics when I first opened it. Because I had come from BASIC and Pascal, and languages like that. So when I saw C, it was all these weird characters and things you never type on the keyboard. So for me, it was pretty scary, I remember. But I love those kinds of challenges, learning something.
Len: And so you worked there for two years - and then you moved onto somewhere else, I imagine?
Charles: Yeah. Over my 40 years, I've probably had about 18 jobs. Lots of small companies. I'm more of a small-company person. I like to work where I can make a big difference in the company. I like where I can wear many hats and learn. You learn a lot more that way, and you can have a more positive impact on the business. But you also - it's a very risky endeavor, and I've lost my job many times. Companies have gone under, because they're tiny companies.
The first real notable - I'm just going to tell you the interesting jobs I had. The first real notable job was, I worked on the firmware for an audio card, before PCs had audio cards. Basically, I debugged my code within a dual trace oscilloscope, because I had nothing else. There was no tools. I was burning all of my code into this raw, into [?] EROM or EUROM. I'd put the card together, I put the oscilloscope - and my programmer got to a certain point, and we'd just output to a port and sit in a loop. I could see the signal on the oscilloscope knowing, "Oh, my program got here."
We were going to sell this card to Sony Interactive at the time, we were going to show it to them. So we made this little demo, where we took an album and we put some cuts on there, and we were going to play them using this new audio card. We had touchscreen technology back then. I mean this is like 1984, maybe? And as I'm demo-ing it for the company - this demo that we put together for them, demonstrating the card and everything - I realized, "Wait a minute, we should take this thing to Tower Records, and this would be a great thing for people to listen to albums before they buy it."
So, long story short - by 1985/86, we had a bunch of record companies putting music on our system. It was called, "The Music Sampler." It was in 20 or more Tower Record stores all over the country. I'd figured out how to take a laserdisc player that could play music videos - and I did a little bit of hardware hacking, and got it so that we could meld digital - this is, like I said - '86. Digital and video on the same screen, so that we could have music videos. And we were talking to MTV. And then - in October of '87, the stock market crashed - and that was the end of the company. It just decimated our company.
Len: Oh, my. That's really interesting that that's how that went under, because I mean - just the technology you're describing - for those listening, who might not be old enough to remember, that would have been a magical thing - to walk into a record store, and to be able to - a), use a touchscreen thing. But, b), choose from a variety of songs, and especially videos, to watch and get a sample from. Because in those days, like - well, specifically, if you wanted to watch a music video, you basically had to wait for it to come on, on MTV.
Charles: Yeah, exactly right.
Len: It was up to them what you got to watch. And also the idea of being able to sample music, right? If you didn't hear it on the radio or at a friend's place, you walk into a record store - everything's sealed up in its box, basically - and you can't take them out and listen to them. That's just not the way things worked. So, that would have been a really amazing technology, and I'm sorry to hear that it was -
Charles: Oh so disappointing. So disappointing, yeah.
Len: External accident that brought the whole thing down.
Charles: It was sad too, because we had heard from RCA Records that - we had given them - we used to collect statistics. So at the end when you heard a song - we had a little happy face, a frowny face and sort of a "don't care" face. And then you could touch the screen to say what you thought about the music. And they told us that DJ Jazzy Jeff, I don't remember - if you remember those guys, right? DJ Jazzy Jeff, they - we were able to tell them that that was going to be a hit record a month before all of their other information systems could tell them. Because we were right there. We were collecting the data from people who were listening to it in the stores. So they didn't have to wait for their purchasing data to come through. So, yeah - that was very, very disappointing.
Like a year later, I called one of the guys I used to work with. I'm like, "What happened? We were supposed to be millionaires." I've had many of those disappointing times.
Fast forward to working in Hollywood, that was a lot of fun. I spent about, I don't know? Ten years working in animation and in that area. I worked for MetroLight Studios, which was a - they won an Academy Award and an Emmy for their work in 3D animation. I programmed the Annie system, which was one of the very early digital ink and paint systems for animation. And then that was sold to a CD-ROM company, because that was during the time of CD-ROM games. And then we went off, and - me and a bunch of people who worked there, went off and started our own company, "Classics Entertainment."
Len: If I could pause you there for a second - so, this Annie project was very interesting. I think it was used for Ren and Stimpy, and things like that. Could you talk a little bit about what a digital ink and paint system is?
Charles: So basically, you get paper - right? That the animator has drawn on. And you put it onto a slightly modified scanner. What we would do is we - if you've ever seen an animator work, or an animation table, it's a backlit piece of glass. And they have this peg board. It has a slot on both ends for holes, and a round slot in the middle. So the paper fits over these pegs and they draw, right? That's how they can register it. Each drawing is registered, because of these peg holes. So the next piece of paper you put on is registered that way.
Well, we had to scan it, and also register those. So we modified our scanners, and we had people who did scanning. Then, once it was in the computer, they could paint digitally. Like the old days, they'd paint on the back of cells. You basically did a flood fill paint. So you just took the color, with your - we had, back in those days, we had tablets. Nobody was using tablets. We even used Wacom tablets, which are now the industry standard. But back then, we used every type. You'd just touch with your pen on the color, and then you would touch on the area - and it would flood fill that color. So we could do that pretty quickly.
Then, once that was done, we had scanned in the backgrounds. This was back when Photoshop was like version version three or four. It's pretty old. But we used Photoshop. We would piece - the scanner to just do the backgrounds was $16,000, and today we could get it for a few hundred bucks. But back then, everything was super expensive. We would scan the backgrounds and we'd piece them together, because they were long sometimes.
If you ever watch a cartoon, and like you watch a character walk across the screen - you're going to see that they're going to walk quite a ways, and then it'll start repeating itself. The Flintstones did that. But we had to scan that in pieces, because the scanner wasn't big enough. I think it was 16 inches only. because they're used to just having this big crank, and they could just crank this massive background under the camera in the old days. We had to piece that stuff together, so we had it digitally pieced in there. Then, all the software had to use the camera movements and things.
This was in the day where technology was so bad that we had to - qe bought cards from AT&T Truevision, and they were $15,000 forthese graphics cards. $15,000 per workstation. It got to the point - this is when we had 286s and 386s, okay, for PCs. Then it got to the point - I think when the 386 or the 486 came out, that those cards were too slow - and we started doing more on the PC, and less on the graphics card. We'd watch like a screen render, a single frame render in front of your eyes. You could count, one one thousand, two one thousand, three one thousand - as it just painted down the screen, as we're rendering it. The technology was just in i's absolute infancy. What we can do today is literally magic.
Len: Can you give us a year when this was going on? Just so we -
Charles: That was -
Len: Because things change so fast, actually knowing when it was -
Charles: Yes. That was, 90 -? I don't remember. It was around - it was right before the LA riots. So it was '93 maybe?
Len: '94? Okay.
Charles: Yeah, yeah. It was before that. We were doing stuff about that time. The technology wasn't like it is today, where it just leaps and bounds over that. So everything was complicated and slow and expensive. But we were doing it.
Len: '93, that would have been right around the popularization of the World Wide Web, right?
Charles: No. I mean I really - let me think, where was I? Yeah, it was after that, when we spun off Classics Entertainment, to do pretty much the same thing. We spun off Classic Entertainment, and it was about then where the internet was becoming more popular. I always pride myself in being very good about telling what the new technologies are going to be. I just missed it completely on the internet. I'm like, "Internet - what is that? That's crazy." I'm like, "I don't need that." I go, "I got CompuServe." Or whatever I was using at the time.
And, yeah - so that was after, probably - we were just getting there at that point. So we did Ren and Stimpy, and we did work for Disney. We did work for Universal Studios. Shelley Duvall's Bedtime Stories, I think that was Universal? I can't remember, like I say - it's been too long. We did some Beavis and Butthead episodes. There were other companies in town that were doing similar work - and then there was Disney, right? They had their CAP system. I'm sure they don't have that anymore. But at the time, there weren't that many systems that could do digital ink and paint. So that was another time I felt pretty lucky to be on that cutting edge. That was exciting.
Len: You said you struck out on your own, and you started your own company, and you've had ups and downs and things like that.
Charles: Oh yeah. We went under.
Len: We'll leap ahead, just in the interest of time, but you ended up where you are now as CTO for Panoramic Software. I was wondering if you could talk a little bit about what kind of work you guys do? I mentioned a recent product that you mention in your Leanpub bio when I was doing the introduction, and if you could maybe talk a little bit about that work? Because things with the technology and the Veteran’s Affairs office and something like that - is actually a part of popular understanding. Because it's often - not so much recently, but there was a time when it was actually quite common to be in the news, where like people can't process forms and stuff like that. So, I was wondering if you could talk a little bit about the work you've done, within that context?
Charles: Yeah, sure. That's probably the one thing that I'm very proud of, of the work. It's not as glamourous as my early work - where you're doing music, and you're doing animation, and commercials and stuff like that. That's sparkly and glamourous and stuff. I got over that at some point. I realized that that's fun, and those were things that I could turn into hobbies, but it's really a difficult business to be in.
So I kind of got into doing business stuff. I mean, honestly - for me, the product doesn't matter so much as the technology and how you do it, right? But this was something that I never realized. I'm doing this work and stuff, and it really took someone who worked with veterans, who wound up working with us - to really open my eyes. To how she used our old legacy system, which I wasn't involved with. And she's actually felt that - she's actually gotten vets off the streets, and saved their lives. So that really hit me, and it changed my whole perspective on what we were doing.
Before it was just the technology thing. But to have that added knowledge that you you're helping people, make a huge difference in peoples' lives. It's always - I mean, I grew up during Vietnam. It's always bothered me - the movie Coming Home and all that really had an impact of how we didn't treat our soldiers right. We haven't really treated our vets well, honestly. It doesn't mean that people don't care about them. It doesn't mean that there aren't people - I work with people in the VA, and they care, they really do. They're working hard. They're making really big improvements. But it's just so slow. So much bureaucracy and everything, it just takes time.
So yeah, we just recently built a - all in functional programming - we built a system that uses Haskell in the back end, and Elm on the front end. It just came out two years ago, I guess? We're slowly installing it in different places in the country.
When the pandemic hit, that was another thing - when the pandemic hit, I was frustrated. Because I couldn't do anything about it, right? I'm a problem-solver. So for me, I thought, "Well, what can I do?" I realized, "I know what I can do. I can make it so people can do remote signatures of their forms."
We had a thing called Finger-Ink, it's a website. And, so - typically someone might be in an office with their representative, who's helping them fill out their forms to get their claims. They would just say, "Okay, go onto your phone, go to Finger-Ink, and type in this six-digit code. Then they'd turn their phone, and they would sign with their finger. Then it would pop up on the screen, and they've just signed their document.
So, I created a system so that they could get an email, and - from their representative, who was remote from them. They could click on the link. They could go on there and log on with their Social Security number, see their document, right? And be able to sign it right there. This way, they wouldn't have to come into the office, for social-distancing reasons. Especially - a lot of them are older.
So that was a big, exciting thing for me. That was my thing. Like, "Okay, this is what I can do to help." I just felt like I wanted to do something. Even though it's my little corner of the world, I was happy to do it.
Len: That's really fascinating. The adoption of technologies that reduce the number of trips that people have to take to do things, and the bureaucratic acceptance of them - has actually been like a really big - in my view, like kind of positive result of the pandemic.
Charles: Yes.
Len: I've got a friend who's a surgeon and he talked about how, at the beginning they were like - in his hospitals, they were like, "Well, we've actually really got to rethink whether people really do need to come in for in-person visits as much as we've been doing routinely." He was part of the revolution. I'm sure you've read some articles about this too, about how like, in one month there there was 10 years of progress on the use of remote technology.
Charles: Yes, yes.
Len: Whether it's looking at - you cut someone's head open last week, and now you want to have them lift up the bandage gingerly and just have a look underneath. Well, instead of making them take a day off work, maybe have to take the kids with them into town, drive three hours and make an in person visit - where they might have to wait for some arbitrary amount of time, then see someone for five minutes. If you can actually - things like you mentioned. Just going to an office to do a signature or something - for some people, that can actually be a huge burden.
Charles: Yes.
Len: To take that away can be a really, really good advancement.
Charles: I thought someone could be in a hospital bed. you could hand them an iPad and they could go to the site - see their documentation, and sign it. Because it might be important, and they can't get there.
One of the things that's really important for veterans is that they get their claim date. It's called their "claim date" because they can lose thousands of dollars if they don't get that. So it's really critical to get that date, and that may require a signature.
Len: And those claim dates can be more complicated matters than some people think. You're reminding me of a podcast I was listening to where someone was handling post-911 claims for first responders, and things like that. There was the spouse of a first responder who I believe had died shortly after 911, and she was insisting on moving up the date at which she could do something in order to get the settlement.
From a surface perspective, it looked really selfish, right? She just wanted the money sooner. But when he met with her, it turned out she was dying, and she had a date. Like, she wasn't going to be around at the end of the month. So she really needed to get it sooner. These kind of things can - life gets in the way of red tape.
Charles: Yes.
Len: Anything you can do to make it better is good. Actually, you gave me a good opportunity to segue into the next segment of the interview. It's what I neglected to mention to you before, because I only started it a year and a bit ago, but in March, 2020, I started asking people - how has the pandemic affected you, personally and professionally? while we're coming out of it, we are still kind of in it. I was wondering if you wouldn't mind talking a little bit about how it affected you in your neck of the woods, and your job?
Charles: It's a great question. I used to always say - and this is many years ago - if programmers can't remote work, no one can. I was really surprised how many people could. My wife's been working home. She works in an office. She does your typical office work. I'm not going to go into the details of it, because that's private and all for her. I would never have guessed that she could operate remotely like that.
We're actually , as a bunch of programmers, getting back into our office sooner than she is. She won't go back until September. So I'm really happy that people realize that - Because I was always an advocate for remote work.
With programming, I say, "It's like a dream when you're working." You're in a dream, you're having a dream. If somebody just interrupts you in any way, shape or form - it's like being woken up out of a sound sleep, and you were dreaming. They ask you some trivial question, and it's like, "Oh, I was in the middle of a dream." "Oh, sorry, go back to sleep and finish your dream." That can never happen. You can never get back into that dream, you'll never. So having the ability to work remotely, and have that time where you can just ignore everybody, they can't just walk into your office or by your cube - that's really great.
So for me, looking at how the world is finally catching up - I'm always pushing technology. I'm always pushing, I'm always looking for the next thing.
I'm a little bit more reserved than I was when I was younger. When you're younger, you think, "Oh, this is the next big thing, everything's great and everything's exciting and everything -" you just don't have enough experience to be able to judge it, whether it is truly a big thing or not. As I've gotten older, it's easier and easier to be able to look at a new thing, and see how it might fit in the world. Being able to work remotely has always been something that I thought was a great thing, and I'm really glad that more people see that they can do these things.
We're doing this over Zoom. That technology is just ubiquitous now. My wife wouldn't use Zoom. It would be "Oh no." It's typically people my age, right? It's old people always going, "Oh, I'm too old, and I can't do this." But then when we had to do it, people just - they were able to do it. From a professional and technical viewpoint, that was probably one of the good things that came out of the pandemic, I think.
I hope that we retain that and move forward with that. For me, maybe this is still a naïve position, but I believe people can do so much more than they do, many times. I believe just because you're old, doesn't mean you can't learn. So to see people who would normally not use that technology, use it - and on an everyday basis, so they don't even think about it. I hope they realize that, this, "Look, you did it. You so can do this stuff."
Len: Yeah, it's funny. That's something I could talk about forever.
Charles: Me too.
Len: It partly comes from your first experience of technology. So for example, I just think about my dad, who'd totally get in a car and drive somewhere he's never been before.
Len: Which is, when you think about it, a crazy thing to do. It's so complicated. There's people coming at you from all directions.
Len: You might be going faster than humans ever moved before. You just get in and do it. But if you ask him to like use the computer, he's like "Nuh, uh." He does more now, but one of the reasons was, like - his first experience with a computer was with a very clunky, hard to use thing, where you had to read a manual and maybe take a course. It was at the time when you could lose work if you didn't save, or the power went out. Maybe at the time - I think he might have been before like CTRL Z, so there's no -
Charles: Oh no.
Len: Like undoing mistakes, and stuff like that. And also at the time when computers are really expensive, and did break. he green screen of death, or something like that.
My generational version of it, that I like to talk about is like - when I play computer games, I still have the mentality of that five year old kid who was given two quarters and like - when you die, you're dead. There's no more video game for you.
Charles: Game really over.
Len: Yeah. So I play everything like it's the true death, right? I find it really hard to get into the mindset of, "No, no - you just died, just try something else now."
Charles: That's so funny you say that. Because I found myself when I first - because I'd played games way, way back when you put a quarter in. Then I didn't do it for 20 years, and then I was playing games again. It was exactly that same problem. I played like it was really life and death, because I didn't want to die. I watched my daughter play, and I watched other kids play, who just grew up with - they just die, no big deal. They're just like running and gunning into completely crazy situations.
No one would ever do that in the real world. Like, "What are you doing? This is so wrong." They wouldn't die like I thought they would die. I'm like, "Oh, I see how this works."
And, so now - there were times when I'm in a game, and I'm like, "Alright, I'm going into this room and I'm going to die. But, I want to go look around. I'm just going to stand in the middle of the room while they're all just killing me, and I'm just going to look around, so I know who's where. The next time I come back, I'll know where everybody is and I'll take 'em out." I would do stuff like that, and yeah, it's exactly that.
And to take that to computers - when I teach people, I'm like, "You can't break this. Don't worry, there's nothing you can do to break this. In fact, if you think that will break it - do it, just do it. I promise, you won't break it." I've helped so many people get somewhat over fear of - they don't know what to do.
My neighbors, a long time ago - they were afraid of the mouse. I kept telling them, "Get off DOS, you've got to get onto Windows." They were doing tax preparation. I'm like, "You've got to get out of this old technology." So, I just sat with them, and pointed on the screen, and said, "Move your mouse to my finger. Okay, over here now. Over here." Just start very slowly, and work them up until they get the confidence. it's a matter of knowing how to teach and knowing how to learn. Knowing what the stumbling blocks are going to be for them, so that you can get them over those kind of hurdles.
Len: I was going to say - we'll get to your approach to teaching,, which you just gave us a taste of, when we get to the talking about your book a little bit more.
I wanted to say, it's one thing - for example - when I was a kid, I thought, "Old people wear hats," right? I didn't realize, no, it's because they wore hats when they were young, right?
Charles: Exactly.
Len: It's not that when you become old, you're going to start wearing a brimmed hat. A lot of people make that mistake about themselves too, right? They might think, "Oh, I'm bad at computers because I'm old." It's like, "Maybe you're bad at computers - because computers were bad when you first encountered them, and you're carrying that with you? The kids these days are working with things that work, and are easy. Maybe that's the reason, they seem less fearful than you - is that they just see it as a toaster, rather than a starship or something?"
Charles: That's a double-edged sword, by the way. I used to call my daughter, the "point and click generation," right? When I sat her down to teach her programming - she's a programmer now, and she's been working in the industry for about three to five years now. But when I first sat her down, she was in just like first-year college. I said to her, "Look, you think this box is magic. It's not magic. It's the dumbest thing you'll ever meet." She said she didn't understand.
I said, "Here's what I want to do. I'm going to crack this old -" I had an old PC. I cracked it open, and I told her to touch - physically touch the computer. Different areas of the computer. I wanted her to have a visceral experience base of what I meant when I said "the CPU." "Remember that little square thing you touched? Yeah, that's the CPU. Inside there, all the logic happens." She was into logic, so she got that. "Then, follow this ribbon cable to the hard drive. See these slots - these circuit boards that are in these slots, that's your memory."
I explained to her all of those things. I said, "You're going to -". Like, it was easy for me. Because I started when there was nothing. Nothing, nothing did anything - and so, I got to grow up with it.
When you come into the industry now, it's very difficult - because it's massive. The industry is so - there's so much that's been done. So later I said, "You come in with a wrong mindset. Your coming into this industry with the point -" Like I said, the "point and click generation."
I remember when she was in the first grade, we're sitting at dinner and she goes - she goes, "Dad, we have these computers in our classroom." I'm like, "Uh huh." She goes, "They don't have a mouse." I go, "Oh, yeah." she goes, "How do you click?"
I just started laughing. It's like, that was the - she grew up with it. Like you said, "toaster." I actually use that example all the time. To my daughter, it's like a toaster - it was always in the universe. To me, it wasn't. It just came into the universe. For people like that, where things come into their universe and it wasn't something around all the time, it can be scary. There's absolutely no reason - if you have the right mindset, and you have the help. And, so - yeah. Trying to teach her that, and try to undo that thinking.
She got to a point where she's like, "Well, can't I just tell to do this?" "No, you have to do that." "Well can't I just do that?" "No, you have to do that." She's like, "Oh my God, this thing's the dumbest thing on the planet." I go, "Exactly. Now you understand." I go, "This thing is dumb. It's just very fast, they're doing very dumb things. Very smart people have worked thousands of man-years, built on top of stuff - such that you can just click a mouse and have magic happen, watch a movie on your computer. All of that has happened over thousands of man-years of technology and work. It's a lot of smart people working very hard to make that possible. But the machine hasn't really gotten smarter."
Len: Just before we move on to talking about your book, I've got one last thing I'd like to ask you about. This has to do with writing. So, you wrote a movie.
Charles: Yeah - that was a hobby.
Len: Called "Solitary," that's actually currently streaming on Amazon Prime video. I was just wondering, for those interested - how does one get a script made into a movie? I mean, I'm sure it's a very long story, but tell us a little bit about that.
Charles: Yeah, I will. I'll keep it short.
So, remember I said I got out of Hollywood, and that I said I could have those hobbies? I reached a good equilibrium there with my career and my hobbies, where I knew I was going to get paid to do these things. I wasn't paid enough, and it was long hours - if you talk to anybody who's worked in the gaming industry, it was the same thing in my industry, where we worked in animation and such, and technology.
So I thought, "I'm just going to make this a hobby." I spent probably most of my forties' hobby time doing screenplays. Writing screenplays, learning about film making. I shot a short film with a friend of mine. I was a cinematographer on that, learning about lighting. I took acting classes at the - I forget what it's called, it's in Orange County. Performing Arts in Orange County. I took acting classes. I read about directing. I read about editing. I pretty much just delved completely into that. I wrote ten different screenplays, and put them in different contests and such.
Then, I'm working on a screenplay one night, and my friend that I met through my work in Hollywood - he said, "I want to direct a film. He had taken an idea of mine - a story idea of mine, and done a short many years ago. I go, "Okay." He goes, "I want to shoot it in the house, but I need an idea." So we just brainstormed together. In two hours, we had a complete story of what we wanted it to be. That's the easy part, by the way.
And, he goes, "So, do you want to work on it with me?" I said, "Absolutely." Because I was excited, right? We worked on that thing for, I don't know how many years? We had version A, version B, version C. We went through the whole alphabet and started AA, and AB and AC.
I don't know where we wound up. We had so many revisions of it. My brother was into - he'd done radio. He used to work on the radio, and he was a DJ in clubs. He was in talent management. So he was helping us market it to different production companies. There were a lot of production companies in town who wanted to buy the script. But my buddy wanted to be - he was attached, as the director. They didn't want him as director, because he hadn't done it. Well, that was the whole point of the exercise - to help him direct something. We wrote it around his house, which you could - if you had enough money, you could always like make the house in a set. Or you can shoot on location, but -
So we decided, "Okay, no." We said, "No" to everyone. Then I went off and I shot the film with another friend of mine - who I also met in Hollywood, he's a composer. We shot his film. my other buddy came to see our film - we had a little thing where you invited a bunch of friends to watch the film. It was a 20-minute film. He had made his 20 minute film many years ago, for - I don't remember how much. It's tens of thousands of dollars, I think? We had made this thing for thousands of dollars, right? But not much at all. Not counting the equipment we bought.
That pushed him over the edge to say, "Okay, I'm making this film." We shot it on the RED camera. This is the days when the RED camera had just came out. So it's in 4K. Now, he just - he got the rights back, because it was international. It was made, dubbed into many different languages. It was on TV a few times, and it won a few awards at a film festival.
So he took that 4K and he just remastered. I believe that's what you can watch on Amazon Prime? So, yeah - that was an amazing experience. I wish I could do more of that, but it's ten years to get to that point - and it's really hard.
So, I did it. it's one of those things that I - if I had a chance to do it again, I would do it in a heartbeat. I absolutely love that process.
Len: Thanks very much for that really great story. It's really interesting for anyone who's thinking about doing it.
There's no - when it comes to starting a project, there are no gatekeepers. I think people often think you need kind of like permission or approval, or there's only some kind of nominated set of people that get to write screenplays and try and make movies. It's like, "No, you can do it." You might want to read some screenplays before trying it and read some "how to write screenplay" books, and stuff like that. There's lots of guidance out there that's actually really good.
But if you're interested in doing it, there's nothing stopping you. I mean - I've not had the sort of experience you had, but I've written a couple myself. I can say it is extremely exciting and fun.
Charles: Yes.
Len: When you find yourself going down a coherent path for a story. Then you realize you're the one that's creating it and you get to do whatever you want next. That's just kind of an intoxicating experience.
Charles: I love what you said about permission. Because I remember saying exactly that. I kept telling my friends, like, "You know what? I'm tired of asking permission. I don't want to ask anybody permission." Like, "Oh, can I do this?" Or go to a production place, "Oh, can we make this?"
I think that's part of, like - I'm now into, my new hobby is music. So I figure, in my 60's, I'm going to do music. I'm trying to learn how to compose music. "I just don't want to ask anybody's permission. I want to do what I want to do. I shouldn't have to. We should be able to make this film." We did.
Len: Yeah, not to digress too much - and the other thing you'll encounter when you do something like that - is people going, "Who do you think you are?" It's kind of -
Charles: Yeah. I -
Len: Yeah.
Charles: I turned that around to, "No, you don't understand. I am not special. Everyone can do this." The only difference is, I was lucky enough to be born thinking that - compared to everybody else."
That really gets down to it, to the book, right? It's about, "Look, you can do this. It's a lot of work. But I can make it easier for you, because I've already been through it, and there's no reason we should both go through the pain."
Len: Again, you're offering me the perfect opportunity for a segue. My next question is going to be about your book, Functional Programming Made Easier: A Step-by-Step Guide. It really is - by the way, a step-by-step guide - which is something we'll talk about in a bit. But I was wondering if you could talk a little bit about what your inspiration was to write the book, and who it's for?
Charles: Okay. Let's see. Inspiration.
I did not want to write this book. I'll be honest. In fact, I joked that - and I might still do this, right? I was going to write an article called, "The Programming Book I Wish I Never Wrote."
I didn't want to write this book. I wanted to read this book. That was the thing.
Because I struggled so many times to learn functional programming. I tried to learn Haskell, which is like the granddaddy of all languages. I program in it now, but I failed miserably four times. It was like beating my head against the wall. I just kept saying - "Oh well, it's too hard." Or, well it's - a sour grape, in a way.
But I was very attracted to it, because I saw some of the power in it. The more I tried to use like JavaScript to do functional things, the more I realized - this language - yes, I can do functional things in it. But boy, it is so not made for this.
Then I thought, "I should get back into Haskell and try to learn that again." Then I learned Elm, which is a very, very beginner - and a very easy functional language. We built, like I said - the product's called VetPro, that allows people to fill out claims. We wrote about 160,000 lines of code and -
But we got to a point where Elm juste - it wouldn't scale for us. The language didn't scale for us.
That's when I realized that I'm going to have to just bite the bullet. I spent three months doing nothing day and night, but - and even at work, weekends - trying to learn Haskell. I bought all kinds of books. I read tons of blog posts.
Here's the problem. When you don't know - because I grew up in this industry - I don't understand what it's like to arrive in this industry, like new programmers. What is that like? I got a taste of it. Just a taste of what that's like to not know. I'm like, "Gee, I've being doing this 36 -" 35 years at the time. "Here, I can't learn a language - what is wrong with me?"
So I would blame the language, or I'd blame the people - to some degree, the people explaining it have a huge burden, right? If you tell me you understand this, and you're going to explain it to me - then the burden's on you to do that job and explain.
So I put a huge burden on myself to explain it well in the So I understand - when you come into an industry - you don't know where to read. You're in what they call "tutorial hell" - a lot of the new people trying to learn programming today. Because I kind of keep my ear to the ground on what people are talking about, trying to learn programming. I know exactly what they're talking about.
I would find that at the end of the day, I'd have 20 tabs open in my browser. I was down a rabbit hole. The best way I could explain it is, "You're going to learn German by only reading a German dictionary, okay? Good luck." That's what it felt like.
So you would read something, and you'd find a word you don't know. You have to look that word up. It used a bunch of words you didn't know. You have to look each of those words up. It was just a complete rabbit hole every day. It was painful and miserable.
Then, I finally somehow came out the other side. It's a great technology. It's an amazing - I've been doing this long enough to know when something's great. It was way ahead of its time. Because functional programming was long before imperative programming. Even before my time. But it was way ahead of its time.
Now is the time. You can see functional programming being used in every - little pieces being adopted by lots of different languages.
So I didn't want to write this book, but I felt the world needed this book. If I didn't write it, it would never have it.
That was my feeling. I got to that point and I thought, "I have to write it. I don't have a choice at this point." It was two years, and it was hard - and I was ready to come out with the book.
Then the peer script compiler changed from version 13 to 14, and broke all kinds of stuff in the book. I had to go back through the whole book, work through every one of the things and make changes to the book. Thousands of edits before I could release it. I was like super close to releasing it earlier in the year, and - because I really don't want to leave anybody out in the cold at all. So, anyway that's -
Len: I'd like to drill into that a little bit. Because, I mean - when you say "thousands of edits in two years," for those listening - the book is 1,900 pages long or so in the PDF.
Charles: Yes.
Len: It's very long. But there's actually a very straightforward reason for that, that has to do with your approach to teaching. Which is that you actually show the coding of the product line-by-line, and you explain every decision.
I really like that. You actually wrote - I'm going to be mixing up your book a little bit with the recent Medium post you wrote, called How To Write a Programming Book. I can't tell you how much I agreed with everything I was reading that you were saying about the common mistakes that people make. I think I also share your sense of natural irritation when people do this kind of thing.
Charles: Yeah.
Len: One example I use, it's not books - but it's a - Stack Overflow is a wonderful thing, right? But the first answer to any question on Stack Overflow is, "Why would you want to do that in the first place?" I don't know what garden those assholes are grown in - how they're always the first one to respond. But like, "Dude, he's just asking a question."
Charles: Yes, "Help him out here."
Len: My joke is, the second person who answers will go, "Oh you just screef the neubar, and then you're done."
Charles: Right. Now you don't know - Exactly.
Len: Then you have a line, I think it was in your post - where you say, "This is the equivalent of you asking me what a napnap is and I explain that it’s a moople that comes in three colors red, green and blue and that it humbats with it's mouth except for the green ones." It's a much better example, much more elaborate and better explained example than mine. Because you're talking about introducing children to the idea of what a dog is.
But the idea that you have of having to go step by step, and empathizing with people who are new to something that you're familiar with, and actually how - it's easy to make fun. But actually how really hard it is to get into the mindset of someone who's new and also just how hard it is to really stick to doing something step by step.
I interviewed someone recently named Eric Matthes, who wrote a very popular book. I think it's the bestselling Python programming book? it took him a very long time, but it was the same - it strikes me as he had the same attitude as you had towards it. That you can't skip a step. That's easier said than done.
Charles: You're 100% right. I remember, as I'm getting towards the latter part of the book - because the first half of the book, the first 900 pages - give or take - is like - not theory, but the concepts, okay? The second 900 pages is just getting down to doing real things with the language, and seeing how they work in real situations.
I was in that second half of the book - and so many times I wanted to skip, right? Because I'm fatigued. I just didn't let myself off the hook. I'm like, "No, no, this book - I want this book to be no skipping the whole way through, the whole way through."
Now what I did do, because the functions get larger, is - I would redact code above a certain point, because we're not working on that part. So then I just did bloat the book even more.
But my thinking was - this is how I write code, right? I sit and I think about it. I think, "What am I going to do?" I think, "Make my strategy," and then I start coding. I write one line. "So where do I start? I write this line first." Then, "What do I do next?" I think for a second. "Then what do I do next?" I write the next line, maybe half a line, right? Or maybe I start writing a line and I realize, "Ah wait, hold on - I don't know what I'm doing here." Or, "Ooh, I've got to look something up."
I basically try to simulate that process throughout that complete book. What is it like? I left mistakes, right? I would code something for the book - because I'd sit and I'd code it first, and then I'd work through it. I'd make a mistake. Then like, "Oh, no that's good, I'm leaving that in." Because that's way real life is.
What I never like is - in all books, is - you're reading a book and all of a sudden it's like, "Alright and this is how you do it." Boom. This perfectly formed answer, this massively complicated function. It's like magic. You think, "This guy's a genius, and I'm an idiot. Because, look - he wrote this, and I can't understand any of it." However, he didn't just write it whole cloth, right? He went exactly the way I am doing it. He thought about it, he wrote a line. He made a lot of mistakes, he had a lot of compiler errors, he fixed all those things - and then he gives you the end product in there.
That's the problem, in my opinion, with a ton of books. You don't get to see all the mistakes that everybody made. You don't get to see the blind alleys and the - it's that whole thing about - how you judge yourself against the world, right?
Well, you're seeing their highlight reel - but then you're seeing behind the scenes in your life, right? That's the thing. I give you the behind the scenes. I show you all the mistakes I make, bad decisions I made as I'm writing the book. I didn't pre-guess anything. I'm like, "Oh I'm just going to do this thing." If I made a bad decision like, "Uh oh, there's a problem." I'll ask the reader, "Can you see my mistake?"
Because it is my mistake. I'm the teacher here, it's my mistake that I made. Then we fix it together, because this is a mistake that I made. Now, some of those I put in on purpose, but mostly - no. A lot of these were, just little things - little mistakes you make along the way. You literally get to look at hundreds and hundreds and hundreds of compiler errors. I snapshotted most of them.
Towards the end I did less and less of that. Because by that point, you got it. You've seen this one a million times already. But that's what it like - and so I'm like, "How can I simulate if I sat down with you and we coded together, we pair-programmed?" I asked you questions, like, "Okay, what are we going to do now?" Or, "What are you thinking? What would your approach be?" All of those things - how can I simulate that in a book? That's why there are so many pages.
Also, going back to my screenwriting. People who read your screenplays when you're trying to sell them, they don't want to read a lot. I mean if you remember Martin Short in The Player, he points to a pile of scripts on his desk. He says, "See these screenplays? I've read almost all of them, almost all the way through," right? That's a huge joke in the industry, because nobody wants to read your stuff. So if you have a description, not dialogue - if you have description, and that description's important - you'd better not make that description too much like of what I call, like "a paragraph that looks like you're eating a brick to read," right?
You'd better not have that, otherwise they'll skip right over it. They'll miss a bunch of stuff that happens in the story, because they're just jumping to the dialogue. That happens with readers all the time.
So what I did, is I - I was very careful about putting very little, and then I'd have a paragraph break. It's almost crazy - sometimes just one sentence, paragraph break. One sentence, paragraph break. I did the same thing in the book. Because the problem with technical material, is - you need time to breathe. But we were taught in school to read the paragraph and then think, right? We tend to do that.
So I give you time to take little baby bites, and then chew. Then another baby bite, and then chew. So there's a lot of white space in the book in that way, and it - I always find it easier to absorb stuff when people do that.
Len: It's funny. I didn't really think that writing movies and writing programming books, would sort of be so nicely enmeshed in our conversation - but I'm really enjoying it.
You're reminding me of something called the "logline", that you're supposed to do when you make a movie which is like - literally one sentence. It shouldn't be too many words. It's kind of like if Steven Spielberg were standing in front of you, and you have like ten words to catch his attention - what would you say? I think there's actually like a huge running joke about that in The Player, which I haven't seen in a long time.
Charles: Yes. Yeah there is.
Len: It's kind of like "Die Hard, but on a boat". Or one I wrote -
Charles: That's the pitch, yeah.
Len: One I wrote a long time ago was, "It's Deadwood, after the zombie apocalypse."
Charles: Yeah, cool.
Len: Things like that. But the thing is, it's funny. The short, punchy thing can actually take you a really long time to get. Again, it's one of those things where you can get impatient, right? But actually putting in the detail, doing the revisions - things like that.
You're actually reminding me of a movie example that I've used before. A movie lore example that I've used before on the podcast, to explain exactly what I dislike about poorly explained things. It's the old, "Well, Quentin Tarantino was just working at a movie rental store," for anyone who knows what those were - then he was a famous director. I was always very frustrated by that type of explanation.
Then I once came across an interview with Quentin Tarantino, where he's like, "No, here's what happened." I'll get it wrong a little bit, but it was - he goes, "No. My friend at the video store - his girlfriend worked out with Harvey Keitel's girlfriend at the time. So I gave the screenplay for Reservoir Dogs to my friend. Who gave it to his girlfriend - who took it to the gym, who gave it to her friend, who gave it to Harvey Keitel." I'm getting it wrong - but it was like, actually understanding that chain is so important for really getting done what you want to do.
Like, I just can't exaggerate enough how important it is that any little gap in that story, and it would be impossible to replicate what it actually - then with programming, with - as you say, "computers are actually quite dumb." You get one thing wrong, you miss one thing in your book - and you get it out there, and everybody who gets to that point, isp, stuck and has to throw away the book if you don't get it right.
Charles: Yeah. That was one thing that I - I joke about Martin Short's line in The Player, I could point to a whole slough of books that I've read almost all the way through. Because I either get to the point where I'm like, "Okay, this isn't working." Or I'm like, "This book isn't working for me." Or, "I get it, you don't have to keep beating a dead horse." So, there is a balance there.
I worked with a guy for 20 years. We moved from company to company, I always dragged him along. We had two different ways of looking at a book, right?
We would buy the same book, because we're both book people. We would buy the books and we would try to learn from them. If he couldn't learn from the book, he would blame himself. He goes, "Well, I'm just too stupid to understand this."
When I read the book and couldn't understand it, I thought the author did - I blamed the author, I didn't blame me. I thought, "The author blew it," right? "The author didn't do their job." I'm really hard on authors because of that. I was hard on myself, and I still am.
I held myself to a very high standard of - look, you're saying to the world, "Hey world, I know this information - and I can explain it to you, so that you can also know it, okay?" Right? Well, it's your job as the author to then make sure that you do that job, right?
The person has to meet you halfway, obviously. But they wouldn't be wasting their time reading the words you put on paper, if they didn't want the information, right? So the burden is really on me, the teacher or the author of a book, to make sure that I've done absolutely everything I possibly can, so that you can learn what I'm trying to say.
That's why I did the white space. That's why I go into - there's a lot of math notation that you'll see, or come up against. Not a lot in the book, but there's some. In programming - so you might bump into it. Then it just seems like - remember I talked about hieroglyphics in "C," when I first saw "C?" Well, it appears to be hieroglyphics when you look at math in many ways.
My daughter has math phobia, even though she completely aced her logic class in college, "It was just about one of the hardest classes on campus," she said. But she doesn't see that as math.
People have this math phobia. So I wanted to make sure that any math symbols I use are completely explained. I assume you don't know what a stack is. I assume you've never thought about binary numbers. So when I talk about these things - and they're just brief - I actually spend time explaining to you how a stack works. I'm not just going to assume you know it. I assume you don't know. You know programming, it's -
So you asked me earlier, "Who is it for?" I imagine this fictitious programmer who's been in the industry for two years and has done some real work, and they want to learn about functional programming. That's it. That's it, no more than that.
Now I also say in the intro, that that doesn't mean students can't learn from this book. I mean, it's just a shortcoming of my imagination, right? It's hard for me to go back to that person, because it's been so many years since I've been there.
But I have experience with people who are just starting off in their career, been working in this business for a little bit. So it's just my lack of imagination, not yours.
So, I think students could learn from this as well. I almost wish I'd have started here, learning programming. Because I spent so many years struggling with the inferior technology for writing code.
Len: Actually, speaking of technology for writing, the third time's a charm. No, that's not the right phrase, it's quite the opposite. You've given me a third awesome segue, which is, we're going to talk about the - what we save for the end of the interview, is talking about actually the technical tools that you use for writing and your process, and things like that.
A lot of Leanpub authors are people who are writing programming books and things like that, so they actually really like to hear from other people what their process was.
So - you used our "bring your own book" writing mode, which is where you just use your own tools - the ones you love, or the ones you hate the least.
Charles: Yes.
Len: Whatever you're best at, to write your book. Then you upload the file when you're ready.
I was wondering if you could talk a little bit about what actual like app or tools you used to write the book?
Charles: Okay. I used VS Code as my editor, I used AsciiDoc as the format, and I - basically when I decided to write the book, I spent a month just getting the tools figured out. Like ,what tools did I want to do? What was my workflow? How do I build the book?
For me, if you look at the book - it is a lot of pages, but I wanted the font to be big, right? Tiny font gets tiring. If you're trying to understand something, the last thing you need is to struggle with a small font.
So I wanted the font to be big. I wanted it to be somewhat colorful. It was aesthetics, the page had to have an aesthetic to me.
So I spent about a month trying to tweak AsciiDoc with styling and other things, to get it just right. But the one - the number one thing about AsciiDoc that blows Markdown out of the water, is callouts. I have them all throughout the book.
As I add code, I'll put callouts to the lines of code that I want to point out. Then underneath it, it's like a local footnote, if you will, these little callouts.
A callout's just a little colored circle with a number in it, where the code is. Then right below the code, you'll see like - it'll be like number one and number two will be in the code. Then one and two are like footnotes right below the code, and you can read things.
There's things about that line of code I want to talk about. Many times it's just like, "I just added this import to import this." Or, "I added this to bring in the data constructors." Or just little notes like that, "Oh, okay."
Being able to have those callouts was amazing. I've never seen it in a book. It's really hard when you're trying to describe something that you can't point to. The callouts let you point to the very thing you're trying to describe, without having to repeat that thing. So I thought, that won hands-down for me. So, yeah. That was the tech.
Len: When you're working with a book that size, or when it gets to that size - presumably since the aesthetic and things were important to you, you were exporting versions of the PDF probably relatively frequently?
Charles: No, I just checked it in to GitLab.
Len: Okay, okay.
Charles: So I just used the free GitLab account and I just pushed it via Git, the same way I write code, right? I mean, most people do this today. They just check it in the source control, and that's what I did. Because they're just text files.
Len: Did you set certain times of day, that you then maybe communicated with your family about? Like, it's going to be like, "From nine to ten every night, I'm going to be working on my book," or anything like that?
Charles: No, no. So many times I would just - it would be early in the morning, I'd come downstairs. I would write, and usually I'd cook bacon in the oven and I would write, or I'd just lock myself in my office and I would write there. It was just a constant - always trying to get time to write.
Like I said, towards the end - it became really, really difficult. Because you're fatigued, right?
I'd really laid out the curriculum for people I was teaching at work the first year. Then, when I decided to turn it into a book, I had that curriculum - but it was just okay, right? The book is far, far better.
So I had a bunch of slides I was teaching people at work with. As my writing surpassed my slides, I threw my slides away. I just said, "We're going to work right out of the book." Because it was so much better. So, it was just constantly writing as much as I could.
I'm pretty disciplined, so that helps. I mean, honestly - discipline, in my mind is the - if you want to be successful at anything, and I don't mean financially successful - I mean you've accomplished something that you value, you've produced something of value. Something you value, and hopefully others do.
Discipline is it. Everything starts with discipline. It doesn't mean that you can't have a life, it doesn't mean that you have to give up everything.
I'm not into this grind-culture kind of way of thinking. I was when I was younger, and before it was even called that. It's a mistake, you really burn out. I worked 20 hours on and 10 hours off - with no time off, when I was working in animation - for months, with zero days off. It's just the wrong approach.
But being disciplined enough, such that it becomes something you do when you have the time - that's the trick. If you're just consistent, don't worry about the deadline. Just keep doing it.
Len: What was the reason you chose to self-publish the book, and why did you choose Leanpub as at least one of the platforms you're going to be selling it on?
Charles: You're actually the only platform I'm planning on selling it on. I've bought books from you guys, and I liked that you could have a slider, right? People who couldn't afford it could slide the price down. I thought that was really great.
I wanted this book to be available - I mean, we're lucky we grew up in this country. We were born in this country. I knew there were people - like in India, who would love this, and maybe they couldn't afford the normal price.
I thought - I would have paid $150 for this book five years ago. So if I went back in time, and gave myself this book - and I said, "It costs you 150 bucks" I would have bought this book. Because it would have saved me so much pain. So the book is highly valuable to me, the guy - the poor slob who had to write it, right? But - and it may be highly valuable to others - but they don't have the means. So I thought that was really cool, so I could allow people to slide it down.
You can give coupons, I thought that was really great. I didn't know that until I self-published. I just had bought books from you guys, and I liked the way you did things. It wasn't until I actually put my own book up, that I realized, "Wow, there is so much that - like everything I could think of that I might want to do or I might want to, it's there."
Now, when you're just a buyer of a book you don't have any idea, but I was really impressed with like, "Oh, I want to give somebody a coupon." Oh, that exists, you have that. "I'd like to know this information." Oh, boom, it's there. "Oh, I'd like to be able to update." Everything seems to be there. Everything that I've looked for so far, is just there. So the post-publishing experience was surprising. The level of quality of the website and the services that are there for you as an author, I think are great.
Len: Thanks very much for that. I can say the credit for all those awesome features goes to Leanpub authors themselves. Leanpub - much of what's there, is there because of us talking with authors over the years, and them running into walls and saying, "How can we break this one down?" Running into rivers and saying, "How can we build a bridge over it?" things like -
But a lot of those things are there, because an author's like, "Hey, you know what would be really great, would be this?"
Actually the last question I always ask on this podcast, if the guest has published a book on Leanpub, is - if there was one thing that you encountered that really bugged you on Leanpub, or if there was one magic feature we could build for you - is there anything you can think of that you would ask us to do?
Charles: I mean, I would say, not really. I can nitpick things. Like when I had to put the Table of Contents up, there was that - I really appreciate it too - you have this big paragraph that explains everything [about how to use HTML to add a Table of Contents to a book's Leanpub web page]. It's just not good - I don't have enough control over the formatting of the Table of Contents.
I think maybe a PDF I could have just pulled out of the book. If I could upload a PDF, and you could just see that - instead of me having to do HTML. Then you guys filter the HTML, so that we don't have any garbage tags in there or try to put some script things in there - that filtering mucks with your formatting. So if I could just take a PDF and do my Table of Contents, and then upload that, and you could just display the PDF, or something like that. I think that was the one little thing that I encountered. Everything else so far has been pretty stellar.
Len: That's super interesting - if I can just explain that. So, sort of OG Leanpub has various writing modes, where you write in our plain text markup, which is a variant of Markdown, called Markua. When you write in plain text and you click a button to publish a version, or preview a version or something, then what we can do is we automatically generate the Table of Contents in your book. But we can also automatically generate a Table of Contents on your book's web page on Leanpub, where you're trying to sell it to people. Having a table of contents there is very helpful.
So when we later created the "bring your own book" writing mode, which is like, "Why are we telling all authors you can't use Leanpub unless you use our workflow? Let's have something so they can use their own workflow, and then still take advantage of all the other features that we offer." But that left us with this dilemma, right?
Charles: Yeah.
Len: Because, "We can't auto-generate the Table of Contents, so what are we going to do?"
We did two very Leanpub-y things. I'm not, these are not - that's not a self-congratulatory thing that I'm saying. One was the "wall of text" as we call it - which is very long explanations that, if you hunt around on Leanpub as an author, you'll find these in various places.
But what we did was we said, "Okay, well, let's give people the ability to just write their Table of Contents for their web page on Leanpub in HTML."
Your suggestion, that we actually just give people the opportunity to - we've already given the opportunity in that writing mode to upload a whole book, and a sample of it, and a cover image. So why not also give them the ability to upload an image or a PDF or what have you - of the Table of Contents, and display that instead? I mean, I can't make any guarantees that we're going to do it. But that's actually a really excellent suggestion, and would solve the problem, wspecially for people who are - like, I mean - even if you're highly technical, and there's things I can't do - for people who are like, you'll see in the wording, where it's like, "If you don't know what HTML is, you can just ignore this, but that means you can't put up your Table of Contents unless you do it in the "About the Book" section, or some other workaround." So, being able to use an image there is actually a really good idea, and I'll make sure to share that.
Charles: Okay. There's one other thing now that I - not something I've experienced, but you have your own Markdown language, right? You should look at the callouts for - since you have a lot of technical books and you probably have a lot of authors who are doing code, right? I can't tell you how - that is the number one reason I used AsciiDoc.
It was a pain, honestly. I put up with all of its warts, just to get that one feature. It's an incredible feature. So the callouts - like I said, if you could add that to your Markdown - I might have thought to use the Leanpub approach.
Len: Okay, well I'll definitely note that to the team too, and obviously I can share a screenshot from your book showing exactly what you're talking about.
Charles: It's beautiful. It's a beautiful feature. It is really an amazing feature. I mean you could - it has some other niceties. But it was the winning feature for - if you're writing a book as a programmer, and you want to talk about code line by line, or you want to - or multiple lines of a block of code, it's amazing. So, that would be cool, since you're asking.
Len: Well, Charles - thank you very much for sharing your story, and your approach to teaching, and your approach to writing, and everything else about that.
For anyone listening, the book is Functional Programming Made Easier: A Step-by-Step Guide. If you think it's right for you, please go check it out. It's a really great book, and it really does deliver on the principles that Charles tried to implement when he wrote it and produced it.
So, thanks very much for being on the Frontmatter Podcast.
Charles: Thank you, it was fun.
Len: Thanks.
And as always, thanks to all of you for listening to this episode of the Frontmatter podcast. If you like what you heard, please rate and review it wherever you found it, and if you'd like to be a Leanpub author, please visit our website at leanpub.com.
