Category Archives: Chicago

Soldier Field – Home of the Chicago Bears

Soldier Field is a prominent landmark in down town Chicago.  It is on the area known as the museum campus, next to the Field Museum, the aquarium and planetarium.  So ever since my first visit to Chicago last year I have been eager go watch the Bears play a game there.

The stadium was build 1922 and is named Soldier Field as memorial to soldiers who have died in wars.  Soldier Field is the oldest stadium in NFL and the second smallest with a capacity of only 61 500 – about the same as Ellis Park.  It was amazing to think that even with a capacity crowd it was only about half of what I was apart of the day before at ‘The Big House’.

Picture of the modern steel renovations inside the classic roman collumns

The Spaceship has landed inside Soldiers Field

It was remodeled extensively in the early 2000.  From the outside is look a little like a spaceship landed in side some Roman or Greek ruins.  How it got to be like that is a funny story, here is how some of the tour guides tell it.  When they wanted to build a new stadium they could not get approval to knock the old one down since it was a national monument or something like that.  So they build the new stadium inside the old one.  But once it was completed the monument status was revoked.  Which meant they could now actually build anything they want, but it was to late of course.

line of scrumache from my seat at Soldier Field

I had a great view of the action from my seat at Soldier Field.

NFL is predated by collage football by several decades, and is a big commercial machine, with advertising and sponsorships everywhere, a stark contrast to college football.  There were pre-game fireworks and a half time show by a local college marching band.

Panorama of empty Soldier Field

View of the empty Soldier Field from the behind to goal post

Over all it was a great experience at Soldier Field.  The Bears clearly have a very passionate following in Chicago; you see Bears flags everywhere. The game might be completely different then rugby but people here are every bit as passionate about their team as we are about the Bulls back home.

Pushing an App to the Web for the first time!

My first ever app is live on the web!  Pushing an app to the Web for the first time was fun. I have been playing around with a site for ski instructor reviews.  This week at The Starter League we’ve learnt how to push an app to Heroku a free online hosting platform. So after I few hiccups I’ve managed to get mine live!

It was amazing once again at the work Rails do.  Rails has something called an assets pipeline.  This includes all assets that you have in your app, like pictures, CSS files and more, and then put them all together and make them as small as possible to help optimize your application.

We played with building search functionality this week.

We also played with building search functionality this week.

While doing the About Us page for the app, I did some work in CSS to help it look better and styled the pictures to look like old Polaroid’s.  But for some reason when I updated the live site the CSS that applied to this static page would not be there. Even though I’ve added it to the same CSS file as all the rest.

After a little research, I’ve found the solution.  I had to put the CSS for static pages in a separate file and give rails a direct instruction to include it while compiling the asset pipeline.  Otherwise Rails checks the CSS file before doing it and only include the CSS that is actually used in your app, leaving out anything that is not needed.

The About Us page off the dummy app I pushed to the web this week.

The About Us page off the dummy app I pushed to the web this week.

We also started to play with building search functionality.  It is still early days, but I think building search functions is going to be fun!

I really enjoyed playing with CSS; it is amazing how much you can do with CSS3 and HTML5.  I still remember the days that anything that need special style had to be an image done in Photoshop. I am glad those days are over!

Authentication and Authorisation

Another week has flown past!  Last week we learnt a few essential concepts and I also had a few ideas about the type of problems I would like to solve.  We did a bunch of work on authentication and authorisation.

Working on authentication was fascinating.  So when you have an app you obviously would like to customize the experience for your users, which means you need to identify and recognize them.  The easiest way to do this is by getting users to register and choose a password.

Example of User registration page.

Here is an example of a Registration page asking for a password and confirmation

But having users passwords in your database without encryption is a bad idea. Since most people tend to use the same password for many services.  Therefore it is better to encrypt the password, but if you use an encryption service that can be decrypted, somebody can still use the encrypted value you store to get the original password.

The answer to this is to use one-way encryption that is consistent. This means it cannot be decrypted, but every time the same password is encrypted the result is the same so you can compare the encrypted versions to see if they match. Like many other features that most apps use, there is a gem to help in rails. Which once again, makes the whole process a breeze.

Example of login page

Once registered a new user can just log in for future visits

Now you would think that when choosing which encryption method to use, you would want something difficult to crack but that can still do its work as quickly as possible;  but it turns out you actually want one that is slow, which makes it harder to brute force it.  This article on How to safely store a password explains it in detail.  So we ended up using bcrypt.

