php[architect] logo

Want to check out an issue? Sign up to receive a special offer.

Machine Learning, OpenAPI, and the Business of PHP

This month, we chat with Sherri Wheeler about the Business of PHP and other topics from the April 2020 magazine.

Topics

  • Getting started using machine learning with PHP.
  • API design and how the OpenAPI can automate and improve your architecture.
  • Writing command line scripts with Symfony’s Console components.
  • PHP communities that don’t realize it and the business case for PHP 7
  • What makes up a web request

Listen

Transcript

This transcript is machine generated and while we’ve reviewed it for accuracy, there are some parts which may not match the audio. If you do see an error, let us know via contact@phparch.com.

[00:00:00] Welcome to the official podcast of PHP Architect. Join us to listen to the latest news and tech talk from our conferences, the magazine and wider PHP community.

[00:00:14] EVJ: As the lady said, we are the official podcast of the PHP Architect magazine. Hi there, my name’s Eric and I’m your host. This is Episode 31 for April 2020. Volume 19. Issue for machine learning and OpenAPI With me is my good friend John Congdon.

[00:00:34] JC: It’s so much fun to listen to. You open the show because it changes every time and I get so confused

[00:00:39] EVJ: everything. I tried new things. I like to experiment little bit and embrace. Embrace my role here as a as a host, also with us. The editor in chief himself. Oscar. Hello? Hello. Hey. Oh, are we all holding up? How’s everybody holding up, Oscar? I’m holding it and I know we’re not a video podcast, but for those who know, you would be very impressed with the with the facial hair we got going on. You look good. Thank you. Go a little Clooney Thing going on there just too lazy to shave. There’s no reason. I just feel like the last 10 years about you. How you holding up, John?

[00:01:17] JC: Doing just fine. That not a whole exchange working from home kids there home a lot more. So it’s harder on my wife right now, but it is nice getting to spend more time with him and the boys air growing Thio closer together because they’re just around each other. So much more

[00:01:31] EVJ: cool. Yes, yes, hopefully everybody out there listening air doing safe and they’re staying safe. That’s the most important thing. I don’t need to get too much into to all that. I think we all know the world we live in right now. We’re not here for that. We’re here to discuss machine learning. Open APIs in PHP.

[00:01:52] JC: I like it.

[00:01:53] EVJ: I have to tell you, I was very excited to see the machine learning title on this magazine. I have long been one of these people who said machine learning is probably one of the fields I would never use. PHP and I have looked into machine learning, and I have looked into it with other languages. And as I shared with John last night and reading through this article after reading the article on machine learning, which will will get to hear momentarily. I was all of sudden, very excited to try machine learning and teach feet.

[00:02:33] OM: Well, cool, then. My job is done there. Yeah. Liam does a great job with that.

[00:02:37] EVJ: Yeah, she should be just getting jumped right into that one.

[00:02:40] OM: Let’s do it.

[00:02:40] EVJ: Liam. Wiltshire has hands on machine learning with PHP P. And the most exciting thing about this title is that it’s only part one.

[00:02:51] OM: Yeah, when he started sending me the draft, it was I think it came in over 6000 words. So I was pretty quick. They’re like, All right, we’re gonna have to break this up somewhere in the middle way. Found a good spot that makes sense to do so.

[00:03:03] JC: Oh, definitely looking force. Because it was exciting reading through it. Sure.

[00:03:07] EVJ: Yeah. There’s always this this ongoing joke in the development world that machine learning is just a bunch of f l statements, and I I Yeah, there there moments where you think? Yeah, that that seems about right. But he actually highlights a package in here. Composer installed package for a machine learning in PHP and shows you some code on how you train it and how you use it. And Mary got me excited. It’s like, Wow, this this seems very approachable and applicable for some projects. I work on it. It not only his code, but m describe describing how to break down data in how that instinct about Nina Great. How to think about data. Ah, really came. Have you just step back and say, Okay, yeah, I can see where the this con’s start to be applied.

[00:04:06] JC: It’s also thinking about data that you may not have as well that you should have. And we talked about it before with events or the beauty of events are saying is you don’t lose data, you have it for the future. Even if you don’t know you need it. So start just capturing every single event in your system, storing it later on. When you want to do something like this, you have that kind of information to start, you know, gleaning information from the data. You have to go and in hand very well.

[00:04:34] EVJ: Yeah, I agree, John, but that that was the first thing I thought of when reading this air. The moment he mentioned the fact that you might have not have the data you need. I immediately snapped to the holy event sourcing conversations and articles we’ve talked about in the past and say That’s the argument right there. That’s why you do event sourcing Because you realize, you know, a year later that oh, we want to see yeah, these certain scenarios and we never We haven’t captured that anywhere in the database. You could actually go back plate, replay your events, capture that data and feed it into some machine learning.

[00:05:11] JC: Years ago when I was doing e commerce and the entire system phone bill, you know, I didn’t use any sort of ecommerce packet. So guilty of just losing data such you’re when you’re building a cart. I built it all within the GHB session. If you didn’t finish the purchase, all that was gone. The session got garbage collected and just no information about carts that were started. What? People were interested in none of that data

[00:05:36] OM: base. Um, yeah, a good application, uh, figuring out which look best shopping carts near completion reach out. The folks who couldn’t completed or suggest ah, other products they might be interested in That’s a thing. A pretty classic, uh, machine learning application nowadays to be interesting to implement it on PHP Architect.

[00:05:57] EVJ: Yes, I’m sure you could find a use for machine learning with PHP architect.

[00:06:02] JC: Yeah, he points out. He talks about using analytics packages in this article and some of the pitfalls.

[00:06:08] OM: The pitfalls along, like a privacy and GDP, that kind of stuff.

