Tag: programming

Things are really picking up! Not only am I on the cusp of finishing my second Bloc project, I have officially started a collaborative project with my friend (and unofficial mentor) Corey. Its not that I didn’t think school was enough of a challenge, but Corey approached me with an idea and offered to use it as a learning experience for me, which is something I couldn’t turn down. I’m always actively seeking out opportunities to work with other people in any way. Its a point that I keep coming back to, and its not something unique to Bloc, but I think an inherent dilemma with online schooling in that there isn’t a whole lot of collaboration outside of you and your mentor. Don’t get me wrong, working with my mentor has been an awesome experience, but theres also something to be said about collaborating with your peers on a project.

I’ve only been working on this project with Corey for a week and theres so many valuable nuggets that I’ve picked up. On the workflow end, I had never dealt with working on someone else’s Github repo. Theres a bit of pressure when setting up your local repo to communicate properly with another persons Gitub repo, the entire time I felt like I was one wrong keystroke from wiping it all off the map. After I got that all setup correctly Corey set me up with parameters for commit messages. Im a stickler for detail and continuity, so the idea of having a template for commit messages was something I was fully onboard with. It creates uniformity across commits, allowing anyone who looks at the commit history to easily see what was changed or added. Changing the default commit message template is relatively easy, and this article helped me a lot.

Arguably the most valuable aspect of this collaborative project (I keep calling it collaborative, but in actuality almost all projects involve more than one person, so I should probably just be calling this a ‘project’) is that I will have my code reviewed by another experienced programmer. Once again, I have nothing but great things to say about my mentor, but with just about any learning process its not a bad idea to get the views and opinions of more than one professional. I am definitely paying closer attention to the details of my code, making sure its as close to perfect as I can write. And testing, oh man, the testing. One goal of my current Bloc project was to keep my testing current with my code, and I admittedly fell behind pretty quickly. With this project I am being forced to write tests before my pull requests will be merged, so I have no choice but to write TDD code by the books.Less than a week in Im already feeling a bit more pressured now that I have two irons in the fire, but I’m ok with that, its a good pressure, and to me it means I’m heading in the right direction. During my mentor meeting we decided to move me from the 72 week timeline to the 36 week to finish out the Ruby course more quickly. This means that I will finish this half of the schooling almost two months earlier, and in the meantime will have two mentor meetings per week instead of the one. I wasn’t as concerned with moving up the finish date, As I knew I was on track to finish early regardless. But I was finding myself getting hung up a few days after my mentor meeting and then basically grinding my wheels for three to four days until I could speak to him again. My school work schedule didn’t help this scenario, in that most of my work has been getting done between Friday PM and Monday AM, and (rightfully so) my mentor tends to take the weekends off. But now I have two opportunities to speak to him, so hopefully my multi-day grinding sessions have come to an end.

Well, if anyone besides me is actually looking at the numbers, I haven’t had a 15+ hour week in at least a month. The irony is that I’m getting a lot done, regardless of the low hour count. As I type this I am on Checkpoint #8 of the Blocipedia project, and 89% of the way through the Rails curriculum. When the numbers are in my favor, it’s hard to not break out and head up to the mountains when the weather is beautiful, especially since I spent the better part of the spring (and end of winter) in my office programming until my brain was mush. I’m not sure the point of all this, probably me trying to justify the fact that I’ve been slacking a bit. Well, enough of that, what about what I’ve learned this week?

There’s a gem for that! That’s probably my biggest take away from the last week of work. Blocipedia requires user roles, and Bloc suggested using the Pundit gem to take care of the heavy lifting for that. The irony is that in my foundations curriculum we hand coded the user role function, so I had not used Pundit yet, and in the descriptor for the checkpoint Bloc was wording it in such a way that I should remember that time I used Pundit in the Bloccit app. Out of absolute dumb luck I happened to be in the same room as another Bloc student who was on the cusp of graduation from the program (more on that later on). He was a little surprised by my initial confusion regarding Pundit, but after a quick discussion we realized that Bloc had changed the curriculum since he took the Rails course. He still had all the documentation from his foundations curriculum and he happily passed it along to me. Once I read it over I was able to make quick work of Pundit and establishing user roles for my Blocipedia.

