progress - Dave's Blog

Search
My timeline on Mastodon

Win10 PWA Terminology

2018 May 31, 8:26

Folks familiar with JavaScript UWP apps in Win10 have often been confused by what PWAs in Win10 actually are. TLDR: PWAs in Win10 are simply JavaScript UWP apps. The main difference between these JS UWP Apps and our non-PWA JS UWP apps are our target end developer audience, and how we get Win10 PWAs into the Microsoft Store. See this Win10 blog post on PWAs on Win10 for related info.

Web App

On the web a subset of web sites are web apps. These are web sites that have app like behavior - that is a user might call it an app like Outlook, Maps or Gmail. And they may also have a W3C app manifest.

A subset of web apps are progressive web apps. Progressive web apps are web apps that have a W3C app manifest and a service worker. Various OSes are beginning to support PWAs as first class apps on their platform. This is true for Win10 as well in which PWAs are run as a WWA.

Windows Web App

In Win10 a WWA (Windows Web App) is an unofficial term for a JavaScript UWP app. These are UWP apps so they have an AppxManifest.xml, they are packaged in an Appx package, they run in an App Container, they use WinRT APIs, and are installed via the Microsoft Store. Specific to WWAs though, is that the AppxManifest.xml specifies a StartPage attribute identifying some HTML content to be used as the app. When the app is activated the OS will create a WWAHost.exe process that hosts the HTML content using the EdgeHtml rendering engine.

Packaged vs Hosted Web App

Within that we have a notion of a packaged web app and an HWA (hosted web app). There's no real technical distinction for the end developer between these two. The only real difference is whether the StartPage identifies remote HTML content on the web (HWA), or packaged HTML content from the app's appx package (packaged web app). An end developer may create an app that is a mix of these as well, with HTML content in the package and HTML content from the web. These terms are more like ends on a continuum and identifying two different developer scenarios since the underlying technical aspect is pretty much identical.

Win10 PWA

Win10 PWAs are simply HWAs that specify a StartPage of a URI for a PWA on the web. These are still JavaScript UWP apps with all the same behavior and abilities as other UWP apps. We have two ways of getting PWAs into the Microsoft Store as Win10 PWAs. The first is PWA Builder which is a tool that helps PWA end developers create and submit to the Microsoft Store a Win10 PWA appx package. The second is a crawler that runs over the web looking for PWAs which we convert and submit to the Store using an automated PWA Builder-like tool to create a Win10 PWA from PWAs on the web (see Welcoming PWAs to Win10 for more info). In both cases the conversion involves examining the PWAs W3C app manifest and producing a corresponding AppxManifest.xml. Not all features supported by AppxManifest.xml are also available in the W3c app manifest. But the result of PWA Builder can be a working starting point for end developers who can then update the AppxManifest.xml as they like to support features like share targets or others not available in W3C app manifests.

PermalinkCommentsJS pwa uwp web

Retweet of JustRogDigiTec

2015 Feb 13, 6:54
Still on the fence if this is good for the web. Love the progress!! “@shanselman: Flash isn't dead. It's undead. http://www.hanselman.com/blog/JavaScriptHasWonRunFlashWithMozillaShumwayAndDevelopSilverlightInJSWithFayde.aspx …
PermalinkComments

Web Security Contest - Stripe CTF

2012 Aug 27, 4:18

Stripe is running a web security capture the flag - a series of increasingly difficult web security exploit challenges. I've finished it and had a lot of fun. Working on a web browser I knew the theory of these various web based attacks, but this was my first chance to put theory into practice with:

  • No adverse consequences
  • Knowledge that there is a fun security exploit to find
  • Access to the server side source code

Here's a blog post on the CTF behind the scenes setup which has many impressive features including phantom users that can be XSS/CSRF'ed.

I'll have another post on my difficulties and answers for the CTF levels after the contest is over on Wed, but if you're looking for hints, try out the CTF chatroom or the level specific CTF chatroom.

PermalinkCommentscontest security technical

Line Simplification

2012 Jun 3, 12:47

Neat demo of Visvalingam’s line simplification algorithm in JavaScript applied to a map of the US.

To simplify geometry to suit the displayed resolution, various line simplification algorithms exist. While Douglas–Peucker is the most well-known, Visvalingam’s algorithm may be more effective and has a remarkably intuitive explanation: it progressively removes points with the least-perceptible change.

