Tuesday, November 10, 2015

Day 16

Beginning of Week 2: MySQL +...Flask


I spent the majority of the weekend reviewing Flask and reading up ahead on setting up a database which is our next chapter. Our database is MySQL and installed a couple of connector programs on terminal. The assignments for this chapter are pretty straightforward: learning the syntax of SQL queries in Python code and how to use that to retrieve, receive and transmit code to and from the client side server.

Our class always begins with 20 minutes to an hour of algorithm challenges. I think this is one of my favorite part of the class because it really picks at your brain on how to accomplish a task. There's literally nothing else you need to know other than basic for, while, if else statements. So far the challenges aren't that bad and only uses basic algorithms. It's pretty cool to sometimes the wide variety of answers different groups come up with. I'm sure the challenges will get harder as time goes on but I'm pretty sure I'm up for the task.

We did Python Olympics again and...well PO is like Jeopardy and we guess the output of Python codes that Kris gives us. I know it's a good exercise to think like a machine but practically you can run the codes and see if it works and fix after whatever error pops up. Anyways, I didn't pay too much attention and I got caught using my computer...for fantasy football haha.

The rest of the class was spent doing the assignments, and in my opinion they were a great segway to learning the new material. The first being an email database where you enter a proper email (using if not email regex) and it will show up in the database on the index page ('/'). I built my HTML page based off of the Ninja Gold assignment where I had an activities box that displayed information from the server but this time, wrote code to display information from the database using (SELECT * FROM ...etc).

The next assignment was adding a friend that will be sent to a database that will also be sent back to the index page to the right of the input. The friends in the database can also be edited or deleted.
Very minimal design-wise, but the key was to be able to store, delete and edit databases through Flask.

No comments:

Post a Comment