Awesome. Welcome again everyone to exploring category templates and the query block, a loop block. I'm really excited about this topic because with the latest release of WordPress 6.1 we have quite a few more options in terms of templates now, inclusive of the category one which we're going to look at today. And I also wanted to just explore how we can make that template a bit more customized by also playing with a query loop block as well. But before we dive into that I'm curious to know and feel free to answer in the chat or unmute how many people have experienced with either templates or the query block and loop block. In my previous session today, we had some folks that were excited about it but didn't know much about it, are aware, haven't used it, some who are quite power users. And Suzanne said they've tried but not really successful. Well, I hope we can make you a bit more successful after this session. Chris has not used it yet. Okay, then this will be very hopefully informative for you. It seems like yeah as a baseline from the folks that shared where we're coming in with some room to understand these a little bit better which is great. Because I'm going to start with a little intro into templates I won't go too long into presentation mode because I like to share what it looks like on the back end with folks but I do want to give you kind of background as to what the templates are. And then we can review what that looks like in a sandbox environment. And then questions, you don't have to hold them at the end but I'll have another slide here and there for just pausing and allowing folks to ask questions along the way. Okay, so what is a template. You really can consider a template which you will receive with a block theme if that's installed on your site, and also using the latest WordPress version. And it'll allow you to create groups of blocks that are combined to create a design for a web page. So, essentially a full page layout that includes things like header content and footer areas. And in this animation here I'm just showing you what a single post template would look like. As you can see it's a bunch of kind of placeholder or dummy data here. There's no content that you'll be creating with templates itself. It's essentially just trying to give you a framework for how a page will be displayed. And how can they be accessed you have a couple ways that you can access this one when you go into your dashboard appearance and then the site editor. This is essentially what you're going to see you land on this the site page but then there's a templates section. And then that's where you can see what templates are already available with your site. And then also you can add new templates here. And in this animation as well I've kind of captured if I were to go in and add a new template, some of the options you have there. For example, I clicked on purpose today. I clicked on category because now with WordPress 6.1, you can create a template for a specific category page, which is pretty awesome. Another place where you can access templates but I would say it's not as common to do it here is on a page or post editor. There's a section on the right hand side that allows you to choose which template you'd like to set for that page or post, and that's another spot where you can jump into just starting either a new template or editing a template. One word of caution is that a theme does not equal a template. A theme will give you your site look and functionality and set the design for the entire site, but templates give your posts and pages their own unique designs and styles. So a theme, in this case a block theme, it will just completely dictate the design of your whole site is more singular in that it's for specific pages or posts that you have dictated for this design itself. So when you're creating these, it shouldn't affect the whole of your site. It will affect the one type of page or post that you're hoping to create this design template for. So a little refresher here. A template is not for posting content. They'll be used for posts or pages to display the content with the post content block and then templates can be used for single or multiple pages or posts, and also now 6.1 as you noticed categories as well and other taxonomies you can create templates for those two now. Some common templates that you'll see that are typically included with most block themes are single posts which is anytime you make a post this is the design that your post is going to have your pages, similar to the single post. You can also design what your 401 pages will look like if someone were to hit that when they're browsing your site and the index is essentially the default template used when no other template is available. And then the home. The home is what you jump into as soon as you click on the site editor. Okay, so we've talked a little bit now about initially I'll back up before I jump into information on the query loop block. I'm curious if folks have any questions about templates, what they are, how we use them before I move on. If one comes up, feel free to just type I will pause and I'll read out your question and work through it. Thank you. Where do I find the editor as I'm self hosting WordPress. Oh, that is a good question. Let's get through this one little bit on query loops and then when we're in the sandbox, which is my local environment of WordPress I can show you exactly where to access that system. Okay, so very quickly before we get into that sandbox environment. What is a query loop. Essentially the query loop is a an advanced block that allows you to display posts based on specified parameters for folks who are technically inclined. Think of you can think of it as a PHP loop without the code just dynamically pulling whatever you're querying for the posts. So each query loop block is made up of various nested blocks like the post title block the post excerpt block read more etc. And while you won't be able to edit the content of these nested blocks, you can customize the appearance and layout. So similar to template right the query loop block isn't for creating content. And on the page itself it's for propagating the content that you specify. So, for example, in this animation here I have a bunch of Italian food recipes and that's what the query loop is pulling I have other recipes like African food that we'll see, but I want specifically to be about my Italian food. And so any post that is marked as Italian food or European food would be pulled into this query loop. Okay, so then yes you had a question. Let me share my setup with you and we can dive into your question about where to find the editor. So today I'm using local for my local environment. I find that to be pretty easy to use. And I'm also using 2023 which is the latest WordPress.org theme, it's accessibility ready as well which is really great. And then the latest version of WordPress which is 6.1.1. Here's some links to to that setup. And it's not only about what I like there are many options available to folk so I like to just share some other options in case you don't find that local is your style. There are many more options for you. Next which I've included in the themes section is also an accessibility ready theme. When I last talked about these kinds of themes, there were only four and I've seen since I last checked now. There's about six. So it looks like folks are picking up on making sure that block themes are more accessible going forward which I really appreciate. So let's let's jump into my site. This is the the fun exploratory part here. So I thought a good way to talk about and actually I have two versions here. Categories is with a recipe blog so I just very quickly created this recipe blog which I find to be looking pretty professional. I would say so myself already and I will say they did not take long to to create this with the vanilla WordPress I'm not using any other plugins. I'm using out of the box WordPress and 2023 block theme to create this look. But because we're talking about categories here I've created some recipes in three categories Asian food African food and European food. And this main site to this main page I wanted to share that this display here is also a query loop block pulling these posts, and I didn't do this design myself, I actually pulled this from the WordPress pattern directory. Someone had already made this beautiful display for recipe or for posts, and I thought, you know why not just pull and use the magic that someone else has put together. And that is another way you can go with this so we won't be looking at this one specifically but when you use patterns as well you can very easily look at them in the back end, and see, you know how are they putting these together and get some inspiration from that as well. Okay, so what we will be looking at is I have manipulated my African food page this is essentially a, you can see in the link here, an archive page for the category African food so African recipes. This top part is a query block as well. And then I've just experimented here with how they could be displayed. So I chose some colors from that tip that are typical of African flags here did a bit of design work and we're going to have run through how I did that very soon. But going to my main page I want to show if I didn't do all that work what would it look like. And so this is a page that you would get straight out of the box with the theme that I've chosen. But it's not bad right like I think the display looks pretty fine you get the featured image, your title, the date you can add more to this as well. But I think most people don't want to have just category Asian here so I went and tweaked that in the example we're going to work through today. But if you're satisfied with this like, hey, you don't even have to put much work into it but I want to show you how you can do a bit more work on this. So, to get there. I'm going to my dashboard appearance. Sorry I didn't need to click but appearance and then editor. It's just loading so give, let's give that a second. Well it's loading. There's another way you could access this. So on the front of my site I'm logged in. I could have also just clicked on edit site at the top here. And that'll take me to the same page that this one is is loading me to right now on you stubborn page. You know what, I have the Wi Fi turned on that might. Let's get to ethernet. Okay. So shouldn't be broken pages. Let me refresh here real quick. Actually, this doesn't matter. So, this is the site editor where you'll land on, even if you're on the category page that you want to access it's going to take you to the site editor first and you'll see up here that home is the first page that it'll show you here to be changed. But I'm going to click on, if you have a logo set it'll be the logo if you do not have a logo set here in the top left it'll be the WordPress logo. So you'll just click there to toggle this navigation menu and click on templates. And so this is the site that already has the African category template created. I also want to show you if you have made any changes to other templates. You'll see this little blue mark here that says this template has been customized. So that is essentially in the home to things that I've already manipulated straight out of the theme. So when you have a new template that you add it won't say 2023 theme. That's because I'm creating it on top of the 2023 theme. But if it says 2022 2023 here, it's because it's part of the theme and then it's showing that I've customized it further. So, I'm going to go into this site actually, because this does not have the category page yet. And we're going to go to templates. You'll see here I do not have any templates here yet that are for category pages, add new and category. So for this one I want to do a specific item. And that specific category that I want to use is my African food recipes. Okay, so now it's already generated this, this template page for me and all I have to do is, is change it to look the way that I wanted to look. And from the beginning here we had not something that said archive type name. We had a banner. So, curious, sorry. On the editor apparently changes to the customizer if you have another theme installed. Yeah, I'm curious what what theme you had installed. So then so if you have a classic theme thinking that this is great to point out if you have a classic theme installed you will not have the site editor. It's available to you block themes are the types of themes that will give you that access so 2023 is a block theme for example. And if you're in the repository for themes, and you use the full site editing tag to sift through these would all be themes that also enable that site editor functionality for you. I'm sorry I couldn't clarify that for you but it's a good point to share with everyone. I do want to note as well that with this latest update and you are able to enable template parts with classic themes as well. So if that's something you're interested in it is something you have to do coding wise. And that is still available to you. If you do not want to change to a block theme, although I highly recommend the block themes there they're getting really really great. So for my page here, we wanted to we want to start getting it to look like what I had on my original site. Let me get here. So, we're trying to get it to look like like this. So we're all here. This doesn't have much to do with the query loops but I want to show you how I got that put together. I like doing clicking the three vertical dots, and then an add before insert before. This just puts a block readily available above the content that I've selected. For me as well accessing the block repository is easiest for by doing a backslash and then searching for what you want so in this case I want to cover but you can see there's a lot of recommended things that come up, but you're not limited to that so you just want to type in the type of block you're looking for in this one instance I'm looking for a cover. I had a black background, and I'd also like this cover to be full with so across the whole page. Right now the default is to have a paragraph but I'm going to put a heading here. And let's make it each one. African food. That's not all I did here when you have these blocks open on the right hand side you also have a lot of customization that you can do. So some things that I did here was change the font family for one. I believe it was this source Sarah pro yep. I also centered this. You can also adjust the size here and I think in this case, XXL is perfectly fine. So now we have this banner on the top of the page whereas before this one. We were looking at this right so as we're making these changes I can do a little refresh. So let's do a save real quick and see how that's adjusted this page. There we go. Now we have that banner at the top of the page. All I need to do is get rid of this category here. And I can do that by removing this archive title. Great. So we're partly done here. We haven't touched the query loop yet so let's look in looks look at what that is doing right now. One thing to note is with this default one. This setting inherit query from template. It's exactly on by default. And so what it's doing right now is it's inheriting the query which is African food things that are categorized as African food and pulling up those posts. If I didn't have that toggled on. It would just start displaying all the posts up to the certain amount of that I have set without really changing it based on the category page so you are totally welcome to if you're like hey I just wanted to do this. And that's all I need. That is totally fine. But that does kind of limit some of the capabilities you have for display settings for example so when this is tackled on you see there's no display settings button. And then it comes on this little filter. After that. And you get a couple options here how many items per page, the offset when to start the queue of posts and then how many to show on the page. And from here though we still want it to be cognizant of our, our African food category so I'm going to scroll down on the right hand side and click the plus on filters and toggle on taxonomies. So here we can once again just filter out on this specific page what types of posts should be showing up. So with that done. Now you know a bit more about that, but my first query loop on this page it doesn't really look like what's it's showing right now so I'm going to do an insert before here. And let's look at the query loop. So here are some options here. You can choose a pattern for the query loop or start blank in this one right now I'm going to do choose. And I find it to be easier to look through these when you actually have content on your site. Otherwise, there's going to be a bunch of placeholder images and content that might not make it as easy to visually tell the differences or the styles that you, you will have. So with this, I can see okay my featured image is going to be on the left we've got the title, a little excerpt, maybe read more. And you can kind of see better that how your posts will be displayed with if there's actual content in there. For this first one though I just was very simple here and I chose this pattern. I told it to not inherit the query from the template, but I filtered once more so that it only gives us African food. And in this style if we look back at the oops, the page that has all of that without completely making your window too big. Here we go. We look back at this page. And this one's really long across. So to get make that happen and it's only one that's doing that. So which template theme should we install good question. I'm using the 2023 theme. This is the latest theme for WordPress 6.1 which was released last month. So it's going to have a lot of great customization options already available to you out of the box. It will allow you to use the site editor and blocks as well. So going back to this query loop and please, please keep asking more questions or stop me if I was too fast. I'm very happy to go over anything again. With this first query loop though design wise I had. I got a template here on this alignment and got it to full width so it's across the whole page. And then I did tamper with this items per page here so it's three right now I only want to show one. And here you'll see, I've got a doubling of those posts now. So that's where the offset comes into play here because then I can offset this query loop by one. So it's saying skip one and go on to the next posts, which is pretty valuable if you want to kind of play with the design a bit more. And now you can see, if we save. And probably need to do a little refresh me rearrange this. This is looking like the example page full with across and then we only have the two other recipes in this collection we don't have the ox tail soup coming at us again. But that's not the design I fully created in the example site so let me show you how I went about doing that. So we're going to leave this first query loop alone. And I'm going to remove our other friend here. So when inserting blocks, I find it easier to click on the one before, and you can do an insert after insert before. Otherwise, some things could get grouped together so you want to be mindful of that potentially happening as you're as you're going through this. Okay, so we've got, we don't want to paragraph. I'm going to start with a row and bear with me here. I'm hoping to get two rows of my query loop showing the recipes essentially so in this first row. I'll add my query loop. And instead of choosing from a pattern like we did with the one above. I'm going to click on start blank, which is kind of fake news a bit because as you can see it's not really starting blank blank it's still giving a few samples to work with here, which is totally fine. So, instead of starting completely blank I'll start with the image date and title. And then I'll open this up so I can see exactly what's going on in my query loop here so we've got our image date and title that those are totally things that I want to have. But what I would like to see here is the everything in case in a background color so the way I did this is I'm clicking here on the post image, a featured image and I'm going to insert before a cover. I'm just going to choose this random color now but I actually want it to be. Oh, I did this last time, not the paragraph. I would like the cover to be. Yeah, this nice golden yellow here and we'll just remove this on this paragraph because we're not even going to use this paragraph. And then within this paragraph. Sorry this cover, I've got a row going on. So let's do kind of just done there but that's okay a row and remove this one. And I'm going to start putting the things that I have in this row so what am I doing. The row that I just created within my query loop is going to create this effect here of having the title and the date aligned, and we can definitely increase the rows as well to include more but for this example, it should just I'm going to show you a drag and drop here, the title. I'm going to open, I can also drag and drop within the list view to be right beside. Awesome so now, hey, that's done. Next up we do want this post featured image to be within the same row as you can see it's not included in there yet. I'm going to pull that in there. Sorry not within the row within the cover, and then I'm going to push this down. Here we go. Going up here. Now we have the title, the post title and date within the row and the featured image within the cover as well. We group that together. As I did though we had the post excerpt in a read more so let's create that. So excerpt. There we go. And then one more after here. We have the read more. And those were the essentially all of the items that I had within my query loop block here. Good. Okay, so. One of the things that you'll notice is still a little different is the curvature of the images here. There's some kind of design aspects. There's a bit more padding, the read more looks more like a button. These are all things that we can now play with in this right hand side block design tool area. So that immediately come to play come into play here as padding so I'm selecting this whole cover here. I'm just going to use the padding one so immediately it's not any longer edge to edge. We've got some space in between. So you can do this for any aspect you'd like so if I wanted my road also have some padding so that the letters aren't as close to the image I can do that. It doesn't this is a universal setting. So if you don't want to do it like that. You can click this hyperlink looking area button icon here, and do individual sections like top right bottom left, or if I unclick that. General smaller pixel changes like 10. Or more depending on what you want. Because as you can see when you go to one it has a pretty wide setting there. And then clicking on the image itself. You can get more granular with the design tools now which is pretty great. So, for example, for this I played around with the radius. If I click on the top right, I could run 100 in the bottom left 100 and that gives this smooth curvature on the bottom and the top. And then the other kind of design aspect we had here was just read more button. And what I did here was, I added a background color and change the text so you can read it still. It's pretty close together. So to fix that I added some padding as well but, oh my gosh, if I click on one, it's quite a lot no one needs a button that big. So I did do a custom size here instead and just a couple pixels essentially to give it more of this little button like effect here. So that has already given us a bit more of design here. So we have two rows. So two rows of posts popping up here. But they have essentially the same design principles that we've we've used here. Instead of trying to recreate exactly what I've done here and I'm going to remove this pagination that's not in there. I'm going to also remove the no results as we don't need that here either. So I'm going to just, hey, I'm going to just try to recreate this one by one, but it's really good that if you click here, there's a duplicate functionality so you do not have to go in and redo everything that you've done. If you've said it right once you can duplicate. And since it duplicated within my row. Now they're side by side. So looking at here, this should be showing. African food. And then this query loop, which is right next to it. We'll also want it to be showing. African food. But the color background color for this cover was red. So I'll just change that to red. And there are some kind of dynamic typography things design wise that are happening here as you saw when I changed the background color to red. The font automatically changed to white, which is pretty handy because then you don't have to go and change that as well.  I'm going to save all these changes we've made so we can see what that looks like. So this is what we had before, making all of those edits. And now we have the two rows of posts being dynamically called. You can keep playing with the design as much as you want. There's no stopping you there. One thing I'm already noticing is like maybe adding more padding to the row. So it's not so on the edge of the page as you can see here it's like, on the edge, I just added some padding so now it's not. So my question came in so I'm going to stop there and then if anyone wants me to redo something, or has any other questions feel free to type them up. Let me see if I can get to this one real quick. I think it has the theme 2023 blank installed where we get the designs images. Yeah, so I'm happy to share some aspects of that with you so when you install WordPress in a theme. It doesn't automatically start creating pages for you there's some placeholder content that should be there I think it says like mind blown or something on the homepage. So that's something we can see within the theme library itself as well so 23. Yeah, so when you install 2023. This is essentially like the front page that you're going to get and I think if you preview. There's not much in here right. What I have done for this exercise is I have added posts and pages to my site and that's why you're seeing these recipes being propagated or being shown when I put the query loop. I also played around with the design of my site here and there's a couple options here that you can use if you want to have something a bit more in place before you start playing with it and I linked above but I'm going to relink it the pattern library is a really great tool for this. So here it is again. Let me show it here. Essentially you can search for what you're looking for here. We haven't gone into any of my recipes but for example, if you want a recipe blog. There's some fine folks out there in the community who have already created some really amazing looking pages for you to just copy and paste into your site. It would be as easy as clicking this copy pattern button, which I can show in this template that we're working on. I'm just going to add insert. It's after here. And I'm just going to paste that pattern that I just grabbed from the pattern library so you can just, you know use the work of these awesome designers and then make it your own so I would replace this image with. A recipe of mine, which I've actually done in these examples so if I click in here, I did use that pattern specifically for this recipe blog site. That's I think a very quick and easy way for you to get started. But I do encourage you to then you know you have all of these elements that someone has put together. Just have a look in the list view of what they did how did they like do this to get it to look this way so that you can kind of have a better understanding to have what's going on in your site. Yeah, I hope that helps in terms of images. You can add your own images via the media library. So I'm back in the back end here and there's this media area. That's where you can add new images I've just added images of the recipes that I had. But there's a bunch of free image, high quality image software or soft sites as well out there. One that I've used is on splash. There's things like, I think pexel as well. You can browse and receive these free high quality images stock photos, because I know sometimes getting these high quality shots is this pretty difficult. Okay, so I'm going to remove the recipe block I just did this undo up here. Yeah, you're very welcome. Well asks, is it possible to use a query loop with another any other post type pages or custom type like portfolio, or team members. Yeah, I would say so, especially now if we're going, going back here, I'm just going to open up my templates. So if you are technically savvy and I believe you know you are from past sessions together. I think my session closed out one second. Refresh. There we go. So I've just gone back to the site editor, then access the templates page we add new here. The query loop actually going back here, we, when you're on a new template page, specifically this one that I created for my African food recipes for example, I think you missed it but when you have just the default setting on in the query loop, it'll, take the setting inherit query from the template. It's going to automatically pull the posts that are categorized as African in this page itself so from there I know when I create this page, it'll show that taxonomy. I think in theory. Yes, if you have this custom taxonomy called team members, for example, where you've added posts of these team members or pages of these team members you could pull up, you could create a template for that page and then use the query loop to pull up that information. And you could also use the query loop to, and use the filter to pull up that information. Please let me know if that's helpful. Yeah please try it and I, I'd love to see how it shows up so if you see me again send me a link I'd love to see how it turns out for you. I did want to note something kind of critical with my setup here. Yeah, I'll look forward to it. As you can see there's things repeating right so one thing here that I did in my other example was use the offset. And so now. Oh, and that did something unexpected as well. Well, let me look at that real quick. Now it's got this like little sliding design that I that was unintentional but looks really interesting. I wonder if that'll stick. It's an actual page not a recipe. Huh. Well that was a little unintentional but kind of interesting design wise. What I had meant to do was just offset it by one, and then I could do maybe. I can leave it as three but then go into my other one. My other query loop here and do the same offset of not to maybe one. And that has them side by side, but no no longer is the ox tail stew showing up. And so this is one of the. Yeah, so Suzanne taxonomies here. For example, in this filter that we were playing with if I click on it. That's going to include categories and tags. And if you are able to create custom taxonomies that would require some code adjustments. Then you can add more than just categories and tags you can maybe have a taxonomy that is called portfolio for example, and that'll allow you to apply the portfolio taxonomy to post some pages. Okay. You're very welcome. And thank you for stopping me I'm happy to keep answering anything that is unclear. And somehow I think I turned off my category here. Alright, we're back we're back with the chicken soup. So what I was noticing here I wanted to share as well as this is all great, but we're kind of noticing a limitation here where I can't like offset it where I have my two rows and then it'll show my post number two chicken soup. And then my post number three on the right side, Joll of rice, it's showing both. And one way I was thinking you can maybe get around this is by also incorporating a tag. So for example, this is pretty general right now right we have African food, but maybe on the left side, I want to show my Nigerian recipes are on the right side I want to share my Ghanaian recipes. So that is an opportunity where you can have the content of both rows, then be different for your site. So I think in an ideal world you can have these two rows together, and the query loop would be able to identify already, which posts are being shown. Maybe that's in the works I don't know that's possible yet. But in the meantime, one work around I thought of that could, you know, allow you to do this really creative design but make sure that you're not showing, you know the same thing in both columns is to incorporate a tag or a different category and different tags are in the query loop you're using. So for example, I have, I go to my posts back in the dashboard posts. So I have my chicken soup, that's tagged as Nigerian, my Jalaf rice is Ghanaian, and my oxal soup is Togolese. I'm just going to use the Ghanaian one on the right side and Nigerian on the left side. So if I go back to this post in my query loop. I'm going to add that tag that I was talking about so I'm going to add Ghanaian over here. And then over here we have Nigerian.  That's because I still have this offset on. So we'll want to zero that out. So our posts will show up that we were using the offset when it was calling every single post in the category of African. We only want it to show one specific post from my Nigerian recipes. And we don't want this to offset either because there's only one post. But now we have all of our recipes showing. And now I'm seeing this being really squished and I hope that's just because of my window size. But let's have a look here once we save. I could press view right here in the top right. I don't know why I keep clicking out. And we'll go to recipes. And now we have the ox tail soup. Jalaf rice chicken soup. So now it's not showing the same recipes it's showing the recipes from the different countries. And if I were to add more Nigerian recipes for example it would show up in one row. And if I added more Ghanaian recipes it would show up in another row so that's kind of like my quick hack to showing different posts but keeping this unique style. And I'm happy to hear if anyone else comes up with something interesting like that as well. But ideally it would recognize hey this other post is already on the page let's show a different post and alternate that would be my ideal scenario so maybe we'll have to talk to the community about that. But that is all I had to share it with you all today. Are there any other questions folks had. I'm happy to explore a bit more we've got eight more minutes. Okay yeah I'm glad things are sounding clear. And you'll have this video to to refer back to with anything that we chatted through today. I just want to leave you all with a few more resources. I've already shared with you the patterns directory. I highly recommend using it if, even to just find some inspiration because, as I said, some people have really designed some really interesting questions already. Can't, Stefan asks, can I include also some PHP code to have a loop. Oh, that. I'm not sure. I'm not, I'm not that technically advanced but that is an interesting question I can ask someone and get back to you unless someone knows. So I'm going to ask that. What type of, are you trying to imitate the query loops to fun. I'll ask around about that and see what I can find, but maybe also useful to you is, we have the blocks handbook, and the block editor handbook, it might have something in there about looping if we looked a little deep, but I'll still ask around and see what I can get to you in terms and answer on that. I would love to stay connected with you all. There's also this individual learner survey. If you have a couple moments, we'd love to learn more about. And by we, I mean the training team who helps put on these interactive learning sessions online workshops for this community. We just would like to know like, how do you like to learn what type of content would you like to learn how can we better this experience for you all so yeah if you're just starting with WordPress for example and just sharing about you know what topics you're interested in how you prefer to learn and what you need to know to get started and will be really helpful. Thanks for staying in touch. Here's a couple links. This, if I believe everyone has signed up on meetup so I'll be sending a email later once I get the video, just so that you can rewatch this video. And I'll also include the slides so you can look through the deck that I've shared today. I think I can actually share that already so happy to pop that in right now. Copy link. Right now there there you are. I'm going to stop my share of visual. So someone says I would like a general visual overview of who the machine of WordPress is working. Oh, like, like a code overview. Oh, I have, you know, it's late for me I could have read it I understood what you meant. The machine is working yes. I think there are probably other WordPress. And let me share this link with you WordPress dot TV videos on the inner workings of WordPress that you might find interesting so I'm going to leave this link with you here, I can try to find a more specific video. This is also a really great resource we have videos in multiple languages as well I'm sure you'll find some some German content in there. There's a lot of non English content in there for folks. So have a look in there too and I'll see if there's one that's like dissecting WordPress for you to to look at. I'm going to stop the recordings well.