PermalinkCommentsline-simplification demo technical javascript

Using Progress Indicators in Windows PowerShell

2011 Jul 27, 10:33The write-progress command in powershell allows scripts to express their progress in terms of percent or time left and powershell displays this in a friendly manner at the top of my window. Surprisingly, not hooked up to the Shell's TaskbarItemInfo's progress.PermalinkCommentstechnical powershell progress coding shell

Why We Need An Open Wireless Movement | Electronic Frontier Foundation

2011 Apr 27, 2:23"The gradual disappearance of open wireless networks is a tragedy of the commons, with a confusing twist of privacy and security debate. This essay explains why the progressive locking of wireless networks is harmful — for convenience, for privacy and for efficient use of the electromagnetic spectrum."PermalinkCommentslaw eff wireless internet technical privacy security

draft-ietf-oauth-v2 - The OAuth 2.0 Protocol Framework

2010 Dec 15, 10:02The OAuth 2 spec still in progress.PermalinkCommentsspecification reference ietf spec oauth technical

PowerShell Scanning Script

2009 Jun 27, 3:42

I've hooked up the printer/scanner to the Media Center PC since I leave that on all the time anyway so we can have a networked printer. I wanted to hook up the scanner in a somewhat similar fashion but I didn't want to install HP's software (other than the drivers of course). So I've written my own script for scanning in PowerShell that does the following:

  1. Scans using the Windows Image Acquisition APIs via COM
  2. Runs OCR on the image using Microsoft Office Document Imaging via COM (which may already be on your PC if you have Office installed)
  3. Converts the image to JPEG using .NET Image APIs
  4. Stores the OCR text into the EXIF comment field using .NET Image APIs (which means Windows Search can index the image by the text in the image)
  5. Moves the image to the public share

Here's the actual code from my scan.ps1 file:

param([Switch] $ShowProgress, [switch] $OpenCompletedResult)

$filePathTemplate = "C:\users\public\pictures\scanned\scan {0} {1}.{2}";
$time = get-date -uformat "%Y-%m-%d";

[void]([reflection.assembly]::loadfile( "C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll"))

$deviceManager = new-object -ComObject WIA.DeviceManager
$device = $deviceManager.DeviceInfos.Item(1).Connect();

foreach ($item in $device.Items) {
        $fileIdx = 0;
        while (test-path ($filePathTemplate -f $time,$fileIdx,"*")) {
                [void](++$fileIdx);
        }

        if ($ShowProgress) { "Scanning..." }

        $image = $item.Transfer();
        $fileName = ($filePathTemplate -f $time,$fileIdx,$image.FileExtension);
        $image.SaveFile($fileName);
        clear-variable image

        if ($ShowProgress) { "Running OCR..." }

        $modiDocument = new-object -comobject modi.document;
        $modiDocument.Create($fileName);
        $modiDocument.OCR();
        if ($modiDocument.Images.Count -gt 0) {
                $ocrText = $modiDocument.Images.Item(0).Layout.Text.ToString().Trim();
                $modiDocument.Close();
                clear-variable modiDocument

                if (!($ocrText.Equals(""))) {
                        $fileAsImage = New-Object -TypeName system.drawing.bitmap -ArgumentList $fileName
                        if (!($fileName.EndsWith(".jpg") -or $fileName.EndsWith(".jpeg"))) {
                                if ($ShowProgress) { "Converting to JPEG..." }

                                $newFileName = ($filePathTemplate -f $time,$fileIdx,"jpg");
                                $fileAsImage.Save($newFileName, [System.Drawing.Imaging.ImageFormat]::Jpeg);
                                $fileAsImage.Dispose();
                                del $fileName;

                                $fileAsImage = New-Object -TypeName system.drawing.bitmap -ArgumentList $newFileName 
                                $fileName = $newFileName
                        }

                        if ($ShowProgress) { "Saving OCR Text..." }

                        $property = $fileAsImage.PropertyItems[0];
                        $property.Id = 40092;
                        $property.Type = 1;
                        $property.Value = [system.text.encoding]::Unicode.GetBytes($ocrText);
                        $property.Len = $property.Value.Count;
                        $fileAsImage.SetPropertyItem($property);
                        $fileAsImage.Save(($fileName + ".new"));
                        $fileAsImage.Dispose();
                        del $fileName;
                        ren ($fileName + ".new") $fileName
                }
        }
        else {
                $modiDocument.Close();
                clear-variable modiDocument
        }

        if ($ShowProgress) { "Done." }

        if ($OpenCompletedResult) {
                . $fileName;
        }
        else {
                $result = dir $fileName;
                $result | add-member -membertype noteproperty -name OCRText -value $ocrText
                $result
        }
}

