Pybites Podcast

#040 - Ship your code!

Julian Sequeira & Bob Belderbos

In this episode we talk about shipping your code and why it is important to get code out there fast, because it's where part of the learning / feedback loop happens.

We hope the main takeaway from this episode will be that you shouldn't sit on code. Get it out there, and make it better in conjunction with the real world and people using your software.

This iterative process is also one of the things that is fascinating about the development process!

We take a recent feature we built and some of the issues we faced, a nice real world example.

Here is our mentioned PyBites Books app. You can try out the Goodreads import feature here.

And please help us grow our PyBites YouTube channel, check it out here - thanks!

Books mentioned:
Julian: Coraline
Bob: s/read/code/g :)
Shout-out to Roller and Mike for getting us on Effortless

Join our Slack Community here.
Book your free Python career assessment call here.
To work with us 1:1 joining our amazing PDM community, check out our coaching program.

Thanks for listening and we're back next week!

There's definitely a certain trial and an error that you have to go through to really get it right, and that's fine, because then you just fix it, and now it works. Hello, and welcome to the Pibytes podcast, where we talk about Python career and mindset. We're your hosts. I'm Julian Sequeira. And I am Bob Baldebos. If you're looking to improve your python, your career, and learn the mindset for success, this is the podcast for you. Let's get started. Welcome back to another Pie Bytes podcast episode. This is Julian, and I'm here with Bob. How are you, man? What's up, everybody going well, thanks. How are you, man? I'm good, I'm good. End of a week. It's been a long week, but a successful week as always. Very happy to be going into the weekend, so let's get this episode done. It was a long week, which explains the reason we only got the record on Friday. But, you know, we got to ship it. We just got to get it out. Nice. What we're going to talk about. Yeah, that's the topic of the episode, topic of the day. We wanted to discuss that concept of just shipping it. You're just getting your code out there. Just getting your stuff out there. And yeah, it does touch on perfectionism a little bit, but it is. We're going to link it a little bit more with code this time. So, Bob, you have some examples of shipping it. Well, before you jump in, actually, just what does it mean to you? To me, it means getting your code out there, at least the first iteration, fast, without it being perfect, because you acknowledge that you will have to iterate over it, that you're really going to understand and improve it when the code hits the real environment, the real world, and gets real users to use it. Yeah, totally agree. Is that a good definition? Yeah, that'll do. It's one of those things at work and in companies and places where they push code, they say, oh, ship it. That's when it's ready to ship. And there's this feeling that we all have that in order to ship the code, it has to be perfect. All bugs have to be out of the code. Every single feature imaginable needs to be implemented in every possible configuration. And the reality is that's never going to happen, not unless you have a team of 7000 developers or something. The reality is, for most of us, it's just perfectionism to think that way. It means we'll never actually ship a final product. It really is important to find that balance. You do have to ship quality stuff, of course, get some decent product out there and some code, obviously, but there's no need to wait for everything to be perfect. So Bob, when it comes to shipping it, you have an example from just this week, right? Okay, so yeah, we made an exciting new feature on the platform. No, not on the code channels platform, on the Pibytes books app, which is another application we run. And it was about importing a Goodreads CSV export. So you now can import your Goodreads books into our Py Bytes Books app. It will convert those books into our books. We used Google Books API. It was an interesting feature and definitely we had some issues as we were rolling it out into the test environment. And yeah, grateful we did. Yeah, it was one of those things where if we'd waited weeks for QA testing, if we'd waited, I mean this is, this is our project, right? This is something that isn't going to destroy the world if it falls over. What we wanted to do was just give people an option that they had asked for. And if we sat there and waited and really struggled with perfectionism, instead of just getting something out there, just pushing the code, it wouldn't be where it is today. So when we shipped it, Bob, what worked and what didn't? Yeah, so locally, interestingly, I had it almost working with concurrent futures, which I managed to very proudly convert 200 books in 2 seconds. But then of course the Google books API said, yeah, you're not going to make 200 calls in 5 seconds. So we hit the API rate limit. So we got that out first locally and moved to salary task queue and slipping a little bit between requests so that we didn't hit that API, Google books API limit, and that was still local. Once we shipped it to Heroku in the test environment, all of a sudden we got some race conditions with the database. So we had to turn on concurrency equals one in the salary worker command, which we still might want to fix because that shouldn't be, as somebody said on the code clinic this week, it shouldn't be a limitation. So we still going to try to make that more async. But yeah, it did happen. And we got some weird double. For example, when I imported a bunch of books, I saw them all duplicated, so there was some race condition going on. But yeah, typical stuff that didn't happen locally and only when we changed the environment. We went to Oroku where it ran in a real environment. So to say we hit. And another thing, we hit. Yeah, a friend of ours tested it and that's actually already out there in production. But as you said right. It's not the end of the world. It's a pretty small app. So she had like 400 books or so. And so yeah, the import worked or it got into the cache table, so to say, but hit a 400 and turns out there's this setting in Django about the maximum amount of form fields. I didn't have a clue. That was when we actually already had the problem googling around. Yeah. So all kinds of interesting things that happen and, and were just hard to catch locally. Yeah. I should say like the perfect software doesnt exist. Theres definitely a certain trial and an error that you have to go through to really get it right. And thats fine because then you just fix it and now it works. Yeah. The really great points that you bring up, you know, these things we wouldnt have discovered if we hadnt have just pushed it out there, if we hadnt made it live on the website, had people play with it and give us that feedback, you know, because you and I didn't have 400 plus books to import from goods Goodreads, so we wouldn't have hit that. We weren't exactly edge case and we weren't going to sit there and test every single quantity to see what happens. You know, it's just we did what worked for us. And the, the other thing that I remember came up was that the duplicate books, because the Google API had books multiple times, they don't just have one book. They might. If the IBN number, whatever it is on a book changes, it's considered a whole different id. It's a whole different book, even though it's the same book. So say Harry Potter and the Chamber of Secrets. Right? Is that the first book? Yeah, I think so. The very first book. There's probably ten different versions out there. There's the one with the crazy pictures, there's the teenager one, there's the original copy. Whatever, same story, but different books from an id perspective. And so if I had that on my existing Pyewites books platform and then imported from Goodreads, I might have duplicate books, I might have one version from Pywhites books and I might have a different version from that. The script picks up from the Goodreads when it does the search. So again, these are things that we wouldn't have caught locally until we really pushed to production, to real accounts, to things like that. And then now we know what to fix. But the reality is people still have this feature, people have still loved it, they've still used it and they're still having a blast with it. So you know, just goes to show that when you ship it, you just get out there and you just push the code. It's beneficial for you, it's beneficial for the user and it's just a great experience all around. Yeah. Cause your account is mostly kids book. So I definitely didn't anticipate that because of my import. I didn't hit that issue. And that seems like with a different kind of book stack you did hit that issue. So that was interesting. Settled down. They weren't all kids books. Disclaimer. I mean even that because Internet book, that's not a kid's book. It's one of the densest books I've had to read. Yeah, there were kids books on there because I read to the kids. It all counts. The other thing, I want to highlight a bit of a tangent, but the other cool thing that really happened with this feature, it was a semi complex one. So I really had to think about design using a cache table. How's this going to work? So I already mentioned the concurrent and multi threading and versus salary, but also like what's the user experience? Right. If they're going to import their books, we shouldn't assume that they just want to add all the books. So we made this preview page and used a caching table. So the conversion first stores the books in a cache table and then you saw the preview, right. You can first select the books that you're going to import. Not like this all or nothing thing. And yeah, that was a great exercise and it's kind of related to the ship in the sense that you really get a good practice in design thinking by building those bigger features. Right? Yeah, no, brilliant. And that wound up being a really great feature as well from a user perspective, being able to select the books because I just did a blanket dump to see if it overwrote the books that I had. But in reality I'd probably go well I know this book's already in my Pie Bytes platform, a Piwhites books account, so im not going to bother trying to import it. That would prevent the duplication from happening in the first place in my perspective. From my perspective. But yeah, again, thats just a feature that you came up with after you started building, after you started trying to really plan this out and it wound up something that I really liked and I think a lot of people enjoy as well. Cool. You don't get all the answers when you start building it, right, things come clear as you go and progress through the feature and get feedback from the people actually using it. Exactly. So that's. Yeah, that's the last and one of the biggest pieces. Right. If you don't ship it, you don't. Don't even know if you're on the right track. That's, you know, when you're building. If you just build from start to finish without getting anyone to test it, play with it, push it out there as. Even if it's just beta, but it's out there for people to use. You know, if you don't do that, you don't. How do you. How do you know you're even on the right track? So, yeah. All the benefits of shipping it. I love it. Yep. I think that's a wrap. Yeah, that is a wrap. But on the reading. Yeah, but. And on the coding side, but I will mention this because we've brought it up a couple of times this week. Our, um, our YouTube channel, which we're very excited about. Exciting. Yeah. What about it? Well, we decided, for everyone listening, we decided that we need to do more video content. We've had a lot of people appreciate the screen, shares of code, of writing code. The mindset talks that we do all sorts of things, and people just want to see us and do more. And we're humbled by that. We appreciate it. Thank you. But it means we have to jump out of our comfort zones, as we've talked many times on this podcast about. So we're eating our own dog food here. We're pushing ourselves out of the comfort zone. We're making the channel better. We've already had designers create new images and all that stuff, so it actually looks kind of slick. We're very proud of it, and we've set ourselves a lofty goal. What is it, Bob? Tell me. So, we were at four or 500 subscribers. I think it's about 500. Yeah. Yeah. Two weeks ago. One week ago. And now we want to bump that up to 1000 by the end of September, I think. Yeah. Yeah. So that. That, to us, was completely arbitrary, but it was a stretch goal, you know, I mean, to get to the 500 subscribers that we have on that we had on YouTube at the start of the week, we. I don't know. That was just random. It just happened organically. Right. But now we're making this concerted push. We thought, well, let's, you know, shoot for the stars. So we said, let's double it in a month. So that's what we're doing. So if you haven't checked it out, look at the, you know, the notes below this podcast and, yeah, check out the channel and subscribe. And we'd really appreciate it because then we know that people want to see more of our content and we'll even get some of these podcasts on there as well, I think, which would be nice. We might have to actually put clothes on and brush our hair, Bob. No, it's. Yeah, the YouTube channel. I think the video content will be. Will be massive. And it's a great medium to provide value and help people. So we're all up for that. Yeah, yeah. And to link it back to the whole ship it category here. Exactly. And is that such a goal? Things start to happen and you have to. Yeah, you have to ship, obviously. Yeah. We're just pushing stuff out. I'm not saying we're doing things, you know, half baked. It's just that we are making it a priority now and we are just pushing it. So just before recording this, we pushed out a YouTube video, you know, Bob, you recorded that today. And we just edit it together. We reviewed it together, did all the stuff that you have to do to get a video on YouTube and pushed it out, you know, no delays, no nothing. We have it on schedule, made a priority during. During the week. And. Yeah. So there is that essence of just shipping it in other things as well. It's not just code and being over perfectionating in a little bit at the start. Right. What with tags, because they're. Show me. It's like an airplane cockpit of options in YouTube. Right. It is very professional. Yeah. But I think we do conclude we just have to do what we can right now with the knowledge of the platform we have right now. And over time, we will. We will grow and we will better understand it. But we just have to ship. Yeah. We just skip half the settings there. We don't know what they do. Yeah. And that's fine. Right. Because we'll get there. Exactly. Yeah. Yeah. So that's a great example of the shepherd thing. Yeah, yeah. Outside of our comfort zone, outside of coding. Well, it involves coding a bit, I guess, but anyway. All right, lastly, any books? Oh, any books? Oh, geez. No, I haven't picked up a new book in a little while. I've just been reading what I already have. I've picked up a couple of random little fiction books off the shelf that I've wanted to read over the years. One of the classics that I picked up the other day, it was almost two weeks ago was. I don't know if I'm pronouncing this correctly. Coraline. Coral. Coraline by Neil. Neil Gaiman. Anyway, so it's a. It's one that. It's. There's a movie about it and stuff, but I'd never read the graphic novel before, and I thought, I just want something different. So I picked it up and. Yeah, it was really good. Yeah, you told me about reading fiction. How relaxing it is. Right. Yeah, I quite enjoy it. That's my weekend thing. I really, really enjoy it. What about you? No, I have a big reading. He authors right now. I'm coding. I'm coding and I'm just happy about it. The three salary apps, apart from the Goodread thing, two more, and slack bot. And graph. Yeah. Plotting. So I'm just happy. No books. I love it. Actually, you know, the other thing I'll mention is I've queued up a couple of things to listen to as well. So there's that effortless book. Oh, yeah. I need to get on that as well. Yeah. Any good things in PDM about that? Exactly. Yeah. Roller and Mike Abramson were talking about it, so. Thanks, Mike, for that recommendation. Shout out to Mike. I've queued that in audible, and after last night's mindset call, I've moved to the top of the queue. So, yeah, I only did it by because it wasn't on the browser, but it was a good Amazon. That's one book I want to buy and read Asap. Yeah. Just seems really. Just sounds great. Yeah. So, productivity, right? Yeah, exactly. Okay, cool. Well, that's it. That's a wrap. Thanks, everyone, for listening, as always. Just, you know, the call to action here. Remember, just ship it. If you're working on anything, ship it. Get a code review in, get people to look at it, play with it, whatever it is. And, yeah, get it off your local host and get playing in the real world. So I think that's exactly. Ship it. And, yeah, if you still find that difficult and you need some help. Hope it's clear by now we're very open and we love the discussions with the community with you. So hit us up on Slack or book a call with us. We're happy to give some more assistance and dive in. And last but not least, subscribe to the YouTube channel, please. Yeah, check out YouTube. It will be awesome. If we don't hit the goal, we quit pie bites. No, I'm kidding. I don't think that ever will happen. That's not going to happen. All right, everyone. Thanks for listening. We'll speak to you next week. All right, see you next week. Cheers, man. Bye bye. We hope you enjoyed this episode. To hear more from us, go to Pibyte Friends, that is Pybit es friends, and receive a free gift just for being a friend of the show and to join our thriving slack community of Python programmers, go to Pybytes community, that's Pibit es community. We hope to see you there and catch you in the next episode.