Cup o' Go

Thanks to Jamie Tanna for joining as Co-host!
Our gracious patrons support this show. Consider joining as a member, too!

Creators & Guests

Host
Jamie Tanna
Senior Software Engineer at Elastic (he/him/his)
Host
Shay Nehmad
Engineering Enablement Architect @ Orca
Editor
Filippo Valvassori Bolgè
Sound Designer / Audio Editor based in Milan

What is Cup o' Go?

Stay up to date with the Go community in about 15 minutes per week

Jamie Tanna:

This show is supported by you. This is Cup of Go for August 30, 2024. Keep up to date with the important happenings in the Go community in about 15 minutes a week. I'm Jamie Tanna.

Shay Nehmad:

And I'm Shayne Ahmad. Hello, Jamie. Filling in for, John in our sort of summer vacation. How are you doing?

Jamie Tanna:

I'm doing well. Thanks. It's actually a little bit sunny here, which is quite nice after the last couple of weeks of awful weather in the UK.

Shay Nehmad:

Like, it's 40 x degrees outside here in Israel. So not feeling, not feeling you, but but, you know, I'm feeling you. Thanks a lot for filling in for, John. And I've sort of missed the show, but this is not really the show. But it's a good chance anyways to say, thanks to, Mariah for, filling in for me last week.

Shay Nehmad:

We have a lot of things to discuss, but we're gonna start off, you know, everybody's sort of finishing their summer vacations right now, which is exactly a great time to talk about maybe traveling to some conferences all over the world. So I'm gonna do some rapid fire talking about conferences, just trying to give the date, location, and sort of the general vibe. Are you ready? Next week on September 9th, there's Gofer Con Israel. It's a live conference in Tel Aviv.

Shay Nehmad:

I'm definitely planning to go even though I haven't bought my tickets yet. After that, we're talking about Golab in November 11th in Florence. Their site, just beautiful colors and the most, like, cutest gopher I've ever seen, like big round glasses, Harry Potter kind of looking fellow. Obviously, we talked about it but there's FineConference dedicated to find the, GUI framework, development framework thing in Go by Andy Williams. So it's, 20th September, in Central Berlin.

Shay Nehmad:

There's Go func 2024 autumn, which as far as I can read is an online Russian conference about Go. I've really tried to read it. Jamie was here. He heard me breaking my teeth trying to read this Russian. But I think, if I if I understand the website correctly, it's online on the 3rd October.

Shay Nehmad:

GopherCon Africa, which we have mentioned, is the first GopherCon in Africa. It's gonna be in Nairobi on October 18th 19th. That's all farther away. We'll probably mention it, at least once, in the upcoming weeks. And also, GopherCon Singapore still doesn't have a finalized finalized date, but it's gonna be end of October.

Shay Nehmad:

So we're GopherCon up all over the globe. You know, people I think coming back from vacation really wanna talk about work. Are you planning to visit any of these conferences or, like, any meetups anytime soon?

Jamie Tanna:

I wish. Here's the short answer. Couple of weeks ago, I went to Gofer Con UK. Unfortunately, I think that's the only conference I'm gonna be going to this year. Hopefully, next year, I'll be on the conference circuit again.

Shay Nehmad:

Well, at least, from what I saw online, I saw the talks. Well, not all of them, but some of them. That conference looked just great, like, great, great, great talks. Yeah. How was the how was the vibe?

Shay Nehmad:

Like, not just the the content.

Jamie Tanna:

It was really good. So, one of the things I loved about it was they had a pick and mix area where you could just go and get sweets throughout the conference. So I I went and got a few bags of sweets during the days.

Shay Nehmad:

That's good. You keep your blood sugar up, keep you focused.

Jamie Tanna:

Yeah. It worked until it was just about time for the next break, and then I could go and replenish. Yeah. It was a good one. I got a chance to meet Andy, Williams.

Jamie Tanna:

Got a chance to meet some other folks in the community. There were some very good talks. So, apparently, the workshops were very good as well.

Shay Nehmad:

Well, maybe if you'll find yourself in Nairobi in the in October, you could if you're if you're just stopping, you know, in Kenya on the way to get milk, you can jump by the conference. So that's a lot of future things, that are supposed to happen. I'm just waiting for well, Gulf of Condie is all I'm gonna go, but I'm just waiting to see all these talks and and, like, put them on on YouTube while I'm working on other stuff. It's really cool. Let's talk about some proposals.

Shay Nehmad:

What what do you have, lined up for us?

Jamie Tanna:

So speaking of things in the future that are coming, there's one by Ross Cox around bisecting. So for those that aren't aware of bisecting, the idea is, for instance, there's the git bisect tool where you can if you're trying to, like, debug and find where is the root cause of this bug or this failing test, like, when did it actually come in, you can start off at a known good commit and a known bad commit. And you will then do a binary search, try and go into the middle commit. And if the test is passing, then you know you're in a good place. So then go towards the bad, and then keep splitting it, in half each time to then end up at the the actual commit that caused the problem.

Shay Nehmad:

And find it in log n time instead of n time.

Jamie Tanna:

Yeah. So it is a pretty efficient way of doing that. It is also something that I've used infrequently enough, but it is very useful. Roskox isn't trying to, like, teach everyone the benefits of git bisect. It's trying to do one thing better than that, which is adding tooling to go, which will allow you to not only find, like, in what git commit did some behavior change, but where in the code base did it actually happen.

Jamie Tanna:

So as I understand it, we're looking at adding a new package called, debug bisect, which uses a tool that's, been in one of the internal tools in XTools for a while now. And but the Go team have been gotten a lot of use out of it. And so there's a proposal and a link to blog post on Ross' site, which goes into some of the details around that.

Shay Nehmad:

Yeah. The blog post, I have to admit, is is a bit intimidating. It's it's a long read. There are some charts. There are some there's some code, but it is very detailed, so it's not, like, vague.