[00:06:12] JC: Well, there’s that as well. But if you’re not collecting the data, either through events, sourcing or within your database, and you’re relying on some of those pieces being like in Google analytics, it’s hard to access that data to do machine learning later on. Right? So it’s more about how you’re storing data where you’re still have access to what you need to feed the family that

[00:06:34] EVJ: But we’ve had discussions about this in the past with machine learning as well, and he touches on it in his article of building bias in your ah learning you’re teaching of of ah, of the engine. So if if your data has bias and that’s what you’re feeding into the the engine, the engine becomes biased and we’ve ah, that that is when that concept was first presented to me. It kind of blew my mind. It’s like, Wow, you’ve got to really think through this stuff. So I was happy to see that he touches on that as well.

[00:07:18] JC: I think the a lot of the being destructive information that comes up in the news is because there are places you can get data to analyze. But you don’t know the source of that. They’re so you. If you’re not thinking about is there data bias? You feed it into some machine learning algorithm, and now you’re you’re biasing your decision making off of data you don’t have control over.

[00:07:41] EVJ: It’s not always the intentional action. He actually uses a good example here of, you know, if you were to feed if you’re looking for, like, a CTO and you fed your machine learning system, all the information about successful CTO is right now. You would end up in a very ah bias state of certain people who are who have historically become CEOs and probably start to exclude you’re underrepresented groups. So if if you are to create an engine to make a decision of who to check for a CTO and you took historical data of existing CTO is because the nature of the business in what has historically been done you would create a bias engine that would continue that that bias selection process

[00:08:39] JC: all depending on which data a great

[00:08:41] EVJ: that was. His point is, you you have to be careful about that sort of stuff. Historical data could sometimes be bias because the nature of the data.

[00:08:52] JC: yeah, so it’s a fun read and it will be interesting, especially like, he said, we have some clients. Some of this sect of information being able to dig into will be interested

[00:09:00] OM: If I recall correctly, Part two goes into more algorithms to step that. That’s what you have to look forward to. May

[00:09:08] EVJ: cool air. There are only two parts. Do you think there’ll be more?

[00:09:12] OM: There’s only two parts at the moment, but I could probably bug him to write more if it’s if he’s got more content. Not

[00:09:19] JC: not bug Request

[00:09:22] OM: pressure. No, no, definitely not pressure.

[00:09:24] JC: You never bug.

[00:09:25] OM: I actually just bugged. Probably like 30 odd people for content for the about the next 6 to 8 months, and there’s one of them is. I think the metrics project metrics talk. You wanted to go to a tech, He’s going to turn it into an article. Oh, nice. Terry Morgan is That was the presenter. So Yeah, she’s

[00:09:46] JC: man, I’m so bummed about tech while we’re talking about that.

[00:09:50] OM: Yeah. I mean, the current situation has bummed a lot of things and we’ll see where we are the end of the

[00:09:56] JC: day. It’ll be interesting world later on this year to hoping that things turn around the news isn’t making it sound so happy right now.

[00:10:04] OM: No. And I don’t know how many people will want to go. Ah, meet in person at a conference six months from now either If things aren’t, uh, handled.

[00:10:13] JC: Yeah. All right, let’s move on. Be bummed out now I’m gonna go cry in a corner while you’re keeping an episode.

[00:10:19] EVJ: Where to get conned in? Open up Your life opened up your heart. Open up your APIs. OpenAPI-more than just code for Matt Trask. Like that. Same way the specimen. Dude. Man open E p I. If you don’t know it, you’ve probably do if you do API development. You’ve probably used it and you don’t realize it. My understanding of it is OpenAPI is the e evolution of swagger. It used to be Swagger now is OpenAPI. So if you’ve used swagger in the past and if you’re a P I developer, you’ve probably used swagger or something like it you are familiar with OpenAPI What is open? Maybe, Iet’s just a framework for API documentation, which is, you know, documentation. We know we all love to dio

[00:11:11] OM: I like this sort of upfront documentation that, uh I mean, they call it a specifications. And if I remember the Wild West days of when APIs were starting to become a thing and then a row was figuring out best fracked citizen how to build stuff, and I think this boils it down and gives you a good framework for what you have to think about when you’re, uh think writing your end points and what kind of data they’re gonna take in and what kind of responses your API is gonna give out, um, and it kind of makes it less of a wild West exercise where you can just do whatever. But hopefully you’re following the practices that make your API easy to use and scalable and all that good

[00:11:51] JC: stuff. Yeah,

[00:11:52] EVJ: That’s exactly how mad presents it is that this is actually something you do before the development practice. You get the friend and developers together, you get the backing developers together, perhaps even get the business owners together. Are the project on her together and say, OK, let’s walk through this that sketch this out so we can all be on the same page. We’re gonna create this OpenAPI documentation, and we can all build to the same in points now. And there’s a There should be no surprises

[00:12:24] JC: and just a be clear just because the name is OpenAPI doesn’t mean you necessarily are Opening your API to others could be just a private specifications. Your front end and you’re back. And you said great to have it predefined so that frontend developers can actually get a mock response back and may not be done. And back and developer know what they’re striving to relief effort. Fine. And be done completely separately.

[00:12:48] OM: There’s two things that I I was wondering about open FBI and I want to play around with is if you can use it to document an existing one. It’s great for a design framework, a swell, but I have, ah, FBI for my computer architect products and stuff that is kind of not even very rusty. I’d love to know if I can use this as a way to document it and then kind of identify places where I could improve the API or break pieces off.

[00:13:15] EVJ: so there are tools for that. We use postman, and postman allows you to put your APIs in there. I mean way. Just toss APIs in there. Then if you want to, you can generate the A OpenAPI documentation for those in Queens, though for their tools. For that, it would even go. It’ll even go as far as allow you to publish them to the public. So I mean, typically, we don’t publish our API in place because we don’t have publicly accessible in points, but it even has that feature in there as well.

