Thursday, June 13, 2013

Week Two!

Welcome back! Sorry this is going up so late - my weekend was pretty busy, and I just never got around to writing a new post. Class is still going well, although the last few days I've felt like I'm falling a bit behind, which worries me. Up until now I've felt quite confident in everything, but we've just started using Rails, and it does so many *things* for you that it is a bit overwhelming. I've also felt a bit under the weather, so hopefully this weekend I can just rest up, go over week three's work, and get back on track. But! That's for the next post! As for last week...

Monday

On Monday we were introduced to JavaScript and jQuery. While Ruby does work behind the scenes on web pages, JavaScript deals with what the user actually sees, and can let the user interact with the website. jQuery lets you put JavaScript right into your HTML file, so you can perform simple (or maybe even not-so-simple?) things right there. That was a pretty bad explanation, sorry. Anyway! We made a banking website that allowed you to move money between your Checking and Savings accounts, along with throwing up an alert if you overdrew from either account. For the most part, this program wasn't too difficult, although getting the overdraft to work properly was a bit tricky.

Tuesday

We played with Twitter Bootstrap today. Bootstrap is basically a collection of styling code that you can include in your websites. Rather than (or in addition to) writing your own style code (fonts, margins, where things are placed, etc), you can use Bootstrap's pre-made styles, and apply them to your website as you like. It isn't as straightforward as a template (like you might see on some make-your-own-website sites like wordpress), but it does do a good amount of heavy lifting. I'm not particularly good with CSS (the styling language we use), so Bootstrap automatically making my stuff look a bit more professional is nice. I'm trying to keep most of these coding explanations really simple, by the way, since a good number of my readers don't know anything at all about programming, so hopefully it is simple enough for them to understand, but not so simple that the people that *do* know find this boring! Our assignments for the day were to go back and apply Bootstrap to our Bank and "Playground" (from the previous week) programs, and make them look nicer.

Wednesday

Databases were introduced today, which meant that we would finally be able to store information. Previously, any information we added while running our programs was lost after we exited (so in the pet store program from the previous week, I could adopt every animal in the shelter, but if I closed the program and reopened it, it would reset). We worked on two medium-sized projects today, one in class, and one for homework. The Favorites app that we made in class stored information about our favorite books and movies - pretty basic stuff. The To-Do list had us add and remove tasks, as well as mark whether they were complete or incomplete.

Thursday

We continued working with databases today. This was the first really complicated concept that we covered, in my opinion, as we now moved on to relationships between items. Backing up a bit, a database is basically a collection of tables, and each table is related to one "object". You can give the objects various "attributes", which are then stored in the table. For example, an "authors" table would store things like first/last name, age, date of birth, etc. That is pretty simple, right? But what if you want to include every book he's written? Now, maybe we want a separate "books" table (and those might have attributes like genre, number of pages, fiction/nonfiction...)...but then we need to show that they're related! Well, a book (to simplify) always has one author, but an author can have many books, right? So we will establish that "relationship", and then we can request all books by a certain author, and display them. Ta-da! Now we have a list of every book by F. Scott Fitzgerald! (Assuming we sat there and entered every single book he wrote into our Books table, anyway. Maybe we just put in The Great Gatsby, since that's the only one that matters). I don't really have any problems figuring out what the relationships should be usually, but I was (am?) still not quite certain how to write all of that code out without checking a guide, so this is tough. Our assignment for the day was to create a Stock program that would allow the creation of a client, portfolios, and stocks. The client could have multiple portfolios, and the portfolios could have multiple stocks, chosen from the "brokerage's" offerings. The only thing I couldn't figure out (and lost a lot of sleep over) was getting a portfolio not to completely refresh every time I wanted to add new stocks to it (overwriting the old ones). As it turned out, we hadn't learned how to prevent that yet. Whoops.

Friday

We used today as a bit of a review day, covered "refactoring" (cleaning up and organizing our code to make it more efficient and easier to read), and a few other topics. Honestly, I was really tired since the Stock program kept me up late, so I had trouble focusing. I asked Sumeet, our instructor, if we could have another database assignment for the weekend, since I felt like I and others could use a bit more practice, and he obliged with a "Party Management" program. This allowed people to create parties, create and list items they wanted people to bring (potluck-style), tag items (vegan, snacks, etc), and allow people to "claim" items as well. It was a pretty neat program, and a good way to drive home databases. I'm still not an expert, but I'm fairly comfortable with them now at least!

Well! That wraps up week two! I'm sorry for the delay in posting! Hopefully it was still a fairly enjoyable read (my memory is a bit fuzzy, and I'm pretty tired today). I guess you'll be getting another update really soon though!

One thing that worried me early on was how difficult this class would get, and whether people would be left behind. At this point, I think we've lost about 6 people, from our initial 24(ish). I don't know everyone's reasons, but I think that most of them left because they were unsatisfied with the program for one reason or another. We lost a number of people after the first two or three days, which I thought was a bit ridiculous - at least wait out the week to see how things ramp up. I'm pretty sure I spoke in the Week One entry about how the first two days were slow, and then the next two were much more involved. So far, I don't think anyone has dropped due to feeling unable to keep up - we have a good group of people now, so hopefully none of them will! I thought there was a fairly large gap between the people that were at the front of the class and the people that were at the end, but I think that gap is narrowing now that we are getting into more complicated territory.

Honestly, regarding how some of the drop-outs felt the class was too slow in the beginning, now that we are halfway through Week Three, I don't know if I could deal with this class going much faster than it is currently. Without giving too many spoilers away, we started using Rails this week, and I am feeling kind of overwhelmed. Partially I think this is because I just had a hard time sleeping the last few days, so I've been extra tired in class, and I was kind of distracted today from some personal stuff (nothing super important, don't stress mom/sisters/family), so that certainly didn't help. Anyway, as I said at the beginning, my goal with this blog was to write about the good and the bad, with the hope that feeling like I have this "commitment" will force me to fight through things as they get a bit harder, so that is what I have to do! I started Week Three feeling really confident, and my confidence is really shaken right now, but you will have to read about that on Saturday! Hopefully I'm back on solid ground by then!

No comments:

Post a Comment