logo
EverydayChaos
Everyday Chaos
Too Big to Know
Too Big to Know
Cluetrain 10th Anniversary edition
Cluetrain 10th Anniversary
Everything Is Miscellaneous
Everything Is Miscellaneous
Small Pieces cover
Small Pieces Loosely Joined
Cluetrain cover
Cluetrain Manifesto
My face
Speaker info
Who am I? (Blog Disclosure Form) Copy this link as RSS address Atom Feed

October 29, 2019

Late, breaking Android app news: transcription

Note that this is not late-breaking news. It’s breaking news brought to you late: Android contains a really great Google transcription tool.

Live Transcribe transcribes spoken text in real time. So far, it seems pretty awesome at it. And its machine learning model is loaded on your device, so it works even when you’re offline — convenient and potentially less intrusive privacy-wise. (Only potentially, because Google could upload your text when you connect if it wanted to.)

You can download Live Transcribe from the Play Store, but if you’re like me, it will only give you an option to uninstall it. Oddly, it doesn’t show up in my App drawer. You have to go to your phone’s Settings > Accessibility screen and scroll all the way down to find the Live Transcribe option.

Once you turn it on, you’ll get an icon all the way at the bottom of your screen, to the right of the Home button. Weird that it’s given that much status, but there it is.

I expect I will be using this tool with surprising frequency … although if I expect it, it won’t be surprising.

Tweet
Follow me

Categories: tech Tagged with: ai • apps • machine learning • transcription • utilities Date: October 29th, 2019 dw

Be the first to comment »

July 10, 2019

Learning AI by doing: My new series of posts

The first in a series of six posts about my experiences learning how to train a machine learning system has just been posted here. There’s no code and no math in it. Instead it focuses on the tasks and choices involved in building one of these applications. How do you figure out what sort of data to provide? How do you get that data into the system? How can you tell when the system has been trained? What types of controls do the developers have over the outcomes? What sort of ways can I go wrong? (Given that the title of the series is “The Adventures of a TensorFlow.js n00b” the answer to that last question is: Every way.)

I was guided through this project by Yannick Assogba, a developer in the machine learning research group — People + AI Research –I’m embedded in at Google as a writer in residence. Yannick is natural born teacher, and is preternaturally patient.

The series is quite frank. I make every stupid mistake possible. And for your Schadenfreude, five more posts in this series are on their way…

.

Tweet
Follow me

Categories: ai, tech Tagged with: ai • machine learning • PAIR Date: July 10th, 2019 dw

Be the first to comment »

June 29, 2019

Updating Joho’s style

At long last I’m getting around to updating Joho’s look, for several reasons:

First, my last redesign made the page look like it was designed in 1999, although I actually did the redesign about seven years ago, I think.

Second, CSS has made it easy enough to avoid using a table as the container for all of the contents of the page. That was always a hack but, it was easier than dealing with floats, etc., for a multicolumn design.

Third, it was especially easy to move away from using a table because I’ve given up on a multicolumn design. That has meant for now stripping out some early 2000s goodness, including my link-rotted blogroll, categories list, and archives. I plan on adding back my blogroll, if only as an historic artefact, via an overlay.

Fourth, the page page needs to be more readable in the mobile camera phones that the kids all use what with their Facebooking, and Chapnapping, and all the rest. I have by no means done all the work required to make this page truly responsive (Everyday Chaos is my best attempt at employing a modified a responsive template), but I’m hoping it will be responsive enough for the kids who are used to their Facebroking and Snoopchitting and all the rest.

Fifth, Medium.com‘s elegant design redefined what a blog should look like. Yes, that was like 18 years ago, but I was too busy with my Facebokchoying and Schnapssbapping to get around to it. Medium not only transformed our expectations about the tools for writing a post, but also about the reading experience: easy to take in, elegant, content-focused. So, I have increased the font size, removed the distracting sidebar, and I hope made it a more inviting page.

I’m obviously not done. For example, I haven’t yet gotten around to updating the page that shows a single post. But I’m happy so far with the redesign. Or, to put that more accurately, I’m somewhat less embarrassed by the page.

Until design tastes change again.

Aaaand, they just did.

Tweet
Follow me

Categories: blogs, tech Tagged with: css • design • style Date: June 29th, 2019 dw

Be the first to comment »

March 8, 2019

Keep JavaScript dumb

I’ve been a hobbyist programmer since I got my first computer in 1984 or so. I greatly enjoy it and I’m terrible at it.