One of the great, one of the characteristics, put it this way, one of the characteristics of a pre-capitalist world, a characteristic of a pre-enlightened world is that, you know, to a large extent, my wife just turned off all the lights. So hopefully you like this dramatic look better than the previous one because she likes it, so she's keeping it, all right. So the thing that categorized the pre-capitalist world is with a few exceptions, with exceptions of, you know, particular periods of time or exceptions of particular geniuses. For most people, for most people merit, ability, capability, hard work, didn't matter. What mattered predominantly in terms of the kind of work you had, what mattered predominantly in terms of the prospects for your economic success and the kind of life you were likely to live, is who your family was, what your, quote, bloodline was, where you came from, what race you belonged to, who your parents were. That was the primary determinant of success of the kind of life you were going to live. And you could be a genius in a particular field, you could be brilliant, you could be passionate about it, and you would not be able to even enter the field if you were in the wrong, if you were born of the wrong family at the wrong time in the wrong place. In other words, life in a pre-capitalist, certainly pre-enlightenment world was determined predominantly by the luck of the draw, by the family you were born into and by, you know, and by the circumstances. Now, yes, at the margin you could make a difference, more ambitious people, people with greater ability within a particular context could show themselves to be particularly good at something and succeed, but it was rare and very unusual. I mean, I tell the story of Leonardo da Vinci, because I think it's fascinating, you know, during the period in the Renaissance when Leonardo da Vinci was born, men were basically did what their father did, almost everybody did what their father did. There were some exceptions, and as I said, you know, if you saw extraordinary talent like Michelangelo did, and you happen to be in Florence, and they happen to be patron of the arts like the Medici's were, and your father was open to this and willing to do it, you could be sent to work in sculpture even though Michelangelo's father was not a sculptor. But for the most part, for 99% of the people, you did what your father did. You basically joined the guild your father belonged to. The extraordinary thing about, you know, that Leonardo is that he didn't, and that he landed up being what we consider an Renaissance man and doing all kinds of things and super interesting things and living a super interesting life and being an amazing, world-changing artist and being an engineer and being a consultant to rulers and being an engineer and being an architect and doing all kinds of military engineering and military tactician, doing all these kind of things. And part of the question is, why? I mean, Leonardo da Vinci's father was a notary. Well, the reason is that Leonardo was a bastard. He was born out of wedlock so that he could not, indeed, become a notary. The guild would not accept him because he was an illegitimate child. So in those days you had to be an illegitimate child to have the freedom to pursue your talents, to pursue your skills, to pursue your particular genius, to pursue your interests, your passions, your values.  Now, one would like to believe that he would have expressed that genius anyway and broken out anyway. But he might not have.  Their life was, indeed, determined by their social context and by their genes, not so much by their genes in terms of dictating their behavior, but by their genes in terms of their heritage, in terms of who they were.  And one of the great achievements of capitalism is the shattering of that. Now, the shattering takes a long time and it doesn't happen all at once, but it is shattered. By the 19th century, it doesn't matter who you are born to. It doesn't matter what your family is, or at least it matters a lot less in places like England and certainly in America. It doesn't matter at all who you are born to. It's what you make of your life that matters. It's what you do with your talents and skills that matters. Think about the justice of a system where your fate is basically determined by random luck, a system where your fate is determined not by your choices, not by your passion, by your energy, by what you focus on, but by things that are completely outside of your control. It's a deterministic world.  It's a dark world. And it's a world in which those people with ability, those people with a genius, those people who could do extraordinary things are completely stifled and limited and live shadows of lives because they never get to express their true ability. They never get to express what they're capable of. They're never able to live up to their full potential. How sad. This is humanity for 100,000 years in the beginning of mankind until about 250 years ago. We were constrained and limited to what society was willing, what people in society, what our rulers were willing for us to do, and to the family from which we were born. And it's tragic and sad and horrible that people had to live these kind of lives. And yet most of humanity, all of humanity, overwhelming majority of humanity lived exactly that type of life. Again, capitalism broke that. Suddenly, individuals were free to pursue their life they chose. They didn't need to ask permission. Their chains were broken. It didn't matter if you were born an aristocrat or a peasant. If you were good at math, you could become a mathematician. If you had an idea for a new product, you could become an entrepreneur. You could become a businessman.  If you didn't have the right accent, if you didn't go to the right schools. But the beauty of the 19th century is those barriers were starting to be shattered. They were breaking down slowly but systematically. And indeed, I'd say by the late 20th century, early 21st century, many, if not all of those barriers were gone. It's true that in the 19th century if you were black, you still faced barriers well into the 20th century. That was true. But by the early part of the 21st century, those barriers were being shattered and broken down and gone. If you were a woman, suddenly you faced barriers throughout all of human history.  With luck, none of that was possible until in the 19th century, slowly this gets eroded and in the 20th century it gets eroded fast and one could argue that today those barriers don't exist on women. They can do whatever they want. They can pursue whatever values they want and think about what a massive achievement that is and to that extent, another reason not to be so dark about the world in which we live. If you're a woman, if you're black, if you're gay, in many respects has never been a better time to be alive. You've never had so much freedoms, but that's true of most of men as well, particularly those of us who do not come from truly privileged families, the kind of privilege that aristocracy granted you. The last 250 years have been amazing. The end of the 20th century, early 21st century, it is truly amazing and that is because we are treated as individuals and therefore our abilities, our talents, our genius, our merit matters and that has been a path for the last 200 years, 200 plus years that civilization has gone by. It has gone to valuing merit more and more, to where merit measured in a whole variety of different ways is ultimately determinant of success, of achievement, of what you do with your life. Ultimately all the idea of merit is the idea of individualism, the idea that you're rewarded based on your individual effort, talent, ability, merit and then we each get to do what we want to do in life, pursue the values that we want to pursue and benefit from the riches hopefully that bestows on us or that we create and we achieve.  And while we were achieving with a lot of, again with a lot of challenges and a lot of inconsistencies granted what was slowly being achieved was a true society of individual liberty and of people rising to whatever level they could achieve based on their own ability, a society of ability, a society that's celebrated and rewarded, ability. There's a story from the city of London, you know, Wall Street is a good example of this, I mean and we'll get the city of London, it used to be in Wall Street you know up until the 1980s investment banks run by Jews for example were looked down upon, they were second class investment banks, they didn't count as much. Well that was shattered in the 1980s with Drexel Burnham and ultimately Goldman Sachs becoming the premier investment banks in the world and taking out the kind of the old stuffy semi aristocratic, you know, white Protestant I guess, ethic of Wall Street that celebrated particular people and admitted particular people, that was even more so in England. And if you go back to England, into the city in England, investment banking in England, investment banking is different than banking, it's mergers and acquisitions, it's advising, companies are taking, companies public, it's a very, very, used to be very, very stuffy old boys network, very male, very white and very in England having the right accent and wearing the right shoes and knowing and wearing the right tie and knowing, you know and really having the right accent may be more important than anything. And if you didn't have one of those things, you just weren't part of the boys network, you weren't part of the club and you were never, you could never join kind of the inner circle of the city. Well in 1970, Goldman Sachs opened an office in London, in the city of London and started hiring people based on only one criteria, only one criteria and that criteria was ability.  And the city of London today is a very, very different place and if you go there you can see. And it's not because of anti-discrimination laws, it's because it's just not very profitable in a competitive market to not hire the most talented people. Goldman Sachs taught them that, broke them old, took their business away. And that's happened time and time and time again, you know, racism, sexism of all kinds are just not profitable. So we were getting close to a kind of world where at least in business and in work what really mattered in life, what really mattered was ability. Think of Silicon Valley, think of startups, think of that, the energy behind that and nobody cared where you came from, nobody cared what country you immigrated from, nobody cared again what color of your skin was or how you spoke or whether you spoke English at all. It was your ideas, it was your ability, it was your hard work, that's all that mattered. Silicon Valley, I think, represented that more than any other place on planet Earth and was he caught up and the rest of the world really caught up to that. And then it seemed like the old devil from the pre-enlightenment from pre-capitalism, it never dies. It always tries to resurrect it, it always is resurrected, it always comes back. And I think it doesn't die in, it always resurrects itself because it's never been actually philosophically, ideologically crushed, stomped upon, demolished, really until I ran. And it always comes back whether it's, you know, to each according to his needs, from each according to his ability, right, from each according to his ability, to each according to his needs, right, to help with merit, you know, at least economic rewards, economic rewards should be distributed based on need. And socialism and Marxism has been alive and well and an undercurrent throughout. But indeed it wasn't socialism and communism that eradicated the feudal and aristocracy-based and racist-based systems. It was capitalism that eradicated those. But it keeps coming back. Yes, we should treat people by their merit, we are told. But the outcome should be equal. That is, people should be able to exercise their merit. But they should not be rewarded based on their merit, they should be rewarded equally. Equality of outcome keeps sneaking back into the discussion. It certainly didn't in the 1960s with the new left. But it didn't really last because it didn't really have legs and people didn't really buy into it. And the 60s were a period in which there was a lot of talk and a lot of angst and a lot of attempts to bring about this equality of outcome. And the welfare state was established as part of that. But at the end of the day, the world seemed to revert back to a system of respect for merit and the barriers coming down and Jim Crow being eliminated. Again, I think it being eliminated more than anything by the marketplace, by business, by work, now unfortunately aided by affirmative action and anti-discrimination laws that actually I think have led us to a place today that undermines all the achievements we've made. Thank you for listening or watching The Iran Book Show. If you'd like to support the show, we make it as easy as possible for you to trade with me. You get value from listening, you get value from watching. Show your appreciation. You can do that by going to iranbrookshow.com. If you'd like to see the Iran Book Show grow, please consider sharing our content and of course subscribe. Press that little bell button right down there on YouTube so that you get announcement when we go live. And for those of you who are already subscribers and those of you who already supporters of the show, thank you. I very much appreciate it.


