From Omaha Code School

Blog posts about my time in Omaha Code School

SPN: Halfway through, balancing work and play is key

Six weeks, officially half way. It feels like we have been here three months already, but at the same time, like we just started. Long days are starting to catch up with me. I can hardly keep track of the days of the week anymore.

My language has changed from English to a weird set of acronyms and terminology I had not heard until recently. I literally code all day, over meals. I even dream about code. But this is what I signed up for, and I’m having a blast.

We had the opportunity to meet with a couple of really talented people. The Flywheel team came down, talked about how they make WordPress hosting easy and some for being truly successful. We learned about some of the problems they face, and how they make plans to overcome them. We also heard from Lemonly, a startup that turns data into infographics. It was really neat to see how their problems differed from the other speakers we have heard from and the unique ways in which they overcome geographic problems within their companies.

Omaha Code School students are working on projects like creating a wiki for the Code School. 

We’ve begun shifting our time to projects, which is a kind way of saying we are really busy. In week five we completed our first group project, an Omaha Code School wiki. We started with some wire frames, created a feature list, assigned responsibilities and got to work.

The wiki has features, including:

  • Articles to have a history stored as many updates.
  • Admins can roll-back an article to a previous update.
  • Updates are written using the Markdown format, giving the author freedom to organize, format, add links and pictures.(Gem RedCarpet)
  • URL should be human readable, not just a bunch of ID numbers. (Gem FriendlyID)

I was given the task of developing everything needed for an article on the wiki. This involved the article itself, a way to store many updates and categories. At first this seemed pretty challenging. We knew how to update a single object, but this was three separate objects. After trying to figure it out on my own, Sumeet told me about ‘accepts_nested_attributes_for‘. This feature saved me a ton of work. It essentially allowed me to create a new article and prompt the user for category and update information at the same time. It really does seem like magic, even though we all know better than to believe that.

Lectures were light all week to give us time to complete our projects, so by Thursday we were close to having a working product. My partners had got users setup with authentication and session management, the front end complete with some sweet CSS to make our pages look nice.

When we are working on projects, we have daily SCRUM meetings in the morning. If you are unfamiliar with that term, it just means we go around the room and talk about what we accomplished in the past day, and what we hope to accomplish the rest of the day. It really helps outline what you need to get done. Since we were working on Thursday, my goal for the day was to break our application—I succeeded.

I acted like I had no idea what I was doing on our site. Clicking on things randomly and on pages with no context to my action. I found that we had broken links, incorrect links, form inconsistencies and style problems. We wrote down everything we found and divvied up the work again. By Friday morning, we had the whole thing running on Heroku and working well.

On Friday afternoon, we presented the Omaha Code School Wiki to the class. We got to demo the app, and talk about one thing we did in code that we thought other people could use. Everyone seemed to like it. As we watched the other groups’ presentations, I learned a lot about what they had done. That weekend, we went back and refactored some of our project to incorporate what the other teams had taught us and we’re pretty proud of the outcome.

Last week was very challenging. We started learning about JavaScript(JS) and AJAX. This was a fundamental shift in the way websites work for me. I always thought simplistically. Servers send HTML to a browser and it is displayed to the user. JS adds another very powerful layer to that, allowing a website to be modified directly in the browser. It’s a lot to take in, especially after everything else we have already learned, but it’s starting to make sense.

This week we start our first individual project. We need to incorporate a complex database relationship, AJAX calls and a great front end—it’s not going to be easy and we only have a week to do it in. Hopefully we can put together all of the techniques we have learned to make something worth showing off on our Demo Day in May—only six weeks away now.

Work hard, play hard

We work hard at Omaha Code School. We show up every morning at 9 a.m., and sometimes don’t go home until after 8 p.m., only to go home and work some more. Throughout the day we need small breaks to keep our mind fresh and give our minds a break.

A bunch of us have put together a puzzle. We’ve officially branded it “Puzzle Club.” Our first puzzle was a picture of a cat coming out onto some grass.

By far the most popular way to waste some time is an online game called 2048. It’s one of those mesmerizingly simple games you get hooked on. If you haven’t played it before, you have numbered tiles that you have to slide back and forth, and if two tiles with the same value collide, they combine and the number doubles. The goal is to get a tile with the value 2048 on it. So far only one of our classmates has made that happen, but we are all desperately trying to be the next.

Our instructor, Sumeet, likes to play chess on his small breaks. He plays speed chess online in quick little three-minute games. He says he plays a pretty unconventional game when going fast and because of that his ranking has dropped quite a bit. He jokes that he gets upset when he gets a draw because he’s probably playing against a 6-year-old, and he should be able to beat a kid.

My personal favorite is flying quad-copters. Omaha Code School is meeting in a 8,000 square-foot retail space with 18-foot ceilings. That makes it the perfect space to fly small, light-weight remote control vehicles. Once you get a little practice, you can zip from one end of our space to the other pretty quick. We have even started to stack objects and practice flying between them. It’s the perfect break activity since you have to get back to work once the battery dies.

