Non-programmers: This is esoteric. You can safely skip this post.

Now, as a programmer, I hate the with statement. I never use them. Back when I did they were the source of many ridiculous bugs. Saving a few characters in the source while obscuring the meaning of the code. Not a good tradeoff.

However, there is a legitimate use for a with statement, and it's disturbing to see that it's been deprecated in JavaScript. I hope this does not mean that there will ever be a version of JavaScript that doesn't have it.

Here's when you need it: When you're implementing a macro language.

  • with (context) {eval (macro)}

It's the same use-case as the much-maligned eval function.

  • eval used to have a second param, btw, that allowed the caller to provide a context that the code runs in. They took this off, but I wish they hadn't. (Scroll to the bottom of this Mozilla tech note for the historical note.)

  • We added these to Frontier, and were able to do wonderful stuff, like XML-RPC for example.

Imho, eval and with should only be used by people implementing macro environments.

But they are useful. And both with and eval should exist.

12/12/13; 02:42:58 PM

I was getting ready to post an email to a group I'm part of, and was sidetracked by a popup that said I could send $20 to "Mary Green."

  • A picture named moneyThroughGoogle.gif

Here's why it's interesting and/or disturbing

  • Google has become a bank. The transition is complete.

  • Isn't this something like BitCoin?

  • They're putting ads in my own email before I write it? How is that not spam?

  • Get me the fuck out of here.

Here's why I'm freaking out

  • Lately Google has been taking liberties with my email far more than I ever gave them permission to. Yeah, I'm sure legally I did -- or I'm sure they think I did.

  • They make messages disappear as I click on them in the iPad version of GMail. They filter important messages to new tabs they invented, without asking me. Now they're invading a writing space with ads? What??

  • I like that they add features to GMail, but they're really pushing us around, and it's not cool.

12/12/13; 01:13:50 PM

I've been using Facebook for a few months, and I'm sorry I ever stopped using it. It's an important product to understand because so many people use it. If I want to participate in the evolution of post-Facebook technology, I have to have a good idea of what Facebook is. I made Mistake #1 that technologists make. I ain't perfect.

  • I also thought the iPad was a dud, to show how wrong I can be.

Now I think I understand what Facebook is and isn't. It is a place to post pictures of family and friends, to keep people posted on what's up with you. People who you have personal relationships with. It's different from Twitter and LinkedIn, the former is for news, and the latter is for professional relationships. There probably isn't anything unique to each technology that makes it better or worse suited to one of these applications, rather it's the users who have decided how to position them.

Position. That's a very important word, and an idea that all technologists should study and understand. I first focused on it in a great book by Al Ries and Jack Trout called Positioning, the Battle for Your Mind. An even better place to start is the more refined Marketing Warfare, which explores the same ideas as Positioning, viewed as warfare, with the principles of Clausewitz, the great Polish general and writer, as the structure to hang the story off.

What Ries and Trout would tell Mark Zuckerberg, who wants Facebook to be doing what Twitter is doing, is that it can't and it won't. But there is a way to compete with Twitter -- start a new product, with a different name, and position it clearly in the users' minds as a new better Twitter. With some feature Twitter doesn't have, or better, one that Twitter can't have -- that has high value for users.

The classic example in the world of Ries and Trout are the Cola Wars. At the beginning, Coke was #1 and there really was no #2. Until Pepsi discovered that people, if given a choice, would buy as much cola as they could. If the competition sold a tasty cola beverage in a 6.5-ounce bottle, touting it as the perfect size for all, offer a 12-ounce bottle at the same price. And voila, a strong #2 is born. People really did want more. And get this -- Coke had a huge installed base of vending machines that could only serve the smaller bottles. Ooops.

So if I were advising Zuck, I'd say this. Quietly off on the side have a few of your best developers do a total clone of Twitter, but instead of a 140-character limit, make it 240 characters. Add a few nice features beyond that, like the ability to delete a message in your inbox, to get rid of turds without having to block the sender, and offer it up as your answer to Twitter. Leave Facebook right where it is, as the family-friendly networking environment. The DisneyLand of the online world. The next Arab Spring can happen on your Twitter clone.

12/12/13; 10:39:15 AM

Important piece in ComputerWorld quoting General Keith Alexander, director of the NSA.

  • The NSA's bulk collection of U.S. telephone records is the "least intrusive" way to track suspected terrorists' communications with people in the U.S., General Keith Alexander said, defending the NSA's mass data collection and surveillance programs to the U.S. Senate Judiciary Committee.

  • "If we can come up with a better way, we ought to put it on the table and argue our way through it," Alexander said. "There is no other way that we know of to connect the dots."

Clever technique to direct the questioning where he wants it to go. But...

That isn't where I'd begin the questioning. And I don't have any questions for a specific US general, rather for the US in general.

Do we want to trade off freedom for security? Because that's what we're giving up. Then, if we decide we'd forgo the freedom, and that has to be more than a majority that chooses it, then we can talk about what the best methods are to gather data.

We never had the first discussion. We never decided to take the kinds of risks the NSA is taking, in secret, on our behalf (supposedly) with our freedom.

BTW, I'm no expert, but I don't think the Constitution gives us the option to forego freedom. Which is wise, because how could we decide to do it? Certainly someone would object.

12/12/13; 10:17:59 AM

Last built: Fri, Mar 14, 2014 at 12:29 PM

By Dave Winer, Thursday, December 12, 2013 at 10:17 AM.