Learning to Code

August 15th, 2017:

This has been a long time coming – I now have a dedicated blog just about learning to code. I’m updating it regularly here!

Feb 2nd,

Boy, it has been a long time since I wrote! Well, I now lead a team of Advisors and Mentors at Codecademy – now they teach people to code. Me? I now have a website with a bunch of projects, and I feel so much better with Rails.

Aug 4th, 2015:

I haven’t written in a long while, but I have been coding on and off this whole time. Codecademy Labs was awesome and now they asked me to come back as an Advisor for a month to help others go through the courses. I’m making progress with Rails, and feel much more confident with front-end stuff. And I get how Bootstrap works! My final project for Labs helps users find hipster coffee shops – you can check it out here.

Reading through my experience pre-Labs is really cool too, so I’m glad I recorded it. I’m going to keep that up.

Jan 14th, 2015:

definitely made another update after the 6th, and must not have saved it properly. Anyway, I was at the Codecademy office for a focus group last night, and only three of us showed up – and three Codecademy people interviewed us, so it was pretty intimate. It must have been around 8, and most of the team was there – including Zack, whom I just glimpsed through the windows. My desire to work with a team like that, on a problem that I truly care about – in contrast to being Analyst II at BigBank Co. – is incredible. I can’t even describe how motivational just being in that office is.

Anyway, I decided that I’ve been cutting myself too much slack; I keep approaching coding, and particularly Rails, as this big mythical collection of knowledge I’ll one day start to get, but it’s just code. It’s just algorithms. I can do it. So, I’ve once again resolved to get through the Hartl book, whatever it takes. They’re only words, and if I have to read them five times over, so be it.

So, I went through Chapter 2 a few days ago, and after the Codecademy tutorial AND the Rails for Zombies tutorial through CodeSchool, things are a bit clearer, just through sheer repetition. Also, the CodeSchool git tutorial, even the first few videos, were immensely helpful in understanding what git is.

Jan 6th, 2015:

I’m making good progress with Codecademy  Labs, and will definitely talk about that soon. We’re just going to start getting into Rails, and I’m trying to keep ahead of the curve. A THOROUGH review of HTML/CSS, plus learning Bootstrap and JS, which is totally new to me, is an amazing setup. In reading an article about why Rails is confusing, I came upon a quote that I really wish I had three months ago – or maybe I did, and just wasn’t in a place to understand it.

Rails is a framework—a collection of code that is used for the basis of specific types of web applications. It is programmed in Ruby, which is a programming language. When you are writing a Rails app, you are writing it in a mixture of Ruby, HTML, CSS, and Javascript, based on the idioms and structure that Rails defines.

I hope that with my newfound knowledge, I’m in a better place to tackle Rails.

Nov 30, 2014:

So, I definitely took some time off from coding consistently, but I do have some progress to report on. I got very frustrated by the Hartl tutorial, and having no idea where my work was coming from by Chapter 7. In addition, I jumped back into Java to work on the musicdax algorithm. This was fun, and I refreshed myself a bit on Java. I coded over two-three day periods in the last couple of weeks, and have a working version of the algorithm in Eclipse. It’s nice for demonstrative purposes on my laptop, but I have no idea how to deploy it. Plus, I have a feeling that using an ArrayList as my database won’t exactly fly as a production database 🙂 The next step would be to learn how to make an applet in Java to get some sort of a GUI up online, but I’m sure that’s not the best way to get an app up.

The awesome news is this: I got into the first Codecademy in-person class in NYC, and it’s starting this week! That’s a three-month program that covers the basics of front-end development: HTML/CSS, JS + jQuery, Rails. The content is mostly what’s already on the Codecademy website (which is awesome,) but they’re also testing out their newly-hatched Rails module on us. In addition, I meet with actual people in a classroom twice a week. I miss being in a class, which is something I haven’t done since graduating. I also signed up for Codeschool screencasts, which was like, $9 for the first month. I want to dive into Rails and keep up my journey, but I think the Hartl tutorial will have to wait a bit for now, until I’m more solid on other technologies. One thing I definitely noticed is that the better I understand Ruby – together with HTML/CSS, and basic – the better I can understand the Rails lessons. I have no doubt that one day I’ll think the Hartl tutorial is brilliant like everyone else seems too, but for now, I’m going to try a few other things.

Having musicdax as my main project to focus my studies on is awesome. Plus, here I am, sitting, coding, and listening to new music – the essence of the service I want to provide.

Nov 11, 2014:

Did some good and fun work yesterday in Java. It’s nice to know what I’m doing. In addition, I picked up how to use ArrayLists and today explored HashMaps. After Ruby hashes, it’s actually really nice. Also, learned a cool trick for passing in a variable number of arguments:

// CONSTRUCTOR  – accepts either a string array OR plain strings

public Track(String… inputTags){  //(inputTags is read as an array! So, I can pass in a String[], or a bunch of plain old comma-separated strings)

setTags(inputTags); // <– setTags takes in a String[] argument


Nov 10, 2014:

Today it hit me that I’ve been focusing so much on making a nice webapp, when what my project needs now is a logical algorithm – and I can do that. So, I went back to Java and have been coding all day, learning about things. I asked a specific question on StackOverflow, and instantly got lots of great responses. I wish I could do what I’m doing in Ruby, especially since the code isn’t very difficult, but I don’t know enough about how to make Ruby run to make it work. I know the syntax, but other than typing my code up in Terminal (or Sublime) and running it straight, I’m not sure what to do. With Java, I’m a bit more experienced, and I know how to make multiple classes in Eclipse, compile, and run. Finding errors is easy. So, that’s my tool of choice for now. I definitely want to get back into Ruby soon.

I signed up for CodeAcademy, so I’m coming back to Rails in just a little bit. I think it’ll do me good to study some more before continuing with the Michael Hartl tutorial.

Nov 5, 2014:

What is Rails? Baby, don’t hurt me! Don’t hurt me… no more.

Today, as I was trying to create a user, my app told me my password was too short, and I only have a very vague idea of how and why that restriction is there. I made this thing, and I don’t know why it’s doing what it’s doing. Also, the part where my entries into the form get converted and entered (as a hash, I think,) into my users table is a total, complete mystery. And I’m wrapping up chapter 7 in confusion, with an error I tried to but can’t seem to track down yet:


Nov 4, 2014:

I’m trying to figure out the interaction in my tests. I see that my tests pass if my


user.name = “a” * 51

assert_not @user.valid?


validateslength: { maximum: 50 }

But I don’t get that. Shouldn’t that fail? Is that because of the “assert_not” tag?

Okay. I’ve got through Ch. 6 twice now. While it’s certainly nice to know where everything is going, as I’ve already gotten an overview the first time around, I’m still really confused about what the hell migrations are and how exactly testing works. Onto Chapter 7. I hate to sound so negative, because I’m really not. I remember learning Java and being confused out of my mind until it started clicking. I was explaining the basic concept of assigning variables to a friend today (“a = 5”) and he didn’t understand at first. I don’t blame him – these concepts are like a foreign language (heh.) So, I’m sure it’ll all come together, and I hope I’m putting in the right kind of work to build a good foundation for the future. Anyway, chapter 7.

Just got to the place in Chapter 7 where it all crashed a few days ago, and again: error. This time, it’s a different error though. My Users table still exists. Aaaand… okay, fixed. It looks like I’ve got a working Sign Up page!  Turns out I missed some instructions. Hurrah! I’m officially further than I made it before, and I just redid the past few days work in about a day 🙂

I’ve gotta stop at 7.3.4. I’m totally lost.

Nov 3, 2014:

Back to coding after a day off. Gotta fix that pesky error.

It looks like my whole Users table is missing, and there is no folder in /db/ named migrate. It was there before – I’m sure of it, because I worked with it. I just overwrote a whole bunch of stuff, but I’m afraid I’ll have to quickly run through the dreaded chapter 6 and first half of 7 again. I hope this helps my understanding. Yep. Just git reset –hard intentionally, this time, and I’m back to the save point at the end of chapter 5. This’ll be good for me.

Okay, this is spooky. There was still no “migrate” folder in db, so I created a new folder named “migrate”, and sure enough got an error – “name already taken.” And then lo and behold, there’s the migrate folder with the file I had just created by repeating the beginning of Ch. 6. WTF.

Nov 1, 2014:

Happy November, everyone. It’s been exactly three weeks since I started keeping this blog; I’d like to completely finish the Michael Hartl book by Nov. 11th.

StackOverflow has been kind to me.

Sometimes, just sometimes, I think I’m feeling the intuition behind what’s happening. To build a User page, I add a route in the routes.rb that automatically creates a bunch of url paths for my pages, and then I add an actual viewable HTML page to the views folder. That info seems to be taken, added to a page, and the rest of the page – the header and the footer – are assembled from other places, so I get a functional page with a top sidebar and footer and a bit of custom info in the middle. That’s awesome. It feels like turrets being assembled in Portal 2, except… functional. Moreover, my code uses Ruby to pull info from the database and other User instances I’ve created elsewhere. I don’t see all the connections yet, but I can sometimes feel it in a sea of confusion. I hope it starts to clear up soon.


Okay. Making progress with the signup form. I hate to end on an error, but I need to go home for now.

Screen Shot 2014-11-01 at 6.49.04 PM copy

Oct 31, 2014:

I shared this blog with Dan, who said it sounded a lot like a journal. I agree! So, I guess I should tell you that a few days ago, I met a beautiful girl on the internet. She had eyes as blue as Crystal Lake down by the town dam, and smelled like Mother’s peach pie. I’m smitten. She messaged me out of the blue on GChat while I was checking my email, and even had the courage to ask me out! Of course, she sent me a picture first, so – no surprises later, you know? She said we can meet one on one, and gave me a code to a website which I can only imagine will have the directions to our meeting place. Her name is Virginia Cummings,  and she said I won’t even need a credit card (“at first”)! The mystery is intoxicating, and I can’t wait to see where out secret tryst takes us.

Onto the coding though. Chapter 6.3:Passwords!

Okay. I finally wrapped up chapter six.

By end of chapter 6: I continue to be totally puzzled at exactly how tests work. As I learned earlier, going through the tutorials twice may be a good idea, but I think it’s best for me to keep going on for now and get the bigger picture. On the plus side, I’m watching my code for typos like a hawk, because if my bundle exec rake test fails when it shouldn’t, I’ll have no idea what to do. So, that’s that. This chapter took me way too long to finish, because although I was invigorated by going through chapters 3-5 twice and finally starting to understand, the material is really dry and confusing. Onwards.

Oct 28, 2014:

Back to, and determined to finish, Chapter 6 today. I’m writing validations for users, and am still pretty confused on tests. They made sense when I went the second time around in the past, and the code is logical, but I’m not sure where the actual testing happens. Moreover, we’re working in a sandbox console mode, and every time I close the console to actually run bundle exec rake test, I think my users disappear, right? So what the hell am I testing?

I think what I’m totally missing is the notion of user.valid? and what it does. I’m following directions, and test keep flipping from all pass to multiple fails, and it’s hard to tell what is causing it. What users is it testing on? So, yea, pretty much all of 6.2 is a mess for me.

Ugh, stopped at the end of 6.2 . Passwords tomorrow, I guess.

Oct 27, 2014:

Worked very briefly on users in Chapter 6, got bored too quickly.

Oct 26, 2014:

Spent about an hour working on Chapter 6.

Oct 25, 2014:

Well, okay then! I did it; I went through the 2 1/2 chapters again and quickly got what I’m now calling tron-app (because of all the Tron quotes) up to speed. Better yet, all my tests check out!

#soproud #hireme

#soproud #hireme

What’s really amazing is how much clearer everything is. I’m by no means getting it all, and I doubt I could replicate more than… 60% of the stuff on my own, but I’m definitely not as hopelessly confused as before. Knowing just a little CSS/HTML and Ruby really helps, and going through everything this time around, I found myself tinkering a LOT. Customizing even little things like font colors, etc – along with the Tron quotes – made the work way more fulfilling. Plus, I created and updated my own page: /max.

Anyway, without further ado, I give you my gorgeous design: http://tron-app.herokuapp.com

So, I guess git reset –hard ended up being a blessing in disguise. Never again, though.

Oct 24, 2014:

Chapter 5 hasn’t been the lightest reading, but it’s time to finish it. I went to a Google for Entrepreneurs event yesterday, which was really inspiring, and Dan and I have been hashing out the music discovery app – so I really need to push ahead with learning to code.

This is mind-numnbing. I’m trying to make it fun by inserting Tron: Legacy quotes into my pages.

Goddamn it, I just failed a test, and I have no idea how to fix it. Now when I run bundle exec test rake,  I keep getting.

1) Failure:

SiteLayoutTest#test_layout_links [/Users/******/Rails_Projects/sample_app/test/integration/site_layout_test.rb:10]:

Expected at least 1 element matching “a[href=”/about”]”, found 0..

I know it has something to do with the assert_select tag, but I’m working with so many files, I don’t freaking know where to look. That’s really really frustrating, especially since my About page is present and seems to be working fine.

By end of chapter 5, I’m wondering why I’m complaining so much. Maybe this is supposed to be really confusing. At any rate, I’m pretty lost, and for some reason I had trouble deploying on Heroku – even though I think I’m starting to get a sense for how it works. I commit with git, everything works fine, I push to Heroku, but my app won’t come up

OH SNAP. I was looking for solutions, and tried git reset –hard. THAT’s why all my changes are gone. I really hope I can undo.

Wow. Okay. So, it seems like StackOverflow does offer some options for recovering, but I tried. they’re a bit beyond my  understanding. I should probably be way more upset, but honestly, at this point, it might actually be super useful for me to redo everything anyway. I’m pretty confused (really??) and starting from scratch is just what I need.

To future readers: do not git reset –hard unless you know what you’re doing

* * *

Okay. Let’s do it again. It’s only three chapters that focus on the new app, and anyway, Chapted 4 doesn’t change anything in the Sample App – it just teaches Ruby. I want to see how quickly I can go through them, and how much more I’ll understand at the end of it.

