findURL – Custom Google Function Fun

via the magical XKCD Fun being a fairly relative term . . . but I’m amused. The Meat You can write custom functions in Google Spreadsheets and then use them like other built in functions. I didn’t realize that. The script below1 grabs all the URLs from a chunk of text. You could add it to your spreadsheet in Google by going to Tools>Script Editor and opening a blank project. Replace all of the content with this and then save it. You can now use it like other functions by putting =findULR(A1) (assuming A1 is the text chunk you want). It spits out a single cell with the URLs in it on individual lines and with a count of the URLs found at the top of that cell. I’ve commented up the script below in case you want to understand/change it to better suit your needs. Next Steps The regex works well about 90-95% of the time. So it sure beats doing it by hand but it could be improved. You can try your own stuff here. The post I’m using there is pretty messy so it’s a good thing to check against. It’s hard to guess what odd things people will do with URLs. I’ve already seen people doing stuff like “”http://blah.com””. No idea why they did double quotes. […]

13

Documentation – Google Doc Drawing Tip

I’ve created documentation in lots of platforms with lots of people over the last 15 years. These attempts tend to fail, or fail to thrive, for a variety of reasons. I can’t address all of the human factors but I can look harder at a few of the mechanical ones. Here are a few of the questions I ask myself. Who is supposed to be contributing to the documentation? What tools do they use now? What is the fewest number of tools we can use? What enables the most people the easiest path to creating/editing? Based on those considerations, my latest attempt is to use Google Docs. It’s a super common tool that our entire team is familiar with. We can easily make it available online to anyone we want. It’s also a single tool that will all of our basic documentation needs (video is another matter). The place Google Docs doesn’t do well is in creating a public-facing static index or search box for all the content. I’m looking into API options around that at the moment. I a, doing at least one thing that I believe might make a difference. For instance, all of the images are inserted as drawings. That’s a little thing but one that eliminates a tool and allows for flexibility down the road. Ordinarily, […]

08

Copying Google Forms/Sheets Between Users

When working with Google Forms, there are two elements- the sheet (where the responses go) and the form. It’s not obvious how you might allow another user to copy both a form and a sheet in Google. So . . . assuming you set the document so that anyone can see it (or share it directly with whomever) . . . You can append copy to the form URL and it’ll copy the blank spreadsheet and the form. https://docs.google.com/forms/d/1pf0xf1G_-C-p9QXjw1L5BjvZC1SHTGd71hvGBjuFGN4/copy If you append copy to the sheet URL, it’ll copy the spreadsheet with content and the form. https://docs.google.com/spreadsheets/d/1Lrq5sbr-Q_8TFky81OSMFgTO1OnQ8bbN1G05m0q3dVQ/copy

Angular and Google Sheets JSON

flickr photo shared by Kecko under a Creative Commons ( BY-ND ) license Man. This was a slog and really highlighted gross inadequacies in my conceptual understanding of pretty much everything. That being said, with an end-around, it works. The whole thing is below but there were really two pieces where I got stuck and flailed away on Stackoverflow and other places for quite some time. Getting the JSON I always struggle with nested data and getting things right. It seems so stupid simple now . . . response.feed.entry but I’m often unclear when it’s periods, when it’s =>, or when it’s something entirely different. You mix that with a few levels of confusion around the process and you end up with many variables you can screw up. For instance, if I remember correctly response[‘feed’][‘entry’] also works. Searching all of the JSON I’m cheating here. I couldn’t get the scope of the filter to be all of the data returned in the JSON. It kept stopping at the first element- id. So I cheated. I wrote a formula on the spreadsheet to mash all the cells together per row and pointed the filter at that data. Ugly. But functional. I don’t know what it’ll end up being. Not what it is but now that the framework is built, we can […]

03

Weekly Web Harvest (weekly)

