trial - Dave's Blog

Search
My timeline on Mastodon

Tweet from David_Risney

2015 Dec 30, 5:07
3 diff kinds of challenges: Three Trials https://supermariomakerbookmark.nintendo.net/courses/4B46-0000-00EC-E0CF … #SuperMarioMaker pic.twitter.com/B2rSxkjtiB
PermalinkComments

Retweet of industrial_book

2015 Mar 6, 6:11
Old war. New battlefield. #mathjoke pic.twitter.com/TvWxI0h8Xw
PermalinkComments

Debugging anecdote - the color transparent black breaks accessibility

2014 May 22, 10:36

Some time back while I was working on getting the Javascript Windows Store app platform running on Windows Phone (now available on the last Windows Phone release!) I had an interesting bug that in retrospect is amusing.

I had just finished a work item to get accessibility working for JS WinPhone apps when I got a new bug: With some set of JS apps, accessibility appeared to be totally broken. At that time in development the only mechanism we had to test accessibility was a test tool that runs on the PC, connects to the phone, and dumps out the accessibility tree of whatever app is running on the phone. In this bug, the tool would spin for a while and then timeout with an error and no accessibility information.

My first thought was this was an issue in my new accessibility code. However, debugging with breakpoints on my code I could see none of my code was run nor the code that should call it. The code that called that code was a more generic messaging system that hit my breakpoints constantly.

Rather than trying to work backward from the failure point, I decided to try and narrow down the repro and work forwards from there. One thing all the apps with the bug had in common was their usage of WinJS, but not all WinJS apps demonstrated the issue. Using a binary search approach on one such app I removed unrelated app code until all that was left was the app's usage of the WinJS AppBar and the bug still occurred. I replaced the WinJS AppBar usage with direct usage of the underlying AppBar WinRT APIs and continued.

Only some calls to the AppBar WinRT object produced the issue:

        var appBar = Windows.UI.WebUI.Core.WebUICommandBar.getForCurrentView(); 
// appBar.opacity = 1;
// appBar.closeDisplayMode = Windows.UI.WebUI.Core.WebUICommandBarClosedDisplayMode.default;
appBar.backgroundColor = Windows.UI.Colors.white; // Bug!
Just setting the background color appeared to cause the issue and I didn't even have to display the AppBar. Through additional trial and error I was blown away to discover that some colors I would set caused the issue and other colors did not. Black wouldn't cause the issue but transparent black would. So would aqua but not white.

I eventually realized that predefined WinRT color values like Windows.UI.Colors.aqua would cause the issue while JS literal based colors didn't cause the issue (Windows.UI.Color is a WinRT struct which projects in JS as a JS literal object with the struct members as JS object properties so its easy to write something like {r: 0, g: 0, b: 0, a: 0} to make a color) and I had been mixing both in my tests without realizing there would be a difference. I debugged into the backgroundColor property setter that consumed the WinRT color struct to see what was different between Windows.UI.Colors.black and {a: 1, r: 0, g: 0, b: 0} and found the two structs to be byte wise exactly the same.

On a hunch I tried my test app with only a reference to the color and otherwise no interaction with the AppBar and not doing anything with the actual reference to the color: Windows.UI.Colors.black;. This too caused the issue. I knew that the implementation for these WinRT const values live in a DLL and guessed that something in the code to create these predefined colors was causing the issue. I debugged in and no luck. Now I also have experienced crusty code that would do exciting things in its DllMain, the function that's called when a DLL is loaded into the process so I tried modifying my C++ code to simply LoadLibrary the DLL containing the WinRT color definition, windows.ui.xaml.dll and found the bug still occurred! A short lived moment of relief as the world seemed to make sense again.

Debugging into DllMain nothing interesting happened. There were interesting calls in there to be sure, but all of them behind conditions that were false. I was again stumped. On another hunch I tried renaming the DLL and only LoadLibrary'ing it and the bug went away. I took a different DLL renamed it windows.ui.xaml.dll and tried LoadLibrary'ing that and the bug came back. Just the name of the DLL was causing the issue.