This next step after authenticating users, involves deciding who should have access to which services in your app.  Once again something that rails makes very easy!

I think The Starter League has done an awesome job so far with the curriculum, it feels like they introduce us to the right concept at the right time in the right dose.  They also leave enough for us to figure out on our own. This week Jeff the Chief Instructor at Starter League shared this video that shows a little of the teaching methodology that they try and follow:

It was another great week, it was fun learning about authentication and authorisation. I have also spent a great deal of time this week thinking about the problems I would like to solve, and will do another post about that.

Building our own IMDB

I am now 5 weeks into The Starter League and I still love every minute of it.  At times I find it hard to believe that it has only been 3 weeks since I worked with Rails for the first time.  It has empowered me to do things already that I thought would be impossible after only 5 weeks here.

In the last two weeks we have spent a lot of time working with databases.  First we’ve learnt how to make two databases relate to each other by adding a foreign key to one of them.  You call that one to many relationships, since you have one ‘object’ that relates to many others.

SMDB movie index page

The list of Movies on our SMDB app – our own IMDB clone

To explain this concept and give us something to work on, Raghu made us build a copy of IMDB (Internet Movie Database). For the sake of our project, we assumed a movie could only have one director.  So one director could have many movies but a movie could only have one director. This was our first one to many relational databases.  We achieved this by adding a director_id column to the movie table in our database…. that sentence would have made no sense to me a month ago!

We then added another one to many relationship by adding roles to a movie (again assuming a role could only be in one movie).  But since a role is played by an actor, we could add another one to many relationship between a role and an actor.

SMDB Movie Show page

The details page of my Favourite movie, The Shawshank Redemption on our IMDB clone

After we did that, Raghu explained that we in effect had created a many to many relationship between actors and movies by using a table linking the two, in this case called roles.  So we had created our first many to many relationship without even knowing it!

Raghu also challenged us to build a paging system after one of the classes this week.  I struggled with that one for a few hours but eventually I was able to get pagination going the way I wanted it without using a gem. A gem is like plugin, a piece of code somebody else wrote, usually for a task that many people want done. You install the gem and then you can use it instead of writing that part of the code yourself.

pagination on smdb

Doing pagination far a fun challenge, here it is nicely implemented on our IMDB clone

On Friday we’ve also learnt about font awesome, another little arrow now in our arsenal.  It allows you to add icons to your site that act like fonts, so you can change the colour, size and some other properties in CSS like regular fonts.  No need for a designer to redo everything a 100 times!

Building a IMDB clone was great fun! I continue to be amazed how much fun it is learning to code. I really look forward to using these new skills to solve meaningful problems in the future!

Wrigley Field

Wrigley field must be one the most amazing places to visit in Major League baseball.  Wrigley Field is the home of the Chicago Cubs and is the second oldest ballpark in the majors, after Fenway Park in Boston (home of the Red Sox).  It was build in 1914 and now has a capacity of 41 000.

Busy concourse before the start of the gam at Wrigley Field.

Busy concourse before the start of the gam at Wrigley Field.

The Wrigley Field is located to the North of the city, while US Cellular Field home of the White Sox is in the south side of Chicago.  Last year when we were is Chicago for a few days, we went to two games at Wrigley Field, but the Cubs lost both of them.  So I was keen to go again and hopefully see the Cubs win!

So after a visit to US Cellular Field over my first weekend in Chicago, it was time to go watch the Cubs on the second weekend.  Getting to Wrigley Field is really easy, the red line stops about 50 meter from the stadium.  As soon as you are off the train you can feel the festive atmosphere in the streets, there is even are brass band playing.

Brass Band playing outside Wrigley Field before the game.

Brass Band playing outside Wrigley Field before the game.

The Cubs last won the World Series in 1908, the 104 years since then is the longest championship drought of any major sports team in North America.  But the fans still show up and support their team.  Wrigley field was close to capacity for this game, and the Cubs managed to win in extra innings.

Great view of the all the action from our seat on the upper level at Wrigley Field.

Great view of the all the action from our seat on the upper level at Wrigley Field.

One of the very unique features of Wrigley Field is that many of the houses on west and north side have built seats on their roofs to allow people to watch the game from there.  Many of them seem to have an indoor area, bars and televisions to help make the experience as nice a possible.  It sounds like they have an agreement with the Cubs to share revenue to allow them to do this.

Rooftop seats on the house across the street from Wrigley Field

Rooftop seats on the house across the street from Wrigley Field

I love going to baseball game, and will visit Wrigley Field a few more times this summer!