It’s a bit of a shock to think that three full weeks have passed.
I started gSchool three weeks ago, and we have learned an incredible amount. I really don’t know where to start.
First we set up our computers. Luckily, our instructors Mike and Jeff compiled a complete run-through of our computer setup. We started with a fresh MacBook Air and followed the instructions. I’m sure it’s all super important, but I just want to give a special shout out to GitHub, RubyMine, ScreenHero, and of course our dear sweet Ruby. I love you guys so hard every single day.
But seriously, looking through there, I don’t see any fluff.
So once you have that all set up…
If you really did set your computer up as outlined by the gSchool site, you will have a special folder for all your projects (you can rename it to something like “totally_amazing_ruby_folder” or “mad_programs_yo”). Be sure to cd (see below) into that folder and make a new project folder for each group of exercises. And then you can put that up on GitHub and show your friends and maybe people will comment and help you out. It’s pretty cool.
Wait, have you used terminal before? I promise, it’s not too scary. Most of the time, you can’t accidently ruin everything. I’m pretty sure, anyway. So far, so good. So yes, terminal. There are a lot… a LOT… of commands that I don’t regularly use. However, here are some of my faves:
- pwd : Print Working Directory. Aka, what the hell folder am I in right now?
- mkdir <directory name> : MaKe DIRectory, followed by whatever you want to name that directory. DO THIS while you are “standing” in the directory you want to put that thing.
- cd <directory name> : Change Directory. You can only “change” down in to directories… to go up you need to either use “..” meaning up one directory or “~/” which will start you from your “home” directory.
- ls -l : LiSt contents of directory you are “standing” in. The “-l” is sorta optional… try it with and without and you’ll see why I prefer the -l.
- mv <location if necessary/filename.ext> <new location if necessary/filename.ext : MoVe a folder or directory to a new location. This command also is for renaming stuff, in which case you put the new name second. Remember to put it in the location you want!
- open <filename or directory> : opens a file with whatever program is defaulted to run it, OR opens a window of that directory.
- touch <filename.ext> : create a new file with that filename. Seriously, touch? Who’s idea was that?
- vim <filename.ext> : opens the file in a quick and dirty (and apparently totally badass) text editor. If the file doesn’t exist, it will also create the file. ALSO: press “i” to insert text, and then escape to exit “insert” mode and “:wq” to save changes and quit, or just “:q” to exit without saving changes. VIM is a sneaky bastard, you think you don’t like it and then end up using it every day. Dang you VIM!
So, weren’t we going to do some programming? I have to say, I really like the book Learn to Program by Chris Pine. There are tons of tutorials out there online (and you don’t even have to download Ruby for a lot of them) but this book just shines. There is even a online free version (not updated for Ruby 2). Milovely Luke and I meticulously followed the lessons until we started giving each other “challenges” to write some program or another, and then we just started making things. Of course, after a while, we would run into problems that required a new tool, and back to the book we went. I’d say, after you get fairly comfortable using this book as a reference, step it up a notch and check the Ruby Docs website. It is fairly dense, but after a while you begin to understand things. Just ease yourself into it.
The Exercism website is also pretty great. The purpose a bit different than GitHub, although you do push code there too. But you push code to Exercism more for feedback rather than deployment. I have seen some amazing feedback from strangers and some just ok, so read through it all and take what you need. Or just browse other beginners' code and feedback, it really does teach you a lot to just read and understand somebody else’s code. All our brains are different, and we all solve problems in a different way, and that can be pretty amazing. One suggestion is to only “fetch” the next specific ruby exercise, or all the languages' exercises will be downloaded (exercism fetch ruby <next exercise>). There is a list at GitHub.
Oh yeah, GitHub. It’s a bit to take in. I’d start with the GitHub tutorial. It is simple and fairly short, a nice quick overview of basic Git workflow and commands. The book Pro Git (also available online) is pretty awesome too. I love the examples in this book, and it seems like a great reference. Also, and a bit more visual is Visualizing Git Concepts with D3.
Well that’s a lot of lightly explained heavy stuff. It’s a lot, I know. Tools can be a bit boring to talk about, and get up and going. But if you follow through, you can really start making things!