Although I didn’t code it out in the correct order, I was determined to establish tests for the user roles. Since I used Pundit instead of hand coding the roles as per my foundations curriculum I wasn’t exactly sure how to setup the Rspec testing, so I headed to Google. To my delight one of the first search results lead to a gem called Pundit-Matchers that makes quick work of the Rspec testing for user roles. Its super clean and intuitive to write, I highly recommend it.

Something else worth mentioning from last week, I have officially co-founded a code meetup! I’ve been attending the Boulder Ruby Meetup since November last year, and although it’s a great meetup, most of the content is over my head. The ratio of what I can grasp has obviously improved since I’ve started Bloc, but I’m still blindly following along during presentations quite a bit. Knowing that I could not be the only person attending that was having this experience, I decided that I would try to put together a meetup of my peers. I made the announcement during a meetup a few months ago and was approached by Sean Collins. Sean proceeded to tell me that he had been thinking about started a similar themed meetup, so we agreed to merge our ideas and team up to put a new meetup together.

We worked with the organizers of Boulder Ruby Meetup and started Monthly Coding Night, the goal of which was to get people of varying experience levels together and code on whatever projects we like. Its pretty informal, after some beer and pizza and mingling we get everyone together, introduce ourselves and what we’ll be working on that evening. There’s a big variety in projects, and some don’t have anything in particular to work on, so they just bounce around the room helping anyone that would like a little guidance. I think this first meetup was a success, as everyone seemed very enthusiastic about having met new people and making some code progress.

It may seem a tad daunting to start your own meetup, but I can almost guarantee that there are other like-minded people in your community that would like to get together, it just takes that one person to get the ball rolling. In my case there were two of us, so that definitely helped, but it could most definitely be done with one person and I bet a second person could be picked up in that first meeting to help organize future meetings. I think it’s worth the effort, you never know who you’ll meet. Case in point, at last week’s meetup I met Justin, who is a fellow Bloc student! I probably would have never known that there was another Bloc student in my area had I not made the initial push to get this meetup going in the first place. Crazy things happen when you put yourself out there, that’s all I’m sayin’…

This week I started my next Bloc project, Blocipedia, which is a type of Wikipedia clone. I feel the need to keep things spicy, so I renamed the project Wikster. It has similar elements to the Bloccitoff app that I made, with user logins, user-assigned elements -wikis in this case-, and with this one there is a pro options that includes a payment option, so that will be interesting to work on.

You might think that once you’ve gone through the steps of setting up the Devise gem every other setup after that will be a breeze, but that couldn’t be further from the truth. I definitely found myself going back through my browsing history, repeating Google searches, and digging through files in my last project to get this current project’s Devise properties setup correctly. One of the core principles of programming is the DRY concept (Don’t Repeat Yourself) and although it is meant to apply to written code, the idea of performing the same Google searches a mere two weeks apart seemed incredibly inefficient.

Including the project that I worked on during the foundations coursework, this is my third app I will have built, and I’m seeing a very obvious pattern forming in regards to the base elements needed to have a functioning app. Im sure at some point I’ll be able to set these core elements up in a few hours, but for the time being I think I’ll be starting some kind of whitepaper-style documentation of what exactly it takes to get a user login-based app up and running. At the moment I’m not sure that my next project, which I intend on being my personal project, will have a need for user login, but I may start a non-functioning app just for the sake of successfully setting up a user model with Devise and documenting the process.That’s the big learnin’ nugget that I took away from last week’s work. I’m still building up the CRUD elements of the wiki model, which I’m trying to do properly, TDD style. Im hoping to make some good headway in the project the rest of this week and into the weekend. I get so much more done when I’m fresh and can sit down for 3 or 4 consecutive hours.

Yep, I fell behind again. Whats a guy to do? I’ve been making some killer progress (regardless of the low hour count for the two weeks). By the end of week 13 I had completed the Bloccitoff project, as well as the extra user stories that my mentor assigned to it because of my quick progress. At the moment it’s not much to look at, but it functions, and once I get some more front end developing under my belt I’m sure I can class it up in no time.

I completed most of my work over the weekend and after my mentor approved the checkpoint was pleasantly surprised to see the my ‘work completed’ progress bar on my Bloc homepage had moved tremendously! Basically, since the parameters of the curriculum are that I complete two projects, after the first project is completed I am two thirds of the way through the course (with the foundation coursework being the first third). For me, being able to get through the first project that efficiently confirms that I actually have a solid understanding of what I’m doing.

