Cup o' Go Live from Amsterdam!
This show is supported by you. Stick around till the epic to hear more. This is CapaGo for June 19th 20 24. Keep up to date with the important happenings in the Go community in about 15 minutes per week. I'm Shay Nehmad.
Speaker 2:I'm Aaron. I'm Suce. Are you Viki?
Shay Nehmad:I'm John. But not the John you're thinking about. A different John. And we are at in beautiful Waterside, Amsterdam. We arranged this, Go meeting here because I came from for DevOps days, and it's, right near here.
Shay Nehmad:And we might edit Jonathan here saying he's sorry for not coming, but it's not his fault. He missed the flight. So we'll try to do our best to do an episode.
Speaker 2:It's not a it's not his fault because he missed the flight because his flight was delayed or something. No. He missed the flight, then it's his fault. Are we
Speaker 3:still here, Jonathan? We we have a
Shay Nehmad:different Yeah. This is wish.com, John.
Speaker 2:Alright. Thank you. Thank you.
Shay Nehmad:Alright. So because we are recording on a Wednesday, we don't have the meeting minutes of the proposals. And we covered, if you remember last week, really interesting proposals like Gabbi help, v two encoding JSON, move h t p 2 into the send library, some things that got, there are discussions, not yet proposals. And a proposal that got accepted about math rend, using the global seed and no operation to make it safer. Because we don't have any new proposals, we decided to do sort of a ready to review.
Shay Nehmad:It's also more con conducted to discussions. So the first question I have for the Amsterdam Go meetup group is if you were to write a GUI application, which GUI library would you choose, and would it even be in Go?
Speaker 2:I know.
Shay Nehmad:So for, Pocky, you don't use the Go for, like, GUI, right, for the front end?
Speaker 2:No. Because it's all, like, web based, so it's it's React. I must say I've never really written many GUI applications. I don't even know which libraries there are for Go to do this. I would have to investigate that initially, see if there's anything usable and otherwise I would be really tempted to use at least some kind of web library so I can do my GUI in HTML.
Speaker 2:Yeah. But then maybe with bindings to go if my program itself is written in go.
Shay Nehmad:So one of the like, I was, in a reserve duty for a while when the October was started. 1 of the people who replaced me on the show was, Andy Williams. He's the person behind the FINE project. FINE is a GUI framework for Go. You're writing main.
Shay Nehmad:In main, you write Go code, and you press press run, and it opens a GUI application, which is very weird at first. So this thread is all about that. Most people agree with you, Eric. They say, I'm not gonna use Go for GUI. I'm gonna do other things in Go, and I'm gonna pick a language that has more support.
Shay Nehmad:I do think it's important to separate GUI from TUI, right, from terminal UI. For terminal applications, there's a lot of libraries. Right? Yeah. Have you used any?
Shay Nehmad:Maybe charm bracelet or cobra or things like that?
Speaker 4:Yeah. Develop a lot of T T wise in the eyes, but knowing where, after churning results. But nowadays, I would be definitely using charm.
Shay Nehmad:Yeah. Charm bracelet is really cool. They have a lot of
Speaker 4:We have a lot of cool projects besides it. I also really totally recommend to write an 8 v g instead of trying to do something using something else because it's much better for user experience.
Shay Nehmad:For sure. So we thought about GUI library obviously goes not super for that. Right? The discussion on Reddit is raging. But there is a interesting, another thing in Reddit, about the new web framework called Caesar.
Shay Nehmad:So if you had to write a web, you know, API or something like that, what framework would you use right now?
Speaker 4:I don't even need the standard library.
Shay Nehmad:That's the answer I'm looking for.
Speaker 2:Of course. Yeah.
Shay Nehmad:Go standard library. You don't need anything else. Exactly. But if you do want a framework, if you don't care about it being opinionated
Speaker 4:I would use another language.
Speaker 2:So then It looks like
Speaker 3:that's a big thing you want to do, like, just to standardize the game. It's it's quite simple as opposed to some frameworks. Much of a disadvantage.
Shay Nehmad:Yeah. Django, Phoenix, Laravel, Ruby on Rails. So if you do like all these frameworks, you can use something called the Caesar. It's a new thing. It's it's making the rounds.
Shay Nehmad:People like it a lot. And on the web page, the first question they have is, why do I even need a web framework? Which makes a lot of sense. But it is at the very least, I think it's worth looking at even if you are planning to use the standard library just for the project structure and, like, the ideas where you have a a directory called application, directory for CMD, for domain, directory for config, for database, for public assets, for views. It's like it's nice.
Shay Nehmad:So I
Speaker 4:I took a look at this before, and it to be honest, it's not bad, but it seems like it is the interpretation of someone how they would organize their Go application. And I would say that the it's Go, it's, quite straightforward in English. You are pretty much better of trying to to find what works for you instead of following the ideas of,
Shay Nehmad:something else.
Speaker 4:Yeah. So just to give you an example here, I see that they have something called the PDX injection within OIM, and I feel really uncomfortable with the with facing the outside, specifically to the approaches they have. Yeah.
Shay Nehmad:But to be honest, I'm not the I haven't tried it out yet. I just saw the post. But when I'm looking at the their decisions, so they use the validator package for validation, which is what I use, and they use f x for dependency injection, which I don't agree with. I don't like f x that much, but this is just a personal preference. For ORM, they use BUN, which I like a lot.
Shay Nehmad:It's a very thin wrapper around the object. It's not like a big ORM thing. Yeah. It's basically you basically write SQL. It's it's really, really
Speaker 4:I agree. But something that we I noticed in in Bern, almost. So about about Bern, I I took a look at its source code about maybe more year ago, maybe a little bit more. And I noticed that the way they run their queries, they they they run the queries that, you execute to it. They basically reimplemented the the launch before escaping the data.
Speaker 4:So so they don't use the drivers, escaping. So for me, that's kind of a risk.
Speaker 2:Say what
Speaker 4:else? Yeah. They they
Speaker 2:They don't use, like, prepared statements.
Speaker 4:No. I I that that was what I was going to say, Max. It's not even that they don't use prepared statements. They don't even use the driver's escaping. They implemented their own escaping.
Speaker 4:For me, that's like too much. This is why I like to keep the the number of the dependencies low. I try to do everything as much as possible using the standard libraries in the libraries that I read first. Cool.
Shay Nehmad:So if you're looking for a quick start, they have a really good, quick start guide. Try it out. I think it's worth, looking at the decisions they made. It's basically connecting a lot of different tools. For example, if you like task file, there's task file.
Shay Nehmad:If you like VAN, there's VAN. If you want a more, bring your own choose modular framework, maybe take a look at GoKit where you can pick whatever you want to use, and it's easy to not use what you don't wanna use. But if you are writing web, I think it is really important to at least take a look because the structure is really good.
Speaker 2:Yeah. I can imagine if you're, like, new to Go and you want to build something web based in Go, then it's a good way to start. But, yeah, it's opinionated, but if you don't know Go that well, you need those opinions.
Shay Nehmad:Okay. So our show, I'm selling this for the people here who none of them are listeners, by the way, listeners. The news portion is around 15 minutes. So we have 5 minutes left. There's one interesting thing, how to prove that I'm good at Go apart from having work experience?
Shay Nehmad:So there's someone already. They want to move jobs. They want to find job as a Go developer, which was a lot easier a year ago. Let's be fair. The market is really hard right now.
Shay Nehmad:Right? It's very much cooled down. And there's a question, how do I prove that I'm good at Go other than, you know, recommendations from my previous workplace? I think it's a very interesting topic because so much of Go is open source, so much of Go project is open source. But for someone who's not a core contributor, you know, wrote all the compilers themselves, what is the, I don't know, quick wins?
Shay Nehmad:You wanna find a job right now? You wanna prove your go work? What would you look for?
Speaker 2:I so I actually looked for a Go developer a while back. So a good one. We were looking for my company, a senior Go developer.
Shay Nehmad:This, episode sponsored by no.
Speaker 2:I'm just kidding. We to find a good Go developer, open source projects that you have on your GitHub is important. If I can see you have a decent open source project that you work on that that's a plus. In an interview, I would ask questions about how to go run time, how certain, like, things work.
Shay Nehmad:For example, how does CPU Profanity work?
Speaker 2:Well, yeah. Except for how that was discussed. That should have been recorded.
Shay Nehmad:Yeah. For sure. That was gold, man.
Speaker 2:Yeah. Maybe something more basic. Like, how does the garbage collector work? Like Yeah.
Speaker 3:If you
Speaker 2:want to write something fast, why is it better to not generate garbage? And how do you not generate garbage? That's something quite internal to go that most developers really don't have to care about. But if you know about it, it really shows that you have deep knowledge.
Shay Nehmad:I think previous projects really is because if someone has a project that's more than the basic to do app Yeah. Whatever, I can ask them we just talked about preferences. Right? Let's say you developed a web open source web thing just to again, for just for the resume. And I see you don't use any ORM.
Shay Nehmad:I would ask, like, why don't you use ORM? And if you were a bad developer, you would say, I don't know, man. That's just what the tragedy told me. But your explanation was so deep and nuanced. I would understand you have a deeper understanding of the topic than just what the code is showing me.
Speaker 4:That's might as well.
Shay Nehmad:Yeah. No. If you let's say the first, tip I think the statement you give is don't suck. Right? And actually be good.
Shay Nehmad:So you have something to prove. I think other than having your own project, a bigger indicator for me is your ability to contribute to a big existing project. Right? If at your work right now, your company is using let I'll give an example from Orca where I where I work. We use, Kix, which is open source security something whatever, that under the hood uses re Rego, which is a open policy agent language.
Shay Nehmad:So if you have contributions to rego, which is cloud, you know, CNCF project, has maintainers, super important, your code gets reviewed, You have a discussion, etcetera etcetera. That indicates a lot more about your ability to actually work at the company and that that you're actually good at programming in Go and not just coding in Go. You know what I mean?
Speaker 3:Yeah. I that's the answer, actually. So it it depends. It
Shay Nehmad:it depends is the senior developer
Speaker 3:head. If you're doing something like really high performance stuff or whatever you mentioned, like, knowing the internal software runtime and then, like, oh, okay. Don't create garbage because And also kind of what we do because, let's say, you have a garbage collector and data. And even with some additional processing, if you end up adding a few milliseconds or so, of course, data. So those kind of
Shay Nehmad:Yeah. Just for context, he's talking about, web conferencing software written in here. It's like every WebGo thing. You have to pass context first.
Speaker 3:Yeah. Yeah. I'm sorry. However, it is a it is for some API layer or for some service which doesn't have a lot of traffic. Right?
Speaker 3:So think about think about writing some kind of operator or something to call it is operator. Kind of creating my previous job. So in that case, you don't have a lot of traffic. So if people think of the languages as a any language, it is fine because those are very simple language to pick up. And we didn't have developers who do to take up Java.
Speaker 3:They could pick up within 2 weeks.
Shay Nehmad:So you're saying you can prove you're good at programming, and you don't have to fixate about proving you're good in Go? Like, if you're a very, very accomplished c plus plus or Rust
Speaker 2:or
Shay Nehmad:Python developer, maybe even doing projects that combine the two language is a better bet for you.
Speaker 2:That makes sense? So for me, the most important thing when hiring was we would send interesting candidates a simple exercise, like, not one of those exercises that takes you a whole weekend. Just something you can finish in half an hour if you want to. But the most interesting developers were the ones it was like a performance based thing where you have to send as many HTTP requests as possible. A lot of them had like good answers, but the more interesting developers were the one who's who really dove into the problem and were really trying to figure out, okay, why is this slow or fast?
Speaker 2:Or how can I improve things? Instead of just writing notes there, go a little bit deeper and try to figure out why. As you want as a good developer, you want to to not just write stuff, you want to understand what they're doing and the tools they're working with. That's a
Shay Nehmad:That that's another tip I can give. When I was looking for a job before I joined ORCA, I asked all my friends who work at companies that I didn't necessarily want to work in, but I knew that that good engineering. Can you send me your hiring exercises just so I can go through them and, like, practice? And if it's relevant, upload to I was interviewing for, like, VPR and d role, so it's not necessarily go. But, again, this this works totally for any role.
Shay Nehmad:Just ask your friends that work in similar places. Can you send me the hiring exercise just And I'll give you some feedback. Most companies will be happy to do that, like, if they trust you. Cool. And the last thing, it's not Reddit.
Shay Nehmad:It's from YouTube. It's a a video a new video called where should I learn Go. And the question is where should I learn Go? So where did you learn Go?
Speaker 2:Good question. I think back in 2013 when I was learning Go, I was working on a system that needed to be able to handle a lot of, HTTP requests per second. I made an implementation in c, c plus plus, you know, JS, something else, something else, and go. And then compare its performance and, like, how how easy it was to, like, write something, understand it. And that's where I should go shine, and I, like, continued with it.
Speaker 2:And with performance? So yeah. Even with performance? It well, it was not as good as c, c c plus plus, but the c, c plus plus code is so much more complex. Yeah.
Speaker 2:It it has. It's a trade off for him. Anyway, to learn Go, my so my point of learning Go was just to build something and especially something that you've also built in another language. So you know the ins and outs And then when you write it in go, you have a vague idea of how to do it, and you kind of yeah. Well, that's a good way to learn because you're no you don't you don't have to think about what you're building.
Speaker 2:You only have to think about how you build it.
Shay Nehmad:Yeah. So I first of all, I totally agree that the best way is to start just building something. But if you're looking for something more structured, I recently ran a workshop at work for Python developers trying to convert them to Go, where I taught them using learn Go with tests, which I can totally recommend. I'll put the link in the show notes as well for, any listeners who's still on this podcast episode for some reason. Someone is stuck in their car.
Shay Nehmad:They can't touch their phone, and they're stuck with this episode. But I can really recommend, learn, go with tests. It's a TDD, sort of just teaches you sort of, like, go by example, but you also have to write a lot of tests, which is really good. And so
Speaker 3:our company without who are uploading subjects. What what we have is we had some front end down access. And yeah. So they got some basic lessons and they had to actually work and deliver deliver some features. So it's, like, it's not just go.
Speaker 3:It's, it's to also learn the package package back and and contribute to the existing V and P opportunities. It's of course, it's longer.
Shay Nehmad:Yeah.
Speaker 3:Also, it's very intense.
Shay Nehmad:So Yeah. I think people are looking for a way to get into it because they want to start writing Go. If you work at a company that has Go developers, again, that's the easiest way to do it. But if you want to find a job doing Go, it's really and you don't know anyone who can mentor you, then you need to find some online resources to learn. Right?
Shay Nehmad:And, also, everybody learns differently. Like, I thought using LearnDash with Go, maybe some people will connect more to, Go by example. Right? Or, Go tool or whatever. So this video just goes over the basics.
Shay Nehmad:Go to do Go tour. Go read that. Go read effective go and understand all the tips. Go read, learn, go with a 100 mistakes or whatever that book is called. The reason I wanted to link to this specific video is also because I really like, the person who did the the video.
Shay Nehmad:They have a ton of technical content up online about exactly the stuff I like to nerd about. VIM configuration, Tmax configuration, Linux shell, all these sort of things. So if you're into wasting time on your configuring your terminal instead of doing real work, this channel is for you. That's all we have for you for this week. Everybody wish for, John, a nice flight.
Shay Nehmad:Thanks a lot again for all my beautiful cohosts. Do you wanna sell sell something to the people before you we close out
Speaker 2:the episode? No. Here's go. Go ride go. So now we go.
Shay Nehmad:This, episode was part of the Amsterdam Go meetup group. Can you tell us a little bit about how often you meet and how can we connect to this group?
Speaker 2:So we are on meetup.com. We don't have a fixed schedule for meetups. We do a couple a year. Mostly depends on if we can find companies to sponsor a place.
Speaker 3:That's it.
Shay Nehmad:Yeah. So if you're a company are open. Yeah. If you're a company in Amsterdam and you want to sponsor the Go, meetup, I can personally attest that they're really nice people, so you should probably do it. Thanks a lot for listening.