1. 12 Hour Mucinex
2. Down with a glass of hot tea
3. Heaping spoonful of loquat syrup (it’s mostly honey anyways). Do not dilute with water.
4. Sleep on your side (I usually sleep on my back, but that seems to make it marginally worse).
This seems to do the trick for me, as the loquat gives me about 20-40 minutes to fall asleep without the throat irritation.
Debugging SASS/SCSS in Chrome takes a few extra steps. This tutorial took me 95% of the way, but I needed to enable the devtools experiments, first. FireSass for firebug/Firefox works fine, but if you like to do your css debugging in Chrome, here’s how you do it.
Migrating from Zurb Foundation / Twitter Bootstrap to Bourbon & Neat
Moving the Rails custom forms from Foundation 3 to 4 is a PITA, so in frustation, I’m taking my next project closer to the metal.
I’m utilising Bourbon.io, a scss library and Neat, a grid framework for Bourbon. It’s less code (for faster downloads), allows semantic naming, and fits well within SMACSS principles. This improves the end-user experience, the developer (me) experience, and I get to learn an easy to use framework I’ve been itching to try. That’s 3 wins. I’ll take it!
If you’re coming from Bootstrap, you make grids declaring CSS column classes in HTML:
With Neat, you to apply the grid spacing to the CSS itself. It’s semantically cleaner, because you’re naming the layout piece - a span4 only refers to a column size. An article or a sidebar gives developers context to work with.
In retrospect, I should have called l-rowl-header. l-row is an equivalent to the Foundation row class, and I don’t mind using an @include across my CSS classes.
If you’ve been using Foundation or Bootstrap, and want to get a better idea of what’s really going on underneath, while saving time through plenty of great mixins and shortcuts, I’d highly recommend Bourbon & Neat. The combo saves a ton of time vs rolling your own CSS from scratch, and doesn’t go overboard on overhead. After a few projects with Bourbon & Neat, you might occasionally go back to BS or Foundation for rapid prototyping, but I’m guessing you won’t.
AppAcademy got me addicted to learning technologies, and refining my new skills. This weekend, completed the wonderful RegexOne, which introduced me to the fundamentals of Regex - a concept I’d never understood until this weekend. I also covered CodeSchool's RSpec, Rails Best Practice classes for review.
Angular appears both accessible AND well documented, something everyone starting on a framework needs. I’ll let you know how it goes!
We began final projects, and what a difference one week of practice makes! Last week, it took 2 days to plan models & associations for a 7 table schema, and today, it took me 1 for a 10 table! I’ll take 2x improvement any day. This week only gets about 4 days for our final projects, so I’ll take it. My final project is WTFJS a mashup of JSFiddle & Stack Overflow.
This time around, I’m putting more time into planning tools, which is already paying off. I drew ER-Diagrams using Sketch a fantastic vector drawing tool, and rails-erd served as a sanity check that I didn’t miss any pluralizations or other possible mistakes in the implementation of said diagrams. I’m also creating stories using PivotalTracker.
It’s the last week of AppAcademy, and I’m starting to get a little emotional. I haven’t spent 8 hours a day learning with the same 16 people since… never. Even elementary school was a group of 30 people. And they’re all great, likable people.
Today, it’s got a user auth through Devise, permissions, but more importantly, it draws a frigging chart in your face as each vote is successfully registered in the application. That’s the feature that got all of the oohs and aahs.
I’m realizing that I’m spending a lot of time staring at code, trying to figure out a best practice way of doing it. While I’m not quite there (I still have a couple lousy names that I need to change), I want to get these patterns to the level where it’s automatic, and when I go back to my code, it’s easy to understand.
I’m sure you’re not the last person to groan reading that.
I’m programming solo today, so it’s moving along much more slowly than usual - but I get to type 2x as much as usual, and the patterns are making their way into my head. What’s great about solo development is that you can’t have a partner as a crutch, so you *have* to learn.
More work on the gist project. Every now and then, it’s great to work with someone who outmatches you, as you learn better patterns, workflows, insights etc.
The downside is that you slow down the team a bit. Sigh.
Compared to shorter projects, we’ve been provided with more instruction, so the breakdown is much more manageable.
The wonders of being the first to upgrade means I got to file my first bug! Long story short, the OpenSSL cert needed to be renamed cert.pem in the OpenSSL directory. The solution was patched same day, so how’s that for service?
The next big issue is that debugger and pry-debugger are broken… I’m left with console.log until this is fixed!
After whittling my way down the Mailbox waiting list (from 230k), I finally got my copy. Mailbox supports my Gmail and Google Apps (i5labs) email addresses, so I’m in business. I started the day at over 4,000 emails in my combined inboxes, but combined with Sparrow (for OS X) I brought that down to 198. Once I get some invoicing out of the way, I can bring that down to 50, and I’ll be at IB0 within a week.
I have a few other mail tools that I use to keep myself sane. 1. Sanebox. I can’t live without it, as it keeps my phone from buzzing with spams, notices, etc. 2. Contactually, I started using 2 weeks ago, and it’s been amazing. If you want to keep in touch with people - friends, acquaintances, leads, etc, I can’t stop recommending Contactually. It’s incredible. I’m looking forward to configuring all 3 more deeply.
In the meantime, Mailbox has replaced Sparrow, and I’ll write some follow up notes in the coming weeks.
More Snake. It’s got a more than a few items to think about - growing the snake when the apple is eaten, collisions, walls, etc. A lot of what we learned in the first few weeks of building minesweeper, chess, etc can be re-applied. Rendering to the web utilizing jquery is a pretty fun exercise.
Also began an exercise to re-implement Facebook’s Photo Tagging feature - just the JS side. Pretty freaking amazing that 6 weeks of training has allowed us to build this much.
Spent most of the day working on users, and testing. I need to get a better handle on *what* to test, or I’m never going to get around to making significant progress on building an app. One of those things that comes through experience.
The weekend assignment was to do the Hartl Rails Tutorial. The upside of going through the book really fast allows you to use it as a quick reference for setup and beyond. Downside is that typing code from a book is… boring. I think the real value is that the process of setting up and building a rails app is slowly becoming second nature as we build more of these. Until Ned moves onto the next topic and crushes us again.
Benefit of that is that we’re figuring out that we can pretty much figure out anything.
Today, we built our own authentication, TDD. In previous projects, I used the Devise gem, but it’s really good practice to understand what’s going on underneath.
The has_secure_password performs a lot of magic by setting up methods to work with the BCrypt gem. From there, you build users, passwords, and session_tokens to handle session state.
I feel a lot better understanding what’s going on under the hood, and the build from the ground up approach. Ruby fundamentals, SQL to ActiveRecord, rolling your auth. This grounding provides a lot more confidence in what I’m using.
Ned’s been putting us through the ringer - Making ActiveRecord queries utilising a legacy database. I never saw this while consulting. The number of scenarios using a legacy DB are pretty rare. Maybe some sort of finance / Oracle system that needed web views. Anyways, quite a pain, that takes a lot of the pleasure out of using AR. It’s good practice for knowing the absolute worst of AR that can get thrown at you - so you can handle anything a few levels above.
In the past, I’d only used the top level AR for selecting and iterating. I finally got a grasp over using includes, and convenience SQL methods (select, groups, order, etc) within AR. The latter improves performance, helping to avoid n+1 queries, and is significantly more readable than straight SQL, but not a huge fan. I’m going to have to take a deeper look at DataMapper now that I get what’s going on in the background a lot better.
AppAcademy ramps you up quickly and throws you into a lot of intermediate level situations, forcing you to improvise and wrack your brains.
Rather than creating a new database w/o data, we used the Sakil Demo MySQL movie database as a seed. This is the first time I adapted an existing database to ActiveRecord, which wasn’t as painful as I thought it would be.
We’re diving into more complex queries, which seem to use AR to provide cleanliness, as opposed to time savings. The vast majority of the time, queries shouldn’t be this difficult, but it’ll be good practice, when the time comes.
The second day of ActiveRecord explored usage more in-depth. Because much of the magic in Rails comes from knowing an ORM really well, time spent here is time well spent. That said, AR does such a good job of making things easy, there’s not a ton to learn.
Michael Hartl, of RailsTutorial, came by for a Q&A, which was a nice change of pace. Most of the questions focussed around innovation & careers, and less on specifics around Rails. Having been on the hiring side of the Rails equation, it’s funny that other students are concerned about finding work after AppAcademy. The market is so hungry, and the students so capable that they’ll realize it’ll be more about who they choose, rather than having *any* job appear for them.
Anyways, kudos to Ned & Kush of AppAcademy for bringing Michael through. Michael, and Dave & Andy, the Pragmatic Programmers brought Rails & Ruby to the rest of the world, so it’s a bit like meeting one of your favorite movement authors (Slow carb, paleo diets, retire wealthy, etc).
ActiveRecord has a special place in my heart. When AR was first released (I think AR preceded Rails by a year or 2) , I was building a basic form posting data to MySQL with views through Kirk Haines IOWA framework - I think he’s focussed on Seaside, now.
DHH pushed out AR, and hung out in #ruby on IRC. After 20 minutes with it, I knew AR was going to change the way people did DB development. I submitted a couple bugs and suggestions to him.
Playing with raw SQLite the past couple days, and contrasting it to AR reminded me why AR was such a godsend, the least of which is the setup that you *don’t* need to do, compared to say, Hibernate.
A bit deeper into the SQL woods. SQLzoo is a fantastic tutorial. I’m going to recommend it to my old IT teachers.
The Hacker News Client dove into object design, CSS selectors, and some hair pulling with “HOW DO I SAVE THE DAMN THING INTO MY DB USING THE SQLITE3 GEM.” I’ll continue working on that project this weekend, along with finishing up SQLZOO. Refactor, refactor and more practice.
The CSS Selector Tutorial was nice, but the time I spent in JQuery made it pretty painless. CodeSchool's JQuery First Flight Tutorial does a decent job showing how selectors work.
My first real exposure to (more) good programming practices! I’ve always needed something to push TDD onto me, and I’m pretty sure that with RSpec, and writing over the next 7 weeks, it’ll quickly become a habit for me.
We went over old exercises, and there wasn’t too much to talk about, but our code has gotten tighter since week 1, our methods more easily testable.
Read a bit about orienting the application design around messages passed around rather than centering it around the objects themselves. I’ll need to read about it more, to get my mind around it, but I’m looking forward to using it in practice.
Our first /*real*/ taste of the web. App 1: Ice Cream Finder using the Google Maps APIs. Very fun, and I can see how you could turn it into a small iPhone - RubyMotion or Android Ruboto app.
Fun, real, and immediate results. Build a little, test a little.
Next, we re-implemented the MicroBlogger command line client. Rather than using the Twitter gem, we went through OAuth, to get a better taste of Twitter’s API internals. It’s a deeper look at what GETS and POST actually look like, and how they work. Now I have real context when the Rails documentation writes about that.
Today was spent building a text-only version of Minesweeper. Once again, the logic came to me quickly, but syntax implementation took a while longer.
We had a particularly ugly method for finding adjacent squares which took about 25 LOC(lines of code). A hint for implementing a finder using a constant brought that down to about 7 lines of code, and greatly improved readability.
The CS fundamentals portion of AppAcademy is wrapping up, with the next 6 weeks focussed on web development, where I have substantially more background. That gives me 6 weeks to review and get my fundamentals onto solid footing :-).
Most of today was spent inside Git Immersion, an online 3-5 hour Git tutorial. It taught me a lot more about the git internals, and some shortcuts that I didn’t know previously, but I really wish I got more time to practice programming. Over its lifetime, though, worth it.
Implemented Word Chains with Vincent Chang, and code quality on a second writing is improving immensely. Ways to think about objects, passing messages, and code structure are all getting better.
Microblogger was cool - utilize the Twitter API to implement a command line client. Easy to understand, easy to put into code (since most of it was put down), and nice to see how external apis & services worked - up until the point that I hit a Twitter Rate Limit.
The next program, Word Chains, was just beyond my partner & I’s ability to finish in one day. I conceptually understood how to implement about half of the project, but got a bit stuck trying to figure out a way to implement the rest without brute-forcing it ( short answer: our level of knowledge requires a brute-force implementation ).
So after my first week, I’m still significantly behind, but plan on spending all of next week catching up. Class continues to kick my ass, but my level of learning is exponential, so I’m getting a ton out of it. I’m recommending this to anyone that wants to get down and dirty with programming and Rails.
Today was Basic application design. Choosing good names, DRY, refactoring, and a lot of concepts I’d read in the Pragmatic Programmer, but never truly understood. It’s not until your code starts hitting the 100+ line mark that you see the importance of, and *how* to make your code useful to people other than yourself.
Additionally, I’ve picked up Practical Object Oriented Design, and gotten a couple chapters down. It’s all coming together.
The exercises today were implementations of Mastermind and Hangman. Seeing previous lessons come together into something fun, and semi-practical were a ton more interesting, kept me more alert, and felt more rewarding than creating my own sort and array algorithms. It felt like the first time where everything came together. My partner, Niranjan, is still faster than me, but I’m not at the point where he’s completely destroying me any more. At least I can come up with core logic.
Creating the logic for a game is far more interesting than implementing an algorithm in a way that makes your brain hurt.
Yeah, I’m doing a bit of catchup. Recursion is a bit of a brainf***, and I’m going to need to spend an extra day to *really* get it.
I was able to unstick my partner from one of the problems we had today, which means I’m getting a much better conceptual grasp of the issues involved. I’m still forgetting the occasional ==, etc, but overall, I’m seeing some pretty huge leaps in progress.
Niranjin a far more experienced developer than I am. So it’s excellent that exercises are done quickly learned a lot from him, conventions, better methods of implementation, etc, frustration level is lower, but, I need to catch up to his speed.
Day 2 is easier than day 1, as I’m catching up on my basics.
Fairly daunting. I’m a bit behind on my prep work, and will catch up this weekend. I’ve got a fairly good grasp of the logic, but what’s killing me is syntax.
I’ll be grinding late tonight.
I have a colemak / vim setup that I need to write a Ruby script for this weekend. Switching each time with my partner is kind of a PITA.
Not too much I can recommend for improvements, other than maybe making the first day’s reading available the day before. A couple ways to figure out food prep to save time would be helpful… or a bank of crock pots. Lunching down here is going to get expensive!