[00:13:48] OM: But you could then generate documentation for it from that, even if it’s just for internal

[00:13:54] EVJ: well, So here’s the thing about them and John Feel free to jump in here from wrong. I think the thought process behind, like postman, is that your internal documentation is postman. So anybody you want to share theirs in points with you share through postman, you only you only create. Generate the actual documentation when you want to publish it from other people. Okay, I kind of have a problem with. But that’s at least with postman. That’s how it appears the thought process appears to be.

[00:14:27] JC: No, I mean, you could still generate the documentation for internal so your internal developers can go Look at that Vs Postman and Post made itself. I don’t know how this started the whole post me This has matured so much over the years that it does the mock aspect you can hit that. Like you said, generate the specifications, the whole sharing between your team. So you share out collections that you’re collaborations really become a great product.

[00:14:53] OM: We have this a difference. Post pants of product opening the eye. There’s a lot of tooling some of it, which it sounds like our products like it or like me and my tools and things you can run locally and just keep it all internally. The other part I’d love to play around with is he mentions Lorna Jane Mitchell has an article where, ah, she should’ve Seiken taken OpenAPI file. And then there’s some tooling that automatically generates a PHP client for the FBI, which sounds like you’d be a great time saver but also a good motivation for having a good, robust, open A P. I

[00:15:29] JC: suspect. I think there’s also I mean, there’s other tools around it as well, not just for PHP, but probably for yeah, you’re that Nets, Java, Klein start to share your client

[00:15:39] OM: or generate mocks and mock servers. He mentions that stuff to all good stuff and all these tools. I know, like, kind of like test driven development. It feels like it’s a lot of extra work, but I find time and again that they save you work down the road, so you have to invest a little bit in learning the spec. How to write it, what kind of things to put in it. But then all that tooling can automate some of the manual labor, essentially in the repetitive tasks that you need to do when you add new endpoints, every factor stuff or update your client. And I think that’s where these things really shine.

[00:16:13] EVJ: Well, that just the ultimate fact of having document takes me like tests, tests that kind of same way they save you time in the back end. But unlike tests, documentation is documentation. So if down the road a client or a business owner project when it comes to you says, Hey, this isn’t working the way I want it to work, you say Yes, it is. Here’s the documentation We agreed to these. These are the end points we agreed to. This is how everything works. That’s real, powerful thing to have as far has just saving yourself a lot of headache and back and forth and nit picking on Well, it shouldn’t have worked this way. It should have been like this. I was expecting this. I was looking for this information. If you haven’t documented before him and

[00:17:01] JC: just like unit test also think about your edge cases and errors case and start to make sure you have error responses for your API.helps a lot. I am so guilty of Happy path programming. When it comes to my APIs and just like that, there is others. Who cares? But if you know about it up front and you can handle it gracefully one way or another, you know, showing the proper messaging to your your user, just something in that I’m terrible at it.

[00:17:30] OM: Or putting in the proper validation to prevent those errors earlier. Yeah, the sooner is always the sooner you can catch errors and flag on his potential issues, the better waste less time. Not that we’re running out of time to fill the day. Lately, they seem endless. Any my kid yesterday was like, Is it Friday or Saturday? Just Thursday.

[00:17:54] JC: We started writing on our chalkboard in our living room. What they date of the month is so mostly for my wife and I both. You know, it’s also we’re telling the kids so that they know what day it is until two days later and you forget to update it and then wait a second that I dated yesterday or not this month

[00:18:10] EVJ: I was very excited to see who we were interviewing. Oscar reached out to me and let me know. Ah, the feature author who we were going to interview this week, and I have been a fan of hers for a while now. I’ve been following her closely on her blood posts and Dev am following her Twitter feed. She’s been a developer. She’s a small business on her as well, and she’s been developing for a long time. Um, we’ve actually shared correspondents of a discord, So I knew her as SyntaxSeed. And I know her by her real name, which is Sherri Wheeler. And she has a very, very detailed article this month called The Business of PHP. And we pulled her in the studio this month and had a conversation with her around her article around who she waas and around Ah, just PHP in general. And, uh, probably now’s a good time to cut over to the conversation. Sherry Wheeler. Welcome to the show.

[00:19:23] SW: Oh thank you very much. Um, I’ve been trapped at home with my kids now, so the time for creative writing has us stripped down to a very minimal.

[00:19:35] JC: So that’s where it was how old are the kids.

[00:19:36] SW: Um, I have three boys. They are 8 6 and four

[00:19:40] JC: I’m right there with you, Almost six and almost four.

[00:19:43] SW: It’s a fun age

[00:19:45] EVJ: unless you follow her on Twitter, John. But I I just love it. Like one day. She she’s posting. She’s teaching our kids how to solderer. And I wish I had an adult that had done that for me. Might have been a bad, that’s all. Oh, it is. You seem like you’re really understand. Like, the whole science technology. I mean, like, you’re not just a coder. You’re kind of well rounded in all of it, huh?

[00:20:12] SW: Yeah, I kind of suffer from too many interests. So I’m a beginner at a bunch of things. And development is probably the only thing that I doug really deeply into. So, um, so the slaughtering and the electronics and the Arduino and stuff like that. I’m bringing my kids on as I’m learning at myself. So it’s fine

[00:20:35] EVJ: because you

[00:20:35] JC: could excuse to learn it, right?

[00:20:37] SW: Yeah, that it counts as parenting points,

[00:20:43] EVJ: and then you don’t only do PHP development, but I hope I’m remembering this, right. You’re a game developers. What weren’t you?

