 Mae'r cwrdd yn fawr o rhai, am ydych chi'n ddweud y cyfnodd cyfnodd yn y cyfnodd, gan ydych chi'n gweithio'n gwasanaidd, gan eich cyfnodd, gallwch chi wedi cael eu cyfnodd cyfnodd yng Nghymru a yma'r gweithio'r cyfnodd. A'r gweithio'r cyfnodd cyfnodd cyfnodd cyfnodd a chi wneud y cwrdd yn gweithio y dyna? Wel... Wel... Mae'n Gary. Yn y ddech chi fod yn gweithio'r cyfnodd. I'm pretty excited to be here. I love playing computer games. Oh, hello. I love playing computer games. I have a podcast to talk about computer games. I really enjoy playing computer games, and if you were at my keynote last year, you'll know that I like to talk about games. Unfortunately, I'm really, really bad at playing computer games. For somebody who loves to play them so much, I'm terrible at actually playing the games. I've got really bad hand-eye coordination. I'm not quick enough on the controller or on the mouse and keyboard. I'm not very good at it. I tend to spend a lot of my time googling for phrases like this to try and get a little help and understanding to improve my gameplay and ability. This is a pretty common thing if you play computer games. If you don't play a lot of computer games, this could be a long talk for you, sorry. I'll try and keep it to a minimum. But I tend to do a lot of googling for things like this. Things I wish I knew earlier when I was playing and the game. This is particularly useful in role-playing games or games where there's lots of hidden content, so you can go and find that cool hidden content. The reason I think this is kind of important is because if you're playing Pac-Man and you're from a generation like I am where you remember playing this as a kid, it's pretty obvious what you have to do. You have to eat the little dogs and stop the ghosts from killing you. We've never played this before and if you come to the game from fresh, it's not actually that obvious what you have to do. Things are only obvious when you actually know them. So things that may be obvious to me are not obvious to somebody else. It's kind of important. I didn't even realise that when I ate this little white dot, now I can go and eat the ghosts. When you know it, it's obvious, but when you don't, it's difficult. I think it's important for me to think that this is definitely something that I feel like in my career. There's so many things that I'd wished I'd started doing or wished I'd known earlier in my development career. So we're going to just cover a few of those today. I'm not shaking it yet, I am. And so the first thing I think, these are in no particular order of importance. They're just how they randomly came out of my consciousness. So the first thing I think is really important is to put some points into charisma. So again, with the tedious gaming analogies. When you create a character in a game like this, anyone know? We'll have some shouts and games again today, I think. Anyone know what this game is? Follow for, right? It's a classic. So I typically never ever put any points in charisma when I'm creating a character. I'm like, I don't care about that. I want to be strong or accurate or lucky. I don't really care about the charisma. When I say in your career to put some points into charisma, what I'm not talking about is things like being more of an extrovert and talking to people. That's not what I mean at all. It's difficult for people to just sort of start conversations. That's not what I'm saying. I'm saying to try and make your interactions with other developers in your daily job more friendly and more thoughtful. I guess that's what I'm saying here. So we've all had conversations. Maybe we're trying to think about how we're going to solve this new problem in our job and somebody makes an idea and you're like in your mind, you're like, that's a really bad idea. It's not a great idea. This is the stupidest idea I've ever heard, is what you're thinking. It's how you push that along. How you make that statement to your colleagues and your friends and your bosses and the people you're working with is the most important thing. It took me an embarrassingly long time to figure out that if I just said, oh, that's a bad idea, it didn't really go down well with my colleagues. Whereas if I phrase it another way, I'm not particularly sure about that idea, but have you considered this idea? You're much more receptive to your colleagues. Again, this may sound really, really obvious, but it took me a long time. This is a bit unnerving, but we'll see what happens. It took me a long time to figure that out. Come back with another idea that you think improves upon the idea that's given rather than just saying, oh, that's a terrible idea. Sometimes we have to say no, though. Sometimes we really do have to say even to our superiors in the office environment or in our careers. Sometimes saying no is the right thing to do. It's important to realise that saying no is definitely something that you need to learn to do. This is really flickery and scary, but we still have slides, it's all good. Just saying no is sometimes what you really, really need to actually say. Don't be that person who says horrible things, but then prefaces it with, you know me, I'm a straight talker, I tell it like it is. Being a straight talker is no excuse for being a dick. You just have to try and be nice in your daily interactions. Yes, try and be honest, yes, try and be a straight talker because things get solved quicker, but just try and be nice. Sometimes you do have to be a bit of a dick to get things done, and that is the contradiction here. Sometimes being too nice doesn't really achieve what you want to do. I'm not saying get walked over by people is basically what I mean here. I'm not trying to say always be nice at the expense of your career and your perception. Sometimes we don't have to be too nice, but really try and be as nice as you can. This is definitely something I've struggled with in my career that's kind of done the rounds on Twitter a few years ago. Listening to someone is not just waiting for them to finish so you can make your cool point. I'll put my hands up and say, I've been there where I'm not really listening to what the person is saying anymore, I'm just waiting for them to finish so I can make my really witty comeback remark, and that's not listening, because you tune out halfway through the sentence. You think in your mind you know where this sentence is going, therefore you kind of tune out. Really you don't really know that because once you've tuned out, you don't know how that sentence has finished. This is definitely something I've consciously tried to work on over the past few years to try and engage in conversation rather than it just be two people talking at each other. Excuse me. My next tip is to quicksave regularly. There's no excuses in this modern day. If you're as old as me, then you'll remember saving the game was a real pain to actually do every time. I've got disks and put the other disk in, and I even remember having to save games on to tape, which is a whole different problem. But there's no excuse now, we can quicksaving games regularly, we can whack F5 and then when we inevitably overreach and end up failing something, we can come back and quickload. Of course the obvious analogy here would be version control is your quicksave. Committing to version control regularly means that you have points where you can get back to if your experimentation goes wrong. That's kind of the obvious analogy, but I used to use Dropbox for version control, so I'm not saying to use Dropbox, but use something that you would actually probably get. The obvious analogy is not what I went for, because I wanted to really shoehorn something about unit testing in you, so I guess I've tediously linked that to quicksaving. But for me it is almost like a quicksave. Having a unit test suite, or a test suite, not necessarily a unit test suite, is something I really, really, really wish I'd learned about much earlier in my development career. It's a big step to take. I'm not going to judge anybody who's not doing automated testing, but I just really encourage you to give it a go, because if you've ever had that feeling where you've written a new feature and you've tested it yourself manually, you've gone, you've whacked F5 a million times and filled the forms in and checked everything and the validation's all working, and then you hear that code's going to get deployed to production and you still have that ill feeling in the pit of your stomach. You're like, I'm pretty sure I've tested this really well, but I'm not 100% and it's going to production and oh geez, is everything going to be all right? That's the time where you need to step into the rounds of automated testing, 100%. I'm saying automated testing because I don't think that unit tests are a scary place to start and maybe acceptance testing is a good place to start if you have an existing product, if you have an existing project and you just want to get some of this safety net under you to make sure that every time you deploy to production you don't have to have that horrible feeling, then maybe a browser-based acceptance test suite would be a really nice place for you to start. The resources that actually got me over the hump were Chris Harch's books. I am on commission, so use my referral link if you're going to buy the books. But these are honestly, I swear, I'm not just Chris's a friend of mine, but it genuinely got me over the bump of understanding what automated testing is and why it's useful and why you should be doing it. This is a really nice book, The Minimum Viable Tests, because it really concentrates on the minimum you need to do, which is kind of a really nice place to start. Yes, so the next tip is definitely play with friends. These games are much more fun if you end up playing with friends. Excuse me, I forgot to ask what game that is, anyone? Half Life, right? Yeah, the original. Cool, sorry. So playing friends is really, really good. Anyone know this game? PUBG, yeah. Let's not talk about that because I'm actually having flashbacks of the horridness of it right now. This is PUBG, it's a battle royale game that's kind of really popular at the moment. Playing with friends to me is something that I've definitely, in my career-wise, you know, what I'm talking about here is, we're all at this amazing conference, there's a room full of developers here who face the same challenges that you do in your daily job, who have the same frustrations and have the same problems, and being able to talk about that stuff with peers is absolutely amazing. And the people I've met through working in PHP, I count several of them as friends. Real friends, not sort of conference friends, but proper friends who I'd like to see if I'm not even at a conference. So I really, really think it's important to play, to do this job with other people. The other thing that I would mention is, there's this concept in online role-playing called a twink where high-level characters who have been playing the game for a long, long time will help their friends out who are new to the game by giving them items and running them through dungeons and doing all this stuff to really help them out when they're new to the game. And I think that's a really good analogy as well because certainly there are people in my career who've reached down and helped and pulled me up towards their level. We're talking about really a mentor in relationship, but I don't think it needs to be a really formal mentor in relationship. There is, if you really do want a formal mentor in relationship, PHP Mentoring is a really good resource. Your mileage may vary. I'm not confident that having a mentor of somebody random that you've met online with no pre-existing relationship is the best way to do this. I don't think that those tend to work out as well. Some people have had great success with that sort of formula, so again, it's up to you, but I think it's harder to find a good mentor on a site like PHP Mentoring or through Twitter or through Slack or IRC or whatever you're using than it is if you have relationships in the real world. I genuinely believe that. It doesn't actually have to be that this mentor is this big formal mentor, apprentice or whatever you use the other side of the mentor, mentee, I don't know. It doesn't need to be this hugely formal relationship. I count several people as my mentors who have helped me through my career, but it's never been this formal structured thing. There may be somebody in your office who think they do really good work. I wish I could do work like that. Just ask them. I'd really like some help. Is there any chance that we can have this kind of mentor relationship? It works more often than you'd be surprised. Again, just to go back, you don't need this formal mentor in relationship. We're at a conference. We're in a round table situation. Just talk to people, make friends within the community and leverage those friendships to help you to get through your job and your career. That's really important. The one thing I'll say when talking about friendships, mentorships is that it all revolves around asking questions. Asking questions can be really, really difficult for lots of people, me included. I'm almost too lazy where I'll try and solve a problem by asking a question of a friend rather than trying to solve the problem myself. When I first started out in this community, asking questions was a really, really difficult thing for me to do. It's fine to not know things and it's fine to ask people for help if you don't know things, but there's always this problem where you ask somebody for help, particularly I think in an office environment or in a work environment that when you do ask for help, you're worried that you're revealing a weakness in yourself. You're worried that, oh, I'm asking a question here, I'm going to look like I'm an idiot. People are going to know that I don't know these things and it's a recognised imposter syndrome, it's a recognised trait, I would suggest more people in this room have felt that than haven't. So it's completely normal. It's really difficult to get over what asking questions is the way to fast track your career, really. Ask questions, make friendships and try and get some kind of mental relationship. It'll really, really help you out. I wish I'd done that a lot sooner personally. So this is a really quick tip. I haven't just shoehorned in an idea into a convoluted gaming metaphor honestly, but play online. So does anyone know this? I think we had PUBG, anyone know this? Fortnite, right? So weirdly, I just grabbed some screenshots that were free to use off the internet. That's not me in the corner. Even though I was kind of surprised and I just found a screenshot with myself in it. It is not actually me. We haven't got slides, but it's fine. I can waffle on forever without slides so it's not a problem. What I'm trying to say here when I say play online is it's really challenging to play online because you're playing against other real life players when you're playing single player. What I'm trying to say here is it's difficult, but you learn much quicker because you put yourself into that difficult situation. So we say drop hot when we play in these games. That means drop into an area where there's loads of people. It's tempting to sort of skirt around the out... If you're playing PUBG, it's tempting to land somewhere really quiet so you won't see any other players early. Which is great, but you just waste 20 minutes and then get sniped from across the map so you won't see anyone. The way to learn really quickly is to put yourself into the difficult situation to move outside of your comfort zone and that's kind of the point I'm trying to make is jumping in at the deep end. If you're trying to learn a new framework you absolutely need to understand the basics but going through a blog tutorial is going to teach you the basics but not a lot more. Trying to solve your own real life problems is the way to learn things much quicker, I think. I think you're much better off when you learn something early. You'll learn a lot faster. The next tip is about learning the mechanics with my wonderful game and analogy. Understanding how the mechanics of a game work allow you to be better at that game quicker and does anyone know this wonderful game? Anyone? No? Yes, Eve Online. Spreadsheets in Space. This is a genuine screenshot of an Eve Online battle. It's a crazy, crazy, crazy, crazy game. It's the best one I could find to illustrate this. When I talk about learning the mechanics I mean I'm really talking about learning I think that from my personal experience I really wished I'd learned about design patterns earlier on in my career. So design patterns are just reusable ways of solving common problems in programming. It sounds much more scary than it is. This is the typical gang of four book that is typically held up as to be the kind of the design pattern bible, so to speak. But I mean I couldn't really read that, I'll be honest. It's a bit too convoluted and a bit too dry for my taste. So I mean design patterns will really, really, really help you out in your daily job and you don't need to be scared because they have crazy names that make them sound complicated. They're really simple ideas packaged in a way that for some reason makes them sound really complicated. Dependency injection sounds like this really intimidating thing but it's a really, really simple concept and you don't have to know every design pattern right down to the sort of computer science scientific level. You just need to understand generally what they are and what problems they help you solve. That's all you need. I learned about design patterns from Anthony Ferrara's YouTube channel. They're really old dated videos now but the design patterns haven't changed so they're still really, really good. I highly recommend you can't put a YouTube link on a slide so just search YouTube for programming with Anthony and there's a ton of YouTube videos that Anthony did that just really easily introduce you into design patterns really unintimidating, pretty cool. There's a good LauraCast series on design patterns as well. Take those as you find them. They're not exactly how I would interpret some of the design patterns but it's a really good resource. At the end of the day if you're learning about these tools to help you to solve your daily problems it's all good. However they're called it doesn't matter. The big scary thing for me about design patterns is that once you see and learn the design patterns I tend to then see these problems everywhere and end up using these design patterns because I know them. I'm like oh yeah we'll solve that a proxy or we'll solve it with this or that. When all you have is a hammer right everything looks like a nail so I do say to use them as always learn them always use them but sometimes you may be being a bit convoluted to solve a problem because you like to use this new shiny thing that you've learnt. I definitely did that for a long time. The other thing we talk about really with mechanics is best practices. Most best practices are best for a reason it's a really opinionated thing the word best. Your best may not be necessarily my best but I think most of the things that have floated up to be best practices have done so through years and years of people using these practices and they've come before us it's almost like standing on the shoulders of giants. We are working on practices that people before us have decided are best for a reason definitely use them if you don't not everybody actually wants to use the PSR coding style because maybe you don't like your curly braces on the same line in that place it's easy then if you say now we're going to use our own coding style but when we're all using the same coding style after you've got used to the new coding style reading anybody else's code becomes so much easier there's a reason that we want practices in the industry there's a reason we want standards in the industry so definitely use them or don't it's your project right but I would definitely think to use them as much as possible again I was definitely guilty earlier in my career of thinking that's not right that's outdated way of doing things I could do things better playing other games is like I get so infuriated at a point where I'm repeatedly failing to do something switch off and go and play something else so this is as a really really bad gamer this is probably the worst game I've ever played for me personally does anyone know this game? oh it's so hard it's the hardest game ever obviously what I'm trying to say is to I really feel like trying out other languages outside of PHP gives you a really really interesting perspective when you come back to PHP and I don't mean sort of learning languages to the same level that you know PHP I just mean just dip your toe into a different language understand what problems could Python solve for me that makes it easier than PHP what problems could go or Swift or Java or whatever just look at what problems other languages can solve if nothing else if you come back to PHP with a renewed appreciation of what it does well you'll also have a renewed appreciation of what it does badly but that's for another day you really will you come back to PHP and you go yep do you know what this shared nothing architecture actually makes life a hell of a lot easier than the alternative so definitely I would really recommend anyone if you feel like oh do you know I fancy trying out go for a while just go out and give it a go that was a terrible pattern that I didn't mean to make I do apologise I'm actually uh because I really really like badly typed languages that you can intersperse into HTML I'm moving into working in back-end JavaScript for a while so I'm really excited to do that believe it or not um yeah no types for the win I think but I'm really excited to do it because I'd like to know more about what problems that solves and then come back to PHP with an understanding of how we could maybe do things slightly differently we've got a lot of uh influence from Java in PHP for better or for worse that's something that seems to be getting only more so as time goes on so maybe learning a bit of Java could be really really helpful so here we go my favourite tip of the day cheat if all else fails cheat does anyone know this game yeah kind of strike with a wall hack um yeah cheat in I've definitely learned a few sort of tips that I would consider to be cheat in over the years um this is not going to be like you know anything to do with hacking in and changing your grades or anything you know nothing to do with that this is for me when I look at wall hacking one thing that I really am so glad I learned I learned this fairly early in my career was empathy um empathy is like a superpower for developers and I really believe that it's something that can be learned and can be taught and can be practised and can be trained I think a lot of people think oh you know you either got it or you haven't I totally disagree you can definitely get better at being empathy this book is really really good this has nothing to do with um technology at all this is just a general book on empathy really really good and what empathy does for me is two fold really if I'm having some kind of um let's say abrasion at work and a disagreement um typically with Marco Povetti but it could be it could be anybody else if I'm having this disagreement being able to sort of switch sides and to see the problem from somebody else's perspective is just so so valuable so empathy is the ability to understand how someone else is feeling or how they're thinking and being able to do that will help you so much in development and in life let's be honest this is a life thing rather than a development thing but it's a really powerful tool to have if you're working in a development so if your boss is you know you really want to do this rewrite the existing code base and do it in the latest sort of framework that's hot today and the boss is like oh no we don't want to do that and you're like why won't he do it just maybe thinking about what is going through your boss's head rather than just going oh he just doesn't want to do it because he's not interested in the new shiny stuff maybe there's budget constraints maybe there's more projects coming up the line that you don't know about being able to think in someone else's shoes is amazing and the other thing is really really good for I find is we build typically people in the room will be building websites and websites will have users and being able to put yourself in a user's mindset is like really is like a superpower for me being able to think from the logs nobody's clicking the cancel button why is that and then you look and you think alright because it's not on the page when my users are actually on a mobile phone being able to kind of put yourself into the mindset of what your user's doing is so empowering it's really really useful tip to do this is totally irrelevant but this book is really good this is nothing to do with empathy but because we were talking about users I just thought I'd put a quick book up here this is an amazing book this is about how to it's not like I don't mean designers in the design of a website but how to design applications so that your users of the application end up becoming advocates for your application so I used to work at JetBrains and you know PHP storm we've always been a big believer in this kind of thing where we try and make our users feel so empowered that they go out and sell their product for us to their friends and co-workers and colleagues it's a really good book for that don't worry we're nearly at the end and then there's beer so the other cheat I think I've used mercilessly in my career code reviews I mean I've used this I've used code reviews to level up my development skills mercilessly also known as Marco is watching if you were here last year but code reviews code reviews with peers in work are great because if you're not doing code reviews you probably should be unless you work on your own in which case I guess yeah you're stuck but code reviews are amazing for getting perspectives of other people and for understanding how other people would solve the same problem that you've just solved and why they would do it differently more importantly it's almost like getting somebody else to do the work for you which is why I think it's cheating it's like oh I'll just make a token go at this problem and then I'll go for code review when everyone else can tell me how I should have done it but I will cheat to have you don't need to you know open source I I preached about open source last year but open source is a great place to get code reviews to level up your development skills I'll say it's free learning for me code reviews are really really good cheats it's teamwork yeah it's teamwork but only if you make a really proper attempt at the problem before you actually put the code review up otherwise it's cheating yeah I was going to ask but I just realised on the monitor here that it's in the title so I guess I guess there's not really much point in me asking this I don't know this how obvious is too obvious but because I tend to spend most of my day asking my peers and friends to do my work for me I ask a lot of questions and the process of actually verbalising a problem means that you have to solidify what the problem is in your mind before you can speak to somebody else and tell them what the problem is and the number of times I've done that and then said actually don't worry I've just realised what the answer is when I'm actually telling you the problem is unbelievable so there's this concept called rubber ducking where the idea is you take an inanimate object and you explain the problem to the inanimate object and in the process of doing that you solidify the problem in your mind and then the answer will come to you and it works so many times I say honestly the number of times I've said to friends ah I can't get this to work and I'm trying to do this and then oh no I know what the problem is now thank you and put the phone down is unbelievable it's a really really nice trick so yay that's my list of tips we're only 30 minute slots so that's nice and concise concludes my randomly conceived list of tediously linked things to computer games really you know I want to repeat a few points because that's what we do right at the end of talks so what I was trying to do here I don't know if I'm trying to come up with a catchphrase for myself or anything but let's give it a go be nice be nice you know it's just a general thing make friends, we talked about how important that is and have fun thank you very much