This is the full transcript of the Laravel News podcast episode #41 - “Laracon Sessions with Michele and Mathias Hansen”
Jacob Bennett: Hey everyone. Welcome back to the [00:00:30] Laravel news Podcast. Today we have with us Michele and Mathias Hansen:. If you know Mathias from Twitter, or if you've met him at previous Laracons as I have, you might have gotten his name wrong as Matthias or Mattias, but his wife Michele very graciously told me just to ignore the H, and that is the correct way to pronounce it. It is Mathias. Welcome to the show, guys. Thanks so much for coming on, and we're excited to ask you a couple questions.
Michele Hansen: Thanks for having us.
Mathias Hansen:: [00:01:00] Yeah, thank you.
Jacob Bennett: Yeah, absolutely. We've got both of you together on the show. Just for everybody to be informed, these are a pair here and they actually are going to be doing a tag team talk this year. I think they're going to run across the stage, tag hands, and then switch. Is that how it goes?
Michele Hansen: Basically.
Jacob Bennett: Yeah, right. Right, right, right. Okay, so I'm excited to see that, and I'm interested to hear, kind of like, what's the division of labor there? How's that going to work? We usually talk a little bit about you guys and what [00:01:30] you do first, but real quick I just want to get this, figure this out. How is this talk exactly going to work? What's, how's the topic work and how is it that you guys will do this together?
Michele Hansen: We're going to be speaking about launching and scaling a side project, mostly pulling from our experiences launching Geocodio, and the division of labor will be that I will be speaking about the business and product side, and Mathias will be speaking about the tech side of it.
Jacob Bennett: Very cool. Awesome. All right, that sounds [00:02:00] good. It's interesting, so before we started the show, I went on and looked at some of the side projects you guys have going on, so that's pretty cool. So why don't we start there. Let's talk about, first of all, where you guys are from, what are your full-time jobs, and then what are some side things that you have going on?
Michele Hansen: So, I am from Massachusetts and we live in Virginia now, just outside of DC. My day job is I lead product development at the Motley Fool, and what was [00:02:30] the last question?
Jacob Bennett: Oh, it was just, what were some of your side things, but we can get to that in a minute, so that's fine. That's, here's my question about the Motley Fool. So I went on and realized it's fool.com. You guys must have gotten that way early. That's a crazy domain name. I can't imagine how much [crosstalk 00:02:47] must be worth.
Michele Hansen: Yeah, I think that the Fool was started in 1990 on AOL.
Michael Dyrynda: Wow.
Jacob Bennett: What is it that the Motley Fool does?
Michele Hansen: So we provide [00:03:00] investment advice and newsletters to hundreds of thousands of people in the U.S. and across the world. And I primarily work on developing new products for our U.S. audience, and it's a really fun and incredible place to work. And I should probably mention that we are currently hiring a PHP developer to do a combination of the Laravel and WordPress work.
Jacob Bennett: Michael, are you planning on moving to the U.S. anytime soon?
Michael Dyrynda: [00:03:30] Maybe not in the next three and a half years. Or longer.
Jacob Bennett: Yeah, that'd be, that would be a perfect fit cause you've done some WordPress stuff, so you, you know, you've got the Laravel, you've got the WordPress going on, we'd love to get you here, man. It'd be nice to have you a little bit closer so we could deal in time zones that are less than 14 and a half hours apart.
Michael Dyrynda: I was actually talking to a friend yesterday and we're supposed to catch up for a call, and because it was my dad's birthday I had completely forgotten about it, and he goes, "Can we do it next week?" I [00:04:00] say, well next week's my last day, so I probably will not be in a state to have a phone call with you, and then he goes, "What about the week after?" I said, "Well, the week after I'll be in the United States so that actually may be easier. So."
Jacob Bennett: Yep. Yep.
Michael Dyrynda: Yeah, these things are always tricky. It is quarter to six in the morning at the moment.
Mathias Hansen:: Oh wow.
Michele Hansen: Oh, my gosh.
Jacob Bennett: Yeah, he's a good man.
Michael Dyrynda: [crosstalk 00:04:21]
Jacob Bennett: He does this on the regular. Yeah. He does this on the regular. Sacrifices his Saturday mornings to give us all the Aussie awesomeness that we need in our [00:04:30] lives.
Mathias, how about you? How long have you been working at the place that you're at, where is it that you work, where are you from, all that good stuff?
Mathias Hansen:: Yeah, yeah. I'm originally from Denmark, and of course I live in Virginia as Michele said, and I work at a company called VideoBlocks, as a software engineer. And what we do at VideoBlocks, is, we're essentially the Netflix of stock media. So, you can buy a monthly subscription and you can get access to [00:05:00] basically video clicks, stock video clips, or photos and things like that. So, yeah. That's what we do.
Jacob Bennett: And do you guys have a, primarily a PHP back end, is that what you're working in most days, as you work on Laravel stuff, or ...?
Mathias Hansen:: So, we have a PHP, our primary code face is PHP, and I'm not running as much Laravel day-to-day as I wish I did, but I'm sneaking Laravel in as much as I can along with the, another co-worker [00:05:30] who's also a Laravel developer. So we are, we're slowly having Laravel take over the internal code base, without nobody noticing that.
Jacob Bennett: Nice, yeah. I think I've used the service before, actually, VideoBlocks. The name sounds familiar and I think, I think we've used it before. Awesome.
So, one thing we kinda like to do on the show, is we like to hear about, it's always interesting to hear people's journey into how they got started with development. I would even be interested to hear kinda how you guys met as well, [00:06:00] if that was through code stuffs or where you were working, but whoever you, whichever of you wants to start I'd love to just hear about, kinda like your earliest memories with computers and how it was that you kinda got into development and/or product work.
Michele Hansen: I think you have some good stories of you as a child, computers.
Mathias Hansen:: Yeah. I got into computers pretty early on. Back at home my parents had a Windows 3.11 machine, which was really interesting. We got [inaudible 00:06:30] [00:06:30] stuff like that. One thing that [inaudible 00:06:32], a lot of my friends did video gaming, and I thought it was really intriguing, too, but I just really, really sucked, and I kept failing really hard at all the games we were playing [inaudible 00:06:45] and stuff. So I started playing around in setting up servers and stuff like that, I ended up with having a like server sitting in my closet at home until ... I think did my parents [inaudible 00:06:56] at some point because I was like just a grind service at home [00:07:00] without telling anybody or something.
Michele Hansen: Well, your dad got a mail for servers when you were 12 year-old, and you didn't have a chance to intercept it before he found it and he then promptly called up the company and said, "Do you realize that you have entered into a contract with a 12 year-old?" And that was the end of those servers.
Jacob Bennett: Oh, no. Men you could have been like a child millionaire if you had kept going on that train. Your poor father didn't realize what [00:07:30] he was doing.
Mathias Hansen:: No, I would probably lose a lot of money because I wasn't really making money off it, I was just paying monthly for that server without getting any feedback.
Jacob Bennett: That was when you were 12. So what's your trajectory then since that point or how did you get into doing software stuff.
Mathias Hansen:: Yeah, so I definitely started out with like [inaudible 00:07:49] back with Microsoft front page, back when that existed. [crosstalk 00:07:53] into PHP because I found you can do really interesting things there like tech walls and forums and all these really neat stuff [00:08:00] from the late 90s early 2000s. And then jumping between a lot of different languages, playing around with sp.net and also C++ and Laravel desktop back and stuff. But I'm pretty much back to square zero again and I have been working with PHP professionally since I graduated from college. And I usually use a lot of tools on a daily basis but I keep going back to PHP.
Jacob Bennett: Whatever gets the job done, I guess.
Mathias Hansen:: Yeah, I like the idea of [00:08:30] picking the right tools for the job. So it definitely depends on what you're building, for example, I work right now [inaudible 00:08:36] different technologies and the same thing with the side project, to be honest. Like we have [inaudible 00:08:41] talk a little bit about that during Laracon but there is a lot of tools involved to make the entire site run smoothly.
Michael Dyrynda: Very nice. And how about yourself Michele, you're not obviously a developer, so how did you [00:09:00] become a product person, I suppose?
Michele Hansen: Yeah, so I'm not a developer though I wonder if I was destined to do something related to it since both my parents are software engineers. And so it was something I was around quite a bit as a kid and I remember playing around with coding tutorials and what not. And I remember one of them said, congratulations, you've just turned you're $1,000 into a $10 calculator. And I said, "Well, this tutorial just insulted me, that's awesome."
So I moved down here [00:09:30] from Boston to ... I hoped to work in politics of some sort, whether that was in journalism, or as a political consultant. And at the time I was jumping into that while in school, social media was really just becoming a thing. And so there was an opportunity to get into that world through digital and social media, and so I became a digital consultant for a while. And I ended up taking on product as part of my job, and then eventually [00:10:00] transitioned into full time product role.
Jacob Bennett: So what's that look like? What's being a full-time product person like? Are you just the idea person, like you just come up with ideas and then you delegate that work to developers or what's your daily work load look like?
Michele Hansen: It's a combination of things. So user and market research is big part of it doing testing. So I work with a lot of different people on a daily basis, whether that's working with [00:10:30] our UX team to do research about the different jobs that people hire our investing products to do for them, we use the jobs to be done framework, which is just an absolutely fantastic framework that I recommend everyone look into.
So it's everything from doing that research to working with developers to scope out the details or the task and make sure they have all the pieces that they need to ... But a lot of it is, okay, what [00:11:00] are the needs of the market and how might we create something given our core IP, and commercialize that into a product.
It's a really fun job that requires a lot of different skills and working with a lot different people and I enjoy that.
Jacob Bennett: Interesting. I'm sort of transitioning myself into a lead developer job, and it's being a little bit weird for me because I've always kind of derived my value from the code that I'm able to produce. And I'm able to produce [00:11:30] less and less code because I have more people to manage. So it's an interesting new world for me. I'm not like a product person yet, but like that's sort of kind where it's going. As I'm the organization that I'm in, it's my job to go around the different departments and figure out how we can as a technical team solve some of the problems that they have may know about or that they may not have any clue about. Things that they're doing really inefficiently that we can do better.
So I've actually been looking at this blog post that you had out recently called six product [00:12:00] books I wish I had read sooner. And you mentioned the jobs to be done, book in there as well as some other ones that looked really, really interesting. The Power of Habit, Starting with Why, by Simon Sinek, if that's how you pronounce his name, he's got some really good stuff out there. But I've been excited to kind of read through this, is the one on top of your list, the jobs to be done stuff, is that kind of really where you are putting your focus these days?
Michele Hansen: Yeah. Jobs to be done has been a real breakthrough for me and for our team [00:12:30] in terms of getting a better way of structuring customer needs. There is that famous saying that, if Henry Ford had asked people what they wanted they would have said faster horses. I don't think that statement is true for a lot of reasons, but I think it is true that as consumers we find it difficult to articulate what our needs are. And jobs to be done, instead helps you determine what are the different tasks that people are trying to get done, what are different goals they have. And then it's up to you as a product person to determine, okay, they [00:13:00] have this job, what are the different tools that we have and how might we formulate that into a feature or product that serves that goals. That maybe isn't a feature that the user wouldn't necessarily not ask for on their own. And I think that's what makes it really exciting.
And so, the jobs-to-be-done book in that blog post is one. There is also another great book called, When kale and coffee compete, that is another great introduction to jobs to be done. [00:13:30] And there a ton of blog posts on to as well. But it's also helpful for structuring how a team talks about the value of a given product or a given feature to determine, well, this part of the product is doing a functional job, and we realize there are other emotional jobs that maybe need to be done, or a social job, and how do we make sure the product is wholistically serving the different jobs that someone does.
Jacob Bennett: Awesome. Yeah, those are really good questions to ask, and I'm hoping that your guy's talk will cover some of that stuff that's here at Laracon. [00:14:00] Yeah, that should be interesting. I know that the guys over at our base camp use that a lot too. I think Ryan Singer was there at Laracon was year, and kind of had talked about jobs to be done as well.
Michele Hansen: Yeah, I mean, they've been incredibly influential in my development as a product person. Or what is it what they have, getting things ... Not getting things done. There is one book that they wrote and there was one quote in it that said, any new feature have to stand on the porch in the rain for three days before it's let in. [00:14:30] Before you put development resources into something, you should really make sure that it's something the users want, and not to what you were saying earlier of just sort of the idea of someone who is coming up with ideas and then spewing that to developers, that's not a good product development process.
Michael Dyrynda: Yeah. This are all things that would be useful to me coming forward as well in my new role that I serve when I get back from the US at the beginning of August. It will be more like Jake and the lead developer thing. So it will [00:15:00] be nice to have that ... I think it's always kind of being done, not done for me, but there is always being people that have focused around that sort of requirements gathering and figuring out what people need and what the actual problem is to be solved.
I get the feeling with this position that that sort of work is going to start transitioning onto my shoulders. So I look forward to it, but as long as it doesn't take me away from code too much [crosstalk 00:15:24].
Michele Hansen: And there is another thing I didn't mention on there, but for someone who is transitioning [00:15:30] into product there is a book called Inspired, how to create products that customers love by Marty Cagan. There is another book that is really worth reading and it also introduces the framework of In order to be successful a product must be usable, it must be valuable, and it must be feasible. The sense of, it must be usable, the user needs to figure out how to use, and they maybe just be able to discover the difference thing they can do with it.
It must be valuable to them, it must solve a true problem that they [00:16:00] have, and then it must be technically feasible and possible for you to create.
Michael Dyrynda: Sound advice I think.
Jacob Bennett: Yeah, those are really cool. I've struggled with that in the past before, that idea of just like, oh, this is a shiny new idea, let's do this. And then you're halfway in and you realize nobody is going to know how to use this, like how are we going to tell the user that there is this new feature and it's like ten times more work to educate the user that the feature is even there. Then the value didn't even provide, [00:16:30] like it's really hard, you really have to think through those things before you even start the development process or else you get married to the idea, you fall in love with the idea, and then you're two weeks in and realize that it's worthless.
Michele Hansen: Oh, for sure. I think that's where the value of prototyping and just constantly testing your ides and often times the initial way you think a feature should look or what it should do, ends up being very different than we end up launching. And [00:17:00] sometimes you find that we haven't really discovered the product until we're very close to launch and then we end up launching something that's isn't quite all the way there. But it's really exciting when you put something out in front of people and you feel very good about the value you're delivering, and then it turns out that there is something slightly more that you can do that makes it ten times more valuable. And I think that's what really drives me in product is those rare moments when you realize that you have discovered the product and it's just [00:17:30] incredibly exciting.
Jacob Bennett: All right, cool. Very cool.
Michael Dyrynda: So Mathias, we haven't heard too much from you, but as this is a Laravel podcast, we thought that we would get a bit of an understanding of how was it that you came to use the Laravel framework, what sort of drew you to it, what encourages you to try and sneak it into your day job and things like that?
Mathias Hansen:: Yeah, so I started using Laravel just when Laravel four just came in beta [00:18:00] by the time I discovered Laravel. So I had maybe [inaudible 00:18:03] in the road where I had decide should I start a project with Laravel three or Laravel four, and there was huge differences. So it actually really cool because I started playing around with Laravel, was it late 2013, I think. And Laracon, the first Laracon ever was in DC, and I found out just after staying while we were there, I said, "Oh, my god, that would be awesome to [00:18:30] go." And I tried to go buy a ticket, but it was completely sold out. So I just added myself to a wait list, and I actually got an email from one of the organizers like a week beforehand saying, "Hey, I notice your local, someone couldn't go, like you want to take their ticket?" So I got to go last minute to the first Laracon ever with a badge for someone else's name it. But it was pretty great.
Jacob Bennett: So everybody got your name right that day probably.
Mathias Hansen:: Yeah, yeah, I was pretty easy to pronounce, I was like ... Yeah, whatever, [00:19:00] Jonathan [crosstalk 00:19:01].
Jacob Bennett: You were like a Scott or something or like Mike?
Michael Dyrynda: Something simple.
Mathias Hansen:: Yeah, so I pretty much being using Laravel ever since in different ways, of course, basically every single side project I ever worked on, or we ever worked has been Laravel-based because usually it's web apps.
Jacob Bennett: Yeah, I'd be interested to hear about a couple of those side projects. The one that [00:19:30] I've used before is Geocodio.io, and now, help me know this, is it geocodio or is it geocode, is it geocodio?
Michele Hansen: Yeah, that's [crosstalk 00:19:40] we had on the logo.
Jacob Bennett: Yeah, oh, got it. Got it, got it. Yeah, so that's how I always pronounced it. And I just was like, okay. And then Michael was like, which one is it? And I was like, I'm not sure. Okay, so geocodio. So what is that? Is that built on Laravel?
Mathias Hansen:: Yeah, it is. So highlight [00:20:00] what geocodio is, it's just a SaaS app, software as a service. We have an API, and what we do is you can covert street address into latitude and longitude, or the reverse. And basically people usually use this to, say you have a list of addresses and you want to put them in a map, or you want to do some calculations on what's close to each other and stuff, they use that API like ours to process that. So it started up as two [00:20:30] separate apps, one Laravel-based app for the dashboard, and website, and everything. They've had a separate app that actually used the slim-frame work just to power the API, so I have to separate that a part and make sure we had some room to scale without having to touch the dashboard and stuff.
But then Laravel Lumen came out and pretty quickly after Laravel Lumen came out we converted the API from slim to Laravel lumen. So now we [00:21:00] are completely Laravel-based.
Jacob Bennett: It looks like it got a really nice API as well, I was looking at the API docs here, so well done with that. And that's been out for a while. I know it's been out for at least a couple of years, right?
Michele Hansen: Yeah. At about three and a half years now.
Jacob Bennett: Okay. Awesome. And then you've recently launched another product on Spark. And I know you said, don't talk about it yet, it's not ready, but we're going to talk about it because it's on Spark and it looks so cool. Mike and I were both looking at this before the show, and we were like, oh, interesting, how does that work.
So [00:21:30] it's pixlebug.io, so everybody go ahead and we're going to do load testing on Mathias's new SaaS app, but why don't you tell a little about that, and that's build on Spark, I believe?
Mathias Hansen:: Yeah, that's right. Well, so basically, it started as more of a prototype and then I figured let's try to put it online. Basically, if try access it we'll try this out. So it's completely free, there is no pay wall or anything yet. But the idea [00:22:00] basically came from problems we faced during at my day job where sometimes we had regression issues with like the lay out of a web page, or like maybe we had a sign up page on the website, and suddenly a form filled was displayed differently or was cascading in weird way or had a wrong color or something because of style sheet changes that weren't tested correctly on this specific [00:22:30] page. So what pixlebug does is simply it takes screen shots off a website at a set interval. And then I've wrote this little thing that basically does a visual diff off the screen shots and it will let you know if anything has changed on the page. So that's basically how it works right now.
Michael Dyrynda: That's very interesting.
Jacob Bennett: The demo itself looks really cool. I mean, it makes it really clear in like a [00:23:00] ten second gif, exactly what it does. And looks really cool.
Mathias Hansen:: Nice, I'm glad you like it. So it's a basic to basic prototype right now. There's a lot of directions we can take this, and one of the things I'll probably will do in the future is add some kind of paid tier and add some more complicated features like being able to test a page when you're already logged in. Stuff like that.
Michael Dyrynda: I can see people finding it and using it for tracking product launches. When Apple [00:23:30] puts out a new iPhone or when Google changes their pricing or something like that. Just looking at the example that you got there in that animated gif on the homepage [crosstalk 00:23:39] that's a great idea.
Mathias Hansen:: Yeah. That was one of the other things I was thinking, oh, I was actually monitoring the Tesla website to see when they're any new information that's coming out on their website and [inaudible 00:23:50] that was one of my first test sites.
Jacob Bennett: Are you in the pre-order bucket for the one of the new Teslas?
Mathias Hansen:: Yeah, for the [inaudible 00:23:59], yeah.
Michael Dyrynda: [00:24:00] Very nice.
Jacob Bennett: Nice. That's awesome. One of my questions with this is, is it going to be able to test different like break points and different sizes. Will you be able to specify that?
Mathias Hansen:: That's a good idea. That's definitely something that could be the next step. As I said, it's like a basic proof of concept and there is so many ways I can take this. And I think the big problem we have right now is actually like just trying to narrow it down to scope because if you try to do too many things at once [00:24:30] I feel like it's going to be too confusing like learning page-wise, or like displaying it to everybody like ... You can even use it to monitoring prices on computers on websites, or like really crazy things like that. But we need to speak out what is the core idea here. So that's something we got to talk about in the talk at Laracon is figuring out what do people actually want versus what you're building and things like that. So TDB.
Jacob Bennett: All right, sounds like you've [00:25:00] got somebody who is giving you good advice on that, I don't know, like product person in your family. Do you charge him Michele? Do you have like hourly rates for consulting for your husband?
Michele Hansen: You'll surprised the number of times we're just having breakfast or having dinner and all over sudden we're having a business conversation. I do products and he's a developer and you put us together we can't help create things or turn our living into [00:25:30] wire framing and tapping things up on the wall and working through all the complications of things. I think it's just starting and running businesses is what we find fun.
Mathias Hansen:: We will want a whiteboard at home, but we're a little afraid of that, it's going to take our hand.
Michele Hansen: We might need whiteboard walls.
Mathias Hansen:: Yeah, that might be our next step.
Jacob Bennett: Yeah, we've intentionally not put a television in our master bedroom because I'm afraid all I would do is watch [00:26:00] TV, you know what I'm saying? We would never talk at nighttime because when our kids have gone to sleep and taking an hour and a half to go to sleep, that's like the only to talk during the day. But it's funny like we don't put a TV around and you guys don't put a whiteboard around because you're afraid that all you're going to do is brainstorm idea all the time, that's really funny.
Mathias Hansen:: But we don't have a TV around either.
Jacob Bennett: And then all over sudden she's like, you're fired, and you're like, no, you're fired. That's how your arguments end. Nice. You forget if you're at home or at work, right?
Michele Hansen: Then there were times our dinner conversation turns into [00:26:30] talk about one of the products we've created together. We have a daughter who is three years old, and we said to ourselves, either she's going to run a business herself or she's going to completely rebel and like not want nothing to do with business because it's three quarters of the time what we're talking about at home.
Jacob Bennett: That's so funny
Michael Dyrynda: Amazing. Just before we do let you both go, you are in Washington, I'll be visiting Washington very briefly when I'm on my Laracon [00:27:00] tour. Are you still running the DC Laravel meet up, is that's something that's ongoing or?
Mathias Hansen:: Yes, so I'm actually no longer a part of it. The big [inaudible 00:27:13] was actually I moved jobs and now I work quite a bit outside DC, so logistics-wise it was kind of difficult to hope to meet [inaudible 00:27:22] to meet up in the first place. But it's still going strong as far as I'm aware. And actually, our office just happened [00:27:30] to be moving to maybe closer to DC in just three weeks. So I'm really excited to go back and actually be able to attend the meet-ups again, so it's happening soon. But we should definitely check when you are getting here and see if we can do something, that would be awesome. Especially [crosstalk 00:27:47] meet-up the same time.
Michael Dyrynda: Yeah, we'll have to do that. I'll have to keep an eye out and see if there is a meet-up on while I'm there and try to make it if I can, and if I'm not, I'm not sure I'll see lots of those people [00:28:00] in New York.
Michele Hansen: And I know a bunch of the developers at the fool are really excited about using Laravel, but are still on the wait list. I hear there is 1,000 people on the wait list?
Mathias Hansen:: Yeah.
Michael Dyrynda: Yeah, it's pretty crazy.
Jacob Bennett: Yeah, it's insane.
Michele Hansen: Maybe we can have one at the fool?
Michael Dyrynda: Yeah. I think the plan is to find maybe a bigger venue next year.
Jacob Bennett: I think so.
Michael Dyrynda: I mean, I think New York is a huge selling point because it's New York and that's part of the reason that I got to come back again was because it was New York. My wife went, you're okay, but [00:28:30] as long as you take me with you, so ... As long as the city is interesting and the venue, like it's getting crazy, and then this talk of maybe doing a multi-track conference, which I'm personally not terribly crazy about. I don't want to miss out on any of the talks, I think last year, and I'm sure Jake you've been able to speak to previous years, all of the talks have been really good. The only reason you'd miss one is if you had to step out to the bathroom for whatever reason.
Jacob Bennett: Yap, yap, true story for sure. Well, thank you guys for [00:29:00] coming on, we really appreciate you taking a little bit of time out to talk to us. And super excited to hang out with you again in New York this year.
Mathias Hansen:: Yeah, same here.
Michele Hansen: Yeah. Thank you, looking forward to it.
Michael Dyrynda: Yeah, thank you very much, looking forward to those talks
Jacob Bennett: All right guys, yeah, absolutely for sure. All right guys, we'll talk soon, thanks very much.
Mathias Hansen:: Thank you.
Michele Hansen: Thank you.
Jacob Bennett: All right. Bye.
Well, that went well, and now we have a couple of pieces of news to share with you, a couple of code changes, and a couple of new websites that are out in the community.
[00:29:30] So let's start with the big news, Michael you want to tell us what's going on with Laracon US livestream?
Michael Dyrynda: Yes in deed. As we know that Laracon US for this year is completely and utterly and totally sold out. And whilst there are a few tickets-
Jacob Bennett: Totally sold out.
Michael Dyrynda: Totally. And once they're a few tickets popping up now and then. If you're wanting to see the conference I think your best bet at this point will be to grab yourself a livestream [00:30:00] ticket. So once again this year, Taylor and Laracon US have partnered with streamAcon and they will be offering live streaming and early access to recorded videos for US $29.99. So that will give you the live stream of the event, and we have been assured that they will be a hardwired connection with a good quality internet service. So they will be no hiccups on the first day like we [00:30:30] had last year, which is terrific news for those of you following along at home.
Jacob Bennett: And really that's a pretty crazy good deal, 29.99 for live streaming, that's really good.
Michael Dyrynda: That's a crazy good deal.
Jacob Bennett: That's nice, I think-
Michael Dyrynda: It also the best your hands on the video archives, it would be the quickest way, I believe that attendees of the conference will get access to those videos but that would be later on.
Jacob Bennett: Yeah, so I think they do that intentionally. It's like the same way they priced Laracon online those last ... Or I [00:31:00] guess it was this year at $10. I think they do it just to kind of make it accessible to people who might not be able to afford coming to the conference or who might not have their jobs sponsoring them to come. So 29.99 is a great deal. Thanks to Taylor and those involved for setting up that pretty reasonable price point.
All right, so 5.4.28 released this week, and we have got some cool stuff in there. So the first one we're going to talk about is array random, our [00:31:30] very own Caleb [inaudible 00:31:31] has been crowned the helper king, I think, by Daniel [inaudible 00:31:36] of 20% times. So he somehow manages to get this helper functions pulled in, so array random is one of those. And I think his trick is somehow finds a spot where it can be used in the core of the framework and then kind of says, oh, well, we can also this outsider of that spot, and I'll just make this nice little helper function. So array random is a [00:32:00] good one.
So what you can do is you can pass it in array and then you can just say, hi, array random, and then it will grab one of the keys out, or actually one of the values out of that array. Array random like the PHP native one, or array rand I think, just grabs up an index of the array that you're passing, and then you have to pass in, you're have to say, grab me that value out of that array.
so this is just a faster way to do that. You can also specify a multiple, you can say like, give me three [00:32:30] random array values, and it will do that as well.
So that is Laravel news in the changed log there or on GitHub you can check the changed log on that and see the pull request back and forth on that.
There is also a couple of things going on with the collection class, Michael can you inform us about that.
Michael Dyrynda: Yes. So a little while ago there was a collection method added called when. So basically it was a two parameter function that would take a Boolean resolving value in the first [00:33:00] argument, and then if that evaluated to true, it would use the second callback function parameter to perform some extra operation on that collection. So what we've got here now is an [inaudible 00:33:13] method, which is the exact opposite. So instead of passing when not [inaudible 00:33:20], you can now just say unless [inaudible 00:33:22], and it will handle that in a nice more readable fashion for you.
Jacob Bennett: And I have used multiple times recently, and [00:33:30] actually have been very frustrated when I'm stuck in an older version. Like I was working on a code base that was 5.1 the other day, and it was like, oh, men, that looks so much cleaner. I think we ended up writing it in the new way just to see what it looked like and then had to go back to the [crosstalk 00:33:46] it was painful but this will be helpful.
There is also a fresh method now on eloquent collections. So if you have a collection of models, the fresh method [00:34:00] will go through an update, all of those models from the database. So we'll go grab the most recent version of those models from the database. So this is something this fresh was pulled in a couple of weeks ago, and now it's on the eloquent collections, so it's great.
We also have related to that in model factories, this was something that there was a pull request out there this week that did not get pulled in, but I thought it was worth noting. So by default when you use model factories in your [00:34:30] test, you have all the attributes that you've defined on that model, and when you call a factory, and then passing the name of the model that you want to get a factory of, and then call create, what it will do is it will only return to you those attribute that you specifically defined in your model factory.
And so the pull request was basically saying, well, there is these values that my database populates on that model, and I want those as well, so for instance, maybe you have created at, or updated at, or maybe you have some other things that [00:35:00] are going on behind the scenes that are happening and they don't by default get pulled back from the database when you call create. And so the suggestion was to grab those as well. And it ended up being rejected by Taylor, but the way that you can get those values is to call fresh on that after you call the create method.
So if you say factory, your class name create, and then fresh that will actually pull back those values from database as well. Those values have been pre-populated [00:35:30] or however you want to say that, [inaudible 00:35:33] I don't know how you would call it. They're hooks in the database, I think. So that's just a little helpful there.
Yeah, maybe you can tell us about this default return stuff as well.
Michael Dyrynda: Yeah, I brought in as part of this pull request or sorry, this version is the ability to specify default on your belongs to relationship. So basically, what this allows you do [00:36:00] is it sets in default values on your belongs to relationship.
Jacob Bennett: Yeah, there is also been this default return on a belongs to relationship pulled in. And so I kind of read some of the back and forth on this, and what this allows you to do is [inaudible 00:36:16] belongs to a relationship, so maybe a user has posts or post has user, let's go with that, post has user. And what you could do is in that relationship ... So in your posts class you might have a user method [00:36:30] and it would be belongs to user [inaudible 00:36:34] class, and then you can say, with, and then you can pass in either an array or you can pass in a closure. And those values you provide there would be returned by default, if there is no user relationship that is found in the database for that particular post that you're pulling.
And so this might be useful for a couple of different reasons, maybe you have like an admin user in this specific case if there is no user [00:37:00] specified for the post you want to return the admin user, and so you can specify the user id or just the user name and the email or something like that. This will also allow you to return a suppose no object in case you ever got called out by that. So if you would call post user and then there is nothing there, and then you try and call name on that user without having to do a insert check or is there a user check, you can just always know that name [00:37:30] is going to be there because you've passed a default for it.
So there is a couple of instances where it could be helpful, and I'm sure there will be pretty more that the community will discover. But I thought that was interesting and pretty cool.
Michael Dyrynda: Very nice. Nice save on that as well.
Jacob Bennett: Yeah, no problem. All right, what else we've got? We've talked about [inaudible 00:37:50] for the show about this, the yield directive and the second argument being passed in there, maybe you could fill us in on that one.
Michael Dyrynda: Yes. So when you have a [00:38:00] yield section in your template, usually in a top level layout view, you can yield and then pass a default value in there. So say you were listing some content, and if no content was available or no content was passed to the view, you could set a default value. So previously that value was not escaped as part of this pull request. It is however this is a [00:38:30] breaking change in that, it now breaks, if you're passing in a view for example as that second parameter, it would then escape the view and close you some issues. So there is a work around for it, and that is to basically change your yield statement to generate a [inaudible 00:38:48] string of that view. So the change will be in the show notes for you to have a look at, but basically, as the second argument instead of passing in view [00:39:00] parenthesis, name of the view, you could pass in a new illuminate support [inaudible 00:39:05] string, and then pass that view function call into that as the constructor.
Jacob Bennett: Yeah, and really that seems like a kind of odd use case to me, so I find the most common uses I have of this are when I just need to pass something real simple. So maybe I have a layout class, and I have kind of a hero image across the top, and for the homepage I need it to really tall. But for all the other pages I just need it be like a little bit smaller. [00:39:30] And so a lot of times what I'll do is I will make it that smaller version, my layout file will be that smaller header version of it. But the one that needs to be hero, I want like a class of hero on it.
And so what I'll do is I'll have a pass through as my second argument there, the class name of that header that I want to set. So It'll just through class name equals hero, or something like that. But what some people are doing that were complaining about this being a breaking change is, they're actually passing [00:40:00] through the HTML of a view into their yield statement, which seems again a little bit not what it was made to be used for. You know what I'm saying?
Michael Dyrynda: Yeah.
Jacob Bennett: So it could affect you if you're passing through raw HTML that you want to be displayed, but I think this is the correct decision. I don't know whether it's a great assumption to assume that everything that gets passed through there is properly escaped. So the Laravel is just going to escape it for you and make sure that they protect you a little bit [00:40:30] from echoing it out some dangerous HTML.
Michael Dyrynda: Yeah. I think long term, it's the right idea. I don't know how common the practice it is, but I'm sure we'll find out in the coming weeks, how much of a breaking change that is in particular.
Jacob Bennett: Yeah, and this is the same sort of thing that happened when they changed it so that blade templates are by default escaped content instead of rendered it. So that it used to be that double braces would let you put anything in there. So if you put any HTML, [00:41:00] anything, it would just render it totally fine. And then they changed it so double braces was escaped content, so that it do exactly what's happening here. And instead so now what you have to do is you have to put the brace exclamation point, exclamation point, and then that would allow you to pass it in like HTML that can be send straight to the page.
But there was a little bit of an outcry about but everybody got used to it and was [inaudible 00:41:23] fine. I assume that this is going to be a much less or a much smaller portion of the community that will be affected by this but worth noting in any case.
Michael Dyrynda: [00:41:30] Definitely.
Jacob Bennett: The other thing that we wanted to talk about that's kind of code related ... Well, why don't we talk about DD and collections real quick for five-five. So this is something that's super helpful. If you work with collections a lot, which it seems like the community at large does a lot more ever since Adam's re-factoring collections book. There will a lot of times where you're just kind of working with your collection and you're trying to figure out where exactly you're at in your collection pipeline and you just need to see a view [00:42:00] of your collection pipeline at certain points. Well, one helper that's being out there for a while that Frank has in his big collections package is damp or DD on a collection.
So you can just pipe to DD or dump and it will dump out the contents of the collection at that point. So Taylor is actually making the decision to pull that into five-five core, so that you don't have to have a macro to make that happen. [00:42:30] So I think that's pretty great because that's something I find myself needing to do on a really regular basis. And it will be nice not having to comment on the rest of my pipeline into the DD around the whole thing, which I have to all the time. So that will be good.
Michael Dyrynda: Yeah. Definitely helpful.
Jacob Bennett: Yeah. One other thing just as a public service announcement I wanted to note here, on Twitter this week I found out painfully that using Carbon if you use sub month or add [00:43:00] month, there is sort of a bug in there. To the credit of the Carbon package creator, this is actually something that he's mirroring in PHP core. This happens in PHP as well, and so he's just kind of mirroring the implementation that they have there, that was his reasoning.
But what will happen is, if you are at the end of a month, so we were at the 30th of the month ... I think the 31st of the month. And what we were doing is we were going to sub-month. So give me the previous month, if that previous [00:43:30] month has less days than the month that you're on and the current day that you're on, it will not subtract a month. What it will do instead, is it will go to the beginning of the month. So give me for an example, let's say you're in March 29th, if you're in March 29th and you needed to Carbon now, and then said sub month instead of going to February 29th because there isn't one, it would go to March 1st. Which can cause some really unexpected behavior if you were iterating over some Carbon stuff and then [00:44:00] storing those months for reports of something like that. You'd find that depending on the day of the month that you are on. If you are near the end of the month, February gets skipped [inaudible 00:44:10] would have no February month for your reportings.
And it does the same thing going forward to, so if you were in January and you were on the 29th, and you just said add month, it would not go to February 29th again because there isn't one, but I think it just goes to the end of the month like in January.
Michael Dyrynda: Unless there is a leap year?
Jacob Bennett: [00:44:30] Yeah, exactly. So though the fix for this is there is a method called sub month no overflow, or add month no overflow. And it does exactly what you would think it normally would do, but it isn't the default implementation. So again, if you're in March 29th and you say sub month no overflow, it will take you to February 28th, perfect, no problem. The other way around that is to say, Carbon now start of month and then sub month because it will always work. Sub month and add month will always work if you're on [00:45:00] the 1st of the month. It only happens when you're towards the end that it causes problems. But sometimes the day matters, the day that you're on actually matters. So in those cases you need to be able to do sub month without having to worry it's going to break.
So I hate to say, go on and swap all your sub month and [inaudible 00:45:14] or sub month no overflow, the other option is to pull request something to Carbon.
Michael Dyrynda: Yeah, I believe there is also a method you can call on Carbon itself to basically make the no overflow, the default [00:45:30] behavior. We can look that up in the show notes, and we'll find it. But it's interesting that this came up because I was talking with some of my colleagues about it, and this is a problem that I first encountered probably about nine years ago. And it's the same thing in MySQL, where if you're using date intervals and you add one month, the same thing will happen.
And so when you're doing for example, re-current billing, [00:46:00] anyone that signed up, or had their first billing on the 31st of the month, would eventually have their billing on the 30th of the month, would eventually have it on the 29th of the month, would eventually have it on the 28th of the month because that's where you normalize all of your months. Every single month always has 28 days. So the 28th is always the most active billing day on our recurring calendar. I mean, it's just a computer thing like if you add one month it's generally [00:46:30] day to day, and if the day doesn't exist in the next month then, yeah, that happens. Obviously, Carbon has functionality to avoid that issue but it's certainly good public service announcement, nonetheless.
Jacob Bennett: We've got a couple off websites that came out in the community this last week, maybe you want to tell us about those.
Michael Dyrynda: Yeah, so I think first and foremost, we'll talk about Laravel.io. So Laravel.io I guess was the kind of the defacto community [00:47:00] forum for the Laravel community before Laracast sort of came around and really took the ... I got to stop saying community, took the community by storm. So Laravel.io was originally started by I think Sean McCall and one or two other folks. It was subsequently taken over ... Or the management of it was taken over by Dries Vints. So this is being a project that's being on the go [00:47:30] for a year or two now, and it's now in production. So congratulation to Dries and all the contributors of Laravel.io and getting the new version up and running, and it looks pretty slick.
Jacob Bennett: Yeah, it does. And the other thing is that it's entirely open-source, so if you're ever looking for a good fully featured project to look at as reference, this is open-source and you can contribute to it and obviously it's built on Laravel. There is being some cool things that I have seen in there just kind of browsing [00:48:00] through. I think we might have talked about it on the show before, but they have other route model bindings in a bidding class in their routes folder. And they're just auto loading those in that routes service provider.
So yeah, just little things here and there, it's cool to see different people structure their applications and like I said, good just for reference if nothing else. And opened a pull request as well, so that's cool.
Michael Dyrynda: Yeah.
Jacob Bennett: There is also a website out there called tweet snippet, I need to look up who [00:48:30] made this now.
Michael Dyrynda: Yeah, so do you want to try and pronounce his name?
Jacob Bennett: No, I do not, I'd rather you do that. Yeah, go ahead.
Michael Dyrynda: Yeah, it's got some character in it.
Jacob Bennett: It's got an O with a slash to it, is it Casper [Sorensen 00:48:46]?
Michael Dyrynda: I believe it's [Sorensen 00:48:48], yeah.
I see he's added a retweet button as well, actually, which is kind of cool. So you can retweet it straight from here. So it's just a nice little aggregate site of all this little quick tips that have popped up recently, and it's helpful for sure.
Michael Dyrynda: Yeah, it definitely the easiest way to keep track of them all. I mean, he said on our other show that you're using the Twitter moments to capture them and keep track of them.
Jacob Bennett: I find this to be easier though.
Michael Dyrynda: Yeah, much easier, it's [00:50:00] like it's focused on what this is all about, it makes it easy to look at things based on whether PHP or Laravel or view as you said. And it's presented really nicely as well.
Jacob Bennett: It is. Yeah, the design is really good, so definitely check that out and thank you very much Casper for putting that together, hopefully, he is kind of able to keep up with that. I'm sure he would ... I'm don't know if he'll be open to help or not if he wasn't able to keep up with it, but maybe in the future as these become more popular and [00:50:30] have more people in the community doing them. So, we'll see anyway. Great job Casper.
Michael Dyrynda: Yeah, definitely.
Jacob Bennett: All right, well, I think that about wraps it up for today's show. This is episode-
Michael Dyrynda: 41.
Jacob Bennett: Episode 41. So if you liked this episode you can find show notes for it at Laravel/news.com/podcast/41 Also if you liked the show, please feel free to rate it up in iTunes or your podcast of choice, five star is very much appreciated. [00:51:00] What else? Who do we have next week? Who are we having on next week for our interview?
Michael Dyrynda: Next episode, you and I when you come to Chicago please we need to do this face-to-face and don't know. We'll do something special because we'll be face-to-face.
Jacob Bennett: That's right, we'll [crosstalk 00:51:20] hotdog together.
Michael Dyrynda: Yes.
Jacob Bennett: I mean, we won't be eating a hotdog together, we're going to be sharing a hotdog. No, [00:51:30] not doing that. Although with the Italian beef, I mean, if it was the only Italian beef, I would be tempted because their Italian beef is pretty damn good. I'll go with the hotdog anyway.
Michael Dyrynda: I'm looking forward to it. I'm really am.
Jacob Bennett: Yeah, so it should be fun.
Michael Dyrynda: But yes the next time we speak on this show we will be at least in the same time-zone. Which will be the easiest show that we have ever recorded I imagine.
Jacob Bennett: Yap, yap. And are we doing a super show, are we doing a big thing?
Michael Dyrynda: I think that might be the one. Like [00:52:00] we'll have to try and organize it somehow.
Jacob Bennett: Okay, yeah we're going to try and get all the folks on, all the big dogs, see if we can get them all together for a show. So we'll see if we can pull it off or not. We will see.
Michael Dyrynda: Absolutely.
Jacob Bennett: All right. Well, thanks everyone so much for listening, we will talk to you in two weeks.
Michael Dyrynda: Peace out.
Jacob Bennett: Did you need to do you're foreign goodbye?
Michael Dyrynda: No, I didn't, oh. Yeah, I could actually, Denmark, Denmark. And [00:52:30] because Michele is from America but her husband Mathias is from Denmark farvel.
Jacob Bennett: Very nice. You always do so much better than I do. I'll just have to cheat and use the Google translate and let it talk to me, and hear it, and then I can just imitate it. So nicely done.
Michael Dyrynda: See yah.
Jacob Bennett: All right, see you guys.