Tuesday, 5 August 2014

CSSI Day 9: Google Seattle!

This morning, we were greeted by the shuttle slightly later than usual, to be taken to the other half of Google Seattle/Kirkland, the Seattle offices! On the other side of Lake Washington, the Seattle campus is in a more metropolitan area, but it is literally right along the shores of Lake Union. The differences in the two offices are subtle yet stark; they are both unmistakably "Google-y", pervaded by common features of a Google office, and yet each one has its own unique charms. The Seattle offices appear more homey and grungy, but in a very artsy way with each room tastefully decorated with nautical/marine themes.  
One of the two Google Seattle buildings.
After taking a quick tour around the building (a few more pictures hopefully coming soon), we set off to work learning App Engine, a tool that allows web applications to be published online. The setup of App Engine definitely took some getting used to, as it incorporates both HTML/CSS and Python, and it was sometimes hard to tell where one would go in relation to the other. Furthermore, we were introduced to .yaml files, which are used in App Engine to specify the paths of URLs based on HTTP request handlers (from the browser to the server).

After a day of learning the basics of App Engine doing practice exercises, I came up with an application that takes user input and generates random dice rolls. It may appear basic at first, but there are actually many components coming together in the background to make the application work. Perhaps the most difficult part of the code for me was implementing the images of dice faces in place of plain numbers; we didn't really learn how to link to static files through the host, so it took some research and help to figure out how to allow the host toh have access to the image files that I needed. You can check out the application at http://dice-rolls.appspot.com

Sample of dice roll app!
Furthermore, we worked on a prime factor calculator, which can either take in a number and determine whether or not it is a prime number, or list all the prime numbers up until a certain number. I will definitely be trying to work on this program some more tomorrow, as not all the components are yet complete. Creating all these projects with App Engine today, one of the things that amazes me is how the different programming languages and files come together to make interactive and functional web pages. Tomorrow we will continue even further into the many different components of App Engine; I can't wait to see what other variety of functions we will "unlock" as we learn to implement more actions in App Engine. It's been a wonderful first day at Google Seattle, and I am only looking forward to finding out what's next. 

Sunday, 3 August 2014

CSSI Day 8: Eating and Shopping Seattle

Today was a much more relaxed, go-at-your-own-pace day for us to decide what to do in the city. Don't get me wrong, I actually thoroughly enjoyed all the busy weekdays where we coded for hours per day; I find that when I set aside large blocks of time for specific tasks I am more productive, so I enjoy the blocks of time for classes. Nonetheless, the weekend break was well-needed, and after seeing the downtown regions yesterday it was really nice to go back.

We started off the day with a morning walk around the campus; we got to see the main fountain on campus yesterday, and today we saw a statue of George Washington (naturally, since it is the University of Washington after all). The walk was a good way to become awake and enjoy the fantastic weather.
George Washington monument
The Drumheller Fountain
Next, we made the most of the ORCA cards we were provided with and headed off to Pike Place Market by public transit; we wanted to try Pike Place Chowder, an extremely popular seafood restaurant that had too long of a line the day before. I had a Dungeness Crab Roll and their famous New England Clam Chowder, the two most popular items. Needless to say, the seafood was amazing.

Seafood fest!
Afterward, we walked around downtown for the afternoon, doing a bit of shopping; it was fun to explore some stores that are only available in the US. For dinner, I got to try gyros for the first time! It only reinforced my love of Greek food.
Awesome food was awesome.
To cap off the day, we settled down to watch The Internship back at the dorms, a hilarious movie about interning at Google. Tomorrow we head off to Google Seattle! This weekend has been fantastic but I'm ready to learn some more.

Saturday, 2 August 2014

CSSI Day 7: Seattle Saturday!

Today was a much-anticipated break from our week of learning, as we took in the sights that downtown Seattle had to offer. Our main planned events for the day were a "Ride the Ducks" tour and a scavenger hunt, but after taking a shuttle downtown we first had some free time to explore the city on our own. 

