Debugging and Web Components and NodeBots, oh my!

I’d like to blame it on the dog, but she’s doing alright. Mostly, I just haven’t made time for myself to write this past week. I have a reminder on my calendar but I ignore it. So what good does it do then? Blech. This has been a pretty good week though, all things considered. Just distracting because of dog and other family stuff. You know. Life.

I learned last Tuesday, at our local web developer meetup, that Google’s AMP project uses Web Components behind the scenes. What a neat technology stack that is! I’ve been using Web Components at work, so this was a great opportunity to learn by comparing implementations. One thing I really like about AMP’s implementation is their more granular lifecycle methods. The documented lifecycle methods that are available to custom elements include callbacks for element registration and insertion, as well as element removal and attribute changes. AMP expands this to include many other methods, including a firstAttachedCallback which only is run the first time the element is inserted in the DOM, a layoutCallback when elements are first laid out (or every time, depending on implementation), viewportCallback that runs when elements enter or exit the viewport, pauseCallback and resumeCallback that initially seem to be useful for things like video but could be used for making things active/inactive, and an unlayoutCallback for freeing up resources on an element being removed.

Outside of work-related things, I’ve gotten a new student with Thinkful and we’re covering material for Node.js, which is a blast. Debugging is a bit frustrating in Node, but it’s fun watching someone struggle and then figure things out. It is a supremely rewarding process to be a part of. Thankfully a lot of what we’re working on builds on prior learnings from earlier in the curriculum. So now we’re not only consuming an API with a front-end application as learned earlier in the course, but now we’re *building* one! Thankfully frameworks like Express make this task pretty straightforward. Soon we’re going to dive into Mongo to add a database layer to the application.

I’ve also been making an effort to start organizing an International NodeBots Day event here in Rockford. I’ve done some research on parts kits and what it would take in terms of components and cost to let every attendee leave with a kit. I think I can get the cost down to ~$30/kit for a Sumobot, which is pretty good. This will be using Arduino clones and 3d-printed frames, and I’m not really closely accounting for material cost for the frames, but I think this is reasonable. It would be nice if servos were cheaper as well. Now to find some sponsorships… Oh, and probably would be good to start marketing this idea as well. I just love the idea of having a set of simple APIs that let you program robots and other real world things with JavaScript. I can’t wait to share it with my local community in a more open and inviting way.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.