21 October 2014

Hackbright Day 16: Sessions + More Flask

When I transferred high schools way back in 2001, I joined all the extra curricular activities that I could in order to meet people and make friends. Some of them turned out to be life-changing (Hi, Ms. Maciolek!) and some of them turned out to be a huge waste of time (that would be you, softball). One of the things that sort of fell in between those extremes was the literary journal *thing* that I did one year. One of the first orders of business was to pick a name for it. My suggestion was "Sessions". They ended up going with "Harbinger". Speaking to the incredible content of my character, I basically lost interest once my name wasn't chosen.

Fast forward 13 years, and now I finally get to talk about sessions.

Sessions, in this context, are about storing information on the server side of a web app. In Flask, the session is a dictionary that you fill with information like, for instance, the user name. For websites where you might buy something, everything you'd add to a shopping cart would be in the session dictionary.

Our assignment today was to make a webapp. The skeleton for the app was already in place, but we needed to add things to it to make it functional. We ended up using Flask, the python framework for web apps, SQL, html + css, and jinja (which is a way to inject a little bit of python into the html). It was a lot of fun, actually, and we were able to make a functional app with a log in page and an account page.

I had a meeting with my advisor today and at his suggestion, I'm going to try to work on a project on my own to create an app, mostly to practice all these new skills that we've been talking about in class.

apt-get install ROBOJULIACHILD 
So my intent is to create a recipe-generating bot that is based on a few different recipe "structures" and will then randomly select things that would go with it. I've sort of sketched out an idea of how to implement it. The working name is cook roulette, but robojuliachild is my favorite. My biggest thought is to make the recipe structure a class and then have the different kinds of recipes (e.g., quiche, risotto, etc.). This works because I'm probably not going to make anything that's too fancy, but doing this with classes makes it modular so I could come back to this easily. What's also nice about this is that I can get more experience with classes without having to go back to that horrible game exercise. (I should definitely probably revisit that at some point.) I'm thinking that it would be interesting to add baking recipes to this because you could calculate the required ingredient amounts based on the ph of different ingredients.

We also talked about how the internet works and now I think I want to run my own server to deploy my own apps. And then I brought up cookie clicker because I'm totally a winner like that.


20 October 2014

Hackbright Day 15: Pro Set. That's way super fun.

Friday was uneventful and eventful. We reviewed all 17,000 new languages we learned this week. It was also install day, where everyone was told what to install to run everything we do in lab on their laptops. I figured out that I somehow totally fucked up my install of Chrubuntu and damaged the Chrome OS in the process. It's not a huge deal because my plan is to actually just reinstall Chrome OS and un-partition the teeny-tiny hard drive. Apparently there's something called Crouton that will let you run Ubuntu on top of the Chrome OS. I've come to the conclusion that getting that Chromebook was a mistake. Not a huge one, but typing on it makes my right hand hurt and it's hard to look at. 

We also got to see working examples of javascript webapps. One of the TAs has made some games, the best of which is called Pro Set. Similar to set in that i t's a concentration/matching game, it's also a lot more difficult, hence the "Pro" part.