I mainly use JS to create utilities for myself that take me 1,000 hours to write and save me a lifetime of 45 seconds. I like Javascript for tawdry reasons: It’s straightforward, there’s a huge collection of libraries, any question I might ever have has already been asked and answered at StackOverflow, and I get to see the results immediately on screen. It’s of course also useful for the various bush league Web sites I occasionally have to put up (e.g., Everyday Chaos). Also, jQuery makes dumb HTML (DOM) work easy.

But here’s the but…

But, ECMA is taking JS in a terrible direction: it’s turning it professional, what with the arrow functions and the promises, etc. If you’re a hobbyist who enjoys programming for the logic of it, the new stuff in JS hides that logic on behalf of things I happen not to care about like elegance, consistency, and concision.

Now, I know that I don’t have to use the new stuff. But in fact I do, because the community I rely on to answer my questions — basically StackOverflow — increasingly is answering with the new stuff.

There’s a reason JS became the most used language on the planet: not only can you do webby stuff with it, it has a pretty linear learning curve. Now I literally feel like I’m in danger of losing “View Source” from my browser … literally because while I can view the source, increasingly I can’t understand it.

I’m going to lose this argument. I already have lost it. I should lose it. My position is wrong. I know that. Nevertheless, I stand firmly on the wrong side of history as I declare in my lonely, quavering voice: Keep. JavaScript. Dumb.

Tweet
Follow me

Categories: programs, tech Tagged with: javascript • programming Date: March 8th, 2019 dw

1 Comment »

January 22, 2019

When your phone won’t walk a tree

If your Android phone no longer generates tones that work when you’re asked to “Press 1 to … do something” Pixel support says go to Settings > Apps > Phone. Touch the three dots in the upper right, select “Uninstall updates” and restart your phone. Worked for me.

My list of recent calls was preserved. Yay. But presumably Google is working on a more elegant solution.

Tweet
Follow me

Categories: tech Tagged with: android • how-to Date: January 22nd, 2019 dw

2 Comments »

November 25, 2018

Using the Perma.cc API to check links

My new book (Everyday Chaos, HBR Press, May 2019) has a few hundred footnotes with links to online sources. Because Web sites change and links rot, I decided to link to Perma.cc‘s pages instead . Perma.cc is a product of the Harvard Library Innovation Lab, which I used to co-direct with Kim Dulin, but Perma is a Jonathan Zittrain project from after I left.

When you give Perma.cc a link to a page on the Web, it comes back with a link to a page on the Perma.cc site. That page has an archive copy of the original page exactly as it was when you supplied the link. It also makes a screen capture of that original page. And of course it includes a link to the original. It also promises to maintain the Perma.cc copy and screen capture in perpetuity — a promise backed by the Harvard Law Library and dozens of other libraries. So, when you give a reader a Perma link, they are taken to the Perma.cc page where they’ll always find the archived copy and the screen capture, no matter what happens to the original site. Also, the service is free for everyone, for real. Plus, the site doesn’t require users to supply any information about themselves. Also, there are no ads.

So that’s why my book’s references are to Perma.cc.

But, over the course of the six years I spent writing this book, my references suffered some link rot on my side. Before I got around to creating the Perma links, I managed to make all the obvious errors and some not so obvious. As a result, now that I’m at the copyediting stage, I wanted to check all the Perma links.

I had already compiled a bibliography as a spreadsheet. (The book will point to the Perma.cc page for that spreadsheet.) So, I selected the Title and Perma Link columns, copied the content, and stuck it into a text document. Each line contains the page’s headline and then the Perma link.

Perma.cc has an API that made it simple to write a script that looks up each Perma link and prints out the title it’s recorded next to the title of the page that I intend to be linked. If there’s a problem with Perma link, such as a double “https://https://” (a mistake I managed to introduce about a dozen times), or if the Perma link is private and not accessible to the public, it notes the problem. The human brain is good at scanning this sort of info, looking for inconsistencies.

Here’s the script. I used PHP because I happen to know it better than a less embarrassing choice such as Python and because I have no shame.

1

<?php

 

2

// This is a basic program for checking a list of page titles and perma.cc links

3

// It’s done badly because I am a terrible hobbyist programmer.

4

// I offer it under whatever open source license is most permissive. I’m really not

5

// going to care about anything you do with it. Except please note I’m a

6

// terrible hobbyist programmer who makes no claims about how well this works.

7

//

8

// David Weinberger

9

// [email protected]

10

// Nov. 23, 2018

 

11

// Perma.cc API documentation is here: https://perma.cc/docs/developer

 

12

// This program assumes there’s a file with the page title and one perma link per line.

13

// E.g. The Rand Corporation: The Think Tank That Controls America https://perma.cc/B5LR-88CF

 

14

// Read that text file into an array

15

$lines = file(‘links-and-titles.txt’);

 

 

16