assert_select method lets us test for the presence of a particular HTML tag

Oct 22, 2014:

I’ve only recently gotten into Reddit, and I posted about my confusion on r/rails. I also discovered Natasha The Robot’s blog – a self taught coder, she worked in Alexis Ohania’s Hipmunk, and now moved on to Manilla. I’ve gotten some great and encouraging responses so far. Onto Chapter 5!

Something new here – we’re actually looking at the resulting HTML (“Page Source”) from our Rails code. That’s kind of cool.

… I just created a new textfile that imports Bootstrap (whatever that is – thanks Twitter!) It includes only two lines:

@import “bootstrap-sprockets”;
@import “bootstrap”;

It transformed my website as following. What wizardry is this??


I’m really, really thankful for everything I’ve learned on my own in the past. Even the super-fast CSS/HTML course on CodeAcademy is serving me well right now, because I can tell classes and ids apart, which is a small beacon of light in a sea of unfamiliar code.

Making headway with all the CSS, which is somewhat making sense, but I think I’ll take a break for the rest of the day and dive back in fresh tomorrow.

Oct 20, 2014:

Can’t believe I’ve been away from coding for nearly four days! It’s nice to keep track  of things with this blog though – I know exactly how much I’m putting in. Well, back to the magic of Ruby in Chapter 4.

Okay, we’re slowly tying back to Rails. So far so good.

By end of chapter 4,  I think it’s nice to get a Ruby recap. Let’s see how it ties back into everything.

Oct 16, 2014:

Oh thank god, it’s a Ruby recap, and I actually get it. I actually get it, from the CodeAcademy Ruby tutorials and the books I’ve been reading. Ah, Ruby. I missed you. I also missed not being totally lost.

Oct 15, 2014:

After a few days’ break, I’m back into Chapter 4. Read through the beginning. Confused.

Oct 12, 2014:

By end of chapter 3,  I’ve made this gem of a webpage: http://floating-shore-9007.herokuapp.com/

I’ve now gone through committing and deploying via Heroku a number of times, and feel more comfortable with it, though equally as confused. I’m also starting to remember which folders to look for certain files in, like app/views and config/routes.rb, etc. No way in hell could I do any of it from scratch. I’m also recognizing Ruby concepts here and there, but the HTML and Ruby are mixed so incestuously, that I can’t tell where one ends and the other begins at all.

Oct 11, 2014: I’m learning to code, and will keep regular updates here in reverse chronological order. Current background: a year of Java in high school; been trying to code here and there since then. Finished the Codeacademy HTML/CSS course and the Ruby course. Bought a few Ruby books – diving into Rails using this book that seems to be the bible of learning Rails. I spent a few hours on it the other day and installed Git and Heroku, and am utterly confused. Franky, while Ruby makes sense – given my Java experience – I’m still really hazy on what a web framework  even is. But anyway, I’m off to spend more time, redo Chapter 1 and try my hand at Chapter 2.

My goal isn’t to become a master hacker; it’s to become a good enough coder to hire real coders.

By end of chapter 1: I’ve now done Chapter 1 twice. The first time, I was completely, totally confused, and caused some sort of error that led me to reinstall Rails. The second time around, I’m still pretty confused, but a little less so. At least I didn’t break anything this time. You know how old people are afraid that if they click the wrong thing on a computer or press the wrong key, the computer will explode? That’s how I feel. But anyway, let’s try the sample app in Chapter 2.

By end of chapter 2, I am still pretty confused.  Really confused. I’d say a good 85% confused. I’ve done Git backups a number of times, so I understand it lets me save/back up my code in the cloud (I think.) Heroku lets me live publish my app on the web. I think. Anyway, it’s a mess, but I gotta keep trying. On the plus side, seeing little bits of Ruby that I understand is really nice.