Modernizing codebases with Isak Berglind

Mathias Hansen (00:10)
Alright, thank you for coming on, Isak Nice to have you here.

Isak (00:12)
Thanks for having me.

Mathias Hansen (00:13)
So Isak how did you get started in computers? What's your origin story?

Isak (00:18)
Yeah, both my parents were quite tech savvy when I was a kid. So we had like computers at home from early on. So we had like ancient Macintosh. I don't know like the which operating system or anything it was, but it could dual boot Windows and Mac. So you can jump into like the different OSes and to access different games were probably the things that I did back then.

But then growing up a lot of computer games and that kind of stuff and somehow I think someone told me at some point that like programming was really hard and basically for geniuses. So I like stayed off programming because I thought that's not for me. I'm not a genius. And then I took a programming course when I was like 18 and got into it and found that well, this is possible. You can do this.

But at that point I really had like a clear career path that I was on my way to do. So it got like a few more years, like seven, eight more years until I started it as a profession and until then I did it on the sides and stuff. I'm actually pretty happy it was that quick because I think if I would have found programming earlier, I wouldn't have done anything else because yeah, now I'm here and I don't see myself going anywhere and I've been here for...

over 10 years now and I still think it's a really like fun and exciting still. So yeah.

Mathias Hansen (01:34)
So you started as

a gamer and turned into programming a little bit later on.

Isak (01:40)
Yeah, sort of. Sort of like that,

Mathias Hansen (01:41)
Yeah.

Are you still into video games or is that sort of a more surpassed?

Isak (01:45)
No, not at all.

After kids and stuff, like video games are nowhere. And I think also like programming aid up a bit of the gaming time. I prefer to like work on fun programming stuff than playing games. It sort of like fulfills the same itch.

Mathias Hansen (01:55)
Yeah.

So did you start doing web development first or did you do like sort of classic software development with CLIs or desktop apps or?

Isak (02:09)
The programming course I took was in like Visual Basic 6, which was ancient even then, but I think the programming teacher was a bit lazy maybe. He didn't like to update his stuff. But I would say it's a great learning platform. It's really easy to just get going. So you have like drag and drop.

Mathias Hansen (02:12)
Mm-hmm.

Isak (02:28)
your controls into like a screen and then you double click the button and then you get the event handler for the button. So it was very easy to like get started and you could do some things like graphical like binding stuff and so it was like an easy way to like get your feet wet. But then I picked up PHP after that because I wanted to do stuff for the web and then PHP was accessible.

So I got started there and then when I started working professionally I got a job in .NET through a friend. So my first few years I was writing .NET. ⁓

Mathias Hansen (02:59)
Hmm?

So .NET,

was that C sharp or Visual Basic or what was it back then? Yeah.

Isak (03:10)
That was C sharp.

So I really like C sharp still. I think it's a really competent language and it would be fun to go back and do some C sharp again. I really, really got the grip of the .NET part. I was sort of staying a little bit out of it because I was a little bit scared of it. But if I was to do it again, probably...

and force or like take advantage of the whole .NET platform.

Mathias Hansen (03:34)
Yeah, I used to dabble in .NET as well and really enjoy C Sharp. And if I'm not completely misremembering, I feel like Taylor Oddwell of Laravel, of course, used to do C Sharp just prior to starting Laravel. I think he did some .NET development for a while there. Does that ring a bell? Okay.

Isak (03:48)
Yeah, yeah, I heard that as well. Yeah, yeah, and that's why

Blade is called Blade because it was inspired by Racer, which is .NET's templating agent. Yeah, I think I heard that somewhere, and it sort of makes sense.

Mathias Hansen (03:56)
⁓ I did not know that. Huh. Hmm.

Cool. So do you, if you like, if you turn back time, do you, do you remember like the first app you built or like, you know, desktop application or something you built? Do you remember one of the first projects where you coded something and it like did something?

Isak (04:14)
Yeah, I did for my like... For the programming course, for the like final exam, I did like a four in a row game. And it had some like animations when they like fell into place and also a super basic opponent that would like... That it would play against. Really rudimentary, but it was still like not random. You would try to come up with ways to make it... To make it win.

Mathias Hansen (04:19)
Mm-hmm.