As you can see, even though we put in a lot of work, we also find time to have a good time. I would love to know some of your favorite activities for when you need a little break. Leave a comment below and we can debate which is best.

If you want to get more frequent updates, check out my blog. Or, if you have any questions, shoot me a message on Twitter.

Projects and Presentations

Last week we spent the majority of our time working on our first big group project. It was pretty open-ended, so we could come up with anything we wanted to do. I teamed up with Matt and Cara. After some brainstorming, we came up with the idea of creating a Omaha Code School Wiki. We could create pages about each of the classmates, teachers, projects, and topics we are covering in class.

Omaha Code School Wiki
Omaha Code School Wiki

On Monday, we pitched the idea to the rest of the class. That’s when we realized just how unprepared we were. Compared to the other groups, we were behind. The other groups had detailed wireframes for each page, and a flow already figured out. As soon as we got back into our groups we tried to catch up. Cara has a design background, so she volunteered to handle the front end development. Matt and I would handle the backend.

One problem I knew we had to solve was the actual content of an article. When we started, all we knew how to do was collect very plain text from a user through a form. This wasn’t going to look good when another user wanted to read it. It wouldn’t have any headings or organization, so I needed to find a better way. One idea was to copy what we do on GitHub readme pages. For our project, we create a readme page that describes what the project does and why that matters. We edit the page in a syntax called Markdown. It allows you to use a common syntax that then gets rendered into formatted HTML when someone else views the page. After some digging, I found exactly what I needed. Turns out GitHub uses a GEM called RedCarpet to render markdown on their site, and we could use RedCarpet too. After some reading and a little trial and error, I got it working. Now if you view one of the pages, it can have organization, links, images, and is much more readable than plain text.

We also used a GEM called FriendlyID. The URL in the browser is very important in Ruby on Rails. Developers use it to pass information from one page to another. Most of the time, the information is pretty cryptic to the user, maybe just a random number. FriendlyID changes the numeric ID for an object into a readable string. Here is an example:

Twitter could have used ID’s…
www.twitter.com/509309843

Instead, they wanted it to be usable, so they used handles…
www.twitter.com/andyvondohren

This is exactly what FriendlyID does. It converts an ID in the URL into a username or title, and makes it much easier to understand. Once you get it setup, it’s really easy to use. Check it out.

We wrapped up our time on Friday and presented our product to the class. It was really cool to see what everybody had been working on for the last five days. Everyone got theirs working and had all of the functionality they set out to accomplish. Some of the other projects included…

  • Flipbook (Upload pics through Instagram and automatically create a flip book animation)
  • The Nag (To do application that nags you if you do not complete your tasks on time)
  • Work Hang (Checkin at your favorite remote working location, others can see where you are and come work with you)

We are pretty proud of our projects, and our group is even working on it some this week to get some of the rough edges taken care of. Hopefully I will be able to send a link out to the live program later this week so you can take a look yourself.

Downtime

We work hard at Omaha Code School. We show up every morning at 9, and sometimes don’t go home until 8pm, then go home and work some more. Throughout the day we need small breaks to keep our mind fresh and give our minds a break. I thought I would elaborate on some of the things we do during our down time.

A bunch of us have put together a puzzle. We’ve officially branded it “Puzzle Club.” Our first puzzle was a picture of a cat coming out onto some grass. We worked on it every day over lunch until it was done. Each person who wanted to contributed their own part. Johnathan is supposed to be brining in another puzzle for us to work on, but he keeps forgetting. Hopefully we will have another one to work on soon.

By far the most popular way to waste some time is an online game called 2048. It’s one of those mesmerizingly simple games that you get hooked on. If you haven’t played it before, you have numbered tiles. You have to slide them back and forth. If 2 tiles with the same value collide, they combine and the number doubles. The goal is to get a tile with the value 2048 on it. So far Cara is the only one to have made that happen, but we are all desperately trying to be the next.

Sumeet likes to play chess on his small breaks. He plays speed chess online in quick little 3 minute games. He says that he plays a pretty unconventional game when going fast and because of that his ranking has dropped quite a bit. He jokes that he gets upset when he gets a draw because he’s probably playing against a 6-year-old, and he should be able to beat a kid.

My personal favorite is flying quad-copters. Omaha Code School is meeting in a 8,000 square foot retail space with 18 foot ceilings. That makes it the perfect space to fly small, light-weight remote control vehicles. Brandon introduced me to the Syma X1. It’s a cheap, $30, quad-copter that comes completely ready to run. It’s remarkably stable. Once you get a little practice, you can zip from one end of our space to the other pretty quick. We have even started to stack objects and practice flying between them. It’s the perfect break activity since you have to get back to work once the battery dies.

As you can see, even though we put in a lot of work, we also find time to have a good time. I would love to know some of your favorite activities for when you need a little break. Leave a comment below and we can debate which is best.

