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???

Day 23: Dynamically creating things…

…Mostly a scene…

Today was a VERY long day. Thankfully, with a bit of help, I figured out my issue from yesterday. I was off by ONE lousy line of code.

Our next adventure was adding, creating, and manipulating things to the html (appendChild, etc.) I managed to figure out how to do all this, but I’m still fuzzy on how to get rid of a dynamically-created table, once it’s created. I know I can just put a blank string in the div that holds it, but that wipes out the table element within the div, which fixes it so you can’t repeat the selection process when you choose another category from the drop down. I carefully inspected the elements after the first table gets created, and it’s odd. The <tr> and <td> tags are created in the html AFTER the <table> <\table> grouping, so one can’t even erase out the table, as technically nothing is in there—even though a table is definitely created on the screen. The only way I see around this is to perhaps figure out a way to dynamically recreate the table element after the div is blanked out. Either that, or do a routine to specifically delete out the <tr> and <td> tags.

After 10:30 pm, I decided to call it a night and to tackle this again tomorrow. Right now, I have the lazy fix in there to just reload the page if you hit the “Start Over” button. I do need to figure out how to erase the rows correctly though, as the OTHER issue is that if you just keep selecting category options from the drop down, and don’t reset, the choices just get added over and over again to the page every time you select a category—they don’t get replaced with the new category’s table entries.

Knitting fair isle with five colors would be easier…

Day 22: Lost in the DOM…

Day 22: Lost in the DOM…

This was just one of those days. It began well enough…I was understanding everything, and the first exercises went well. Then the **** hit the fan. I do realize that a huge part of what we do concerns interacting with the browser and the DOM; but I swear, at times I really miss our beginning labs, when all we did was code and run in the Code Runner console. The worst dread on earth is when you try to run your code, NOTHING HAPPENS, and then you have to hit F12 in the browser. Whenever I see that dreadful flaming red type, flashing angry error messages across the console, I always want to scream at the top of my lungs, “Dear God, WHAT FRESH HELL IS THIS???” Then I remember that I’m old enough have parented the vast majority of my fellow students, and that it would probably be undignified to cry and throw things.

Today, I spent a good part of the afternoon with the bloody F12 console. We’re doing some god-awful routine where we have to take a substr of similar <img> ids (image1, image2, image3) to get the numbers on the ends (1, 2, 3). Then we have to concatenate the “para” part of the paragraph <p> ids (para1, para2, para3) to these like some nightmare from Frankenstein, and — I’m not making this up — take the alt attributes of the img tags and shove that alt text into the <p> html.

I think it was after the 12th time I tried to make this work that I decided I really needed to knit…

I know…all the ghastly code is going to be waiting for me in the morning. On the other hand, I got a mental health break, and my little intarsia sheep are really coming along!

Day 21: Who moved my cheese?

As if we didn’t have enough to do, class-wise, today we shuffled our seats. I think the idea is for us to work with different people. I was just getting used to working with the people I was working with, but of course they just HAD to do something about that…We all realize that once we get out to our new jobs that we’ll be working with different people from time to time. They didn’t need to drive that point home to us right now.

I’ve been fretting, as I’ve now lost my luxury seating in back. I should explain…The guy to my right dropped out of the program the first week, and the woman to my right decided she’d rather sit further up. After wondering if it’s perhaps my breath, I reveled in the fact that this left two empty seats–hence LOTS of room. I’m now in a seat by the door, with only one desk-space to fit all my stuff. I’m one of those people who brings everything except the kitchen sink with me to work, so to say this is an adjustment is an understatement. My monstrously huge work laptop is under the desk because I can’t fit it anywhere else. I have to use a plug in the corner of the room to charge anything, as my new location has NO free outlet plugs anywhere.

I know…get out the tiny violins.

I apologized to my new seat neighbor, in advance, for talking to myself. I’ve been reportedly talking to myself since I first started talking, and it just gets worse when I’m trying to figure stuff out–like coding, of course.

Fun fact: I checked, and you can STILL buy the book Who Moved My Cheese on Amazon. It’s even available on Audible, so that you can listen to it in the car on the way to work. You just know your management is plotting to move your cheese once again…