Our group decided to check out Pike Place Market first, one of Seattle's most diverse and culturally interesting attractions. Although I'd already been to the market last year, it was really nice to re-visit the place and experience the lively atmosphere once more. Pike Place Market houses a mecca of locally-grown produce and homemade foods, in addition to a wide variety of Seattle's finest seafood. Of course, the first ever Starbucks restaurant may be the most widely visited attraction there, there are plenty of fantastic things to see and taste, including mini cheesecakes, French macarons, infused oils and balsamic vinegars, and fruit ciders. As we made our way around the market, we caught a fish-throwing performance and some music by local street performers. As Seafair (a festival to celebrate Seattle at the "boating capital of the world") was happening this weekend, we watched as military planes soared over the skies, a perfect addition to Seattle's sights.

Posing in front of Pike Place Market!


 Wide assortment of food at the market.

The first ever Starbucks! 
Fresh dungeness crab!
After a few hours, we all met up to take a "Ride the Ducks" tour on a boat-shaped vehicle that turned into a boat in the water. The Duck took us around Seattle neighbourhoods as the captain explained a little bit of the city's history (and pointed out a million other Starbucks coffee shops). The highlight of the tour was when we drove into Lake Union and got to drink in the sights of the lakefront; many houseboats and floating houses lined the edges of the lake, including a famous one that appeared in Sleepless in Seattle. The captain explained that the houses were some of the most expensive real estate, for the government limited the number of houses that can be built there to protect the waters from pollution. Because I'd been living in a landlocked for a few years, it was refreshing to be on the water again. Of course, we also passed by Seattle Centre (home of the Space Needle), and drove along the harbour to take in the sights of the piers.

View from inside the "Ride the Duck" tour.
Seattle skyline, as seen from Lake Union.
Space Needle!
Floating houses along the lakeside.
Houseboat driving along the lake!
After disembarking from the Duck tour, we dove straight into our second event of the day - the Seattle scavenger hunt! As an avid fan of the show The Amazing Race, I couldn't have been more excited. Our task was a photo hunt, where we had to decipher clues to places and then go there to take a picture. My team was full of other excited and competitive people, so we quickly worked on figuring out the places and then plotting out a route on a map. For two and a half hours, we ran around the downtown area to capture the places that the clues led to; because the hunt locations spanned a wide area, it was difficult to determine which places we had to sacrifice in order to make it back to the meeting spot in time. In the end, we were exhausted but also very content with our effort. The winners will be announced Monday or Tuesday... I think that our team has a great shot!

All in all, "Seattle Saturday" as I like to call it, was a fun day loaded with activities to better see the city. Throughout the day, I was constantly amazed by the beautiful architecture around the downtown core, as well as many art pieces that were scattered around the area. Whether re-living places where I'd visited a year earlier or taking in new sights, this experience was definitely different from my previous trip, in a very satisfying way. I had a lot of fun walking around the city with everyone; tomorrow we have a whole day to ourselves, so I'm looking forward to delving deeper into downtown Seattle!

CSSI Day 6: Ylvis, Alice in Wonderland, and Saying Goodbye

This morning, a little too early in the morning, we were all reminded of this lovely viral song from a few months ago...


So what does the fox say? This was our morning exercise for reviewing everything that we learned yesterday. We had to write up a program to generate lyrics similar to the infamous Ylvis song, where various animal sounds appear a random number of times in the verses and choruses. I thought it was really funny that such an odd example fit perfectly with practicing implementing dictionaries, functions, and for loops in Python. However, this guided coding was only the beginning to the day; although we didn't learn much new programing today, the projects that we worked on naturally became increasingly challenging.

Our main project of the day was called "Alice in Wonderland", a program to determine the number of unrepeated words in the text of Lewis Carroll's Alice in Wonderland. This involved many interesting challenges including removing all the punctuation from the text and then turning all the words into a list. I managed to search up a few new functions to simplify the code, such as set(), which removes all duplicate items from a list, and using tuples and sorted() in order to sort dictionaries (associative arrays) by values instead of keys. Including added features and all, the Alice in Wonderland took almost an entire day to code; however it worked quite well in the end.

