Monday, July 1, 2013

Week Four - Projects!

Welcome back! This is going up within a few hours of Week Three (hopefully), so scroll down and read that first!

Okay! Now that you are caught up, we can begin! Our assignment for the weekend was to figure out what we were going to do for our first projects. I had a few ideas - I really wanted to make a point-and-click adventure game - but nothing too concrete. I ran the idea of a game by my partner, Isaac, though, and he thought it sounded cool, so we were set on that, although we still needed a storyline.

As a bit of a preface, we'd seen a few of the projects that the previous WDI class had done, and I think that impacted our class quite a bit. For some people, I think that they saw "Oh wow, that team made this awesome mapping app! I want to do that too!" For Isaac, he thought "That is a lot of hipster apps. I want to make a non-hipster app." For me, I just wanted to make a game ^^; I was actually a bit disappointed to be working with a partner, since I was worried it'd mean I wouldn't be able to make my adventure game, but luckily Isaac is awesome, and went along with my ridiculousness.

Monday

We did a bit of Rails review, and went over how to get Rails to work its magic, then had a CSS review lesson, since it had been a few weeks since we'd really done anything with CSS. If you don't remember, CSS is basically how you make websites "pretty".

In the afternoon, Isaac and I discussed our game some more, and decided that since we were going to be making all of the art ourselves, and neither of us was particularly skilled, we should make a children's game. Actually, I should first back up a bit, and explain. So, I already mentioned that we were going to make a point-and-click adventure, right? But you might not know what that means! Essentially, the user is presented with a first-person view of a static room, and they click on various items and characters in the room to interact with them. So you might click on a door and get a message like "The door is locked..." But that's the only door! How can you proceed in the game! Maybe you click on the desk next, and find a key. Then you can click on the door again, and use the key to unlock it. Simple enough, right? This style of game seemed best-suited to our abilities, since it doesn't need AI, animated graphics, hit detection, or anything super complicated, and changing rooms can be done through a web link. So, we knew we wanted to make a children's adventure game - what was the next step? Well, adventure games are often mysteries, filled with puzzles, and are fairly story-driven. Our brilliant storyline was as follows:

Today is your birthday, and your best friend has baked you a wonderful birthday cake! Isn't she the best? But wait! The cake has vanished! Who could have stolen it! And thus the search for the missing cake begins...

It isn't Shakespeare, but I think that is a reasonable plot for a kid's story! As for the characters, I decided to use some characters that I'd initially created with a friend, back when I was living in Japan. Meet Nasu-kun (he is an eggplant):

And his friend Tomato-chan:

Isaac and I spent most of the day fleshing out the story, and had (what we thought was) a pretty good idea of how we wanted our game to be set up code-wise. Isaac was worried the game would be a bit too simple, so we decided to add in some trivia questions that we'd randomly generate from content that we scraped off of Wikipedia or some similar website. An example would be a bird that asks you geography questions (because birds fly around and are thus quite worldly!), which you'll need to answer correctly before he'll give you a hint on how to proceed. Another character was a lazy housecat that slept all day, and would ask you movie trivia questions (that we would get from IMDB) before helping you in your quest to reclaim your stolen cake. Considering it's your birthday, these characters are kind of jerks, actually!

Tuesday