for ($i = 0; $i < count($lines); $i++){

17

$line = $lines[$i];

18

// divide into title and permalink

19

$p1 = strpos($line, “https”); // find the beginning of the perma link

20

$fullperma = substr($line, $p1); // get the full perma link

21

$origtitle = substr($line, 0,$p1); // get the title

22

$origtitle = rtrim($origtitle); // trim the spaces from the end of the title

 

23

// get the distinctive part of the perma link: the stuff after https://perma.cc/

24

$permacode = strrchr($fullperma,”/”); // find the last forward slash

25

$permacode = substr($permacode,1,strlen($permacode)); // get what’s after that slash

26

$permacode = rtrim($permacode); // trim any spaces from the end

 

27

// create the url that will fetch this perma link

28

$apiurl = “https://api.perma.cc/v1/public/archives/” . $permacode . “/”;

 

29

// fetch the data about this perma link

30

$onelink = file_get_contents($apiurl);

31

// echo $onelink; // this would print the full json

32

// decode the json

33

$j = json_decode($onelink, true);

34

// Did you get any json, or just null?

35

if ($j == null){

36

// hmm. This might be a private perma link. Or some other error

37

echo “<p>– $permacode failed. Private? $permaccode</p>”;

38

}

39

// otherwise, you got something, so write some of the data into the page

40

else {

41

echo “<b>” . $j[“guid”] . ‘</b><blockquote>’ . $j[“title”] . ‘<br>’ . $origtitle . “<br>” . $j[“url”] . “</blockquote>”;

42

}

43

}

 

 

44

// finish by noting how many files have been read

45

echo “<h2>Read ” . count($lines) . “</h2>”;

 

46

?>

Run this script in a browser and it will create a page with the results. (The script is available at GitHub.)

Thanks, Perma.cc!



By the way, and mainly because I keep losing track of this info, the table of code was created by a little service cleverly called Convert JS to Table.

Tweet
Follow me

Categories: free-making software, humor, tech Tagged with: api • open platform • perma • utilities Date: November 25th, 2018 dw

1 Comment »

October 12, 2018

How browsers learned to support your system's favorite font

Operating systems play favorites when it comes to fonts: they pick one as their default. And the OS’s don’t agree with one another:

chart of system fonts
From https://furbo.org/stuff/systemfonts-new.html

But now when you’re designing a page you can tell CSS to use the system font of whatever operating system the browser is running on. This is thanks to Craig Hockenberry who proposed the idea in an article three years ago. Apple picked up on it, and now it’s worked it’s way into the standard CSS font module and is supported by Chrome and Safari; Windows and Mozilla are lagging. Here’s Craig’s write-up of the process.

Here’s a quick test of whether it’s working in the browser you’re reading this post with:

This sentence should be in this blog’s designated font: Georgia. Or maybe one of its serif-y fall-backs.

This one should be in your operating system’s standard font, at least if you’re using Chrome or Safari at the moment.

We now return you to this blog’s regular font, already in progress.

Tweet
Follow me

Categories: tech Tagged with: css • fonts • standards Date: October 12th, 2018 dw

Be the first to comment »

August 4, 2018

Unlocking picture frames in Keynote 8

In 2015, I posted about a way to unlock the picture frames that for some reason ship with Keynote but are not accessible within Keynote. They’re there but they don’t show up on the pull down, so you can’t use them.

In 2018, with Keynote at version 8 + change, the same technique works. With the same warnings. So, if you want to give yourself considerably more than the 14 frames that the menu shows you, go here, follow the instructions carefully, and most important: do not blame me. (The replacement file I link to still seems to work.)

Tweet
Follow me

Categories: misc, tech Tagged with: keynote • unlock Date: August 4th, 2018 dw

Be the first to comment »

June 18, 2018

Google Docs named versions

Google Docs’ version history functionality is getting to be really powerful and useful. Named versions help tame that power.

Google Docs automatically saves versions as you type so you can roll back to a prior state of your document at any point. In fact, you can roll back, copy a piece of it, roll forward, and paste in text from your past.

But because Google Docs makes so many versions and does so without asking you, suppose you want to go back to a version from earlier in the day before you cut that paragraph about secretly enjoying Paw Patrol? Google labels each automatically-created version with a time stamp, but you happened not to have memorized the precise time you made the change.

Now you can give a friendly name to a version. So let’s say you’re about to cut the Paw Patrol paragraph, but you’re not sure that you should. Before you make the cut, go to File > Version history > Name current version and give it a name such as “With Paw Patrol”. (If you want to be perverse, use the current hour and minute as the time. That’ll get you nowhere fast.) That name will show up in the list of versions under File > Version history > See version history.

