 So, welcome everybody to my presentation slash workshop about what you do when you're new, improving video game. My name is Christoph or my common nickname is Fush. I work for Wikimedia Germany, so you'll find me on Garrett of Herbicator under W&E Dash Fush. I work for Wikimedia Germany within a few years now and mainly as a developer in the process of technical wishes. So we have those German technical wishes where we address several wishes the German speaking community has, but that also affects the international communities and in those cases we cooperate tightly also with the contact team from the contact team and do things for everybody. So if you know the women's lighter or such a common conflict, any view maybe you saw in the video picture already. That's the things that I mainly work on. Now to this talk, what are we doing here and why are we doing it. So the main idea is that I will present you as I assume you can as but also maybe experienced developers with a video idea so I will find some more different things to do in the video. Using code style checks or code mr, this is tools and fabricated tasks. So why am I doing it? So because I want you to get like insights into the MediaRiki core quota. You should get used to the processes around reviews, good review, using it. I want you to be able to get things done that are not too complicated so you can get motivated and satisfied because especially for beginners it can be a little hard learning so there's a lot of stuff going on in the MediaRiki code and all its extensions so it can get quite complicated. And I want to give you ideas for simple things you can start working on and getting better and better on it. So you don't need to be a good hacker, you don't need to have all the knowledge about the code and you don't have to have all the time to dig deep into it. So you are starting with simple things and moving our way a little bit up. Yeah I want to give you something to do and you can always say you know even if it's simple things and they may seem very easy and everybody helps appreciate it really because also the experienced developers do not have the time to do everything. So what is this presentation not? I will not talk about how to use Git or set up your very common use Git review. There are really good tutorials for detailed pages, they are holding the presentation. I will share it in the ticket later. I will not talk about how to install Composer or not share it in NPM. This is a kind of a quiz, but as I said you can look into the presentation later and click all the links and you will find out for that. So I will also not talk about how to get a fabricated account, a carried account or get your local media and media installation done. There is a product when you come out later, it is that day at 4pm in the volume where you can get help on that. So go there if you need to start there. We start with really, really timing things, the code style. Miyuki has coding conventions, so one mentions how we want to have our code written so it is easily readable and that is like common style, loose and all media projects. And we also have Linda set out to check these rules. So for this as we are styling, it can be installed with NPM and run the scrunch. We have ESLand for JavaScript code, also run with run and installed by NPM. And then we have the K2P code snapper that is installed on the Composer to check code styles of K2P. So the idea to find issues there is, so normally we have these auto checks and normally they all pass on the code so the code in theory should be clean. But in some cases we disable checks, especially you will see it later in the PHP code snapper because you know the code evolves and then at some point we decided to have it coding styles that way or that way and big parts of the code do not match these coding styles yet and no one took the time to look at it and fix things there. So that's where you can find issues. And in general you do like that. So you look for check that are disabled. We enable them, run the tests and then you will see the issues and then you can fix them and that will help. To start with styling, so honestly that's really not much going on with open-styled issues because they can be, in most cases, they can be fixed automatically and that was done already. But in theory you can install styled with npm run so go to your code dictionary of mediocre key, run npm update and it will install all things necessary for the styled checks and then you can run them with run styled. There's a contact file where all the rules are in this styled rc file you will find it also in the root directory and the rules that are in place by wikimedia that are in a git repository where everything is configured so this local styled rc file extends these rules. When you look at this local file you won't find any disabled rules but sometimes we use any rules in place in the code. So if you search for styled and disabled in the code you might find places where everyone is disabled and then you might find things to do. But for styled, no, maybe not. But moving on, we have use link for JavaScript. It's similar so you can install it also with npm update and then run grunt to run the tests. You will recognize the same schema kind of so you have the rules file in that case it's in rc. In both cases also for styled it's a JSON file. The rules file extends existing rules from the wikimedia environment so these are the basic rules and also it's not really common that you have to find disabled rules in that file Also the JavaScript code seems to be pretty clean but still you have the chance to pick things with working in the code directly and there's the keyword to look for a 30-year-old dash to say anything so you might find people that in the code. So way more interesting is in php code snippet and because we have a lot of php code and it's partly pretty old and the schema here is similar but you use composer so with composer update you will install all three requests to run the checks and then with composer phpcs you run the code styled checks on the code base Since php code base is quite big you can run it for me on a quite quick machine it takes around two minutes to run them for all the files and if you have a slower machine and also a SD card you can also just pick certain paths or just check some files you can do that with the phpcs checks so if you don't want to wait all the time always when you check it just pick a dictionary there, a directory I mean and look at it and say what's up in there and for the code sniffer it's not called the rules, it's called SNIS so you're also at a config file that inherits all the rules that should be in place also from a general rule set but when you look at this XML file in core you will find a lot of the same rules and these disabled SNIS or rules they all begin with the exclude name and then you have the name of the rule so when you look at that file in your core directly you will find a lot of the same rules because there seem to be problems in several places of the code where these rules can be applied but this is something we don't want so some easy things are for example things like that's a quarantine comment with the missing parameter name or it's a sign comment that's in line and that shouldn't be in the case so you can just play around with the things just disable the SNIS, run the check and see what comes up and maybe you'll find something in the case and there's also the option to give disabled rules in code so in line so this would be that key word then to look for but you already have a lot of things you can find when you adjust these rules into main config and run the test and see what happens so that's for code style that's the next level, let's have some fun is the PHP fun is a static code analysis tool for PHP we use it in code like for a few months now so it's pretty new but it does things that go beyond style so the checks for common issues in the code for example deprecate functions but also run or missing documentating run or missing typings stuff like that and there's a small description how to install and use fun with the media pick code that's the link that's in the document and there's also an issue on fabricator that's like the epic general fun issue so if you fix things by fun you can just add that ticket ID to the page but later on we'll do that yeah it's fun, it's a bit different so there's also a config file where everything's configured where fun should look for things and stuff and there you have an array with suppressed issue types so looking at that array you could also disable rules from there and then run fun so again the same idea you have the rules that are disabled issue types that are suppressed you just re-enable them by uncommenting the disabled rule run fun and then you will have output on your console but it looks weird because it's not really ordered better you look at this file this will be generated when you run fun so there you will find the output also latest run of fun and then you can see all the issues I can later on give examples so we won't have an idea how that looks like some easy issues you can find with fun is also stuff like it's a signature that does not mesh yeah so the parameter is not available but it's not a documentation so these are issues that can be fixed by using the PHP doc so we try to use or PHP doc is used widely in many places but not everywhere and sometimes it's wrong so the parameter has changed that the PHP doc was not adjusted and stuff like that and it's really good when this gets improved because PHP doc helps also the IDE so that you will get correct auto-completion and stuff like that so these should be simple issues and there's a lot of these maybe easy but could also be complicated with stuff like deprecate functions so once in a while there's a function to code that we will place with another one or with another thing or whatever and the old function gets deprecated but will still be used in many places so there is often the case that functions use that was marked as deprecated because it was replaced by another function or another thing and these things can also be found with Spark the fixes for these problems can be sometimes very easy so sometimes it's just okay, they used that function deprecated, now they use this function okay I just replaced the function but sometimes it can be tricky so always when you look at these issues if you have the feeling okay I don't know what to do here seems way more complicated just grab the next one so with Spark you will find several things and as a hint on what to do with this deprecated function just look at the code in the deprecated function so what do they do now in that function or look also at the deprecated function maybe there's a line where it's written in okay you should now use this instead of that just a hint okay so now coming to the next one if you feel more confident to say you have done many things and want to move on get a deprecated task on deprecated we have tasks with special tasks one is an easy task and as the name says it should be an easy task I say it should be because it's easy it depends so you can look for all of these tasks this link in the document is clickable so there you go directly to the page of the easy task and there in the left there's a point where you see open tasks also we have the effect need to volunteer that could be also an easy task sometimes you have post-tags but it could also be that it's a more complicated task just look into it and see what it says and any kind of a bit just before you grab a task see if it's unassigned so most tasks are maybe already assigned to someone so then the general means something's working on it when you form something so what do we do so let's say you found a style issue or you found a fun error you face or you found a task you work on I have here a rough workflow on what's going on from there so it's a fabricated task plenty of tasks there's a good thing you should do so no one else is working parallel to the task then of course you can see an issue depending on what you do there you can push it to ver it get reviews sometimes you get comments on your patches so you have to improve something address these comments fix the new issues and wait until you get your plus two so that's a rough thing more detail before you commit anything you should yourself run the call start checks again so maybe you broke something or if you introduced something new you did something that's not in the call start so run the check yourself and you will see ok everything is fine now I can commit and now I can approach it for committing and putting patches to ver it I also have the link here to a small condensed tutorial how to do that and if you have a task from fabricator don't forget to add the task this commit message this will help you commit then the mechanism will start that automatically links the task to a patch and your patch's link to the task is clickable and it helps a lot to find oh what is the context of that patch also for reviewers to see for that task there's a patch up now you can the common way to do this is by column and number but I kind of realize that if you put any task number into the commit message because starting with a team it will be recognized yeah the next step where you have committed everything is you need to get reviews of course and maybe also help add people to the patch or pin people in the task the people you have to add or to pin it depends when you have a task from fabricator usually you have a project attached so let's say for example the project review that will be a project usually you can click this task and you can get a list of members that are in chat to that project so this is one hint on who to pin or who to add as reviewer there's also a bigger tutorial about how to get reviews on vfp you can fix it a little bit later and see there and also you can always ask in IOC and as stated today we will have also like conference days this new IOC help power where you kind of can come in and say ask questions or ask reviews and stuff like that and when you get reviews address the comments there update your patches so they are fine and shiny and reviewers are satisfied and then hopefully get a plus two when you said add or pin people does that mean that you can add people to review your patches and get it? yes there's a place that says there's a button add they can type in a name they can add people to review your patch adding people there does not necessarily mean that they really will look at your patch in the next hour or something because it depends on how people deal with their messages and as they get a manual as a react on that so but it's like a starting point add them to the patch if nothing happens pin them on the fabricator if nothing happens go on OIC and write them directly so to get but when you do like small things usually someone is looking on master what's happening there and when you see the tiny patch then it can be deducted and it can be used to get much more editing process it seems to really go on and looks good and also depending on the project there might be people that get added as auto reviewers so if you upload a patch for project revisions like for example what I will be added as auto reviewers so I automatically get a hint oh there's a new patch up similar to other projects so if you have time to try things out if you'd like to I could come to your place I could tell you with stuff you could always contact me on ISE also if you do not find issues in core we have a lot of extensions running and there might be issues in these extensions so when you want to add idea on what extensions are relevant when you look at wikis that's a special page, special color version and you can see a list of extensions that's installed so many extensions in place that need to be maintained as well so you can also look there and then always useful is this big help page how to become a media wiki hacker there you find also all the links nearly all the links I had in my presentation to get you on board mostly with the stuff for media wiki I will after this presentation ok and thanks for your attention and see you around on online or offline you have to take a look and people please clap if people weren't interested in setting up media wiki as Kristoffer mentioned already come at 4pm in the main hacking room and we will help you get set up