With this project taking me under two weeks, I cant imagine the next one taking me any more than a month. There are things I can improve upon, which will slow me down a bit, but I am pretty confident that even with that I will be done in 4 weeks or less. I didn’t test as much as I should have with the Bloccitoff project. I was so eager complete the user stories and move past the big problems that the testing fell by the wayside. I am going to be adamant about testing for this next project. Bloccitoff was proof to myself that I have a pretty solid grasp on the concepts, so now it’s time to start the good habits.

With my timing as it is I now have to get serious about a personal project. I knew going into the course that it would be ideal for me to have a personal project, and now it looks like I’ll have the time to potentially complete one with the guidance of my mentor. Again, I’ve been thinking about this since I started, but have had a hard time coming up with something that is a) unique and b) potentially useful to the general public. After this weekend I’ve got and idea that fits both of those criteria and has a pretty simple user interface, which is also something I felt was important. Its also going to deal with automatically geolocating the user and measuring long/lat distances. Im pretty excited to get working on it, and I miiiiiight start it before Im finished with the next school project.

Last week most all my time was dedicated to the IPAs and APIs Hackathon put on by Avery Brewing and Mondo Robot. This was my first hackathon, and I was initially tentative about joining because I didn’t feel my programming experience was comprehensive enough. Luckily the lead coordinator of the hackathon convinced me to join and I had a great time. I entered as an individual, so I was assigned to a team. The team consisted of me, a UX designer, and a Java programmer. Basically, the Java programmer was the only one who had enough coding experience to get anything done, and since I don’t know a lick of Java, I wasn’t much help in that department. Luckily the UX designer had solid mock-up tools so we were at least able to show what we wanted the front end of the program to look like. Gaining experience working as part of a group was my main goal entering this competition, and I was very happy with how the three of us worked as a team. Our energy was always high and we communicated very well. At the end of the hackathon we were all proud of what we had accomplished. I would highly recommend everyone participating in a hackathon, regardless of where they are in their programming experience.

What a week! I went full steam ahead into my first project, Bloccitoff (which I have changed to ToBoom for fun). Roughly 15 hours into it I have completed 5 of the 9 checkpoints! Now, there are a few caveats to this, like the first checkpoint basically introducing the project and I’m sure the stories will get more complicated as I go, but so far I am very happy with my progress.

Right out of the gate this project introduces a new gem, Devise. It seems to be an industry standard for sign in credentials, so I’m happy to be working with it, but at the same time it’s throwing a lot of curve balls at me. Initially I would really struggle when obvious tests were failing or actions were not completing as they should, but as Ive gone along I’ve come to realize when that’s happening it probably something to do with Devise, and after a bit of reading (and Googling, and Slacking) I tend to find the problem. All in all its great to have one gem take care of so many things, and I’m sure that the more I use it the more comfortable I will be with it and its intricacies.

Picked up a few nuggets this week, with the first being the Mailcatcher gem. I read so many ‘how to get Devise up and running’ online tutorials that I can remember exactly where I picked it up from, but it’s great. One feature of Devise is its email confirmation function, and where mailcatcher comes in is that you can set the parameters of the Devise to send to a particular SMTP, start the mailcatcher server via the terminal, and then point a browser window to http://localhost:1080 and watch the confirmation emails come pouring in.

I also was told of some great testing strategies this week while Slacking out a few problems. The first came about when I was testing what should have been a simple user verification test, but it just wasn’t working. I could see in the error that it was looking for a certain parameter, but no matter where I included it, the test wasn’t picking it up. I ended up running this command:

bundle exec rake db:test:prepare

which reset the db and, like a magic wand, the test passed on the next attempt. I ran into another issue just last night where I was getting a simple failure, but had no idea what part of the test was failing. This seems to happen often enough that I needed to find a solution, so I started digging, and posted the question on a few Slack channels. A fellow Bloc classmate introduced me to the command:

tail -f log/test.log

this gives a detailed output of what is happening at the db level and ultimately what is causing the failure. What I struggled with for hours before I was able to more accurately troubleshoot and we found the solution in a matter of minutes.

