Day 52: MySQL…the Sequel…ize

Today we continued our MySQL adventure with something called “Sequelize” which honestly sounds like a Star Trek term—as in, “Mr. Sulu, sequelize the photon torpedoes!” It also sounds like something done with movie franchises that are well past their prime (“Rocky XIX,” anyone?). The entertaining thing is that autocorrect is coming up with all sorts of naughty words for Sequelize—especially if you initially spell it wrong.

Sequelize is an ORM (object-relational mapping) which we used for MySQL. This is also used for something called PostgreSQL, and yes, I think our instructor is just making stuff up now. All kidding aside, PostgreSQL seems to be very similar to Oracle tables, so I’m sure this will be beneficial to understand when I eventually return to our department.

The thing that’s giving me a coronary is that we need to learn all this stuff, at the rate of one major concept per day, and then APPLY IT TO THE CAPSTONE. I just barely have my routes operational from our last lab, and even so, my pages are not what one might call “functional,” except for the ones that applied to the requirements of the lab. To top it off, we now have to divide everything into routes, controllers, services, models…and I know I’m forgetting something. This is supposed to make the code easier to maintain, but honestly, if you can’t FIND anything, how much simpler is it??? I already get confused about which code is server code vs. client code. This is going to send me running screaming into the night…oh, right. We live in the boonies and THIS is what’s out there:

I’ll have to take my chances with the scary code…

Day 51: Oh, CRUD…

Today we learned all about MySQL. This was FINALLY something I knew something about. As a BA and previously as a developer, I’ve worked extensively with SQL. The most complicated part of this was installing MySQL Workbench. We mainly created files and performed CRUD—create, read, update, and delete. This was a bit tricky as applied to our new server friends POST, GET, PUT, and DELETE.

“PGPD” doesn’t have quite the same ring as “CRUD,” does it?

There was more work with Postman, as we determined if our routes worked. I had some nasty, nasty, ugly, angry red messages spewing furiously from the command prompt window every time I attempted the “U” in CRUD. It turned out to be something stupid. I’d put “post” instead of “put” when referring back to the db_queries.js. After that was fixed, everything worked fine.

In other news, we had to fill out a survey about our training. Our answers are going to be made into “cards” for our new department, so that they can get to know us better. This is absolutely HILARIOUS in my case, as my “new” department is going to be my old department, and they already know all about me. I felt sort of idiotic when under “fun facts about me” I said that “I knit and crochet!” My department is going to take one look at this and say, “Well, DUH!!!” Then they’re going to laugh until they snort in a decided undignified manner.

We also had to come up with a quote. This is one of my favorites, by W.H. Auden:

“You owe it to all of us to get on with what you’re good at.”

Precisely why I decided to attend Code Academy.

Day 50: Getting My Kicks…

…not exactly on Route 66…

As I mentioned last time, I did get our two assigned labs done. HOWEVER, I’m evidently insane, because I went nuts today and decided to try to convert my entire capstone project into our newly-learned Node Express hbs page format with routes and partials. I did manage to get all my pages to render, but as far as functionality…this was sort of hit-or-miss. The simple files were easy to create routes for. However, one of our databases has team info and then member info under each team, which is proving tricky to try to create routes for. I tried to check our original capstone server code to see if I could try to figure out how to crack the code (so to speak). At about 6:00 p.m. I finally created one “team-by-league” route which now makes my team page fully functional! I’m hoping to be able to figure out the other team/member routes.

The other issue is that my original capstone code relied heavily on URLParams. Now that we’re using routes I need to figure out a way to pass data to the member pages (add/delete/edit). I tried session storage, which I’d hoped would be the magic bullet, and indeed it was—for team data. For the member data underneath the team it was a fiasco. The code loops through all the members of a team and then stores the data for the LAST member in session storage. When you click an icon to go to a member’s edit or member delete pages, you land on the LAST person’s pages, no matter who you pick. I need to figure out how to pass the team ID and member ID to grab member data using yet another route (which you know is going to be convoluted).

Well, tomorrow is another day!

Chuck Berry – Get Your Kicks on Route 66