Podcast: the only way to get evidence-based policy is to embrace ambiguity in science / Boing Boing “The reality is that, in the world of science and research, the “truth” is messy, and evolving. There’s this moment in an interview that every researcher dreads: “Yes, Dr Knowitall, but are you certain?” But researchers say to me: “The problem is Tracey, people with no scientific discipline can say what they like. They can say we need more prisons to reduce crime, the HPV vaccine is causing chronic fatigue or the climate has warmed by more or less than it has. And in response what do we have? Caveats, probabilities and error bars!” So we keep the messy bits to ourselves. We flatten out uncertainties because we’re afraid that scientific uncertainty will be used against us. Co-opted by extremists. Used as fodder for headlines. Or we stay silent while others do. Because in reality researchers work always with uncertainty. It’s the nature of the beast.” tags: weekly truth lies reality Beware of easy work — Medium tags: weekly philosophy art tweet Peeple | Character is Destiny “Looking at everyone in the three ways you could possibly know someone – personally, professionally and romantically – you can provide a rating and review on everyone you come in contact with, while allowing yourself to […]

Auto Screenshots & New Project Site

Before Mark left us for the green dusty start-up fields of Austin TX we had a conversation about creating a better, faster way to do our examples page. The idea of having a resource like this is always popular but people don’t add content.1 My current belief is that it’s because it’s a hassle and despite good intentions people just don’t do it. After seeing what Mark did to associate users with their blogs in the mother blog plugin, I figured he could also automatically pull the theme, plugins, and admin email of any blog on our system based on the URL . . . and indeed he could. This theme requires Advanced Custom Fields and the Benson plugin to tie in the Angular stuff. The one thing he wasn’t able to do was to auto-generate the screenshot from the URL. I’ve looked into that in the past and done it in a variety of ways but none of them were quite satisfactory. I didn’t really want to end up reliant on a 3rd party system and then Mark sent me http2pic yesterday. So now I just needed to install it and get it working. That led to a bit of an adventure for me. There are directions on the github page but they’re written for someone who is a […]

26

Weekly Web Harvest (weekly)

Overcoming Bias : Forsee The Speakularity ““There’s no way this means that everything we say is now in the open,” Hanson argues. “There’s a layer of what we say that’s in the open … but we’re always talking at several levels at once.” … Our brains adapted to writing, to libraries, and to the Web. They will adapt to the Record. And people will, anyway, continue to be less concerned with how they sound than with how they look.” tags: weekly privacy internet record Defense lawyers of Reddit, what would your defense be for various Disney villains? : AskReddit “Defense lawyers of Reddit, what would your defense be for various Disney villains?” tags: reddit weekly law Megan Fox Posts “I’m Still Here,” Takes Confusing Stance On Object Permanence – StarWipe ““I just continue to have an angsty relationship with social media,” adds Fox, seeming to lend credence to an interpretation of her selfie as offering a conventional understanding of object permanence. Presumably the “I” that has an “angsty relationship” with “social media” is a separate entity from that media, as it is in relation “with” the “social media” rather than “of” it. Still, it is possible to have a relationship “with” oneself. So, strictly speaking, Fox could be referring to the angst she experiences by depending on social media in […]

Complexity

Current rampages.us stats . . . 11,772 sites remain of 11,900 created 12,029 users 229 plugins (not all visible to all users) 229 Themes1 (not all visible to all users) 153 GBs of data You throw a few other elements in there . . . 4 other WordPress installs, a separate server with its own WordPress environment, a Discourse install on Linode . . . you end up with a lot of infrastructure to manage. Things to upgrade, users to support, issues to track down and fix . . . not to mention learning the particularities of different server environments and software packages . . . most of it done on the fly. It’s a lot of pieces and a lot of people. I start to feel like things are complex. I start to understand why people lock stuff down, give users a plugin or two . . . streamline administration. It is sensible. It is hard to keep up and keep track. But I keep thinking about the two billion lines of code that Google deals with and how they do it. Google engineers modify 15 million lines of code across 250,000 files each week. Sure, some code is more locked down than other code but it seems pretty open.2 Clearly I’m not Google and, as is frequently the […]