After lunch, we had a "Careers at Google" panel where got to hear from a group of Google employees who each answered many questions about their jobs, including what they worked on, how they got the job, as well as highlights and challenges that they met in their everyday work. Learning from the employees' many personal perspectives on what the various positions entailed was very interesting, because everyone's experiences were different and they each had very good advice to share. The words and stories that the employees shared with us were tangible experiences that had actually occurred, making them in many ways more accurate representations of what different careers at Google would entail.

As I mentioned in the last post, today was "fancy Friday" at Google, in which people who wanted to dressed up in a "beach wedding" theme. They made a big deal out of it by setting up a photo booth, a cake (with android figures on it!) and champagne, and even a game of "ladder toss"; it was the first time that I'd played and I was actually pretty good at it! Also, it finally rained for a little bit today, giving us a show of realistic Seattle weather! Thankfully though, the rain didn't last too long and pretty soon it was bright and sunny once again. Since it was our last day at Kirkland, we decided to explore the campus one more time, coming upon some very comfortable chairs and even a Game of Thrones-themed conference room! The interior design of the offices are so creative that it often seems like the rooms themselves encourage creativity.

Air hockey!
Reflections of Seattle culture in the building displays.



















After leaving the office, we had a mini games night back at the dorms with many decks of cards and board games. We ended up playing a big group game of "Mao", which is easily one of my favourite games... it gets truly addicting, to the point where we stayed up playing until 3am. However, games night was a very easy-going way for everyone to relax and unwind, ending a week of hard work.
Seattle landscape mural on the wall

Thank you to everyone at Google Kirkland for taking care of us this past week, particularly to the many teachers and teaching assistants who volunteered their time to share their knowledge and wisdom with us. We had such a lovely time this week exploring the campus and learning a lot from you! As we move on into the next two weeks, I can't wait to see what Google Seattle holds for us.

Our thank-you message on an eraseable whiteboard wall!

Friday, 1 August 2014

CSSI Day 5: Python Basics and Projects

Building A at Google Kirkland, where our classes are held.
Today we began our classes on Python! I really like Python as its syntax is relatively straightforward, so it was the logic that was the most complicated aspects of coding with the language. To start off the morning, we worked with the Unix Terminal on Mac, so-called because it uses the same commands as the Unix operating system - on Windows the equivalent is the Command Prompt (cmd) window. This console was to act as the compiler, in order to execute the Python projects that we programmed.

I was really grateful for my foresight to learn a bit of Python prior to CSSI; not only did it indirectly help with understanding JavaScript yesterday, but it also really gave me the leg up on today's lesson. We worked on programs including one that determines whether a random "dice roll" generator is truly random or not, and one that took names and returned adjectives to each letter of the name. Finally, there were many challenges to take on from Project Euler; these were really interesting because they combined math (one of my favourite subjects) and coding to create programs to solve math problems.

After lunch, we had a really interesting discussion about game development from a Software Engineer and Tester, where we discussed the different components that make both board games and video games interesting. This included the emotions associated with actions within the game, as well as specific aspects of different games. During the talk, someone brought up Ingress, which I'd never heard of before but turned out to be really cool. Ingress is an augmented-reality game which uses Google Maps to create a fictional world with portals based in locations around cities that users can go to and accomplish tasks. I downloaded the application to check the game out and the graphics alone are amazing; I'll definitely be trying the game out soon to learn more about how it works. 


To top off the day, we discovered a few scooters and proceeded to whiz around on them on the Google campus! And then I realized that it has been so long since I've ridden on one... but it was really fun while it lasted. Now it's 2:00am and we're still hanging out together, chilling out and refreshing (albeit at a strange hour) after a long day of looking at computer screens.

Tomorrow is our last day at Google Kirkland, where we'll end by finish off Python. They actually have "fancy Fridays" on Fridays here - tomorrow is a "beach wedding" theme so we're all going to try to dress up a little! It has been an amazing week here, but I am just as excited to see Google Seattle; the two offices were built right across from each other, separated only by Lake Washington, so I'm interested to see how the two offices differ!

Thursday, 31 July 2014

CSSI Day 4: JavaScript Fun (and Frustration)

