Mac Randall’s Web Dev Journal

Monday, September 16

I missed class on Wednesday the 4th because I was out of town, but I watched the YouTube video and followed along with the coding for the OAuth lesson for as far as it went (didn’t make it to the final integration with Twitter, though). Last week Spencer was out of town, so no class officially, but I did go to the Wednesday office-hours session to continue trying to get a handle on the final project. It’s basically nowhere at this point. I downloaded and installed the Meta-Spotify gem and I’ve tried many different ways of formulating requests, but I simply can’t get the Spotify API to function the way I want it to for this app. Back to the drawing board. Since the 9/4 class covered OAuth, which was one of the things that got me off track when I was planning to work with Twitter for the midterm, I’m thinking I might go back to the Tweetletuned app idea for the final. Can’t say I’m feeling highly motivated to do this, however. I know I haven’t put in nearly enough time yet to get even halfway decent at this stuff, but my enthusiasm seems to be ebbing away. Tonight we were introduced to Bootstrap and Heroku, both of which are very interesting, but we were also supposed to use them in the context of deploying a StuffFinder app, and I never got the app in functional shape to deploy. Started with the half-finished app I’d worked on with Larry, then moved over to Spencer’s model app, realized there was a conflict between the two but didn’t know how to resolve it in Git. Still a lot of basic knowledge I just don’t have. If I’m going to keep going with this—a big if—I’ve got to go back and work on the baby steps. Downloaded the Agile Web Development with Rails book that Buster had recommended a while back. The final project may fall by the wayside, but if I can just learn a few more things, that should be sufficient.

Wednesday, August 28

The big question tonight: How do you get started on building an app? What comes first? Definitely something that plagued me with Ritly. An attempt was made to answer this question through the development of an app designed to keep track of a bike shop’s inventory (creating and updating orders). Creating a wireframe and detailing associations certainly can be a helpful start, but when it comes coding time, the answer to that question is still elusive to me. The problem is that there are so many files linked to each other inside a Rails app, and so many of them contain not only repetitive elements but also something far worse: elements that are almost exactly the same as several others but not quite (makings of a nightmare). Toward the end of the class, I think I was starting to get the idea. I wanted to build an index page for the app that showed all the existing bike orders. This necessitated creating several new html.erb files. The error messages from the Rails server were pointing me in the right direction, and every time I ran it the messages changed, signaling that I was making progress. Still couldn’t get the page to load on localhost:3000 by end of class, though. Ah well.

Monday, August 26

On to associations. A fascinating class, during which we spent a great deal of time modeling the structures of Twitter and Netflix: in other words, identifying and isolating the various key components of the sites, then detailing with pen and paper how they all relate to (or, better) associate with each other. Twitter is relatively simple. Netflix is mind-bogglingly complex, and we barely scratched the surface. But it does get one thinking. Handed in the Ritly exercise, despite the fact that it’s a non-functional mess.

Wednesday, August 21

Authentication was the main topic tonight. Not the most exciting subject, but clearly pretty key in developing usable and secure web applications. After a general overview, focusing mainly on Devise, we installed Devise and began to incorporate various authenticating functions into the Movies app. Our task for the last hour of class was to change the app to allow only the user who created a given movie to edit it. I knew this meant establishing a user ID system, which would involve making changes in the movies controller and adding a new category to the schema and several files within the App/Views/Movies folder. But once again, I ran up against syntax issues. What is a correct method for 1) creating an ID for each user and 2) giving certain permissions only to that specific user? By the end of the class, I still didn’t know the answer. The homework for Monday—building our own version of Bitly—is now filling me with dread. Ah well, just gotta keep on plowing ahead.

Monday, August 19

Tonight’s class was completely taken up with one coding exercise: building out the Movies app. The work on forms and models continued, and we also ventured into the important new area of validations. I sat down in my chair at 6:30 and didn’t budge from it for the next three hours. It took my partner Matthew and I nearly the whole class, but we got all the new functions to work. Being able to go back over the work we’d already done on the Shirts app was key, because we were able to use the same basic syntax a lot of the time (though not all the time). And I finally got my Timestunes program to work just the way I want it. Nick showed me that I needed an extra method in the New Stories class to stop the stories from being appended to each other (the wording he chose for the method was “clear”). Nice!

Wednesday, August 14

We continued working on the Shirts app and created a form template. Very interesting to see what such a standard feature of the Internet actually looks like in code. Again, I got a little behind in the code-alongs and didn’t quite make it to where I should have been at the end of the class, but checking out the solution Spencer provided, I can see the few little things I missed. I also discovered why I was having trouble running my Timestunes midterm project earlier today—the NY Times website was down for two hours! Glad to know it wasn’t me. Now it’s working again, though I still can’t figure out how to stop it from running 10 additional stories every time you choose one of the API options; I want it to always run 10, not 20 or 30 or more. Nick says I need to have it replace, not append; this makes sense, but I’m not sure how to do that. Is it one command in one class, or in several places? There’s nothing obvious now that indicates the program is being told to append. Maybe it’s the API request? Anyway, got to research further. I’m so close to getting it all to work the way I want—just one last hurdle…

Monday, August 12

