Guitar and Excel. Pentatonic and major or minor scale positions worksheet. Get ready because it's time for our guitar scales to... Excel. Here we are in Excel. If you don't have access to this workbook that's okay because we basically built this from a blank worksheet but we did so in a prior section so if you want to build this from a blank worksheet you may want to begin back there. However, you don't necessarily need access to this workbook if looking at this from a music theory standpoint because we'll simply use it as a tool to map out the fretboard, give us the notes, give us the scale and chords that we're focused in on. If you do have access to this workbook though there's currently like nine tabs down below. We've got eight of these example tabs and an OG orange tab. The OG orange tab representing the original worksheet we put together in a prior section. It now acting as our starting point going forward mapping out the entire fretboard giving us our entire musical alphabet, letters, numbers and combining them both in letter and number format. We have a worksheet or a key that can be adjusted with this green cell creating the worksheets on the right providing us the scale that we're in and the notes within that scale and then the chord constructions from the notes in the scale. We then wanted to focus on the C major scale in open position on the fretboard and then map out all of the chord constructions from each of the notes in the C major scale. We did that starting of course with the C major chord open position mapped out on fret one through three. We then represented in colors the one three five and then we looked at the fingering. We did that for all of the chord constructions including then going to the F. We skipped the two and the three so that we can first look at the major chord constructions and then to the G same idea and then we went back to the minors on the two chord, so D minor and then we went to the three chord and constructed an E minor and then to the six chord and constructed an A minor and then we went to that kind of funny one the seven chord and looked at the diminished. Now note that we did this all in open position here which I'm defining as frets one through three. That's kind of a great place to start because then you can really understand this open position not just as a scale shape but as a series of chords that can be combined together to create in essence this scale shape. Now we're going to go to the middle of the guitar and start to think about building actual scale shapes and think about it in terms of scale shapes as opposed to in terms of chords. So this worksheet I know this looks quite intimidating right here because we're mapping out this is what we're going to do to start out with.  It goes 12 frets out and then we mapped it again to 24 frets so that we can clearly see the patterns as the patterns repeat. So first we're just going to map out these patterns on the fretboard and then we're going to dive into specific areas starting with the middle of the fretboard which is going to be on fret five in essence five through eight is basically your major place that we can start learning the fretboard and that's a great place to be because then you can naturally grow learning your positions to both the right and the left whereas if you learn the positions in open position then you're kind of learning in a different way the same things we did before and you can't naturally grow to the left because you're at the nut. You can only go one way. So with the scale positions I would suggest if anyone's new to them or even if you're not it might be best to kind of like think of yourself right in the middle of the fretboard learn that then you can naturally expand your positions both back towards the nut and up towards the other side of the guitar as well. So then once we learn that middle position we will expand both up the guitar and then back the guitar and that means that we'll take a look at this position again in terms of scale positions and then we'll learn the caged system which will basically take the chord constructions and relearn the top bit of the guitar in another format so the top bit of the guitar we will then have looked at in terms of only scales basically and now we're going to look more in depth about the chord positions which are within the scales alright. So we'll actually construct this worksheet this time we'll do the pentatonic scale we'll do the major and pentatonic scale we'll do the major scale we'll see how they fit together and then we'll map out a chord within it so you can kind of get an example of what's going to happen later when we do the caged system and we start moving up shapes and how they fit into the pentatonic scale. So this will be Excel intensive however I think it's good if you're looking at it just from a music theory standpoint because you'll see how we're kind of building out the fretboard as we go and then like I say after we do this we're going to then focus on one specific point the middle of the guitar basically fret 5 here alright so to do this we're going to go to the OG tab I'm going to copy it over I'm going to hold down the control before I do this I would kind of like to add actually this circle of thirds that I added so I'm going to go back to this example tab and we have this circle of thirds that we added which is just basically taking every other note and I'm going to try to copy this into our OG tab so I'm just going to copy this here and go to my OG tab so we have it there I'm not going to put it in the numbered ones but only in the ones where we have the letters and numbers and I'm just going to paste it right there and there we have it so it's taking you know the C and then the E so that looks right and then I'm going to copy this again all the way down not for the numbered one but for the lettered one boom so there we have the C the D and then I'm going to copy that down to here as well we'll say boom right there and then I'm going to go down and go to right here boom and then I'll go down to this one right here we have it there and then I can go down to this one right here have it there and then this one right here okay so there we have it so hopefully I did that well if not we'll fix it later you know it might actually be useful in the modes as well so I'll try to do it I'll try to do it fairly quickly let's go to the modes too and do my circle of thirds over here just on the top ones here I'm going to paste it to the modes and we're going to say boom okay mo modes there's mo are there more modes mo modes to the right alright so there we have all the modes have the circle of thirds at least on that top bit okay that's enough so now let's copy it over I'm going to hold down control left click and drag it to the right there's my og tab I'm going to say this is going to be the practice of the scale overview and I'm going to right click on it and make it blue so let's make it that blue right there that's what I usually do that blue okay and so then we're going to start off the same way because I want to make sure my key is in C we're going to do it in the key of C or you can think of A minor as well if you want or other modes but those are the main two and then I'm going to then at least when we talk about the pentatonic it's going to be in those two okay so then let's select these let's unformat these home tab style format painter and I'm going to get rid of the formatting on this one going to let's go down here and say clear the rules clear the rules get these rules out of here I've had it up to here with your rules let's get rid of the rules on the og tab so we don't have to do that step going forward home tab style I'll get rid of the rules here no rules no rules around here I make my own rules I make my which means I don't have many rules because making rules is hard man I don't know if you've ever noticed that I sat down to make my own rules one time and after like five minutes I was like hope this you who are you to be making rules over me and anyways so then let's go ahead and hide some cells so we're going to hide all of the all of the just the numbered fretboard so we can see the numbers and the letters oh no let's copy of them over first I'm going to select the whole thing I'm going to go from here down to here I'm going to copy that and I want to copy it all the way down because we want to be working in the key of C major each time so I'm just going to copy this and put it here I'm going to copy this and put it there and then just keep on pasting it down throwing down the pasting down boom boom all right and then we're going to go back up top again and now let us hide the numbered only ones so I'm going to put my cursor from one to twelve and right click and hide that stuff hide and then we're going to hide let's go down to let's make it let's make it so I can hide some of this stuff up top so I can I'm going to hide also I'm going to look at 24 frets out which is a longer fret board than we've seen in the past obviously and I'm going to be hiding from let's go from let's go from Z to A J right click and hide that stuff so we got the 24 fret fret board and then our worksheet on the right hand side and then normally when we hide the ones underneath I've been hiding from here down so I'm going to hide from here down yes that is correct so let's hide from here down to the next one I'm going to right click and hide and then I'm going to I'm following this blue line right here so I'm going to go right below that blue line because that's what our custom has been and I'm going to hide all of this stuff right click and hide and then I'm going to go down right to that line again this stuff right click and hide we're going to just put it in the closet just put it in the closet and no one will know that it's a mess in there just throw it in the closet hide and then I'll just you threw everything in the bathroom so what if they need to go to the bathroom they're going to see all the stuff in there you have that's not a place to hide it you have to hide it like in the closet where they're not going to go so they don't see all the stuff that we hid in there let's go up top because it's a mess in here we have to hide all the stuff okay so then let's map this thing out I'm going to hold control and scroll back up a bit and I'm trying to make it large enough so that we can see 24 frets on the fretboard as well as our worksheet or at least a piece of the worksheet so that we can see the notes in the scale because we will be using them to format our fretboard as we do so remember there's only 12 notes in the musical alphabet and most guitars are going to be somewhere a little bit over 12 frets so they have all the notes on each of the strings and then they're going to repeat a little bit and some guitars will be longer than others but not many guitars are going to be 24 frets long however in theory it's useful to kind of extend the neck of the guitar because then we can clearly see the pattern as we're repeating these patterns on both the pentatonic as well as the major scale patterns so we're going to map out the whole pentatonic pattern here and then we'll map out the major scale pattern which the pentatonic pattern will fit into we're going to do it on the entire fretboard first but then we're going to focus in on in future presentations just that fret 5 position if you look at a normal guitar it's going to be around 12 frets because that's when it starts over again and notice the middle of the guitar then is around fret 5 that's why it's quite useful to start learning your scale positions in the middle because you can naturally expand out from that middle both ways but first we'll map out the whole thing so I'm going to go from E all the way over to this E on 24 frets out and we're going to map out but we just need 5, let's do 5 notes I'm going to make these 1, 2, 3, 5, 6 those are the ones that are going to be our pentatonic home tab styles let's make those, no, home tab font let's make those green I'm choosing this green so we're going to start with the pentatonic only 5 out of the 7 notes so I'll select the whole thing again and then home tab styles drop down conditional formatting this is going to be equal to the C and this is going to be green they're all going to be green again we're doing that thing, everybody has the same the same color the same uniform, everything needs to be uniform here everything needs to be uniform people trying to change the stuff on the uniform, no one knows what they look like when that happens I'm tired of that crap so people that are doing that being a piece of crap and now they're working on being the whole pile of crap doing this piece of crap stuff and now they're working on being the whole being the whole pile so then I'm going to skip the 4 and go to the 5 to the G and then we're going to say this is going to be equal to the G and format and then okay then Uno, vase, moss one more time on the A A okay so there we have it so I think that works and now we're going to be focusing in on this position 5 that's going to be kind of like our starting point middle of the fretboard in essence and there's that shape that you might be familiar with if you've learned that's not like a technical term because some people don't use that terminology but a lot of people do they would say this is the major pentatonic or the number one shape and I will use that as well some people will call it a G shape using the G shape that we talked about over here this shape to indicate the pentatonic shapes as well as the major shapes which is kind of a useful tool it's another way to see it so if I go back on over here I could see the G shape is boom boom boom boom boom boom right there so you can kind of the G shape doesn't have all of the notes in the scale or all of the actual fingerings in the scale but you can use that as a home ground but remember this isn't a G though it's a C so when we use the caged system we'll talk more about that later but you can use the caged system for these shapes as well I would learn both learn that this is position one because a lot of people say that or that this is basically the G you can think of it as the G major shape which is currently in a C position because the root note is on the C but we'll talk more about that later right now we're going to then extend the rest of these shapes so let's copy this again and say position number two emphasize kind of like the overlap here so if I go to this position the next position goes right here boom boom boom boom boom boom boom boom boom and let's make that one yellow so I'm going to say yellow and the thing I want to point out I'm going to make this a little bit longer so that you can kind of see the over is that there's this overlap in the middle so there's always going to be these overlaps between the positions so just like we saw kind of in the shapes where we saw the G shape can kind of also be an A depending on how you look at those notes an A or a G because they're kind of in between the same thing happens with these pentatonic positions so this is going to be position two and I'll copy this out this is going to get messy looking that's part of the thing I'm trying to point out here is it gets messy and then we're going to say that this one let's make this green and this not that not the fill color make it green and this is going to be position three so now we've got position three let's put it so we can see right there so boom boom boom boom boom boom boom boom boom and then you've got to pick then this one to the right here so I got to actually extend that and you can see then that this shape is actually one two three four five frets long and this shape is only four frets long so if you imagine your fingers on each fret it fits perfectly that's kind of the point we're trying to get a shape where our fingers basically fit on the fret can't get it perfect some of them have four and some of them have five because you know they're kind of these two notes are kind of sticking out here but that's kind of the goal we're trying to come up with an economical shape that it has everything that you need within one kind of fingering position and you can think of your hand at that one kind of position so let's do the next one I'll actually name these I'm going to call these you're going to I can call this a one or you might call that a G shape if you want to use that kind of terminology and then this I'm going to call it position two and you might call it an E type of shape if you're if you're going to name it from the cage type system so it caged is spelled C A G E D so if I start on a G then this would be like the E shape and then this one now we're going to go to position number three which is going to be a D type of shape if you're going to use the cage system and you can kind of see it with this little bit right there and then we're going to go to position three I'm on position four now which looks like this let's pull this one up this time so we can see it a little bit better so now it goes boom boom boom boom boom boom boom boom boom if you're going to play it like up and down or down the fret board let's make that a different color on this shape and I'm going to make this one blue and I'm going to say this is going to be a four and so now we add a D we go back around to the C and you can see the position and now we're past the 12th fret and so we're back basically to position one so you can see this is the same position in position one in essence so let's copy that same color and I can say wait a sec that's position one over here and that's why you can see the C shape right here C shape here C shape here so what we've been learning in position one is basically what I would call in open position is what I would call position four or you might label it as a C C position so that's going to be one and then we're going to go to position two and so I'm going to say this is going to be position two and I'll put this like right there I'm going to make that like purple I think is the next color I have available to me we're running low on colors so I'm going to call that position number five and that's all the positions that we have if that was a C this is going to be an A if we look at our caged system and you can see that here if you're holding this down and holding these down it's not an A chord but it's an A type of shape we'll talk about that more later and we can see of course that this one also repeats back here because if that's position four then this has to be position five right here as well let's bring this down a bit and so I'll copy this over here so you can see what's happening here we're going to start in the middle and I'm going to call that position one even though it's in the middle of the guitar because that's what often happens because that's the first position people often learn but you could name it the G shape position if that feels more right to you and then you've got position two position three position four which you can label with the caged positions if you want just remember don't get these confused which is very difficult to do when you first trying to understand this as though these are the actual note chords that you're playing no these are the shapes of the chord if they were played in open position right so the actual chords going to be different but in any case then it goes up to five and then if I started at this middle position when we start going backwards we go around the loop and so that means that we're going to start from position one here this was position one and then position five is behind it because there's only five positions and then we're going to go back to position four so what we've but we've basically been learning in my terminology would be position four or you can think of it as the C position to anchor it to both the major and minor scale that's around it and then now we're going to be and then you can move it up from there if you so choose now one other kind of weird thing you could see that this whole column right here doesn't have anything any doesn't have like the same overlap position when we actually play the full major scale here then we will be picking up another note so I might just actually pull this one back to here and you can see that this once we add the major scale will be a five fret one right and then this is a four fret position and then basically you have another five fret position so it's going to be kind of alternating between these positions being four and five frets so hopefully I got that correct let's color code this to make this home tab make this blue let's make this purple and I know that might make it more difficult to see but hopefully the color coding will have advantages beyond the fact that it's difficult to see and then let's make this the green and then we're going to make this the blue again and then this is going to be the purple so I won't keep on going up the neck from here let's stop it there let's make this bold because we get to see it start over again now I was going to try to see the overlap like you could try to map out what the overlap looks at looks like down here so for example if I'm looking at the difference to overlap between the blue and the purple is right here just to kind of try to emphasize that overlap so if I put that over down here this is the overlap between positions four and five right and if I look at if I look at like five is the purple and I'm looking at the purple as it overlaps to the red it's going to be the purple and the red overlap like right here right so there's the overlap so you can think of this position as in between the five and the one and then I could say okay and then the one overlaps with the two right here in this yellow space so I'm going to say okay let's pull that down and notice you get this weird thing where it's not really overlapping right here because you're alternating between a five fret and a four fret kind of position so and then I can say okay if it's going from here to here so now we're looking at the yellow as it goes to the yellow overlapping with the green gives me my overlap right here and then if I'm overlapping the green to the blue again we have that skipping of no overlap here because we're going from the the five fret position to the four so hopefully I did that well enough that makes some sense I know it's kind of messy but so that's why we're going to break these shapes down later one at a time but before we do that let's think of it in terms of of the the major scale and the minor scale so I'm still going to map out the minor I'm going to select these one two three five six let's make those green home tab style or no font and make it green not that green I like the dark green here or I think that's easier to see maybe I don't know and then I'm going to select this whole thing and this time let's map out the whole thing in blue first mapping out the major scale and then I'll put the pentatonic on top of it so you can see how it fits within the major scale so I'm first going to make everything blue so I'm going to hit the drop down and make it blue everything needs to be blue this time this time everything has to be blue this time people why because I said so that's why I'm controlling the color scheme and I don't want anyone messing that up I'm in charge here I've been in charge of the executive color scheme creator I have complete control E and then we're going to say this is going to be F and then this is going to be G I'm going to color format G and then okay and then I'm going to color format A A and then okay oh wait a second that's a different color let's color format A and make it blue has to be blue A A is blue and then B blue 2 okay so there it is the whole thing now let's keep it up this is the major scale let's actually I'm going to copy this whole conditional formatting and go to the home tab up here and copy that and paste it to the one below it as well and so this would be if I had all the notes in place and I can see the same pattern let's go ahead and put the pentatonic on top of it so let's go home tab conditional formatting let's make the green ones which will fit inside of it see let's make that green so now we're going to switch the ones we're putting a layer on top now which is just 5 out of the 7 notes so that's going to be C to D D and then we're going to an E is going to be green and then we're going to a G skipping the F going to the G is going to be green and then we're going to the A which is also going to be green okay so there we have it now you can see the pattern well it's going to be hard to see until we focus in on the pattern but this is the same pattern except that we added the two extra notes the F and the B so let's go ahead and copy this down like if I copy each one of these kind of individually you can see that on the 4 you can see right there boom there's our normal position if it was a pentatonic position but now we're adding these other cells and that's why we extended it back here to pick that one note up in fret 4 that's why we had it longer otherwise if it was pentatonic you could shorten that then we can bring down let's just bring this down this way for us to go okay let's bring this down like this dude and so that's going to be that one if we go back and let's just see if I can copy the rest of these I have this one I'm holding down control holding down control and control C and then I'm going to paste that right here boom so there it is I think everything is lined out let's go ahead and copy this stuff and put that down here as well so there we have it and so again I know that's kind of messy but we'll refer back to it later on because in kind of this middle position let's do the same thing again over here I'm going to hold down control and copy all this stuff again and if we see it just with everything as blue it looks like this meaning this is just the major scale without the pentatonic mapped on top of it hopefully I have everything done well I'm doing this kind of fast but I think everything is mapped out the way it's supposed to be and then let's do it one more time so I'm going to select I'm going to select this major scale this time and I'm going to format paint it home tab clipboard format paint it and put it right here again and then I'm going to copy this whole thing again the blue the blue kind of blends in now doesn't it the blue blends in I can't even see it what were you thinking with your color scheme what were you thinking no one can see the blue okay whatever you know where you could see it okay so then now let's map on top of that like a C a C chord just to see how the cage system works just so you can get an idea we'll talk about the cage system later but in this case it's useful for the naming of the positions so we'll do our normal naming routine so I'm going to select this whole thing and we're going to go home tab style and let's make this equal to the C we're going to make that green boom and then we're going to say this is going to be equal to the E and that's going to be red and then I'm going to say this is equal to the G and that's yellow okay boom so now if I mapped out our our positions here what happened well in this first one we have let's make let's make this one blue because this is the blue C in position four is blue like that so we have there's the C there's the C what are you at the beach there's the C no I'm talking about this you can't even see that with all the other blue okay man you do it over you're messing everyone up so there's our C position okay and then let's make this a little smaller maybe I can so you can see that we're the okay and then if I moved to the next one we have the A position right so then I'm going to say A position let's make this one red it's going to be red and no it's not red it's purple we're not to the red yet it's purple and so there's my A position so now I'm getting that C again so we're layering on the meaning again the meaning is layered because there's overlap between that and then the A would go from here to here so now we have the G let's make this one a little bit larger and then boom see what I mean with the caged position so this is still a C chord but now this is like this is like an A position that's like playing a C what in the world let's just leave it at that and then we move up to the G position over here so now that's going to be a red one so the red see that C right there it's a C but it's got like a G shape man whoa whoa dude okay I'm going to make this one larger so then so now see this is why these three ones here you can think of them as part of the G position or as part of the A position most people think of them as an A G gets cheated but they're kind of either one because it wouldn't necessarily be the A position unless you pick this one up because that's the one that makes it totally A-ish because like if you picked up these over here then it would be like part of the C and then if we went to the E we can say that's going to be yellow E position so now we're going to pick up the C note again up top this is going to be the E major shape which we haven't really looked at because we've only looked at the minor shape when we're looking at the chord constructions from the key of C but from the caged system this would be our standard bar chord boom boom boom boom for a major bar chord but it's still a C even though it's like an E shape that's why you can label this whole shape thing an E shape pentatonic or major scale position now be careful though when you try to label the entire the entire major shape as an E shape because I could move this E shape up to other positions and it'll still fit even though I have a different shape but if it was the pentatonic position it would be unique so it's still a little there's no perfect way to kind of do any case we'll talk more about that later let's finish it up here we're going to the D the D is here and let's make this green green and then it's going to be in here so we have to put layers upon layers if you really want to get down to the truth there's layers upon layers of lies that you have to or half truths if you want to be generous to the liars and then we're going to put that there and then so notice this whole D shape again it's kind of in the middle of that and then the C so if I connect this up to the C again the C shape I can just copy just the blue ones and I want to put that over here no grab it grab it so see how this whole D shape down here is really actually part of the C shape too but people never call it that because it looks classic D like but it's really not like fully D unless you pull that one in with the D shape because these notes are also in the C shape but no one sees it that way so you can just call it a D shape even if you don't pull in that note but whatever that's how it all blends together so we'll start dive it like I say we'll kind of dissect this later and we're just going to focus in on this position first in the middle of the fretboard and then we'll try to expand it out my point here being that all this stuff kind of mushes together and so what you want to do is try to separate it at first and then blend it together so that you have everything in its own little box but then you realize that like when it really comes down to it there are no boxes