Now when you cut the paragraph or make other changes, you’ll always be able to go back.

Meanwhile, Google will continue to automatically create new versions, capturing quite small increments of change. If you want to step back through the changes you’ve made since you named a version, click on the triangle to the left of the current version at the top of the version history.

Also, note that when you click on a version in the version history, it highlights the difference between the prior version and this one.

Note that comments are not saved with versions. Let me put this differently: When you restore a prior version, it will not have any of its comments. This is unfortunate.

Nevertheless, there are some big things not to like about Google Docs, but versioning definitely is not one of them.

Tweet
Follow me

Categories: tech Tagged with: document management • how-to Date: June 18th, 2018 dw

Be the first to comment »

January 7, 2018

[javascript] Displaying entries’ initial letter when scrolling

I’m more surprised than proud that I got this to work, but here’s some JavaScript that slides down a box when the user scrolls an alphabetized table and slides that box back up once the user stops. While the user continues scroll up or down the page, the box displays the first letter of the row at the top. When the user stops scrolling for about a tenth of a second, the box goes away.

Note that when I say that “I got this to work,” what I really mean is that I successfully copy-and-pasted code from StackOverflow into the part of my script that runs when the script is first loaded. And when I say “JavaScript” I really mean “JavaScript using the jQuery library along with the Visible plugin that I think I actually don’t need but I couldn’t get jQuery’s is(":visible") to work the way I thought it should.

So here’s an annotated walkthrough of the embarrassing code.

The first part notices the scrolling, shows the box, and fills it with the first letter of the relevant column of the table the page is displaying. (Thank you, Stackoverflow!)

programming code

The second part comes from another StackOverflow question. It notices when someone has stopped scrolling for 0.15 seconds and hides the block displaying the letter. And, yes, it could probably be combined with the first bit.

This is amateurish hackery. I understand that. But I’m an amateur. I’m not writing production code. I don’t have to worry about performance: this code works fine for scrolling 350 rows of a text-only table, but might crap out with 1,000 lines or 5,000 lines. At least it works fine so far. On the current versions of Chrome and Firefox. Under a waxing moon. I understand that I can get this far only because millions of real developers have posted their own code, and answered questions from fools like me. My hat is off to you.

 


 

For your copying-and-pasting convenience, here’s the code in copy-able form. (Click on the “Toggle line numbers” button on the bottom.)

 

1

var mywindow = $(window); // get the window within which

2

// the page is being displayed

3

var mypos = mywindow.scrollTop();

4

var newscroll;

 

5

// add a function that’s called whenever the window is scrolled

6

mywindow.scroll(function () {

7

newscroll = mywindow.scrollTop(); // the scroll bar indicator’s

8

// vertical position

9

// Go through the rows of the table to find the one currently at the top.

10

// I am undoubtedly doing this embarrassingly inefficiently.

11

var letter = “”, done = false, i = 0;

12

// loop until we find the row at the top or we’ve looked at all rows

13

while (!done){

14

var title = $(“#title” + i); // id of the cell with the phrase the

15

// table is sorted on

16

if ( $(title).visible() == true){ // Unnecessary use of the

17

// Visible plugin

18

var currentTopRow = i;

19

done = true;

20

// Get the first letter of the relevant cell

21

letter = $(title).text().substr(0,1).toUpperCase();

22

// put the letter into the box that will display it

23

$(“#lettercontent”).text(letter);

24

}

25

//

26

i++;

27

// if we’ve checked all the rows and none is visible

28

if (i >= gData.length){ // gData is the array the table is built from

29

done = true;

30

letter = “?”;

31

}

32

}

33

// display the box with the letter

34

$(‘#bigletter’).slideDown();

35

mypos = newscroll;

36

});

 

37

// hide letter block when scrolling stops

 

38

var scrollpausetimer = null; // create a timer to note

39

// when scrolling has stopped

40

$(window).scroll( function() {

41

if(scrollpausetimer !== null) {

42

clearTimeout(scrollpausetimer);

43

}

44

scrollpausetimer = setTimeout(function() {

45

// hide the letter block

46

$(‘#bigletter’).slideUp();

47

}, 150); // 150 is the pause to be noticed in 1/1000ths of a sec

48

}, false);

 

Javascript converted into html by this.

Tweet
Follow me

Categories: tech Tagged with: javascript • jquery • scrolling • techie Date: January 7th, 2018 dw

Be the first to comment »

« Previous Page | Next Page »


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
TL;DR: Share this post freely, but attribute it to me (name (David Weinberger) and link to it), and don't use it commercially without my permission.

Joho the Blog uses WordPress blogging software.
Thank you, WordPress!