So welcome you to the next session of embedded software testing practical demonstration today we will study on the other tool called understand for CC++ this is used for static analysis purpose so we will try to go through samples you code how to configure the project and using we will try to select some of the metrics and analyze them and finally we will generate the report and how we can see the report so we can use the static analysis of example with understand for the PC purpose okay so we will try to invoke the tool so the tool be installed something like this understand this tool is static analysis from scientific tool worth doting so you can also get a evaluation version of this and we can use for 15 days for practicing and this can be downloaded free okay so we know that so what are things that we do in static analysis like we know the difference between dynamic and the static analysis in dynamic analysis what we do use we will do the testing of embedded software when the software is running on the target whereas in the static testing static analysis are testing we do not need to run the embedded software that is of testing interest basically what we do is in offline or statically we try to run the various test cases or the various aspects of the embedded software so one of the important thing that we need to be going about static analysis that we know that so no need of target execution need the inputs based on the test strategy which basically requires the manual inputs in a sense these inputs could be source code of course test cases of scenarios we need then we need low level design document or requirement document say and a strategy what is that scenario what we have told so wherever we need that static analysis type of testing that is required for example we have a control coupling data coupling right so this is one of the static analysis aspects of verification methodology we will see the flow graph of the embedded software with the help of control coupling where the part tree is getting generated and we will see who is calling whom and whether the code is there the object is there etc so with that help of the control flow we do the control coupling so that the being verified with that the other way is the interface between the various variables between different functions we use the method called data coupling okay okay so we have a understand for CC clusters it is from SCA tools we can get more information about this that is called SCA tech or SCA tools.com let us try to look into their website so that more information we can get SCA tools.com okay so we connect before that we did not understand here we have a couple of windows available these are the standard windows you know items in terms of file selecting the new file or creating a new file creating a project for understand CC clusters how understand CC clusters what is basically it creates a project of the source the embedded software source and it will configure and it will have mechanism such a way that it will try to understand the source and generate the report similarly we have a edit search project project has a configuring of various type of a matrix that we want to do in terms of other and if we add more files we can analyze further the change files only and check for any updates of the files the source files we can do with this we can generate the reports with this and matrix summary of the entire project or the entire file can be seen here matrix export can be exported to format as such as a CSV file or HTML for that complete report is available with the appropriate links we can run through command also and we can add a pulse script as a additional thing and any user tools which has configuration and all that it is part of the SCM or the software configuration all that we can use this option of course the standard options are available in terms of what files what type of a environment we are going to use we will go through this when we select a few sample okay so let's try to open up a file called test.udc the name of the project it uses is udc and this is a sample part created called the main.c and as soon as we select that it is adding to the project of this own on this time CC++ and displaying all the details that are required inside the file that I have chosen so based on that I may see several options is going to generate the various items such as it defines the file the path where it is defined the globals that are used the functions global functions there is a delay function there is a main function there is a nothing add different line numbers you can see and in total matrix of this file it is shown you can see count line code count line command count line inactive like on executable executable line and commented line etc so all this based on the matrix that you have chosen is going to show similarly we have a different type of options here CC++ you can use global objects who is calling all these options can be seen okay so we have chosen the project we have selected the file probably we try to reconfigure it so what we do is I will let you get a new one so we have this path we will try to create a new project so it is the current project that is close we create a ES team test we have a source sample source for this class same path we are going to generate okay now as soon as you are created the project it is showing the project configuration how this project is static analysis understand what is this tool can be configured so in the source you have to tell that source where you should pick you can select the source like sample C code we have we will try to see that so there is a C file created for example it is some embedded software or simple example which has a main which has some declarations such as in tie volatile some registers basically it is a toggle GPO toggle project which uses simple functions in terms of outputting the value in a segment seven segments of a display we can see that 3a of display 0 is initializing basically to start with and you know any embedded software will run while one look that is the life of that embedded software and you can see there are different functionalities that are getting done in this so let us not bother about what it does but so different sort of life we have structure we have a sub function called we have a for loop so there is a assignment statement etc so there is a delay function there is output function so what it does is this will display 0 1 2 3 continuously so that is a function within the while one loop so it is continuously going so it is going to call different sub functions such as delay let us say what this delay does for i equal to for 0 to some one lakh is going to run so based on the processor clock and all that much delay it is going to happen typically they use this is calculated off-hand then there is a function called nothing so nothing just does nothing it can return or return 0 since it is not doing anything we will say this so having two sub functions and one main function simplest main.c we will try to configure in our static analysis so while filter what are the types of files that I have selected star.cpp but you can have nothing wrong with that if you select assembly file some compilers will produce a star.list file c++ based extensions cc files header file h file c file etc so it is going to add that with this so that is what we do with the sources so next we have options so based on what sort of analysis we need we can select these options so any local object reclamation you want we can use it so we have some local circuit we can select it parameter reference any parameters we are passing it we can use it and in this case we do not need so any nested commands are there we can use it it is giving a information saying that nested commands are not standard because of physical force usually it is better to avoid that enabling nested commands support can produce so he is asking not to enable it so better we will not use the nested commands associate commands so commands particularly the right about the source code right so let us see whether we have written any command let us try to put some commands in our command and probably STA embedded testing program I declaration similarly register declare mode register or register so of course we can see this comment is right to this but it is advised not to have this here ready to have the source line the timing will keep it here may the project will understand the commands which are above or below like so we have commands as well for each of the line so that is about associating the commands so we are saying that commands before definition longest command before or off definition so we just say commands before definition of the variables or usage of that below one is the compiler basically yes does not do the compile but what should have a compiler we are using we need to use why because it is going to generate the report for a type of C language and what sort of a compiler that we use for embedded software is needed in terms of understanding what we are trying to generate so we can use anything for example or alphax, HPX, IAR etc. KLC like as we have let us say to choose Boreland C++ so any pass compiler separately you want to add it you can add the path there is the option here okay next one is the include we know that include is required for other file or any process specific kind of file you want to add it we can add with this in this case we do not have any other file it is for time being we will leave it up so sometimes what will happen is there are standard libraries like std.io.h, con.io.h which are part of the compiler inbuilt within the library and we are not able to explicitly show the path in that case what we can do is you can ignore that particular include files so that it does not take care of that okay next one is the macros any macros that you want to use it across the project you can name that and define where it is that we can add it next one is the MSVC so is for VC plus VC positive we do not need that file types what are the types of files that I use including header file in my project is what we have to tell we have C plus to start type C type makes C C plus to start so safe is to use mixed C C plus to start so I will choose C because we have on the dot C file and once you use the C plus plus or C you can select CPP extensions the C plus extension C extensions it uses C otherwise default it uses C and header file whatever header file sometimes it will be used in general we can mention it so all the things we have done so we are going to add now the particular C code and we can see the path it is showing and it has chosen with that cross mark so the main is chosen here after all these options are being done so I am going to say this so project configuration has changed that means I have changed some configuration in order to incorporate change it is recommended with all the refiles so rebuild now that means what are the options we have given the project is going to be rebuild with these options I will say yes you can see the project is added and the new project with the database let it create it here complicated successfully you can see there is something it could have created all the test EST test UDC and similarly when we generate the project it will show up all the specific files under this folder not this folder because this was for the previous one I was going to create EST test folder under that all the specific report files will be stored okay now the first job we have done by doing the project creation and adding all the files now let us try to configure the project which we have done let us try to change some file change analyzed analyze change the files so it will do if any changes have been done it will re-analyze and if any changes are required to be analyzed just analyze without configuration it can do it analyze all files so it will also check for update files all one source file unchanged that means one to one source file and you can see if you press this file just put a space and close it it will do your analysis because we have to check for update files so it is showing that one of one file problem this file has got changed and again we need to analyze all files multiple files to be analyzing now you can create the report of this source with several options like HTML report is on or text report we can do now it is not enabled why because we are yet to generate the report once we generate the report we can view it in HTML of text other thing is matrix export is on the important option what we do is what sort of a matrix that we move is all we are going to have it okay so cyclometric complexity is one of the important you know that it is just the complexity of the program it is going to do so those parts which are of your own interest we will add it so there is a cyclometric basically selected matrix to generate already added many things so what we do is we will select all and remove it and we will select again whatever is needed we need a cyclometric we need lines lines of code I mean lines of comments are there declaration calls function classes it is all of C plus a specific methods are also not required count line may be you can take out this you can add whatever we have a page let us take we have count line count line how many blank lines are there code declared how much as the code executable how much is there count line comment how much is there count line code is already there we will add it statement executable cyclometric so every cyclometric we just have you can also select the maximum cyclometric function this pile which we have selected we can have it that different types of cyclometric is a script modified etc a nesting that we want we can do rest the ratio of comment code how much percent usually expected to be 100 percent let us see how much is there in this we will add that now once we have all this we can select other options like where I want to generate is a matrix dot text so we will select something like matrix ESD test dot text then we will say okay so it will be saved it is not generated it we will generate it and okay for generating the project report so there are several options so those options are something like text type of output or you want to generate HTML or both is up to you how you want to generate it let us try to generate both and see and HTML also you can have a single one bundle HTML it can be alphabetic every n entities you want to generate like number of HTML let us try to put a alphabetic so that it should be readable and that will be good so allow scripts if you want allow scripts you can that links and all that will be created similarly we will try to generate the text also in the path is going to generate like ESD, TST dot text and there are certain options like generate time on report like time stamp you can have it what time this project complexity or the project analysis report have been generated with the all will be done so the reports the kind of reports that we want we can have it we can it is a multiple file projects good to have file matrix class over matrix which we do not need unused objects project matrix unused functions that code what all sound call is this only we can select all this and we can say okay like there is a file contents data dictionary based on the objects and the data that is available to the source macro reference anything is there function clause reference include file of the application tree was very important for the control flow and control coupling function complexity all this will be generated you can say okay so now selecting all that like path and everything we can have generate so I will try to generate now so there is no directory called this one is going to create it let's try to generate yes generate with you because it is simple one file we can see here in this path it has generated generating report and all that invocation tree and everything okay that will see after some other thing like we can see you can select what are the files available you and this file you can see the main delay functions are there main thing like these three are there can see count line is 11 etc so let's try to see the report now you can see it is enabled because we are configured and generated the report we can generate again and again how many times you want you can do it is going to generate the report and you can export the matrix that we have done we can see the summary of the project you can see where the project report is available how many classes there is no class 0 how many files 1 there are 3 functions total number of lines is 111 there are 31 blank lines there are 76 line numbers of code is there there are 53 lines of comment is there inactive means it is not used it is not there you can see ratio comment versus score is 0.70 is 70% so it is expected that every line of code is behind one comment so that it is 1.0 or 100% okay now let's try to see the view either you can see from directly from this folder let's try to see the folder this we have created this folder all the reports you can see this different HTML files let's see index or title let's try to open this okay so you can see it is very good that it has reported in nice way in HTML whatever we have seen the tool this can be reported and sent to the customer for justification saying that this is what the code is there this is what the input is likewise okay same thing can be seen all this report whatever we have generated the tool also with the option report you can see on the right hand side the option is available in terms of a final report and website you can see the table of contents like a documentation it does you can select the index what you want to see you can select the report similar to whatever we have a browsing same way you can see the report data dictionary summary report we can show what are the data dictionary that is available we can see A, B, C is disabled because there is no data available with that data let's try to click on D because it is available what it is yeah there is a function called delay we know that so that data it is displaying this language is a function and it is under the main.c 96 line that is all so it is something like a good linking report it generates that is about data dictionary summary you can see the file contents report what are the files that in a nutshell it is available under main.c similarly it will list completely for the entire project since here only one file is there showing the below global functions the three functions you can see delay main nothing object clause reference you can see there are these many objects local objects set use modify set use modify how many are there each line of the file delay also has about three set use and modify so there is no clause or reference report function clause reference report let's try to see so these are the functions main nothing delay in deletionally along with this additional thing data which is nothing but output registers you can see here okay next one we will try to see the invocation pre-report so delay then nothing this delay is calling nothing this is the invocation of course main should be calling delay that also we see you can see that for main delay is getting called similarly nothing is independent it is not calling so whatever the clause are there it will show main is calling at the higher level one level as delay this is the report the below one is a same thing function complexity this is interesting we will try to see what it does function complexity is that what complexity level it is there so cyclometric it is two we know that delay has two edges let us try to quickly understand delay where it is so there is a this one and this one it can take two path right one is with this one is with this for loop is one and this is a normal state map so it is why that is why it is showing a cyclometric code two is one testing we have seen that right each function matrix is going to show it so for delay total number of lines is 10 comment is one comment is one yeah is one comment right delay it is showing here total number of blank lines are two etc so the rate here is very bad they show comment versus code let us try to make it 100% when we reexecute this again later similarly we can select other functions like main we can see total number of lines is 9 code comment is 51 blank line is 26 there is no inactive 63 lines of code is there line executable is 55 line declared is 78 statement executable is 78 statement declared is 7 so 80% is the 81% is the ratio of the comment versus code we can see definition of each of this measure of complexity of a function mission support the cyclometric complex also a number of basis are dependent paths through a model we know this because we have studied about the cyclometric of one of the embedded software testing class so all the definitions of comment line all this matrix that we have generated is showing here file matrix entire files like this we have more it will show as many files as we have total number of lines similarly whatever we have seen at the functional level it is showing at the file level file average matrix entire project matrix if we have seen the VCC report here same thing it is displayed here unused functions anything is there it is interesting so what is unused so there are three unused functions are there unused it is basically variable or anything mode register 1 mode register 2 mode register 3 let us see mode register 1 is assigned best is never used anywhere it is showing here unused so it is defined and declared here is never used so likewise you can get for the complex just imagine program is having 10,000 minutes of code very difficult to see manually so we just use the project matrix to analyze how good shape it is what is that it is available okay so the other thing that we can see it is told is that calling of course source file here also you can edit also yes you can edit you can do like editor this project as well similarly it has linked you can see various options for each function you can find where it is used what is the line what is the property likewise you can see the details you can go forth and back for the different tools let us try to understand other options like each function you can change case you can edit source it will open the source still there is no separate linked function you can use this if it says edit source it will go away because we try to edit this now let us see the information on the left hand side you can see the parameters there is nothing you can type integer by default let us see component the other one is the call wise overall calling this guy delay is calling and delay is getting inter called by main the delay is called similarly references called delay main define main.c it is available on 07 line number it is showing and matrix how many number of lines are there in this 1 2 3 4 5 so that is how simplistically we can use this now static analysis as I was showing one of the embedded class testing class there is a call tree with this option you can see call by declaration by this you can see called by and what it returns similarly declaration file this is a file main.c there are other functions also it is showing click on anyone it will show that function and we have invocation in disable because it is not invoking any other function just return whereas higher functions we can see call by we can see total calling it should show delay and delay should be called by main we can see nicely main is calling delay we can see individual also call by showing the same we can select the levels how many levels we have it is calling again calling let us try to see for delay call by just a main and similarly it is calling invocation is enabled right delay is getting invoking nothing also so like this it is very useful to have a control graph value to have this kind of report for static analysis easy for review finding the bugs anything is static that is how we can use this understand for C++ effectively in general okay so preferences anything we have missed we can have logs timestamp and all that line colors these are all standards that we can use there are lot of options but basic options what we have studied is about waiting the project configuring it selecting the kind of report now let us try to see form this one independently you can see the first report it is showing the first file I will just activate so you enable it because there could be some links you can see automatically all links main if you click it will show that what are the new etc it is in the second window it is showing along with the line numbers similarly click on anything else it is showing the function it is referred by main and it is used here similarly I if you see I is declared here and how I is used that also it is shown it is defined here set in here use it here modify here so it is very important to understand how the variable is that is what data coupling so now we have seen this anything else you want to try probably we will try to ratio as 100% wherever the executable lines is there comment just for example I will see how it is fixed suppose this bug total projects 20% try to make it 100% by adding the missing command here we have to call this function also something like this value we will have here comment write a good comment is already comment is there written also as a comment this should show as 100% written 0 you can add a comment something like written nothing okay for time being okay so every line of code we have a comment let us make sure anything we have missed put a line you can see there is a comment suppose 20% violation is used as if we are developer we are trying to put the commands we do not need to put the first one so once it is done better we need to save it and definitely analyze all files check for update files there is a file change now analyze the change files so let us try to analyze it it is completed successfully there is a error or something linking or now pressure to see the summary improvement is there from 70 to 88% it has improved still that means well it has missed it is about 12 lines we have missed to read the comment so that you can take it as a exercise and fix it and we can read on this next session or you want you can try yourself likewise we can have a complex projects I have few other sample projects try to see it is just for reference close the current project and all this see any other project is available one more example try to see more complex project here it is one of the sample program you can see there are files this many files are there and there is a comment that the ratio was less it was not sure that more comments are there so it is more than one also is there so chance are that that also can happen why because you would output more comments for each of the line there is a reason it is showing more than 1.0 so you can see one example this one try to see it is not showing call we will see it can show this it is not showing call it is in a real model it is basically a dot h file likewise we can develop a complex project so that is how we can do the static analysis generating the report and configuring and analyzing the embedded software program so basically what we need is we need to define the matrix understand the standards what we need and try to okay so now let us try to put an exercise exercise 6.1 I will say so currently we have 0.88 as comment versus ratio code please fix this to make sure that it is 100% this it should be 1.0 another exercise could be after doing this add another dummy function and call the main generate the make a way complexity and see that it is well within 10 of course we have a simpler program that means complexity of any project should not be more than 10 that is what is the meaning so we need to do the exercise for the given code I will share the code and the same code we can use configuring the project under understand process select the matrix make a way lines of code executable lines comments function references objects control flow call tree we can use this data flow or data coupling you can do it or data dictionary all these reports you can generate with the help of this understand for c++ generate the project report analyze the report and provide a summary you can using HTML or using the tool sometimes tool may not be available what we will do is if customer does not have a tool generate the HTML and see we can also see in text file little tricky to understand HTML is a better way same report generated HTML you can see object cross references and each file how it is set each of the registers of the output local variables there are objects means the referred variables you can see for this cyclometric modifiers there are various types of cyclometric complexity so that anyway we have understood about basic cyclometric complexity and each functions you can see the reports lines, comments, etc for delay main and nothing these functions that is the file matrix report average matrix report also you can see unused function report there is a three unused objects that are used because that is what report how we can generate and use it so with that we will and understand for this tool will go through we will if required we can touch base of this tool and understand more about more complex topics that you can take it as an exercise and we can touch base that and next exercise we will take a study about other aspects test case management defect management using test link and bugzilla and also in one of the exercise except for target based execution how it can be used and we have seen the LDRA cover in one of the earlier sessions also we need to see about test case generation traceability and checklist filling the next session with that I will end the today's class thank you bye


