MacBook, defective by design banner

title:
Put the knife down and take a green herb, dude.


descrip:

One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com

Using 89% of the same design the blog had in 2001.

FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white.

As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green.

x

MarkUpDown is the best Markdown editor for professionals on Windows 10.

It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support.

Features you won't find anywhere else include...

You've wasted more than $15 of your time looking for a great Markdown editor.

Stop looking. MarkUpDown is the app you're looking for.

Learn more or head over to the 'Store now!

Saturday, March 25, 2023

From neowin.net:

Oddly enough,ย a documentary called "Code: Debugging the Gender Gap"ย would seem to dispute the notion that Clippy was popular with focus groups before its launch. Former Microsoft executive Roz Ho stated."

Most of the women thought the characters were too male and that they were leering at them. So weโ€™re sitting in a conference room. Thereโ€™s me and, I think, like, 11 or 12 guys, and weโ€™re going through the results, and they said, โ€˜I donโ€™t see it. I just donโ€™t know what theyโ€™re talking about.โ€™ And I said, โ€˜Guys, guys, look, Iโ€™m a woman, and Iโ€™m going to tell you, these animated characters are male-looking.โ€™

Omg. They're absolutely right.

Be as open to seeing bias as you'd like, you will always have a blindspot. Until today, this was one of mine.

Labels: , , ,


posted by ruffin at 3/25/2023 06:14:00 PM
Wednesday, January 27, 2021

Remember Joel Spolsky's "Let Me Go Back" letter? I do.

Microsoft, specifically Microsoft Office, doesn't.


I'm obviously trying to save the file to my local drive. And I obviously would prefer not to have to navigate that horrendous UI Word has now to move from OneDrive to my drive.

For an app that still impressively honors old keystroke recipes -- like alt-I, B (alt-insert, break) to insert a page break -- this really offends me (haha) as a user. They are actively preventing you from saving to your drive. (This is not new. This is simply the first time I got aggravated enough to post.)

This is not progress. This is a commercial for OneDrive.



Okay, as you might expect, this is almost fixable.


And this is heavenly by comparison...


... but...


  1. It's not discoverable, and... 
  2. Let's not pretend it's an actual fix that recreates the old behavior. 
The new dialog remains objectively worse:


Fewer keystrokes is better! Let me go back!

Labels: , , , , , , ,


posted by ruffin at 1/27/2021 10:05:00 AM
Friday, October 14, 2016

Let's talk HTML Fragments in your clipboard when coding on Windows. I've created what's arguably the best Markdown editor on Win10 (if I do say so myself), and wanted it to be more intelligent when I was pasting content that comes from web browsers. That is, in the original version of MarkUpDown, if you copied the text I've got highlighted, below, from DaringFireball...

Quote from Walt Mossberg on Siri plus a little bit from Gruber, now with visible context menu saying "Copy"

... and you pasted it into MarkUpDown as a quotation (Ctrl-Shift-V), you'd get unstyled text, like this...

> Mossberg:
> For instance, when I asked Siri on my Mac how long it would take me to get to work, it said it didnโ€™t have my work address โ€” even though the โ€œmeโ€ contact card contains a work address and the same synced contact card on my iPhone allowed Siri to give me an answer.
> Similarly, on my iPad, when I asked what my next appointment was, it said โ€œSorry, Walt, somethingโ€™s wrongโ€ โ€” repeatedly, with slightly different wording, in multiple places on multiple days. But, using the same Apple calendar and data, Siri answered correctly on the iPhone.
> These sort of glaring inconsistencies are almost as bad as universal failures. The big problem Apple faces with Siri is that when people encounter these problems, they stop trying.

I mean, that's okay-ish. Unfortunately, you'd have to go put in an additional line after each line so that it's not all scrunched into one paragraph. And you lose that Gruber was block-quoting Mossberg. And you lose that "they stop trying" was originally in italics. That stinks.

Isn't Markdown really supposed to be shorthand for html? Can't we handle pasting html better than that?

Yes, yes we can...


TL;DR

Go pull the HtmlFragmentHelper, a working, in-progress library for turning HTML Fragment strings into view models with these properties...

public class HtmlFragmentViewModel
{
    public string Version = "";
    public int StartHtml = int.MinValue;
    public int EndHtml = int.MinValue;
    public int StartFragment = int.MinValue;
    public int EndFragment = int.MinValue;
    public string SourceUrl = "";
    public string FragmentSourceRaw = "";
    public string Error = "";

    //...
}

There are also several convenience methods to help you get, say, the top- and second-level domains for the HTML Fragment's source URL (example.com from http://blog.example.com/user/blog0000231.html), or just the html from the selected fragment (myHtmlFragmentViewModel.FragmentSourceParsed), etc.

Here's an example:

public string CreateQuote(string htmlFragmentSource) 
{
    string strIntroLink = string.Empty;
    HtmlFragmentViewModel vm = new HtmlFragmentViewModel(htmlFragmentSource);

    if (vm.SourceUrl.Length > 0 && vm.SourceUrlDomainSecondAndTopLevelsOnly.Length > 0)
    {
        strIntroLink = string.Format("From <a href=\"{0}\">{1}</a>:" + Environment.NewLine + Environment.NewLine,
            vm.SourceUrl, vm.SourceUrlDomainSecondAndTopLevelsOnly);
    }

    return strIntroLink + vm.FragmentSourceParsed;
}

Read how to use it here. Get it from GitHub, though the only file you really need is here.

And here's a quick article on how to get code back into the clipboard as html, which I'm not doing.


HTML Fragment Format

Want to paste clipboard HTML as HTML? Enter Microsoft's HTML clipboard format. Instead of using the standard code to read the clipboard's contents, like this...