Shay Nehmad:

It's just kind of hard. But you can try the tool, which is pretty amazing. You can just go install the tool and try to debug a timer problem. So you can bisect and turn on async timer channel 1, go test. And then it's gonna just find the problem, in your code by in, like, find the location of the problem in your code which is as a concept it sounds like when you first say it sounds, oh, of course.

Shay Nehmad:

I can search, you know, binary search over time. Of course I can binary search over space, that's just a different dimension. But then you think about it for, like, one more second, and I'm like, what? How does that even work? There's so many, it's very, very easy and then hard to wrap your head around.

Shay Nehmad:

Then you read the blog post, then it's easy again, then you try to run it, then it's hard again. I don't know.

Jamie Tanna:

And I was gonna say, I haven't dealt too much with, like, the AST package and trying to actually pass Go code and look at how the stack and everything works. But I'm glad that someone much more intelligent than me is looking into it because it looks

Shay Nehmad:

like For sure.

Jamie Tanna:

Yeah. It looks like a really good solution, that I now just can ignore the details of, just use.

Shay Nehmad:

So that's the the tool. What's the proposal? It sounds like it works and it's fine.

Jamie Tanna:

Yeah. So the proposal is to move it from an internal package to actually making it part of the standard library. And actually so so the proposal itself is to take it from the X tools package, which is generally, like, separate to the standard library and standard ish, but still experimental and not to be dependent upon. It's also in an internal package, so shouldn't really be used even though it can be. And this will actually be going straight into standard library in a new package under debug called bisect, which will have a slim little, API that people will be able to use to start actually working out, programmatically where have we got issues.

Shay Nehmad:

So I think it will the call to action here is if this sounds some like something you'd like to use, either the tool or the package itself, or you have been playing around with, you know, the internal bisect package, You should go to this proposal and tell Russ what you think. It's like it's kind of he's like, we've, we've been working on it for a while. It's his blog post that he wrote and, like, his proposal, his API. He's moving the ticket from side to side. It sort of looks like Russ improving the language on his own.

Shay Nehmad:

And then someone's just posted a comment that I feel so, like, close to his I'm having a hard time understanding what this does. That's like the the the sentiment. Looking for ways to use this at work. And this is, I think, at least my take from this. It it sounds super clever, but I can't think about a case where I I would use it at work.

Shay Nehmad:

Like, I've never run into a case where I have a bug, but I don't know where it's hiding. Like, I need to I need to really find a use case and actually use it for myself before I give some ideas other than the fact that, sure, sounds good. You know what I mean? Like, I will upvote it based on this precursor, analysis. The main thing is if you if you do use it, use it and and give Russ some feedback on this, on this common thread.

Shay Nehmad:

Right? People are giving some bike shedding about the API, like how it looks and the names and whatever, but nothing, serious. And I just think we need a participant here who actually used it before it goes in the standard library because just putting things in the standard library based on the internal Go team usage doesn't sound like a high enough bar to clear. You know what I mean? Cool.

Shay Nehmad:

So we have this proposal. Right now, it's active. We don't know if it's, going in or not. We need to see. There is one proposal that's a likely decline.

Shay Nehmad:

I thought it was an interesting, like, case study of the proposal process, and also a feature that I almost never use, which is interesting. It's in the final comment period, but I have a feeling it's gonna get declined because right now it's in the likely decline, like, column. Right? But if you wanna save it, now is your chance. The proposal is like this.

Shay Nehmad:

Do you know how you can wrap errors? So how does that work? Give out, like, a a super basic explanation in case, you know, listeners haven't wrapped errors before which might have happened. Right? It's not a super critical feature.

Jamie Tanna:

So I can't remember how it works under the hood, but the idea is when you receive an error, you can, as you say, wrap it, so you can wrap, use a format dot error ref by using the percent w. Is it called a placeholder?

Shay Nehmad:

It's a format placeholder, percent thingy. I think that's the official name.

Jamie Tanna:

Yeah. So when you, have an error and you want to provide some additional context around it that can then be bubbled up to the, caller, you would wrap it in format dot errorf with the SMW format placeholder. That then will return you a new error with the original error in the inside of that that you can then

Shay Nehmad:

And you can unwrap it. Right? Yep. So the thing is you can when you think about it, like, there are a few reasons to do it. The main reason I do it honestly, is when the linter there's a format errors from external packages linter that tells me, hey.

Shay Nehmad:

There's an external like, this is actually an interface you're exposing, and you should wrap it in your own. Like, yeah. Yeah. Yeah. Whatever.

Shay Nehmad:

I'm wrapping it, and I'm moving on. Because it's right, but whatever. I might turn it off at some point. I'm I'm not writing a good enough code yet to worry about these sorts of, things. But theoretically, if you think about it, imagine I have 4 errors of 4 types in my code and then they all got wrapped in different, like, into a tree.

Shay Nehmad:

That can happen. Right? It doesn't have to be a chain. It can be a tree theoretically. And there is, like, a case of multiple error wrapping and how do you iterate through them.

Shay Nehmad:

With go 1, 23, 23, and the new iterator's functionality, there's a proposal, by Roger Pepe from the UK to give, an interface called all and or all as iterators where you can iterate over the entire tree of error, like detailed errors and try to find the specific one. Or maybe for error in range, iter as blah blah blah, go over, each error and switch over it. And specifically, if some errors are are of some interface, you can imagine maybe a tree, some parts of of the tree are red, like some nodes are red, some are green. You wanna just select the green errors because they have, let's say, a code field and then switch over the code field and do some behavior for each one. And there's even a straw man implementation.

Shay Nehmad:

Like, there's a implementation for this. So, obviously, the hard part here is not implementing this, but it's just for the purposes of the proposal. It's not for review. It's not like the change logs going in right now. When you hear about this sort of, functionality, not not analyzing the the implementation or the interface, just you as a user, how do you feel about it?