Since I was basically set with install day (and also because I'm pretty sure that my install is the easiest what with apt-get install life), I was pretty much by myself in lab. I talked with one of the TAs for a really long time about Hackbright and life in general. It was good. I don't have a Hackbright alum mentor, so this was a nice way to absorb information and good vibes from someone who graduated the program and found success.

Friday night was also board game night. Colby came down to Hackbright, and we all played a game of friendly taboo, a concentration game called Ricochet Robots, and then some crazy taboo/charade game. It was really fun to interact with people in a non-work setting. It's something I feel like I don't do enough. 


On Saturday we FINALLY found a place to live after Nov 1. Thank jebus crust. We'll be in Alameda until the end of February. Hopefully by then, everyone will be employed and then we can focus on where we'll be living more permanently. 

On Sunday morning, I went to a Ladies Tech Brunch at some superfancy high rise apartment in the Financial District. It was nice, but there were a lot of people, and it was definitely good for networking that I just wasn't in the right frame of mind to pursue. I did meet a couple people that I'd like to keep in touch with, though, and I think it encouraged me to go to a PyLadies SF meetup when I can. After that, another HBer and I went to La Boheme Cafe in the Mission to meet up with a bunch of HBers + a HB instructor who were mostly just co-working. I love how accessible and friendly everyone, especially the instructors, are. Hackbright is shaping up into a good decision.

And my 10 second review of La Boheme Cafe:
I'm way too lazy to edit this. Pretend it's cropped.

  • great space to work
  • good, strong coffee
  • pretty good food, and they use zataar spice on their pitas so you know they must know something
  • will definitely return

17 October 2014

Hackbright Day 14: An Ode to GeoCities, erm... I mean JavaScript

We learned about javascript today. Yes, that javascript that let you have the greatest websites the 90s could produce:

click on the link for awesome. dooooooooooo it.
This website is still active and more fabulous than you could possibly imagine.


If you've been keeping track, that makes the new language count up to 4 this week: sql, html, css, and javascript. Not to mention that we just started with flask too.

Things to note about javascript
{
it was written in 10 days;
it has some weird quirks, like === is strictly equal and 19=="19", which is not strictly equal;
it uses curly braces and semi-colons; similar to C; 
I may have had horrible flashbacks to CSE 231 again when they showed us how for loops work;
you need to use parentheses around the conditional statements in your if statements;
the javascript "equivalent" of a python dictionary is called an object; 
     objects behave an awful lot like python classes;
}
I think that I'll end up using it in combination with probably flask, possibly django and whatever horrible amount of CSS and HTML I'll need to put together my project.

And if you're feeling nostalgic about the before times filled with the flashing, spastic wonder that was geocities, One Terabyte of Kilobyte Age is an amazing repository .

15 October 2014

Hackbright Day 13: Exactly the types of things you would think you'd do on a day 13

Today was a day with no cake, but lots of HTML and CSS.

I much prefer cake.

We saw how HTML and CSS worked together in the morning lecture, got a series of 12 drills to complete of varying difficulty, and then had another small lecture in the afternoon about CSS and then had another lecture on SQL, whereupon we were shown "Little Bobby Tables". This is a very pro-XKCD environment, which is a very good thing.

One of the instructors showed us this AND IT IS SO TRUE.

After spending today on things that are typically deemed "front end", I've decided that I much prefer back end engineering. I can't even describe how much I was craving an equation. I would have even taken list slicing! I found the HTML/CSS to be tedious, and it was even less interesting today than yesterday because at least yesterday we were doing things through Python with Flask. Fortunately, my partner was patient through my complaints. I think I probably owe her a six pack after all my griping.

A few days ago, I gave a short tech talk on cat, head, tail, and grep. I didn't have slides because it was supposed to be a 5-10 minute talk, so I just got up with a terminal and went at it. It was probably super not clear for most everyone, so I took screen shots of me playing around in the terminal and now I'm working on a page that has the pictures and explanations because I hate myself. JKLOL. Mostly it's because I need to practice HTML and CSS.


Hackbright Day 12: Flask, HTML, and Mentor Night (and also cake)

Today we used the SQL databases we had created in order to get a better understanding of Flask and HTML. I am probably the only person my age who doesn't know HTML. My fleeting experience has been trying to make this blog look less crappy, and clearly I gave up. Flask is a web framework in python. This means that it helps python programmers set up web applications. Plainly, Flask allows for a much easier time building websites. We used our SQL databases from yesterday within jinja (or maybe it was HTML??) pages and then created a locally-hosted website. It was sort of functional and we didn't finish it.

Two more people in Hackbright had birthdays, so we also had a break for cake:



And then there was pie!



I did not take part in either of these and my blood sugar/hemoglobin A1C level thank me.

Later that evening, we were matched with our mentors. We each have three, and I was lucky enough to meet all of mine. They all seem really cool. One of them used to work for Google and the other two work on iOS development. We're supposed to meet with each mentor for an hour a week, so I'm definitely looking forward to talking with each of them and getting a feel for what it's like out there and how to get a job.

13 October 2014

Hackbright Day 11: The TL;DR version => I am brain dead and we talked about SQL

Today we talked about SQL. I've had some experience with SQL and it was mostly me being super confused about it because I had no idea what was going on, but I could poke around with my queries to get the data I wanted. And then I stopped thinking about SQL because I used the output for my plots and tables, without needing to look at the query syntax again. While a similar usage was brought up in class today, it was advised that we use SQL in much better ways than I have in the past. I completely agree that people should actually use SQL instead of faking it the way I did. Oops.

So we learned how to create a table within a database, insert into the database, and then manipulate how the data from the table was displayed. This was accomplished by using the commands select, where, group by, and distinct. We also learned how to join tables. And if I ever get super untired I will come back to this and write all of it down. In the meantime, if you're interested in SQL, you should try SQL Zoo. SQL Zoo contains interactive tutorials on how to use all of those aforementioned SQL commands and then some. I started going through the tutorials awhile ago, but was reacquainted with them today. 


I gave a short tech talk on cat, head, tail, and grep. It was probably not at all clear about what I was trying to get across. I think everyone got confused when I piped everything to some other command and then played with the output. The good thing is that I'm not going to be threatened with getting kicked out of Hackbright for a bad presentation because, as I keep having to tell myself, Hackbright is not grad school.


I had my weekly one-on-one with my advisor, who is super amazingly awesome. He helped to allay my fears that the market is saturated for junior developers and that having zero real jobs would mean that everyone ends up dead in a ditch. AND HE LOVES EMACS TOO. I really enjoy the high level of concern that Hackbright has for our well being. In fact, when I tweeted that I was having hand pain, one of the instructors ended up seeing it and showed me how to stretch out my hand so that I didn't hurt it more and to stop using my thumb on the trackpad, which is apparently a really direct way to injure yourself.

And I am super tired. We had cake today because it was one of the instructors' birthdays (coincidentally my advisor). We had cupcakes on Friday because it was one of the other instructors' birthdays then (the one with the stretches, actually). I very much enjoy the fact that Hackbright is a pro-cake institution. 

12 October 2014

San Francisco Things: Brooks Park

There's a little park called Brooks Park near our Airbnb. I've never explored it because it's usually dark by the time I get home and it's up a super steep hill and I have the "opportunity" to climb many hills every. single. day. Colby finally convinced me to go and see it because it was "cool".

When you finally climb to the top, there's this crazy ridiculously amazing view of the ocean and San Francisco:

Admittedly, the sun is out of control in that picture.

And I have more pictures and stories, but my hand hurts from using a trackpad incorrectly, I think. Thus, this will have to wait for another day to be complete.