Day 20: Where did the time go???

This has been one of those days where time just got away from me. It all started this morning when I took my morning walk, and mysteriously my usual 30-minute walk took 37 minutes. Then, inexplicably, my usual shower routine took 15 minutes longer than usual. I managed to get to class on time, but I was worn out before the day had even begun.

Our class day whizzed by as we all frantically tried to complete our Friday projects. Our assignment this time was to create a website for a small Alaskan town to provide information on the town, create a registration page for the one hotel, and create a page to rent a car at the one car rental place. I chose to use a lifeline and texted our friend Roy, whom I knew once visited Alaska and who might have some pictures I could use for the site. He couldn’t find them in time, but suggested I just google the town he stayed at for pictures. In the category of there are no coincidences, both he and our instructor had visited the SAME small Alaskan town!

The JavaScript coding was an ugly business. The hotel registration site was horrendous. There was a lot of crazy logic for discounts, free breakfasts for seniors, drop-downs, radio buttons, checkboxes, and validations for number of people to a room, etc. For the life of me, I just could NOT figure out how to give seniors their breakfast for free! The fact that many of my best friends and my spouse fall into this category is especially ironic. The great thing was that our instructor showed me how to use the debugger—I discovered that my code was finding the first match for breakfast, and just dropping out of the function with that value. She explained I needed to put the most restrictive option first. Oddly, this STILL didn’t work. I FINALLY got what I wanted by saying if you checked off “breakfast” and you WEREN’T a senior, then calculate the charge for you and your little tots. Else, the meal was free.

I didn’t get to the “tours” page, but I do remember our instructor saying that they’d rather have the required pages set, rather than a half-assed job on those and the the extra-credit one. I may spend Saturday adding some more illustrations to the pages I did complete before the 5 pm deadline.

By the end of my Friday, I was in a coma. To give you an idea about the level of my exhaustion, I drove home, turned off the engine, and almost fell asleep in the car in the garage.

Day 19: the ups and downs

In contrast to the utterly CRAZY day that was my yesterday, today was much better. We had labs to do, but the calculations were similar to yesterday’s scripts, so it was much easier. Either that, or I’m getting better at hooking up JavaScript to web pages.

I think talking a walk this morning when I got up, rather than trying to squash steps in during our lunch break gave me back some of my sanity. Okay…I’ll admit, the pizza lunch, courtesy of our instructor, didn’t hurt, either! Someone also mysteriously sprung for Dunkin’ Donuts munchkins…there should be some sort of quality award for whoever this person is.

I may be singing another tune tomorrow when we’re cramming in our Friday project. I’m trying to get a jump on it tonight by setting up my Bootstrap settings, css, and JavaScript flies ahead of time. I really hope our instructor wasn’t kidding about it being a travel site project, because I just downloaded a boatload of travel pictures, including our Washington, D.C. trip. I can’t take credit for the picture below. Our friend Larry doctored this one up!

Day 18: My life on the “outside”…

…or, WHAT LIFE? Note: whining ahead.

After yet another day of staying very late, trying to figure out code (and desperately trying to remember what I learned last week, that I’m evidentially supposed to be incorporating into the exercise du jour), I’ve come to the conclusion that I really can’t make plans after class during the week. I have a whole plethora of activities that I usually do after work that are just not going to be possible anymore—at least not until I finish training.

So far, this week, I’ve had to blow off my Tuesday night knitting group (sacrilege!) and another activity I do on Wednesday afternoons. We have some friends visiting tomorrow night, whom I’m probably going to wave “hello” to on my way into my home study to do more work (my classwork portfolio is a tad out of date). Oh, and we’re having SEVERAL people to the house this weekend—something we’d planned long before I knew I was going to be spending my summer snorkeling through CSS, HTML, JavaScript, and Bootstrap. Ask me if I’ve done ANYTHING to prepare for this…so far, my poor, long-suffering spouse is having the shoulder the burden for this.