Shay Nehmad:

Do you think is it good? Would you be happy to use it? Is it bad?

Jamie Tanna:

So I think I've got to the point where I will use errors dot is for is this a specific type of error. And I probably won't think about it too hard after that. So in this case, where you've got, like, lots of different errors being wrapped and you've got not just chains but trees of errors, I don't think I've ever been in that situation where I've either had it or that I've cared that I've had it. And maybe this is just I haven't been on large code bases with those sorts of things.

Shay Nehmad:

So so no. The the the main, the reason this, is in likely decline is the no one has been able to come up with here's a real life use case of doing this and the, you know, people are saying like, if you got to the point where you have really complicated error trees in a very specific implementation, for example, the use case that is brought up is we have a GraphQL API and we wanna suppress most errors but, allow user visible errors and there are multiple errors per request per field so I need to extract all the errors that are user visible type. While that is a valid use case, it seems like putting it in the standard library instead of just providing a function in the GraphQL library just for that seems like, you know, x in s e d. Like, it could be in the s e d lib, but it sounds very use case specific and there is no white space utility or use. And when I hear about, oh, I need to iterate through very specific types of errors for my normal behavior of the software, that sounds rough.

Shay Nehmad:

Like if I I have a lot of errors and nested errors and I probably wanna model it not not as an error. Right? Error just is just at the end of the day something that has a string. So if I have a super specific error type, maybe I just need, operation type or something like that to to model that in my application or in my library instead of like shoehorning it into a mechanism that's sort of simple and sort of works, and we don't wanna complicate it too much.

Jamie Tanna:

Yeah. That's a good idea. Maybe it is more of a smell in the code base that maybe we're doing something a little bit too difficult.

Shay Nehmad:

I wouldn't wanna write the, like, using error as all because it means somewhere in the code, I'm I'm generating trees of errors of different types and I just wanna handle some of them. I think it just means something is too a bit too complicated. So the reason we're mentioning this other than the fact it's interesting, like, the the proposal process is really geared not towards just finding the best, proposals. It's also really geared towards filtering out good proposals that aren't good enough. This is clearly a good and valuable proposal.

Shay Nehmad:

It's just not good enough for the Send Library, which I super appreciate about Go because it keeps things very small and it doesn't fall into the trap that, oh, now we have iterators, so let's allow for iterating over, like, complicated stuff that doesn't really belong in that language, in my opinion. However, if you always iterate over, trees of nested error types and you really would like, iter as or as all or something like that or even the generic as all t, which is the real proposal here, go ahead and comment right now because it's in the final comment period and I think you have like a week or something like that before you can rescue it from likely decline. It is interesting though at the very least. I really hope I don't have to actually use it at any point. Alright.

Shay Nehmad:

So that's enough about proposals. There's an interesting release by a former, person who was on the show which is starting to cover every single person who has written go at this point. What's going on? What's the new release?

Jamie Tanna:

You recently had Paul Jolley talking about the awesome q library and tooling.

Shay Nehmad:

Let's go for Thursday, April 18, 2024. Hi, Jonathan. Are you ready to start the interview? Paul, you're good. I'm totally ready.

Shay Nehmad:

Alright, Paul. Can you give us the queue? Hi. My name is Paul.

Jamie Tanna:

I actually started working with Go back in around 2014. And over all the years since then, I've contributed to the Go open source project in various ways. The latest release, q010, introduces the experimental support for what they're calling embedding, which allows you to embed non q files within a q package. And something that, is quite nice that they've linked out to from their release notes is how to actually get started with this. The opportunity here is that you can actually start, for instance, putting JSON files into your Q packages, which allow you to iterate over them and do other processing on top of just writing Q.

Jamie Tanna:

And I believe this is similar to how, like, Go embed works where you can embed them all, into the release.

Shay Nehmad:

One of the really surprising things about Go, for many new, Go developers, I've been introducing Go to a lot of Python, recoverrs at work recently. I've we've even managed to, like, shift one of the new projects from Python just to start with Go, straight up. And then you have a a bunch of new developers. They're super experienced guys, really smart, just haven't used Go before. And suddenly, you know, they I'm I'm jumping to their office every now and then to to help out.

Shay Nehmad:

And I've shown one of the guys go embed. And he was like, wow. Oh my god. Such a immediately practical and useful feature. Right?

Shay Nehmad:

I don't have to worry about where are my files and wait in the Docker. Where are they where I'm putting them in Kubernetes and which path blah blah blah. Doing this for configuration files, like embedding other files within configuration files, like during quote unquote build time, I think this is it's sort of one of these hidden features that not it's not really a game changer news headline breaking whatever. But it's one of the things that's gonna elevate you over in this competition landscape of configuration, languages. Yeah.

Shay Nehmad:

Definitely. It's such a practical feature. I can just imagine the use cases. Now we have a bunch of JSON files that you need to upload to a different service. They're not queue.

Shay Nehmad:

They're just JSON because that's how they work. You can just embed them in your in your config now. The embed directive even supports glob patterns. So you could be like, all the JSON files in this folder. And how practical can you get?

Shay Nehmad:

It's obviously a Go, ish project. You know? Yeah.

Jamie Tanna:

This is something I can definitely see. Like, at work, we've got a command line tool for spending up development environments. And in there, we go embed some default config. And then that is overwritten by, user config that could be distributed. Yeah.

Jamie Tanna:

Like, this would make that whole thing a lot easier because then we'd also be able to take advantage of q instead of trying to do a load of, stuff with Go. So this looks really interesting.

Shay Nehmad:

So it's a new release. Right? It's out. It's not like it's experimental, but not really because everything in the Q is experimental, isn't it? Because it's still, version 0.

Shay Nehmad:

It is. Wait. But but what does version 0 mean? Well, I guess we'll heard about her we'll hear about that a little bit later. But I do invite you to check out q.

Shay Nehmad:

I think q is one of these projects where I really wanna start working with it and I've I've played around with it and I installed the q tool a few times. But I need to find a place to to push it into work, like where I work and not just in hobby, projects because this is sort of thing that, has a lot of value when you're starting to work, a few developers on the same, projects, same configuration, and not just, like one guy noodling. But if you need data constraint languages now support with embedding, just a super fresh release 2 weeks ago, he's got you covered, I think. Cool. Alright.

Shay Nehmad:

Let's go to a few quick things in the lightning round. Lightning round.

Jamie Tanna:

Lightning round.

Shay Nehmad:

Yeah. Yeah.

Jamie Tanna:

So speaking of version 0, one of my blog posts, I didn't plan to talk about that on the show today, but it's drummed up a lot of excitement across the inter interwebs about what breaking changes mean, semantic versioning, and version 0 versus version 1. And why you probably shouldn't release like ever

Shay Nehmad:

or as the first one?

Jamie Tanna:

Like, stability is really painful. So you either take on stability as the maintainer by releasing the version 1 at some point, or you push it on to users, and every change could be breaking.

Shay Nehmad:

So the there was interesting discussion about semantic versioning in the channel as well, but I just wanna stop here for a second. I know it's a lighting round and shout out the amazing trove of knowledge that is your blog with over a 1000 posts at this point. Amazing. Lit it's actually inspiring. Not not even kidding.

Shay Nehmad:

And yeah. Don't release a v one ever and then you can just chill. No promises to everyone. I love it. There's another new release.

Shay Nehmad:

It's also point 0.0. It's all good. 0.021. For a library I never heard about before, but it's really cool. It's called FIT.

Shay Nehmad:

It's an FIT, flexible and interoperable data transfer protocol. But it's clearly a case where the name came out first and the acronym was, like, put on on top because this is the Garmin watch data protocol for, like, sports watches.

Jamie Tanna:

And I was gonna say, do you know what that's called?

Shay Nehmad:

A background. A acronym. That's great. What's an acronym? I I only know about RATS what's it called?

Shay Nehmad:

Yeah. RAS syndrome, where you have the redundant acronym syndrome syndrome. So this is the backwards acronym syndrome syndrome. What what watch are you sporting right now? I'm I'm like, Garmin?

Jamie Tanna:

Google Watch. No Google Watch.

Shay Nehmad:

Actually, I like my Garmin. Not sponsored and get a better battery life if you want me to sponsor you because, Jesus. But yeah, apparently there's a protocol. It makes sense. It makes sense that there would be a protocol for communicating with the watch and like the activities, right?

Shay Nehmad:

The health activities, cycling computers, blah blah blah. There's a Go package for it, and it just released a new release like 4 hours ago with a lot of changes. Adding test cases, fixing typos, there's micro optimization on the message definition, like a ton of ton of changes. This looks like super active. And I'm just wondering what's the what's the use case?

Shay Nehmad:

I would really love to develop something, for this. It's by Mukti. If you need to talk to your watch, now you can do it and go, I guess. Although if you're talking to your watch, maybe you need to talk to someone else as well.

Jamie Tanna:

And I know this is lightning round. Is that a real time data thing? Or is it meant for, like, using the data afterwards?

Shay Nehmad:

I'm not sure. I haven't this is a lighting around, so I haven't actually downloaded the package and played around with it. But it looks like there are protobuf definitions for the messages and values and and everything. So it looks like it's the recorded activities file format. So there's a dot fit format binary protocol for, like, embedded, devices and the funny thing is that Garmin this is not a Garmin official library.

Shay Nehmad:

This is just someone doing it because Garmin has not released an official SDK for for Go. This is just this person. Nice work, this person.

Jamie Tanna:

And a tweet, zeet, by Brenda Leech. The other day noted that one of the most exciting things about the release of Go 123 is the fact that Go 121 is now deprecated, which means that now, officially, math ran v 2 is available in all supported versions of Go, which is also very cool because, a, we now have, like, officially a v 2 in the standard library that everyone can be using, as well as the fact that now you don't have to worry about random not being random.

Shay Nehmad:

It also means that it takes at least a year to get a number into circulation. So even if you go to v like, we'll never get to v maxint, at least not in our lifetimes. But you know how they could have solved it? Never releasing math dot rand as v 1. Nah?

Shay Nehmad:

Last for the lighting round, a small useful tool that to be honest, Jaime told me in just, the cards checked out that I'm telling you about it. But there's an open source database, like graph editor, which I love. It's it really helps to chart your d b's. No installations. No database passwords required.

Shay Nehmad:

It just has like export, even AI assisted export, and you can import the schema and do some like interactive editing. Supports the databases you're probably using. Postgres, MySQL, SQL Server, MariahDB, and SQLite. Yes. I say SQL, not SQL, and I'm right, and you're wrong.

Shay Nehmad:

And there are a few examples, like, I wanted to start playing around with it, but, oh, I don't wanna copy this huge script into my DB without reading it first. If you just wanna play around with it to see if it could be useful for you, you could just click examples and start playing around with it, which is very useful for a web, based tool, I think. This sort of, playground approach. And that does it for the lighting ground. That makes the show.

Shay Nehmad:

Stick around for the ad break for some random conversation. Like Jamie mentioned, this show is supported by you. We just get your direct support to do this, fun but rather expensive hobby through Patreon. You can kick $8 a month our direction. We'll keep this, go feed of news and random ramblings going to your ears.

Shay Nehmad:

Jaime, you know, John is not here, but usually I'm like, we do this show for us to learn and whatever. Did you know about the bisect thing before we recorded this, this show?

Jamie Tanna:

I did not. It was very interesting.

Shay Nehmad:

Educational. Right? Yeah. So yeah.

Jamie Tanna:

I would recommend other people get involved.

Shay Nehmad:

Yeah. So if you wanna get involved, you can, pay us. It's basically paying for tuition, really. Helping education. What's more important than our future for our future than the kids?

Shay Nehmad:

Right? Now this is an audio medium, so the joke doesn't carry. But when Jamie and I met last time, I had this, like, huge beard. Now I'm clean shaven, looking, 18 again. Right?

Shay Nehmad:

Right? Yeah. Right? Please.

Jamie Tanna:

When you first came on the call, I was like, is that shiny?

Shay Nehmad:

Yeah. Yeah. It's a pretty major lifestyle, change. So if you wanna keep me from aging, okay, every time the n d goes bigger, kick in $8 a month. We wanna say thank you to all our beautiful patrons and the new member, Mateus Kowalka.

Shay Nehmad:

I hope I'm saying that right. I'm probably not. We have a pretty big audience on, Patreon at this point, and we're planning to close it when we'll have enough and, like, we'll let you know. But that's great. Thank you for supporting.

Shay Nehmad:

If you wanna talk to us and and reach us, cupogo.dev is where you can find everything you need. There's a simple little site with a few links, the episodes, the transcripts, our swag store where you can buy cups or the shirt that I'm wearing right now. And suddenly I realize again this is an audio medium and that doesn't carry. But it's like a v neck simple white t shirt, great for everyday use. And if you wanna, ramble with us on on various topics, maybe about versioning, maybe not, you can go to the Slack channel, which is already, like, almost 500 people, which is becoming sort of intimidating and I guess we'll need moderation at some point, but not yet.

Shay Nehmad:

Not yet. It's still a nice chill place to to go to. It's like a big conference room at this point. It's on the go for Slack, hashtag cupago, kebabcase with hyphens. If all this newfangled communication methods aren't for you, email us at news at kabagodot dev.

Shay Nehmad:

That is news at kabagodot dev. Another way to support us other than directly financially is to get the show to more people, which is always nice. Jaime, you're on the show for the 2nd time, I think. Right? So you probably already sent the links to, like, people and were like, oh, I was on a podcast.

Shay Nehmad:

How cool is that? But maybe you'll send it to a few more. Maybe people work or people you know. If you imagine that someone would listen to this and be like, damn, this bisect thing is really cool. Instead of going to the show notes and copying the blog post and sending them, look what I found, Send them the episode and let them know what Shay found.

Shay Nehmad:

This also, gets more listeners, gets more community, maybe more like, it's great. We like the show is for us, but we like to see the numbers go up. And our actually our stats have been doing really well, recently. Maybe we'll nerd out about them next, next episode just to, like, summer, summer summary of of our show analytics. Next week, we should be, back to our normal scheduled programming with, you know, Jonathan back on the show and everything should be back to normal.

Shay Nehmad:

So if you don't like change, next week everything's gonna get back to normal. And I think that's it. Let's get to some, interview question mark casual conversation with Jamie and see what's up with his little go micro verse. And again, thank you for all your support. So, Jamie, what Go have you been doing recently?

Jamie Tanna:

Few things. The most interesting or probably most impactful thing I've done is on OAPI Cogenerator.

Shay Nehmad:

I'm gonna interrupt really quick and say that we've been using OAPI cogener at work at Orca Mhmm. For, like, 2 production projects since we introduced it to the company, which I brought in because we you were on the show and I learned about it. Like we would have used some code generator but we would have probably used like the Java SDK one. Yeah, exactly. And your feature of client plus Go, server just with standard, library h t p.

Shay Nehmad:

Exactly what I need. Just exactly what I need out of taking a schema and turning it into into code and all this generation process. Super seamless. Just work single binary. You don't have to worry about jars and installing Java in the SDK and blah.

Shay Nehmad:

Great work, man. It just works.

Jamie Tanna:

Appreciate that. Well, that's good to hear. So one of the issues that people have with that is, hey. I've downloaded the spec from somewhere else. And, a lot of the time, the specs aren't built for a Go client.

Jamie Tanna:

A lot of the time, like, they don't even know who's using it. They're just building a spec that, defines the contract. And there are some things that you as a user will want to change. So, some of our users will do things like, oh, no. Actually, that field is nullable or, actually, I want to rename the description of this field so it shows up as proper Go doc.

Jamie Tanna:

The only option people have is to vendor that spec in their repo. So download it, commit it to the source code.

Shay Nehmad:

And then edit it and then generate from it.

Jamie Tanna:

Yes, exactly. So it involves a few places where you're gonna have pain because just keeping that in sync is, like, a part time job. Even though there are tools that you can use, it's still not as good as, it just being always up to date. As well, like, having to hand edit it and then deal with conflicts every time or a lot of the times is really painful. And also, like, you don't want to have to manually edit the spec.

Jamie Tanna:

You want to just demonstrate stuff. So because a lot of our users are having issues with that, and it's like a known problem in the open API ecosystem, there's a company called Speakeasy who, for clarity, I'm sponsored by them, but this work was not directly sponsored by them. There's an OpenAPI standard called overlay, which allows you to take OpenAPI spec and apply some operations to modify it without actually modifying the source spec. This is a spec that's still, like, it's now v one. So it's stable.

Jamie Tanna:

It's expected to be usable, but it is something that will allow our users to be able to take the vendor built spec, whether that's, like, external vendor or it's another team, and they'll be able to then use this overlay functionality to modify certain things to, for instance, say, oh, no. Actually, this endpoint, I don't care about at all. So instead of trying to use, like, tags to exclude it, let me just say, you know what? Go away. As well as adding, like, our API cogent specific things, like, where you want to add extensions for oh, actually, we use this generated type in both Yammer and JSON, so generate the tags for both.