string clipboardText = await Clipboard.GetContent().GetTextAsync();

... now you use this...

string htmlClipboardText = await Clipboard.GetContent().GetHtmlFormatAsync();

But when you look at the contents of htmlClipboardText, you quickly notice that strange things are afoot at the Circle K.

What number are you thinking of?

What comes back isn't a string with html source, but an "HTML Fragment" formatted string that looks like this:

HTML Fragment from Edge

Version:1.0
StartHTML:000000210
EndHTML:000003550
StartFragment:000002696
EndFragment:000003500
StartSelection:000002696
EndSelection:000003496
SourceURL:http://daringfireball.net/2016/10/mossberg_siri
<!DOCTYPE HTML>
<HTML lang="en"><HEAD>       <!-- Open Graph [jive] --> <!-- 
    <meta property="og:site_name"   content="Daring Fireball" />
    <meta property="og:title"       content="Walt Mossberg: โ€˜Why Does Siri Seem So Dumb?โ€™" />
    <meta property="og:url"         content="http://daringfireball.net/2016/10/mossberg_siri" />
    <meta property="og:description" content="In addition to the engineering hurdles to actually make Siri much better, Apple also has to overcome a โ€œboy who cried wolfโ€ credibility problem." />
    <meta property="og:image"       content="https://daringfireball.net/graphics/df-square-192" />
    <meta property="og:type"        content="article" />
 -->         <!-- Twitter Card [jive] -->                    <TITLE>Daring Fireball: Walt Mossberg: โ€˜Why Does Siri Seem So Dumb?โ€™</TITLE>        <LINK href="/graphics/apple-touch-icon.png" rel="apple-touch-icon-precomposed">     <LINK href="/graphics/favicon.ico?v=005" rel="shortcut icon">   <LINK href="/graphics/dfstar.svg" rel="mask-icon" color="#4a525a">  <LINK href="/css/fireball_screen.css?v1.7" rel="stylesheet" type="text/css" media="screen">     <LINK href="/css/ie_sucks.php" rel="stylesheet" type="text/css" media="screen">     <LINK href="/css/fireball_print.css?v01" rel="stylesheet" type="text/css" media="print">    <LINK href="/feeds/main" rel="alternate" type="application/atom+xml">   
<SCRIPT src="/mint/?js" type="text/javascript" async=""></SCRIPT>

<SCRIPT src="http://www.google-analytics.com/ga.js" type="text/javascript" async=""></SCRIPT>

<SCRIPT src="/js/js-global/FancyZoom.js" type="text/javascript"></SCRIPT>

<SCRIPT src="/js/js-global/FancyZoomHTML.js" type="text/javascript"></SCRIPT>
     <LINK title="Home" href="/" rel="home">     <LINK href="http://df4.us/pfz" rel="shorturl">  <LINK title="Apple Responds to Dash Controversy" href="http://daringfireball.net/2016/10/apple_dash_controversy" rel="prev">    
<SCRIPT src="http://daringfireball.net/mint/?record&amp;key=383950464d37374b39333637695970466458724e6779513431&amp;referer=&amp;resource=http%3A//daringfireball.net/2016/10/mossberg_siri&amp;resource_title=Daring%20Fireball%3A%20Walt%20Mossberg%3A%20%u2018Why%20Does%20Siri%20Seem%20So%20Dumb%3F%u2019&amp;resource_title_encoded=0&amp;window_width=1756&amp;window_height=921&amp;resolution=2438x1371&amp;flash_version=0&amp;1476397798179&amp;serve_js" type="text/javascript"></SCRIPT>
</HEAD><BODY onload="setupZoom()"><DIV id="Box"><DIV id="Main"><DIV class="article"><!--StartFragment--><P>Mossberg:</P><BLOCKQUOTE><P>For instance, when I asked Siri on my Mac how long it would take me to get to work, it said it didnโ€™t have my work address โ€” even though the โ€œmeโ€ contact card contains a work address and the same synced contact card on my iPhone allowed Siri to give me an answer.</P><P>Similarly, on my iPad, when I asked what my next appointment was, it said โ€œSorry, Walt, somethingโ€™s wrongโ€ โ€” repeatedly, with slightly different wording, in multiple places on multiple days. But, using the same Apple calendar and data, Siri answered correctly on the iPhone.</P></BLOCKQUOTE><P>These sort of glaring inconsistencies are almost as bad as universal failures. The big problem Apple faces with Siri is that when people encounter these problems, <EM>they stop trying</EM>.</P><!--EndFragment--></DIV></DIV></DIV></BODY></HTML>

Wow. No, really, wow. That surprised me. I was using Edge this time instead of Chrome, and whoa. Edge includes the entire page's header. That said, that's really not a horrible idea. We have really good context for this fragment, and if we wanted the original CSS, for example, we know where to get it.

Aside: Look at the info DaringFireball's sucking in:

resolution=2560x1440&amp;
flash_version=0&amp;
1476452395012&amp;
serve_js

Gruber doesn't use Flash. Kinda Panopticlicky, ain't it? Looks like it's supporting this.

Another Aside: Internet Explorer 11 creates the same fragment source, so if you think Edge was created from the ground up...

Interestingly, the old Internet Explorer copyright box used to reference Mosaic, but that's gone in IE11. Wonder if IE11 is really the child of IE6 and 7? But enough aside-ing...

HTML Fragment from Chrome

But let's take a look at where I initially started, with Chrome.