Updated the Blog! Day 49: What a difference a day makes…

Thank heavens! Friday was much better than the previous day. Our instructor decided to take us through the process of using Node Express Generator and Postman again, this time relating it to our labs. He went through the steps of how to write code for a server connection and how to test this in Postman. I think what helped us was understanding the steps we needed to go through to write everything correctly and how to test as we went along. We managed to finish not only the Friday lab, but a future one, and in my case, I started a page for the lab after THAT.

In the meantime, this weekend we hit the beach again! I brought my knitting and we had a lovely view.

I have to say, I don’t have dreadful Sundays anymore. It used to be that, by Sunday night, I’d be dreading Monday morning. As hard as Coding boot camp has been, I STILL look forward to each new day of coding. I’m still incredibly grateful for getting this chance.

Day 48: Deer in the Headlights

This was one of those days where I almost stormed out of the classroom. I had to remind myself that we only have a few more weeks before we’re going to be REALLY confused in our new jobs, and that this is probably a picnic in comparison…

There is something dreadful about learning things piecemeal, and then having to cobble it all together for an assignment—I know…just like real life. Today we combined login/registration screen logic, get and post logic, Node express, listing out file data, etc. into one site. The truly mind-bending thing was that we used Node Express Generator to spit out the scaffolding, and then we had to take all the bits and pieces we’ve learned this week and somehow apply them to this new format.

Among the disasters:

1. My site got completely hosed by the ****ing layout.hbs file. What was a normal-looking index page all of a sudden resembled some mutant atrocity. The only way I can describe it is that it looked like our cat Jack jumped on the keyboard in the middle of coding and then used his ass to press “save.” This particular issue turned out to be due to some random css code I’d somehow copied in by mistake for my login page formatting.

2. Partial hbs files are now unnecessary due to the aforementioned layout.hbs file. This has COMPLETELY wiped out the careful work I’d done previously dividing page contents into the partials. NOT THAT I’M RESENTFUL.

3. I also struggled over trying to figure out if I needed one script file or one per page, seeing as there was overlapping logic.

4. I compared notes with others, and think we all suffered from tiny gremlins scurrying away with what’s left of our brain cells, because many of us could not, for the life of us, remember how the hell we listed out fields into an unordered list, let alone how we previously did gets and posts in AJAX calls.

5. I personally kept getting confused over what went in server code and what went in regular front-end script code—especially since we’ve been introduced to routes, or as I like to call them, the bastard cousins of server script.

I’m hoping to gain more clarity tomorrow, as we have to combine everything into a Friday project that we aren’t starting until 1:00 p.m. The idea is to have NO actual html pages, except for bare-bones, as we have to use Postman (which I barely understand) to test the server code instead.

I have the ugly feeling that I’m not going to have a weekend…

Day 47: Me and My Big Mouth!

Looks like someone’s been reading this blog at the crack of dawn…

No sooner did I post yesterday’s entry, than our instructor gleefully announced that we were going to take the examples we’d been looking at and WRITE AN ACTUAL NODE SERVER! Before 10:00 am!

Despite the grumbling and complaining, I have to say, it was a good exercise that made everything we’d reviewed previously much easier to understand. In fact, it was SO successful that he had us DO ANOTHER ONE this afternoon using Node express. Fun times.

In other news, we all found out today where we’re going after we graduate from the program. As expected, I’m going back to my old department as a developer. The exciting thing is that I’m getting one of our department’s developers as my mentor! He’s someone I admire who really knows his stuff, so this should work out well.

I actually managed to get home in time to put in some time knitting. I’m currently working in a baby sweater for my great-niece Maddie’s upcoming baby shower.

I know…what kind of sicko knits a baby sweater in BLACK? (WildKnitter has finally lost it.) It makes more sense when you see a picture of the final product:

Not exactly girly-girl, but what the hell…knowing my crazy family, they’ll have her climbing trees and trying out for sports by the age of 5, so why not give her a tomboy-ish hoodie?

Day 46: Copying Off Tim’s Homework