Today we covered validation, and adding "admin" privileges to users. Previously, anyone could add/edit/delete items on our websites, but this would make it so that only specified users would be able to d that. We also covered SCSS, which is another way of writing CSS, but gives you a bit more functionality. Finally, we covered Foundation, which is a set of premade styling code similar to Twitter Bootstrap, but a bit less overbearing (it can be hard to get Bootstrap to do things it doesn't want to).

In the afternoon, Isaac and I started drawing our characters (it is possible this was actually done on Monday and I'm remembering wrong, but whatever) and rooms out. We used a free drawing program called Inkscape - I've only ever made things with MSPaint, so learning how to use Inkscape was a bit frustrating, but once I got the hang of it, it was actually great, since it let me copy, layer, and rotate images, which was basically exactly what I needed. We were going to have a background, and then place all of the room's items on top of the background, and each item would be a clickable object. If they were all one image, this would have been a lot harder to do. Amusingly, lots of my classmates saw us working and were like "Oh wow! Your project looks great!", but we hadn't coded a single line at that point. I went home and created the first room (the kitchen), an additional character (a mushroom), and wrote out most of the script for our game, while Isaac got to work on creating a way to log in to our game via Facebook.

Wednesday

We had a talk in the morning about the importance of collaboration in coding. Previously, I guess it was pretty common for companies to want to hire these awesome coders that could just sit down and power out a project all on their own, but increasingly people that can work well in teams, even if they're a bit less skilled, have become more popular. So, it is important to be able to work with partners, which was why we were doing pair projects rather than independent ones. While I think I'd have preferred an independent project, just as a way to reinforce what I'd learned (rather than being able to ask a partner when I was stuck), Isaac was a great person to work with, and I can appreciate our teachers wanting to get us comfortable with working in groups.

The main activity for the day was a debugging exercise that I actually really appreciated. We were given a program with tons of errors, and we had to fix them all. It helped us grow more familiar with debugging common errors, and for me at least, went a long way in helping me figure out where Rails put different folders, how to navigate them all, and how everything worked together. Since the previous week had been a bit more abstract, this really helped to give a lot of those themes a more concrete form.

In the afternoon, Isaac and I set up our database tables and started to get the first room set up. Honestly, I don't remember too much of what happened today, but I'm fairly certain I had the room set up by the end of the day, and the ability to click on items and get messages to display. I could be jumping ahead by a day, though.

Thursday

I don't remember what happened in class at all today. I am fairly certain that by the time I went to sleep, I definitely had the layout of the first room set up, along with the ability to click on items, and that the text window displayed in the proper place (something that I had an abnormally difficult time doing because I am not so great with CSS. I basically had to change one word, but I couldn't figure out which one it was...)

Friday, Saturday, Sunday

All three of these days were focused on getting the first room up and running (spoiler: our game was not completed). I found a neat video game font on Google Fonts that I added to the game, and made it so that when a text window was open, you couldn't click on any other items until you had closed the first window, preventing people from opening multiple windows at one time (and also how all of the games I've played have always worked). I also wrote a small function that would read in a text file of all of the dialogue and assign it to the proper characters. Around this time I realized that I needed separate tables to keep track of conversations and the individual lines of dialogue, so I had to add all of that in, and set up all of those relationships too. Eventually, I managed to get character dialogue to display in boxes identical to the item boxes, and to have a picture of the character speaking appear on screen at the same time. This probably all sounds really easy (and I'm sure it is), but MAN! That was super hard! Also, this was all in JavaScript, which we'd barely covered up to this point in class. Fortunately, my friend Erek was around to give me tips on what I needed to do. One conversation went something like this:

Erek: Tell me in English exactly what you're trying to do.

Me: I want the character image associated with the line of dialogue to appear behind the text box, and go away when you click to move to the next line of dialogue, and be replaced by the next character.

Erek: Okay, now write that.

Me: *writes*

Erek: Okay, that's completely wrong. But you have the idea, at least. Read this documentation and figure out how to write it correctly now.

It took a while, but eventually I got there! Finally, late Sunday night, I had a mostly-working room! As this was going on, Isaac had created the second room, and had written the code so that each person would be able to start a brand new game. Without this code, any changes I made in my game would also be apparent in your game, and that can't happen! He also got it (mostly) working on Heroku, an online hosting site, but it still isn't displaying some stuff properly yet, so no link for you guys, sorry. Unfortunately, we weren't able to get the link from one room to the next working either, so despite having two different rooms, we could only get there by typing in the URL. Around 3AM I tried merging my code with Isaac's, and got a bunch of errors, and decided to just call it quits, since I hadn't slept much the last few days.

Monday

I'm going to group Monday of Week Five together with Week Four, since it was presentation day. I managed to get all of the merging conflicts cleaned up before class, so we decided to present using my computer. We were actually racing to add a few things and clean up some code in between presentations, so while people were setting up, Isaac and I would flip our laptops open and frantically start coding again.

My classmates had some pretty neat apps - there was one that located and rated nearby public bathrooms, a social networking site that was viewable on iPhones (and Androids, to an extent), and a reading/dictionary website that would highlight key vocabulary words and display the definition when clicked on. These are all more complicated than my brief summaries, and there were of course plenty of other projects that I'm not listing off right now, but that were still neat.

Isaac and I presented towards the end of the day, and I think that everyone was super exhausted, so even though people had neat projects, they were a bit tired while presenting them, and so I wanted to channel a ton of energy into our presentation and wake everyone up. Also I was just super excited to tell everyone about our sweet game. We started with a brief discussion of what our project was, and where we wanted to go with it, despite not coming anywhere close to finishing it (it was a typical E3 demo, basically). Then we ran through how our databases were constructed, and how the rooms were set up, and then we quickly demoed the game. I read the "Oh no! Your cake has been stolen!" conversation in an overly dramatic way, which I think the class got a kick out of, and everyone loved the art (of course :P). Then we talked about how we got the text boxes to work and I walked the class through the code in what was hopefully an easy-to-follow manner. Considering how much trouble I had setting them up and making them work, explaining it after-the-fact actually was really easy, and made complete sense! As we were going back to our seats, people still had lots of questions for us (mostly about how cute the graphics were... ^^;). All in all, it felt like everyone really liked our game and presentation, which was awesome. It was really different from a typical Rails app, and honestly we probably didn't even need to use Rails, since it made a ton of extra stuff that we didn't even touch, but I had a great time making it, and I learned a lot. After everyone presented, we had pizza and then demoed our projects to the new June Web Dev class. I am not sure when Isaac and I will get a chance to go back to our game, but I know we both want to finish it. That birthday cake still needs finding!

Sunday, June 30, 2013

Week Three

Welcome back! I have been gone for a while; sorry! I wrote Week Two's blog towards the end of Week Three, and then that weekend plus all of Week Four was devoted to our first projects, and then Week Five was mostly recovering from that, so I haven't had much free time lately! So, this post might be really long! Let's see how much I remember...

Monday

As I mentioned in the previous post (I was going to say last week, but it was actually ages and ages ago), we covered a lot of stuff this week. I think there were some more abstract concepts covered, and there was less homework than the previous two weeks, which I think combined to make it a bit harder to comprehend everything that was going on. I also had a pretty rough Monday night (I didn't realize until I was going to shower around 1AM that I had run out of clothes, and had to do laundry...) and the tiredness from staying up until 4AM or whatever carried through the whole week. But anyway! On Monday we covered how the different "parts" of a Rails app work together. Previously, we'd kept most of our code to one or two individual files, but as our programs get more complicated, we want to start compartmentalizing code - basically we can group similarly-functioning pieces of code together for easier readability. It also makes it easier to spot problems, and helps to isolate bugs.

Our assignment for the day was to write a blogging program, as some additional database practice. Basically we needed to make separate tables that would store blog articles, comments, and authors/users. So if I can make my own blog, why am I still using blogger? Well, I wouldn't want to go and change the address on you guys in the middle of my class!

Tuesday

As I already mentioned, I ended up having a rough Monday night thanks to stupidly not noticing that I'd run out of clothing, so I was super tired during class today. We reviewed the blog program, and then learned how Rails can magically make all of those pages that we had spent so many hours creating. This is a slight exaggeration, but we can basically write "rails create blog" and poof, done. I actually nodded off for a few minutes during this part of class, so I missed everyone ELSE flipping out, and then had my *own* "WHAT IS THIS WITCHCRAFT" moment when I woke up. We also discussed routes, which really shouldn't be that complicated (I think) but my head was so foggy that I didn't really have a solid grasp on them until pretty recently. Routes are basically how URLs are made, which is fairly simple, but we learned a few ways to rename them inside of the program, and that confused me. Why are we suddenly writing new_blog_path instead of article/new? And why is it sometimes /articles/new? And what is going on with articles#new?? Who knows! So basically, kids, don't sleep in class...

Wednesday

We covered a bunch of different topics today - more on routing, partials (basically a way to further compartmentalize your code), assets (an area created by Rails where you should store images and things), CoffeeScript, which is another way of writing JavaScript (we briefly touched on it; I'm not sure if we'll go back to it in the future, or just stick to JS though), and how to create sessions, which basically give us the ability to create login verifications. Whew! That was a lot of stuff! And I actually forgot something! Flash notices! They are sort of like little alerts that will pop up and tell you things like "Your password is incorrect." (in the context of the day's lesson). Anyway, there was a ton of stuff covered today, and I honestly have no idea how to write a login, so that is something I really need to get around to learning/relearning, although Rails is magic and I can find some login code that someone else wrote and just it install it into my program and boom done. BUT, I would like to know how to write a basic login, just for personal study reasons. So I will have to get on that at some point.

Thursday

So this past Thursday (real time) we had a homework assignment that required us to write a search function, and I was sure we had never written one before. As it turns out, we learned one today (blogtime)! So yeah, when I say that 1) I was really out of it this week, and 2) we cover a lot of stuff really quickly, I am not lying...

We also covered JSON, which is a commonly used way of displaying lots of information, since computers can read it easily, and it isn't *horrible* to read as a human. We used a "scraping" gem called Nokogiri that let us pull all of the information from a website and store it as a JSON file, and then we were able to open that and parse it for the specific information we wanted. As a concrete example, we had created a recipe website earlier in the week that would let people post recipes they liked. We used Nokogiri to scrape a recipe from a recipe website, then wrote a program that would post the ingredients and steps to our recipe website (and leave off the useless extra stuff). We also did a bit of work with Twilio, and set up a simple bit of code that would send us a text message to alert us that a recipe had been posted on our website. All in all some pretty neat stuff. The final thing of the day was covering seeding, which will automatically put information into our database (rather than having to go into our website and manually add it). I more or less forgot about seeding, but it ended up being super vital to my first project, which I'll get to in a bit (hopefully!).

Friday

Today we were given partners for our first assignment. We were given pretty free rein - basically make whatever we wanted. We then spent most of the day covering things that would help us in working with partners - making "branches" on github, for example. Github is basically an online code repository - I can post my code there, and someone else can download it and work on the same program, and then upload their changes to the repository. By making "branches" they can make changes to the code and upload it for me to look at, but it will be in a branch file rather than in the original file. That way, if I don't like the changes, I don't have to add them. We also covered environment variables, which are basically a way to store information on your computer rather than on the internet - it prevents people from just looking at our website's code and getting information we don't want them to have (phone numbers, for example). Our only assignment for the weekend was to come up with a project idea, and neither I nor my partner, Isaac, really had anything in mind at this point.

Well! That about wraps up Week Three! I will be back in a bit (hopefully) with Week Four! I felt a bit lost this week, and was stressed out about some random stuff as I'd mentioned in the Week Two post, but once Week Four rolled around, I was so busy with my project that I didn't really have much time to feel stressed about anything else! Our project was pretty neat though, so I'll see you back here soon with the summary of how that went!

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!

Monday, June 3, 2013

Week One: Orientation, Intro to HTML, CSS, and Ruby

Welcome back! I'm a bit late writing this (since I said I'd aim for every Saturday) but hopefully you can forgive me. Today, I'm going to talk about my first week of class, and the programs we made.