Greetings, friends. Welcome to CTUCC Conference Cast from March 20, 2015, the regular podcast of the Connecticut Conference of the United Church of Christ. Whoever you are and wherever you may be on life's journey at this very moment, you are welcome here. We begin this week's conference cast with this meditation from the Reverend Kent Silotti, Connecticut's conference minister. In the 31st chapter of the book of Jeremiah, that relentlessly gloomy prophet suddenly records words of deep and moving hope.  God creates covenants with people. Think of some of the covenants from Scripture. The covenant made with Noah, with Abraham, with Moses, with David, and the new covenant that God established with Christ.  God's covenant is sure, solid, and everlasting. There's nothing conditional about God's covenant. One member's failure does not destroy the relationship. It is unconditional free and filled with grace. Behold, the days are coming, says the Lord, when I will make a new covenant with the house of Israel and the house of Judah. Jeremiah 31, 31. Jeremiah offers words of hope. While the people had broken their end of the bargain, God did not abandon them. The God of creation would recreate them. The God of Exodus would embrace them again. The merciful, tender, loving God would forgive all their sin and absolve them of the sins of their ancestors. The sin that led God to surrender Judah and Jerusalem to the Babylonians, it would be forgiven. This time it's about a new heart. It's God transplanting hearts. We don't need to get a second opinion about this one. It's about moving beyond the old agreements and entrenchments that have us sitting in a funk about where the church is headed. It's about building and planting. It's about God doing a new thing. It's about God writing a new song on our hearts. It's about a new heart allowing God's spirit to break through our hard-heartedness. It's about a new heart for prayer. It's about a new heart for community. It's about a new heart for unity. It's about a new heart for covenant. It's about a new heart for justice. It's about a new heart for healing the nations. It's about a new heart for love. Here is a prayer for this week. Creating us a new heart of God. You are doing a new thing in our midst and we give thanks that you love us beyond measure with a love that simply will not let us go. Thank you. Thank you for your incredible gift of grace in this season of Lent. Amen. We ask your prayers for the residents of Vanuatu today. The Pacific nation whose islands lie northeast of Australia suffered beneath a category five cyclone last weekend. And as you pray for them, we ask also that you pray with your gifts sent through your church or online to bring aid swiftly to those who need it. In the news this week, Connecticut Conference clergy and lay people reviewed the ethics of ministry last weekend. Friday morning at the first congregational church UCC of Southington, two members of the UCC's legal team, General Council Don Clark and Associate General Council Heather Kimmel met with approximately 70 clergy and ministry students to survey some of the ethical challenges of their profession. In particular, they focused on questions of confidentiality. When is it appropriate to share information someone has shared with you? And on what basis do you make that decision? The two recommended that ministers accept as a working standard for confidentiality this definition. We define a confidence as a covenant to only tell those who need to know what they need to know when they need to know it. It's a covenant to tell those who need to know what they need to know when they need to know it. Clark and Kimmel hinted at their dramatic talents during the workshop, offering a series of scenarios to challenge the assembled ministers' assumptions about sharing information. But later that evening, they took to the stage at the congregational church of South Glastonbury, UCC, with clergy ethics the musical. CTUCC Chronicle, the Reverend Sarah Jane Munchauer, has a review of the performance on our website now, and she says in part, they kept their audience listening and laughing. Starting with the out of the gate topic of sex, they went on to cover ethical questions around technology, confidentiality, public witness in social justice issues, questions around former pastors, and the all-important fitness reviews. She goes on to quote a member of the audience who said, it was a painless way to convey a lot of important information. The conference is ready to accept applications to the Joseph Clemens Job Training Program. Racial Justice Ministry Program Associate Isaac Montz describes it as a life-changing job training program, providing experiences of group fellowship and support, as well as skills building for young people of color. They'll spend time at Silver Lake Conference Center working alongside the summer staff there, and reinforce the skills they've learned with further orientation to the ministry of the Connecticut Conference. From the relationships and bonds which are built over the course of the program, he writes, to the moments of struggle and triumph that are shared with the brothers and sisters. This experience will equip youth with the tools to be successful not only in the blue-collar work world, but also in the white-collar professional work world. Silver Lake Summer Deans were also getting ready last weekend, coming together for their annual retreat to renew their skills, reconcile their program schedules, and rejoice in the wonders of outdoor ministry. The Reverend Ryan Gackenheimer, Associate Pastor at First Congregational Church UCC in Essex, Vermont, and a longtime leader in the Vermont Conferences program at Covenant Hills, encouraged the Deans to help young people as they try on different hats and explore who they are and who they want to be. The Deans also took some time to record invitations to potential conferees, which are now posted on Silver Lake's YouTube channel, youtube.com slash silverlakect. The Connecticut Conference is seeking nominations for the Living Waters Award, which recognizes a layperson for the ministry they do in their day-to-day life in the working world. Learn about that, find out more about all these stories, and check out the current headlines at ctucc.org slash news. Super Saturday is this weekend, featuring keynote speaker the Reverend Ruben Duran, who promotes new church development for the Evangelical Lutheran Church in America. I'll be there with cameras and recorders, and I look forward to seeing you in Lutlo, Massachusetts. The women's yoga and spirit retreat is at Silver Lake, March 27th through the 29th. The maple sugaring weekend welcomes middle school age youth for an experience of the sweetness of creation, tapping trees and boiling sap as people have for hundreds of years. That's also being held the weekend of March 27th. Stepping Stones offers part one of keeping our churches safe on April 9th in Hartford. You can also register for stewardship in the changing church from consumerism to generosity. This year's Ecumenical Stewardship Event, which runs April 17th and 18th in Boxborough, Massachusetts, and come back to Hartford on April 21st for part two of keeping our churches safe. Silver Lake's Spring Action weekend is May 1st through 3rd, and that's our opportunity to get the outdoor ministry center in Sharon ready for the summer season. The conference youth revival is May 3rd in Bloomfield. And registration is open for the New England Association of United Church Educators gathering, which runs May 5th through 7th in Craigville, Massachusetts. Authorized ministers can renew their boundary training on May 7th in Tolland. Silver Lake's Spring Open House is May 17th, a great opportunity for first time conferees and their families to get to know the blessings of the place we often call God's Backyard. In Silver Lake will host the Environmental Justice for All Retreat, the weekend of May 29th, for high school age youth of color to explore the environmental concerns of their own neighborhoods. Registration is also open for the 9th annual Silver Lake Golf Tournament, to be held June 8th in Wallingford. To learn more about all these events or to register, visit us at ctucc.org slash events. Our spirited Wednesday thought comes from the Reverend Erica Thompson, Associate Minister at the Asylum Hill Congregational Church UCC in Hartford. We've had a troubling winter here in New England, and as we approach Holy Week, Reverend Thompson recalls that Jesus confessed that his soul was troubled as he spoke to others before his arrest and crucifixion. Jesus also said during those incredibly difficult times, unless a grain of wheat falls into the earth and dies, it remains just a single grain, but if it dies it bears much fruit. Life is a part of death, as death is a part of life, inner and outer storms. However, it is only when the storm has stopped, or the snow has melted, that we are able to recognize the beauty and the transformation which has taken place, even when we could not see. That brings this conference cast to a close. Thanks to Kent Solati for his reflection, and to GarageBand for our music. Primary funding for conference cast comes from your congregation's gifts to our church's wider mission, basic support, changing lives through the United Church of Christ. This is Eric Anderson, the Associate Conference Minister for Proclamation, Identity and Communication for the Connecticut Conference of the United Church of Christ. Praying that your days this week may be filled with the presence, the guidance, and the grace of God.