AND! The last nugget I came away with this past week was confirming that at some point getting up and stepping away from the problem can be an excellent strategy. I have a hard time doing this, as I always feel that I’m so close, a mere syntax correction away from the ever elusive ‘Aha moment.’ But earlier in the week, after digging myself into a pretty deep hole, I decided that I needed to step away and get some fresh air. After about an hour I returned with a fresh attitude and -kid you not, the first new Google search I performed showed what I thought could be the answer. Thinking it too good to be true I plugged it into the code, and BAM It worked! I just shook my head in amazement and continued plugging along.

It’s been a good great week. It’s a great feeling to see a problem and at the very least know what pieces need to come together to solve it. I’m not saying I did it all from memory, but I definitely gave it a solid effort, then would fall back on my previous project or the coursework to fill in the gaps. Very excited to continue pushing forward with this project.

Still a little behind on the posts… Week 10 was pretty standard, no excuse for not getting a post up. I thought that I would have finished the foundations section by the end of week 10, but I saw pretty early on into the weekend (when I get 70% of my work done) that I was going to have a checkpoint or two left. I got hung up on something, which at this point I cant remember what it was, and I figured that it would be most efficient to hold off until my mentor meeting on Monday to resolve it. Once I got that dealt with I only had two more serious checkpoints left, both dealing with API’s, so I just accepted I’d have a light week this week. I’m still ahead of pace (that status bar is a blessing and a curse, haha!) and had some non-school code things I wanted to work on.

It turns out that the very last checkpoint in the foundation block is basically something that should be done with my mentor. Luckily my mentor and I spoke about which project would be best to start with during my last meeting, so I started digging into that. He suggested I work on Bloccitoff, which is a self-destructing to-do app. My gut reaction to the thought of doing another to-do app was not great, but I trust his judgement, and I know I can make this one better than others that I have already done.

Although I was able to setup the base structure of the app on my own, it appears that Bloc wants our mentor meetings from now on to consist mostly of pair programming via screenshare. I don’t want to get too deep into this first project before I discuss it with my mentor first. I have been reading some things about pair programming and am intrigued at the concept. I’ve also talked to some people about it, with mixed but passionate, opinions. The 30 minute meetings go by so fast as it is, I’m curious as to how much we will really be able to accomplish pair programming, but I’m game to try.

Along with setting up the base structure of my app I also started incorporating Waffle.io, an open source project management software. It’s probably not necessary to utilize a project management software when working primarily by myself, but the more familiar I am with it when I start the job hunt the better off I will be. Waffle takes a second to get used to, but with minimal setup, understanding how it incorporates with Github, and how formatting git branches can streamline the process, its pretty slick.

Oh! Hey! I’m done with foundations! Thats probably supposed to be a pretty big deal, technically it probably deserves a blog post all of its own. But I’m not big on celebrating, and I still have quite a bit of work ahead of me. I will say this, I have been very happy with the program so far. It hasnt been perfect, but any time I felt something was not quite as great as it could be, I always reached out to Bloc in one way or another and they welcomed the feedback. The coursework seems to have the right amount of depth, I can converse among my peers when Im at meetups other events. They still make you dig for certain things, which I appreciate and definitely feel has made me a better programmer. So, yeah, pretty happy so far. Oh, and I signed up for a hackathon APIs and IPAs for June. I was a little hesitant considering my small knowledge base, but the event organizer I was speaking with seemed pretty confident that I would benefit a lot from it, so I figured why not?

Oh what a few weeks it’s been! My mentor took a vacation, which meant that my program was frozen for a week. I could have just taken the week off, I think I could have easily made the argument that I had ‘earned’ a week of just doing nothing and catching up on Netflix. But, I don’t sit around well, and the finish line for the foundation section is within sight, so instead of chilling for a week I decided to keep up the momentum and crank through some checkpoints.

There seems to be a rhythm starting. With just about every new checkpoint there needs to be either an entirely new table or a column added to an existing table. New models, new controllers, partials, polymorphic relations, it’s been pretty wild. I’m starting to feel confident in performing these repeating actions on my own. I’ll see what the coursework is heading towards and I’m able to work a few steps from memory, then confirm my actions by scrolling down the coursework webpage. Whereas at the beginning of the Rails work it felt like I was typing voodoo magic, now the connections make sense to me, I understand the logic behind the coursework code and the assignments are becoming a bit less stressful. I’ve heard many times that programming is about muscle memory and repetition. Its tough to trust that, especially at the beginning when everything is so new, but it seems to be working out that way.

