| Topic | Presenter | Summary | Duration | Tags | Quiz | Captions |
| ----------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | -------- |
| Debugging Process | Jesse Webb | This portion of the dev training from 07/31/2020 has Jesse explaining how he debugs. This was also documented in a Wiki article. | 25:59 | #DevTraining, #ClarityTrainings, #FridayTraining, #Debugging, #TrainingVideos, #DeveloperTrainingVideos, | N/A | |00:00:02.240 --> 00:00:07.504 - A lot of what I want to show is just sort of in the process of 00:00:07.504 --> 00:00:12.110 - of the process of just debugging it and and what you need to do 00:00:12.110 --> 00:00:16.058 - less of how to do it, because, well, you know you'll figure 00:00:16.058 --> 00:00:20.664 - that out so so and there is a nice wiki article on that too. 00:00:20.664 --> 00:00:22.309 - Yeah yeah, I wrote 1. 00:00:22.980 --> 00:00:27.868 - Um, what I really wanted to figure out is for this task they 00:00:27.868 --> 00:00:32.380 - wanted and so did redemption yield. Days wanted a way to kind 00:00:32.380 --> 00:00:33.884 - of dynamically search for. 00:00:34.580 --> 00:00:39.270 - Price range is right, and So what I had done and I notice it 00:00:39.270 --> 00:00:43.290 - really just depends the string up here. I mean that's a space 00:00:43.290 --> 00:00:47.980 - and that's a plus, so I thought. Well, how about I put in? You 00:00:47.980 --> 00:00:49.655 - know, like custom number and 00:00:49.655 --> 00:00:55.296 - see. Let's just do it, plus 75,000 a range from 1000 to 5000 00:00:55.296 --> 00:01:00.275 - and it doesn't actually work. So what I wanted to do then is, 00:01:00.275 --> 00:01:05.637 - well, I'm going to have to. I know I'm going to have to see 00:01:05.637 --> 00:01:10.616 - what comes back from the back end. I know this is the call 00:01:10.616 --> 00:01:14.829 - that is the back end call. It's the search with provider. 00:01:15.350 --> 00:01:19.580 - And I want to see what I sent. Um, I know I sent the right 00:01:19.580 --> 00:01:22.964 - stuff. This is a pretty much exactly similar to what it would 00:01:22.964 --> 00:01:26.912 - send for one I know works, which is, you know, 1000 plus one that 00:01:26.912 --> 00:01:29.168 - I had. I was able to just click 00:01:29.168 --> 00:01:34.657 - here. So I thought what did I get back then and I notice in 00:01:34.657 --> 00:01:38.845 - this case just that I was getting an actual array of price 00:01:38.845 --> 00:01:43.382 - ranges back from our API. So that's I mean that was my first 00:01:43.382 --> 00:01:47.221 - kind of. I knew it was probably hardcoded, but it's well. 00:01:47.221 --> 00:01:51.409 - There's the proof. So what I thought when I wanted to maybe 00:01:51.409 --> 00:01:56.295 - take a look at how can I change this then 'cause they all of 00:01:56.295 --> 00:01:59.785 - their prices are quite high, right? It's their giant trucks 00:01:59.785 --> 00:02:01.181 - so everything is like. 00:02:01.900 --> 00:02:05.450 - You know everything is going to be something like this. 00:02:05.450 --> 00:02:08.906 - There's no need to be under $50 or something like that, so. 00:02:09.500 --> 00:02:14.792 - We needed an option to just change these. So what I did is I 00:02:14.792 --> 00:02:18.950 - really just searched for the string 100 or 1000 in the. 00:02:19.580 --> 00:02:24.908 - And the actual back end of stuff eventually I. 00:02:24.910 --> 00:02:27.850 - Came across either um. 00:02:28.710 --> 00:02:31.536 - The the tests folder for elastic 00:02:31.536 --> 00:02:36.373 - searching. Or the test file rather or the product search 00:02:36.373 --> 00:02:41.924 - model module right here and I see it is. It's all just um. 00:02:42.500 --> 00:02:48.827 - Hardcoded strings that are, uh, this searches through elastic. 00:02:48.827 --> 00:02:55.154 - Our Redis. Right now we're Elasticsearch. Kind of caching 00:02:55.154 --> 00:03:00.106 - search. Anyway, what I decided to do is wrap a bunch of these 00:03:00.106 --> 00:03:04.420 - in. Uh, our self config properties stuff that we can at 00:03:04.420 --> 00:03:08.006 - least change in app settings. What ends up sort of looking 00:03:08.006 --> 00:03:12.800 - like this? And the naming convention will probably change 00:03:12.800 --> 00:03:15.300 - here with James is, uh. 00:03:15.810 --> 00:03:20.442 - Go ahead with that, but well, what that ends up looking like 00:03:20.442 --> 00:03:25.460 - is is not too different than what we really used to will just 00:03:25.460 --> 00:03:28.162 - check back out to what I have 00:03:28.162 --> 00:03:33.318 - and. The technical details of why I had to do that is that. 00:03:33.950 --> 00:03:40.835 - Where it's case name of key is that in a switch case on C sharp 00:03:40.835 --> 00:03:45.884 - it expects a compile time constant. Uhm, so this being a 00:03:45.884 --> 00:03:47.720 - dynamic thing is not. 00:03:48.280 --> 00:03:53.875 - A name of is going to result in the actual text TR one KEY. This 00:03:53.875 --> 00:03:55.367 - totally won't work then. 00:03:55.900 --> 00:04:00.164 - But Uhm, maybe a better example would be kind of like what you 00:04:00.164 --> 00:04:04.100 - and I did last night on the just the troubleshooting thing is 00:04:04.100 --> 00:04:08.692 - what I really wanted to go over. how I go into things and fix 00:04:08.692 --> 00:04:10.660 - stuff. Or possibly we could even 00:04:10.660 --> 00:04:14.344 - try and. Solve this right here 00:04:14.344 --> 00:04:18.856 - the. Problem is that in this switch in this switch case, this 00:04:18.856 --> 00:04:22.408 - isn't going to work because it needs to be a constant value. 00:04:22.408 --> 00:04:25.664 - And you're right that I was worried about that name of 00:04:25.664 --> 00:04:32.776 - thing. Is there a way we could do this with the with the 00:04:32.776 --> 00:04:36.297 - the agency eight you can do a 00:04:36.297 --> 00:04:40.187 - wind statement. So it's just say, like taste, uh? 00:04:40.730 --> 00:04:43.590 - They could say when. 00:04:43.590 --> 00:04:50.454 - A space. Uh, try say like price range equals 00:04:50.454 --> 00:04:53.080 - RW. Say what equals, I'm sorry. 00:04:53.830 --> 00:04:57.830 - Price range I see yes 'cause it's in the for 00:04:57.830 --> 00:04:59.030 - each double Eagles. 00:05:01.090 --> 00:05:05.432 - Doesn't like when should I erase case now? Now you have to help 00:05:05.432 --> 00:05:08.772 - the case. Um yeah. And then we need like uh? 00:05:10.800 --> 00:05:15.051 - I don't know the correct syntax of this talk about my head, but 00:05:15.051 --> 00:05:19.629 - we will. We can just put in a minute, but we see that spelled 00:05:19.629 --> 00:05:21.770 - incorrectly as well. Price Rance 00:05:21.770 --> 00:05:25.022 - thank you. That still 00:05:25.022 --> 00:05:27.458 - is. Giving us the. 00:05:29.090 --> 00:05:32.357 - Can you be declared in this scope? 'cause that name is, 00:05:32.357 --> 00:05:33.545 - oh, I wonder why? 00:05:35.320 --> 00:05:37.272 - Do you think this needs to be in 00:05:37.272 --> 00:05:42.420 - parentheses? No, yeah. Well maybe instead of leave the 00:05:42.420 --> 00:05:46.460 - wind changed price skeet range to just act. 00:05:47.610 --> 00:05:49.740 - OK to X. 00:05:51.240 --> 00:05:53.800 - OK, now let's go look at the C 00:05:53.800 --> 00:06:00.559 - Sharp switch when. Look up switch when OK, I mean no in 00:06:00.559 --> 00:06:02.182 - yeah yeah so. 00:06:03.960 --> 00:06:08.352 - This is essentially how I go into stuff though. Like I, I 00:06:08.352 --> 00:06:11.280 - don't go in knowing you know what the. 00:06:12.990 --> 00:06:16.238 - Uh, what the solution is going to be? 00:06:17.310 --> 00:06:20.379 - You can correct this issue, eliminate the compiler warning 00:06:20.379 --> 00:06:24.130 - by changing the order of the switch selections by using a 00:06:24.130 --> 00:06:25.153 - when clause hey. 00:06:28.400 --> 00:06:29.639 - Where is that? 00:06:30.620 --> 00:06:36.110 - Ah, case shape shape when shape equals no I see. 00:06:37.740 --> 00:06:42.600 - So that's the type. OK, so yeah, we can do, uh, OK. Go back to 00:06:42.600 --> 00:06:47.460 - the file. You have to kind of give it the yeah dude I get it 00:06:47.460 --> 00:06:53.378 - yeah. Say in front of the wind, the string tier five key. Yeah 00:06:53.378 --> 00:06:58.018 - man. No, just says just a just string X Yeah. 00:06:58.840 --> 00:07:02.560 - Straight X dot X equals. Yeah, that's it, but it's not really. 00:07:02.560 --> 00:07:07.210 - It's not going to be so it is going to be X because that's the 00:07:07.210 --> 00:07:08.760 - that's the variable right on 00:07:08.760 --> 00:07:12.876 - man, well. And that's that's that's the benefit I get with 00:07:12.876 --> 00:07:15.522 - having a pair programming session with James. And this 00:07:15.522 --> 00:07:19.344 - just saves you from having to convert this into a set of bit 00:07:19.344 --> 00:07:22.578 - of if statements. Yeah, yeah, that is essentially what I had 00:07:22.578 --> 00:07:26.106 - before. If you recall, I mean you do recall 'cause it's dad 00:07:26.106 --> 00:07:28.458 - and I was told to switch it back 00:07:28.458 --> 00:07:32.518 - into this. And right on that is very cool. It's a 00:07:32.518 --> 00:07:36.382 - troubleshooting thing though is why. I mean, I wanted to kind of 00:07:36.382 --> 00:07:38.314 - go over this. You'd you just. 00:07:39.200 --> 00:07:44.117 - It's just looking and seeing what you have and and where's 00:07:44.117 --> 00:07:49.034 - my, what you have and what you're given and what you're 00:07:49.034 --> 00:07:53.057 - sending and then seeing something like this and being 00:07:53.057 --> 00:07:57.527 - able to find that in the code will of course. 00:07:58.060 --> 00:08:01.960 - Would need to build and stuff after that. I know we only have 00:08:01.960 --> 00:08:05.860 - like 2 minutes left and I want to show some a separate project 00:08:05.860 --> 00:08:09.160 - that I encountered some super weirdness on a couple of days 00:08:09.160 --> 00:08:13.060 - ago which is. And if you don't mind Jesse, let's go a little 00:08:13.060 --> 00:08:17.260 - bit more detail and for anyone that has to drop at right at 5, 00:08:17.260 --> 00:08:21.460 - feel free, but let's just go a little bit over so you can cover 00:08:21.460 --> 00:08:25.060 - this thoroughly. And when you go back to the previous example, So 00:08:25.060 --> 00:08:27.760 - what was the outcome here? You're basically making this 00:08:27.760 --> 00:08:29.560 - dynamic in the app settings dot 00:08:29.560 --> 00:08:33.240 - config. You know what you're right. I did set up being 00:08:33.240 --> 00:08:36.530 - statically hardcoded rights over here in properties. Yeah, I, uh. 00:08:37.250 --> 00:08:40.472 - I essentially made a whole bunch 00:08:40.472 --> 00:08:45.082 - of. I ended up needing to make well, you would see how many, 00:08:45.082 --> 00:08:48.800 - uh, these actually would need to be the keys to. I never got 00:08:48.800 --> 00:08:52.804 - around to 200% doing it. It looks like I had. I had it up 00:08:52.804 --> 00:08:55.950 - here though. I think this is essentially what that bottom bit 00:08:55.950 --> 00:08:57.094 - needs to look like. 00:08:57.870 --> 00:09:03.285 - So I ended up making a bunch of Keys 'cause we know they had to 00:09:03.285 --> 00:09:05.812 - have that so that a little look 00:09:05.812 --> 00:09:10.696 - here. Tier one key. So I ended up making a whole bunch of. 00:09:11.330 --> 00:09:16.454 - Properties like this, we know it has to have that string 'cause 00:09:16.454 --> 00:09:21.578 - it uses that when it's indexing has to have the original values 00:09:21.578 --> 00:09:28.410 - and well here we go and I kind of just I named him key and two 00:09:28.410 --> 00:09:29.691 - and from and. 00:09:29.880 --> 00:09:33.708 - They have defaults, but you can change them over here, uh, in 00:09:33.708 --> 00:09:37.217 - your app settings, right? I mean, as simple as the feature 00:09:37.217 --> 00:09:41.045 - of this is. It's just something we probably would be doing all 00:09:41.045 --> 00:09:44.873 - the time. Just adding a new option, a new app setting with 00:09:44.873 --> 00:09:48.063 - defaults. This is a really interesting bug. I wanted to 00:09:48.063 --> 00:09:51.891 - kind of show as well, so if you recall, the default probably 00:09:51.891 --> 00:09:56.357 - needs to be changed as well, but this is what the key looks like, 00:09:56.357 --> 00:10:00.185 - and it to me that just looks like it would be fine. 00:10:00.210 --> 00:10:05.830 - If you do this, though, uh, apparently that is malformed 00:10:05.830 --> 00:10:10.888 - XML. It counts this character as a new opening. 00:10:10.900 --> 00:10:13.991 - Carrot, so you have to apparently have to do that. I 00:10:13.991 --> 00:10:17.644 - actually didn't. I was stuck on that one for like 20 minutes. So 00:10:17.644 --> 00:10:21.016 - it was like what did I do that broke the entire app? 00:10:21.690 --> 00:10:29.022 - This is a pretty minor feature, but it does allow at least some 00:10:29.022 --> 00:10:31.842 - customization for a kind of 00:10:31.842 --> 00:10:37.480 - core. Search searching function that we have. We can. We can 00:10:37.480 --> 00:10:40.329 - even build this too and see how 00:10:40.329 --> 00:10:44.420 - it works. If we like, let's see 1st, I'm going to shut 00:10:44.420 --> 00:10:45.728 - down my head full. 00:10:46.750 --> 00:10:50.320 - Yeah, sorry this went over guys. 00:10:50.910 --> 00:10:56.058 - Oh, it's OK. If anyone needs to drop, feel free and then this 00:10:56.058 --> 00:11:00.810 - will all be recorded. So Oh yes is really really helpful for 00:11:00.810 --> 00:11:04.374 - some folks. Yeah, I always like to do the. 00:11:05.140 --> 00:11:08.488 - The full rebuild, delete all that stuff and then I am not 00:11:08.488 --> 00:11:12.115 - sure when you have to do that. I'm sure James could tell me 00:11:12.115 --> 00:11:16.021 - when I do and when I don't, but it it's not going to currently 00:11:16.021 --> 00:11:19.369 - work unless you do those other ones on this file right here. 00:11:20.200 --> 00:11:22.948 - Oh yeah, yeah well. 00:11:22.950 --> 00:11:25.997 - Size here before you can do yeah, before you actually take 00:11:25.997 --> 00:11:29.321 - it. Yeah, I may as well. Let's see that was chosen from's. 00:11:29.321 --> 00:11:32.368 - Alright well I mean for it to actually work. You're totally 00:11:32.368 --> 00:11:33.753 - right. So this, let's see. 00:11:34.430 --> 00:11:37.602 - These were 00:11:37.602 --> 00:11:43.256 - my. Greater than or equals. These would 00:11:43.256 --> 00:11:44.834 - have been my. 00:11:46.640 --> 00:11:50.808 - I wanna copy these. 00:11:51.960 --> 00:11:53.984 - And then I want to go into this. 00:11:56.400 --> 00:12:03.120 - Self config dictionary will make this rap so it's a 00:12:03.120 --> 00:12:08.990 - little easier. Jesse, whenever you select all the rows like 00:12:08.990 --> 00:12:12.830 - that are using alter wouldn't tell everyone like. 00:12:12.830 --> 00:12:16.360 - We're using awesome keyboard shortcut that I use all the 00:12:16.360 --> 00:12:21.302 - time. That is just it's in VS code and it's just control D and 00:12:21.302 --> 00:12:25.538 - it just helps you speed like crazy too to mass edit things 00:12:25.538 --> 00:12:29.068 - like this for example. So you're specifically calling the expand 00:12:29.068 --> 00:12:32.598 - selection command. You're not using the Alt command that let's 00:12:32.598 --> 00:12:36.834 - you select A blog across rows. That would be, yeah, shift alt 00:12:36.834 --> 00:12:41.423 - I. I think you can select a whole bunch of things like this 00:12:41.423 --> 00:12:43.188 - and do shift Alt I. 00:12:43.220 --> 00:12:46.685 - And then it let's you do that, but I'm kind of I just sort of 00:12:46.685 --> 00:12:49.688 - like to do the one where it's like, you know, when you select 00:12:49.688 --> 00:12:56.320 - all that. Uh, let's see there's an imperative command and the 00:12:56.320 --> 00:13:01.540 - Visual Studio IDE I we try to find 1. 00:13:01.550 --> 00:13:03.188 - Like I tried to find one, but 00:13:03.188 --> 00:13:08.810 - it's just like. It's not as easy. It really is not so. And 00:13:08.810 --> 00:13:13.584 - Control D in Visual Studio is duplicate line. Oh yeah, I 00:13:13.584 --> 00:13:15.754 - figured that out pretty quickly. 00:13:15.760 --> 00:13:20.812 - That with the twos. So note though the tier one, you know 00:13:20.812 --> 00:13:26.706 - it's just from zero and the tier 5 is just two infinite, so I 00:13:26.706 --> 00:13:30.916 - think the solution to that is simply commenting these out. 00:13:30.916 --> 00:13:35.547 - Yeah, in the original code you come without those blocks that 00:13:35.547 --> 00:13:40.599 - it doesn't try to assign them what's to come in character in 00:13:40.599 --> 00:13:43.546 - C? Oh, it's just slash is great. 00:13:43.590 --> 00:13:46.945 - Need a It's slash starting crab to coming up just that 00:13:46.945 --> 00:13:49.690 - part of the block like CSS. That's cool man. 00:13:51.160 --> 00:13:57.360 - And, uh. Why do we have spaces in between the methods? I 00:13:57.360 --> 00:14:02.313 - kind of like it just makes it know it or originally. Like if 00:14:02.313 --> 00:14:06.123 - you delete the spaces around the the one that's commented, 00:14:06.123 --> 00:14:10.314 - everything will line up. Yeah, it's just to make things look 00:14:10.314 --> 00:14:15.648 - neat and I will we kind of want to just do it like those. 00:14:15.700 --> 00:14:21.331 - Racism. Yeah, wouldn't stylecop wouldn't go over like the margin 00:14:21.331 --> 00:14:23.127 - separator and style Cod? 00:14:23.740 --> 00:14:27.341 - There, do we tell that yes, no short answer is yes, this is. 00:14:27.341 --> 00:14:30.665 - But this is one of those areas were like. It actually doesn't 00:14:30.665 --> 00:14:33.989 - make it easy to read it there all just lined up correctly. 00:14:34.010 --> 00:14:38.066 - Like going across OK so you just ignored it. Yeah, and that's why 00:14:38.066 --> 00:14:41.498 - there's disabled on it. With this table style cops, yeah, so 00:14:41.498 --> 00:14:44.930 - it's just one of those rare exceptions where it's like it 00:14:44.930 --> 00:14:48.674 - really does make more sense to just have a ball lineup across 00:14:48.674 --> 00:14:50.546 - and make sure that everything is 00:14:50.546 --> 00:14:55.530 - covered. 11 interesting thing with this as well is that I'm 00:14:55.530 --> 00:15:00.051 - going to have to re run the indexer the product indexer 00:15:00.051 --> 00:15:04.983 - because the key that all of those things were tide to was 00:15:04.983 --> 00:15:07.449 - the old key. That's the hard 00:15:07.449 --> 00:15:10.756 - coded. You know $50.50 00:15:10.756 --> 00:15:13.706 - or whatever. Once this finishes 00:15:13.706 --> 00:15:17.088 - building on. I'll do that, um. 00:15:18.630 --> 00:15:22.866 - A lot of this is really minor and really simple compared to 00:15:22.866 --> 00:15:24.631 - the stuff James was talking 00:15:24.631 --> 00:15:30.002 - about. But it's stuff that anyone on the team can do you 00:15:30.002 --> 00:15:34.586 - sort of just and with this working like the next step would 00:15:34.586 --> 00:15:39.934 - be to make it so that it can handle that. Having the range of 00:15:39.934 --> 00:15:44.136 - scale dynamically, in which case you would go try and basically 00:15:44.136 --> 00:15:48.720 - find the read the product for the highest price on the flat 00:15:48.720 --> 00:15:51.012 - pricing and then use some kind 00:15:51.012 --> 00:15:56.960 - of like. Like a log rhythmic scale to grab 5 pounds of 00:15:56.960 --> 00:16:00.083 - medics. And then put those values in and dynamically build 00:16:00.083 --> 00:16:04.241 - the strings and keys to do that with the setting to turn that on 00:16:04.241 --> 00:16:08.102 - and then the step after that would be to like make it handle 00:16:08.102 --> 00:16:11.666 - multi currency and the step after that would be to try to 00:16:11.666 --> 00:16:15.230 - find some way of making all the craziness of price rules index 00:16:15.230 --> 00:16:18.794 - in work per user without blowing up the index process, which is 00:16:18.794 --> 00:16:22.655 - like a major thing that people keep asking for. But it's like a 00:16:22.655 --> 00:16:25.922 - huge massive cartesian explosion of values that would have to be 00:16:25.922 --> 00:16:27.704 - indexed to try and make that 00:16:27.704 --> 00:16:32.368 - work. OK, I was getting it on. 00:16:33.530 --> 00:16:38.206 - Sorry, we just want to. I mean, of course this is a quick fix, 00:16:38.206 --> 00:16:42.214 - but uh, in the dough several steps, wouldn't we just want to 00:16:42.214 --> 00:16:44.218 - put this data in the table? 00:16:44.820 --> 00:16:46.986 - And let the user have the. 00:16:47.730 --> 00:16:51.438 - Control of how many categories? How many ranges they want and so 00:16:51.438 --> 00:16:56.270 - on. Because I have to, all this code gets converted to a query 00:16:56.270 --> 00:16:59.570 - descriptor language for the physical fee sharp in the way 00:16:59.570 --> 00:17:04.520 - that it has to construct. It has to be there in a certain way and 00:17:04.520 --> 00:17:07.160 - it's really hard to do a lot of 00:17:07.160 --> 00:17:11.108 - the stuff dynamically. Trying to write it any monthly. It gets 00:17:11.108 --> 00:17:15.500 - real weird real fast. So yes, we could eventually get there, but 00:17:15.500 --> 00:17:20.624 - it's just that much more work to try and get that done. When this 00:17:20.624 --> 00:17:22.088 - has sufficed so far. 00:17:22.090 --> 00:17:26.260 - Well, that is loading. Uhm, I know we're started approaching 00:17:26.260 --> 00:17:32.098 - 10 minutes over, but I do want to show that fire Fox thing we 00:17:32.098 --> 00:17:35.017 - did um, and what the issue was 00:17:35.017 --> 00:17:39.842 - and such. And then that'll be a quick one to show. I kind of. 00:17:39.842 --> 00:17:42.988 - Well just copy all of this and put it over here. 00:17:43.660 --> 00:17:48.110 - So here's how are header looks. Uh, generally without these 00:17:48.110 --> 00:17:53.338 - little comments. We have a cool feature that tells the browser 00:17:53.338 --> 00:17:57.980 - to preload this CSS, or rather, don't stop like just keep 00:17:57.980 --> 00:18:03.044 - loading the rest of the stuff and continue when you have it. 00:18:03.044 --> 00:18:08.108 - Chrome fully supports this. It is very cool. We will will will 00:18:08.108 --> 00:18:13.172 - restart my ATI beauty DNS setup and we will prove it it's. 00:18:13.920 --> 00:18:18.456 - It's gonna it's gonna show us here on the source as well. 00:18:18.456 --> 00:18:23.370 - It's, uh, it's got all the preload bits and we have our CSS 00:18:23.370 --> 00:18:28.662 - though on fire Fox. I mean, I just never use this so I didn't 00:18:28.662 --> 00:18:33.198 - notice it until really. Recent you do that and it just fails 00:18:33.198 --> 00:18:34.332 - completely right so? 00:18:34.920 --> 00:18:38.470 - It if you days ago I troubleshooted and figured that 00:18:38.470 --> 00:18:42.920 - it's uh. I thought it was the fact that he didn't have text 00:18:42.920 --> 00:18:46.400 - slash CSS, but turns out it's just that this does not support 00:18:46.400 --> 00:18:49.300 - preload. That's what James and I discovered last night. Um, 00:18:49.300 --> 00:18:53.360 - trying to kind of clean this up because what I had done is just 00:18:53.360 --> 00:18:57.130 - deleted the no scripts and it was left with a rel equals style 00:18:57.130 --> 00:18:58.290 - ship. Their stylesheet type 00:18:58.290 --> 00:19:02.331 - equals text CSS. And that works, of course. It just kind of 00:19:02.331 --> 00:19:05.400 - defeated the purpose of having the no script tags 'cause it's 00:19:05.400 --> 00:19:08.748 - not going to do anything for the people that now have JavaScript 00:19:08.748 --> 00:19:10.143 - disabled. What we ended up 00:19:10.143 --> 00:19:16.783 - doing. Is since these are it's a razor file. We can kind of use 00:19:16.783 --> 00:19:21.093 - the cool razori things which there's a couple examples of 00:19:21.093 --> 00:19:26.265 - them around here, but it's this. These sort of escaped actual see 00:19:26.265 --> 00:19:28.420 - Lookin code. We ended up 00:19:28.420 --> 00:19:31.914 - finding. Things man, So what we ended up doing. 00:19:32.690 --> 00:19:35.913 - Is we found, just together through neither of us knew what 00:19:35.913 --> 00:19:40.308 - to do going into it. Which is why I thought it was such a cool 00:19:40.308 --> 00:19:43.824 - pair programming session. We found this sure so if it if the 00:19:43.824 --> 00:19:46.168 - actual browser type contains fire Fox which is. 00:19:46.710 --> 00:19:52.661 - We found that from the Holy Grail of Stackoverflow, so if 00:19:52.661 --> 00:19:59.153 - it's fire Fox, it's only going to throw this on your page, 00:19:59.153 --> 00:20:04.198 - sorry. Is that I said here here yes, and otherwise do our other 00:20:04.198 --> 00:20:08.686 - stuff, which I mean the real preload thing is really cool for 00:20:08.686 --> 00:20:12.800 - Chrome and I think even edge. It's just safari and Firefox 00:20:12.800 --> 00:20:16.914 - that don't support it, and what that actually looks like is 00:20:16.914 --> 00:20:19.158 - well, let me kill our our. 00:20:19.800 --> 00:20:25.330 - DNN, again, so it kind of breaks the cash will load on here and 00:20:25.330 --> 00:20:30.620 - here. And back again on here and here, so we'll see that it 00:20:30.620 --> 00:20:34.975 - doesn't have any of the, UM, let me get this little bigger for, 00:20:34.975 --> 00:20:38.995 - yet it doesn't have any of the rail equal stylesheets. It has 00:20:38.995 --> 00:20:43.350 - all the no scripts and all that. Just like we expected for a 00:20:43.350 --> 00:20:47.370 - browser that's not fire Fox and then you know, hey, look at 00:20:47.370 --> 00:20:51.725 - that. All the CSS loaded and we have. Again, this is all simple 00:20:51.725 --> 00:20:53.400 - stuff, but I mean it's. 00:20:54.240 --> 00:20:59.568 - Super critical Firefox user wouldn't have couldn't use the 00:20:59.568 --> 00:21:03.120 - site, no styles, it just looked 00:21:03.120 --> 00:21:07.661 - base. So it boy, that's another cool thing to to kind of 00:21:07.661 --> 00:21:11.704 - discover and then fix. And also you learn a new little thing you 00:21:11.704 --> 00:21:13.881 - can do in our skin files. The 00:21:13.881 --> 00:21:17.580 - razor E stuff. Hum. 00:21:17.580 --> 00:21:21.080 - The cool part of what I really wanted to show, and for both of 00:21:21.080 --> 00:21:25.965 - these things is that. We didn't know any of this going into it, 00:21:25.965 --> 00:21:30.465 - we just sort of followed like clues. Alot of this would have 00:21:30.465 --> 00:21:34.965 - just been like trying to use some of these keywords and you 00:21:34.965 --> 00:21:39.465 - search for it like fire Fox, CSS, preload and and fire Fox 00:21:39.465 --> 00:21:44.340 - CSS type equals text. CSS was when I tried to search for that 00:21:44.340 --> 00:21:48.840 - kind of thing. Why wouldn't this work? And the Internet is just 00:21:48.840 --> 00:21:50.340 - bountiful. You'll find these 00:21:50.340 --> 00:21:53.188 - things. Yeah, during the research we were trying to 00:21:53.188 --> 00:21:56.860 - figure out why fire Fox could recognize this, and one of the 00:21:56.860 --> 00:22:00.226 - articles that we found basically said that fire Fox with the 00:22:00.226 --> 00:22:03.286 - preload command. It specifically ignores it if it thinks that 00:22:03.286 --> 00:22:06.040 - it's something that it can't cash correctly and you're 00:22:06.040 --> 00:22:09.712 - supposed to put like the ad style on it and some other 00:22:09.712 --> 00:22:13.078 - things, make sure that all that information is there. But even 00:22:13.078 --> 00:22:17.668 - though all of that was there and we didn't have like a no cash or 00:22:17.668 --> 00:22:21.400 - anything on the. On the CSS files and we did, we had turned 00:22:21.400 --> 00:22:24.724 - off to disable cache in the dev tools. Sure that it wasn't 00:22:24.724 --> 00:22:27.494 - trying to prevent the caching there, it still wasn't working. 00:22:27.494 --> 00:22:31.372 - Even so, it seems like it's a bug in fire Fox that is not 00:22:31.372 --> 00:22:34.419 - recognizing that this supposed to be a cacheable thing that it 00:22:34.419 --> 00:22:38.297 - can do this with. Yeah, so we just we had to resort to fall 00:22:38.297 --> 00:22:41.344 - back or something. That's just like an older style that just 00:22:41.344 --> 00:22:44.114 - works. That writer that's been working for decade way of 00:22:44.114 --> 00:22:47.715 - browsers loading it for fire Fox and those are just going to work 00:22:47.715 --> 00:22:49.100 - with a slightly slower website. 00:22:49.190 --> 00:22:53.865 - Yeah, yeah, it just doesn't load them asynchronously and you know 00:22:53.865 --> 00:22:56.840 - you can actually see that in the 00:22:56.840 --> 00:23:00.604 - network tab. It's tough to address, you know? Oh, that's 00:23:00.604 --> 00:23:02.782 - the source known to be looking 00:23:02.782 --> 00:23:08.078 - at the. The source you can see it in the network tab over here 00:23:08.078 --> 00:23:15.290 - though how, uh? It's the waterfall is is so short anyway, 00:23:15.290 --> 00:23:18.998 - uh. Oh, it had them cashed so we would. We would do a hard 00:23:18.998 --> 00:23:22.770 - refresh. So they're all loading. 00:23:23.470 --> 00:23:24.910 - Uh. 00:23:26.120 --> 00:23:27.751 - Maybe I have to just disable the 00:23:27.751 --> 00:23:32.950 - cache? Yeah, there we go. They load one after another. These 00:23:32.950 --> 00:23:37.361 - three are really for or what we're kind of concerned about, 00:23:37.361 --> 00:23:42.574 - but it's you could kind of tell they load one after another. You 00:23:42.574 --> 00:23:46.584 - know it's like sort of noticeable. I mean where it's 00:23:46.584 --> 00:23:50.995 - milliseconds or shaving off, but still it's good practice to have 00:23:50.995 --> 00:23:54.203 - them be asynchronous where we can like Chrome. 00:23:55.380 --> 00:24:00.336 - Yeah, like I said, the point is we don't know any of this. We 00:24:00.336 --> 00:24:04.230 - just figure out how to how to Internet search stuff, Internet 00:24:04.230 --> 00:24:08.478 - search stuff and type fast. That's and try things and so do 00:24:08.478 --> 00:24:15.216 - you use. Yahoo or Bing. Yeah, I use ask Jeeves that's that's my 00:24:15.216 --> 00:24:17.946 - OK. Yeah, that's yeah alright. 00:24:17.960 --> 00:24:23.251 - Netscape and then I'm going to ask you on fire Fox. I use 00:24:23.251 --> 00:24:28.135 - DuckDuckGo, but on Chrome I use Google because you know, is your 00:24:28.135 --> 00:24:29.763 - Apple to load DuckDuckGo. 00:24:29.790 --> 00:24:34.522 - I told him or does now that this code. Actually we waited for all 00:24:34.522 --> 00:24:35.536 - this to load. 00:24:36.260 --> 00:24:40.875 - And we have my custom ones in that were in the app settings 00:24:40.875 --> 00:24:44.780 - 10,000 plus we could actually attach. This is some odd bug. 00:24:44.780 --> 00:24:49.395 - I've noticed that it clears all of the width Maps when you do 00:24:49.395 --> 00:24:54.365 - that. I need to jump into it I believe. I mean this worked. We 00:24:54.365 --> 00:24:56.495 - do have products that are below. 00:24:57.070 --> 00:25:01.724 - A 10,000 for sure, and it's not showing them and to double check 00:25:01.724 --> 00:25:03.872 - before I put this into uh. 00:25:04.410 --> 00:25:10.429 - Core, what I would probably just do is is is put a breakpoint 00:25:10.429 --> 00:25:15.059 - here, attach with ALDI attached to process and check my. 00:25:15.600 --> 00:25:20.267 - My task manager here. From what the process ID is, uh, in this 00:25:20.267 --> 00:25:25.652 - case it would be API, storefront or no. This is this is JT, so it 00:25:25.652 --> 00:25:30.678 - would be API and 19932 and just filter by that one 9932 and we 00:25:30.678 --> 00:25:35.704 - have it. I would have to restart all this. You have to be an 00:25:35.704 --> 00:25:39.294 - admin and I've gone over 15 minutes. We should all. 00:25:40.350 --> 00:25:42.598 - Enjoy your Friday, um. 00:25:43.430 --> 00:25:48.434 - I enjoy helping everybody when we do, but I don't know anything 00:25:48.434 --> 00:25:53.438 - more than anybody else. I just type fast and then use the 00:25:53.438 --> 00:25:56.235 - Internet. And we can all do00:25:56.235 --> 00:25:58.609 - that. I know things.