Day 59: Fried Brains Redux…

Today was a tad uglier than yesterday. Thankfully, I didn’t feel like such an idiot, as some of our issues were communal. Everyone was having issues with their Nav Bar changing back to a “logged out” status when one clicked onto another page link. The trick was, believe it or not, to NOT do that. We ended up putting in click events for the links rather than hrefs, so that the components switched out, rather than the entire page reloading every time (which was wiping out the user authentication).

Right now, I’m struggling with the edit user page. Whenever I have issues with a page, it’s usually with any type of PUT request. I know it’s not the server, as I’ve tested that ad nauseum with Postman. If this were JavaScript and not Angular/Typescript, I’d be done by now! Not that I’m resentful…One of the other idiot things I’m struggling with is how to hide or show a DIV. With jQuery, it would be a no-brainer. One might say…I’D BE DONE BY NOW!!!

As I’m completely fried this evening, I took a break and have been knitting. I’m so brain-dead that I’ve been constantly checking the pattern, as I’m afraid of doing the wrong thing…AND several rows into this, I discovered that I did do something wrong. I forgot to put in a buttonhole! Guess who’s going to need to learn how to make an Elizabeth Zimmermann “afterthought buttonhole”?

This will have to wait until I figure out make the damned edit user page edit a damned user…preferably the correct user…

Day 32: Up, up, and array!

Today we continued to modify our projects to add new courses, and do put requests to modify a table. I swear I felt like EINSTEIN when I dynamically created a pre-filled input form to modify data and IT WORKED. I even managed more validations.

For some reason, the wheels fell off the wagon for me when we proceeded onto multistring queries. I’ve gotten so used to doing long concatenations to create dynamic HTML that, oddly, something that’s supposed to be much simpler just threw me. Also, we’ve started using functions like find(), findIndex(), etc. which are simpler, but seemed ALIEN after what we’ve coded before.

It’s sort of like that expression, “why go through the door when there is a perfectly good wall right there?”

I muddled through but it was both frustrating and infuriating.

I did get out this evening with the knitting peeps, though!

Day 30 and a half: UI Envy

It was an UGLY day of trying to pump out yet another Friday project. I stayed at class until almost 7:00 p.m. on Friday, trying to finish. The good news is that I got the jQuery/JavaScript working, and I managed to throw in field validations by the end of the day. I still struggle with where to put events in relation to the JSON callbacks. I did manage to validate the dynamic HTML, which was a good thing, as I had some ghastly error involving my generation of dynamic links onto a page.

This morning (Saturday) we had an email from our other instructor. He had some general feedback on the sites he’d seen so far in GitHub. It actually was a good thing, as I was able to check on and update my site. Despite looking it up on stackoverflow.com, I struggled with getting an image into my readme.md file until I just downloaded one of his readme files out of GitHub and reverse-engineered it to fit my needs.

So, the only thing I had left to do before the Saturday 5:00 p.m. deadline was to make the user interface look good…

I have a confession. I’m artistic at certain things, but not others. Even with my knitting and crocheting, I great at techniques, but struggle over what colors to choose that will work together. It’s always the way…I’ll think I have a great-looking website, but then I’ll look at other classmates’ Friday projects and mine is pathetic-looking in comparison! When it’s a matter of coming up with funny-sounding or interesting text, I’m good at that, but my illustrations and placements are usually plain and downright dreary.

For instance, I FINALLY got an image to cover my Jumbotron on the main page, without looking stretched-out, blurry, or just plain ridiculous. I was so excited! Then I glanced over at other pages and people have carousels going, and multiple interesting illustrations, and beautiful interfaces that just made mine look like the sad, pathetic wallflower of all sites.

I’ll need to up my game for the capstone project coming up…

Day 29: AJAX…not just for scrubbing soap scum!

Today we learned about AJAX calls. Hilarity ensued this afternoon as we all had to create an application shell (some of us may have forgotten to engage GitHub first and had to start over again with the folder in a GitHub repository folder). We fired code for the web server—up to this point, we’ve been relying on the “Live Server” from Visual Studio Code. We’re using something called a REST API. I know it sounds like a high-end day spa, but it stands for “representational state transfer technology for an application program interface that uses HTTP requests to GET, PUT, POST, and DELETE data.

There were a few fits and starts as some people inadvertently killed their web server.

We also used Postman to test out our connection to get data, post data, etc. I know. I can’t get the song out of my head now, either…

EAR WORM!!!

Mr. Postman

I’m happy to report that, as of 9:10 p.m., I got my new entries to post to the JSON file! Now I just need to figure out how to PUT for the update file. Watch—that will probably be tomorrow’s project!

Day 28: Reason Things Out

Today, as most of my days, was a day of desperately trying to figure out how to do things. Add jQuery into the mix, and you get something like THIS:

Today we learned (the hard way) how to dynamically create a table using jQuery. We just learned to do this 5 minutes ago using regular JavaScript, so it was one of those ugly—I REALLY hate the expression “I can’t wrap my head around this,” but it was just like that. It was the mental equivalent of turning around an ocean liner on a dime. I had to stare at the example in our workbook for ages until it clicked. I have to say, once I figured it out, dynamically creating tables is much easier to accomplish via jQuery.

We also had to redo another earlier script in jQuery. For the life of me, I could NOT figure out what was wrong with my code until our instructor had me look at the stack trace. She was so excited to have a real-life multi-line jQuery goof that she called over people in groups of three to look at my screen, and showed everyone how to debug code that uses jQuery. Spoiler Alert: when it says you screwed up in some weird obscure line that’s decidedly NOT yours, you have to trace it back to your original issue (mine being using a $ rather than a # in an id object). I’m not sure how I feel about being held up as an example of bad code…

Day 27: All jQuery-ing aside…

After my rant yesterday about nitpicking errors, today I added more to my blossoming collection, including an issue with the character countdown on my <textarea> box starting at 33 characters instead of 50. You guessed it. I’d inadvertently added spaces between the <textarea> tags in my html, so the box already had 17 spaces to be in with.

Today was our exciting foray into jQuery. I can’t believe I’m saying this, but I’m finding it easier than regular JavaScript. Probably because we are taking past exercises and modifying them to have jQuery where applicable. We also have to create a spreadsheet to keep track of how to do certain things the JavaScript way vs. the jQuery way. Seeing as this is a library, it’s sort of the “Bootstrap” of JavaScript.

The good news is that we managed to get out in time for me to make it to my knitting group this evening! I’ve started on the sheep on the front of the sweater which, after dealing with JavaScript and jQuery all day, isn’t as hard as I thought.