Things progress fast at Bitmaker. Like, crazy fast. Have I mentioned that before? Well it’s still true. It’s barely been three weeks, and I’ve gone from struggling to figure out the basics of Ruby, to struggling to figure out why my gosh darn (super simple) app won’t work online. Yes, I’ve officially put my first app online. It’s called Photogur (totally a copy of imgur, if only in basic functionality), and it kinda works. This time last night, it worked great. Currently, it works great when I run it on my computer (localhost:3000 has made it to the top of my Chrome suggested pages list after about 3 days), but when I try and use the online version, it won’t do everything. You can look at all the photos, and you can even add to the list, but if you click on one photo, it brings up an error instead of bringing you to that specific photo’s page. Try it yourself! And let me know if it’s somehow fixed itself in the same way it somehow broke itself. Check it out here. It’s a super simple photo sharing site. You can post photos (though unfortunately only from other URLs at the moment), and anyone can look at them. Currently it’s filled with funny placeholder images from this family of websites I stumbled across (FillMurray, PlaceCage, StevenSeGallery). It seemed like a good way to populate a database I was using to learn with. So go ahead, add some fun pictures. Someday you’ll be able to write comments on them (hopefully), and someday it won’t look like a book report from grade 7 (when I get around to spiffing it up a bit) (also hopefully).
This week we started learning about Rails. Rails, as I mentioned on the weekend, is a framework for building apps using Ruby. What’s a framework? Good question. Until Monday I had no idea. Now I have an inkling, but not much else. But I’ll try my best.
When you create a web app, there’s lots of organizing you’ve got to do. You need a server. You need routes to send people to different parts of the site. You need all the pages, which usually have a similar template, but different content. You sometimes need forms for people to fill out, whether it be a log in form, a contact form, an order form, or a [funny form joke] form. Rails gives you a ready-made system to organize your files (of which there will be dozens, hundreds, or even thousands, depending on the scale of your app), as well as simplifies a lot of the boring, tedious, repetitive work that goes into making something functional. A common mantra among programmers, new and old, is DRY: Don’t Repeat Yourself. Every time you type something you’ve already typed, you’re introducing a possibility of “contamination.” Typos, brain farts, what have you. Rails takes a lot of the repetition out of building an app. Another common mantra is that programmers are lazy. I guess the two go hand in hand. But why would I spend all the time organizing all these boring, repetitive files, when someone else (a guy who was 25 at the time, David Heinemeier Hansson) has done all the work already, and made it available, free and open source? Rails lets you get straight to the business of building something functional, and get it done quickly. I’m sure it’s not a perfect system, but what is?
So that’s what we’ve done this week. We did an intro to Rails, an entire lesson on Forms — yes, they’re that important (did you know that if you open the developer tools on your browser you can edit the information on a web page and send that information back to the server in a form? But shhh), a big lesson on databases and how to use them in our apps, and today another lesson on how databases relate to each other and how that effects the app. Tomorrow we’re talking about authorization and authentication, which are different but closely intertwined. Today we started working on building a simple clone of Amazon called Rainforest (Sensing a pattern here?), and we’ll keep working on that over the weekend. Oh yeah! Yesterday we went on a tour of nulogy, a software company here in Toronto. They sell software that helps supply-chain type people, well, manage their supply chains. Interesting to see how a full-on tech company operates. A couple standing desks, TONS of whiteboards and sticky notes (Seriously, sticky notes EVERYWHERE), and overwhelming enthusiasm, for the work and for the company. It was an interesting place to visit, and I’m looking forward to visiting a few more companies over the next few weeks, to see where the similarities and differences are.
Anyways, thanks again for taking the time to read this (if you did). (Actually I know most of you do because medium tells me how many people visit the post and how many people actually read it, so thanks to the 70-ish% of you who read everything!) Check out my newly-published app, twitter, LinkedIn, github, and, as ever, may the force be with you.