Isak (04:37)
So I remember that and I completed it and I submitted it and that was like the first... the first thing and not just half-baked thing. And then I... yeah.

Mathias Hansen (04:44)
That's awesome. So you basically did the

physics emulation for dropping the buttons, right? If you want to be a little bit generous. That's awesome. That's really cool. Do you have like...

Isak (04:50)
Yeah, yeah, yeah. And make them bounce a little bit like, yeah, yeah. Exactly, exactly. And then I tried to

build like different stuff after that in VB6, like a Tetris that was never completed and that kind of stuff. And then when I moved to web development, then wasn't games anymore. They were more like cruddy applications and yeah, all these classic to-do lists and Twitter clones and everything like that, but...

Mathias Hansen (05:16)
Yeah, yeah.

Isak (05:17)
Not as flashy as the VB6 stuff for sure.

Mathias Hansen (05:20)
So you have a sweet spot for the old classic, like super classic games like Tetris and Snake and stuff like that. That was kind of a fun way to get into it.

Isak (05:30)
Yeah, yeah, yeah. And that was also like back in the ancient Macintosh days, Mom and Dad, that was the games that were playable. So of course those are, the classics are has a place in my heart still, absolutely.

Mathias Hansen (05:35)
Yeah.

Absolutely. So you're of course here because you are coming back for the second time actually as a speaker at Level Life this year. We were so excited to have you last year and really enjoy your talk. We just had to have you back. So we're really happy that you're able to make it. But you're of course not doing the same talk this year. So do you want to give us a peek behind the veil and tell us a little bit about what you're going to talk about this year at Level Life?

Isak (06:05)
Yeah, sure. So last year I talked about legacy code and about how to modernize...

a legacy code base and how to do it with Laravel. And it's sort of on the same line, but instead of like focusing on the code, we focus on the database and the database structure. And what you do if the database structure is not what you have wanted it to be, which is quite tricky because you can't just update the database structure because you might have like thousands of files that reference it. And those in our case, those files are untested files and files

Mathias Hansen (06:36)
Mm.

Isak (06:36)
that

you are not entirely sure of what they do and what it would mean if you change them too much. we have tried different ways of like handling this problem and one of the ways that we've tried is like the repository pattern like abstracting away the database. So it's like our adventure with a repository pattern like

what the issues we had, how we like saw this pattern as a solution, how we tried it and yeah, how it actually went. So...

Mathias Hansen (07:05)
It's really exciting because

it's like a real life story. not just here's a theoretical pattern you might want to use for something. This is like, hey, this is how we actually used it to solve the challenge we had.

Isak (07:15)
Exactly and last time I was on it was more like this is a tried concept that we have successfully done and this time it's more like yeah we tried it maybe wasn't perfect we maybe

took it a bit too far in some places and yeah. mistakes were definitely made. So it's more like a follow along the journey and see where we got burned.

Mathias Hansen (07:38)
I really enjoy that kind of talk because I get to hear some of the mistakes that were happening along the way. So I can perhaps try to avoid those mistakes, Yeah, I really love that.

Isak (07:48)
Yeah, and also bit more like putting myself out there because I have to admit that I thought this was a really good idea. It wasn't. And here's why. So but I think it will be fun to share and as you say, to

to follow along and also not just see the good results all the time and also see some mistakes being made and that kind of stuff can be nice to follow along to and a bit more humble approach to problem solving and how I think most of us work day to day. You do stuff, you try stuff, most of it work, some of it doesn't.

Mathias Hansen (08:14)
Yeah, definitely.

Speaking of working

day to day, I can't help thinking about AI coding, which is of course bigger than ever. Have you started to embrace using cursor or cloud code, anything in your workflow? Or how do you picture that?

Isak (08:37)
Yeah, I'm doing everything in cursor and I'm sort of going a little forwards and back on how much I use it because sometimes it just it's amazing and sometimes you feel like if I would have done this by myself from the beginning I would have saved so much time. So still...

Mathias Hansen (08:39)
Mm-hmm.

Hahaha

Isak (08:54)
Like working with legacy, I think it's hard. It's just the context window is far too small still to know all the nooks and crannies of what you and can't do and stuff. But for like now I'm creating something new and to instruct you to create like all the boilerplate stuff you need if it's like controllers or migration. then it just saves a bunch of time. And also to just, I have written a class, just write test for this please.

