Twitter Joints and Project Goods

Bradley Momberger's project notes, & other software stuff that's interesting.

CanJS nodeLists and How They Work

Bradley Momberger •

This document is a draft of a Markdown reference file for can-view-nodelist. I’ve been trying to write up a deep understanding of how this library works, because it’s vital to the CanJS view layer yet somewhat obscure. Trying to work on new versions of can-stache or even new templating languages necessitates knowing the lower level view libraries inside and out.

Early 2016 Update

I thought I’d just write a brief post to talk about some cool things that made their way through my production pipeline in the last few months. I wrote about the relaunch of my website in a post more than a year ago and Twitter Lib for Google Apps Script not long after. Then there hasn’t been much. I have lots of half-finished drafts in my Drafts folder that ran out of steam and kind of lost the original point (editing is hard), but I hope to get the majority of those out to you in the near future. In the meantime, here’s the things I’ve put together since I moved out of San Francisco.

Best Practices with Git and Private Data

Bradley Momberger •

Every so often a newish bot writer will ask “Where should I put my bot’s private data? It shouldn’t be on GitHub, right?” The suspicion underlying the latter question is correct; developers need a different strategy for releasing/maintaining source code vs. managing config data for deployment. But knowing what developers shouldn’t do in this case does not indicate what they should do.

New version of Twitter Lib Explained

Bradley Momberger •

Twitter Lib for Google Apps Script is now at version 16. If you’ve created older app scripts based on Twitter Lib version 11 or below, they will not work with the new lib without some conversion. Version 12 of this library was motivated by the old method of OAuth authentication being officially dropped from Apps Script. A long-deprecated version was available until recently, which better supported standalone scripts and a simple, more procedural style of Tweeting.

JavaScript String Handling and Emoji

Bradley Momberger •

While working on a minor improvement for @swagspiration today, I found an few interesting facts about both the implementation of strings in JS which allows for emoji, and also a tricky behavior in Chrome (probably a bug).

Art Bot Walkthrough part 4: Adding the Bot to the Art

Bradley Momberger •

After Part 3, we had a fully functioning image maker that was saving the canvas to the filesystem as a file. The next steps to actually making this a bot are to set up the connection to Twitter, post the media and the tweet content, and set up recurrence so this runs on a regular basis.

Art Bot Walkthrough Part 3: Tying It Together

Bradley Momberger •

Last time we took some detours to try to figure out how to better draw a grid with jitter in both the horizontal and vertical dimensions. We tried backtracking to the left and upwards from cells in the bottom right, but it caused odd overlaps. In the end, after a few failed attempts, a better method was called for.

CSS3 Fun From My New Website

Bradley Momberger •

So I just finished revamping my website, on which I’ve been working with regularity for some two weeks. The last time I did up my website was in 2003, and it was both the manifestation of a starry-eyed desire to get my friends into an art collective with me, and a fairly dry two-column layout I had built up in Dreamweaver. A lot changes on the web in 12 years, and so I’ve tried to incorporate as much of the new hotness from CSS3 as I can, and even a touch of HTML5 goodness.

Art Bot Walkthrough 2: Failures at Refinement

Bradley Momberger •

Last time we went through the process of prototyping an approximation of random Mondrian paintings. Now we have an issue to work through, in that a real Mondrian isn’t perfectly divided along the vertical lines. Let’s try to account for that.

Making an Art Bot, a Walkthrough

I had a great idea, to make a bot that could recreate abstract art in the style of several artists to make a fake art gallery. This is generally too big a scope for a regular Twitter bot project so I started with one that’s comparatively easy to replicate in code: Mondrian and his Neoplasticism style. The most famous Neoplastic works were perfectly vertical and horizontal black lines forming a grid on a white canvas, with some of the interior rectangles made by the grid filled with primary-ish color fields. This should be fairly easy to randomize and draw on an HTML canvas; this article is detailing the process by which the bot code was created and made ready for deployment to eventually power @neoplastibot.