If you’ve been reading the blog you know that I have a husband and wife power-programming team (Corey and Emily Davis) isin my corner and they are eager to talk about my progress every time we get together. We’ve met up a few times over the past two weeks and it is so incredibly helpful to be able to talk to them about what I’m doing. They’ve given me some great input when I’m stuck on something small, but even when I’m not stuck on anything, to be able to just have a programming conversation is invaluable. It’s a bit of a confidence boost to be at a point where I can simply talk shop with other people. This also leads to discussions about different approaches to problems and challenges. Every school has a slightly different approach to teach programming, and having the input from other industry professionals -including my mentor- is making me a bether programmer than if I just had my blinders on and was cranking though the classwork.

The end of the the foundation block of checkpoints is in sight. I only have 5 checkpoints left, which in theory means that I could be finished by the end of the weekend. I’m definitely going to give it my best effort, but I’d be pleasantly surprised if I actually get it all done. I’m excited to get into the projects, this Reddit clone project had been a great learning experience, and Im sure I’ll be referencing it quite a bit during the projects. I haven’t really dug into any of them to see what I want to do first. I’m trying to keep my eye on the prize and keep my focus on this foundation block. I’d like to get some experience with APIs, as I’m interested in being able to take advantage of user-ready data. My mentor mentioned a path that he felt utilized Bloc’s project curriculum in the best way, so I’m also curious to hear his input on it.All in all things are going very well and I’m eager to see what the projects will be like.

This last week was as close as I’ve come to just smashing my forehead against the keyboard and calling the week good. That sounds a little dramatic, and it is, but the bright side is that I’m seven weeks into the program and its the first time I’ve been this frustrated, so I take that as a good sign. What caused this frustration? RSpec, seeds.rb, and before_action filters. Each were their own beast, and because I was trying to push past (around) the errors to continue making progress on the coursework, it was all a bit of a mess by the time I had my mentor meeting.

The RSpec and seed.rb errors were tied to each other. I could see from the test failure readouts that the tests were failing because of a validation error. I tried to just bypass the error by commenting out the failing test, but the next step in the coursework was to re-seed the database and that action was failing for a similar reason. It appeared this would have to be addressed. I assumed that there was a typo somewhere so I started working backward through the coursework. After digging back 6-7 checkpoints and not finding the error it dawned on me that it would probably be more efficient to work back through my git commits until the I could run a db:seed command and not have an error thrown. That was a much better use of my time, the kicker being that by the time I had found the general timeframe of the error I had to pick up shop and leave for work.

Once I got done with work (and thinking about this error for most of the day) I still had a tough time identifying what I had done incorrectly. At this point -for the sake of finding the error- I had commented out my own work and copy/pasted most of the coursework into my text editor. And still the error persisted. It was at this point that I decided to reach out to my mentor. We went back and forth with several messages. Me trying to accurately describe the error and the steps I had taken to resolve it, him trying his best to diagnose a problem of which he only has my error diagnostics to go on. We went back and forth for a few messages, and we came to realize that in my attempt at error diagnostics and commenting out lines I was commenting myself in circles and had actually ‘solved’ the problem very early on in the process. I guess the lesson is that at some point its probably not a bad idea to stop, keep any obvious errors that may have been found (typos, syntax, etc), un-comment everything and start those tests from scratch. That technique would saved me a lot of time. Now I know.

The other big hiccup for this last week were the before_action filters used to identify the role of particular users signed into the app. All I’m going to say is that these filters are kind of a beast. Most of the ‘unofficial’ documentation that Google concerned itself more with the strong opinions of people who have used it than the actual techniques to use it effectively. I get the sense that people are either all about these particular filters, or absolutely despise them. Being that Im pretty green I don’t have a strong opinion either way, but let’s just say I hope to not see another one anytime soon.

That’s a pretty thorough synopsis of last week. It was definitely an exercise in patience and error diagnostics. I was happy with how farI was able to get on my own in regards to error solving, so I feel like that’s solid progress. Here’s to a new week and fresh start!

