Professors, like Internet Explorer, are notoriously slow to respond. I've been waiting for around a week for him to get back to me on whether or not the data I sent him is what he needs. While waiting, I decided to use my class time well, and learn a new language.
Javascript has been something that I've wanted to learn since Zoli showed me it. His effusive praise made it sound like the best language, period. So, over the summer, I completed a brief tutorial through Codecademy. However, I lacked a project to learn the language. I've always felt that knowing a language without having a project was like having a paperweight. Sure, its nice, but its completely useless.
I got my inspiration for the project from Etienne, who had been making Javascript games since last year. I asked him how he got started, and he said Snake. So I started trying that out. However, I quickly grew disenchanted with the idea. When I heard that the GameHost team needed a game, I decided to try making Tic-Tac-Toe. It was perfect. A simple game, easy to code, and mildly interesting.
I started by drawing nine squares on the page. Whenever someone clicked somewhere, the code would check whether or not the click was in a box. If it was, it colored the box and marked it as filled. Then, it would change the fill color, so that the next click would color the box differently.
I ended up with a nice visual representation of a tic-tac-toe game. It doesn't calculate win conditions yet, and I need to use more objects in my code. Here are some ideas for moving forwards--make a class that represents a box, then create functions inside that class. The first function checks whether or not a point is inside the box, another colors it, etc. Then, to get the tic-tac-toe grid, we need a 2D array of square objects.
The only problem is that today, I got an email from my professor today, giving us ideas to work forwards on. Rest in pieces, Tic-Tac-Toe game. I'll get back to you someday.
Friday, September 12, 2014
Tuesday, September 2, 2014
Independent Studies
It's a little frightening to start Independent Study. Instead of having assignments spoon fed to me, I have to have one assignment and focus on it throughout the year. For me, this will be difficult. I like to knock out entire assignments at once, to finish coding in sitting. Unfortunately, an Independent Study class does not work that way. I'll need to have a way to stay focused on one assignment, even without guidance and prodding from a teacher. So here's the plan.
My project is an extension of some work I did over the summer with a graduate student, where we mapped death data from flu in the USA, and tried to predict where the flu would strike next using a variety of models. The first was simply picking providers by trying to maximize the R² value between the death data nationally and the model built using regional death data from certain providers. The goal was to then build different models and try to compare them to the R² model.
In this class, I'm planning on continuing to do that same work, using class time to write and finish code. Currently, I've been working on the function that analyzes the different networks and determines their effectiveness based on R² values. It's an interesting project, and one I hope to finish soon.
My project is an extension of some work I did over the summer with a graduate student, where we mapped death data from flu in the USA, and tried to predict where the flu would strike next using a variety of models. The first was simply picking providers by trying to maximize the R² value between the death data nationally and the model built using regional death data from certain providers. The goal was to then build different models and try to compare them to the R² model.
In this class, I'm planning on continuing to do that same work, using class time to write and finish code. Currently, I've been working on the function that analyzes the different networks and determines their effectiveness based on R² values. It's an interesting project, and one I hope to finish soon.
Subscribe to:
Posts (Atom)