All right, it's one o'clock people will probably file in from lunch, but we might as well get started There's a lot to talk about can everyone hear me. Okay Yeah, and everyone can see So this is Drupal 8 routing My name is Tim Plunkett. I'm a developer at Stanford University Graduate School of Business and a core subsystem maintainer mostly with the views in core and Drupal 8 but Wanted to talk today about the new routing system for Drupal 8 So first show of hands who has never Written hook menu in a module before anyone Okay I'm skipping all of that so I'm assuming you all know that so that was only like two or three people raised their hands Hopefully you'll catch up as we go Who here has yet to use who has started already using Drupal 8 and looking at it So about half the room. Okay First things first Hook menu did too much. I don't think anyone will argue with that. It was responsible for routing menu links local actions local tasks breadcrumbs contextual links and even the overall menu hierarchy Which is not necessarily a function. It was just a kind of hidden feature that you got But that's you know six different things one hook. It's it's a it's a lot Hook menu is dead in Drupal 8 or will be shortly There are a couple things in this presentation that have not yet happened But they will this week and I will point them out Which ones haven't happened yet, but already just like an hour ago the breadcrumbs are now completely path based We'll get into that later on So routing a route is just a map from a URL to a controller Here's an example of a d7 hook menu. This is borrowed from the pants module, which is a nice example module So you have the path admin config people pants, then you have a title pants The description is to administer pants page callback to will get form page arguments is a string pants setting That will be the function name that is called The access arguments are just administer pants and this callback happens to be located in a separate file So this is all familiar to everyone. Yes Great, okay. This is the Drupal 8 version of hook menu. I said hook menu is about to die. It's about to die Right now if you're working on porting your modules You'll need this for any visible menu links But the only thing that really remains are the title and description You'll notice we have a route name here And it's just pants dot settings. It's a machine name and you can choose it. It's not magically named at all So this is the pants routing yaml This is the part that takes over the routing aspect of hook menu from Drupal 7 So there's the machine name again. You have pants settings and the path So the path is the same thing that you used to put in the items is a key in the array of the menu items And then there's two other sections defaults and requirements. You'll see that this is exactly the same as They are here Just the instead of access arguments administer pants. We have permission administer pants as a requirement And the title is also here. The new thing is this form Drupal pants form pants settings form so that's all psr0 and Names PHP 5.3 namespaces. I'm not covering that But the point is that this is the form that we want to be used as this instead of the old page callback So here's the D7 version of page callback. It was just a settings form it determined. What type of pants and In this case, it has no no pants option So you can see we have a just a regular form API and then this magical system settings form So here's the Drupal 8 version this is the what we call a route controller and I'll cover a bunch of some of this stuff more in depth later But we have this it's a form and it has a build form method and we're doing the same thing We have form API all the way down and then we have build parent build form That's just you know proper object or in where the parent class config form base Contrack provides most of the magic that system settings form used to do There's a couple other parts of the form base that I've cut out from this because I'll talk about it later So don't just copy and paste this and hope it works But that's the the general idea is instead of a single function in a file you have a method on a class So menu links we talked writing was the first part the second part of hook menu We're the menu links. This is the part that's not done yet There's a patch to do it and it's in the process, but these are the ones that are physically visible on your site So the new way to do them will be called hook default menu links and it will just be What route name it's for the title of the description and you specifically have to tell it which its parent is So before if you were defining menu links, it just if you had you know admin config Development and you had admin config development testing Those that would be the child of it just magically based on the path structure Now you can have links be the children of anything just based on its parent and it's not restricted to the path This will let you kind of build better menus Where you can just pull something in you can give it the URL you want not the URL that you need it to be With an extra slash at the end So if you want more information on it, that's the issue and it should probably go in maybe this weekend Local actions local actions are the buttons at the top of the page. They look like that. That's triple seven and that's triple eight So a note local action It used to be in hook menu and now it's in a YAML file Like a lot of our code is in YAML files now Including the info files and the routing files and local actions files and local task files and contextual links files and the config files and the config scheme files So there's a lot of YAML Thankfully, it's really easy to write. It's white space sensitive. It takes keys and values and that's it so you'll see just as just as simple that this is actually the exact one I was just showing you the add content type and It's takes it appears on the node overview types route and It has a title of add content type and a route name where it links to is the node type add to add a new content type So you'll have just a file full of these just by themselves and then you can keep all of that Those little buttons Separate from the actual routes themselves and you just reference them. The other nice thing is in triple seven and before this You could only kind of put that on one place you had this this button can only appear on this page Now this you'll see appears on is an array You can just list as many routes as you want here and that button will show up on all those pages Local tasks, they're kind of very very similar in code to local actions But they're completely different in implementation and use case. These are the ones. They're sort of related tasks Not necessarily a new thing So those are the local tasks on the views page for views settings. So you have like lists your settings basic advanced This is the definition of them it gets a little small at the bottom of the slide, but you just have a machine name completely arbitrary the route name that it links to and the title and Then each of these has a root ID you'll see that these all have these two have the same root ID that's the list and settings and these two have the same sorry parent ID, which is the The other ones so they're all all four of those are grouped together But using the different the parents and the roots this code might change a little bit in terms of the naming We just it's this is matches exactly what was in menu dot ink in triple seven But as we all know menu ink is pretty confusing So there's work to rename those keys but it the idea is that it will keep it separate from all your actions and all your other things and You can just have a file of all your local tasks Contextual links those are the little you know, you can see them. They pop up Generally on a an entity We don't really use them anywhere else But you can put them on anything and they're little helpers for that little piece of Content or that that block or menu what not and those are also going to be to find any ammo This is also not yet in core But it will be very very soon and it's exactly the same you have a route name Which is just a machine name and then you have the title and these are grouped So that you can have them, you know in a specific order and all of these support weights Actually, I think I had yeah way down at the bottom of this. It says weight 10. They all have weights So you can you can the order of the ammo file is not necessarily important If you want you can list them in any order or any grouping and just change the weights Breadcrumbs. This is the thing that just went in today. So breadcrumbs are a huge problem for most people I don't know of anyone that actually really Uses the breadcrumbs that are provided by default in core There's about Dozen plus different decent breadcrum models and contrib and all of them do very very different things But they all do them in very different ways and some of them are actually huge performance problems And they're not very well written. So the one nice thing in Drupal 8 is that we have a Consistent API for how you change breadcrumbs on a page if anyone doesn't know that's what breadcrumbs are these right here. So Here's an example of how the the new breadcrumbs code would look so you start off you have a breadcrum builder interface Breadcrum builder is you know You provide a separate builder and you can have many builders running at one time and each one kind of claims You know that that path so this one if you don't have any new Fancy route stuff. You're still porting old code This one will run and it will just call Drupal set breadcrum if array return So this is an example, but the the idea is you just get an array of attributes You do whatever you need to do and you return an array So there is about four or five of these in core so forum module comment module book module those all provide Custom breadcrumbs. So instead of just on every single page. They want to change the breadcrum They have to repeat that code over and over again or put in a helper function You just register it completely separately and tell it which pages to run on So here's an example of comment breadcrumbs here. You have you say oh if this is the comment reply route This works on these these routes So then anytime it's on a comment reply you you find the noted and then you link The first thing is home, and then you have a link to the node Normally on a comment page. It would just be the comment name, but you want it to be the noted from so anyone can provide breadcrumbs with this new breadcrumb builder interface and it'll it's it'll kind of the Unify the ones that are consumed and the other thing is my favorite breadcrumb module was a breadcrumbs by path Which is if you build out your URL structure It just takes the title from each page before it and you have this nice breadcrumb that matches your URL And that's actually in core now So the default implementation of breadcrumbs is to look at each path and find the title Instead of just meant working off the magic menu structure Okay, so that was just a blow-through really really really quickly of the six different things I'm gonna talk a little bit about advanced routing so The first thing is these defaults So I in the example. I just showed you this one just says underscore form That means it's a form it has a class name after it and it just loads that class and Calls a build form method on it So these are the other main examples of the different kinds of things you can use So for example, we have controller a controller is when you're actually returning a full response.  Everything. Everything. I'm returning you is everything It should go Content is the opposite of that. That is saying I'm putting something in the main content region. Please do all of the other things There's a couple other very specific ones that are for entities So in Drupal 8 everything is an entity. I mean almost everything everything that's not an entity We just didn't get done in time. Everything's an entity So we have three different routing defaults that are intended for the entities So for example the node edit form you have this entity form and you say entity form the entity type and Then the operation you were performing and this will automatically build you the entire entity form that you needed same thing with lists we have these lists of content so You can list your Content types or you can list the nodes which generally done with a view But if you're not using views you can you can provide an entity list and you just say entity list and then your entity type And the same thing for like the node view page You say I'm going to view the node and that's it's the view mode that you can put in here So this could have been teaser or if you're using any custom view modes. You can put them in there oops, so routing parameters so Before in Drupal 7 you sometimes had the little percent node And that man meant that you magically called the node underscore load function and that would give you your node back And you could write those for anything, but we found out that 99% of every single Loader was for an entity type. So this will magically match If this it'll look for this curly brace and anything in here if that's the name of an entity type It'll try to load it. So for example, you go to this page and it's the manager content type page So if this says the string article it will load the entire article node type object So that can get kind of tricky and there's other ways to add your own Upcasters, which is what they're called it. They take this placeholder and the value you provide and turn it into Something else generally an object But for everything that you're doing with entity types and entities, this will just work automatically So there's also the ability to pass a default parameter So if you have something like this just says admin structure types But if there's nothing in that path that says it's for nodes or node types So we have this generic entity list controller class that says I will list anything and you have to tell it Why entity type to use so we can just say entity type and you'll see here This entity type the actual parameter name has to match exactly to the machine name you give here So it's gonna call the Drupal core entity controller and you do this controller with the listing method with node type Passed into entity type ends up here You have the any list controller the listing method and it passes through entity type So if you can provide any arguments you want to your routes even if they're not in the URL When you pass them like they're in the URL that is the equivalent of an optional parameter. So this is the views The views edit form normally when you go to a view edit form It loads like the default display or the page display But then when you click to the different displays you have like it'll be like slash block slash feed But it's optional. So this display ID here at the end is completely optional. So we say display ID equals no That way it doesn't require anything While this view is obviously required So that would be the the machine name of the view it gets turned into an object and the display ID if it's not Specified will just be turned into null Routing requirements. That's the bottom of the the routing info This is just a way that we it's kind of like the access arguments in Drupal 7 but it also has a little bit more power to it So you'll notice all these things have different underscores in front That's like a machine. It means internal like don't mess with it compared to this Excuse me display ID, which has no underscore So this underscore permission is the equivalent of calling user access So it says okay this they can only get to this round if they have the permission administer pants These are some other examples of access checkers So if you used to do access callback equals true, you can just say access true For example, if you want it to be if you used to write Oh, you have to have the access callback was a function that checked and said it's if the user was logged in you can just say user is logged in true and This access theme for example was used by the blocks module So if they if you want to make sure that they have access to the theme that that page is for you You can just say access theme and it'll check which theme and ensure they have access to it You can also get a little bit more complex. So in addition to the permissions ones We have entity access very similar to the entity form and any view It's the entity type name and then the operation you were performing So if you just put entity access node edit They have to have the ability to edit that node that will check, you know All of the different things like the permissions and if they're uid one and if they're the owner of the node all that logic Is kept elsewhere still and you just tell it which entity type and which operation When it comes to creating that implies, you know any access implies you have an entity and you want to access it when it doesn't exist Yet like if you're checking access for the create form you use a separate entity create access And this one is even more complex. It says that we're creating a taxonomy term But also check and see which vocabulary was in the path So it knows which vocabulary to create that term for so you can you can add some very complex access checkers That inspects the path And do and perform logic on it also at the bottom. You'll see access mode any so As of right now this moment it that's the default, but it's being switched to access check access mode all and That way that if you list multiple access checkers, they're all anded together So they have to pass all requirements if you wanted to say they only get to this page If they can administer nodes or if they can edit that node, you will have to specify any And that was another thing that we didn't have in Drupal 7 where if you wanted to combine two or three different types of access You had to write a separate call back and then check them individually now You're able to just stack them in a row and you don't have to write any custom code all these are provided for you The other cool thing is you can do regular expressions on these and with no extra work So for here when you're on the views UI and you're enabling or disabling a view There's an op we only allow enable and disable there's no other operations to perform But we didn't want to have to define this whole route twice So we said the only valid values for op are enable or disable and that's just regular regular expressions Same thing with user view. It ensures that To prevent it from clashing with like user login or user lock out. We say user slash something has to be a number So that's a regular expression for a number. These are not subject to the Any all rules these are applied first. So if it doesn't match the regex then nothing else will happen but you can get really creative with those and They're very very powerful so Controller so I've used the word controller a couple times That's just the callable that we're using instead of what we used to call a callback You symphony allows for many different ways to use controllers, but everything in Drupal 8 now is a method and it's a instance methods non-static method and But it is its responsibility is to return the full HTTP response if you're using that underscore content that Drupal will then take that and wrap that in a full response But if you're using underscore controller, you have to actually return a response object So let's put it all together here. So this is the block admin form. So if you're adding a new block It's got a machine name and it takes two parameters plug an ID and theme but the theme is optional and It's got a title the title is configure block and of course its administer blocks is the permission check This is the actual class. That's in core So those plug in ID theme that are in the routes as placeholders are the exact Parameters of this method plug an ID and theme and it says and you'll notice that even though we said theme was optional There's no equals null there Because we specified null here So it will always have a value in Drupal 7 you would have written that differently You just had plug an ID comma theme equals null in case it wasn't there. This ensures that there is always a value So then it just calls out to the any manager and creates a new block and then presents the form for it So this is the when you write a controller you want it to be about this size You don't want to put everything all of your application logic into that entire method You'll see this delegates to two different things the storage controller and directly to the any manager It first creates the block and then gets the form in Drupal 7 This code would actually create the new block object as a standard class and then have the form code in line This way everything is kept separate. It's very very clear what this this method does it just creates and then hands off to the form So you should strive to keep your controllers Thin as they call them. You'll also notice here a controller base So controller base is completely optional. There's just a lot of helper methods inside of it So this is a controller base It gives you the any manager quick access to cache the config for configuration management The module handler to check is it installed, you know what? invoke hooks and alter hooks L for links the current user instead of using global user all Controllers can just ask what's the current user and you don't have to worry about global user anymore the T fun method which replaces the T function and then a quick way for doing redirects and URLs I know when the there used to be Drupal go-to right everyone remembers Drupal go-to and it did about 27 things based on what you passed into it And most of the time you just use it for a simple redirect But then they replaced it with all these different methods and I remember when the change notice was posted Everyone on Twitter went crazy and said oh my gosh I have to write 20 lines of code because I can't call Drupal go-to anymore But we just provide a method that is the 90% use case of it And now you don't have to look inside there at all you just tell it what route to redirect to and you're done And same with URL. It was the same thing. We used to have this little URL function It is now an entire URL generator that can handle the internal the external and path based and route based and All we have here is just URL that takes the 90% use case and puts it in this controller so the controller base class so this is just very useful for you to Cut down the boilerplate of your controllers and just call the things you need to do So these are just some example form classes. I said earlier. We used to have system settings form. There's now a config form base Confirm form went the same route. There's no more confirm form It's now a confirm form base that does all the things where it has it asks you what you want to do And it presents you with a button and a backlink and all that stuff is in a in a base form that you Just extend and don't have to worry about And then each of the individual previous page callbacks like node form user profile form user login are now all classes in their namespace So you have node form profile form and user login form Form interface is what guides all of these you saw when you had the beginning that Content and controller took a class name and a method name But y'all form just takes a class name that works because there's a single form interface that every single form will use Plugin forms block forms entity forms your own one-off forms. Everything will have to use this I remember when I first started using triple It I had no idea how validate and submit worked some of them It seemed like it was magic some of them specified them in the method and the function and some of them did both Instead of that you just have this interface that reminds you these are the things you need to do Get form ID is only because it used to be the function name would become your form ID and Because PHP will only allow one function of one name. It was magically enforced to be unique now You actually have to specify your form ID But you can then create what make it whatever you'd like and you can even include logic in your get form ID method And then build form is the old you know the actual used to be the function and then validate form and submit form are the methods that replace those old magical callbacks But the nice thing is when you set up your form you can have all your dependencies and then your build form you can store things It's instance variables or properties and access them later And all your code that kind used to be just spread over three or four functions all becomes one nice cohesive class And if you have multiple buttons that have multiple submit handlers You can just add other methods here and specify them So you don't have if you have you know a form with maybe three buttons on it like there are in core Instead of it being six functions. You can have just one class with six methods So that was the end of my whirlwind tour of routing I have to put this up here to remind you all to come out and hang out tomorrow I'm gonna now start taking questions and showing off other things and I can go back to anything I talked about So is there someone with a mic or a mic thing? Okay shout and I'll repeat your question pants namespace Oh the PHP namespace stuff. Yeah Okay Yeah, so the question was some people are saying that your modules shouldn't be in the Drupal namespace and other people are saying it Should be and what do we what's enforced? What's the rule? So the rule is they have to if your stuff isn't in the Drupal namespace. It's not a real module We have no one's tried that otherwise The people who say it probably shouldn't be in the namespace are right But that's not how the Drupal ecosystem works yet. We're not there And that gets into whole sorts of like using composer. I'm sorry using composer in interesting ways And kind of revamping how modules coexist with each other, but right now now everything has to be in the Drupal namespace It's just that's how it works in the middle Right, so I think I had that on a slide, but I didn't talk about it. There is a Yeah, I didn't talk about it. I did put on the slide in case someone asked so Before you had title titles easy. It's static, you know, you have title call back So all it is here is another one of those underscored Things in your defaults and you list out the method that's called 90% of time That's going to be a method on the same class, but it allows you to reuse other ones So for example like the entity page label the generic one you can even specify that Right, so I didn't get into that because a it's crazy right now And we need to fix it and I didn't want to do a whole bunch of slides on something. That's terribly terribly confusing that so the question was what about Jen dynamically generated routes, so in your hook menu used to have a for each loop or conditional logic and stuff and there's other ways to do that It's called a route subscriber, but they're insanely verbose right now And we've just been kind of chugging along and there were only one or two and they were in like modules like views UI So it wasn't a big deal, but now that we realize that like most of contrib and custom modules will need that functionality we need to revisit it and To come up with a better way to make it easier for you to do that because it's I mean I can show code It's basically you have Well, it simply there's a whole concept of events instead of hooks and you subscribe to an event and it says okay now Build me all your routes and you actually have to Build them in the like as PHP objects and return them So I can show one Wow, that's big. I Can make that a little smaller I think Can anyone still see that? Yes, okay great, so Well, that's really big still okay, so yeah, this is a that's a bad example. I'll use field UI So the field UI has a bunch that you know You have all the different every entity type has its own page with this like manage fields manage display So this is just a class called event subscriber interface we call it a route subscriber and It has a method that you get this event You can get the existing routes from it and then this just loops through all the entity types and it's the same thing as the yaml except in Parameters to this object so you just create new route objects and pass them through So this is the same thing where here's the path. Here's the defaults. Here's the requirements Except it's as I said like setting this up is really complex every time I do it I do it wrong and I've done like three of these already So we need to and I helped to write it and I can do I do it wrong So we need to come up with a better way, which is why I kind of skipped glossed over it There are this the six or seven examples in core, but those are hopefully I will to change That's something I want to work on this weekend So I hope that answered your question. Okay anyone else next yep, so Where do okay, that was really good. Where do controllers get their dependencies from like services and stuff so It's a very good question.  I'm sorry. You should have gone to Larry's session But there's these global helpful Objects basically classes that you might want like the caching Factory or the entity manager and you would very often want those in your in your classes And that's what actually the Controller base was when I was saying oh controller base has all these helpful methods That's just getting those services for you So if you need other dependencies, you can implement this container injection interface And it will when creating your form let you pass things to your form So there's a I mean there's like 150 examples of that in core So if you need other services and you should I mean you should be handing off to your services You shouldn't be querying that database directly under your controller You should be asking like a manager or something or a repository what to look for You can use this interface to to get those injected Follow up Right. So the question was would it be better if forms or controllers in general? Sorry Where services themselves and yes, you can use service names instead of class method in those YAML files So when we first the very first module to use routes interpolate was views UI We decided to pick the hardest one first just to see if it worked And when we wrote it all every single one was a service But that meant I mean already you have to just like you didn't dribble seven You have to declare it and hook menu and then write your callback in driplet You have to put it in routing YAML and then write your callback to do it as a service You have to declare it as a service declare it in routing YAML and write the callback And the other thing is that then you have this kind of You have all of your useful services that are actually like stateless helpful objects Mushed in with all of your controllers, which are one-off and thin and and whatnot So it was polluting all of our services. So we chose not to do that If you had some very very very useful one that you wanted to do you can and you can do whatever you want in contrary I mean custom code so you can do that. It's just we decided it was to verbose and there was no real gain Okay, next question Seriously, okay No, yes in the way back Sorry is load keys What keys are allowed in the YAML files? so, yeah the what keys so these the path defaults options requirements those four keys are straight from symphony so the symphony documentation has you know explains all of those and each of the underscore ones in here are our Intern they map to our code, but they follow the symphony patterns So each of these like access mode and access theme and permission If you you know if you grep for them, you'll find the class that defines them Explains what they do, but the path defaults options requirement stuff is straight vanilla symphony and Can be found either like I mean there's plenty of documentation online, but they actually I think That's wrong class So it's in the constructor of the route object path defaults requirements options so and you can actually also do like other things like hosts and schemes and stuff like for You know other stuff, but those the these are documented there and and there's really good symphony has actually really great documentation So all right next question. Yep down here. Yes So in form-based controller validation is required the method is required And there's actually I didn't mention this so just like there's controller base and we had form interface there's a form base and it Gets a lot of those other the same methods and it also just puts an empty validate form So it says validation is optional so that way you don't have to do it I mean you can just leave it you could do that in triple seven You could implement the validate callback and do nothing. It doesn't matter unless you've set an error or something So yeah, so this is there. So you don't have to have that in every class But almost every other form has a you know has a build form obviously and 99.9% of them have a submit form Okay, there's another one Other question Someone's pointing. Yes. Okay you again Yeah, so the question was you still use form set error No one has pointed that out yet that we're still doing that There's a couple. I mean that obviously the goal has been to Remove as many procedural function calls from inside your classes as possible but the main one of the main reasons to do that is for Unit testing and if you want a unit test form API, that's your problem Until we rewrite form API as you know object-based We're not really looking to do that So most of your forms are obviously still going to be tested with a web test of some sort Larry Right. Do we use any of those yet? Actually not really Yeah, so there is the ability to use different MIME types and specify them I don't know offhand where we actually even do that. Although I do know, sorry. Oh Sorry, the question was as you can actually see from this route class In addition to those other things we now have the ability to That's not it specify Like the URI scheme or the HTTP method that was used so that it'll One can be used for JSON and one can be used for HTML And that way you can reuse the same path in multiple different ways And I didn't put it to get any slides on that because there was a rest session this week But it is very possible and it's very very cool I was mostly shown off the stuff that you could do in Drupal 7 as well But there is a lot more that you can do now Okay. Yes again. Yes Okay, so the question was in Drupal 7 the menu hierarchy was just determined from the paths themselves and from your hook menu And now you have to explicitly specify a parent and you're saying you don't didn't really care in most cases so right so the the thing is we there's a lot of magic in that and if your Paths change or if you want something to be in that hierarchy It's really hard to get it in there And there was always a lot of hacks to set like especially with menu set active breadcrumb in the callback itself to trick it into thinking It was in that menu Now it's you can being able to specify explicitly and forcing you to set the parent We'll make it faster to compute the hierarchy And make it easier to figure out what's actually going on and we'll make it easier to do things that aren't strictly Based on your path So it's considered a feature not not like a we didn't do it on purpose to make your life worse. I'm sorry Yep, so to sum that up. He doesn't like any of this So your point is that yeah hook menu doing too many things was it was a good thing and it made your life easier and it was easier to write and It was the job of menu.ink to figure it all out the end And that's true until you actually try to do something a little bit more complex Like has anyone tried to set up default tab and local task with a view And done it right the first time Good because it's not possible It's like undoable. So it's very very very complex to do especially with the relationship between default local tasks the path itself and The local tasks to get that right the first time And I think maybe local action is a good example of where it was nice to do But the the idea is that this local action has nothing to do with your route And we have these route machine names now that we didn't have before everything was keyed based on the actual system path Now that there's machine names You can swap out what path it's on and it'll just continue to work. So let's say I want to move node add to Content add I don't need to use any alicing aliasing or anything I can just say the node add machine name route is now pointing to this path all the local actions all the local tasks Everything will show up exactly as it was before with completely different URL because everything's built around this machine name So it allows a lot more flexibility to do things you couldn't do if you continue to build your sites exactly as you did before This will probably seem verbose But the idea is that it'll it's easier to understand when you're trying to debug something harder And it gives you a lot more flexibility that you just did not have before Blue yeah, I can't I'm sorry. Can you start over? Yes, so in Symphony you can Take an entire set of routes and replace other ones or add them in and so that's exactly what views does So for example when you if you install Drupal 8 with just the minimal install without views You still have an admin content page and an admin people page And that's on a specific route and then when you enable views we have those views there that replace them They're not well in core they're doing it wrong But the idea is that they will actually then directly replace those routes and you can add on a set It's just like we have info hooks and we have alter hooks those route subscribers There's a there's a dynamic event It's like the info event and there's an alter event. So you have two passes at it in addition to defining static ones There's two separate events to let you change things and add entire sets based on other ones and introspect that There's another question next to him Right. So the other those route subscribers with the dynamic events You as I said you have to two passes at it to get everything you want Why we didn't because we didn't really think about it and then right now I think if you so the question was why are we doing it wrong in core and It's because we didn't know any better Now we found out that we're doing it wrong. So we're fixing it Okay Yep, is there a way to have a menu that skips the bootstrap? There's no way to specify the bootstrap level of as far as I know anything you can't decide that for yourself Unless you're writing completely external Drupal code So unless you are manually doing the bootstrapping from outside Drupal you can't control when the bootstrap stops You get it or you don't and menu links. I mean menu links are in the UI. They're super not Vital to an application level. So you can have routes and without menu links at all And you we could reuse Drupal routes outside of triple context, but no, there's absolutely there's no way to do that so what he was saying was that as we've progressed throughout Drupal 8 we've Tightened up bootstrap made there be less bootstrap levels less things need to be done in order to have Drupal run and Try even repeat the other thing you said is a bad idea You can actually listen at the request level before Drupal even gets to it and kind of intercept it and Prevent the rest of Drupal from working which is cool, but probably not a normal thing to do. Yeah We didn't tell you about it. So All right Anything else? Yes, I'm here Okay, so the question was we've just finished replacing a hook with about six different things and Is it will we see more events instead? So the one thing I think is a shame in Drupal 8 is that we won't have enough events There are very very very few events and I think most of our events are actually fired from symphony code Anyway, like this routing thing is not we're not dispatching that event. It's just happening There was a lot of talk of actually replacing all hooks with an event that happened to call the hook for you So no more module implements or module invoke all That just didn't happen and I don't think there's enough hook events in core And we might want to add a couple extra just as an example so that people do it right and contribute But I think a lot more of those will be events by Drupal 9 for sure Events are really cool and they I don't necessarily think they're any better or worse than hooks We did kill a ton of info hooks, but those weren't even hooks anyway They were just a way of declaring data so but the true the true hooks that are reacting to events. They're still there for the most part In terms of I don't no one is really benchmarked it as far as I know I mean there was the benchmarks of the implementation of Backwards compatibility having both at the same time for every hook and that was bad I don't think anyone actually benchmarked ripping them out just because it would be way too much work to do in core And I mean hooks are like our thing so we weren't ready to just rip off the band-aid Yes Yes, there's the question was is there any way to do multilingual paths the answer is yes they do that I Couldn't tell you offhand how but I know they do there's the well the same thing where you can have domain or path prefix or query string and all those still work and And So yeah, I mean, I don't know at what level did they do that but it's definitely There's enough places to interrupt this flow that you can do almost anything as Carl said there's a request listener You can beat Drupal to the request and do whatever you want So I mean obviously you can do anything, but the other the look the translation stuff is working so they must have done it somehow and That's the nice thing is there are a lot of complex use cases already using this code So there's a good chance that your contrib modules not more complex than the entire translation system and to use UI So there's a there's a lot of code to learn from if you hit a problem All right, then that's gonna be it for me. Thank you very much for everything