We did more work today with Node.js. A lot of this consisted of going over various servers and in one instance, copying over one repository and making changes to add a field. This was a bit tougher than it sounds as we had to change a server, a module, scripts, html, and, in my case, the css style sheet to make the added line bold. In time honored tradition, my final run tanked until someone pointed out that I had named the field by one ID name in the html, and by quite another in the scripts. Once that was rectified, everything ran fine.

Our instructor pointed out that this was all closer to reality, where one is often called upon to modify existing code rather than creating brand new jobs.

This does remind me of a time, years ago, when I was a BA on a small project on the only agile team I’ve ever been on that operated in an actual agile manner. That being neither here nor there—we had two absolutely kickass developers on our team. They could figure out how to do just about everything we threw at them. In fact, they are part of the reason I wanted to become a developer again—I always admired their talent. I do remember that even THEY would do a certain amount of duplication/alteration—they referred to it as copying off each other’s homework.

I still sort of feel like we’re really getting off easy this week.

Day 45: Who moves my cheese (redux)?

We’ve embarked on Node.js AND new seating (again). I have to say, I am grateful to be sitting on the end of the row, seeing as I’m practically CRIPPLED today. Over the weekend, in addition to frollicking at the beach, I did several hours worth of gardening. I compounded this by doing more gardening this morning before getting ready for class. May we pause here to say it was a good thing I knocked off this morning when I did, as THIS is what appeared on our motion detector while I was getting ready:

I suspect someone in the neighborhood is either leaving food and/or trash out…

Due to all this activity (gardening, not the bear), I’ve been massively stiff all day. I took my customary stroll at lunch to visit the birds, but it was more of a slow shuffle. Right now, I can’t even KNIT due to my wrist being strained from plucking up weeds for hours (the HORROR). I’m hoping that more Aleve and a good night’s sleep will help me out.

Anyway, we started off today in earnest with Node.js. We are working our way up to creating servers. Right now, we’re looking at examples and copying server code to study it. We also took our capstone projects, copied them to a new repository, and changed the html pages to phps. We also grouped code that was the same on all the pages into “include” phps. It was a fun exercise. I, of course, found a few things I really want to change about my capstone project for formatting, but didn’t really have time, other than to correct the crooked buttons. If we’re going to keep on with this, I do want to eventually correct the cards in the pattern section so that they format a bit better with media queries.

That is, if I can MOVE tomorrow…

Day 44: Partying on down!

Friday was a festive day! Again! Our management provided a lunch spread in celebration for passing our assessments and finishing our capstone projects. Everything was delicious, and one of our managers even baked brownies which were to DIE for.

On a sad note, our wonderful JavaScript instructor will be moving onto her next gig. After spending seven weeks with a fun, inspirational Fort Worth native, I completely understand why our friend Rob ended up moving back home to Corpus Christi after his retirement—those Texans are a wild and crazy bunch! Don’t get me wrong, our other instructor is great, but he doesn’t know any cow jokes and he doesn’t brandish a pool noodle when we forget to validate!

I know Dana reads this blog, so thank you so much for everything! We all learned so much and you made difficult material much easier to understand. I wish you luck on your continuing adventures in enlightening more students. Thank you, again!

…and if our manager is reading this, I was the one who snuck off with the rest of the brownies…If you were inclined to share it, I’d sincerely LOVE the recipe!

Day 43: Show and Tell!

It was a festive day! We all demo-ed our capstone projects for each other. As usual, other people’s UIs were awesome, although people kept saying they liked mine. I just think these people have never seen a properly-knitted or crocheted afghan before, but I’ll take whatever complements I can get. NEVER underestimate the power of using your pets to shamelessly shill anything on your website…this tiny lad could sell ice to an Inuit…

I did love the variety of what people came up with for their sites. No lie—one guy did the ENTIRE thing as a single-page application (SPA)! It was wild. Another person did dragon boat races that looked like so much fun that I think she’s just talked me into joining our company’s contest for next year.

Our next stop on the Bootcamp Express is going to be Node.js (no pun intended). Right now we’re reading up on this on https://www.w3schools.com/nodejs/default.asp and doing some demos. Monday we’ll be starting in earnest. There is a rumor that we may have some sort of lunch catered in for us for Friday.