[00:20:51] SW: It’s more like, um, on experimental process. I’ve done a couple very small things, and I have some ideas in the works, but it’s more of, ah, one of those things where I was like, Oh, hey, I I like games. I like programming. Why don’t I program a game? So, um, how hard could it be home are gonna be, um I did it just enough to learn that I’m never gonna make a penny off it. So So that kind of fell by the wayside. But it’s still something that I’m kind of interested in. And I I’d like to do more once my youngest starts school in September, but, uh, we’ll see,

[00:21:30] JC: we’re kind of we’re kind of gaming Were you looking

[00:21:31] SW: at? Um, my main interest are like text and browser games just because it lends well to my web development experience, But I’d also like to learn, um, language. Uh, I’d like to build language learning games because, uh, my husband is a Francophone, and our kids are bilingual. They go French school. And when I tried to learn French, it was a very frustrating process because there wasn’t enough fun ways to learn it. So I would like to build some language learning games in the future.

[00:22:02] EVJ: I am. You’re also you’re north of the border. It right? You’re over around the Toronto area. So

[00:22:08] SW: nobody I’m some more. I’m actually I can see Detroit from my backyard. So I’m, uh, that as something Canada, as you could get. Basically.

[00:22:17] EVJ: So you’re barely Canadian?

[00:22:19] SW: Nothing. Barely. All of our TV is Americans.

[00:22:25] EVJ: Ah, some. Well, I want to thank you for contributing to this month’s PHP architect magazine. Um, yeah, quite the interesting article here. Do you want to tell us a little bit about it?

[00:22:38] SW: Yeah, sure. Um I think probably the the inspiration for this article was that my last, the last time I actually worked for somebody else. It was at a insurance software company, and they used dot net and I did dot net development for probably 3 to 4 years. And then I became a business analyst at the same company. But my experience with dot net really solidified for me that PHP can hold its own in situations like that. And at that company we were creating basically industry leading software for the insurance industry here in Canada, and we used dot net and I I found the experienced quite frustrating. I don’t know if it was because I didn’t know what I was doing compared to teach me. But I did find that I kept doing my own side projects in PHP even while I was doing dot net during my day drop, and I I found that people who I spoke to in my career would kind of look at me funny when I was working, when I admitted that I still build with PHP and I I’ve I’ve been over the last couple years on a bit of ah, a bit of a rampage, trying to to promote PHP and trying to get people to understand that it’s it’s not the same language that it was, um, a few years ago. In the Version 3/4/5 It’s very, very different now, So I wanted to write an article that would speak to managers and business professionals and not be overly technical and try to convince them from a money making perspective why they should choose PHP. I mean, US programmers who are reading PHP architect. We know the technical side of PHP. We know why it’s awesome. But I wanted business professionals to see that you can make money. You can benefit from a lot of the strengths that PHP has, and I wanted to focus on that from something that a manager could pick up and read and follow.

[00:24:43] EVJ: Gang do a good job, but they affect you even touch on, uh, the point that a lot of the shortcomings of PHP or older legacy issues that have long them resolved.

[00:24:56] SW: Yeah, people, he has some baggage, that’s for sure. And I’ve been trying to kind of air that out and and speak to the community and let other developers no and business professionals know that the baggage that PHP has most of it is in the past, and it’s time to give it a fresh look. And I think from a business perspective, I know that at the company I worked at in dot net almost every day, I would say to my manager, Let me write this project and PHP I’ll have it done in like 1/3 of the time because there was a lot of, you know, issues from the other side. So I know it’s a little bit of, ah, passion project for me to kind of toot the horn of beach feet. I’ve been doing it for so long that it’s almost at the point where well, I could solve every problem imPHP me. But I do think there are objective, objective reasons to to look at PHP being. Give it, give it a shot.

[00:25:56] JC: You mentioned some of the older versions of GHB. When did you get started?

[00:25:59] SW: Um, I got started so long ago that I’m not even 100% sure what version it was. It might have been three something. Um, this was one of my first jobs out of university. And, um, we’d used PHP at that company. And then I worked at a couple different small web development companies. Two of them used PHP p one used a S p and then the dot net job. So I’ve been able to touch on a lot of those kind of old school Web development languages. And PHPy is really the one that that’s stuck in there, at least for me.

[00:26:38] EVJ: But you run your own business right, You’ve You’ve kind of been You’re in business for a while.

[00:26:45] SW: Yeah, my business at Venice’s basically basically I’m a freelancer who gave myself a business name. Um, I do small business websites and Web software projects. It’s just me right now when I need like a designer, I usually subcontract things like that, but it started as one of those things where, um, tech jobs in my area don’t generally pay very well. We’re very much a blue collar city. Um, so I always was doing freelance on the side to supplement my income. So that’s where my business came from as like, a side hustle to try to make some extra money. And when I had my first child, I decided, Well, you know, it’s time for me to be my own boss. I don’t want to go back to working for someone else. So I decided to ramp up the business a little bit more as I stayed home with my kids and my youngest starts school in September, and I’m looking forward to finally having free, like finally having full time hours to dedicate to my business. So I’m excited to see what s

[00:27:54] EVJ: O he likes your article really kind of dives into a lot of the aspects of PHP development of and why you choose PHP. Why you’d hire for PHP one of things you touched on was remote developers. And the fact that you know, in this day and age, you don’t necessary necessarily need to look local, although you do make a very good case for why locals good and how it starts to build up that community locally. But I had a question. When companies look remote, what do you think is the primary driving factor? Do you think they’re looking for talent, our cost benefit?

[00:28:34] SW: Um, I think there’s probably a little bit of both, but I I’m I’m a bit of a business cynic, almost to the point where I think business is almost looked for the cheapest first, and sometimes they’ll look for that. Who can I get as a competent developer for the cheapest and sometimes they look elsewhere out of their own community. But I think you know that comes with its own set of challenges

[00:28:57] EVJ: very much. I can tell you that somebody is going through the process several times. Cheapest doesn’t always save your money. A lot of times have cost you more money in the long run.