Remember that in alchorismy, there are three types of important quadratics. x squared plus px equals q, square and sides equal number. x squared equals px plus q, square equal to sides and number. x squared plus q equals px, square and number equal to sides. We've already seen how alchorismy solved square and sides equal number. Now let's take a look at the other two quadratics. So alchorismy also looked at the problem a square and 21 is equal to 10 sides. And this is a square and number equal to sides. So again alchorismy gave a procedure. Take half the number of sides, 5, square this, 25, subtract the number, 4, take the square root, 2, then subtract from half the number of sides, 3, which is the solution. So let's look at this geometrically. So we have a square with an unknown side length. And we want to add 21 to it. So let's append a rectangle with an area of 21. And we'll make one side of the rectangle equal to the side of the square. So this is our square and 21 and it's supposed to equal 10 sides. In other words, the area of this figure is supposed to be equal to the area of a rectangle with 10 and height equal to the side of the unknown square. But since this figure is the height of the unknown square, that means its top length here must be 10. So alchorismy's first step is to take half the number of sides. And notice if we cut this top side in half, the two figures are equal. And since the figure on the left consists of a square and a rectangle, the figure on the right also consists of a square and a rectangle. And the top length of the remaining figure is 5. So if we rearrange our figure and keep in mind these squares are the same size. So remember, this is the figure that had area 21 rearranged. And it forms an incomplete square with the side of 5. The complete square has area 25 and the difference between what we have and the complete square is this little square here, which has an area of 4. And so its side length is 2, which means the unknown side has to have a length of 3. How about our third case? A square is equal to 3 of its sides and 4. So here we have a square equal to sides and number. Alchorismy gives the procedure, take half the number of sides, 1 and a half, square, 2 and a quarter, add to the number, 6 and a quarter, take the root, 2 and a half, and finally add to half the sides for the solution. So this one's a little bit different, because we have a square equal to 3 of its roots and 4. So we might begin with our square of unknown side, but this square is equal to a rectangle that's 3 wide and has the same side length as well as another rectangle equal to 4. So we might imagine this square to be composed of 2 pieces. So our bottom piece here corresponds to 3 of its roots. So it's the same width as the square, but a tight is 3. And this other figure has an area of 4. Now take half the number of sides, that's 1 and a half, so we'll cut our side and square it. And so this square has area 2 and a quarter. Now if we cut off from the remaining part a segment equal to the square, we can do a little rearranging of the pieces. And remember the area doesn't change, so this portion still has area 4. So if we add it to the square, we get the area of the complete square. And the square root will give us the entire side, 2 and a half. And finally if we restore our original square, we see that we can add 2 and a half and 1 and a half to get the side of the original square, 4. Now let's take a breather and consider our two cases, square and sides equal number, and square and number equal sides. In both cases, if we go through the geometric constructions, it should be clear that we can always reform the geometric operations, and that means we will always get a non-negative side length. But what about our third case? Since the solution requires us to cut off a part equal to the square, it should be clear that in some cases we can't perform the required geometric constructions. So it's possible this case has no solutions.