Monday

Monday evening was orientation. Everyone gathered around for pizza and drinks, and chatted for about thirty minutes. A class website list had been sent out a few weeks prior, with an introduction thread, but for whatever reason most of my classmates hadn't posted in it (only nine or so), so most of these people were brand new to me. There were a surprising number of people that were from the east coast, and even another person from New Jersey (though he moved to SF about three years ago). After the eat-and-greet, we all sat down for a short presentation about the program, an introduction of the teachers, and then we all introduced ourselves, talked about our goals, and shared what our guilty pleasure was (mine is eating a pint of ice cream without realizing it - this happens way more than it probably should). We then had an "Installfest" - basically, everyone installed a bunch of programs on their computers so that we'd be ready to go on Tuesday.

Tuesday

Well, obviously Tuesday morning about half the class had errors running various things (myself included) so we spent about two hours getting everything *properly* installed, and then class finally started. I wasn't really sure what to expect - some of the pre work had been pretty difficult and/or hard to understand, and if we jumped in from where the pre work had left off, I think I (and a lot of others) would have had a rough first few days. Fortunately, the class started off basically from zero, and started us off with some basic command line and github commands, then moved into a basic overview of HTML, before letting us loose shortly before lunch to work on a profile website. After lunch, we were asked to add in as much CSS as we remembered, and spent the rest of the day tweaking our websites.