Version:0.9
StartHTML:0000000164
EndHTML:0000002719
StartFragment:0000000200
EndFragment:0000002683
SourceURL:http://daringfireball.net/2016/10/mossberg_siri
<html>
<body>
<!--StartFragment--><p style="margin: 0px 0px 1.6em; padding: 0px; color: rgb(238, 238, 238); font-family: Verdana, &quot;Bitstream Vera Sans&quot;, sans-serif; font-size: 11px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(74, 82, 90);">Mossberg:</p><blockquote style="font-size: 11px; margin: 2em 2em 2em 1em; padding: 0px 0.75em 0px 1.25em; border-left: 1px solid rgb(119, 119, 119); border-right: 0px solid rgb(119, 119, 119); outline: 0px; vertical-align: baseline; background: rgb(74, 82, 90); color: rgb(238, 238, 238); font-family: Verdana, &quot;Bitstream Vera Sans&quot;, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-t
ransform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><p style="margin: 0px 0px 1.6em; padding: 0px;">For instance, when I asked Siri on my Mac how long it would take me to get to work, it said it didnโ€™t have my work address โ€” even though the โ€œmeโ€ contact card contains a work address and the same synced contact card on my iPhone allowed Siri to give me an answer.</p><p style="margin: 0px 0px 1.6em; padding: 0px;">Similarly, on my iPad, when I asked what my next appointment was, it said โ€œSorry, Walt, somethingโ€™s wrongโ€ โ€” repeatedly, with slightly different wording, in multiple places on multiple days. But, using the same Apple calendar and data, Siri answered correctly on the iPhone.</p></blockquote><p style="margin: 0px 0px 1.6em; padding: 0px; color: rgb(238, 238, 238); font-family: Verdana, &quot;Bitstream Vera Sans&quot;, sans-serif; font-size: 11px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacin
g: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(74, 82, 90);">These sort of glaring inconsistencies are almost as bad as universal failures. The big problem Apple faces with Siri is that when people encounter these problems,<span class="Apple-converted-space">ย </span><em>they stop trying</em>.</p><!--EndFragment-->
</body>
</html>

See the difference? Chrome's fragment initially looks much more focused, but also provides much less information about the code's original context. Worse, Chrome's puts all the CSS information inline, and repeating each CSS property inside of each pasted html element makes the source a long ways away from DRY. And that out-of-context, inline CSS is lossily translated, which will cause us some rendering problems that we'll see and discuss in a bit.

Original Source

Now Edge's fragment isn't perfect. Here's the original html of that snippet straight from the server...

<p>Mossberg:</p>

<blockquote>
  <p>For instance, when I asked Siri on my Mac how long it would take
me to get to work, it said it didnโ€™t have my work address &#8212;
even though the โ€œmeโ€ contact card contains a work address and
the same synced contact card on my iPhone allowed Siri to give
me an answer.</p>

<p>Similarly, on my iPad, when I asked what my next appointment was,
it said โ€œSorry, Walt, somethingโ€™s wrongโ€ &#8212; repeatedly, with
slightly different wording, in multiple places on multiple days.
But, using the same Apple calendar and data, Siri answered
correctly on the iPhone.</p>
</blockquote>

<p>These sort of glaring inconsistencies are almost as bad as universal failures. The big problem Apple faces with Siri is that when people encounter these problems, <em>they stop trying</em>.

NOTE: There's no closing </p> tag because I've cut the source at that spot.

Look how clean the original is! Why can't we just get that? Chrome's CSS injections and line flattening makes for a much less human readable snippet.

Edge is close, but still weird. Take another look. For some reason, Edge's fragment makes every tag uppercase like it's 1998. It also trashes Gruber's original (and thoughtful) whitespace. Also yuck. I mean, Gruber's using Markdown to write Daring Fireball. In a perfect world, I'd take that clipboard's html and turn it back into Markdown when it's pasted into MarkUpDown.

How do we get this original source?

Start and End Fragment

The important thing to catch is that the HTML Fragment format almost always includes a full html doc with html and body tags after the SourceURL and other metadata. Within that html code, there are markers, <!--StartFragment--> and <!--EndFragment-->, saying where the exact selection started and stopped.

Though Chrome immediately dives into your selected text (the "true" html fragment) immediately after the <body> tag, Edge gives you any open tags that come before your fragment too. In this case, you had three open div tags when you got to the highlighted selection: <DIV id="Box"><DIV id="Main"><DIV class="article">. Knowing this DOM could be really helpful if you were interested in retrieving the original CSS and formatting your fragment as close to the original markup as possible.

If you ignore context like this, though, it's an easy enough feat to take the string and parse out the "true fragment's" html by splitting the entire HTML Fragment string on <!--StartFragment--> and <!--EndFragment-->. Here's an early version of something I wrote to just take out the html, ignoring all the fragment metadata.

private string _parseHtmlClipboardFragment(string rawFragmentSource)
{
    string ret = rawFragmentSource;
    string delimiterStartAfter = "<!--StartFragment-->";
    string delimiterEndBefore = "<!--EndFragment-->";

    if (-1 < ret.IndexOf(delimiterStartAfter))
    {
        ret = ret.Substring(ret.IndexOf(delimiterStartAfter) + delimiterStartAfter.Length);
        if (-1 < ret.IndexOf(delimiterEndBefore))
        {
            ret = ret.Substring(0, ret.IndexOf(delimiterEndBefore));
        }
        else
        {
            ret = string.Empty;  // No luck, Ending not after Start; go back to nothing.
        }
    }

    return ret;
}

NOTE: I've got a nice library that parses all this up into a custom html fragment view model that I mentioned in TL;DR. I wouldn't and don't use the above code in most cases.

When we parse out that html and insert it into our Markdown from Chrome, however, we get some, um, interesting results.

NOTE: Remember that Markdown is a superset, so to speak, of html. You could have a "Markdown" file without any Markdown syntax that's pure html. So what I'm really saying is, "Let's see what those html snippets that we pulled from the fragment look like when they're injected into our regularly scheduled html."