I searched for the DLL name in our source code index and found hits in the accessibility tool. Grinning I opened the source to find that the accessibility tool's phone side service was trying to determine if a process belonged to a XAML app or not because XAML apps had a different accessibility contract. It did this by checking to see if windows.ui.xaml.dll was loaded in the target process.

At this point I got to fix my main issue and open several new bugs for the variety of problems I had just run into. This is a how to on writing software that is difficult to debug.

PermalinkCommentsbug debug javascript JS technical windows winrt

Ben Goldacre’s TED talk on publication bias, drug...

2012 Sep 28, 3:55


drug companies hiding the results of clinical trials.

(via I did a new talk at TED, on drug companies and hidden data.)

PermalinkCommentsscience video ted

Comcast DNSSEC Trial FAQs

2010 Feb 25, 4:10Comcast is running an opt-in DNSSEC trial for all Comcast customers. Their FAQ covers the incompat. of DNSSEC with their Comcast Domain Helper (typo DNS redirects to Comcast ads... bleh!): "What happens to Comcast Domain Helper, which offers DNS redirect services, when you fully implement DNSSEC? We believe that the web error redirection function of Comcast Domain Helper is technically incompatible with DNSSEC. Comcast has always known this and plans to turn off such redirection when DNSSEC is fully implemented." Yay!PermalinkCommentsdns dnssec comcast faq internet ip security technical

Researchers identify command servers behind Google attack

2010 Jan 14, 2:54Wow: "If the report's findings are correct, it suggests that the government of China has been engaged for months in a massive campaign of industrial espionage against US companies."PermalinkCommentsinternet google china security politics privacy

All bow before the mighty power of the nocebo effect – Bad Science

2009 Nov 28, 3:50The downside of the placebo the nocebo: "This is the amazing world of the nocebo effect, where negative expectations can induce unpleasant symptoms, in the absence of a physical cause.", "In two of them, the consent form contained a statement outling various gastrointestinal side effects, and in these centres there was a sixfold increase in the number of people reporting such symptoms and dropping out of the trial, compared with the one centre that did not list such side effects in the form."PermalinkCommentsnocebo placebo science medicine ben-goldacre

Downloads: PlayOn Streams Netflix, Hulu, YouTube, and More to Your Xbox 360 and PS3

2009 Feb 24, 9:32Of course Netflix is already available on the 360, but PlayOn lets you watch Hulu on the 360. So far so good with the trial software. "Windows only: Previously mentioned Windows utility PlayOn-which streams popular online video to your PS3, Xbox 360, and HP MediaSmart TV-has officially left its beta phase in the dust"PermalinkCommentshulu video xbox xbox360 mediacenter dvr windows tv

Attended Savor Seattle

2008 May 13, 10:33

