Day 13 – More Flask

I was late this morning due to it being super rainy all day. I suppose the biggest downside to an elevated train, especially for such an outdated one like Chicago’s “L,” is that it’s vulnerable to the elements. My train car got stuck waiting in between stops for around 20 minutes total this morning…

Anyways, I got to the Dojo when everyone was already working on algorithms. The algorithm we had to work on today was “intermediate sums.” Given an array of numbers, calculate the sum of the first ten digits and insert the sum immediately after those ten indexes, then do the same for the next ten, and so on. If the array ends before completing the last group of ten, just insert the sum of the last digits so far at the end of the array. We had to do two versions: One returning a new array without altering the original, and one where we updated the original array in place. These ones were a bit of a challenge, but my group still managed to figure them out pretty quick. I noticed the solution I came up with before the bootcamp and the solution my group formulated were very different this time around. My old solution even looks pretty bad now, lol. I guess I’m learning!

After algorithms we had a lecture about more Python and Python OOP.  Classes, attributes methods, etc., nothing too exciting. The end of the day goal for the cohort was to finish up the Python OOP section, and tomorrow is when we’re officially starting Flask as a cohort. I’m looking forward to tomorrow and beyond’s lectures because they’ll finally be something other than review for me.

My activities for the day consisted of more Flask assignments and reading. I think I’ve got most of how it works understood, but not totally solid yet. I was able to take it a step further from yesterday by putting in Python logic into my HTML templates. See Ninja Gold for an example. It’s pretty cool how render_template() can evaluate all that stuff, but man is it a pain to type out, lol. Putting {% %} and {{}}‘s all over my HTML looks kinda ugly, and it sucks that my text editor (using atom currently) doesn’t know what to think about their contents. I’m probably just missing some plugin to enable atom to color and auto-complete Python inside of HTML files, so I’ll have to look into that more later.

That was about it for day 13! Looking forward to seeing what the rest of the cohort thinks about Flask tomorrow! (Actually, today since I’m posting this the morning after day 13!)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s