[00:29:09] SW: Steph ee, get what you pay for thing. But at least in in PHP we have the benefit that there there are so many people who know PHP And there are so many mature developers who have been doing this long enough that they bring that experience to the table. And I think you see that in the PHP community developers who’ve maybe you’ve been around the block of it or who have had the chance to try different languages and who know the strengths and weaknesses those people bring a lot of value toe to a company and a lot of us more mature Developers have been using PHP for a long time, and I think getting someone who who has that history with a language is very valuable.

[00:29:50] JC: Absolutely. So you looking forward to getting back full time thio coating? Is there any part of you that wants to bring on employees? Do you want to have a bigger than have people you were working with or is it you? Do you enjoy the solo effort that you have right now?

[00:30:04] SW: um, that’s that’s a great question, and and something I’ve actually been thinking about recently. I come from a family of entrepreneurs My parents owned AH printing company here locally, and they had a small staff, and I would definitely like to fill the gaps in my own knowledge. Obviously, I I’m not good with design and things like that. So I would like to get to the point where I’m, you know, along the lines of Diego de Vie Love, hearing the stories about you guys on the other podcast. And it’s funny because I’ve heard from a lot of small business owners who used to be developers who made the mistake of hiring more developers. And then date got pushed out of doing the development work, and now they’re only doing the business work, and they missed the develop development. I hear you guys talk about that a little bit, so I think if I brought on staff, I might focus on like salespeople and manager types where I can keep doing the coding and hire someone who’s going to do more of the sales because I’m very much an introvert, so I don’t I don’t want between sales.

[00:31:05] JC: Yeah, talking to clients is hard. That’s that’s not something I look forward to. It preferred. I would love to hire somebody. But having gone that far yet now

[00:31:14] SW: it’s

[00:31:15] JC: Eric and I lean on each other like you’re available for the skull. Let’s both jump on it. Part of it. One of the nice things of having a partner.

[00:31:21] EVJ: Do you attend any conferences or have you spoken at a conference? I can’t recall if I if I remember you speaking at a conference or not. I know. I’ve seen you another podcast. I’m element your first podcast. Be honest. Yeah. I think you’re just on voices, weren’t you?

[00:31:36] SW: Yeah. I talked to Cal on Voices of Elephant. I got invited to to prepare a talk for the nomad or know which one’s the online conference, is it? No Bad beach peace conference. Yeah, I got invited to prepare a talk on that, and I wanted to do something on PHP sessions and how they work under the hood. Um and I started working on that, and then I got sidetracked by Christmas and then this cove in 19 thing. So there is a online talk in the works, but it’s, ah, nowhere near complete. I haven’t had a chance to attend any conferences yet because I’ve always kind of been in this like I’m a mom first mode because my kids are so young and disappearing for three days is a little bit unfeasible. But I would like to eventually I was gonna hit up PHP Detroit. But then they didn’t do another one, so I didn’t get to go to that. Yeah, I

[00:32:29] JC: think you’re probably thinking of a camper to

[00:32:33] SW: I did do the lark on online recently, which was pretty good.

[00:32:36] EVJ: Yeah, As first online conferences go, I’m actually very happy with the Laracon of line one. Of course, this year, conferences are just dropping by the wayside because of covert 19. Unfortunately, PHP tex already been canceled. Laracon us has been canceled. So it may be online will be the only way. Varies and the future between social distancing and, you know,

[00:33:05] JC: just so not. Let’s slow down. Let’s let things

[00:33:08] SW: to settle. E. I don’t think it would be entirely bad if if we ended up with more online conferences, it would be good for people like me who are in small towns, and I find it hard to to find something close by. The closest thing to me would be Toronto, which is about four hours away, So I like the, um, the online conferences are are great for me.

[00:33:30] JC: Yeah, they definitely have their place, but there’s nothing like getting together with other developeres after the talks. Going sitting down with the speaker and having a conversation is a lot easier on networking of talking with people in the That’s what I really feel turned my career around. Starting in 2010 I was going to my first time.

[00:33:47] SW: Yeah, I would really love that. And I before we all got quarantined. I was starting to look into what’s close by that I can attend because most of my career I’ve anytime I’ve approached my coworkers about Hey, are you interested in that? Let’s talk about it. I’ve mostly been the only person who does it in their free time outside of their day jobs. So any time I worked with other programmers as colleagues, none of them really did it in their free time. So it was mostly just a job for them, so

[00:34:19] EVJ: I don’t mind the five.

[00:34:20] SW: Yeah, I haven’t been able to make many friends who who do development for fun as well as, unfortunately,

[00:34:26] EVJ: do you look at our? I’m not familiar with your exact area, but are there any user user groups around where you were?

[00:34:34] SW: We do have a small user. Go use a group called Hack Forge, but it’s not PHP specific. It’s mostly anyone who’s interested in Tech, including programmers are all in a group together. So there’s there’s so few of us around here. We had to all group together, no matter what, what area of tech you’re into. So,

[00:34:54] EVJ: unfortunately, those of the group should go to you have to listen to everybody tell you why PHP so stupid. I’m not coming here for this.

[00:35:02] SW: Yeah, everybody in my region is either Java script or dot net. Developers around here.

[00:35:08] JC: Come around here that, I mean, there’s a lot of PHP developers, but JavaScript just has immunity around it.

[00:35:13] EVJ: Yeah, it’s it’s everywhere. Well, I mean, if you think about it every platform, no matter what language, if you do Web in these anything on the web, you need JavaScript on some level.

[00:35:24] SW: Hey, now, this is a PHP podcast. Let’s not have a script. I thought this is

[00:35:31] EVJ: why I like livewire I have a big fan of livewire for Laravel it really eliminates Ah, big chunk of the JavaScript requirements.

