Tuesday, April 2, 2013

NYC

Wow, I don't even know where to start. So much has happened in the last two days that it's going to be impossible to get it all down, but I'll do my best to summarize the main points. Needless to say, this is going to be a bit of a long entry - apologies in advance.

First of all, I just want to say that I have the best sister in the entire world. She uncomplainingly spent a warm, sunny day indoors working on coding with me for 21 hours straight, and even longer in total.

With that out of the way, I'll get to what we managed during that time. In a previous entry, I mentioned that I was only learning Python instead of all the languages I intended to learn. Completely null and void now. I can now say that I've successfully dabbled in Python, CSS, JavaScript, HTML, and MySQL. Yeah, I'm pretty sure I've learned more in the past two days than I have in the entire first phase of my project. I guess learning from a book really doesn't work for me, and I just need to get out and do it.

We decided that since I couldn't stay very long, it would be best just to get all the logic of the program done, and not worry about layout or catching errors or anything like that. All of that is stuff that I can do on my own without too much trouble, and it will probably take a long time anyways. So, we started off by creating a login screen. The screen doesn't contain too much, just gives you the option to login with a username and password or create a new account. Then, once you log in go to a new screen where you have the option to create a new game if there isn't one going on currently, or to join a game if there is one. The person who creates the game is automatically the judge, and once everyone who has joined the game chooses a red card (these will become "unicorn" cards once we get the drawings done), the judge gets to click on their favorite. That player gets a point, the next player to have joined becomes the judge, and everyone automatically gets a new unicorn card.

This all sounds pretty basic - it works like Apples to Apples, big surprise! However, it took ages to get this done, and it was pretty frustrating. Most errors were silly things and really easy to fix, but then some were super hard to find, especially as night turned to morning, since we were so exhausted by that point.  Sometimes variables weren't what we thought they were, or types didn't match up. At one point, an entire section of our code kept getting skipped, and we spent a good 20 minutes trying to figure out why. It turned out that we were comparing an integer to a string, so they came out as not equal, but we couldn't tell because they both printed out as "7". Another frustrating thing is uploading everything to the server. After every change you make, you have to "push" the code to the server,

which takes a good 3-4 minutes. Really annoying because you can't tell if the changed worked until that happened, and most times it takes at least a few changes to fix a problem.

Game screen
Login screen
In any case, we were able to work through all the problems we encountered, and get sososo much done. With my sister's help, I've reached a point where I can continue the rest of the work by myself - though it takes me a lot longer to fix errors by myself than it did with her. I'm working on creating a to-do list of everything I need to update or add or fix so that I don't forget, and that I never get lost on what I should be doing. Mostly now, though, I need to work on the layout and fixing anything that goes wrong. The game works if every player does the right thing, but it would be silly to expect that to always happen. Accidents always happen, and I need to get the code to prepare for that. There's still so much for me to do, but I've gotten a great start.

No comments:

Post a Comment