As we continued into day two of JavaScript, the days are getting longer and the nights shorter... Today, we mainly spent the day working on a series of projects to gain some more experience. Some of the projects included creating a Mad Libs game, a tic-tac-toe game, a reaction timer game (similar to this one), and a spinning 3D cube. As soon as we got to class, we began working at our own pace, attempting to write the JavaScript code from scratch. However, since we had a crash course on it yesterday, I ended up looking back at a lot of past code for references. 

I began with the Mad Libs game, because it was a good way to review creating forms in JavaScript, which we'd learned yesterday. Surprisingly though, it took almost half the morning to complete the project, for while the concept was easy it took a lot of time to implement functions such as a "Play Again" button.
Sample JavaScript code for Mad Libs game.
Mad Libs input screen
Example story revealed!
Along with a functional "Play Again" button.
Next, I moved on to the "reaction timer" project. This one was even more complex than the Mad Libs, because it involved animations and getting time from the current time at different intervals (i.e. when the image appeared on the screen and when the user clicked). Once again, the concept seemed easy enough, but the actual execution was more convoluted than imagined. I wanted to add interesting features that would make the game more interactive, such as an error message when the user clicked before the image appeared, as well as a "Clear History" button that would clear the list of past reaction times; these additions made the program harder to code. While I didn't have the time to make the webpage look nice, I managed to make the functions work well doing exactly what I wanted.

JavaScript code from reaction timer.

Reaction timer put to the test!
Finally, after getting back to the dorms, I started on the tic-tac-toe program. This one was one of the hardest ones and the code got complicated very fast; in the end, I managed to work out the two-player gameplay process of putting down pieces, but I still need to code the program to determine after each step whether or not a player has won. Today was very frustrating at times, especially during many attempts to debug my programs, but it was a real experience on how "addictive" coding can get when you just don't want to stop until you've solved a problem or finished a project. By the end of the day, I felt good in what I managed to accomplish and vowed to continue working at what I've still yet to finish. Tomorrow we begin Python, which I've actually self-learned quite a bit of, so I'm looking forward to putting those skills to the test and progressing even further.  

Tuesday, 29 July 2014

CSSI Day 3: Web Development with JavaScript

View of Lake Washington from the morning shuttle!
You can see Mount Rainier from the background.
This morning began feeling even earlier than the first, but we all piled onto the shuttle on-time for our second day of programming at the Google office. Once again, we started off the day with breakfast at the Sudo Cafe. Then, we began the lesson on JavaScript, which is a more advanced programming language used in web development, for creating dynamic, interactive content on websites. In fact, we learned that Google Maps is one of the most complex applications that is coded using JavaScript, due to its three-dimensional rotations (e.g. Street View) and many other features.

Although I had no previous experience with JavaScript, I found that learning some Python through Codecademy really helped me with my understanding; JavaScript is more syntax-heavy at times, but its basic structures are quite similar. We learned a lot about how to respond to different user interactions such as clicking buttons or hovering over text or images, with actions including animations and colour change, etc.

After working with Google Chrome's own built-in JavaScript console, we used jQuery (which simplifies JavaScript implementation into HTML) to add JavaScript into webpages. Through this, we were able to combine the HTML and CSS that we learned yesterday with the more complex and interactive elements we learned today.   

In between all the excitement of the day, I got to try on Google Glass! It was really cool; the screen in the corner was a lot bigger than I expected, and I got to look through all the different verbal commands that Glass could execute.


I'm also getting a lot more used to the MacBooks that we're using; while I'm a Windows user at heart (are the "control", "option", and "command" buttons really all necessary?), the Macs are very sleek and fast, not to mention the amazing graphics.

Our final project of the day for JavaScript was to create a Photo Search Engine, which takes in a keyword and searches through Flickr for relevant photos. The best part was that the search engine used real-time data from Flickr, meaning that searches could be updated based on user uploads to Flickr. There were many features that we wanted to add and we encountered quite a few complicated bugs, but in the end we managed to work them out together. Tomorrow we're continuing to work on more complex projects with JavaScript, which I'm glad for because it means involving more hands-on coding.