[00:35:41] SW: Oh, I’m so interested in that. I think I might I might fork it for symfony.

[00:35:46] EVJ: It is probably one of the coolest things I’ve seen in a framework in a long time or as a package. I mean, coolest, in the sense that it’s really doing something unique as opposed to just being a package to take away some of the grunt work of development like Oh, yeah. Here’s a package to do all your mailing with and now all you have to do is pull this in and just in the mail, Livewire’s different. It seems that it seems like under the hood it sze doing some magic there, which is not always a good thing. But in this case, I’m willing to, I’m willing to embrace it.

[00:36:18] SW: Yeah, it always struck me as something that I would have that I would have liked to toe work on as well, because I’m always one of those people who’s, like, How can I do this in only PHP?

[00:36:30] EVJ: That’s me. That’s totally me. Yeah, It’s like I I don’t think I can’t learn JavaScript. I just think my brain fights it like No, no, no, no, we’re good. We could do this. A PHP I am telling you. So you mentioned symphony or you. Ah, Are you a big symphony user?

[00:36:45] SW: Uh, not yet. I actually wrote an article about this. I’ve been trying to find a replacement for my internal framework that I’ve built most of my projects on. Up till now, I have, Ah, a simple MVC framework that I kind of built up over my career, and most of my projects have been built on that, but I’ve reached the point where I need to use something much more professional. So I’ve been in the Laravel versus Symfony debate with myself for a while, I built a project or two on Slim. I I actually built an online course for my local community college on Laravel. So I do know some level, and I’ve I’ve recorded screen casts about Laravel and built a course around it, so I know enough of it to know that it’s wonderful. There just some some problems with how big it is. And, um, how frequently am I going to have to update? Because I’m the kind of developer where I’m not going to have one giant project to take care of. I actually build many, many medium and small sized projects, so I don’t want to end up with 20 projects that I have to update every time a new version comes out. So I want something stable, and I want something that can start really, really small and get bigger as I need it. And symfony came out with their flex framework where you can start with a very bare bones framework and you can add packages on as you need it, which I like. So I haven’t had a chance to dig into that in detail, but I’m kind of leaning that way.

[00:38:26] EVJ: Um, one of my pet peeves and I notice you referenced a few in your article and I wanted to get your feedback on this. Uh, I think you reference Githubs analytics and then indeeds analytical itics as far as like jobs available available for PHP or code for PHP. I noticed some of the specialty groups in PHP like WordPress, like Laravel. They don’t necessarily register as PHP like on these job postings? A WordPress And and WordPress is a perfect example. Where even the person asking for the developer doesn’t understand that they’re asking for a PHP developer. Do you? Ah, do you know the stats? Because you used some pretty specific stats in your article. Do you know the stats took that in consideration or was that just straight PHP?

[00:39:21] SW: Well, now that you say that, you make me think that I probably would have got even higher numbers for, uh, my stats if I had done PHP or WordPress or Magento are these other ones that are built on PHP. I probably would have gotten even higher results for PHP being on it now that you mentioned that. But yeah, that is a weird thing where there are some of these communities who barely recognize that they are actually PHP. Um, I’ve encountered a few companies, actually, as I’ve had clients move to me from other companies where the company built them a WordPress site, but they don’t actually have any programmers on staff. They just churn, churn out WordPress sites, and they have a staff full of marketing people. No one knows any programming. So as soon as there’s like an error coming out of their WordPress installation, they all they do is wipe it and start all over again. And so I have had customers come to me like help. There’s an error on my site. And the company who built it can’t fix that. I’m like, Well, though they have any programmer on site? Well, no, not really. So there is this weird. Well, I I mean, that is a compliment to WordPress that it is so feature rich and so easy to use that you can technically sell WordPress sites without doing any programming. Which is quite a compliment to WordPress. But it’s funny. Yeah, there’s definitely some some silos within the PHP community.

[00:40:48] EVJ: Yeah, I agree. Man, in fact, one of the things that makes me cringe of lot is another’s ah, pretty popular opinion in the Laravel community of Well, you can actually just come on and learn level. You don’t have to wear in PHP. And I’m kind of Oh, why why would you

[00:41:04] SW: I when I when I created my Laravel course for the college, I made a point off sneaking a bunch of, you know, Generic PHP advice and some security stuff. And I tried to do a whole chapter on security outside of Laravel just so that these developers didn’t graduate with this degree and they didn’t only lnow Laravel, I was like, No, no, you go. Here’s some other stuff. You should be looking at the PHP the right way website and things like that. I was like, Please learn more than just Laravel.. It’s been great to to write for PHP. Architect Oscar has me doing another monthly feature where I’ll be I’ll be writing a PHP puzzle, and then we’ll solve it together the next month and do another puzzle. That excellence kind of like that s so cool. Yeah, like a like a coding exercise that we can do each month, and I want to write a few of those up front before we start publishing them. So I’ve got some more stuff coming out, and it’s been really fun. And all the folks at PHP architect are really great to work with, and that’s been great. I’ve been trying to get more involved in the community, and this is step one

[00:42:20] EVJ: Sherri. So your article this month is the free article on the PHP Architected website. So if even if you don’t subscribe to the magazine, everybody could go to the PHP architect Web site and download your article and read it themselves again, thank you so much for coming in and speaking with us with us today. Thank you for take your time to write this article. And I am really looking forward to your future contributions.

[00:42:45] SW: Oh, thank you very much. You can check out the article online and follow me @syntaxseed. That’s where I try to stay mostly on a programming topic with my tweets. So that’s my tech focused Twitter there. So give me a follow and anything else I put up I’ll put upon their

[00:43:03] EVJ: sherry. Thank you for your time. We appreciate it.

[00:43:05] SW: Thank you. And thanks for both. Your podcasts are really great.

