Day 34: A SPA Day!

Tomorrow is another Friday project. I’m not too worried about the JavaScript, although the arrow functions are odd, and I’m still fuzzy on those back tick expressions. I’m more concerned about making a halfway decent site that looks good. We’re going to be doing a single page application and the theme is going to be some sort of spa. I found a few nice photos to use, but honestly, if we have to cough up several pictures to fill bootstrap cards for each and every one of the different spa services, then I’m going to run screaming into the night. I could be truly crazy and make interesting cards using the font awesome icons, but that would probably be weird.

The thing is, I’m not really what one would call a frequenter of spas, let alone day spas. Years ago, when we sent our dachshund to the pet groomer, we told her she was having a “spa day.” She’d return with a tiny bandana and smelling of shampoo—right up until the point where we let her outside—but that’s about as close as any of us have come to an all-day beauty treatment lately. I tried to get some inspiration for photos at my hairdresser’s this evening while, as I always put it, getting my hair restored to its “natural” color. My hairdresser is truly a miracle-worker (there are members of my own family who have no idea how old I am), but her decor is simple and elegant—no bubbling fountains, burning candles, ferns, odd fruity smells, or anything else one might associate with women spending an entire day bonding over pedicures and massages with someone presumably named “Sven.”

I’ll have to see if I can cough up some more interesting pictures before tomorrow.

Fun fact: Font Awesome DOES have a tiny little hot tub!

<i class=”fas fa-hot-tub”></i>

Day 33: Pondering Capstone Project Scenarios

I’m happy to report I’ve managed to at last get my “Friday” project to a good place, where I’m not tempted to hide it under a rock in shame. Everything is correctly functioning, and I even managed to make the UI look nice. One of my classmates helped me out with using Font Awesome icons to make my edit, view, and unregister links look sharp. Another helped me a few days ago with the “Select One” option for the dropdown, so that looks good.

I’m still pondering what to do for the capstone and the “team” concept. I had an insane idea of making my fictitious crafting teams compete to see who could knit and/or crochet the most squares for Warm Up America, with the winners getting a $100 gift certificate to Webs. However, if this were a real online contest, I can see a few pitfalls:

1. For one thing, I’d need to limit the number of team members, so that I wouldn’t end up with 100 people on the winning team getting $100 apiece (“Um, Sweetums, about that retirement fund…). I could perhaps have the winners as a group getting a $500 gift certificate—though I can just see the ensuing cat fight in the yarn store now. I know, I know…before I start getting hate mail, I’m fully aware that there are male knitters and crocheters! Perhaps I could limit the groups to five people, with the winners each getting $100 apiece.

2. Another issue—how does anyone PROVE how many squares they really produced? The only way to really prove it would be if the teams sent the squares to me, which would be its own logistical nightmare—I’d have to mail all the squares to Warm Up America MYSELF ($$$). Also, people in the home environment probably wouldn’t take too kindly to an entire room being filled to the rafters with tiny 7” x 9” squares (yes, I’m aware this would technically make them rectangles). Perhaps I could have people post a picture of themselves with all their squares before they mail them to Warm Up America. Surely no one could fake piles of squares. I mean, even I—the ultimate crazy yarn woman—don’t have 100 squares lying around to pile up and fake for a picture…However, one can never underestimate the sheer prowess of the truly delusional among us.

I do have time to suss this out before next week.

(I’m sorry Randy and Gary! I know you’d never stage a cat fight in a yarn store! However, I can see one of you convincing the other team members that Webs was no longer in existence… 😈)

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.

Day 26: For the love of God, PROOFREAD!!!

This has been entire day of Pam needs to learn to read…

Today we had a day of learning Ajax calls and event handlers. I also had a weird day of things not working due to:

1. typos (“it’s readyState, NOT readState”) I was desperately searching for half an hour for this issue, until my desk neighbor happened to glance at my code.

2. ghastly errors in reading a file, until the instructor pointed out that I was attempting to read an array file that was in fact NOT an array file. I’d copied the wrong url link! AND…

3. My personal favorite—the misplaced semicolon. It took coming home, eating dinner, then going back to the code to see that I hadn’t ended the onreadystatechange correctly. Once I moved the semicolon, my job ran without a hitch.

As much as these brain-farts are always hysterical, it makes me nuts to miss things so easily avoided. I suppose it does beat completely missing the entire concept of how to write the function!

Day 25: Got the project done!

I woke up in the morning with a migraine from hell, including nausea and hurling. I had to down a bunch of Advil and caffeine, and just lie down quietly until it was time to get to class.

Despite this, I’m happy to report that I was able to complete Friday’s project! I even managed a few of the extra-credit things, too. I’m going to hold off on sending the “I’m done” email to the instructor until I have a chance to look it over once more. This time I didn’t put any “extra” invalidated pages in GitHub that I was going to get to later.

I really do need to remember, when I’m struggling and wailing and gnashing teeth all week, that it all pays off on Friday when I’m able to complete the project with everything I’ve learned over the week. I showed my resultant site to my loved ones, who were all impressed!

Now onto some fun and games!

Day 24: I know it backwards and forwards…

…or, in this case, downwards and sideways (sort of)…

After staying up quite late with my table issue last night, it turned out that I was not dynamically adding rows to the table, but the div itself, which is why the rows were showing up after the table element, and why I couldn’t get rid the the rows afterwards without wiping everything out of the div. I was off by ONE line of code. It’s always the way!

Despite my 5 hours of sleep, everything was just ducky. In fact, thanks to figuring that issue out, I was able to easily tackle our afternoon assignment. We had to take a JSON file, convert it, then use a dropdown to have the user select out an object to create a table dynamically from the file with the information on this object. I was so excited when I managed to spit out a very nice table listing field headings all the way across. I even used Bootstrap to make the table look attractive. There was only one problem…

Pam needs to learn to read.

The table was supposed to read SIDEWAYS!

The headings were to be in the left hand column and the information in the next column. Logically, this makes perfect sense, as we were only calling up one record row of information per object. I wasn’t the only one to make this mistake. Our instructor kept telling us the issue was “simple to figure out” and “much easier” than what we had been doing. However, after your brain has been hard-wired to making a table a certain way ALL AFTERNOON it’s tough to completely turn around to figure out how to literally “turn around” the table. I couldn’t do it. I was going to stay later to figure it out, but I really need my sleep this evening. I figure I can tackle it in the morning before we get started on our usual Friday project.

You watch…sideways tables will be the main project feature tomorrow!

Where’s the Advil???