So, I’ve been working on an app that uses node & socket.io lately. Going into the project, I didn’t feel like using frameworks like Express/Koa && wanted to play with node’s http module.
About 4 hours ago, I realized that I should probably push it up to Heroku. I also vaguely remember it being a huge pain to push up apps that didn’t use frameworks like Sinatra/Koa/Rails/etc. Something about “No Cedar-supported app detected”.
Anyways, turns out it’s actually really easy. You’ll end up typing no more than 2 lines of code. Procfiles to the rescue!
Make a Procfile in the app’s root directory. Shove the following in there, with server-init-file being whichever one calls http.createServer( )
web: node server-init-file.js
cd into your app directory. Run the following command.
heroku labs:enable websockets -a the-app’s-name-on-heroku
so, i’ve been working for about a month now. it’s been a god damn long time since i’ve written anything here. i have been writing in my litle notebook, but i’m not really writing full sentences there—so i don’t think it really counts.
i’ve been doing HTML & CSS for the first few weeks, and as a result have become much, much more comfortable with the DOM. also, HTML module pattern is a thing. who knew? also on my list of things that are dope: SASS. jesus christ, I love SASS. partials, mixins, variables…oof. everybody, start using it. now. (especially you, danbender)
here are some resources that have really helped me out over the past few weeks
One more thing: I had an absolutely awful beginning of the week this past week. Like 3 straight days of me feeling super disappointed in my progress & ability. Coincidentally, those 3 days were when my mentor decided to bounce for Vegas for the Lunar New Year, so I didn’t have anybody to ask for help. (Other people on my team are working on wildly different parts of the product.)
I’m doing fantastically now, but it’s funny how the super ego-ing never ends, huh?
upcoming checkin part two: the new phase 1s/2s are smart
Is this real life?
Also, DBC Final Projects begin tomorrow…
..I FEEL SO MANY EMOTIONS.
At DBC, the day is peppered with loud high-fives and fuck yeahs, the latter generally coming from myself. Once in a while, a group will complete a feature/solve a bug/etc and collectively scream and hug and shout, high-fives and fuck yeah’s abound.
At these moments, you perk up in your seat, see who’s making all the commotion, and then begin clap and cheer them on. It’s really a beautiful thing to be a part of.
Last night, I didn’t feel comfortable with AJAX, and I didn’t know jack shit about partials. Solution? Tackle them both on a basic Notes Rails app with ryanhedges . (Shoutout to taylor-at-dbc and cartersowers for laying down the groundwork with me for said app!)
Around 12:50, danbender, kenatdbc, Ryan and I were the only ones left in the building, as usual. ( morgan-wildermuth where you at??) Ryan and I had been hitting our head against a bug for quite some time, and Dan asked if we wanted to bounce soon. “10 minutes. We’re so close I can fucking taste the code in my mouth”, I said. I know that sounds kind of gross.
Sure enough, at 1 am, Ryan and I shared one of the most triumphant celebrations I have had the pleasure of being a part in quite some time. Even though there were only 4 of us there, I’m pretty sure I heard 40 people in the building yelling with me.
Refer to the image at the top of this post to see the thought processes of ryan and I as we ran our “tests”. (‘cause fuck Jasmine…jk I love you gurl.)
I haven’t been able to think about anything else. Just GIMME DA POWAH.
In other news, group projects began today. I’m in a trio, and it’s worked wonderfully. After pushing out our MVP, we set up a sweet rotation: 1 person spikes on a future idea/gem/feature, while the other 2 pair on the feature at hand. We’ve been TDDing like crazy, so I’m gonna go ahead and say today was mad productive. It’s kind of incredible how much more comfortable I’ve become with Testing & RSpec over the past 3 days. Although by now, it shouldn’t surprise me—3 days in DBC time feels like a month in the real world.
I really wish I was in bed right now though. This bike ride blows. Especially in this windy ass weather.
I’m blogging for the second day in a row. Applause.
Same scores. But I feel way better about Testing and TDD after writing a few solid Capybara tests today. Although that isn’t saying much cause I felt awful after yesterday night’s failures. About to spend the night TDDing Pig Latin. Also pushing our todo app to Heroku felt SO. GOOD.
Testing was hard back then. It still is.
There’s something to be said about creating a web app from absolute scratch. It’s a good feeling when you understand every single line of code that runs that application.
And you didn’t just throw shit together, you deliberately put words in certain places in order to achieve a desired result. And then, you pushed the app to the internet via Heroku.
Now, your mom halfway across the world can type in an address and see your shitty todo list with absolutely no CSS. Beautiful.
I now sit where Nick/Tyler used to sit during the last phase’s group projects. This is part of my grand master plan to soak up the collective the brain power of the last cohort.
Shadi is our teacher for Phase 3. I love this guy. Seriously. Bad ass programmer, easy to talk to, and really believes in our abilities.
As he explained some Rails shenanigans to me today, he said “You might not know this stuff now, but you do know what it’s made of. [type type type] See? I just want you to realize that this isn’t magic.”
Indeed, Shadi. Indeed.
Current opinion of Rails: This shit does wayyyy too many things for me. Convention over Configuration? GTFO
Last time I posted it was the end of Phase 1. I’m terrible at this.
In Phase 2, we had to write a few lines about what we learned that day, every day, and submit it to our cohort’s repo. It’s October 29th, but I’m going to post about what I wrote in my journal that first day of Phase 2.
I think I’m going to frequently jump back to entries in my journal and comment on how I’ve (hopefully) progressed or (probably) still don’t know what the shit I’m doing.
(Note: I frequently reference scores based on a set of learning objectives that we could “check off”.)
I think its hilarious that I spent my hour long spike on RSpec and I still got a 0/8 on Testing & TDD.
I also think its hilarious that I got a 6/8 on Active Record. I don’t feel anywhere close to a 6/8.
I now think it’s hilarious that I spiked on Testing.
Still not sure how that just happened. The first week of Phase 2 has been an absolute blur, but I’ll try and jump back and give a quick recap of what’s gone down.
Here’s the breakdown.
Week 1: Algorithms
Learning about DBC, its culture, and getting used to my new schedule. What a schedule. Up at 7, home by 12. Biking every day, new friends, and building a Sudoku solver. And recursion. And recursion. And recursion.
Week 2: Object Oriented Programming (OOP)
Learning about objects, classes, and how they play with each other. Aka making orange trees, groves, cookies, and ovens. Scraping websites for information with Nokogiri, parsing CSVs with Ruby, and having my first meltdown.
Week 3: Databases
DATABASES! Designing database schema, the relationships between different tables, and playing with SQLite. Then giving SQLite the middle finger once we start playing with ActiveRecord. Omg ActiveRecord. I NOW HAVE POWERSSSSSS.
Also, fuck congressmen/legislators.
Seeing the Phase 3 kiddies present their final projects was amazing/inspiring/everything. Knowing that they all weren’t going to be here come Monday was weird/sad/everything else.
Phase 2, here we go.