I ran into a few issues:

PermalinkCommentstechnical scanner ocr .net modi powershell office wia

PolitiFact | The Obameter: Tracking Barack Obama's Campaign Promises

2009 Jan 24, 2:42"PolitiFact has compiled about 500 promises that Barack Obama made during the campaign and is tracking their progress on our Obameter. We rate their status as No Action, In the Works or Stalled. Once we find action is completed, we rate them Promise Kept, Compromise or Promise Broken."PermalinkCommentspolitics news government obama election president tracking

philosecurity - Blog Archive - Interview with an Adware Author

2009 Jan 13, 6:20"So we've progressed now from having just a Registry key entry, to having an executable, to having a randomly-named executable, to having an executable which is shuffled around a little bit on each machine, to one that's encrypted - really more just obfuscated - to an executable that doesn't even run as an executable. It runs merely as a series of threads."PermalinkCommentssecurity privacy adware malware advertising ie browser scheme interview bho via:li

Packagetrackr - Package Tracking Service - UPS, USPS, FedEx, DHL, TNT and more

2008 Dec 30, 1:40Packagetrackr is like the isnoop tool but with IE8 integration. Its universal tracking across UPS, USPS, FedEx, etc., shows progress on a map, has RSS feed you can subscribe to telling you about the package's progress, and also added support for IE8's accelerator and webclips. Snazzy. Still want georss markup in the feed though.PermalinkCommentsgeo google map ups visualization mashup rss package shipping feed tool fedex usps tracker track accelerator webclip

2008 Election Maps

2008 Nov 6, 6:24Comparison of various website's US presidential election maps: "Most media outlets covering the 2008 US Presidential Election used the familar red/blue map to track the progress of the race as results from the polls rolled in Tueday evening. Here are several of those maps, in some ways as similar to each other as they are varied."PermalinkCommentsmap visualization geography president election vote voting politics

Disemvowelment and Reemvowelment Tools

2008 Oct 3, 5:29I thought the disemvowelment of trolls was a pretty funny punishment -- much better than simply removing the comment: "Disemvowelment is - obviously enough - the act of removing the vowels from a passage of text, as well as a pun on the word 'disembowelling'. A number of blogs and websites do this to offensive text which has been placed in their 'comments' section. ... This site exists because I couldn't resists the challenge of trying to re-emvowel disemvowelled text. This is a challenging task, as the disemvowelled word 'dg' may well have been 'dog', but also 'dig', 'dug', 'doge', diego' and so on. I have a first cut of this functionality at the re-emvowel link at the side of the page. A more advanced version is in progress."PermalinkCommentstool disemvowelment web comment forum troll language

The J-Walk Blog: A New Way Of Telling Time

2008 Sep 16, 5:08"Today I invented a new way to tell time. ... it will revolutionize time-keeping as we know it.... time is based on the percentage of the day. 12:00 midnight is 0%, 12:00 noon is 50%, 6:00 p.m. is 75%, and so on." I imagine this would be the most depressing way to look at time. Good morning, you've already wasted 33% of the day unconscious in your bed! Every day would be a progress bar slowly counting down the time. I'd probably stop watching TV completely. Why stop at counting the percentage of the day, how about the year, or how about the percentage of your life expended based on average life expectency?PermalinkCommentstime humor

The Wii Fit's Mind Games

2008 Jun 19, 2:49

Wii Fit LogoSarah received her Wii Fit a few weeks ago. The Wii Fit is a game for the Wii and a balance board accessory that can tell how you're standing on it: leaning forward, standing on one foot, leaning backward and mostly on your left foot, etc. The game puts you through various exercises grouped into the categories of aerobic, balance, strength, and yoga. It also lets you set goals and keeps track of how well you do, how long you play, and a graph of your weight.

The portion I didn't expect were the mind games. Sarah turned it on after not using it for a day and it said something to the effect of 'Oh, didn't have time to exercise yesterday? Huh. Interesting....' I'm paraphrasing of course but the Wii Fit was definitely trying to lay down some guilt. In another instance when starting up the Wii Fit Sarah was asked 'Did you know that Dave has been using Wii Fit?' She selected yes and it then asked her how she thought I was progressing giving her four options. She selected the worst one, that I was getting worse (jokingly I hope) and it told her to tell me that, but not to use those words. In conversation Sarah should mention to me that I've been "living large". Now I'm not paraphrasing. It reminded me a bit of this xkcd comic 'Zealous Autoconfig'. Hopefully this is the extent of the manipulation and mind games that the Wii Fit will perform.

PermalinkCommentsxkcd wii-fit sarah guilt nontechnical wii

isnoop.net universal package tracking

2008 May 6, 12:12Get Google Map display of and RSS feed of your package progress via UPS, FedEx, DHL, etc package tracking. I was looking for an RSS feed to do this but I didn't think of Google Map integration. Neat idea. He should do georss in the RSS feed too.PermalinkCommentsgeo google map rss package UPS visualization mashup

Slate V: archive player

2008 Apr 30, 10:35A humorous video on the topic of Internet video.PermalinkCommentsvia:ericlaw humor video internet progress-bar

growabrain: Elevator problems

2008 Apr 21, 2:24"Unlike the engineers who saw the service as too slow, he saw the problem as one deriving from the boredom of those waiting for an elevator. ... He suggested putting mirrors in the elevator lobbies to occupy those waiting by enabling them to look at themsPermalinkCommentsprogress-bar psychology elevator

Zeno's Progress Bar - Stolen Thoughts

2008 Apr 7, 10:09

Text-less progress bar dialog. Licensed under Creative Commons by Ian HamptonMore of my thoughts have been stolen: In my previous job the customer wanted a progress bar displayed while information was copied off of proprietary hardware, during which the software didn't get any indication of progress until the copy was finished. I joked (mostly) that we could display a progress bar that continuously slows down and never quite reaches the end until we know we're done getting info from the hardware. The amount of progress would be a function of time where as time approaches infinity, progress approaches a value of at most 100 percent.

This is similar to Zeno's Paradox which says you can't cross a room because to do so first you must cross half the room, then you must cross half the remaining distance, then half the remaining again, and so on which means you must take an infinite number of steps. There's also an old joke inspired by Zeno's Paradox. The joke is the prototypical engineering vs sciences joke and is moderately humorous, but I think the fact that Wolfram has an interactive applet demonstrating the joke is funnier than the joke itself.

I recently found Lou Franco's blog post "Using Zeno's Paradox For Progress Bars" which covers the same concept as Zeno's Progress Bar but with real code. Apparently Lou wasn't making a joke and actually used this progress bar in an application. A progress bar that doesn't accurately represent progress seems dishonest. In cases like the Vista Defrag where the software can't make a reasonable guess about how long a process will take the software shouldn't display a progress bar.

Similarly a paper by Chris Harrison "Rethinking the Progress Bar" suggests that if a progress bar speeds up towards the end the user will perceive the operation as taking less time. The paper is interesting, but as in the previous case, I'd rather have progress accurately represented even if it means the user doesn't perceive the operation as being as fast.

Update: I should be clearer about Lou's post. He was actually making a practical and implementable suggestion as to how to handle the case of displaying progress when you have some idea of how long it will take but no indications of progress, whereas my suggestion is impractical and more of a joke concerning displaying progress with no indication of progress nor a general idea of how long it will take.

PermalinkCommentszenos paradox technical stolen-thoughts boring progress zeno software math

The Filing Cabinet : Don't judge a book by its cover - why Windows Vista Defrag is cool

2008 Mar 31, 1:19Some interesting notes on Vista defrag."We don't try to make the volume 100% defragmented because defragmenting to the point where there are no fragmented files has negligible benefits.", "We don't give a percent complete or time to completion estimatPermalinkCommentsprogress progress-bar windows vista blog msdn microsoft defrag
Older Entries Creative Commons License Some rights reserved.