and then it just creates the file and creates all the scaffolding and makes a pretty good start and then you can just go and work from there. So that I think works really well.

Mathias Hansen (09:18)
Yeah.

That's definitely one place

where I'd to try it out more is trying to have a test built for untested code. As you mentioned, having passed the code based on untested and having sort of the LLM go and do a first step at some stopping out some test cases. It's probably not going to be perfect, but doing all of this by all plate and getting the ball rolling on a test suite is probably a big time saver.

Isak (09:51)
Yeah, yeah. And I have worked a little bit on like side project things in like JavaScript and there I think it's...

It's way ahead. But then it's also like new code. It's not any legacy. But I think it knows frontend stuff really well. you can... Kustera like gave a prompt and I had working code in actual features in like seconds. So I felt the magic there and I hope it will come to us on the P2P side too. Because I think it's a way ahead in the JavaScript world as I have experienced it.

Mathias Hansen (10:01)
Hmm.

Yeah, think some of the challenges are also newer versions of things, right? So Tailwind 3 versus Tailwind 4. Have you had any issues with mixing up Tailwind 3 and 4 syntax? Same thing with Livewire. Seems a little bit behind on that too, right?

Isak (10:37)
Yeah, yeah. We haven't updated to Tailwind 4 yet, so I haven't experienced any issues there. I'm sorry to say. And also haven't done very much Livewire lately, so I can't... I don't know really there either if it's... I'm golden in diversioning things at least. I haven't had any issues there.

Mathias Hansen (10:40)
okay well i have neither so it's

So you're golden. You're good.

Right, yeah, I only used Tailwind 4 on a couple of smaller side projects so it hasn't been as big of an issue, but I've heard other people grumble about it, getting confused. ⁓

Isak (11:07)
Yeah, okay.

I've been since like Tailwind version, very low. I thought like, well, Tailwind, its feature complete is perfect. Why do I need to update? But then you see, okay, but this is actually pretty nice. But it feels like every version I feel like, okay, now they can't possibly make this better. It's perfect. So the arch update haven't been that strong.

Mathias Hansen (11:15)
Yeah

Right, exactly. I was...

I was dreading updating my one side project from 3 to 4 and I like, oh I don't want to spend all this time doing this. And I tried their automated tool to upgrade and it took a couple of minutes and it just worked. And I was so shocked. I was like, there's no way, it just works. Like all the edge cases and I'm probably doing some weird thing. No, no, it just worked. So was like, okay, okay, it's fine. I can upgrade my day to day projects and for Table in 4 as well. But just haven't gotten around to do it yet.

Isak (11:39)
Ha

Wow.

And when it sounds like good news, that's promising.

Mathias Hansen (11:57)
Yeah, I

was pleasantly surprised.

Isak (11:59)
Cool.

Mathias Hansen (11:59)
So you're going to Copenhagen in a few months here for Level Live. Is there anything you must see or eat or experience while you're there? Anything particular that you want to see?

Isak (12:11)
Well, I lived in Copenhagen for a year, so I think I've seen the sights and stuff, but what was one of the highlights of the last trip, because I had my colleagues also with me, is that we realized that you can get gin and tonic in a pitcher. You can't get that in Sweden. So I'm looking forward to having a gin and tonic pitcher after the talk is done.

Mathias Hansen (12:17)
Hmm?

That

sounds amazing. Where was that? Was that near the venue or was it somewhere else in Copenhagen?

Isak (12:37)
No, was just outside. I forgot the name, but the food court. Yeah, one of the food trucks had it. yeah. it was really nice.

Mathias Hansen (12:40)
Yeah, one of the food trucks had it, that's awesome. I'll take a mental note here.

That's really awesome. All right, well, it was really nice to have you on. And I'm so excited to hear your repository pattern talk in a few months. And I hope you're have a good time.

Isak (12:55)
Thanks a lot for having me, looking forward to going to Laravel Live again and really happy to be... to have said to have been to every Laravel Live ever.

Mathias Hansen (13:04)
That was Isak. If you want to hear more from Isak and the other speakers, go ahead and buy your ticket now at laravellive.dk

Modernizing codebases with Isak Berglind
Broadcast by