 Okay, hi guys! Sorry, I'll start now. Hi, my name is Michael. You don't know me yet. It's fine. I'm not that important. My name is Michael. You can find my slides online. It's still frozen. So, my name is Michael. You can find me on these places, on Twitter, on the media hub. You can also find me on my website. You can also get the slides. You need to get the slides. I'm recording the videos now. The videos for all the talks for today will go to this website. You can take a picture of this, go there. You can find me. You don't find me too often. I can find you on Facebook if you can find me. So, my talk is about agile toolbox for a PHP developer. So, basically, what is an agile developer? The agile manifesto describes a software craftsman who feels that interactions and interactions are more important dan processes. Seseorang yang percaya ia menghidupkan software kerja lebih daripada pengalaman yang berlaku. Macam mana kita berjaya dengan projek yang berlaku? Pada akhirnya, software masih tidak berlaku. Sangat menarik. Jadi, kita mengambil software kerja lebih penting daripada pengalaman yang berlaku. Kita rasa kerja berlaku lebih penting daripada pengalaman yang berlaku. Kita mahu membuat sesuatu yang berlaku dengan perasaan pelanggan yang penting. Dan, anggap perangkat juga mengubah perasaan yang berlaku. Kerana perkara-perasaan boleh berlaku dengan perasaan perasaan. Perasaan yang berlaku dengan projek yang berlaku atau projek yang berlaku boleh berlaku semasa setiap tahun. Jadi, menurut perasaan tersebut mengubah perasaan. Jadi, menurut perasaan itu sangat penting untuk pelanggan. Sebab itulah, anggap perasaan yang berlaku dengan perasaan yang berlaku dengan perasaan yang berlaku dengan perasaan. Nanggang yang berlaku dengan perasaan dan memerlukan kecil-kecik. Nanggang yang berlaku dengan perasaan dapat membantu mereka mengulangkan kerja. Nanggang yang tersebut juga berlaku dengan berlaku dengan menggambar, dan berlaku dengan berlaku dengan berlaku dengan menggambar dan merarikan orang-orang luar. Jadi, kita ada kisah yang berlaku dengan cerita-cerita. So basically you won't have tools that help you communicate better, collaborate better with your co-workers and just take over this. Having test driven and behavioral driven development is also important because what we want to do is to not build party software. Although tests are not in simple bullet, tests still fail. I mean a bug is just a test that you are not able to do yet. So having test driven development is helpful and it also helps you keep your sanity because you don't have to keep going in. Is this code working? Is this code working? When you have code to test a code that is working then you are safe. So they say. Being responsive to change is not waiting until the end of the development life cycle to fix a bug. But sometimes in the middle of working on a project or working on a story, which is a story, you find there is a bug elsewhere. So you either fix that together as part because there is a blocker for your story or you hide it off as a separate story or a bug story. But being able to respond quickly and find bugs and tell people about bugs is important. And being able to solve it eventually will be a good thing. It helps also your stakeholders and business owners in prioritising what needs to be worked on. So essentially being agile means being able to communicate effectively. It's not just being you alone in your own computer working on stuff. That's why the hackathon today with people working in the team because we want people to collaborate to work together, think together. Let's have a collaborative effort in doing things that matter. So the two box. Although the two box I'm talking about for PHP developers, but not all the tools are written in PHP because we're using the best tool for the job. We're just blindly following the music. It must be PHP. It doesn't work that way. In real life, it doesn't work that way. So we find the best tools that we think is suitable for the job given our knowledge and I'll be sharing with you my knowledge of what I think are the best tools that are available right now as a developer. So I've broadly categorised the tools into a bunch of them over here. Writing tools, collaboration tools, productivity tools. Productivity as in helping you write code faster, more effectively. Testing tools, what are the tools you can use to help you test your code and also deployment tools. What are the tools you can use to deploy your code quickly from your desktop, development environment into the production environment. Okay, I think I made a mistake here. Short of hand, some of you are actually developers. Write code on a daily basis. Okay, students who are studying to be something. I don't know, students. Okay, great. This is onus. Okay, right. So you have the ideas, we go. We need you. And the rest of you are categories. Okay, never mind. I hope you can gain something out of this because if you think of pursuing a career as a developer, as an engineer, I hope you will find some of the ideas I've shared with you important. You are going to be a manager that will be managing a team of developers. I hope this will also be, this knowledge will also be effective for you as a resource to go to a place for information and power to help better manage a team. So, I hope this will come true. So writing tools. Basically, what we want to use is an IDE. We go in the past as use text editor. I've seen people build entire websites using just Windows Compact. It is possible. But don't do it. Please, don't do it. That's crazy talk. So nowadays we use things like IDE stands for Integrated Development Environment. So what it means but it really means, everything is in one place. In one window, you can write your code. You can jump quickly from one file to another file just by holding the control, click or command click on that line and you jump straight to the next file. That is very effective and very fast. So it helps you work quickly on your code. Basically, when you're writing a software, usually it's not just for opening one file but for opening entire software in one file. Usually, we break it down into smaller files and smaller bits. We need to navigate very quickly but between these files is very important. Personally, I'm a big fan of Vim. Vim, as some of you might know, is a text editor only found in the terminal. So people who are terminal or console or whichever it's called. So this is very effective. You lock it into a Linux machine or a server that you spin up on a soft layer. You'll be able to get in and look at the stuff. But to edit stuff, you need some text editor that can take function properly in the terminal. So you'll probably use something called Vim. For you be on your Mac or on your Linux machine, you'll probably want to use something that's more powerful or with a lot of GUI. You've got a good graphic user on your basis. It gets a good track and drop. You can do stuff around. So P3Storm is a very effective tool that you can use. It's not free, unfortunately. Vim is free. P3Storm is not free. But I think it's a 40% discount right now. You can go and buy it on their website. So something free. You can look at things like NetBeans. NetBeans is free. It's very easy to differentiate. On the left-hand side, there's a project window where you have all your files. And on the right, there's the file you're working on. So basically that. One tool that's beginning some popularity nowadays is something called Atom. Atom is developed by Github. So it's a nice tax editor. There's another tax editor called Sublime Tax. We saw them in the first program we might be using as well. So the nice thing about IDE is that it color-codes everything. So it's like you see already in black and white it's very boring. And you very hard to find a very easy to list up on mistakes. Color-coding of the file that you're working on helps you identify errors perfectly. And IDE, for example, like PHPStorm, or IGLs, could be like underneath there's a syntax error. Like you write something wrongly or left out of a semi-bonnet at the back. So IDE helps you write less buggy code. And also having software that has everything in one window makes it very easy to do. You don't have to context-switch. As a developer, you want to be effective and very productive. And the biggest problem that a developer faces is context-switching. Context-switching means moving from one context to another context. Basically, you're looking at code, looking at the webpage, looking at the code, opening or locking into the server, looking at the code, looking at the documentation, looking at the code, reading your API file. So it's like all these things is very mentally taxing. So as a developer you want to be effective. You want to make sure your development environment is conducive to help you be productive. And having IDE, the Quasamo PHB store, there's a shortcut key that can be pressed to show you the documentation that's meant for this function that helps you in finding out okay, as a developer, I know what function is available but sometimes I do not remember all the arguments that I can cast in. So having documentation that will help auto-completes and helps you and hints to you what could be, what are the valid arguments? It's very good. So or rather it helps you be effective. So you see even using IDE, sometimes most often use key on the keyboard is a tab key. So because it auto-completes the entire sentence it's like a very long method name. You just type the first five characters it suggests to you the complete function name. Just press tab the entire method is there. So it's very good. So we're using something like P3Score Monet Beans and all that that requires a bit of massaging and adding a plug-in but it can be done. Atom as well there's a whole ecosystem of plug-ins that can use can download online and get as much as possible. RT FM, read the friendly manual because we are developers and we are not in an encyclopedia because our brain power is only so little bit. So what we do is we always go to the website for reference. Personally, if I'm writing PHP code I always go to the PHP site the php.net website documentation for all the what are the valid arguments like a passing this method. So sometimes I cannot remember so I just go to the website. Although I can auto hint on IDE but sometimes going to the documentation on the website is also very good. If you look at the php.net website php.net the php.net website although there's documentation there's also codes and suggestions that people put in. For example, looking for like I can search for JSON and code JSON and code methods. Great. Go in there and find the methods the arguments I'm looking for. What I need to put in to make this function work properly. If you scroll further down you'll see a bunch of sample codes which are very good. I cannot underestimate how many times I copy and paste the code and you scroll even further down you'll find people commenting about things they say oh ya user contributed nodes. Sometimes people talk about oh ya this piece of code doesn't work in php4 but I have a fix and it suggests it suggests a way of fixing this problem. So user contributed nodes are actually very good in helping you solve problems and find solutions to the problems that you're facing right now. Now tool that I use is called dash. Dash is a nice tool that can use I see and bring it up. So the dash looks at me like this. So we're looking for php php or let's say for the php4 permission or la and from here so JSON and code this is what we're looking for previously. So this is an offline documentation so if you're out in Wulu Island like Pulao Bin where there's no internet connection or something you want something that can you can read offline. There's a trend going on right now in the Rails community and the JavaScript community they call this they call it camping they go camping they really go camping they really go to the wilderness where there's no internet connection Rails camp and JS camp they really go out into the wild and there's no internet connection and they talk tech in those places it's very weird what are you doing? and there's no internet connection so at that point you're just left with your knowledge of what you actually know and maybe some code that you've checked out before so having a tool like that actually it's very helpful if you need to do quickly reference something that you need although most languages nowadays actually have a console or some terminal based thing you just ask for help what is this what are the methods or arguments available for this I think which we should have and I will try it I will try it but in the Ruby community they have it so in the Ruby IRB you can ask what are the methods what are the methods available for this guy and yeah so so look at so always follow the website if you're in doubt and if you need something offline there's something something cool to use they're actually not free though so you might want to think about it I think if you go to the PH3.NET website you can actually download the entire documentation into a CHM or like Windows Hub file you can just load through or even a HTML version an entire PH3.NET documentation something like that very good Right Collaboration tools sometimes developers nowadays don't work in a silo they work in a team they work with people around them they call their friends the people they call their enemies and they work with people that they don't really like but they still have to work with and people that really do like and somehow they can't work with and anyway Right so Collaboration tools how you share code and work with another developer one way to do that is use something called a version control system in the back in the olden days of the dot com era they have something called CVS and SVN which is subversion but nowadays the cool kids use git okay, i'm not that cool so most angel developers nowadays use git at one time i use something else called DAX but that's the beginning the story so git is very nice too it's developed by the same guy who wrote Linux Linus turn off so Linus follows he wrote he was basically Linus got frustrated with the version control system he was working they were working with being an open source software that Linus is but the project is using a proprietary version control system he got really pissed off with it because there was some merge conflict that it couldn't solve properly or something or other so he basically when i wrote his own version control system it became git is available on windows it's available on linux it's available on os x and maybe some other obscure systems but it's available anyway so you can find it very easy it's a command line too you can people who are comfortable with the terminal will find this very a joy to work with and there are plugins you can install as well and there are things they can do like put in there a free you can create hooks like for example if something is wrong with the server you cannot push it so you will actually carry that as well so yeah but you will not if you find the command line a scary place it's okay it's fine GUI there are GUI tools available for you so you can check out source tree source tree is a Mac app so you can download that and then look at the code in the comfort of the Mac Windows app right in Windows there are also similar software available so you can find one as well but place the holes your git repository so basically a version control system means one guy checking the file and then the other guy can then download the file the other if he has a file that has been if both are working on the same file this version control system will help you find out where the conflicts are and maybe help and then you can use the software to help you resolve conflicts right like say oh this guy is overwritten for line of five but I need line of five let's bring it back you can do that something like that so sometimes you can host this in a very nice place git pub is a website where you can host your git repositories freely right and there's another copy of the bucket it's all about free but if you want to host something private like your of your own client projects and you don't want other people to know about you can try using git bucket git bucket provides for private repositories so basically only you people that you want you trust right so you can do that for git hub you have to pay a little bit to get private reports but it's actually quite worth it if you're working in a big team right so git hub and git bucket are both regrettable but if you want something in-house as if you want to have a git server hosted in your network for security reasons you cannot host like you're working on a finance app or a banking app they cannot host this on a third party website because git hub and git bucket are actually on servers in America so you have some anti-american sentiments there you don't want to host it's fine it's okay you can just down an open-source project called git lab which can install and then in your own network and then host your own git server it's very cool git lab is written in Ruby and it runs some software server software passenger and its own entire stack of git services so it's pretty cool so think of git lab as like git hub but open-source version and then you can host it in user interface it's quite nice so yeah now that you have your version control system spanking new system you gotta find a way to agree among your developers on how to work how to work together so there are a couple of ways that you can work together you can just you can always just git push and pull everything from one repository that everyone works from or you can use what we call git flow git flow means to create different branches which branch have a different purpose so which developer have a development branch that you work of and then there's production branch that actually gets released so branches are like a copy of a code but split up then you can work separately after you're done you can merge it back into the main take so a branching strategy means you can create different branches one for hot fixes one for production and one for development work and one for future so all the developers work on off the feature branch when you're ready you merge it into development branch development branch then gets tested checked by QA and then when it's ready it's merged into the production branch and then what you release to production is what is in the production branch sometimes in hot fixes hot fixes are like oh ya it's released to production already but we have a bug that we need to fix very urgently so you create a fixed branch you do quick fixes you merge it back into master production and it goes to production so that's one strategy but on a small project you might not want to do that because you have a small team two or three guys it's just too much of a hassle so gift flow is only effective you have a virtual project which you're working with and you're working with a team of like 10 to 15 people each of you working on different branches gift flow might be a good strategy another way to work off is what we call a forking workflow a forking workflow each developer creates their own fork you basically fork a from the main master you create another repository that you serve they only serve you you yourself get has or has push right to this other repository and basically when you're ready with your changes you do what we call a pull request you take your pull changes and make a request to the main brand and say oh I got changes maybe 5 files and what we do things like on GitHub and on GitLab there are tools that support this we can create pull requests and you can see in a very nice webpage like the differences the diff which a diff is basically one sheet it shows you what was added and what was removed a diff is a very visual way of seeing what are the lines or added and removed and from this diff you can have a good gauge of weather what you're adding is going to break or not break the code so once you see the diff which usually is a webpage you see a webpage and you find that the changes made are okay you can then do a merge you can merge this pull request into the main branch and then you can effectively distributed or push it production so that's another workflow so there are different ways of doing this there's a website you can go to you can check out the website comparing workflows there are a couple of workflows that Google has smart people has come up with I didn't invent any of these workflows but people are smarter than me yes they are people smarter than me Google has invented these things so yes you go check it out and find the best one that works that fits well with you right another productivity too is use a bloody framework please use a framework I have friends who simply refuse to use a framework and simply want to just write his own code I will throw an explanation at him but then it won't change him so I'll just let him be but anyway if you have the power to do this use a framework if you have to write own framework go ahead write your own framework any framework will do when I first started as a PHP developer I unknowingly wrote my own framework because I felt the pain of writing code scratch over and over again so because I don't want to keep repeating myself I went and wrote something in which eventually I found out what's called an MVC pattern and when I wrote something I didn't know what it was I just intuitively feel that it was the right thing to do just disclaimer I don't have a computer science degree so I went and wrote the framework and I realized it's called MVC framework so anyway MVC framework means the sense of model view controller basically takes your website you have the view which is the HTML what you generate actually and show on the webpage the model which basically is a quote in quote representation of what you have to database to database there are users database you have shopping cart products and whatnot so a model kind of represents that and the controller is kind of like the glue the glue that that puts these two together so you go to the URL say slash user slash one which the controller you will know or you're looking for the user controller user controller you're passing the number one so I'll query the database look for the user with the id to one and bring it out and then generate all this properly in a nice HTML page so MVC framework like Laravel and KPHP are very effective in helping you write code quickly what's good about using a framework one of the advantages using a framework is that you probably can find other developers who have written stuff in this framework or really what you need to do is find a decent PHP developer pass in the manual for or either pass in the URL link for the website like Laravel.com or PHP.org KPHP.org and you will read up and you will ruin half an hour to a day you can effectively look at your source code and say oh this is what was the problem ah I know how to create new model for this so it makes it easier for your team members to new team members especially to ramp up right so you have using a framework which is generally quite well used in market it makes it easier for the higher people who can then come on what rapidly can be productive rapidly so that's important even especially in a hackathon like this you want to be able to rapidly build that application to build something to create and not like oh that's right I'm scratch I can do this in no pad ignore that guy so just go for the guy who knows the right things in the framework KPHP of course if you are genius you already opened your code written somewhere you can just pull out or get full from somewhere it's fine go ahead do it but for normal folks like us we like to use framework and also not just use a framework we use a framework that supports testing because not all frameworks are pretty good frameworks are makes it easier for you to do testing there are other frameworks that just don't care about testing there is this framework I've seen there is only written in 42 lines of code it's called nano I think that camera what it's got it's got nano or something 42 lines of code no test but it's readable you can look at you can look at a freaking code you know what's going on but for frameworks like this usually like bigger and you need proper test one thing another thing point you do is that as a developer you try not to reinvent the wheel as a developer you try not to reinvent the wheel so what we do not reinventing the wheel it's finding smarter people out there who has already solved the problem that you are facing so we go online probably someone oh I have this problem oh I have solved the problem you go stack overflow you find a whole bunch of these guys so when you do that they try to fight the way to share their code so somebody smart out there as a software problem you want to share with the whole world because that's what the open source is about if you want to share your knowledge about how to solve problems and solving the real world problems is a very important thing that everyone should try to do so people as smart people as written code you want to share it the way to share it is using stuff like composer composer is a package dependencies system for PHP so basically you think of code you package it in a certain way in a certain folder structure you name your files in a certain way and when you use or when you use a composer you will understand how to how to use the code and how then you can effectively use the code in your project so composer is something that is created for PHP so it's as simple as I'll show you some example later if you're doing front-line development like on JavaScript stuff there's MPM which you can use for no package manager no JS and for browser fire and bower these are package managers so what this do is that smart people has written some code you want to share the world they structure their project their code in certain ways and they share it and put it on some feed hub or something and then there's a directory this thing where all these smart people those shared codes are listed so then you can pick and choose the stuff that you need and use it usually you have a file that declares what you need which package which exact package that you need from all these smart people and then you can download all that and then use it in the review world there's something called bundler I think bundler is kind of like the gold standard for package managers some people will play only for that but it's fine so in the PHP world Composer in the JS world we have NPM Browserify Bauer Bauer is very interesting Bauer you have to install Bauer using node NPM so basically it's like you use a package manager to install another package manager which is anyway with Composer basically you pick and choose libraries that you like you basically find them all or packages.org so this is a website that the smart people around PHP has put together so the packages packages.org is a site where you can go to and then you can download you can do a nice search as a project that I've created for PHP Q yeah so that's my project so you can download 2,707 times awesome so you can find people's nice projects that are written and then you can use this to use it it's very easy so usually what we do is the text file is usually in a JSON format JSON stands for Javascript Object Notation which you don't have to remember just know it's called JSON JSON is data data is awesome source so to compose you want a composer of JSON and put in it like a bunch of code that will say I want this project I want this project in my in my I want this third party project in my library in my project so this is an example how it looks like so require this is a section that says I require this to I require respect res I require something called monologue monologue is like a login tool respect res is a res API server which you can download which you can use to serve API data like say on your phone you want to use data that you get from the database you don't need database you just see you can just expose it as a res API it's all very heavy job as you can call it Google data but yeah just know it's awesome source for managing sub and database we use something called PHP Active Record I personally like this project PHP Active Record so it's kind of like object relational mapping so it's kind of nice so instead of getting writing SQL queries you just write quote and say find all user dot find all basically find all that is as the design pattern called active record so it's nice so basically text file like this you run you run the composer binary so just download you just go to website you tell it where download the file download that run composer install you basically go online you want to keep it all the trees just write rest monologue you go do a git pool or download zip file that has a part that is a project you need and you can find all this nicely packaged into one folder called the vendor folder V and VOR so everything is inside there so all you need to do is include a new file I think it's called autoload.php inside the vendor folder and you just declare I want to use monologue and immediately you can use it already so it's so awesome yeah so before there was even something called composer we had to go to every single mother son's website and just do a git pool or download zip file or whatever and they got manages manually and all that it's a dependency nightmare so if some verse like what you see in this file is that you can also declare which version you need right so like say a particular project has a bug fix or we have a version bump that gives it new features in the past what we had to do is they go to the website download the zip file unzip it copy and paste into your project and pray to god it doesn't break anything right whereas nowadays they you can easily just open this file change up the number a little bit and you basically download the right thing for you and these guys follow a thing called semantic nam semantic versioning semva semantic versioning it means in the three digits here the last digit means it's just a minor fix it's just it will not break any compatibility minor fixes to this to this project second one is minor second one will also be there will be additional features that you add additional features and you bump the first number usually there's parallel compatibility breakage there need to do things that will break very badly you will update the first digit so so be very careful when you bring the first digit so semantic versioning is something you should take note of and as developers you do okay on your own project and you should also take note of them this is good habit hygiene so you run compose and install you run something like this you will see all the projects all the projects all the libraries that you need and monologue all the packages together into protocol vendors you can then open this up and look through and see how it looks edit files and read through it's kind of nice other dependency managers like bundler actually installs the library globally as in your entire system where this this file whereas with composer it just loads into a folder for you so you can play very well other productivity tools you can quickly spit out your ph3 server as our ph5.4 there's a build-in web server in php so you just like php dash s capital s localhost folder 8000 you basically load up into your your current directory you will take immediately serve it as a web server pretty cool eh in the past you can install Apache and other stuff which is in pain in the ass oops yeah so yes ph this is pretty cool good for testing but not for production okay but it does you get stalked by me because it's production okay of course there's another project out there called php up which is kind of nice you will load it into linux or or a macOS machine you basically just type php up you will start up Apache and serve your current folder in Apache which is kind of nice as well because on linux and on mac there's already Apache is already pre-installed so it's kind of nice so to run the build-in php web server just type php-s the ip address usually is 0.0.0 which is any ip then followed by a pod number usually is a pod 8.0 you have to be real to do this so usually you have to be pseudo yeah i can try yeah i can just try yeah so just take note it's only from php 5.4 onwards okay so try to release php 5.2 or if you're using php 4 please update your php do not use php 4 anymore okay other productivity tools sometimes running all web server is nice having to be able to write to check your own code the php code is nice but sometimes you want something a bit more comprehensive to do that we use something what we call a virtual environment which means from our machine we can emulate and create a we can spin up an emulated version of what we will be like in production chances are if you're loading if you're using php you will probably be writing a linux server or either a Ubuntu Debian or sent OS machine on the web posting site so enjoy our web posting servers usually there is a linux server and you yourself are working is working on a Mac or working on a Windows machine which kind of like there's a disconnect there you're not working in an environment which is close to production you're kind of simulating that or you're playing cheat by installing tools that look like it's on production but it's not so what we sometimes do is we spend on a virtual environment virtual environment basically we virtual machine we spin up a version of linux like sent OS or Ubuntu running manual machine with different IP address that you yourself can access to and with this you can install all the stuff that you need for production to make it look like production so it's very cool so one tool that makes it very easy for you to do this is something called vagrant you can go to vagrantup.com so you can use but you need to install a few other things it's not as simple but it's one two that helps you manage those things you need to install a virtual box virtual box is a very nice it's a free tool so let's see virtual box virtual box is so it's a free software you can download and basically with it you can install linux and make it run in your machine although it also shares the CPU and shares your RAM so vagrant is kind of like vagrantup vagrant is a command line tool that helps you manage these virtual machines and another good thing about vagrant is it also provides free package operating systems you can download like say on vagrantup Ubuntu you basically go and download Ubuntu from some website and download for you but sometimes I use this one called vagrant boxes vagrant boxes so you can use this as a way of downloading tools downloading and so tell people some smart people has put together different versions of operating systems and download into your things with your just in your machine so try that and if you're scared doing this yourself there's also a very nice tool somebody has put together and write a very nice tool called okay so there's there's online tool which you can then download so basically it's online so with this you have to go through the visit and you download a zip file which contains all the configuration you need to start to spin out the website I hope I can show you how it's like something like this you just type vagrant which will then start the box so this this is something I did last night so I went to that configuration file so the configuration is very straightforward just go in and say I want I'm using it in virtual box I even loaded up onto red space or soft player or whatever services it's kind of cool so you have instructions on how to do that it's kind of nice so then all these instructions on which port you want to open what firewall what web server you want you can choose engine X or Apache based on what your production server will have you install the databases for you you install additional tools like database management tools and kind of everything you need as a modern web developer so once it's done this is all you see probably you wouldn't see hang on just try to resize this alright so from here I can basically say oh okay bagian SSH and now I am logging into the virtual box and you can see here this is so this is you're logging into an Apache Ubuntu box in your local machine so you have which kind of nice so with this you can basically run and simulate the production environment on your local machine and what the best part is that this configuration can be shared with all workers so any developer in your team you can also have the same configuration and chances are they will have the same environment so anyone coming in your team oh I'm a PHP developer I'm joining company I don't know anything about setting up a server how do I get started so we can just pass it as well that break it up boom I have a PHP environment I can start with coding in PHP in less than one day so awesome which is true I'm not joking so okay so remember that POPPA is a good place to go other productivity tools try not to be scared about terminal terminal is not a scary place it's just text how many Mac users do we have here Mac users Windows users Linux users using alien people anyway for Mac users there's a very nice tool super item 2 which is I think terminal on steroids it's a bad description anyway so terminal it's a very good thing you need to have terminal you can do power management you can lock in the remote servers you can manage other remote servers it's kind of nice there's a very nice tool as well called T-Max T-Max it's kind of like take away as tap browsing on terminal so you can do very nice very fun takes like this let's just bring session here so this session I can then start like 2 Macs yes so I have a T-Max session I'm working on file I'm working on some file here I can do I'm going to put this up I can then do another split like bin here sorry bin here I can look at my codes if I need to then I can go down here and I can do ping to google.com so I can navigate all this Windows in my keyboard I can just press control control J K L H J K L I can do all those things so yeah it's kind of like tap browsing on terminal it's kind of nice and if you really want to create new Windows you can navigate back so I can do other stuff here so it's kind of nice so basically as I discover as a as a developer I really want to not use my mouse at all you want your hands to be on the keyboard and typing code so being able to do that with tools like this is actually quite good so there's T marks there's another version of T marks called teammate which is kind of nice we can use this to do remote pairing so we start a teammate session you you show your string that string you can pass it to somebody oversight in Scandinavia or Indonesia or whatever they can just clean that code that's same as a string they can log into your session and then you can collaborate on the code how cool is that yeah because of my company we are working on pair programming so when we're working on a project with a team in Indonesia what we did was we we use teammate to share code so code is still on my computer we start a teammate session my counterpart in Indonesia logs in to that teammate session we see my exact window and we can do what I show you even windowing and whatever and the best part is we use tools we use VIM for example we use VIM as a code as editor everything is in there so you can just run tests from your terminal as well you can run tests in another window you see the result and something like that kind of cool and then you can so what we did because you can't just see code you can talk to the guy so you can start hang out in the background and chat with the guy with the guy using voice if you if you're a Mac user please please please please for the love of God use a window manager so use something like size up or spectacle or moon what I mean is something like this so if I have a window here and I'm going to resize this and I got this guy here I'm going to resize that and oh my God it's going to be resize hell oh shit oh I need this to be full screen oh no it's difficult but if you have a window manager like moon or I have press control option command spacebar and everything is there great I need to go on the left on the left on the right and full space yes it's so effective so I'm just going resize big size please for the love of God use a window manager windows user easy windows 8 hours you can just drag a window to the left hand corner top it gets stuck to the left it fills up half on the left hand side of the screen you drag the window to the top you tap to the top it fills up the player screen that's so easy windows user easy Mac users so 3 tools you can look at which I would recommend and we are mostly free size up and spectacle are both free so download that the shortcut keys you customise them as well what I've done is I've used 2-combo which you have k-pop but what I like is you can customise you can customise the shit out of it I can you know shortcut keys and there's a very nice tool on the Mac called auto jump so for example all the folders I've been working on so the folders I've been working on let's see what was the folder it's called hackatron let's type j hack and brings me back to the folder I was working on so it's kind of nice it kind of remembers which folder you've been to kind of cool so if you're working if you're having or jumping within different folders because your project has multiple repositories and so you get to jump between different folders very often so if you use something like auto jump it makes it really quick to jump between folders again it will be less movement of the mouse more of the keyboard how about that alright so it needs start movement alright so that's for testing testing is we use frameworks as again we use php unit we use php unit per piece we use this there's now a lot of code section which is code section is a bit more comprehensive than php unit code section actually includes php unit inside right so it has unit testing in php unit it also has other tools that helps you do future testing so it can actually open up a page open up a headless web browser check the web page and then jump out of it right so testing tools they also testing tools called re-use called xdebug xdebug is basically a debugger they can just plug in and find and try to get variables what are variables being used what are variables being used what are the values that are in variables and stuff that are used in some deep narrow inspection if you're using php5.4 on birds you can use a project called phpdbg which is a project that the guy that created phpdbg supports so 5.6 is actually so 5.6 phpdbg is built in by default so you can use it to go debug it other things another group of tools that we use are automation tools automation tools basically if basically automate a browser we simulate skirting on the browser and goes to home page so these automation tools selenium is the the oldest boy in the block well most we use it it's quite nice so basically you write in the dsl pass is java it's java that runs in the background pass it some values phpdbg actually has a plugin we can download it is that it will basically run a selenium test so the selenium test you can tell which browser you want so you want to run Chrome browser Firefox browser Internet Explorer or that can be done so basically it's kind of cool you can even do it on different machines so you have in your office you have one guy with windows laptop you have one guy with Mac laptop both of you run a selenium expose a port or from your machine just type selenium run or something phpdbg and you basically simulate the browser popping out of the other machine you can also use something called source lab source lab is like a hosted version of selenium so it has API that you can just call and it will basically run and do screen video capture or how you run in the browser if you're doing code work on android you can also use something called test droid or selen droid which is kind of similar test droid actually runs it in all the known android devices in the world in the ruby world they have this thing called capybara which you can also use so basically what capybara does is it starts a headless web browser so basically a webkit for example that runs in a headless web browser means it doesn't show the grid it just runs in the background it just goes to pages tabs and things clicks on things in the background without opening the browser so capybara can do that so basically a parent's headless browser in the background going to different pages trying different links to do or whatever so you can use it to do feature testing you've written an awesome shopping cart feature and you now add things which I will test going to a product page adding the items to the cart going to a checkout page and making an payment so it's an entire flow you get something like a QA guy clicking his browser every day you can do that it's not a problem but you want to simulate it make it less tedious you can just write a few lines of code and then do all this for you which also which makes it more effective which means you have to hire one less guy alright you can also go to modern.io modern.io is a browser started by Microsoft so everyone needs to test an IE because we need to test an IE so modern.io has a listing of different virtual machines you can download that has IE all the way down to IE 7 IE 7 IE 8 IE 9 IE 10 different operating systems or versions or windows running those browsers and you use those spin up in virtual box and then basically click around and look at the browser and stuff it's kind of nice what we're actually doing in one of our projects right now we are bounded by contract to support all the way to IE 7 so we have to have bunch of virtual machines that's all this magic yeah so modern.io is a very nice page all these resources put together you can even run there's even a if I'm not wrong there's actually a part of the site just key in your website URL go there and then you basically check the page and say what you suggest to you what you need to to make your website support different versions of IE it's kind of nice deployment tool you've written all your code you've tested all your code and now you have to put your code into the worldwide web because everyone needs to look at your code so how do you do this so one way we do this is use you know the good old fashioned way is open up an FTP client and there's an FTP of the browser which is fine you still do that it's fine but most people nowadays cool kids we use automation tools like this we call this continuous integration so basically we do continuous integration basically it's kind of like we're checking the code the code it runs through it runs through a process of testing it gets tested in an automated fashion so you do have to keep testing the code because it will team everyone checking the code at the same time you can't be checking everyone's code at the same time so testing everyone's code at the same time so you have an automated way of running the test on the entire code base and then once it's done you can run an additional an additional line of code that basically does the production you call it a continuous deployment so the moment someone in your team checks the code it appears in production how cool is that this is actually very good but this is kind of a good way to be effective in hackathon if you're doing a hackathon like this you are very tight you can get very tight in the middle of the night and you don't want to make mistakes you do this trivial things that you're pushing in production so what we do in the previous hackathon I actually did a kit hook so on GitHub you basically trigger a build on my Jenkins server which will then do a pull on my production machine which you get pull on the production machine so once I pass the test you get pull and immediately I see it on my production machine so all this is done in an automated fashion so in a team you're working in a very new team make it a goal to get all this done from day one the reason is so the faster you can get this done the more you can faster you can because you want to build the right code and have the business owner look at the code as soon as possible so the right code then commit boom boom boom oh it's a bit of production or rather a staging area where your business owners can expect to check which is very good so you can check out Jenkins you can check out Klu's control it's an open source version for private CI if you have GitHub repository chances you can already cook it up to private CI and if you have test suite really built into your as part of your GitHub repository or part of your code you will see right the test suite very cool deploying you will probably have to put this on some place on the global web so we try to decide you want to put it in place you know we heard from Softlayer previously you know they're nice and it's Amazon web service it's Heracool Heracool now supports PHP which is kind of kind of nice Windows is your Windows is your surprisingly supports PHP because they have GitHub servers that you can speed up Heracool and Windows you all have this and F4 for example they have they have this thing called platform and this service so basically all you do is get push and that service will have all the server all the tools that you need there MySQL server will be there will be Apache web server and you can go in and install everything so it's kind of nice App Engine as well the other tools you can find online usually I'm writing I'm writing a lot of JSON I'm writing I want to make sure my JSON data is formatted properly so I use the two call JSON viewer so I just copy and paste the JSON put here you format it nicely okay so you can cable form and stuff which kind of nice you're writing code I will recommend you try Nitrous.io Nitrous.io is basically a web-based ID so basically you will spin up a Linux server which has either Ruby or PHP built-in you can then write a code in a web-based text editor which you can then deploy and test it's kind of nice it's everything in one it's free up to seven points and you can do online collaboration on Nitrous.io you can actually invite your friends or co-workers to log in and collaborate on the code it's kind of like Google Docs but for writing code it's kind of cool so it's kind of cool Pivotal Tracker so if you're doing project management I would recommend you check out Pivotal Tracker first Pivotal Tracker it's kind of project project management Pivotal Tracker it's a nice to check out so this is another quick question as far as JSON viewing is there any online system where you can put in the JSON output and it'll tell you the array basically the PHP code to pull it into an array because that would save like a lot I've not seen that but yeah but good to find out anyway, more readings if you're really interested in pursuing a career as a developer or manager or hiring people who do PHP work you can check out these websites PHP the right way of course PHP has a bad reputation of people writing code in a very bad fashion PHP the right way is a list of all the best practices we try to read out all the bad haps it's generally want to be nice guys so check this out there's another bunch of guys that has come of a thing called the framework of interrock group so the different types of PHP frameworks out there so they feel that they have a way to where somebody who has written a brilliant piece of code and share it on cake PHP or Laravel and all these other guys so the guys who came here to form a group a working group we call it a PHP framework interrock group so Laravel and cake PHP are both the greatest behind them contributed behind those projects are actually part of this group so also the guys who came out with composer package manager one book you should read is clean code I think it's a very good book to read for any developer because it helps code examples that are in Java but it gives you very good a basic introduction to how the write code can be kind of a disclaimer it's not easy to write code to but how you name variables what level of abstraction should have where does the comments matter in the code where how should structure it work and different levels of abstraction this is a very good book I recommend any developer who wants to be good at your craft somebody has put together a list of all the awesome awesome source PHP projects so you can check them out my project PHP Q is actually on it a couple of Singaporean projects are also on this wrestler OP of if you guys your project if you need this is a good resource to turn to it's nice to categorize into different types of categories or software so you can use this as a resource to find tools that you need and actually that's all I have any other questions I actually took out one hour oh my god sorry I hope you have entertained and I hope I hope we didn't pause it too much if you have any questions you can find me you can find me over here if you have any questions just tweet me or yeah there are ways you get to be up and around pretty much to for a few more hours so if you might need to ask me something just comment okay oh yes the slides are available here so j.mp j.mp slash php agile 2 months it's actually an extended version of another presentation I did before so updated and checked yeah that's all I have thank you very much