Jamie Tanna:

That's a bad example because I think it can work out of the box. Yes. That was something that was quite cool. I actually got nerd sniped while I was at GovCon UK. I was chatting with one of the companies like Paddle who were also users.

Jamie Tanna:

I'm never saying about some of the pain they have with things like that. That reminded me that Speakeasy use it in their SDK generators. And so I was like, well, there must be a library for it because the Speakeasy stuff is all in Go. And it turns out they've written a great library. It was really easy to integrate, and I'm looking forward to the next release and hopefully solving a load of people's problems with OOPI codegen.

Shay Nehmad:

The thing about cogeneration I don't know how you how you manage to manage this project because there's an infinite amount of, like, product possibilities. Right? You could generate alright. So I generated the client and the server. Well, actually looking at, a rest API, I could generate Terraform, provider for your code based on the spec.

Shay Nehmad:

I could try to generate protobuff messages and gRPC specs based on the open API. I've used the other way around by the way. I've started with, protobuf and gRPC and used auto generation to create the rest of my web guys. How do you know, like, you say things that our users want but at this point this is not like a hobby project where you talk to 2, 3 people and you, like, you know what they need.

Jamie Tanna:

How do you prioritize this roadmap? The short answer is very poorly. So as, like, I mentioned, last time you had me on, like, we are looking for sponsorship to help with the time. Like, in the last week, I think we've had, like, another 10 issues, a few more PRs, and, like, the numbers keep rising. There's a number of things that are out of scope.

Jamie Tanna:

So Martin, my co maintainer, has been quite good with clearly defining, like, what we intend the scope of the project to be. So it will only ever be for generating go. So that simplifies some of the things.

Shay Nehmad:

Well, that's good. You don't really need any other language. Let's be on.

Jamie Tanna:

And there

Shay Nehmad:

are a

Jamie Tanna:

few things that were quite clear. Like, we are only supporting these things. One of the issues is people come with some very complex specifications in OpenAPI. And, we can't support things we don't know about. So a lot of the time, people will be like, hey.

Jamie Tanna:

There's a bug with OAPI cogener. It's like, I've literally never seen this thing before. Like, how how did you even come up with it? Let alone, why is it new? So

Shay Nehmad:

Yeah. Specs can get extremely gnarly when you when you get into, like, super big company, and I can just imagine overlapping tags and references between 2 different skew like, a lot of problems. The project relies on libopenapi, though. Right? So do you find bugs there, or do you have your own implementation?

Jamie Tanna:

So we don't yet follow libopenapi. That's something we want to. We currently use, Kinopenapi, which is one of the other big projects in the space. And so there have been a couple of things recently where, people are like, hey, there's a bug with our codegen. It's like, actually, sorry, it's a bug upstream.

Jamie Tanna:

So that one takes, some time for it to get fixed upstream, and then come back to us.

Shay Nehmad:

We've been, working with LiveOpen API, and I can definitely attest to maybe maybe it's, it's worth considering.

Jamie Tanna:

So similar to the conversation about breaking changes, I would like to and I had started looking at it, but we can't do it without breaking change because not only is OAPL codegen used as a command line tool, it's also used as a Go package. So all of our types assume GetOpenAPI. So ideally, we would have another package for the open API. And then it's like, okay. But then we've got basically 2 copies of the same code.

Jamie Tanna:

And although I'm not I'm generally a fan of the rule of 3, the code duplication. So on the 3rd time, I'll try and refactor. But in this case, I I don't know how I feel with, like, hundreds of lines of code being duplicated.

Shay Nehmad:

You you wouldn't feel good. I can I can give you the the heads up on that? So cool. Working on, the o OAPI Cogen. And anything else, you know, coming up on your feed, on your blog that's interesting that's worth, mentioning.

Shay Nehmad:

I know I mentioned it on the show but I just have to mention it again. Jimmy has a blog with over a 1000 blog posts. And it's not like quality over quantity. It's not like a thing where, oh, he has a 1000 blog posts and they're all AI generated slop. No.

Shay Nehmad:

They're they're pretty interesting. Some of them are controversial and thoughtful like you're not mature enough to release your first version as v one. Some of there are summaries of cons like the gophercon. Some of them are just, like, super useful small tips that you can read in a minute and some of them are one of your many podcasts appearance including on Go Time, etcetera etcetera. A lot of cool stuff.

Shay Nehmad:

Hugo. I love Hugo. So what's been going on? What's been happening in the week? What's been happening in the posts?

Jamie Tanna:

Yeah. So, like, at the moment, I work at Elastic, and I'm working towards rolling out Renovate dependency management. And so as part of that, there's been a lot of time digging into some of the fun intricacies of Renovate. So there's there's been a few posts recently about trying to better test your configuration because there's one of the most things you could do with renovate is define your regex for here is what a package looks like. And for instance, like, Golang c I lint, which generally people install with a curl pipe to bash in, like, your make file.

Jamie Tanna:

But how do you get updates to that? Well, with renovate, I've got a regex, which takes that curl string, and renovate is then able to see, oh, okay. Well, that's the version of Golang clit, and it will then start raising PRs for that. But one of the problems is there's the famous xkcd. Like, you have 99 problems.

Jamie Tanna:

You added a regex. Now you have a 100 problems.

Shay Nehmad:

Mhmm.

Jamie Tanna:

And trying to maintain some of those is quite painful. So I've been spending a fair bit of time in the TypeScript world and just, like, plain JSON world of trying to write better tests and improving stuff.

Shay Nehmad:

And the, like, the point is you wanna, like, improve dependency security, like, lower the supply chain side of things in Elastic?

Jamie Tanna:

Among other things, yes. So it's also, like, it's trying to reduce some of the burden of teams to update their dependencies, especially for some of our internal things. We've got a load of internal tools that things like Dependabot just don't know about and can't understand. So that will to try and improve that, we want to do that. But it does absolutely also feed into things like supply chain security, making sure like, the more up to date we are on dependencies, generally, the safer we are, although that's not always the case.

Shay Nehmad:

I know. The the whole dependencies thing, it's been ramping up, where I work as well because we were trying to line up some really shiny certifications. I don't know if I'm allowed to talk about them, but they're really tough ones that allow you to work with all the kinds of customers in the Western world. And and the just the sheer amount is always insane to me. And whenever I see that, you mentioned the rule of 3 before.

Shay Nehmad:

I just today I or yesterday, I was working with one of my devs and we found a package called in Go, called ASCII strip or strip ansi or something like that that clears like color codes and and like shit escape codes from your text so you can parse it in case you grabbed some terminal out but didn't have colors. Because we were parsing, Precommit and you know how it has, like, green pass, purple skipped, blah blah blah. So the purple and green, it's it's like shit ANSI codes and, I went to grab a coffee. I came back and I saw my developer installed straight panty. I was like, that's interesting.

Shay Nehmad:

I wonder how it's implemented. Like, it's probably pretty complicated if there's a package. I opened the package. It's a micro library with a single regex const in it that literally does nothing but give read dot compile and give give you the result. Like, no, let's copy it.

Shay Nehmad:

And I will copy it a 100 times instead of having another line in Go mod.

Jamie Tanna:

But then the problem with like that is what about when you have to update bot? And, like, one of the problems I have with the Go philosophy of copying is better than a dependency is, yeah, but things change. Like, if you now have to maintain that regex, regex is awful. Maintain. So it's one of those things like, what if you now suddenly need to change that?

Jamie Tanna:

How do you know that, oh, okay. It's used in these 700 places in the organization?

Shay Nehmad:

So, honestly, I would there are two answers to this. The first one is maybe it's okay that I don't upgrade it all over the place. There's the places where I found it's breaking. Like, if it's not too complicated and I was confident enough to copy it, then the new age cases are not necessarily going to be upgraded at all places. Second thing is nobody is promising that the person who wrote this library is, like, better coded than me.

Shay Nehmad:

Not in terms of, like, on average, I'd assume yes, that other developers are better developers than me. That's why I'm in management. Right? Because they wanna keep me away from the terminal. But in general, as a rule, I always thought, you know, as I started in c plus plus and things like that and, you know, the projects I saw, they had committees behind them and boosts and all these, like, very impressive looking projects.

Shay Nehmad:

And it it sort of ingrained, oh, library code equals good code. But then once you've debugged enough bugs that come from, like you said, upstream dependencies, you start to realize that all code is is bad. And, like, yes, some some coders are better than others and some libraries are more robust than others, but, like, there's no reason to assume that the library is better. And last thing, if I need to go over all the code in a company, in a workspace setting and do that at a small enough scale that you don't have a software catalog, you can just control f it. Right?

Shay Nehmad:

You can just, find find it all and if there are secret repositories that are hidden from you because they're private and nobody told you about them, that's our problem. And if you're big enough for, you know, control f to be a problem because no developer has all the code on their computer, At that point, you should probably have something like Backstage or an another, like, software catalog thing where you can find all the Go things and and, like, sort of iterate over them or maybe even let the guild know and hey, please upgrade this thing that we've copied. But I don't know. These micro libraries that I've seen over the last, you know, month or so when we've been churning through these CVs and we're not working a ton of like, we're not doing a ton of Go work at Orga. We're doing also Python.

Shay Nehmad:

I mean, there are a lot of libraries that are just stupid.

Jamie Tanna:

And I think so some of it is it's easier to write a library, than to write

Shay Nehmad:

Well, for the first day, but for the guy like me who needs to manage all the bleep this out, all the CVEs. So I had to I'm calm. I'm calm. It's fine. It's almost the weekend.

Shay Nehmad:

I'm calm.

Jamie Tanna:

I know, so for instance, like, taking back to, you know, coach and I had a case in the past where someone got in touch because they had vulnerability in a markdown parser, which is one of our transitive dependencies. And I was like, this almost certainly is not used by the project. Like, it's fine. And I'm like, well, like, we're deploying stuff to the Red Hat, ecosystem, and therefore, we have to, like, fix all the CVEs. And I'm like, it's not a problem.

Jamie Tanna:

And then I checked it with govoom check. Govoom check was like, this isn't used in your project. It's all fine. And I was still like, look, can you just fix it? And it's like, it's such a waste.

Jamie Tanna:

And, like, I'm sure you see this as well, but there's a lot of work towards, like, reachability and working out, like, are you actually affected by the thing? Because a lot of CVs are, like, just based on, is it somewhere in your dependency tree?

Shay Nehmad:

Yeah. A total false positive. Yeah. Reachability is a really interesting topic. We've been, looking at it work as well.

Shay Nehmad:

But I think it's pretty early stages. I don't wanna talk about it too much. How was how is it being twice on the show? Does it feel like are you is this, like, second nature to you? Yeah.

Shay Nehmad:

Of course, I'm a I co host.

Jamie Tanna:

I mean, co hosting is first time doing it. Hopefully, it was alright co host. At least Jonathan's back next week. So

Shay Nehmad:

There's an interesting like, I don't know if he's gonna listen to the episode. Right? Like, he's literally doing the show every week. I think he can afford keeping the news 1 week and he'll still be, like, most likely more informed than other people. So maybe he doesn't listen to this.

Shay Nehmad:

But just on the off chest, he doesn't listen. Hey, Jonathan. We think you're a pretty good cohost. Doing a good job, man. But I guess I don't know.

Shay Nehmad:

If the if your cohosting is terrible, the people will rip into you in the channel. Right? Yeah. That's true. Who's this clown talking about?

Shay Nehmad:

Bisec, not even understanding every single line in the blog post by by Ross Cox in 10 minutes before the show.

Jamie Tanna:

And I'm looking forward to, like, counter blog posts. They're like, this Jamie's hammer guy sucks.

Shay Nehmad:

Have you listened to Hamilton? We we slam each other in the press, and we don't print retractions. So now it's online. Now it's in blog posts. Actually, that's one thing I really like about Go.

Shay Nehmad:

You see it in this is a total rant, but you see it in Ruby. Right? There's this guy, d h h David something something. Super controversial opinions, and there's a conference, and it's all controversial, and everybody's angry. And, oh, and there's, like, communities.

Shay Nehmad:

The Rust Leadership Committee had a thing where they broke up, and they started a new Rust Foundation. Then you're not allowed to use the Rust logo legally, and then they created a new fork of the language. And it's a lot of drama. I'm not even talking about all the TypeScript, Vercel, the Next JS guys on Twitter just subtweeting one another. You suck.

Shay Nehmad:

No. What is that? I've never seen any Go developer get, like, angry about anything. Like, the it's just a pretty chill bunch. So I can't imagine people print like, printing, you know, scathing blog posts about this, this episode.

Jamie Tanna:

I would also say, so since I was last on, I did pass, like, a rite of passage for being an open source maintainer. I got my first very abusive email.

Shay Nehmad:

Oh, congratulations.

Jamie Tanna:

But I will say, like, that was a good developer. Like, they they can be angry, but thankfully not as, angry as some people.

Shay Nehmad:

Well, you know, if you if you don't wanna get death threats, then you need to remove, markdown parser from your dependencies. I think this is a logical state of affairs. No. Seriously, guy who sends abusive emails to open source misdams. You can, dry up.

Shay Nehmad:

Go dry up.

Jamie Tanna:

But, yeah, like, as you say, the good community are by and large pretty good. Haven't seen anything too controversial, anything too angry. That is, like, a very nice thing.

Shay Nehmad:

Maybe I'll start a fight at the Godfreycon Israel just to shake things up. Although, I'm pretty sure, 95% of the people there can take me. I'm not a not a very violent person. Cool. So, Jamie, this sort of unstructured conversation could go on forever, but I'm actually, people don't know this, but we're actually recording it the night before.

Shay Nehmad:

And it's shower time for my kid, and I have to run. So thanks all for jumping on today, man.

Jamie Tanna:

Thanks for having me.

Shay Nehmad:

As, as we're sort of closing out here, where can people find you, and what project should they support and sponsor on GitHub if they if they're just thinking about it and maybe working around open API or something like that?

Jamie Tanna:

So people can find me on my website, jbt. Me. If you want to find all the various different social media platforms of choice, that I'm on, I've got an elsewhere page. So if you go to jp.me/elsewhere, that has a list to all of the things that I'm on.

Shay Nehmad:

Oh, that's a good idea. I should probably do that. Although, I'm not on a lot of things, so I don't know.

Jamie Tanna:

I mean, it's a good chance to just go and sign up things just to add fill your page.

Shay Nehmad:

Oh, I have signed up for a lot of things, but I'm not maintaining a lot. I'm actually trying to, like, lower my usage of all these social media things. I'll just say that if you go to, jvt.me/otherthings, you can find other, funny Easter eggs. For example, slash kind slash steps can tell you how many steps Jamie walked in a day, which is why he was interested if the fit protocol is real time or not, which is some serious dedication to, journaling and documentation on a level I've never seen, but it is sorta inspiring, and I'm I'm considering even stealing that idea.

Jamie Tanna:

Well, if anyone's interested in things like that and, earning your data, there's the indie web movement, indieweb.org. They that's how I got into a lot of these things. It's really interesting, the sort of things that people care about, like, especially social media, pre Elon Musk buying Twitter. Like, loads of people had a really good platform. They cared about it.

Jamie Tanna:

And now that's just all gone. The API access is gone. You can't even take your stuff out and go elsewhere. So building on actual open platforms is pretty cool.

Shay Nehmad:

I don't know if it's just because I have a blog, and I've been investing in it for, like, a few years now. But it definitely seems like there's a whole a real renaissance of personal websites, cool little fun websites. I think that there was a big move when, Wordle came out and then all the Wordle clones came out. But then when, New York Times bought Wordle and and there are still a lot of Wordle clones even though it was quote unquote, like, they sold out, I'm happy for them. Like, that's great.

Shay Nehmad:

But all these cool little personal websites of all these personal interests, Oh, guess the game and blah blah blah. And in the tech space, I think it was sort of, okay. You have to have a website. You have to have a medium. You have to have a whatever.

Shay Nehmad:

But these things don't last. And then websites that last for more than a year or 2 get do you see this sort of, like, personal little gardens, like walking in the street and looking down people's homes? It's really interesting.

Jamie Tanna:

And it's one of those things, like, you can do what you want on it. You can try out some cool stuff. And in that vein, like, you mentioned about sponsorship and stuff. Like, I would love to be sponsored for the open source. I do.

Jamie Tanna:

But also your companies, your projects will use so much open source. Have a look at funding at least one person or at least saying thank you to either a blog you read, a podcast that you listen to, or a project you use. Just say something nice, if you're not able to get your company's sponsor.

Shay Nehmad:

For sure. Just connecting to the, to the community, giving some feedback, telling on some bugs, sending death threats via email to Jamie specifically. It's all very appreciated. Alright, Jamie. Thanks, man.

Shay Nehmad:

Thanks for coming on the show. Next week, back to normal scheduling, and thanks for listening, everyone.

Jamie Tanna:

Thanks, Avril.

Shay Nehmad:

Program exited.

Jamie Tanna:

Bye. Program exited. Goodbye. This show is supported by you. This is Cup and Go for August 29th already.

Shay Nehmad:

Good sign.