I'm going to wrap these pastes in blockquote tags so that you can tell where they start and stop easily.

Edge Parsed Code

Mossberg:

For instance, when I asked Siri on my Mac how long it would take me to get to work, it said it didnโ€™t have my work address โ€” even though the โ€œmeโ€ contact card contains a work address and the same synced contact card on my iPhone allowed Siri to give me an answer.

Similarly, on my iPad, when I asked what my next appointment was, it said โ€œSorry, Walt, somethingโ€™s wrongโ€ โ€” repeatedly, with slightly different wording, in multiple places on multiple days. But, using the same Apple calendar and data, Siri answered correctly on the iPhone.

These sort of glaring inconsistencies are almost as bad as universal failures. The big problem Apple faces with Siri is that when people encounter these problems, they stop trying.

Though you should remember that the original source has been smeared together, losing its newlines, and all the tags are strangely capitalized, the source looks pretty nice. It's plain, and adopts the local styling for the most part, but the most important markup is still there -- the blockquote, the italics, links if they'd been included, etc.

Chrome Parsed Code

Mossberg:

For instance, when I asked Siri on my Mac how long it would take me to get to work, it said it didnโ€™t have my work address โ€” even though the โ€œmeโ€ contact card contains a work address and the same synced contact card on my iPhone allowed Siri to give me an answer.

Similarly, on my iPad, when I asked what my next appointment was, it said โ€œSorry, Walt, somethingโ€™s wrongโ€ โ€” repeatedly, with slightly different wording, in multiple places on multiple days. But, using the same Apple calendar and data, Siri answered correctly on the iPhone.

These sort of glaring inconsistencies are almost as bad as universal failures. The big problem Apple faces with Siri is that when people encounter these problems,ย they stop trying.

Um, ew. Wha' happen'd?

Unfortunately, even though Daring Fireball's entire page has the same styles applied, this inline kludge Chrome performs puts it only in each, in this case, <p> tag. So when we have a margins around paragraphs, there's nothing telling us to also put that color and style between the block-level tags. There's no surrounding tag to be a stand-in for, essentially, the body (or any other lost, open) tag.

Let's look at all the overhead we have for each p from that fragment:

<p style="
    margin: 0px 0px 1.6em;
    padding: 0px;
    color: rgb(238, 238, 238);
    font-family: Verdana, &quot;Bitstream Vera Sans&quot;, sans-serif;
    font-size: 11px;
    font-style: normal;
    font-variant-ligatures: normal;
    font-variant-caps: normal;
    font-weight: normal;
    letter-spacing: normal;
    orphans: 2;
    text-align: left;
    text-indent: 0px;
    text-transform: none;
    white-space: normal;
    widows: 2;
    word-spacing: 0px;
    -webkit-text-stroke-width: 0px;
    background-color: rgb(74, 82, 90);
">

And here's what we have from Chrome's Dev Tools' "Computed" style tab:

color: rgb(238, 238, 238);
display: block;
font-family: Verdana, "Bitstream Vera Sans", sans-serif;
font-size: 11px;
height: 19px;
line-height: 19.8px;
margin-bottom: 17.6px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
text-align: left;
text-size-adjust: 100%;
width: 425px;
-webkit-margin-after: 17.6px;
-webkit-margin-before: 0px;
-webkit-margin-end: 0px;
-webkit-margin-start: 0px;

But note that that's essentially all from one css file, as properties from user agent stylesheets are simply the browser's defaults:

Paragraph styles for Daring Fireball

If you'd like, we can compare the fragment's CSS vs. the stylesheet. Spoiler: It's a mess. Not a lot of matching. Click here to see. Ugly.

The bottom line is that background-color: rgb(74, 82, 90); is something that belongs to the body, but is inserted here by Chrome into its HTML Clipboard contents as something that's attached to each block element. That's wrong. It doesn't display correctly, and it needlessly clutters the resulting HTML.

With HtmlFragmentHelper, I have a couple of choices. One is to strip all inline styles out, or at least some subset of styling. If I want to maintain as much of the original as possible, I might just blast anything that injects colors into the html, like color and background-color. Or I could blast all the inline style info and get something more like Edge's code.

Or I could normalize the CSS and optionally (via a property on HtmlFragmentViewModel) wrap it all in a block-level tag that contains CSS that's everywhere. Or at least in all of the top-level tags. But now I'm starting to write an html parser, which is a little outside of my current scope.

I think I'm going to do the former, though it's not in there as of this writing. That Chrome paste looks horrible as is, though. If only there was an easier way...


HTML Fragment from Firefox

There are certainly other applications that create HTML Clipboard values. I ran into LibreOffice's when using Calc, their spreadsheet app, and its html clipboard doesn't include Start and EndFragment tags. Wonderful, folks, wonderful.

But isn't there one glaring omission I might want to add here? You know, I think there is at least one...

For fun, let's take a look at Firefox's fragment too. Firefox isn't as popular as it used to be, but it's probably worth taking a look. (Remember that this is all on Windows, and Safari is dead enough by now that I'm not going to bother with v5.)

Version:0.9
StartHTML:00000156
EndHTML:00001060
StartFragment:00000190
EndFragment:00001024
SourceURL:http://daringfireball.net/2016/10/mossberg_siri
<html><body>
<!--StartFragment--><p>Mossberg:</p>

<blockquote>
  <p>For instance, when I asked Siri on my Mac how long it would take
me to get to work, it said it didnโ€™t have my work address โ€”
even though the โ€œmeโ€ contact card contains a work address and
the same synced contact card on my iPhone allowed Siri to give
me an answer.</p>

<p>Similarly, on my iPad, when I asked what my next appointment was,
it said โ€œSorry, Walt, somethingโ€™s wrongโ€ โ€” repeatedly, with
slightly different wording, in multiple places on multiple days.
But, using the same Apple calendar and data, Siri answered
correctly on the iPhone.</p>
</blockquote>

<p>These sort of glaring inconsistencies are almost as bad as universal 
failures. The big problem Apple faces with Siri is that when people 
encounter these problems, <em>they stop trying</em>.</p><!--EndFragment-->
</body>
</html>

Oh, so beautiful. Same whitespace as the original, with the added bonus (?) that the final paragraph is also text wrapped. No crazy inline CSS attempted. No header overhead or 1998-style HTML TAGS.

You could argue that Chrome is better because it has that inline CSS (yuck!) or Edge because it has the full page headers, but honestly, we're only one step farther away from what Edge gave us. We have the URL here. If we have network access to get CSS, we have network access to read the header and figure out where the CSS lives ourselves. Don't overcomplicate things. Beautiful. Good looking code continues to look good when pasted inline with Markdown.

Firefox Parsed Code

And Firefox's snippet is just as nice when pasted.

Mossberg:

For instance, when I asked Siri on my Mac how long it would take me to get to work, it said it didnโ€™t have my work address โ€” even though the โ€œmeโ€ contact card contains a work address and the same synced contact card on my iPhone allowed Siri to give me an answer.

Similarly, on my iPad, when I asked what my next appointment was, it said โ€œSorry, Walt, somethingโ€™s wrongโ€ โ€” repeatedly, with slightly different wording, in multiple places on multiple days. But, using the same Apple calendar and data, Siri answered correctly on the iPhone.

These sort of glaring inconsistencies are almost as bad as universal failures. The big problem Apple faces with Siri is that when people encounter these problems, they stop trying.

I miss Firefox.

Labels: , , , , , , ,


posted by ruffin at 10/14/2016 11:46:00 AM
Tuesday, October 11, 2016

From Microsoft's How to: Verify that Strings Are in Valid Email Format Code Example for Microsoft's email validity check

Oh please, heavens, say it isn't so.

Sounds more like a Dune quote, doesn't it?


EDIT: Some decent advice:

Defence in depth only works if each level of your security onion is not rotten. One rotten layer means you spoil the whole onion. Rejecting "foo@example.com.au" because you want to defend against vulnerabilities in Sun's ยต-law encoding doesn't make sense, does it? Don't laugh, it's happened to me. The reason I am here commenting is that Medicare Australia doesn't allow ".au" addresses, only ".com". Also read Mark Swanson, "How not to validate email, ",ย mdswanson.com/blog/2013/10/14/โ€ฆย โ€“ย ManicDeeย Nov 22 '13 at 5:21

And then from the linked post, "How now to validate email":

Or maybe you will find a regular expression that looks something like ^[_a-z0-9-]+(\.[_a-z0-9-]omg-whyyyyy$. ... So what should you do instead? Just check for the existence of @. Every email address will have at least one of them and it is trivially easy to write this code.

As I mentioned on SO...

The buttoned up coder in me is trying to resist, but the rest is surprisingly convincingly arguing that anything else is a sad tragedy of micro-optimization.

Just fwiw, I'm also checking for a length of at least one before and after the last @, though I haven't looked at the format for comments inside of an email address [sic!!].

public static bool IsValidEmail(this string str)
{
    // See https://myfreakinname.blogspot.com/2016/10/spaghetti-code-leads-to-suffering.html#emailValidationEdit
    // for the reasoning behind this.

    int lastAtLoc = str.LastIndexOf('@');
    return lastAtLoc < str.Length - 1 && lastAtLoc > 0;
}

Labels: , , ,


posted by ruffin at 10/11/2016 02:40:00 PM
Monday, March 21, 2016



Getting ready to listen in on the Apple keynote in a few hours, and was a little surprised to see what's at the end of this:

Requirements: Live streaming uses Appleโ€™s HTTP Live Streaming (HLS) technology. HLS requires an iPhone, iPad, or iPod touch with Safari on iOS 7.0 or later, a Mac with Safari 6.0.5 or later on OS X v10.8.5 or later, or a PC with Microsoft Edge on Windows 10

I remember once having an iPod touch up at work to watch one, as I couldn't watch on a Windows box at all.

If you were wondering if Safari on Windows was dead, well, first, you shouldn't've been. It is. But here's your second or third confirmation.

Second, still seems strange this doesn't happen in iTunes or QuickTime only. They're not just okaying watching on Windows, but suggesting you do it on Microsoft's new browser.

Guessing there's some talk between the two behind the scenes on this one.

PS -- I know this one. It's Sia. Crazy album cover though.

Labels: , , , ,


posted by ruffin at 3/21/2016 10:36:00 AM
Tuesday, June 23, 2015

Our IT guy just relayed a priceless message from Sharepoint that "explains" problems we're having accessing Sharepoint today. Honestly, it's classic.

If youโ€™re having problems accessing SharePoint today, we just got this:

 โ€œCurrent Status: Engineers are analyzing the service infrastructure to identify the root cause of impact and formulate a remediation plan.

User Experience: Affected users are experiencing latency when accessing or rendering SharePoint Online sites.โ€ 

That โ€œlatencyโ€ can be several seconds to 10 minutes.


The blue stuff is from Sharepoint, the rest from our IT guy (who is a bright, often funny, and thankfully competent dude).

You can't make this stuff up. I taught business and technical writing for four semesters while TAing in grad school. I'm not sure I could have taught folks to be this perfectly horrible if I'd tried my darnedest. Wow. In a strange, perverted sense, this was perfectly written.

Just for fun, let's translate:

We don't know why Sharepoint is hanging for up to 10 minutes, but we're going to try and fix it as soon as we can.

Labels: , , ,


posted by ruffin at 6/23/2015 11:51:00 AM
Friday, March 21, 2014

Microsoft sniffed blogger's Hotmail account to trace leak | Microsoft - CNET News:


According to the filing, Microsoft received a tip from a person who was contacted via Hotmail by the blogger, who wanted to verify that the leaked source code was legitimate. Instead, the tipper went to Steven Sinofsky, then-president of the Windows Division at Microsoft, and told him of the interaction. Sinofsky forwarded the details to Microsoft's Trustworthy Computing Investigations department, which investigates external threats and internal information leaks.


"After confirmation that the data was Microsoft's proprietary trade secret on September 7, 2012, Microsoft's Office of Legal Compliance approved the content pulls of the blogger's Hotmail account," the filing says.


The only encouraging part of this is that the leak was identified by shoeleather sleuthing, not a carnivorous port sniffer.

Why we don't create a form of email like SnapChat, I'm not sure.  Oh wait, that was called POP3.

Labels: , ,


posted by ruffin at 3/21/2014 12:47:00 PM
Friday, November 22, 2013

Okay, admittedly I really hope to bag a Scroogled coffee mug if they come back in stock, but the irony of learning this the same day I order my Scroogled shirt is thick.

Windows 8.1's 'Hero' ads -- brought to you by stealthy snooping | Microsoft windows - InfoWorld:

Here's the part Microsoft doesn't tell you -- the part the tech press neglects to mention: Bing Smart Search works by snooping on the searches you perform on your Windows 8.1 computer (there's no Smart Search in Windows 8).  Windows watches as you run local searches. Unless you specifically, explicitly search for Settings or Files, Smart Search bundles up all of your search terms and sends them to Bing, along with whatever tracking information Windows has at hand. (Perhaps your Windows account?) [emphasis mine -mfn]

Whoa! Local as in, "kittens.gif" searches? Certainly I've got that wrong. Right?

Labels: ,


posted by ruffin at 11/22/2013 02:15:00 AM
Thursday, November 14, 2013

Making OpenXML Easy with ClosedXML:

Microsoftโ€™s OpenXML SDK is to OpenXML documents like the Assembly language is to processors. You can use it to get your work done but it takes a tremendous amount of effort to do anything.

Exceptionally well put.  It's open qua all in XML, but only in the manner that Microsoft Word is open because I can see its bytecodes.

Labels: , , ,


posted by ruffin at 11/14/2013 02:20:00 PM
Wednesday, November 06, 2013

An exclusive interview with Bill Gates - FT.com:

โ€œFine, go to those Bangalore Infosys centres, but just for the hell of it go three miles aside and go look at the guy living with no toilet, no running water,โ€ Gates says now. โ€œThe world is not flat and PCs are not, in the hierarchy of human needs, in the first five rungs.โ€

It's flat, sure, but flat from the perspective of moving capital, not flat in the sense of socioeconomic equality.

Gates sure gets that. 

Honestly, picking malaria as your primary humanitarian fight is brilliant in its sensibility.  It's already been eradicated in some geographies, so it's a winnable fight.  It's a big enough issue that populations have evolved to where that it's better to throw away a quarter of your otherwise viable progeny to give two-thirds of those who do make it resistance to the disease.  And it's cheap & low tech -- simply giving nets "can reduce the chance of children catching malaria by 20 percent" (unicef).  And a how much is a cure if you do get malaria?  Ran me $6 including the doctor's home visit.

I'm not sure you don't want this guy running, if not Microsoft, then Windows.

Labels: , , ,


posted by ruffin at 11/06/2013 12:22:00 PM
Thursday, October 17, 2013

I need to go back and do a true link aggregation with prior posts on the subject, but in the past month or two, I've seen too many "Mac" bloggers -- and there's a community that I enjoy that seems to include John Gruber, Marco Arment, and, recently, Ben Thompson -- say that Microsoft has been eating hardware manufacturers' lunches for years.

They're not wrong (warning: youtube vid with cursing), they've just gone waaaay too far down the Apple rabbit hole.  Sure, Apple won for several years, but what's the true cost of using Microsoft?  And what's the value?

How much has HP, Dell, and friends had to know about creating and updating operating systems for the last twenty-plus years?  How to burn an image to a hard drive.  That's right.  Essentially nothing.

How much has HP, Dell, and friends had to spend to create an operating system?  Yes, billions to license one (and, okay, very little to use the other when they've bothered), but essentially much closer to nothing to develop Windows.  There's a ton of obvious user maintenance, but R and D?  Relatively speaking, zero.

How big of a risk was it for Apple/NeXT to continue to develop their own OS?  That's an interesting question that deserves more investigation.  Let's not talk so much about OS 9.  That OS played itself out.  It essentially failed.  Apple took FreeBSD and started essentially over, building in NeXT/Cocoa and OS 9/Carbon layers on top.

How difficult is it to pull off creating an OS from scratch, or, more accurately, on top of a stable *NIX kernal?  Enter exhibit WebOS.  Ask Palm, Blackberry, Nokia, and HP how creating OSes contributes to the bottom line.

How can Microsoft be eating HP's lunch if HP can't cook on its on?

To quickly turn the metaphor, if you're not willing to take on the risk of creating an OS (or decided it's a dumb risk not worth taking), I guess you're stuck with cooks that are 70% pure.  There's a company that's able to create cooks that are 99.1% pure (as I catch up on my DVR'd Breaking Bad Marathon), and they're proving difficult to kill.

Actually, Breaking Bad metaphors work better for Microsoft.  They're like the cartel's chemist complaining about Jesse's, um, artistic approach to cooking meth (warning: more cursing from youtube).  What matters is that Jesse gets to 96% purity and the cartel's team is, hrm, doing much worse.  A few years ago, Ballmer was the chemist putting down the iPhone.  Microsoft knows how to synthesize phenylacetic acid, but they can't cook.

The point is that hardware manufacturers were unable to commoditize their complements -- nor was Microsoft able to make more than mobile equivalents to those manufacturers' beige boxes to put their OS on -- and Linux and OSS  have been unable to create a replacement-level OS alternative.  Unless you count Android.  For today, let's leave Google out of it.  Google's eating everyone's advertising lunch.

Microsoft has earned the money they're collecting on Windows.  It's not extortion when you're the only risk-reducing game in town.

Labels: , , , , ,


posted by ruffin at 10/17/2013 09:20:00 AM
Wednesday, September 18, 2013

Get Kingsoft Office Professional 2013 (Win) free | The Cheapskate - CNET News:
al_chirico

@Cool_Daddy For me, I like being able to actually read the data file. The xxxX formated files are XML files. So, If you know XML or HTML, you can just search the file for something you're looking for. This is especially helpful if you're passing a xxxX file to another program. You can just deconstruct the file as input data. Try doing that with an earlier xxx file. Just my 2 cents.

I read through this comment that's essentially in favor of the use of Microsoft's "Office Open XML" file formats and came away with an unexpected take-home.  First, why should we care how hard it is to open a .doc file in a text editor at this point?  We have plenty of excellent, freeware applications that can do that job for us (AbiWord, though seemingly dead, is still one of my favorites).  There's no real practical advantage for having a .doc file in a human readable file format now, is there, minus outliers like, "I just installed my OS and have no internet access and MUST edit the contents of my file in the 'pack-in' text editor!"

But then I shift from the consumer's pov to Microsoft's.  If the long game says that proprietary file formats will be broken and provide no (again, long-term) advantage, why bother with them at all?  Why not just use XML for your file format?  The format's so complex at this point, the degree of obfuscation in XML versions of the files is still tremendous.  You're past the point of something simply reproduced -- heck, even MS's Mac Business Unit had a heck of a time pulling it off, and that was an inside job!  It's the difference between html made by Seamonkey Composer and html made by Word's "Save As HTML".  HTML is supposed to be a nice, human-editable format.  Yet one product is pretty easy to edit by hand, and the other nearly impossible.  (See also AbiWord's Save As HTML for docs; beautiful stuff.)

So why move from bytecode to XML if you're Microsoft?  XML might be a better tool for serializing docs, and puts contracts with governments that demand "free and open" (and therefore, ostensibly, forward compatible and archival) formats back on the table and kill the "open" movement flat.

And there's really no difference to the end user now either, minus those guys who post to CNET and claim to be opening/editing their docs in Notepad.  ;^)

Microsoft moving to XML seems better, but, in the end, holds the status quo.  (C#'s release as an open standard, however, had much different, more beneficial results.  Wonder if that was expected?)

Labels: , , ,


posted by ruffin at 9/18/2013 01:03:00 PM
Saturday, September 14, 2013

Enderle on Ballmer:

"The other aspect of the talk that stuck with me was how Steve was going to meet with the top employees in the company to collaboratively make Microsoft better. This clearly didnโ€™t happen and I think the pointed feedback he got may have driven a wedge between him and the employees. Over the next few years, rather than getting closer to the employees, he had been isolated from them and failures like Zune and Vista, which could have easily been anticipated and avoided, resulted."

Failure happens in software development. If you execute everyone who fails, you're left only with those who do nothing. 

Failure isn't conventional failure in software development until someone's shortsighted enough to ignore when it initially happens or to treat it as such. 

Labels: ,


posted by ruffin at 9/14/2013 09:05:00 AM
Tuesday, August 27, 2013

Microsoft's Ballmer: Why Microsoft doesn't want to be IBM (or Apple) and more | ZDNet:

Apple is trying to make a lot of money on the device. Amazon is trying to make it all on the back-end. So is Google. Rather than say the model is FOO or BAR, the model is to deliver these incredible, high value experiences that will span hardware innovation, operating system, consumer experiences and enterprise experiences...

For all the dislike I have for Ballmer's contribution to M$'s Profit Maximization Machine, there's a part of me that knows, on some technical level if nothing else, he really gets it.

Labels:


posted by ruffin at 8/27/2013 08:36:00 PM
Tuesday, May 21, 2013

Exclusive First Look at Xbox One | Gadget Lab | Wired.com:

Alternately, you can use Xboxโ€™s electronic programming guide, which presents a lineup based on your favorite channels or tells you what your friends are watching and can be controlled via voice, gesture, and game controller.

There's a whole lot of functionality up for grabs around television broadcast, cable, dish, or OTA.  I'm surprised it's taking this long to do it right.  But, at the same time, if Apple wants to seal up the space like they did with iPods, they're right about at the end of their early-provider window.

Labels: , ,


posted by ruffin at 5/21/2013 08:04:00 PM
Thursday, May 02, 2013

Apple, open and learning from history โ€” Benedict Evans:

In the 1990s, the PC market was mostly a corporate market (roughly 75% of volume). Corporate buyers wanted a commodity. They were buying 500 or 5000 boxes, they wanted them all the same and they wanted to be able to order 500 or 5000 more roughly the same next year. They wanted to compare 4 vendors on price with the same spec sheet. They didn't care what they looked like... and they didn't care how easy it was for non-technical people to set them up because the users would never touch the configuration. Nor did they care much about the user interface, because most of the users were only going to be running 1 or 2 apps anyway.

Meanwhile with no internet, home buyers were mainly interested in a PC that ran the same software they used at work (and all of the games were for PC). They may have known Macs were supposed to be easier, but ... Apple's computers were ultimately beige boxes and not really that much prettier than PCs anyway. And they were significantly more expensive.

Hence, in this market all of Microsoft's advantages were in play, and none of Apple's. Apple, in Steve Blank's phrase, did not have product/market fit. ... Apple's selling points were irrelevant, invisible or both.
Via the Fireball, iirc.

Labels: ,


posted by ruffin at 5/02/2013 09:52:00 AM
Tuesday, April 16, 2013


I can't tell how I feel about Microsoft's love of Mono.  In a sense, it's an obvious fit.  It could represent Microsoft wanting to move beyond the OS into more popular, crossplatform [, and mobile] spaces by piggybacking on Mono's work with C#.  I can't say I'm against Microsoft's best (and Visual Studio has some of their best, I feel relatively confident) working on Mono!

At the same time, Mono initially felt a little subversive.  Less so now.  We're not writing Windows Forms apps on Mac anymore.

Strange the bedfellows success creates.  (Brought to you by Yoda, apparently.)

Labels: ,


posted by ruffin at 4/16/2013 09:39:00 AM
Tuesday, August 28, 2012

Is it just me, or is Gmail's online interface becoming too cluttered? It's trying to be a desktop client. The beauty of Gmail in the browser is twofold: Clean interface and great searches. That's it.

Heck, with the phone and chat UIs, it's morphing from a complicated desktop application to a desktop. That's bad.

It's strange to think that sometimes not being quite done is your advantage, but after spending a little time in the fairly refreshing Outlook.com interface (rough around the edges, sure, but clean, with improved search), Gmail hits me as too cluttered.

Microsoft is potentially doing something right, though it might take Windows X before they get a feel for it. They're finally doing the Apple trick -- give everyone 90% of what they want better than they expected it, and tell them that's it. You're not getting your last 10%, because there are six billion last 10%s. We're giving you what we want, and you're going to like it, because it's smooth.

Google has, I think, finally [at least temporarily] plateaued. Wonder if Yahoo can make a comeback.

Labels: , , , ,


posted by ruffin at 8/28/2012 09:10:00 PM
Tuesday, August 14, 2012

Is there any way to "paste as quotation" in Outlook 2011 for - Microsoft Answers:

Is there any way to "paste as quotation" in Outlook 2011 for Mac?

According to Guruprasad Ra, a "Support Engineer" (so he likely knows better than most), apparently not. Sure, you could write a macro, but that takes some googling & there's no guarantee that wouldn't require a lot of testing (the one above is apparently buggy after 2003).

I have no idea how Outlook 2011 was released. Honestly, Microsoft should have put all their engineers on creating a connector for Exchange and then bought a great email client already released for the Mac -- or even just tweaked and rebranded Thunderbird. That'd be some interesting MS PR.

Labels: , , ,


posted by ruffin at 8/14/2012 08:57:00 AM
Thursday, August 02, 2012

From Outlook.com Helps Microsoft Fight Google for the Workplace - The CIO Report - WSJ:

Microsoftโ€™s launch of the Outlook.com email platform, designed to replace Hotmail over a period of time, will help the company fend off Googleโ€™s challenge for its business in the enterprise.


This guy's got it. Hotmail's going away as a site only because Microsoft thinks this will be the silver bullet allowing it to change the brand -- they've already tried to make Hotmail into MSN and WindowsLive, neither of which worked. It's not going away because consumers don't like it. It was the Coke of consumer email. It's now the Pepsi, but only barely. It's nowhere close to (ie, lightyears ahead of) Yahoo's Snapple.

The crucial point is that Hotmail for consumers is fine. And Microsoft would love for you home users to keep using the site and clicking the ads. But Gmail is apparently making so much more cash on providing corporate (and university) Gmail "solutions" than advertising that Microsoft would just as well forgo the consumer ad revenue if it means they can sell to the enterprise. So poof, hello comes Outlook.com, adless hotmail with a few social features thrown in.

Here's why it's a long-term winner (where "winner" here only means "better idea than just hotmail.com"):
  1. Anyone who has used Hotmail & Gmail knows Hotmail's interface doesn't just stink0rz, but stink0rz hard relative to Gmail (if nobody was better, you couldn't really complain as loudly).
  2. Outlook.com will be able to sync to Exchange servers like Outlook the client.
Right now that syncing (number 2) is only going to be calendars and contacts, not email, for some reason (perhaps we're still using Hotmail's very mature engine for email and grafted on the Outlook sync?), but you get the point. (And just in case you didn't...)

The two biggest barriers to entry keeping business and other institutions from considering Hotmail for their email solution are gone. Profit.

Labels: , , , , ,


posted by ruffin at 8/02/2012 07:57:00 AM

<< Older | Newer >>


Support freedom
All posts can be accessed here:


Just the last year o' posts:

URLs I want to remember:
* Atari 2600 programming on your Mac
* joel on software (tip pt)
* Professional links: resume, github, paltry StackOverflow * Regular Expression Introduction (copy)
* The hex editor whose name I forget
* JSONLint to pretty-ify JSON
* Using CommonDialog in VB 6 * Free zip utils
* git repo mapped drive setup * Regex Tester
* Read the bits about the zone * Find column in sql server db by name
* Giant ASCII Textifier in Stick Figures (in Ivrit) * Quick intro to Javascript
* Don't [over-]sweat "micro-optimization" * Parsing str's in VB6
* .ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture); (src) * Break on a Lenovo T430: Fn+Alt+B
email if ya gotta, RSS if ya wanna RSS, (?_?), ยข, & ? if you're keypadless


Powered by Blogger etree.org Curmudgeon Gamer badge
The postings on this site are [usually] my own and do not necessarily reflect the views of any employer, past or present, or other entity.