More Rails! Who would have guessed?! At least I’m starting to get comfortable with the process. That’s not to say I’m cranking through it now, but there’s a little less head-scratching. This week started off with associating the Posts and Topics. It was a long checkpoint, and the entire time I was thinking to myself “if the checkpoint is this long I can only imagine how long the assignment is”. The assignment wasn’t really that bad, it was long, but I basically followed the same process as the checkpoint and after a few hours I came out on top with ‘Sponsored Posts’ being associated with Topics. I must say, it felt like quite the accomplishment to make that all happen. It’s all about the small victories.

Next up was Validations, which was pretty logical coding and went relatively quickly. It was nice to knock another checkpoint out and move into something I was particularly interested in, User Models and Sign In capabilities. How do you know that I’m on the right track in the pursuit of a career in programing? I get excited about something called User Models, something I couldn’t have explained to anyone 3 months ago.

I’m excited about User Models because every website that you go to has a sign in, and I’ve always been curious as to what’s on the backend of that process. Its also something that has intrigued me about the digital environment we are all immersed in. We all have countless username/password credentials floating around the internet. I think it would be interesting to have a capability to scrub the entirety of the internet and accumulate all of one individual’s log-ins. I bet we have more personal information out there than we think.

Well, that was a nice sidetrack, but to get back to school, User Models and their respective authentications have gone relatively smoothly and I’m happy with the progress I’ve made so far. I’m still bypassing that last ‘Programming Reinforcement’ for now, hoping to find some time this coming week to chip away at some level 7 and 8 katas and chip away at that last set of challenges.

Rails. Hours and hours and of rails. I don’t know why, but for some reason I thought that there would be a ‘break’ from the rails portion of the Bloccit project and I would have time to review it. That’s definitely not the case, I mean it’s all Rails until the end of the foundations block. But, what Bloc is doing with its curriculum is pretty helpful in that the rhythm is to work on a new section of Rails, then as the assignment you repeat those steps you had just worked on to implement another feature. I appreciate the teaching strategy, it allows me to do as much as I can from memory, and then when I get stuck I can review the checkpoint material. During the checkpoint material there are definitely moments where it feels like I’m not doing much more than transcribing into my text editor (I use Sublime with a bunch of add-ons that my good friend Corey helped me set up) what is in the Bloc browser. But, I’ve found that even doing something as simple as changing the letter used as the variable forces me to be conscious of what I’m typing and what the code is doing.

One thing I have had a little trouble with this week is the Codewar-based ‘Programming Reinforcement Checkpoint’. I spend 4 hours on only one challenge on Saturday and I still have some work to do on it before it’s even close to being done. After that I still have the other two challenges to complete. I don’t have a problem challenging myself, and I know that even the process of finding the resolution is making me a better programmer, but at some point there is a concern about how much time I am spending on each problem. I mean, 4 hours, that’s nearly one quarter of the entire time I have for the week, spent on one third of one checkpoint. Thats a lot of fractions in one sentence, but basically I feel like it’s taking me too much of my time.

Because the actual coursework is focussing on Rails, these three (Level 6) katas are the first time I’ve worked with Ruby since the last (level 7) katas a few weeks ago. I guess I have a hard time understanding the thought process as to how solving three katas at level 7 qualifies me for anything at level 6? Whatever reasoning Bloc has, its not working for me. The way I see it, there are several ways to approach a problem like this. I could just punt through the level 6 katas, probably having to run every step of the process by my mentor. I could just complain about it, how it’s not fair, too hard of a challenge, etcetera. Or, I could grab the problem by the horns and figure out how to resolve it. I’ll be doing the later. I plan on taking the next few weeks and working on more level 8 & 7 katas, on my own time, outside of class, until I have worked up the knowledge of Ruby to more efficiently solve the level 6 katas that Bloc has assigned.

No educational structure works perfectly for every student. I feel that curriculum is an outline of what needs to happen in order to accomplish a larger goal. Its up to the student to make that curriculum work within their own style of learning. So far I am very happy with what Bloc has had me do, and I will happily work a few extra hours a week on my own to fill some gaps. At the end of the day the goal is to get a job as a programmer, any and all experience I can obtain along the way will only help me achieve that goal.