Embedded - 128: The American Pi

Episode Date: December 3, 2015

Simon Monk (@simonmonk2) talks with us about zombies and writing books.   Simon has 20+ books out, check out his Amazon author page or his web page for a full listing (simonmonk.org). Some you might ...want sooner rather than later include: The Maker's Guide to the Zombie Apocalypse: Defend Your Base with Simple Circuits, Arduino, and Raspberry Pi Hacking Electronics 30 Arduino Projects for the Evil Genius Kits for building some of the projects from Simon's books can be found at Monk Makes. (@monkmakes).

Transcript
Discussion (0)
Starting point is 00:00:00 Welcome to Embedded FM. I'm Elysia White, here with Christopher White. This week we're going to speak with Simon Monk about the technology needed to hold off zombies, which does make me wonder exactly what's going on in the UK. Hi Simon, welcome. Hi, hello, nice to talk to you both. Could you tell us a bit about yourself? Sure. Well, I live in the northwest of England, which thankfully is still zombie-free. And I write books about hobby electronics and the maker movement.
Starting point is 00:00:37 In particular, I write quite a few of my books are about Raspberry Pi and Arduino. These are the most popular boards that you have around at the moment. But I have other books as well on quite a few platforms. So I recently did one for the Spark Photon and Spark Core, which was quite fun, nice little board. And I'm always on the lookout for new things to write about. Well, we did play with some photons here, so cool. Have you tried the SparkFun thing yet? The SparkFun thing?
Starting point is 00:01:11 It's the ESP8266 board. Oh, right. Yeah. No, I haven't tried that. I have got an ESP8266 that I've been playing with. It's one of the NodeMCU devices. And they're pretty good. You really can't complain about the price, can you? It's astonishingly good value. So your bio says that you're a full-time author. Has that always been true? No, not far from it, really. It's only the past three or four years that I've been full-time writing. Before that, I spent quite a long time in the software business. But I've always had electronics as a hobby. It's always something, as a teenager, I used to go to the local public library and get out
Starting point is 00:01:56 electronic magazines. And they used to have projects in with stripboard where you could solder things together yourself. And I didn't really understand anything about what I was doing other than putting it together as the instructions said and then I made myself a metal detector that would just about detect a car if it was about half an inch under the ground and other little projects that you know sort of metronome and the sort of things that used to have in hobby electronics magazines back in the day. So I've always had it as a hobby, and I've kind of come full circle back to doing what I used to do as a teenager many years on. So you did spend time, you have a PhD in software engineering, don't you? Yeah, that's right.
Starting point is 00:02:43 My first degree was computer science and cybernetics and the cybernetics was mostly electronic so i enjoyed that and the computer science i enjoyed as well but when i finished of course all the jobs were in software so i ended up getting into software and really stayed in software for for a good long time um but i worked for three years i think programming and then went back to do my phd uh and then uh continued with the software development career and how did you go from software development which is usually relatively lucrative to writing as full-time which maybe i'm doing it wrong but it doesn't seem relatively lucrative to writing as full-time, which maybe I'm doing it wrong, but it doesn't seem as lucrative.
Starting point is 00:03:32 Writing is a numbers game. And it's really, I mean, I have about 20 books out now. And now I'm sort of, it's fine. It's a good, it's, I've replaced the income that I had before. And yes, software is a lucrative industry as well. But one of the things about software is that it doesn't really, if you're good at it technically, and if that's the side of it that interests you, apart from sort of technical architecture type roles, which kind of, even then you end up getting more into management than actually doing and then it started to lose its appeal for me and to be perfectly honest I'm
Starting point is 00:04:11 probably not a good manager of people and really I enjoy doing things and I enjoy making things and I enjoy learning things I don't really enjoy sort of trying to manage people and bend them to my will. So I was finding myself drifting more and more towards the dark side. And so I always had electronics as a hobby and sort of got back into it in a big way with Arduino. And as I was learning the Arduino, almost as a way of keeping notes for myself, I started writing a bit of a book about it. And then I thought, well, I may as well have a go at publishing this.
Starting point is 00:04:52 I sent it round to every publisher I could find an email address for. And Roger Stewart at McGraw Hill came back to me and said, how about repurposing this material into a book for Arduino projects for the evil genius for their evil genius series which is a lot of fun so um yeah i thought why not um i did that while i was still working and uh did the next book while i was still working um and then i think actually i probably did a couple of more books uh or at least had them in progress and then
Starting point is 00:05:24 eventually made the switch over to writing full-time which is an awful lot easier if you don't have to balance it with a day job ah maybe that's where i'm going wrong probably but starting starting projects starting books even even, is reasonably easy. How did you get through the slump? The, okay, this was good. I've written what is essentially six really nice blog posts. And now I just need a dozen more. I know. It is difficult. You have to, I mean, I have a sort of routine, and I think having a routine helps a lot. So I write mostly in the mornings. I tend to have a bit of a slump early afternoon, and it's kind of 50-50 whether I'll get back into it for the rest of the day
Starting point is 00:06:14 or whether my brain will be fried and I'll do something else. But I also, in the mornings, I turn my email off. I don't read any email. I don't look at tweets. I don't do anything. I don't look at tweets I don't do anything I just get my head down and and write and actually the sums add up quite quickly if you can make yourself write five pages a day every day then it only takes a couple of months before you got yourself a book so it's a and I have a sort of, coming from a software background and all the problems involved with completing software projects on time and delivering them when they should be delivered.
Starting point is 00:06:54 I borrow from there very heavily. So I have a tracking spreadsheet for each book that I'm working on. I break the book down into chapters. So a bit like stories and extreme programming or something. And then I gradually, as I work my way through, I have an estimated number of days efforts and I have an actual number of days efforts. So I can see at any point for any book, how many pages I've got to do per day to meet the deadline for that book. And I find having this kind of, I mean, it's in a way, it's a bit bit of an artificial deadline because it's sort of creating lots of small deadlines on the on route to the
Starting point is 00:07:29 big deadline when you've got to deliver the manuscript but i find i need that to sort of keep me going and keep me on target you probably don't end up with the same kind of uh unknown disasters with writing that software engineering oh this doesn't work or here's this bug that's going to take us a month to solve you know sounds like it's a little easier it's it's a lot easier and the other thing is you're only working with yourself so you haven't got to wait for other people you haven't got to get other people to do what you want you can just get on with it which i do find um quite enjoyable maybe i'm just not very good as a team player perhaps that's what the secret is so it's no it's nice. So you do pages per day not words per day? Yeah I've never
Starting point is 00:08:15 even actually worked out what a sensible number of words per day is I just go off essentially A4 double spaced pages which is what I originally started with. That's kind of the format that McGraw-Hill used for their manuscripts. You just write it in Word in double-spaced pages of A4. And I never even actually print it out, so it's just a case of scrolling through the document. How many pages does this work out at? It's more difficult with O'Reilly. You have this Atlas system, which actually I'm sure – have you wrestled with atlas have you had fun with atlas
Starting point is 00:08:49 with your book no uh i when i did it they were using an xml based thing that was okay yeah not all that much fun i i admit i wrote everything in word and then ported it. Okay. Yeah, well, now they have this quite – it's a nice system, but you basically – it's linked up to Git, so you can sort of download – you know, you can work on things locally, but most of the time you work on things online in a kind of WYSIWYG editor. So it's difficult to work out how many pages you've made, you've written, unless you actually generate the PDF for the – at any point you can click on a button and generate the pdf for the book and then i usually do that and then have to toss up the actual book pages that my efforts
Starting point is 00:09:33 turned into so it also gives you a kind of because you update your spreadsheets at the end of every day you get an idea yes i am making progress on this it's sort of gradually um you know working its way to at least heading in the right direction although you occasionally get spells where you're sort of experimenting with new technology or something where you don't actually get very many concrete pages done you just find that you you're spending a lot of time investigating but it's um it's all part of the effort and then there are the days that you spend editing from last week or from your editor and I don't make my word counts
Starting point is 00:10:10 because I do word counts instead. Okay, yeah. And then I feel bad, but then I'm also like, yeah, I worked really hard refixing all of those things. Wow. I remember my first book, I did a lot of re-editing of my own material and then sent it all off to the my editor who then of course changed a load of things back and converted a lot of things that i'd written in british english into american english because
Starting point is 00:10:42 primarily that's their market and i thought why did I go to all that effort? I've done all these changes and they've just changed half of it back again. So these days I tend to do, I do one pass of writing and then I do one read through and then I let it go to the copy editor and I don't change anything else until it's come back from copy edit. And that's partly just a case of um keeping things moving fairly quickly but um also this is you know once one of those things i think software developers always have in common is that they hate uh wasted effort they hate doing something that doesn't actually finally get used it's um it's a bit of a problem yes yeah so you yeah i'm sure you you recognize that and then you decide i'll just put this in a box i know i'll just put this off to the side somebody's gonna
Starting point is 00:11:31 want to read this it was cool it was really hard to write that's right yeah nobody cares yeah keep it simple and it's you know it's very much um i think i like to keep my my my books as as dry don't repeat yourself as I do my code, if possible. Try and make it fairly concise and straightforward. And I think people, I guess a lot of the people who read my books are probably from a software background anyway. There are just so many of us out there these days. And I think quite a lot of software developers
Starting point is 00:12:00 who I know are getting back into hardware as a hobby. They have met it as youngsters and are coming back to it now. Well, I have some more questions about writing as a career, but I'm not sure everybody out there is that interested in that. So let me instead ask about zombies. You have a book coming out, The Maker's Guide to the Zombie Apocalypse. Is that right? Yeah, it's actually out.
Starting point is 00:12:25 Yeah, that's right. It is out now, actually. It's available on Amazon and everywhere else. So, I mean, this was really born of an idea that my wife Linda had. We like watching The Walking Dead. It's a fantastic TV series. I don't know if you like that. Yes.
Starting point is 00:12:41 Yeah, there's a lot in it. But one of the things that's always struck me about the series and in fact pretty much any um post-apocalyptic drama is that the people the heroes tend to be warriors you don't get many engineer heroes and i and i sort of have a nagging suspicion that once you've got the past the initial fighting off the zombies you're going to want to have to make things you're going to want to have to make your life safe and make your life easy you want to rebuild some of the parts of civilization that just make life more bearable um so i think that um you know the zombie apocalypse would be an opportunity if that's
Starting point is 00:13:22 the right word for makers as well as for warriors. Plenty of interesting projects out there. So this book really was sort of spawned off that idea, that it would be nice to, you know, obviously very tongue-in-cheek. I would hate anybody to think that to take this stuff too seriously. But the basic premise is that you're going to want to do things to make your life more comfortable and more safe um so there's going to be no end of stuff you can scavenge you can go and find um lots of car batteries you're not going to have any uh
Starting point is 00:13:57 electric ac electricity you're going to have to generate what electricity you need yourself you're not going to have an internet you've've got to kind of make do with fairly low-tech solutions a lot of the time. So I bend that a little bit, and I assume you're going to be able to get hold of Arduinos and Raspberry Pis. But I guess there's going to be plenty of stores that you can break into and get useful components from well you know there's there's the whole prepper movement at least here in the u.s of people who plan for the apocalypse by laying down a whole bunch of food and and usually weaponry is part
Starting point is 00:14:40 of that and i find that slightly terrifying do you are you worried that your book and a number of raspberry pies are going to be hermetically sealed and put into somebody's garage no if they want to do that that's that's absolutely fine they can do that um yeah i mean they'll obviously have to to buy the book to do that so as long as they're doing that I'm winning really so that's fine yes and hard copy will be better hard copy would definitely be better yeah what is your favorite project in the book um I think it it's actually probably the the last project in the book which is um a silence haptic communicator because you know the classic zombie problem is that you've got a two-way walkie-talkie and just at the critical moment somebody presses the button and the zombies come staggering out of the bushes and start eating you so you really don't want that
Starting point is 00:15:39 so so this project is um it uses a couple of vibration motors um it's an arduino little arduino project and a vibration motor and a little um nrf24 um radio transceiver so the idea is you just have a button and you just have a buzzer on each of the two handsets and then when you press the button it um does the vibration on the other handset So if you want to have little signals like three buzzes for zombies approaching, one buzz for all clear and things, you can do that. You can make up your own little codes, but you're not at the mercy of noisy walkie-talkies, and you can be a bit stealthy about it.
Starting point is 00:16:18 Oh, come on. They should learn Morse code. We should all learn Morse code. Yeah, I suppose. Yeah. It's a tough balance, explaining a project like that. Which, I mean, right now, if you wanted to build that from Adafruit, Sparkfun, even from your own boards, you could do that. but how do you balance that Lego-likeness with describing electrical concepts? Yeah, I think that's a really good question. It's one of the things I try and do in any of my project books, because I have some books that are project books,
Starting point is 00:17:02 some books that are kind of text textbook educational type books and then and i think with a project book you have to or i always try and have a mixture of different project levels so that some of the projects are really simple so there's things like just a micro switchbased tripwire that sounds a little better. So car battery, car horn, actually, I think I use, and then a little microswitch that I suggest you could rob from a dead microwave oven. And others, you know, you gradually work up into more and more levels of difficulty for actual projects. But then I think you also have to separate out the how do I make this from the how does this work
Starting point is 00:17:47 so I tend to make use of side boxes and texts sort of towards the end of the project that that people can read if they're interested so you don't have to do that bit you can just stick with the how do I make it step-by-step instructions and one of the things I've learned as well with step-by-step instructions because because you don't know exactly the level that your audience is at nobody is really offended if you if you tell them in too much detail and I think it's always important to break it out into step-by-step and assume not assume too much about your audience and assume that they're going to be able to you know that they don't necessarily have a strong programming background or a strong
Starting point is 00:18:29 electronics background and that they may be this may be their first project i think does it take you back from to when you were working out of magazines and trying to do step-by-steps there and wondering which steps you can shortcut and which steps have to be done exactly this way. Magazines used to have programs you had to type in. Yeah. They do. And if you're really lucky, you could save them onto your cassette tape.
Starting point is 00:18:56 If you were really lucky. Yeah, it does take me back, actually. And I think a lot of those sort of articles where you're using stripboard and they have nice diagrams that I suspect at the time were all probably hand-drawn, and I appreciated that. And I think when you don't know the theory, you have no option but to follow the steps very carefully because you don't miss anything out because you don't know
Starting point is 00:19:22 what's important and what isn't important. That's the incentive, I i believe to learning the theory that you having learned the theory you know which bits you can miss out and you also start to learn how you can go off piste and design your own things rather than simply follow instructions yeah the whole oh i don't have the mosfet they want i have this one will it work is always yeah exactly yeah and i think that's going to be really important with the zombie apocalypse exactly that's very true do you see you said it's fine to over explain um and that makes a lot of sense to me but But do you have somebody you're writing for?
Starting point is 00:20:08 Do you mentally have an audience member that you talk to? I think it varies from book to book, and I think the times when I've struggled with a particular book, generally, when I haven't got a clear idea of who I'm writing it for when I'm setting off writing it. And I think the audience, the intended audience, completely changes the shape of the book. It has a big impact on how you write it. So it varies.
Starting point is 00:20:33 You know, sometimes I'm writing it for, I think mostly I'm writing it for somebody like me or an earlier me. I've always found that I can only really understand things if I sort of make notes about them and simplify them and let them sort of digest for a while, and then gradually they start to make sense. So I feel I need to, when I'm writing, I need to make things very clear. I need to not assume any prior knowledge. I need to assume that I'm writing everything that you need to make things very clear. I need to not assume any prior knowledge.
Starting point is 00:21:06 I need to assume that I'm writing everything that you need to know to make this work so that you're not left guessing and thinking, what on earth is that? What's that? And I think that's in a way why I found something I learned from my first book when I was writing 30 Arduino projects for the Evil Genius. I just found that because I didn't know anything about it, I knew about software, I could write the code, but I'd forgotten a lot about electronics,
Starting point is 00:21:33 and I didn't know anything about embedded development. I was still thinking, where's the vector class? Where's the string class? Why haven't I got a big heavyweight object I can throw around here? Well, you've got one K of memory. Where's the garbage collector? Exactly, yeah. And I really ought to break this down into a whole load of classes and write some unit tests.
Starting point is 00:21:53 Well, no, actually, completely pointless. Your entire program is 30 lines long. Why on earth would you want to do any of those, look for any of those things in it? So it is very different writing embedded. And I think in learning how to do that, sort of documenting the process of learning, I think makes for good writing.
Starting point is 00:22:12 Yes, and it is harder to explain something you know very, very well than something you know the principles of and are learning the details of. I think that's very true. It's very easy to assume that your audience knows everything that you do. But then if you do that, then there's really nothing to write. They would write their own book. So you just say, make yourself a haptic communicator.
Starting point is 00:22:39 You wouldn't have to say anything about how to do it. So I think it's always sort of remembering, if I was doing this back 10 years ago when I never met Arduino and didn't know anything about embedded development, what are all the pitfalls? What are all the things that I wouldn't know that I'd need to know?
Starting point is 00:22:54 I like you're using yourself as an audience member. I did that some for making embedded systems. It was like, well, what didn't I know? I got out of college i started my job what are all the things that i wish i had known then yeah i suppose it comes down to wisdom doesn't it you're trying to impart the the lessons that it took a long time to learn you're distilling them down into a few points rather than have to let somebody else some other poor soul suffer all the difficulties you had in discovering these little secrets.
Starting point is 00:23:27 So, suffering the difficulties, did you build all of the experiments in your book, and how many car batteries did you go through? Yes, I always build every experiment and project in any of my books um sometimes more than once um it's the times i've ended up um photographing something in like stage two of ten and then um the the editors come back and said that that have you done this he's saying that figure number 3.11 that's slightly out of focus could you re-photograph that and you and really well you've got to so the only option you have is to go and buy the bits and build the damn thing again which of course i hate doing because that's replicating efforts and software developers do not like having to
Starting point is 00:24:16 replicate effort so um yeah it can i do always make the project only one car battery in fact um i had to buy a few things that are kind of big big items for a project i had to buy a car battery i had to buy um a solar panel um and i had to buy a car alternator for the pedal power generator um most of the other things i kind of already had or they were just the standard electronics that i could get fairly easily so what are these things doing now I kind of already had, or they were just the standard electronics that I could get fairly easily. So what are these things doing now? They're just languishing in the garage, in the shed. This is part of the problem.
Starting point is 00:24:59 You tend to make all these projects, and some of them, you can't keep all of them live, keep all of them working. It's not part of the zombie book. It's part of, I think, Dangerously Mad Projects with Evil Genius. I made a sort of a RFID door lock, which I have on the garage door. So that's still there and that's still working sort of four years on without any maintenance. I'm quite pleased with that. But yeah, by and large, they end up in boxes in storage somewhere. Yes. And then I'm always sad whenever i see the boxes but it's about the learning and for you it's about
Starting point is 00:25:32 the writing it's not about the end project always yeah it is i mean occasionally i'll make something and think that's really nice that i mean i do think the haptic communicators are nice little projects and unfortunately they're a project that doesn't really have a serious use unless you're under zombie attack but it's nice to know they're there should i ever need them i seem to recall seeing something that was basically haptic communicators for teenage girls so that they could talk in class so you know there might i mean there's certainly a zombie maybe other uses there yeah uh so i mentioned adafruit and spark fun earlier but you have a new venture that's sort of adafruit for the uk market oh Oh, no, nothing so grand. I mean, I have a business called Monk Makes.
Starting point is 00:26:28 And this is really, Linda, my wife, manages that. And this now has become her full-time job. But what we don't, we really don't want it to become more than the full-time job. And the idea is that we're not going to do any retail. We're only going to do wholesale. We're not going to do any retail we're only going to do wholesale we're not going to have any premises other than taking up most of the house with cardboard boxes from China but the idea is to keep it small and portable so that because we like to we like to travel and we don't want to be too tied down and the great thing about writing is you can do it
Starting point is 00:27:02 absolutely anywhere so it's um it's a small scale business we have and it's sprung out of the fact that people are always asking where can i get the bits for this project that project or the other project so we have a raspberry pi electronic starter kit that has breadboard and a few other um components so that you can and it has 10 little project cards in so you can plug plug the things together going back to whether you know understanding what you're doing and just making it the project cards you can just build the projects and run the program and then if you're interested then you can start looking at how it works and start looking at the code and
Starting point is 00:27:39 editing it and changing it to do things um yeah so so we have kits, mostly kits. And then I also have a few boards that I've designed that I sell through Seed Studio and Adafruit stock, some of those. But yeah, we're very much sticking to manufacturing and not too much dealing with the public, I think, which can be very time consuming. Yes, they always want one more thing. So I know you have several books about Raspberry Pi and at least one about BeagleBone Black,
Starting point is 00:28:11 and you just mentioned you stock Raspberry Pi. Which one's better? That's a very good question. I think until the news of a day or two ago where the Raspberry Pi Foundation has brought out a $5 Raspberry Pi. A Pi Zero. Yeah, I know. Isn't that adorable? It's so tiny and cute and cheap.
Starting point is 00:28:33 It is tiny, but it's got everything on there. Yeah, but that's the thing. I mean, the BeagleBone is a lovely board. Certainly when the first Raspberry Pi came out, and it was the Raspberry Pi and the BeagleBone Black, the BeagleBone Black was a much better designed board. It had analog inputs. It had more GPIO pins. It had a really slick angstrom distribution
Starting point is 00:28:57 that would load itself up in about 10 seconds. And very nice, very good board. And I think at the time i thought well that's going to be to excuse the pun the american pie that's going to be what's what people use in the states and the raspberry pi will be more of a british thing but i think as time has gone on and the raspberry pi has brought out the pi 2 with the quad core um loads of performance um it it must be difficult for the BeagleBone. I think it probably will shake down to the fact of whether you prefer writing your code
Starting point is 00:29:32 in Python, and then you're probably going to be going with the Raspberry Pi, although of course you can do that on the BeagleBone, or whether you come from a JavaScript background and you really like the whole Bonescript, Node.js thing, which, of course, a lot of people do because you've got an awful lot of web developers out there who are actually very familiar with JavaScript and probably take that to that more easily than they would to writing things in Python. Just realized web developers are going to steal our jobs. Probably, yeah.
Starting point is 00:30:04 That's all? That's all. That's all, okay. This's all okay depressing time okay no thanks for that well and there are i mean for all that this is pretty amazing the pi zero is pretty amazing there there are other boards that are eight and nine dollars that are linux and wi-fi and i just amazing yeah it is i mean mean, it's wonderful for kids. I mean, I don't know how much the Raspberry Pi is being used in education in the States, but over here in the UK, every school has been given Raspberry Pis. And the kids have been using them mostly to learn Python,
Starting point is 00:30:42 which is kind of a bit of a waste because they could just do that on the PCs that they already have. But I think certainly some of the problems that we had in the UK is that because school networks are incredibly heavily tied down, that they had all sorts of problems actually allowing kids to run Python scripts because you don't want the kids erasing the share drive or doing some horrendous kind of hacking so actually sandboxing it to a raspberry pi was was quite attractive to some to a lot of school administrators um yeah so it's been very heavily used in schools and quite a lot
Starting point is 00:31:17 of our raspberry pi starter kits get um sold into schools and after school clubs who like to use it to take the do the pie for something use the pie for something that you couldn't just use a pc for and start connecting some electronics to it because it's amazing the effects that it has when a you know a child playing with one of these kits who actually sees an led turn on and off they say i'm controlling that led i'm turning it on and off and it's such a little, but it's so much more impressive than making some text appear on the screen in a program or moving a turtle about on the screen. It's not real if it's on the screen.
Starting point is 00:31:52 Whereas if you're actually turning an LED on or off, it suddenly becomes much more compelling to these kids. I think everybody who is an embedded software engineer is nodding their heads along. Yes, yes, yes, indeed. And everybody who's like, I don't get it. It's fun to make things go on the screen isn't listening to the show. That's true.
Starting point is 00:32:15 So with Monk Makes, you have a stash of electronics that, you know, the Raspberry pi and other things from your book but when the zombies come now everybody knows that you have a stash of electronics are you concerned oh no i think they'll be i think they'll be too too busy worrying about escaping the zombies and by the time they've by the time they've solved that problem i'll have remade some of the projects in their book and have everything heavily protected with security so that they won't be able to get in. So did you do more research on zombies as you worked on the book? Or did you really focus on the electronics and the zombies for sort of to the side? Well, no. This is the first.
Starting point is 00:33:04 There's an introductory chapter, which is more just a general zombie background so i felt i ought to because you know i enjoy series like the walking dead and i do enjoy the odd zombie film especially comedy zombie films or comedy horror films um you know like the cabin in in the Woods and things like that. But so I did rent a few. Chris is really sad that you didn't say Shaun of the Dead. Oh, yeah. Shaun of the Dead as well.
Starting point is 00:33:33 Because that's important. Yeah. Now that kind of, those films I do really enjoy. So we did do a bit of background and I've got a few tables in there that classify what types of zombie there are, so whether they're infection-related zombies or whether they're reanimated. Fast or slow zombies, exactly. That's the important one.
Starting point is 00:33:56 It is, yeah. It makes a big difference. So, yeah, I really enjoyed doing that part of the book because it's something a bit different. I could do a bit of research and come up with something. Yeah, exactly. How do you mean you need to rent some movies tonight? I had an excuse to watch zombie films.
Starting point is 00:34:12 Do you want to watch World War Z or iZombie tonight? Probably tax deductible as well, although we haven't done that bit yet. I'm less concerned about zombies when I write and more concerned about a different monster that maybe you might have advice on the procrastination monster yes I think I mean as I was saying before
Starting point is 00:34:36 the only way around that really is to get into a routine and not allow yourself any diversions turn the email system off and just do put yourself a few hours aside to make some progress and then you can see what people are saying and catch up with the talk.
Starting point is 00:34:55 Maybe turn off Slack. I made the Slack channel just so I could have people to talk to while I write. And yes. That was probably a bad choice. It really was a bad choice. That is. How can you have people to talk to while I write and yes. That was probably a bad choice. It really was a bad choice. That is. How can you have people talking to you when you're writing?
Starting point is 00:35:10 Does that work? I have a couple of people who very generously will like. A review material and things. Especially like the very beginning, like is this drawing worth doing at all? I mean, I've done it in pencil and scratched it up but you know if i did this properly does it make sense and that is very helpful but we do spend a lot of time um i don't know arguing about whether han or leah is better so maybe not 100 no i i mean as i said before i find i've had a few collaborations with books but
Starting point is 00:35:48 generally it's kind of been after the fact where i've come in as a second author in the fourth or third or fourth edition or something to to put some new material into the book and i do find it difficult working with other people i find certainly in software teams i was quite happy working in something in a in a well-run running xp team where there's a team of you all working on a project and you and you're very productive and it's and it's fantastic fun but then i find that um if i'm making something i don't really want to consult with other people i just want to get on with it and do it myself i find that i'll have if i if i i don't mind sort of consult with other people. I just want to get on with it and do it myself. I find that I don't mind sort of getting views on it when it's pretty much complete,
Starting point is 00:36:31 but I'm not one for a huge one for collaborative making. I tend to prefer to just do it for myself. So do you remember the first time you introduced yourself as an author instead of an engineer? Yeah, it's a great thing to say isn't it it sounds so impressive the only problem is everybody assumes you write fiction and then you have to say no i don't write fiction um and then um went to one party where a friend of ours introduced me to everybody as a as a pornography writer so then i had to explain that i didn't actually write pornography wait wait wait how did that
Starting point is 00:37:05 I think she just thought it would be funny oh god but um friends yeah um yeah so it's writing being an author I think you know there's a certain cachet to it isn't it it's a nice thing and I think probably the first time was actually when I put it on my passport form and I had to renew my passport, and it's occupational. I'm going to write author here. So that was a buzz. It's hard, though. Engineers, maybe it's just that I haven't made the switch.
Starting point is 00:37:39 Engineer is such an identity for me. It tells you a lot about me. I'm probably not going to want to make chit-chat. On the other hand, if you want me to fix your phone, I'll do it for you. And author is a different personality to some extent. I mean, I know that our occupations don't define our personalities,
Starting point is 00:38:02 but they do a little bit. Stereotypes are there for a reason sometimes. Yeah, there is. So in a way, while it's nice to call myself an author, I just know that deep down, I'm still actually a teenage boy messing around with electronics, really. That works, yeah. But it's tough to put that on your passport. Exactly. You can't put that on your passport, unfortunately. What is the worst part about writing as a career?
Starting point is 00:38:33 I think there are two aspects that are a little bit difficult. One is you're working on your own. And when my wife was working in insurance, she had a long commute, and I was sat at home writing all day. You can go a little bit stir-crazy. So I used to make myself go out and go to the Fab Lab in Manchester, or I got some friends up at Lancaster University, and I used to go out and see them just to stop myself going completely mad.
Starting point is 00:39:01 I feel a lot less need to do that now that Linda's at home and we work together some of the time and she's always around. So I tend to go out less, really. So there's that side of it. It's very much a solo effort or it is at least the way I do it, which is in big contrast
Starting point is 00:39:21 to the software I was doing before where it was quite a small team and I missed the whiteboarding, you know, when you all stand up in front of the whiteboard and have a really good technical discussion about how you're going to do something. I do miss that, I must admit. And I think the other side that makes it a little bit difficult is that most of my books are with McGraw-Hill who have this standard old-fashioned payment model where you basically get paid twice a year. So that does mean you've got to be careful to not sort of say, oh, hooray, I've got lots of money and rush out and spend it all and then say, right, what am I going to do for the next five months?
Starting point is 00:39:56 So you do have to be a little bit careful. Are you ever tempted to pick up contract software jobs or are you really an author and you're not coming back to the coding side? No, I'm not coming back to coding. I do a regular column for the Magpie magazine for the Raspberry Pi. That's the only bit of writing for hire that i do at the moment um i did a series for adafruit a year or two ago i did several series actually an arduino one and a raspberry pi one and a beagle bone one in fact but um i i prefer something with royalties attached it's um the thing about writing for hire is i know a few people who who do that and it's quite a stressful living because you spend a lot of your time touting for work, you have a lot of deadlines whereas if I'm, I generally have two
Starting point is 00:40:53 books on the go at a time so that I can when I get bored with one I can switch over and do a bit of the other one for a week or two but I do find that that's it. You know, I've essentially got three or four deadlines for each book, you know, a couple of chapters, halfway, finished manuscripts, and that's it. So it's much less stressful. There's no immediacy. But you have seven books coming out next year. So there has to be some, I don't't know you have seven books coming out next year wow yeah the other problem is i'm really bad at saying no
Starting point is 00:41:33 so a lot of the the books are coming out well several of the books are coming out next year are actually finished it's just a kind of they won't be um public they won't be on sale until next year just because of the way the publishing industry works um and some of the books are next editions so i've got um a new edition of the raspberry pi cookbook coming out um and i've got some i joined in on the third edition of practicalical Electronics for Inventors, a fantastic book that Paul Schurz wrote originally. And although it's called Practical Electronics for Inventors, there's a hell of a lot of theory in there for a practical book. It's very much covers pretty, it's pretty encyclopedic coverage of electronics in about 1100 or 1200 pages. It's a big book. So I came in on that for one edition, and I'm adding a chapter on FPGAs
Starting point is 00:42:30 and revamping some of the digital material on that for a fourth edition. So I've actually finished the writing for that. And then I'm also joining in on Stan Giblescu's Teach Yourself Electricity and Electronics book. I've added in a chapter on microcontrollers and also a chapter specifically on Arduino into that book. So second and third editions and things are quite, they're nothing like the effort of writing the original book.
Starting point is 00:43:03 It's very much a case of reviewing material bringing up to date and adding you know two three or four new chapters into it but you've also got programming fpgas and uh another raspberry pi book coming out are those written programming fpAs isn't written yet. It's not started yet, in fact, but it's signed for. The Raspberry Pi book, I haven't got a new Raspberry Pi book. That is just the cookbook, the Raspberry Pi cookbook, second edition. Make action, movement, light and sound with Arduino and Raspberry Pi. Sorry, I didn't.
Starting point is 00:43:46 That's okay. Yeah, that's okay. Yeah, that one's written. That one's in the mail now, so that won't be. I think that's due out sort of January or February time, I think. Yeah, so the seven headline isn't quite as scary as it sounds. I usually do end up with sort of probably four or five books a year. And I do like to have two books on the go at the same time so to get bored when i get bored with one i can switch over and do a bit of the other one yeah i like to have two projects going i totally understand that sometimes you just stopped
Starting point is 00:44:16 and it is no fun anymore but if you go do something else what used to be a chore now is fun it's exactly there's no there's no point in banging your head against a brick wall. You might as well just go and do something else. You're in the mood, really. So how are you learning FPGAs? Or how did you get started with FPGAs? Yeah, well, I first learned them, really, as I was writing the extra chapter for Practical Electronics for Inventors.
Starting point is 00:44:44 I put a chapter in there on programmable logic. So I got myself a development board. I got myself a couple of books on Verilog and just tried a few simple projects, gradually working through them, getting the hang of it. And, of course, benefiting from what you were saying, what we were saying earlier, that I know very little about FPGAs. So learning about them, it's very easy to make a note of the pitfalls and the things that people aren't going to know about how to use these devices.
Starting point is 00:45:17 You also did videos for O'Reilly, didn't you? Yeah, that was a strange experience because it's um i basically went over to boston and they had a sort of tv suite a recording suite set up and basically spent a week um making projects from the raspberry pi cookbook while they were being videoed and giving a commentary so i think it's probably the hardest i've ever worked in my life because you really had to sort of think and talk and concentrate and try and be concise and i think i don't know how many um hours we did but it was quite a few um that we managed to get recorded quite a lot of the recipes and of course you got to you know you got to make them there and then and you don't
Starting point is 00:46:01 really want you know you're squinting at a piece of breadboard trying to you know pushing transistor into holes and things and you have to make sure they're in the right hole you haven't got really got the luxury of messing around and uh get you know you want to try and get it right first time or it just um you got to start again so yeah it was it was quite intense and it was quite fun um and something a bit different really and I got to see Boston which was lovely very nice city. Would you do it again videos? I think I'm going to be doing it again for I'm doing another book with O'Reilly called the electronics cookbook which is a sort of more general text that is going to have recipes that are sort of applicable to use of microcontrollers but also just general electronic recipes you know how do I use a voltage divider? You know, how do I use a transistor to control a high power output
Starting point is 00:46:51 and all those sorts of things. So, yeah, I'm going to be doing it again. I'm not exactly sure what the format is going to be and exactly how this is going to work. But I think we have to, as an author, you can't really just write anymore. I think you have to be involved in these multimedia projects and, you know, sort of online training and things like that, that O'Reilly is sort of quite keen on sort of diversifying
Starting point is 00:47:17 beyond just simply print books. And I think, you know, it has to be the future, really. I'm not sure. I don't like watching videos, so I would rather have a book. But I do know that a lot of people do like watching videos, so I understand why O'Reilly is diversifying. I mean, I've really learned this from my kids, because my son Matthew, if he wants to learn something, he finds an online video that will tell him how to do what he wants to do.
Starting point is 00:47:52 That will be his first port of call. He would always do that rather than get a book. And it works because you follow the step-by-step instructions on the video. You watch what they're doing and you learn how to do it you skip all the theory by and large but then as i was saying before you can go and backfill you can go and find out how things work if you if you care if you want to know how that works and even if you don't if you keep just following instructions at the top level eventually things will start to click and start to make sense and
Starting point is 00:48:25 you start to see patterns so i think it's a very different way of learning from the way of learning that that i experienced you know at that age where it was you learn you find a book well i say that actually i used to go to the public library and get books and just make projects by rote so maybe maybe i was doing it the same way but certainly the formal teaching that it gets at school where we had a bit of electronics it was very different you start with how does a semiconductor work you can you start with electrons and holes you don't start with here's a breadboard poke some things into it until it works so different styles of learning and i think the younger market they
Starting point is 00:49:06 they you know they want this immediate i want to see a picture of how to do it i want to see a video i want somebody to show me i can i can learn the theory later if i want to one of the other things o'reilly does is uh drm free pdfs DRM-free PDFs. Yeah. How do you feel about people getting your books for free? It's interesting. I mean, when I first started writing, I used to get very cross about all these people downloading my book for free. I want to try and do this for a living eventually,
Starting point is 00:49:43 and these people are just stealing all my stuff. I wouldn't walk into a store and walk away with a video cassette or, well, I wouldn't walk away with a video cassette anyway, but a DVD or anything, but showing my age there. But I think it's now actually, I'm much more mellow about it. I really think that it's, I like the Tim tim o'reilly quote that you should create more value than you take and if if people are going to people are going to download the pdf are going to download the pdf anyway there's really very little you can do about it i don't think there's any point in having drm i think it's a lost battle it's been a lost battle for a long time all my books whether they're DRM or not, are available as PDF.
Starting point is 00:50:27 You just type the book title and you type PDF and there you go. One link usually from Google. So it's a lost battle. You just have to hope that enough people like to have the physical book or want to do the right thing and, you know, actually pay for their material. I think it's a difficult one because I'm very sympathetic to the idea that knowledge should be free. But I do think actually people should pay for entertainment. And I like to think that when we write books, we provide a little bit of both. We provide a bit of entertainment
Starting point is 00:51:02 and we provide a bit of knowledge. I mean, learning things is fun, isn't it? So I'm quite happy with the concept that people should have to pay and I should get a royalty for, if you like, the entertainment aspects of what they're learning. And the knowledge they sort of get for free is part of that. So I think people, you know, for example, all the source code for all the projects in the book are completely open source. I'm quite happy for anybody to take any of them and do anything they want with them. But I do think I've got to make a living somehow. And
Starting point is 00:51:35 I don't think the answer has just been, well, it isn't for me anyway to be paid to write content as a one-off payment. I much prefer to have the royalty type model where everybody who's consuming the product you know provides a little bit of income for them for the person producing it yeah that does make a lot of sense and it's it is hard because on one hand i have to feed my dogs real physical kibble that costs real money. On the other hand, if somebody really wants to read my book that bad, I'm sort of honored. Yeah, well, that's that whole side of it, isn't it? And I think I can see things shifting more towards a subscription model
Starting point is 00:52:23 as people have more and more of their things as electronic versions rather than paper versions then it makes more sense to i mean all the youngsters i mean my you know my kids quite happy to pay um give amazon uh ten dollars a month to have unlimited access to music or google subscribe to google play and have you know access to all the music that's ever been created in the world ever for ten dollars a month it's not a bad deal is it really so i think i can see things moving the same way for a lot of books in in electronic format so you'll get things where you know people basically pay a subscription to lend from a library. And as long as some of that money does, some of that money filters back to the people who are producing the books,
Starting point is 00:53:12 the content, then that's fine. But I think new models have to be discovered because I think people are just not used to paying for content, really. Yeah. Yeah. One of the best benefits from from the o'reilly book contract was the safari online uh lifetime membership and safari online is a lot like what you were saying it's a subscription model for all o'reilly and a whole bunch of other publishers technical books and so like yeah when when i i was like oh i should talk
Starting point is 00:53:47 to simon and and uh the person who set it up for us was very nice and but by the time i had talked to her about it i had already read zombies because it was on safari and i could okay yeah and i do that a lot i just zip through safari books um and i don't feel the pressure to finish them i don't feel the pressure to start at the beginning and read through i just read what i want to read because i it's already there yeah and i think that's what people are starting to expect really isn't it more and more that's um the other will always it's a generational thing to a large degree and there are i mean i i still buy books and um i think probably lots of the people who who buy my lots of people who buy my books obviously buy books but i think they they they like having a paper copy because there are some things you can do
Starting point is 00:54:41 with a paper copy that you you can't with an electronic copy, aren't there? I mean, in particular, I think it's reading in the bath and things like that. You can do that if you've got a paper copy, whereas you probably wouldn't want to do that with your Kindle. I don't know. Kindles are going to preach you. That's true. What happened to that old Kindle, Christopher? That's not true. Yes, you wondered why it was in the bin
Starting point is 00:55:06 yeah you know it i read a lot of electronic books and having just moved and had to touch all of the things that i own i am even more in favor of electronic books than i ever have books are really heavy aren't they We've just been moving some around. And you fill up a cardboard box full of books and then you think, that's a tree, isn't it? That's a lot of wood in there. So yeah, certainly going on holiday and things, Kindle, brilliant.
Starting point is 00:55:37 But sometimes it's just nice to have a book out. And I think books are also more resilient to blobs of soldier and other mishaps than than the kindle probably is that's a good point so of your many books which is 20 and now you're going to not quite add seven because some of these are second editions but of all of your books which is your favorite um i think probably actually for rather sentimental reasons the one that i like most uh is the is the book i did with my son on minecraft which was um and also it was quite fun because i've done a lot of electronic projects by that by that uh by the time we came to this one and
Starting point is 00:56:23 this one was pretty much out and out of software book there was no hardware in it at all in fact um so that that's minecraft mastery um that i wrote with my son matthew he he provided the minecraft expertise and i provided the java expertise um and um between us we had we had quite a lot of fun writing that book um so there's there's loads of stuff in there about sort of making contraptions with redstone and then it moves on to actually writing your own mods in in java which is sort of where i could help out but it's a fantastic game it really is i mean it's um people you know you you hear these stories about limiting kids uh time on their on their computers or their consoles or if they're playing something like minecraft or some of the other sort of
Starting point is 00:57:07 incredible games like the Kerbalist space simulation game thing that Matthew used to play as well, that's not wasted time. You're learning something if you're playing those games. You really are. So I think that's probably my favorite. All right. Well, do you have any advice for aspiring writers? Then I think we'll start wrapping this up.
Starting point is 00:57:31 Yeah, sure. I think just finish it. Just do it. Don't over-polish it. Just write it and get it out there. I think it's worth finding a real publisher if you can. I think self-publish works for some people, but publishers have good marketing departments.
Starting point is 00:57:52 They know how to push books. They know how to get them into the stores. So I would always try and go through a publisher first. And some publishers have nice editors who help us sound better than we do otherwise. Exactly. They do. Yeah. Well, they do in my case anyway they did in mine for sure christopher do you have any more questions one question um which book would you recommend
Starting point is 00:58:18 of yours from for an embedded software engineer who has a terrible background in electronics and learned most things osmotically and is baffled by anything beyond, say, a microcontroller with some stuff attached. Okay. Who believes capacitors are salt? Okay, I'm not that bad. I was the one who said that. I think probably Hacking Elect electronics would be my book too that that is the kind of audience that i was going for with that book going back to who do you write the
Starting point is 00:58:51 books for so it's um it's a nice book it's um it's um color and it's it's it keeps the theory well to one side there's a little bit of mass in there but you don't you don't have to look at it you can just kind of um but it's not a project book really there's a few mini projects in there but it's far more about stuff um there's little projects like taking apart a little cupboard light and making it light sensitive a few other things like that where you're repurposing little toys and things. But it doesn't assume that you know too much. It really is to get people into electronics and get them playing with electronics and get them doing a bit of soldering and learning a few skills
Starting point is 00:59:37 that will help them get into electronic making. Cool. Excellent. Well, Simon, do you have any last thoughts you'd like to leave us with um well only that um if there is a zombie apocalypse you need to bear in mind that there'll be no internet so you definitely need to get your get your zombie apocalypse books ordered now and any components you think you might need All right, then. That seems like wise advice. Yeah.
Starting point is 01:00:07 Can't be too careful. My guest has been Simon Monk, author of The Maker's Guide to the Zombie Apocalypse, Defend Your Base with Simple Circuits, Arduino, and Raspberry Pi. He's also the proprietor of MonkMakes.com, where you can find materials necessary to fund off the zombie horde or to learn a lot. Start stockpiling today. Also, you know you want to get this book for that person who has everything and an engineering bent. Oh no, not me. I have a copy. But thank you for thinking of me and thank you for listening. Thank you also to Christopher for producing and co-hosting. Hit the contact link on Embedded FM if you'd like to say hello or email us, show at embedded.fm.
Starting point is 01:00:51 So now, a final thought to leave you with for the next week. Hmm. I bet it's going to have to do something with zombies. Yes, yes. From Max Brooks, author of World War Z and oral history of the zombie war. I think most people would rather face the light of a real enemy than the darkness of their imagined fears. And I'd like to say Embedded FM is an independently produced radio show that focuses on the many aspects of engineering. It is a production of Logical Elegance, an embedded software consulting company in California. Thank you for listening.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.