Things are starting to get cool. Spent a lot of time reviewing the MVC framework we discussed last week, this time incorporating models. Created a Shirts app and a Movie app using database file migration and ActiveRecord. I still don’t always know exactly what I’m doing, but it sure is fun when it works. Also, Nick was able to help me figure out what was wrong with my midterm project. The main problem was one of linkage: it was the Story class, not the NewStories class, that the main logic of the program should be linking to when it was running the remote source data. Now time to do a little final cleanup on this so that every one of the three top options runs 10 stories as planned. From there, on to the final project, for which I’d like to use the Spotify API.

Wednesday, August 7

More Rails apps tonight: a set of three games designed to familiarize us with routes and controllers. We also created our first files composed of multiple programming languages (HTML with Ruby embedded—not exactly pretty-looking with all the <%=s but definitely interesting). The class moved SO fast, though. I got through Magic Eight-Ball and Secret Number, but it took me much of the rest of the class to make Secret Number run properly, so I barely got to the start of Rock Paper Scissors. Now it’s time to think about the final project. Proposal due Monday night. What to do? Stay tuned.

Monday, August 5

Created my first Rails app tonight—actually, my first two Rails apps—and it was a lot of fun. For once, the work didn’t seem too hard and the moments when I felt like I was behind were short. Yay! Spent the last hour and an additional half-hour after class working on my midterm, with some help from Nick, Spencer, Jamal, and my classmate David. Despite all our efforts, the Twitter API still wasn’t cooperating. I think I need to do something different for the midterm if I have any chance of creating something that actually runs all the way through. Will look at some APIs that are a little easier to deal with. (Postscript: I ended up using the New York Times API.) Maybe go back to Twitter for the final project.

Wednesday, July 31

Lost at sea again. The first half of the class was an extended exercise in retooling the Secret Number game using objects. I barely knew where to begin. However, the guy I was paired up with seemed to know even less than I did, which in a weird way made me feel better. I was able to show him how to access and update Git, which he hadn’t done. It wasn’t exactly the most productive hour-and-a-half I’ve ever spent, but I did come to the important realization that we needed to create a directory for the game with separate Ruby files for each class, all of which would be linked to each other in various ways using the require command. The directories weren’t completely populated by the time we had to stop, but we were headed in the right direction.

Monday, July 29

Tonight we concentrated on objects and classes. I wasn’t entirely sure at first what instantiating objects was all about—and although I know it’s meant to save time and effort in the long run, the arguments still strike me as needlessly repetitive—but by the end of the class, I felt like I at least understood what wasn’t working in the Teddit and Secret Number exercises. And that’s actually a positive.

Wednesday, July 24

Okay, I think I’m beginning to figure it out. I unfortunately wasn’t able to set up all the desired functions of the secret number game in time for the homework submission deadline, but at least I created something that actually ran. And this class was fun. I enjoyed the Reddit/Teddit exercise, and parsing the code of various websites using .json was very educational. Thanks to the excellent recommendation of my classmate Nico, I also started reading Why’s Poignant Guide to Ruby, which is proving to be a big help. The chapter that presents and explains Ruby’s “parts of speech” was exactly what I needed. I wrote down the terms and their definitions in a notebook and quizzed myself on them. Going forward should be better.

Monday, July 22

An improvement of sorts. I didn’t feel too far behind for the first half of the class. I think I figured out “gets” and “chomp,” but some other terminology is still a bit baffling. Strings? Blocks? Arrays? Hashes? What’s the difference between them all? When do you use the curly brackets and when do you use the straight brackets? Worked hard on the “99 bottles” iteration exercise but still didn’t have it together by the end of the class. Looking at other people’s solutions afterwards, I eventually found one very close to mine. Running it all the way through in Ruby took time, but back home at the end of the night—success! Now I think I’ve gained some more insights into how to set up the secret number game. More on that to come.

Wednesday, July 17

Still way behind. Tonight we did a brief review of Git, but I have to do a lot more work with it on my own. Then we moved on to Ruby. Gotta break out the tutorials for that as well. I’m pretty sure that I get all the concepts, but putting them into actual practice was tough. I was just about completely lost on the Teddit exercises—couldn’t determine the proper syntax for any commands. Where does “gets” go? What about “chomp”? What goes along with these commands? Seeing how it could work when done right was totally fascinating, but it also made my inability to execute that much more frustrating. By the end of the class, I was trying hard to combat the “I’m so going to fail this course” feeling. Having subsequently hit my internal reset button, I feel a little better now. I have to accept that 1) I’m just getting started, 2) this may be slow going for me, and 3) that’s okay. All part of learning. Luckily, I now have four days that I can devote largely to getting more up to speed on this stuff. Consider me humbled.

Monday, July 15

First day of the GA Back-End Web Development class. I should have done more of the pre-work. I was proud of myself for installing everything that needed to be installed beforehand with very little difficulty, but I hadn’t grasped the extent of all the tutorials and how long they’d take me to do. Result: I’d only gotten about two-thirds of the way through the first command line tutorial by class time. Luckily, the first class focused largely on command line exercises, with which I felt fairly comfortable. The Bash “echoing” exercise using two different arguments was particularly fun. From there we moved on to Git, which is all-new territory for me. A couple of times I thought I was really getting far behind, but after Nick came over to assist, I realized that I wasn’t. There’s a lot to get my head around—I feel like I need to train myself to think in a far more orderly, linear way than I normally do—but I’m cautiously optimistic.