Hey guys, welcome to the channel here on the DocTalk series and the TMJ show where I talk to students just like you on their medical journey, help them along the way. Today we're going to talk about what to do when step one doesn't go your way and how to still set yourself up for a great residency. Let's get into it. Kevin, how are you doing, bud? Pretty good. How are you? I'm doing great. Thanks for asking. So how can we help you? Yeah. So my question really is for somebody who is interested in going to maybe a more competitive specialty and didn't do so well on step one, what would your advice be in terms of making a good pivot or adjustment in terms of preparation for step two to get a more competitive score? Sure. So step one didn't go your way. What can you do the rest of the way to really just hit it home? What are you trying to go into? Thinking about either anesthesiology or emergency medicine. Okay. So from my reference, anesthesiology is usually like two thirties, high two forties on their step one and then emergency medicines give or take the same and the step two scores are a little bit higher. But thankfully there's a lot of spots and those are really high needed positions. So where are you right now on your medical journey? So right now I'm a third year, rounding out the end of the year. Got it. So you'll be applying relatively soon? Yep. Have you already taken step two or are you waiting? Not yet. But we actually have, I have a couple more, like a rotation and a half left to do and then I'll be taking it in the next couple of months or so. Sounds good. How did the rotations go so far? Yeah, they've been going well. I mean, I've really enjoyed it. They've been going really well. I learned a lot. You know, it's hard. Just deprived a lot of the time, but you know, it's good. Sounds good.  I mean, a lot of it's clinically, yes. I think shelf-wise sometimes that was sometimes like what would be like the one thing that maybe held me back a little bit. Sure. Like a high-passing in honors, but you know, I did my best. So, you know. Do you get the valuations that you hopefully you were looking for someone? Valuations-wise, yeah. I feel pretty comfortable with those things that I've got on the clinics. Yeah. Perfect. Those are, that's usually the two things that I'll look for is like how did the rotations go? Because you put an order. I mean, you'll be applying this year. So in the next two years, residency programs are going to start looking at step one less and less just because they have to start getting practice for like when they're not going to have that option anyways. So you're in a good spot where step two is going to start to be a little bit more emphasized. So the best and first advice will be to like start, you know, your step two studying a little bit now. So start reviewing essentially for the rotations you've done because you just want to hit that test out of the park. Because if you can do it, that's going to be the score that residency programs are going to start looking more and more into the next few years.  Step one didn't go his way, but there's going to be a thankfully a nice kind of threshold of people saying, I don't really care as much anymore because I have to not care. Does that make sense? Yeah. So what are you planning on doing or in terms of like one step two comes around any ideas? So right now, I mean, I've really enjoyed using online method like throughout the year.  And I found that if I'd gone through all the videos and gone through like the entire hockey deck for, you know, this hockey deck for the steps, I did better. But I think I just kind of, for me, it's almost like I want to like, you know, do extremely well and be like extremely above average on step two. So I guess I'm just kind of, I know typically people who do well on step two have done well on step one, but I know it's a different test.  Sure. No, I mean, so nice thing about step two is that it's, it's very repetitive. Very step one is like nitpicky little bits of details and like that's hard because you're taught that that's not going to be important later on. But here the nice part is that the stuff you learn for step two ideally will correlate with whatever specialty you'll go through. And so, you know, I personally use online meta to myself. That's when I was really kind of like coming into the environment of medical school. And if you really enjoy the videos, you know, then I wouldn't really go away from what's worked well for your shelf exam. There isn't that, you know, amazing resource that's going to like take you over the threshold of a great score. But personally, you know, like having nearly a 260 on my step two, like all I did was online meta in your world and just went crazy on the repetition because I knew that that's where really those questions would hit home.  That's ideally not the case on step two. And so your idea should be be able to be a manage anything from OBGYN, pediatrics, anesthesia, internal medicine. And thankfully, those problems are repetitive. They don't make new problems. And so you just have to be able to recognize those patterns. And the way you can do it is find one, the resource you really enjoy to learn it and two, the resource you really enjoy to test yourself. Especially when you get busier with rotations and like for you, it's going to be getting busier with like applying and personal statements. You want to not stress yourself out because there's already going to be a stress that you're going to put yourself on. I already know this is I have to do well on this task, right? So that part's already there. So you don't need to go crazy by adding three resources of hoping that one of them and that combination is going to do the trick. So if online meta did the trick for you and I've used it, I recommend on the channel, obviously, find a schedule where the first part of your studying, and ideally, maybe before you really get into your dedicated is spent watching the videos in the order of your weakest topics. So pick the rotation that you struggle with the most, start with that, because that's when you build your confidence, right? And then start with your second weakest topic for me. It was probably pediatrics and OBGYN and then just go down the list, get those videos out of the way. Cause then when it's really time to, you know, get the nitty gritty and like start studying, that's when questions come for you. If you like the flashcards, you can use those like supplement it to make sure the whole day is not like just doing practice questions. And then, you know, this is what I suggest with people that I always ask me questions about step one. It's let's just say you're going to study for four or five weeks. I don't know. Do you get dedicated time off during your institution? Yeah. So, so right now I have, I have five weeks where I'm allotted to have dedicated, ideally because of the fact that, you know, step two, I mean, with step one, I, I, you know, I want to make sure that I'm kind of maximizing any extra time that I have, like we have like a week or two where, you know, there's like some requirements of things we have to do, but it's not as stressful. So I kind of want to incorporate as much time as possible, which is going to be my follow up question is like, was it ideal amount of time that you see people, you know, used to do well on this test? Yeah. I would say for dedicated, it's about like three to four weeks where you really get to get hone in on the questions and then anything up to six weeks where you're starting to like get the busy work out of the way. So the, the heavy video sessions, there's some people really like to read the text and it's like trying to get through that as quickly as possible. So I'll give you my example, but I think it's going to kind of run similar to your situation. I was finishing up my family medicine block, which was time intensive, and then I was going into a week of spring break and then four weeks to study for the exam. So roughly five weeks. But I use that latter part of my family medicine to essentially use you world and the resources from online meta to knock the family medicine section away. All right. And so I got those videos done. I use spring break to knock the rest of the videos that I needed to. And so like I made a schedule where, you know, by the time that I was really kind of getting into my dedicated, those videos are either almost done or, you know, close to being done. And I had, and mentally I had kind of a reference of what my best topics were, my weakest topics were. So now when I set up my like, let's create a study schedule, I started with the weakest one first and I sprinkled those more frequently than I did. You know, if I was great in cards, then I would do cards once a week, but if I sucked in neurology, I would do neurology either every day or every other day, you know, that kind of idea. Um, say it again, in terms of like the videos you were using, you mean? Yeah. So, I mean, initially when I was watching the videos, those would be number one. Um, but by, I mean, I'm really referring to when you start doing your practice questions. Okay. And ideally by the time you really kind of get into your practice questions, you have very few videos left, if any, um, and the way then you construct your, you can do a lot of practice questions or a few sets a day, you know, two to three, when you're first starting three to four, when you're really building on, because it is a longer test than step one. And then you kind of know, you know, after a week of doing is like, okay, I'm getting better at this. I'm still weak in these topics. Let me go watch those videos again in pediatrics, um, but I'm killing an internal medicine. I don't need to watch another talk on AKI. Like I'm getting those questions. Yeah. Right. So, um, and if you don't, you know, if like for me, after watching the video the first time, things started to make sense, but then I could just use those notes that online meta has, um, and be like, oh, let me just get a quick reference. If it still doesn't make sense, you know, go back to the video. But you start with that high bits of high yield information, get that retention in, test yourself and then reassess. But that's how I would do it. Start with your weakest points first. That way they don't cost you points on the real thing and, you know, have enough practice sessions when it's really kind of time for your, to your dedicated, um, and then readjust as needed. But keeping it simple and just keeping it in the form of I need to test myself because these are all, this is the whole test about pattern recognition. How can you walk into a fake patient's room, see the problem and know how to fix it? Right. Gotcha. Okay. That's really helpful. Thanks. And then just one last question, I guess in this specific, this specific topic, did you find, did you like to, uh, question you blocked twice or, um, Q bank twice or did you find that, you know, going through it one time and then wrongs or was it sufficient? No, that's perfect. Uh, so personally, because I had the five weeks and I didn't want to overwhelm myself. Um, what I ended up doing was I did the first block, I marked all the questions that either I for sure got wrong or something where I guessed on it and it was correct, but I really didn't understand the concept. And so I just marked those my first past of the world with no stress. Um, if I had time and there's like really something that I just didn't understand, I would make an Anki card for them because I usually would, if I didn't feel like in the mood to study, then I would spend 30 minutes reviewing all those missed questions I had. So I had a growing deck over time of all the missed questions I had. And then that last week of the prep, I was able to go through that Anki deck to really again knock out my weaknesses. Um, but by the time it came to a second repetition, I didn't have time to do the whole deck again. So I just did my miss ones. Um, and essentially every time I would get that question right, I would unmark it and then, you know, I think the last like three days, I had enough time to like do those extra like 200 questions that I had missed again. Um, because the whole point is to get as many points as possible. So to minimize your weakness as much as possible. And then you go into test day saying, I know a good portion of this and the things that I've missed, I've like, you know, somehow incorporated a system where I don't miss it again. Hmm. Yeah. Nice. So hopefully you guys are enjoying this conversation here at the doc talk series. If you are and you're watching this on YouTube, go ahead and hit that like button down below and let's get back to the rest of the conversation. Yeah. Yeah. So I think kind of as a follow up, you know, with, you know, with a low step one score, trying to obviously do better on step two, but I guess how to craft the right narrative. Um, you know, because that'll be coming up later this calendar year, but I kind of want to get a head start and something like trying to make sure that I'm putting, you know, my best self across. Absolutely. And, you know, every, there's various versions of your question, which is like, I didn't do well, preclinical, step one didn't go my way. My GPA is not that great or step two didn't go my way. How do I like, you know, explain that I'm still a great candidate, right? So that's essentially the question of what I do in my applications. I usually have an approach that like, when you're going through medical school and you're about this time where you're about to start your applications, list out every freaking experience you've done, you know, pre-med, that's cool. And then it can be small experiences, it can be big experiences. It's not like, list out your clubs and stuff, list out the experiences. And that also means like great patient experiences, great experiences with attending experiences where you felt like a total failure, things didn't go your way. And the idea about it is like when you write your essays, you have like a list of these experiences and then you can look at which one best reflects, you know, answering this question.  Obviously, that's going to be cleared up closer to the time that you're applying. And so then you're going to ask like, which of these experiences kind of all submit to the part of Kevin that wants to go into this field. Right. Like if you want to go into emergency medicine, because you like really enjoy fast acting decisions, you want to stabilize somebody fast and you just want to be that first diagnostic, you know, physician that's in the room. Then you can talk about all those different experiences that kind of highlight that and that would be your story. And the same thing, you know, when you're doing your, you ask parts of all of your organizations, you don't all the experiences. Make sure they highlight those, because ultimately the residency wants an emergency medicine physician or they want an anesthesiologist. So if you reflect, here are the X, Y and Z reasons I want to go into this field. Then and here are the experiences that prove that I also like this, you know, that experience or my, my why is also echoed. And I know what I'm talking about. I want this.  And then his application speaks to somebody who knows why they want to go into this field and can also reflect on their experiences to tell them why this is true. Does that make sense? It makes perfect sense. Yeah, I think a lot of times medical students have the issue is that they feel like they have to be that cookie cutter applicant, right? You want that good step one score, those research experiences step two. But if you think of it from the residency applicants or the residency programs perspective, that cookie cutter applicant like sucks, right?   And this is my why I'm like telling you my application, I can walk into a room, help that one patient, make them feel better so then they can be, you know, that good mom, the good wife, good employee, good community service, whatever role they had, me knowing a little bit about everything could help them to go back and do whatever role they wanted. So every single experience that I like put on my application, I kind of always a little bit referred to my why. So ideally the person that's reading your your personal statement can see that people reading your application can see that and the person that's interviewing you really sees that this person, everything just ties together. So that's like my answer by how do you stand out?  And then it's very easy for somebody to say this didn't go their way and you're still going to have institutions. This is maybe complete, completely honest. That's going to say the step score is not in our avenue and we have to interview a lot of people. But your goal is to get into a residency that's perfect for you. So if a residency says no to you based on the score, it maybe wasn't the spot for you in the first place, right?  So you just set yourself up with all the opportunities that go well and you make sure that you create that list of experiences of all of the things that went right and wrong. Nice thing about it is then you can use on your personal statements. You can make sure everything kind of ties together because you want that nice personalized application, not just an application. And then when you show up to interviews, any questions they ask, you can mentally just reflect on that list. And if they ask you, tell me about experience and they didn't go well. I got it. Tell me about an experience where you worked as a team. I got it. Tell me about an experience that like really made you want to do this field. I have several.  That's a whole idea. It makes a lot of sense. Thank you. So but yeah, man, you're going to do great, you know, asking these questions like now is a recipe for success. And now it's all about just taking those small steps forward. But not worrying about those little mishaps that went in the past. Yeah, no, I appreciate that a lot. Thanks for taking us. Absolutely. But Kevin, wish you the best of luck. Definitely reach out. Let me know how things are going and we'll talk to you soon. All right, guys, hope you guys enjoyed this episode on how to do well, even when step one doesn't go your way and still get into an amazing residency. Comment down below your thoughts. If you watched this point on the episode on YouTube, go ahead that like button. It definitely helps. The channel helps the video. Most importantly, if you gotten some golden nuggets to this point in this video, there may be somebody in your similar choose that may also benefit. So if you hit that like button, it may increase the chances that YouTube may show to that one special person who may need to watch this. And if you're listening to this on a podcast, then go ahead and either subscribe or follow based on the platform that you're listening on and also consider going ahead and leaving an honest review on iTunes to really help again to get the show in front of more people. But with that being said, guys, thanks so much for being a part of my journey. Hopefully it has a little help to you on yours. And if you enjoy this episode and also check out this episode on a full walkthrough of Anki as well as all of our playlist for the DocTalk series here, but I will see you guys next one. Take care, my friends. Peace.