[Seattle's Best Coffee logo in front of Pike Place logo]This past Saturday Sarah and I took the Savor Seattle Tour of various food shops in Pikes Place. Sarah had suggested it at one point and when Jesse and Nicole brought it up again when they came up to Seattle we decided to go. Surprisingly our tour group consisted of mostly locals. Except for the fish market I hadn't been to see any of the places on the tour. I particularly enjoyed the chocolate cherries and the tea. Our tour guide Tim was funny and overall I enjoyed the tour and would recommend it. I've made a map of our tour including what free trials we got at each location. Yum!

PermalinkCommentsfood tour seattle savor seattle nontechnical

Finished Paper Mario Games

2008 May 12, 4:05
Super Paper MarioPaper Mario: The Thousand-Year DoorPaper Mario Title Screen

Sarah and I have finished playing through the games "Paper Mario", "Paper Mario: The Thousand-Year Door", and "Super Paper Mario" last week (including the various Pits of 100 Trials). We played them all on the Wii, because even though Super Paper Mario was the only one released explicitly for that platform, Wii maintains compatibility with Game Cube games such as Thousand-Year Door and Paper Mario although originally released for the Nintendo 64 is now available as a pay for download game on the Wii's Virtual Console. So, yay for Nintendo!

I think my favorite of the three is Thousand-Year Door mostly because of the RPG attack system. In Thousand-Year Door and Paper Mario when you come into contact with an enemy you go into an RPG style attack system where you take turns selecting actions. In Super Paper Mario you still have hit points and such, but you don't go into a turn based RPG style attack system, rather you do the regular Mario jumping on bad guys thing (or hitting them with a mallet etc...). Thousand-Year Door and Paper Mario are very similar in terms of game play but Thousand-Year Door looks very pretty and has made improvements to how your party-mates are handled in battle (they have HP and can fall as you would expect) and there's an audience that cheers you on during your battles.

Even if the gameplay sucked the humor throughout the series might be tempting enough. Mario's clothing and mustache are mocked throughout and standard RPG expectations are subverted. I hate to describe any of these moments for fear of ruining anything but, for instance, an optional and very difficult enemy who may only be killed after hours of work only results in one experience point, or a very intimidating enemy who you imagine you'll have to fight actually challenges you to a quiz.

Despite how I personally rank them, all the games are great and I'd recommend any of them.

PermalinkCommentsmario videogame paper mario nontechnical

Visual Studio Express Downloads

2008 Feb 16, 11:53The free downloadable versions of Visual StudioPermalinkCommentsmicrosoft visual-studio csharp c c++ trial express free

Abandoned

2008 Feb 2, 6:06Photos of abandoned industrial plants.PermalinkCommentsvia:rjoseph photo photos photography architecture gallery abandoned art

Wiimote wiissues

2007 Jun 7, 5:29The other day I had the best idea for my Wii remote. Clearly I should use it to control the rotation of Tetris pieces in my N-dimensional Tetris game Polytope Tetris. One of the issues I described with Polytope Tetris is user input. Given a Wii remote the user could rotate a piece through 3 dimensions in a manner that's much easier to adjust to than particular keys on the keyboard.

Anyway, I did a little research into how this might work. I knew that the Wii remote used infrared for absolute positioning and Bluetooth for everything else (LEDs, speaker, accels.) I bought a Bluetooth adapter for my PC after realizing that none of my computers had one already. I used GlovePIE to ensure that my Wii remote could connect and successfully communicate with my computer. GlovePIE is actually pretty cool -- it provides a simple script layer over the Wii remote to control things like your mouse.

Since Polytope Tetris is in Java I looked for and found a Java library for operating with the Wii remote and a long forum thread discussing its use. I then read up on Bluetooth in Java. Apparently JSR 82 is the name of the standard that describes the API a Bluetooth stack should expose in Java. That is, to get Bluetooth working in Java one needs an additional package for Java that actually implements the Bluetooth Java API. This package would depend on the system so I suppose I can't fault Sun for not including it... Where to find such a package? I found a comparison list of implementations and tried the ones that support javax.bluetooth. None of them worked for me because none can address USB devices it seems or they cost money and I couldn't get the trial version working. I also tried bluesock (not listed on the previous list) which seemed promising and could produce an address for my Wii remote as a connected device but couldn't use that address.

And I thought that after I found the Wii remote Java library it would be easy... Oh well...PermalinkCommentsjava bluetooth wii technical remote jsr82 tetris polytopetetris wiimote

Thinkmap Visual Thesaurus

2007 May 21, 3:19A visual graph of a searchable wordnet. Cool looking. Trial version for non registered users.PermalinkCommentsvisualization graph word words design language

BBC NEWS | Technology | BBC to open up archive for trial

2007 Apr 18, 11:22For a trial period the BBC will open its archive online for free. Hopefully this is the start of a trend otherwise in the future the only freely available content will be reruns of Absolutely Fabulous.PermalinkCommentsbbc television archive article ip

WiiBot

2007 Jan 29, 3:58Hook an industrial robotic arm up to the Wii remote. Watch as these guys play tennis (sort of) and wield a sword (scary). I for one welcome our new sword-wielding robot arm overlords.PermalinkCommentswii robot robotics robots hack video nintendo humor
Older Entries Creative Commons License Some rights reserved.