Wednesday

Our instructor was out sick today - Monday and Tuesday he'd had a throat cold, and I guess he finally lost his voice, so the two assistant lecturers took over for the day. We spent the morning going over a bit more HTML and CSS, and then in the afternoon went over some basic Ruby stuff (again starting will really basic stuff). I noticed that a few people seemed a bit unhappy with the slow pace of the first two days, but personally I didn't mind it, since I think that reviewing these basic concepts is good and even though I personally was okay with most/all of what was being covered, I didn't mind having it drilled in one more time. Besides, it wasn't like we couldn't also work on our website, or any programs from the pre work, while listening to what was being said, so I didn't think it was a waste of time or anything. I also expected that the class would ramp up pretty quickly, and two "easy" days out of twelve weeks isn't such a huge loss. Our homework problem was to build a calculator program that (for whatever reason) offered two settings: Basic (addition, subtraction, multiplication, division) and Advanced (exponents, square roots). I was really proud of how "clean" my program felt when I was done with it, but I showed it to Erek and he thought basically the opposite. Whoops. I believe his friend said, "I have never seen so many nested methods in my life." Oh well! Erek also left a bunch of comments on my calculator program, so I intend to go back and work on it some more when I get a chance (I'd hoped to get to it this weekend, but ended up being a bit too busy), but sometime this week or next weekend, I'll need to be more vigilant.