Don’t even ask me about my exercise schedule…okay, you may ask. This was the extent of my exercising for today. At lunch, I enough time to walk outside and take a picture of this bird…that’s it.

Day 16: Stringing You Along…

We had two major blasts today in class.

One: we got our Friday projects back. The good news is that, by and large, our instructor felt we did well. The bad news is that I completely spaced on putting all my inputs into a <form> element—apparently, I wasn’t the only one, and there were a few other things I missed that needed attention. We all had issues to correct, on which we spent most of the morning working. One issue, a link not working, turned out to be a non-issue. I suspect our instructor had us immediately work on our defects as, in real life, during an Agile Sprint, it would be expected that you would correct mistakes right away. As a BA, I’ve been on the other side of this equation (“What do you mean, you didn’t make the changes YET???”).

Two: we worked with strings today. We used different functions and methods, such as indexOf(), lastIndexOf(), substr, slice, etc. Before you ask, NO…this is NOT as much fun as working with that other type of string (a.k.a. yarn).

This all culminated in an exercise to parse out a full name by prefix (if present), first name, middle name, last name, and suffix (if present). After much wailing and gnashing of teeth, I DID IT!!! Woohoo!!!

Tomorrow we work on dates…no, not the type you eat…

Day 15: The Outside World

Last night, after class, I took a much-needed respite and went to a music festival concert. Our local orchestra does a concert series every Friday during the summer, featuring a different theme every week. Last night’s was a tribute to Elton John. It was a fantastic night.

Of course, that’s not what I’m here to talk about…earlier in the day, we all survived a 1-day—we’ll call it a sprint, for lack of a better word (Agile pun intended). We had eight hours to create a 4-page site featuring three financial calculators with about six different equations. I confess we got an assist from our instructor on one, but once we got that one done and figured out in JavaScript, it was fairly easy to google for the rest of the equations and plug them into our pages. It was fun, too, as we revisited our HTML and CSS coding with Bootstrap thrown in, and got to style the pages to our liking. We all ended up with pages that worked by the end of the day. It was A MIRACLE.

I raced to the concert last night, all excited to tell people about my wonderful achievement. Fun fact: unless people are coders, NO ONE really wants to hear about your adventures in coding. I was excitedly explaining my entire eventful day, my ups and downs and struggles to make the scripts work correctly. My librarian friend, who has taken coding classes as part of her library science degree, did understand what I was talking about, but everyone else looked like a deer in the headlights. It might have been more exciting to have the site loaded in a GitHub io repo to show them, but I hadn’t had time to do that.

We artists are SO misunderstood…the only thing less exciting for these poor people would have been had I tried to explain knitting short rows to them…

Day 14: Fried Brains…Fried Brains…

Today we upped the ante on functions by now displaying results in the browser. So, if you want an online calculator or need to find out what 38 degrees Celsius in Paris REALLY means (read: Fort Lauderdale, FL is cooler), then I have the apps for you!

As we’re going to be going full-tilt tomorrow with our Friday lab day, I’m taking a break from my nightly studying to get in a little knitting. I’m attempting to put sheep on a sweater. I’m so fried from class today that it took me 15 minutes to locate black yarn for their little stick legs. I need to divide up small balls of off-white yarn for their fluffy little bodies, but I’m trying not to think about that right now. This is intarsia, and I haven’t quite worked out how much is going to be needed for each ball.

Knitting and sheep pattern

I originally thought this pattern was an in-the-round fair isle yoke, so I wasn’t stressing…until I looked at the pattern AGAIN. I’ve essentially knit everything else in the round, so doing drop sleeves with intarsia on the front and back of the sweater is going to be–oh, let’s be positive and say it’s going to be an ADVENTURE.

My friend Sheila, who–if they gave them out–would have a black belt in knitting, suggested I just modify the pattern to be in the round. However, after days on end of staring at Visual Studio Code, trying to decipher why the #%^*ing code ISN’T WORKING this time and why there are angry red alerts in the F12 console–I just can’t face the prospect of counting stitches to figure out how many little sheep I can knit in the round, and how many more little balls of yarn I’d need…

I suspect lab day tomorrow is going to be simpler than that.