[00:43:08] OM: That’s great to hear from Sherri. And in case you missed that, she’s also gonna become a regular contributor to the magazine with a little PHP Puzzles column where she’s gonna pose a little coding exercise each month and the following month cover a solution for it. So if you’re not a subscriber yet, you can grab a subscription at PHP charge dot com and follow along. Now that we have actual homework between each issue.

[00:43:35] JC: and winners get a pretty issue of the magazine?

[00:43:38] OM: You get better at programming

[00:43:40] EVJ: I like Oscar’s come back. No, you get better and programming. That’s good. That brings us to Communicyt corner. And I’m gonna point out I normally blow over community corner because, well, you know, it stands on his own. It really it really shines as an article in the magazine, and I just don’t feel like it requires a lot of height. But I was excited about this one because I’ve been reaching out the user groups around the world, and I’ve gotten some responses, but most of them have been in North America, So I’ve been I’ve been doing one ah us group one month, and then I d’oh another group. The following in up until this month, I have been bouncing back and forth between Canada and the U. S. I got a lot of responses from groups in Canada, so I’ve been highlighting the those groups as well. But for the first time, I finally get some maggot males on my community corner. And we flew halfway around the world to Australia. I was very excited t hear from my friend down under and that he was willing to profile his group. So we don’t need to talk about the group. It’s here in the magazine if you don’t have the magazine get the magazine. But, ah, I was very happy to hear from my friends in Australia. And if you run a user group somewhere, I’m looking at you. You I’m looking at you, Africa. If you’re Asia as well, I know you’re You’re over there as well. If you run a user group and you want to get profiled, the magazine reach out the Oscar, reach out to me on Twitter, I’ll be happy to profile. Your group is a pretty painless process. I send you a question here. You answer the question there, I add some flair to it. everybody seems happy trying to get a lot of frequent flyer miles on the community corner. This year s I need I’m used to get some distance here to reach out.

[00:45:41] JC: So if you want to be happy, reach out there. That’s what I think. The only way to be happy

[00:45:44] EVJ: moving on. We pull into Education Station and Anatomy of a Web Request by Chris Tankersley. We know PHP was designed for the Web page. PHP shines on the Web, but we probably don’t all know what happens in the transaction on the Web.

[00:46:01] JC: This is one of one of the things I always ask developers when thinking about hiring somebody is, Do they understand what a Web request is like, what actually happened? Not Everybody understands that They just know PHP coding to a point. So it’s something that I personally look for in developers is having that full understanding of what’s actually happening from the browser when they enter the domain name all the way through to the PHP backend and what’s going

[00:46:27] EVJ: on. And I tell you, if you don’t know if you haven’t looked at this before it, it’s eye opening. I tried to explain to my Children when they were growing up, they were constantly like, Oh, we use this service, you’re anonymous on the service. I’m like If you’re on the Web, you’re not anonymous. Trust me, you’re as anonymous as the coder who created the app wants you to be. But they are getting a ton of information about you, and that’s how that’s how Web requests work. You need to understand that that you’re never, never as anonymous as you think you are. And I remember the first time I started looking into Web Request and the actual information that’s exchange I. My mind was blown like I can’t believe this, how much information is shared on request,

[00:47:12] JC: And now it is even more just with the number of third party service is out there that are tracking, and it’s impossible really to stop. I mean, there’s lots of people trying, but it’s gonna be there if even as ad blockers become more prevalent where you’re blocking those to me, it’s just gonna eventually move to individual service is so you’re still gonna hit their domain to get paid, and they’re gonna start tracking you on behalf of the third party, The information’s still gonna be shared.

[00:47:38] EVJ: Chris does a really good good job of breaking down. You know, the URLs. A lot of the terminology that’s used request, headers, things like that. So even if if you’ve been coding for a long time, if you haven’t really looked into this or if you think you have a good understanding of it, it’s definitely you want to take a few minutes and just look over this article and you might be surprised at some of the information he shares.

[00:48:03] OM: I love deep dives like this one when you’re really looking under the hood. Because as nice as it is when PHP does basic abstraction of, like query strings and request headers for you that you can just start using your code. As your applications get more complicated or you start putting them behind proxies and stuff ometimes you run into a lot of times you run into errors where things aren’t working because your requests are missing a field or or things aren’t quite in the right format. Remember, with varnish trying to get a Drupal behind that required me to figure out how well, how do I ensure that cookies air not being sent through varnish because that would kill performance, I think. And that meant diving into the inspector tools of Firefox or Chrome. Just we’ll see. What what exactly is going in? The requests and what varnish was pinging back in the response

[00:48:53] JC: back in my day, we would use telnet, and we’d actually telling it to the port. Yeah, I actually still do that often when things are

[00:49:01] OM: breaking, interpret html manually.

[00:49:04] EVJ: Funny thing John and I were doing some troubleshooting and I went to pull up. Tell that on my own. My Mac turns out it’s not even installed by default anymore. It’s crazy. It’s like week. Yeah. How do you know? For ports opened, I have tohave tell me that I

[00:49:21] OM: had to do that to debug why a mail server wasn’t working the way a client thought it should. And it led me to like some instructions where ah, the trouble she and guys like. Okay, now open up telling it and see if, like you get a response. When you hit port. Whatever 20. Whatever it was, I forget what it was. Yeah,

[00:49:39] JC: back in the day, 25. Now it’s like, 465. And 585.

[00:49:43] OM: Next month, Chris is gonna be talking about the other side of the coin. So this this month it’s Web requests, and in May, it’ll be Web responses.

[00:49:50] EVJ: Ah cool. John, you must have appreciated Eric Mann’s article buzz word. Bingo. John is constantly having to clarify to different people the difference between hashing, encryption and encoding. And that’s exactly what Eric Mann touches. Um, this ah, this month