Thursday

Today was all Ruby, and the pace picked up quite a bit. We spent most of the day covering Classes, as well as making our first multi-file program. The main assignment of the day was to work with a partner to develop an animal shelter app that would allow the user to adopt pets and give pets up for adoption, and to search for a specific type of pet. My partner, Tom, and I were able to map out how we wanted to write the program pretty quickly, and wrote most of the smaller files quickly, but then got stuck for a ridiculously long time on some pretty simple things. I was pretty tired (going to sleep super late for whatever reason the night before) and my brain started shutting down around 5:30. We stayed after class to keep working, and finally called it a day around 8, but I don't think I really contributed anything at all during that time. I got home, had dinner, and slowly recharged, and then got back to work, and was able to figure everything out. Amy also had a great idea of adding ASCII art animals to give the program a visual aspect, which made it a lot cuter. She found some pretty great pictures, so in the end I had a pretty unstandard animal shelter that allowed you to adopt not only cats and dogs, but also giraffes and dinosaurs. Of course, I didn't implement this until about 3 AM, so I headed into Friday with about four hours of sleep (again...why...).

This was the roughest day for me, but we did have an ice cream social during lunch, which was pretty great!

Friday

Sinatra was introduced today - Sinatra is a web framework similar to Rails (Ruby on Rails is what we're ultimately moving towards learning to work with, and is what most bootcamps teach you), but is much simpler. I might be explaining this wrongly, but basically, we can write code in a bunch of different languages, and then Sinatra combines it all together, so that I can have Ruby programs running in the background on my website.

The concept of Ruby gems was also introduced. Gems are basically programs that other people have written, and you can install them and then call them in the program that you are writing. As an example, we installed an Image Search gem, and then used that to search Google Images in our program. So what was this program?

Well, it is a bit more difficult to explain than the previous programs, since this one was pretty specifically geared towards familiarizing us with Sinatra and gems, but it was basically a website with three different search functions (each powered by a different gem). You can search for information on a specific stock, you can search IMDB for information on a movie, or you can run an image search. This one was pretty fun to write, even if the different parts didn't "flow" together smoothly.

Reflections

After my first week, I'm really enjoying programming. There are occasionally frustrating parts, but when you finally figure out what was wrong, and get your program to work properly, it is pretty satisfying. Unless it's something dumb, like adding an 's' to a variable somewhere, and it taking you two hours to notice. Or when you save a duplicate file, and then make changes in it, and can't figure out why none of your changes are showing up, only to realize you're still running the original file. Ugh. But! Aside from those times, it's been fun!

I should go now, but I hope you've enjoyed reading my summary of my first week!

Saturday, May 25, 2013

Applying, Interviews, and Prework

As I mentioned in my previous post, the decision to apply to coding bootcamps was fairly last-minute. Rather than talk about that, since everyone will have different thresholds for where they feel comfortable taking the plunge, I'll talk about applying itself.

Applying is a fairly simple process. First there is standard stuff like your name, email address, possibly a resume. Then there will be a few short-answer questions. They'll vary from program to program, but are often things like, "Why do you want to learn how to program?", "Why are you applying to this course?", "Tell us about yourself." and other such questions aimed at presenting a more full picture of you. One of the more fun questions that I saw was "Show us something awesome on the Internet".

Within a few days, someone at the school should reach out to you and arrange an interview. In preparation for the interview, it's likely you'll be asked to do a few basic online coding courses, most likely from Codecademy. The tutorials are pretty simple, and will start you from zero, so even if you have absolutely no programming knowledge, you should be fine. In total it won't take more than four hours, and since this is what you wanted to learn anyway, it should be pretty fun!

During the interview, you'll be asked about your background, why you want to study programming - pretty standard stuff. Then you'll be asked a few questions about whatever coding language you were asked to study in preparation. This will be pretty general or person-specific stuff, like what you liked or didn't like about the language, if there was anything you had difficulty with, and so on. You'll probably also be asked how you'd go about making a simple program. You won't have to actually write it - just tell them things like "I'd probably need to loop a question asking the user for information until they responded as requested" or whatever. Hopefully you don't have too much trouble with this! They know what you had to study on Codecademy, so you won't need any more knowledge than that. If you're worried, just take a deep breath and break the task down into the simplest pieces you can, and explain how you'd do that. You're basically going to be walking them through your thought process, so thinking aloud is fine (and probably encouraged). You'll also have a chance to ask them questions, so if you want to know what makes their school a better choice than others, or what a typical day is like, or if they have a free coffee machine, now is your chance!

So, let's say you hear back a few days later and you got in! What next? Next is preparing for the class. It is (apparently) completely fine if you come in knowing nothing, but the pre work is aimed at giving you a basic understanding of programming, and the languages you'll be learning in general. I was initially planning on writing about each week of pre work, but between moving, life, and trying to do my 40 hours of pre work, I have been a bit busy, sorry! In brief, though, here are some things that I was asked to study

  • Week One
    • Internet basics - how does it work, common terms
    • Command Line - communicating directly with your computer
    • Typing - learn where all those crazy programing symbols are!
  • Week Two
    • HTML Basics - learn how to make a website!
    • CSS Basics - now make that website pretty!
  • Week Three
    • Ruby - this is the first language we'll be working with. Learn the basics!
    • Git - version control! Make sure that anything lost isn't lost forever!

Before closing, here is a screenshot of a website that I made during week two! Not too shabby, if I do say so myself. It is super simple, and the design was based off of something else that I'd made, but it looks pretty nice, right? Right? :D

The program begins on Tuesday, so I'll try to write an update every Saturday going forward. Up next! The first week of class!

By the way, it's unlikely anyone can tell, but I wrote this in HTML rather than using the standard blog "Compose" editor. Wow! Baby steps ^_^;

Tuesday, May 7, 2013

A Revival - Starting From Zero!

Hello again! If you're unfamiliar with this blog, I used to write about my various adventures while living in Tokyo. Since moving back to the US it has basically lain dormant, but as I'm about to start a new adventure, now is the perfect time to resurrect it!

Recently, I was accepted into General Assembly's Web Development Immersive program - a twelve-week coding bootcamp that should, upon conclusion, prepare me for either an internship or position as a junior web developer. More importantly, I should be able to build websites, apps - basically anything you see online (within reason!), I should be able to make, or at least have a reasonable idea of how it was made, even if I'm personally not skilled enough to do it myself. If you'd like to know more about the program, here is the link: https://generalassemb.ly/education/web-development-immersive/san-francisco

I decided to chronicle my experience going through one of these bootcamps for a few reasons. These are a relatively new premise, and on the surface, they sound amazing! Spend twelve weeks learning to code, and then when you come out you can land a great job! The idea is that while you might learn more *stuff* getting a four-year Computer Science degree, the percentage of what you've learned that will have on-the-job applications is much smaller. Apprenticeships and vocational schools have been mostly pushed out by the "need" for a college degree, but these programs are founded on the idea that you can condense the "important" parts of that learning into a much smaller time frame, and are ideal for people that, for one reason or another, don't want to go back and get another four-year degree. Detractors will claim that there is no way that you can be ready after a mere twelve weeks, and there is a substantial investment required (a $10,000 tuition cost, give or take), not to mention that by all accounts they are incredibly taxing, so there are certainly facets that will give you pause before signing up. Obviously, I am sold on the premise, but if you aren't, dear reader, then you can follow along with my journey, and we will see where we end up!

I am going to try my hardest, but if the going gets tough, hopefully the fact that everyone is here following my progress and cheering me on will keep me going, and prevent me from falling into a depression spiral (I don't actually expect this to happen, but hey, safety net!).

So my goals from this blog are - show what it's like to take one of these courses, leech encouragement from my followers, and prove that I can become an awesome web developer!

As for how I ended up here - programming is something I've wanted to learn since high school, but I took a different route in college (History and East Asian Studies double major! The job offers are not exactly rolling in...), and though I've made a number of start/stop attempts to teach myself, it is just damn hard! It isn't just that there's a lack of motivation, or that there are no good tutorials (there are), or that you don't have good direction, or anyone to turn to for assistance, or the fact that most people really just have a *life* that they want to live in their time after work - it is all of them at once, which unfortunately makes it incredibly easy to become sidetracked (as anyone who has ever tried to self-study anything can tell you).

Why programming? I love games, I love solving puzzles, the money is good, and basically every single one of my friends is doing something computer-related. Quite honestly, the last one (about the friends) is probably the biggest factor. I know almost nothing about programming, or computers! I took a computer science class in high school, and learned some basic C++, but that barely counts! But I'm a huge nerd, my friends are all huge nerds, and if we like all of the same hobbies, we'd presumably like the same jobs as well! Flawless logic, I know. I might as well be a Vulcan.

So there you go! I have signed up for a coding bootcamp with essentially no prior coding knowledge! We will see how it turns out! If you're in a similar boat (no prior knowledge, considering signing up for one), hopefully this blog (when complete) can help you decide!

This blog is currently being written with blogspot's "compose" feature, so I am not even using basic HTML at the moment (as you no doubt could tell, if you are familiar with such things). It should be pretty interesting to track my progress!

The next entry will discuss the application process and preparation for the course!

Friday, March 8, 2013

The Joys of Standby

Since moving back to the US, I’ve visited Japan three times. I’m able to do this on my fairly meager salary for a number of reasons, but a pretty big one is the fact that I always fly standby. My aunt and uncle work for Delta airlines, and through them I’m able to get cheap standby tickets for about $600 – a normal ticket tends to run at least twice that.

If you’re unfamiliar with what a standby ticket is, it essentially means that you get on the plane as long as there are open seats after all of the regular-paying customers have boarded. Normally this isn’t a problem, and there are almost always seats open in business or first class, so for $600 you get a fully reclining chair to sleep in, food that is actually edible (and good, even), and all of the other amenities that are normally reserved for people of actual import. And let me say, once you’ve flown first class, it is hard to go back to traveling like a mere peasant, down in the cramped quarters of economy.

This sounds pretty excellent, right? Of course, there is that tiny catch – the part about only getting on the plane as long as there are open seats. Technically, this can make travel a bit tricky – what happens if you request certain days off from work, but don’t get on your return flight? Then you need to request another day (or more) at the last second, you need to pay for an additional hotel night, or make multiple trips to and from the airport…it seems pretty stressful, right?

Well, it is. But I’d flown standby on around eight trips now, and had always gotten on my flights, and flown business or first class each time. Oh, I’ve had close calls. Once, I was let on mere minutes before departing, and only because I had no check-in luggage and was traveling alone (unlike the four other people ahead of me in the line). Over the summer I visited China with my sister, and we were literally the last two people to get on the plane. On the way back, the Chinese ticket agent refused to give me my boarding pass until I had been officially assigned a seat (usually you get a boarding pass outside security, and are given a seat assignment at the gate), so I had about 45 minutes to make it through a packed security line and ran all the way to the gate to make last call (after arriving at the airport almost three hours early). One of my more nerve-wracking close-calls was when I left late and got to the airport only thirty minutes before my flight, but convinced the ticket agent to give me my boarding pass anyway and ran though the airport to make it to my gate with about fifteen minutes to spare (another reason why carry-on luggage is the best).

I’ve gotten lucky quite a few times, and on my last trip, my luck finally ran out. I was only visiting Japan for a week, and though my flights looked completely clear when I bought my tickets, as the departure date approached, the open seats rapidly started disappearing. Normally, if you miss your flight, you can just ask to be bumped to the same flight the next day, but in this case, the following day’s flight was even tighter than my current flight, and since I was only going to be gone for a week, and you lose a day flying to Japan, I basically had to make this flight, or I’d need to cancel the whole trip. In the end, I made it by the skin or my teeth – second to last to board – but would be flying Economy. Unfortunate, but what can you do. I reached my seat, and it was an aisle seat (always good), and in the first row, so plenty of room to move around! Great!

…then the flight started, and I learned what the drawback to aisle seat, first row was. It turns out that every single person that walks up or down the aisle, without fail, will brush or bump into you. Additionally, the seat is magnetically charged so that it attracts the food carts, and they will hit your chair every time they pass as well. When you have had about six hours of sleep over two days, and want to do nothing more than sleep through your entire fourteen-hour flight, being woken up every twenty minutes throws a bit of a wrench in the plan. Being directly under an air conditioning vent also doesn’t help, and despite wrapping myself up in a scarf, winter jacket, and the provided Delta blanket (so that I looked like a plump, red, soon-to-hatch cocoon), I was still freezing for much of the flight.

But hey! I made it onto my flight, got a lot of (repeatedly interrupted) sleep, and was in Tokyo, so I can’t complain. I ran badly once, but that happens to everyone, right?

As it turns out, you can run worse!

When it came time to return to the US, the person ahead of me on the list was the only standby passenger to get on our flight from Tokyo to New York. Staying an extra day wasn’t really an option, as I was supposed to be at work on Tuesday, was almost out of money and didn’t particularly want to change/withdraw more, and my conveniently-located Tokyo friends were not in Tokyo at the moment, and paying for a hotel near the airport was unappealing. Additionally, the following day’s flight was even worse (once again) than our current flight had been, so staying an extra day basically made no sense.

We (myself and another passenger, Kean) were presented with a few different options – wait and see what tomorrow’s flight looked like, try to catch a flight from Tokyo’s other airport, or fly to Honolulu, and then purchase a new plane ticket with a non-Delta airline into JFK. Option 1 was no good, option 2 was ruled out when those flights were also completely packed, and option 3 didn’t work because who wants to buy another plane ticket? That completely defeats the purpose of flying standby! Fortunately, through some assistance from the lovely woman at the counter, we were able to arrange a series of flights (all on Delta, at no extra cost) – Tokyo to Honolulu, to Atlanta, to Newark – that would get us into New Jersey at 11 AM on Tuesday. I’d be able to catch a train directly down to Hamilton, and would only miss about half a day of work, so that was pretty good, all things considered. The major selling point for this particular flight path, though, was that we’d have a full day in Hawaii! I’ve never been to Hawaii before, so a “free” trip was awesome! Might as well make the best of a bad situation! The flight to Hawaii wasn’t even that full, and neither were any of the others, so it was pretty reasonable that we’d get first class the whole way.

First class to Honolulu! Not bad! I ate one meal, and slept wonderfully through the others, and arrived in Hawaii bright-eyed and ready to enjoy some sun! If you’ve never been to the airport in Honolulu, they don’t believe in glass or doors there. The weather is so perfect that there is no barrier between Nature and the ticket gates – you just stroll right in. There are some roofs to make sure rain doesn’t flood the place, but that’s about it. So there I am in my winter coat, sweater, and scarf, and it is probably about 70 degrees at 7 AM. We decide to double-check the status of our next flight and drop off our luggage before exploring, and it turns out that the airport doesn’t have a luggage room, which is a bit inconvenient – but you can call someone and he’ll come to the airport and pick your luggage up, then drive back when you want to leave. That all sounded a bit sketchy, but maybe that’s just how Hawaii rolls?

Deciding we’d sort out the luggage after checking on our flight, we made our way over to the ticket gates, where we were promptly informed that the Atlanta flight was already overbooked, AND another flight had been canceled and all of those passengers would be looking to get onto the Atlanta flight now, so it was basically double-overbooked, and there was absolutely no chance we were getting on. The next day was also bad. Our best shot at getting out of home in any reasonable amount of time was to take a flight to Los Angeles that was leaving in 45 minutes (and was actually offered to us originally in Tokyo, but we decided on this route since it gave us some time to enjoy Hawaii), and would then fly to JFK, landing at 12:45 AM Tuesday morning. We lamented our bad fortune, made our way back through security, and piled into a super-old plane so ancient it played movies via VCR (which was broken). While I can certainly understand that people get bored and want to talk, I just wanted to sleep, but unfortunately the college volleyball team next to me did not. It was a very long flight.

All long flights come to an end, though, and we landed in LAX, hurried once again to our next (and final!) airplane, which we had been assured was open, and we would have business class for. As it turned out, we missed on business yet again! We did at least get an open seat between us though, so we had slightly more room than normal. Having lived (slept) through three Mondays at this point, I couldn’t really sleep through another one, as much as I wanted to. In-flight movies cost money, so I alternated between reading until I got a headache, and sleeping about forty minutes at a time, and after repeating this process approximately infinity times, we touched down in JFK International Airport. Land! At long last!

But! My journey was not done… The trains weren’t running this late at night, so I couldn’t get home. Instead, my uncle picked me up and brought me to my grandmother’s, where I slept about three hours (somehow I was still exhausted, despite doing nothing but sleep on all of my flights), caught a subway into the city, then a train down to Hamilton, went home for a quick shower, brought my sister to a job interview, and got to work by 11:30. Final tally put me in transit for around 28 hours.

(And if you think that was painful, Kean had already missed flights coming from Singapore to Tokyo two days in a row before I met him in Narita)

In other words, flying standby is great!