Node.JS twitter bots, Twitch streams, Base Class inheritance and other fun buzzwords so you can read my tech livejournal.



LAST WEEK

I worked on twitch. Brandon and I  tried to incorporate this blog into my website Metzinaround.com, and got stuck trying to use an iFrame. It was a little weird at first, trying to find a way to make the iFrame fit the whole window. We had to consider the div it was in and make sure that THAT was sized correctly. Eventually, we got it to fill the whole window by adjusting WHERE we put it and adjusting the layout. Turns out, you can nullify the layout page by marking it at the top of the page. We're using razor pages so we just dropped an @ { } and inside the brackets wrote "Layout = null;" and this got rid of the problem. Our code for making the iFrame fit the whole page is here. 


We also went to try and size the picture on the blog using a CSS injection on the blogger site, it went ok, but it's still not perfect. That will need some work later on. Pyerock, an old friend of mine, jumped on Brandon's and my stream to help us figure it out. All in all, it was a good session, but it also took so much time to figure out. It was a little harrowing to see us spend 2.5 hours on something that seemed to be simpler at first. That's all well and good. 


THIS WEEK

Brandon and I worked on Your New Favorite Poem this weekend, thinking we could get a new database table going and try to create a foreach loop in the index page rather than the hundred plus lines of code already there. To do this we changed the current database code into a base class that could be used by other classes through inheritance. This was something I'd done once before in practice, but Brandon was great at walking me through it. We got through it, it worked, it ran, but then we tried to get rid of a constructor and ran up to our self set time limit. After working for 2.5 hours, we had sort of broken the code, but this weekend we're gonna get it all working again. He taught me how to branch on github and now I've got a master branch that works and a new branch that doesn't. Looking forward to getting that working soon. Here's the full video of us working on the website. The stream is Sundays at noon at twitch.tv/metzinaround

Chloe and I got together as well, trying to figure out how to deploy Shania bot, as well as how to add some different functions to her. We're working on a few articles for her to try and help other people who want to use node.js to build a twitter bot. This means eventually I'll be creating a Dev.to article, but that's for another time I suppose. 

As this tropical storm scrapes through Central Florida, I'm looking forward to thanksgiving break in a week. The kids AND the teachers really need it this year. A full week off and then just three weeks of school before Christmas break. It seems so close and distant at the same time. Just trying to make it day by day and hope that I'm doing a good job by my students. 

Either way, keep an eye out for those dev.to articles, and keep checking back here for more of what I'm doing as I try to get into tech. 

Comments

Popular Posts