SPN: A third of way home, with a lot more to learn

Four weeks. It’s crazy to think we are already a third of the way through Omaha Code School. We’ve come a long way since my last update. Let me get you up to speed with what we are doing.

Up until this point, our programs didn’t have any persistence. That means when we shut down the program, any information we had entered was destroyed and we had to re-enter it the next time we started up again.

This was a pain, so our instructor, Sumeet Jain, taught us about storing data in text files. That way we could import the values the next time the program ran. This worked, but it was only marginally better. Transposing values between our class objects and a comma-separated file and back was difficult and prone to mistakes. We thought there had to be a better way, and indeed there was.

We learned about structured query language, or SQL. It defines a standard way of interfacing with a database. We learned how databases are filled with tables—think Microsoft Excel spreadsheet. You can store any kind of data in a table, and they stay organized. Each row in the table corresponds to a unique instance of an object, and each column corresponds to a specific attribute describing that object. We used SQLite and practiced forming raw SQL queries and sending them into the database. Then we learned about ActiveRecord and all the methods it adds to Ruby to make our lives even easier.

After we got the hang of it, we were given our first real project. We needed to create a blog, only using Ruby, Sinatra and SQLite. We each had to come up with our own feature list. We had to decide if we wanted to integrate with an external API, allow comments or integrate email alerts. So even though we were all working on a blog, they were each unique and created by us. When we got started, I think we were all pretty intimidated by this assignment. It was a lot to take on compared to the other assignments. We spread out and got to work.

It didn’t take long before I found a groove. I found myself recalling everything we had learned and biting off a piece at a time. I eventually had a database with six tables to keep track of everything from users to posts. I even came up with some polls, so I could ask my readers questions and have them pick from a series of canned responses. It took three days, but I ended up creating a blog that looked and functioned as I had planned. We also got to see some of our classmates work. I was really impressed how far we had taken such an open-ended assignment. We all had fun and made it our own.

That night OCS hosted an open house. People from all over the community turned out to check out what we we were doing and offered their support. It was a packed house and I met a lot of really cool people. We talked about everything, from what their background was, to what we were working on in class. I even got to show a couple of them the blog that I had been working on. It was a great opportunity to meet new people and hear what they are doing in their various roles in our web development community.

Then we got to what we had all come here for: Rails. We left behind the simplistic ways of Sinatra and SQLite, and picked up a full-featured framework (Rails) and robust database (PostreSQL). At its core, Rails is a set of rules. These rules force you to build your application a very particular way. Rails also is stubborn. If you don’t follow the rules, Rails refuses to work. In exchange for dealing with the rules, you get the benefit of using hundreds of helper functions they provide. So if you give a little, you get a little. I was a little surprised how quickly we got going. I had tried to learn Ruby on Rails once before, and could never seem to get any traction. This time, it seemed to come naturally.

I have formed a team with Matt Hovanec and Cara Heacock. We are just starting our next project, and this time we get to pick anything we want to do and create it. We decided to make a Omaha Code School wiki. We hope we will use it to document some of our repositories and publish links to our sites once we deploy them onto the Internet. Hopefully I will be able to share the link with you in my next post so you can take a look at what we have been working on.

Until then, I need to get back to work. If you want to get more frequent updates, check out my blog. Or, if you have any questions, shoot me a message on Twitter.

Let’s Catch Up

CodeSchoolAdventureA lot has been happening at Omaha Code School. Looking back, I can hardly believe we’ve only been class 3 1/2 weeks. Let’s recap and make sure everyone is up to speed with where we are at.

OCS is structured in a very deliberate way. Learn the basics, and then build on top with more advanced topics. During the first week, we learned Ruby. It’s a programming language that prides itself with having readable code. It wasn’t hard to learn, and we were writing our first command line programs in no time.

Just when we thought we were understanding everything we switched from the command line to the browser. This was a game changer. I have had more experience than most in my class coding, but nothing like this. Defining routes and methods is a completely different way of thinking and took some time to get my head around.

After a little practice, it began to make sense. Unfortunately, we weren’t standing still. We learned about file storage, then SQL, then ActiveRecord. It was a lot to take in, but every step seemed to make life a little easier. Each layer added methods and helpers that can be used like Lego blocks to build whatever your heart desires.

This week we put it all together. We switched to using Rails as our framework and web server. It seemed pretty intimidating at first, but it’s started to grow on me. Rails is a framework, a set of rules. These rules force you to build your application a very particular way. Rails is also stubborn. If you don’t follow the rules, Rails refuses to work. It can be maddening at times. But once you get everything just right, it works beautifully.

With what we have learned so far, we can create almost anything. We even created our own blog from scratch. It’s amazing how a little Ruby, a database, and some CSS can create a sophisticated website. I can’t wait until we get to build some of the projects I have had rattling around in my head for the last couple years. Hopefully we’ll start publishing our sites online so I can share some of the things we are building.