[00:50:12] OM: and sometimes obfuscation

[00:50:14] JC: was that last month we talked about that obfuscation.

[00:50:17] EVJ: It was very recently. No, but

[00:50:18] OM: you know what I did on that PHP ugly podcast?

[00:50:21] JC: Yeah, I was like, I know we just had this conversation and some of those Tell me how wrong I was, and I still don’t understand how I was, But

[00:50:29] EVJ: somebody told you how wrong you were.

[00:50:31] JC: Thomas? Always tells me I’m wrong.

[00:50:33] EVJ: Oh, well, nobody really pays attention to Thomas. Sure.

[00:50:35] JC: Okay. Yes. So people think of hashing that hashing is encryption and vice versa, and they’re just they’re two completely different topics. Eric mann does a good job of going into defining encryption, hashing and coding and kind of laying it out there

[00:50:50] OM: Between Eric and Chris’s column. You have some good fodder for questions to ask in an interview. How does the Web request work? And also yet, what’s the difference between all these terms? You know, encoding. We use a lot of encoding we’re encoding right now, right, our audio, too, to bits. But that’s not encrypted or were hashed or protected in any real way. Eric’s gonna be doing more of these kind of back to basics columns for security in the coming months.

[00:51:16] JC: I’m surprising it through obfustion in here as well.

[00:51:21] EVJ: He makes a mention of it. But yeah, it could have been inside of its own section.

[00:51:26] JC: We’re talking about with some other package that they support obfuscating you PHP or making not unless you have, which would be encryption because you have some sort of license to unlock it, and somebody was using up. And to me, obfuscation is just a machine changing like your variable names, so make it harder to understand what the code is actually

[00:51:44] EVJ: doing. Remember buying you have used as an example as well.

[00:51:48] JC: He’s right. Obfuscation is not, I think, as we were having that conversation last four, you pointed out with the package, actually, so we were just talking in general. Really? Oh, they are encrypting the PHP file. You have some sort of he actually run it so that they can sell you a license.

[00:52:04] EVJ: They were even using both terms on their website. If I remember correctly, you’re even referring to obviously shame at some point as well. But

[00:52:12] JC: right. Well, yeah, because they’re giving you They’re giving you the the code, encrypting it with the license, give you the license to decrypt and run it. But it’s obfuscated. So you can’t then turn around and sell it

[00:52:24] OM: or even understand how the code works, cause class names are just nonsense and variables and stat sort of stuff

[00:52:30] JC:I misspoke. You could then sell the code, But you couldn’t make changes.

[00:52:35] EVJ: Next up Joe Ferguson and he touches on a topic that that I find myself startling with sometimes, and he he doesn’t touch on the struggling part of it. What he what Joe article is EASY CLU PHP with symphony Console 5. And I remember when I first started rating Console commands and PHP, I quickly started to get concerned that I was overextending my PHP. like, was this the right fit for PHP? And I wasn’t totally convinced. But I think my my tune has kind of changed over the years is like PHP is a great command line interface. I mean, it really works. Well, what do you guys think about this?

[00:53:26] OM: I have to agree, because probably besides the website, I use PHP extensively on the command line to prepare articles converting between different formats. Do some custom markdown thingies, um, when preparing stuff in the magazine and then integrating with service is like Mailchimp and, uh, think hoot suite all from the command line just to save me time, Take out some of the drudgery and repetitiveness of running thing. Obviously, I like it on the command line because it’s the language I’m most comfortable with between PHP and bash. Scripting isn’t to terribly difficult either, but it’s got some rough edges. I find, um, and the symphony Console components are really polished. Help you write a polished command line application easily, like they, like Joe points out, they take care of like, how you ingest arguments, option. Our options display help pages to your users. PHP has some native ways to inspect. I don’t know if it’s native, but there is a package where you can inspect for options and and that sort of stuff. But it’s real clunky hard to use the

[00:54:40] JC: I love the getopts is native.

[00:54:43] OM: It’s one of those linuxy things so that it’s not very intuitive for how you define what argument is and if it’s optional or not.

[00:54:51] JC: Well, it’s also you got the long form, the short form, whether it’s a flag or accepts a value. There’s so many you’re right it’s not intuitive at all. But I’ve been writing my writing, CLI commands with php years or really accept because I didn’t understand bash, You know, I would use it in place of bash all the time, and people would look at me like that’s crazy, but it works for me. All my all of my cron scripts were all

[00:55:14] EVJ: using frameworks like symfomy light layer. Well, a lot of them come with these baked in Well, symphony is you can have it, but ah, with these interfaces that just make it, you know, part of the part of the framework part of the project, it really becomes very easy. So, yes, I have definitely changed my tune on using PHP for command line scripts.

[00:55:40] OM: Definitely check out Joe’s column because, uh, he goes to the hole all the steps from installing the consul components from Symphony to put one together and formatting you out. But all that good stuff.

[00:55:52] EVJ: Okay, I think that’s it. We’re wrapping up. Yeah, that’s gonna do it for us again. We want to make sure everybody listening. You’re staying safe, You’re staying secure, staying healthy. And that extends to your families as well. We do appreciate you listen to the podcast. We appreciate it more to our readers of our magazine in our subscribers. So if you’re not a subscriber, please consider subscribing to the magazine. We really thank you. You’ll get a lot out of it. And we do appreciate the subscription Besides that. Just keep on coding. And, uh, see you next month. This’ll has been PHP podcast. The official podcast of PHP architect. He’s leading tech magazine and publisher focused on PHP and Web development. Subscribe today at PHP arch dot com. To see what the leaders in the community and industry are talking about.

Air date April 21, 2020
Hosted by Eric Van Johnson and John Congdon
Guest(s) Sherri Wheeler, Oscar Merida

Leave a comment

Use the form below to leave a comment: