www.archive-net-2013.com » NET » E » EXTECHOPS

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

    Archived pages: 105 . Archive date: 2013-07.

  • Title: ExTechOps | Experimental Technical Operations
    Descriptive info: .. ExTechOps.. Experimental Technical Operations.. Search.. Main menu.. Skip to primary content.. Skip to secondary content.. Home.. About ExTechOps.. Post navigation.. Older posts.. Unit Tests are Parity Bits for Code.. Posted on.. June 1, 2013.. by.. Chuck.. Reply.. I was recently asked by a skilled programmer:.. I have never understood the rationale for unit tests.. It seems like yet more code that can have bugs in it, so you would need unit tests of your unit tests.. I think a good analogy for understanding unit tests is to think of them as parity bits for code.. In data communication,.. parity bits.. are added to a message to detect transmission errors caused by noise.. Just as with unit tests, you might ask: Doesn t adding a parity bit just increase the chance of error? If I m sending an 8-bit message, won t an extra bit just increase the chance of error by ~12%? It is true a parity bit slightly increases the message s surface area for raw errors, but it automatically eliminates half of all 9-bit messages as being incorrect.. In practical terms, this means the parity bit can detection all 1-bit errors, and many multi-bit errors.. That extra parity bit easily pays for itself many times over by detecting damaged messages.. Unit tests serve the same function as parity bits.. Unit tests are not designed to prove the code correct (extremely difficult), nor to exhaustively test the code for all inputs (combinatorial impractical).. A unit test is simply there to detect the most common 1-bit errors in code caused by noise.. Of course, unit tests themselves can contain errors, but just like the parity bit, they can detect many times more errors then they might introduce.. So what is the source of noise in code? In data communication, noise is caused by physical things like electrical interference, cosmic rays, patchy fog, etc.. that produce random errors in messages.. In code, noise is caused by programmers mutating code.. Of course programmers are not random mutators, and ideally most changes are benign and beneficial.. However, the complexity of computing systems almost guarantees that some changes will cause unintentional, nearly random effects, i.. e.. code noise.. Code noise can be external or internal changes to the code being tested.. External noise is changes to things like library versions, compiler options, platform or architecture.. Internal noise takes the form of ill-conceived optimizations, half-baked re-factorings, out-of-control search-n-replaces, etc.. In this view of the world, when you check-in a piece of code it is really an act of communication.. You are transmitting the code to a programmer in the future (often yourself 6 months from now).. During transmission, the code will face many mutations, some of it damaging code noise.. To help ensure that the code s message arrives un-garbled and usable, a unit test is added to automatically detect simple 1-bit errors.. Parity as a unit test:.. function message() { return "Hello World!"; } function testMessage() { assertEqual( parity(message()), EVEN ); }.. Want more about Parity bits and Unit testing? Stay tuned for the followup: Unit Testing is for Farmers.. Posted in.. Code.. |.. Leave a reply.. Wanted: Comment Redaction Plugin.. May 15, 2013.. 1.. Don t trust code comments over 30 hours old.. Inevitably the comment isn t updated after code changes, resulting in confusion and bugs.. In fact, I wish every IDE (Xcode, Eclipse, etc.. ) had a feature/plugin that would redact comments whenever code is changed, in order to force comment revision.. Here is how it would work.. Given some commented code from a game:.. /* Add a fixed bonus */ score += 100;.. Any change to the code would immediately redact the associated comment with X s:.. /* XXX X XXXXX XXXXX */ score += time_left * 2;.. Alternatively, it could reduce the comment to an.. Mad-Libs.. style fill-in-the-blank exercise:.. /* _verb_ a _adjective_ _noun_ */ score += time_left * 2;.. Either way, the coder would be forced to rewrite the comment to match the new code.. This would encourage short comments, or better  ...   time and space.. The time: Stardate 35336.. 6 (Earth: 1981 CE).. The location: a sleepy university town on a nondescript planet in the western spiral arm of the Milky Way galaxy.. What could it be?.. That s right! It s Omnivac s appearance at Ithaca s Alphacon III in 1981 that sparked the emergence of all past and future robots, cyborgs, and androids! (Well, at least this is true in my multiverse timeline ).. Today marks the 30th anniversary of the Alphacon III Science Fiction and Gaming Convention held at the Ithaca Ramada Inn in 1981.. Omnivac-I (or Omnivor).. was the Mechanical Guest of Honor at the convention and was accompanied by its inventor.. Carl Frederick.. Omnivac certainly made a memorable impression on me, as a young.. Padawan.. Faster Than Light Fear.. October 30, 2011.. Neutrinos Be Afraid! There is no Defense!.. A year ago, I told this fellow that I was glad to see that Particle Physicists were at.. the rally.. to support the cause of Fear.. Little did I know that within a year they would unleash their.. terrifying faster-than-light neutrinos.. !.. Cookie Trouble in the North Atlantic.. October 20, 2011.. This summer something odd happened in the UK-food section of my local.. Wegmans supermarket.. British cookies started speaking Icelandic!.. Normally the shelf had been stocked with Lyons Milk Chocolate Digestive Biscuits, but now Homeblest: Kex með mjólkursúkkulaði (icelandic for Homblest: Cookies with Milk Chocolate ) have taken their place.. The biscuits are identical both.. Lyons.. and.. Homeblest.. are brands used by the UK s.. Burton s Food.. , so it appears to just be a packaging change.. So why are british biscuits with Icelandic packaging showing up in the US? I haven t found an answer, but I can t help speculating that it involves Iceland s financial crisis and.. the row between the UK and Iceland over deposits in bankrupt Icelandic banks.. I imagine freighters full of biscuits destined for Iceland have been diverted to other Atlantic markets because either the Icelanders are now too poor to afford biscuits, or the British are too leery to do business with them.. Printf.. October 15, 2011.. While browsing thru some old directories I ran across the following file, which seemed fitting given.. Dennis Ritchie s recent death.. It s a.. welcome message.. displayed to all users when they first logged into.. Software Tool Die s public access unix machine called world.. std.. com.. From uunet!research.. att.. com!.. dmr.. Tue Oct 17 03:35:50 1989 Return-Path: uunet!research.. com!dmr Received: from uunet.. UUCP by world.. com (4.. 0/SMI-4.. 0) id AA27107; Tue, 17 Oct 89 03:35:50 EDT From: uunet!research.. com!dmr Received: from inet.. com by uunet.. uu.. net (5.. 61/1.. 14) with SMTP id AA15993; Tue, 17 Oct 89 03:21:50 -0400 Message-Id: 8910170721.. AA15993@uunet.. net Date: Tue, 17 Oct 89 03:15:37 EDT To: msgs@world.. com Subject: printf "Hello, world.. com!\n" Dennis Ritchie.. I got an account on.. The World.. in the early 1990 s and remember seeing this message and being amused and wondering if it was real.. It is really from Dennis Ritchie, as confirmed in The World s founder.. Barry Shein.. s.. euloblog for Ritchie.. The thing I notice now about the message is that it took 20 minutes to travel from New Jersey to Boston! Ahh,.. back in the UUCP days.. Sysadmining.. Spectre for iOS and Mac OS X.. July 29, 2011.. Excellent!.. Spectre 3D.. is a new iPhone version of the classic.. Spectre.. game, and a.. Mac OS X version is on the way.. Now if I could just find a.. Localtalk.. to.. 3G.. converter, I ll be able to play with all my friends again.. (news via.. Andrew.. ).. Categories.. Linguistics.. Archives.. June 2013.. May 2013.. February 2013.. July 2012.. November 2011.. October 2011.. July 2011.. April 2011.. March 2011.. January 2011.. November 2010.. August 2010.. June 2010.. May 2010.. April 2010.. March 2010.. February 2010.. January 2010.. December 2009.. August 2009.. July 2009.. February 2009.. January 2009.. December 2008.. November 2008.. September 2008.. July 2008.. June 2008.. Proudly powered by WordPress..

    Original link path: /
    Open archive

  • Title: About ExTechOps | ExTechOps
    Descriptive info: ExTechOps [Experimental Technical Operations] is the weblog of.. Chuck Houpt.. It is an outlet for musings, rants, and bits of experimental code..

    Original link path: /about/
    Open archive

  • Title: ExTechOps | Experimental Technical Operations | Page 2
    Descriptive info: Newer posts.. genericOnError: A generic window.. onerror emulator for Safari and Opera.. July 4, 2011.. 2.. Update.. : Safari 5.. 1 added support for onerror, so this post is now mostly superfluous.. By default, most browsers hide un-handled Javascript errors from end users.. Typically, the error is logged to a Javascript console which can only be viewed via developer tools.. This is reasonable behavior for a production web site.. However, during development and testing, it is better to receive an immediate, visible notification of any error, since the console is too easily forgotten or ignored.. Unfortunately, there currently isn t a widely supported, standard way to trap all un-handled exception.. The.. HTML standard defines window.. onerror.. , but it is implemented inconsistently (IE, Firefox, Chrome), or not at all (Safari, Opera).. GenericOnError fills this gap with some kludgy hackery, by browser sniffing and patching the un-documented Error callback found in Safari and Opera to emulate a simplified version of window.. Here s a test page and the code:.. GenericOnError Test Page.. function genericOnError(handler) { // Chrome, Firefox and IE implement onerror, // and it will one day be standardized.. window.. onerror = function (message, url, line) { handler("Error: " + message + " " + url + ":" + line); // Note, don't return a value since Chrome/Firefox don't agree // on true/false meaning.. A no-return triggers the correct // behavior in both (print error to console).. } // Safari 5 and Opera 11 doesn't implment onerror, // so intercept the undocumented Error function if (RegExp("Safari|Opera").. test(navigator.. userAgent) !RegExp("Chrome").. userAgent)) { var originalError = window.. Error; window.. Error = function() { if (arguments.. length 0) handler("Error: " + arguments[0]); return originalError.. apply(this, arguments); } } } genericOnError(function(m) { alert(m); }); throw new Error("test error");.. GenericOnError has been tested on the current releases of IE, Firefox, Chrome, Safari and Opera.. GenericOnError should only be used for development testing, since it is likely to break catastrophically in future browser releases.. Replies.. Go Green Never Stamp.. April 30, 2011.. The US Postal Service recently released a set of.. Go Green Forever stamps.. The stamps promote various ways to Go Green like insulating houses and keeping car tires properly inflated.. All sensible ideas.. However, something seems to be missing from the list of green tips a way to go green that would eliminate 40 pounds of paper waste per person every year.. How could the Postoffice have missed this tip? Of course, the tip is to cancel junk mail or direct/bulk mail as the Postoffice prefers to call it.. No doubt they have a blind spot, since the Postoffice generates most of its revenue from junk mail.. To help fill the gap, I ve made this Go Green.. Never.. stamp to promote the cancelation of junk mail.. Catalog Choice.. is a good place to start.. My comment on an App for The Dish.. April 9, 2011.. My comment.. Andrew Sullivan.. ’s.. The Dish.. about creating an iPhone App for the blog got published.. My comment is the first quote encouraging a web-and-link friendly.. Responsive Design.. mobile web site, rather then a walled-in App.. Unlike most blogs, The Dish has no direct commenting system, but readers are encourage to email if they have something to say.. If Andrew (and his team) think you have said something interesting, then it will be quoted in a follow-up post.. Interestingly, all the comments are unattributed, so readers can speak freely and know that their comment will be judged on its weight of reasoning, and not on their name or position in the political pecking order.. Sites Refreshed, Crawlbars Eliminated.. March 28, 2011.. I ve refreshed both this blog and Habilis.. They now sport.. Responsive CSS designs.. , so no matter what device you view them on, you will never see the dreaded.. crawlbar.. Extechops.. has switched from the rather narrow and abandoned.. Day Dream theme.. to the more comfortable and up-to-date.. Twenty Ten theme.. A modified version of.. Todd Halfpenny.. Responsive TwentyTen plugin.. provides a responsive layout.. Habilis.. net.. has had an iPhone style sheet for a while, but now a general-purpose responsive style sheet spans a range of 20 to 82 em on any device.. I m particularly proud  ...   [gmail.. com - web finger] Account: romeda@gmail.. com Name: Blaine Cook Organization: BT Title: Sociotechnologist Email: Phone: Address: Belfast, Northern Ireland Profile: http://www.. google.. com/profiles/romeda OpenID: http://www.. com/profiles/romeda Links: Twitter: http://twitter.. com/blaine Blog: http://blog.. romeda.. org/ del.. icio.. us: http://delicious.. com/lattice Yelp: http://blaine.. yelp.. com Flickr: http://www.. flickr.. com/photos/lattice/ tel: http://tel:447595925264 Latest Tweet: #blogtalk2010 finished, really lots of fun.. Thanks to @johnbreslin and everyone else here for a great event.. :-D.. The WebFinger-based output of wfinger is mainly fields extracted from the user s profile using the.. hCard.. micro-format.. To add some color, wfinger will also display the user s latest tweet, if a Twitter account is detected.. When WebFinger information can t be found, wfinger falls back to using the traditional finger code/protocol.. Thus, it still works with those who have keep the finger-protocol flame alive throughout the dark ages, like.. bzs.. alexis.. at.. Panix.. I also added code to look for a new http://habilis.. net/hfinger relationship in account XRDs.. The hfinger stand for HTTP Finger, and hfinger URLs should point to HTTP finger gateways that return text/plain finger output.. This allows fingerd-like output to be tunneled via WebFinger resource discovery.. You can see this in action by wfingering my account (.. chuck@habilis.. This will be useful for people who just want traditional finger output, but are on systems that don t allow port 79 access.. I hope wfinger will generate some interest in the WebFinger protocol amongst the command-linerati and.. grumpy grey-beard sysadmins.. , who run the internet.. Share and Enjoy!.. 14 Tesla Whirling Dervishes: Circular swimming in mice after exposure to a high magnetic field.. June 16, 2010.. Today* the latest collaboration of the Brothers Houpt has hit the scientific newstands! The boffins at the.. Houpt-Lab.. are proud to present:.. Circular swimming in mice after exposure to a high magnetic field.. by T.. A.. and C.. E.. Houpt.. Paper and PDF can t really show the effect directly, so here is a video of a mouse swimming immediately after exposure to the magnet.. The output of.. Tracker.. is overlaid on the raw video to highlight the counter-clockwise looping.. As the paper notes, the effect quickly wears off.. [video mp4="http://extechops.. net/Circling-Mouse.. mp4" poster="http://extechops.. net/Circling-Mouse-Poster.. jpg" width="640" height="480"].. Tom.. did most of the work of designing, executing, analyzing, plotting and writing up of the experiment.. On experiment days at.. FSU s Magnet Lab.. , Tom s mentor and long-time magneto-collaborator,.. Dr.. Jim Smith.. , helped with the magnet rigging equipment.. I helped with the camera setup and then wrote the.. program to extract data from the raw video.. Lab Tech.. Breyda Ortega.. helped with mouse wrangling.. With this publication, I m right on track for my goal of.. one scientific paper per decade.. *The publication date on the issue s cover is today, June 16th, but it appears that P B posts its issues a month ahead of time.. You d think that the scientific press would be above the.. crass ploys.. of.. the commercial magazine industry.. , but apparently not.. If I can t trust the date on the outside of a scientific journal, how can I trust the data inside?.. Steam before the Punks Joined.. May 4, 2010.. Before there was.. Steampunk.. , there was just Steam (the.. Steam Rally.. Fengate.. , July.. 1979.. Last hit from Google China.. April 3, 2010.. Google has closed its search engine in China.. in a dispute over hacking and censorship.. As an English/Japanese site,.. habilis.. has never seen much traffic from Google China, so the last hit was in early March.. Someone in Beijing searched for.. mac os lynx.. :.. 221.. x.. x - - [09/Mar/2010:09:18:29 -0800] "GET /lynxlet/ HTTP/1.. 1" 200 3355 "http://www.. cn/search?hl=zh-CN source=hp q=mac+os+lynx btnG=Google+%E6%90%9C%E7%B4%A2 aq=f oq=" "Mozilla/5.. 0 (Macintosh; U; Intel Mac OS X 10.. 6; zh-CN; rv:1.. 9.. 2) Gecko/20100115 Firefox/3.. 6".. Ironically, the second to last hit from Google China was using.. Google s own Chrome browser.. , but it is likely a foreigner because the browser is using English:.. 121.. x - - [24/Feb/2010:07:38:36 -0800] "GET /validator-sac/ HTTP/1.. 1" 200 3137 "http://www.. cn/search?sourceid=chrome ie=UTF-8 q=validator-sac" "Mozilla/5.. 0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/533.. 1 (KHTML, like Gecko) Chrome/5.. 0.. 322.. 2 Safari/533.. 1"..

    Original link path: /page/2/
    Open archive

  • Title: Unit Tests are Parity Bits for Code | ExTechOps
    Descriptive info: Previous.. This entry was posted in.. Bookmark the.. permalink.. Leave a Reply.. Cancel reply.. Your email address will not be published.. Required fields are marked.. *.. Name.. Email.. Website.. Comment.. You may use these.. HTML.. tags and attributes:.. a href= title= abbr title= acronym title= b blockquote cite= cite code del datetime= em i q cite= strike strong..

    Original link path: /2013/06/01/unit-tests-are-parity-bits-for-code/
    Open archive

  • Title: Chuck | ExTechOps
    Descriptive info: Author Archives:..

    Original link path: /author/chuck/
    Open archive

  • Title: Code | ExTechOps
    Descriptive info: Category Archives:.. HTML in 3D!.. March 23, 2010.. Boing Boing.. recently noted the satirical.. McSweeney s.. piece.. Leaping off the Page.. Ben Greenman.. that proposed a 3D typographic system,.. 3*TYPE.. , which would allow simple prose to meet the challenges of the Avatar-inspired 3D revolution.. However, where would satire be without farce? So taking things to their natural extreme, I present HTML in 3D! which implements the.. process for any web page.. HTML in 3D is a.. bookmarklet.. CSS stylesheet.. that produce a.. anaglyph stereoscopic 3D effect.. for common HTML text elements (headers, links, etc).. It should work in most modern browsers (i.. probably not IE).. Put on some anaglyph red-blue 3D glasses and click the link to see this post in headache-inducing 3D:.. 3D!.. How to use the bookmarklet elsewhere:.. Drag the 3D! link above to your browser s bookmark bar.. Load any web page.. Don anaglyph red-blue 3D glasses.. Click the 3D! bookmark, and watch the HTML pop!.. Thanks to.. GEKE.. NET.. for the.. CSS Bookmarklet Maker.. RSS Feeds for Full Episodes of The Colbert Report and The Daily Show.. March 16, 2010.. 11.. Recently.. Comedy Central yanked The Daily Show and The Colbert Report off of Hulu.. [update: in early 2011, the show returned to Hulu].. I started watched these shows on.. Hulu.. because it provided RSS feeds for the full episodes, while.. Comedy Central.. has only ever had segment/clip feeds.. Luckily, the shows sites have feed-like.. AJAH.. pages that are easily massaged into a true  ...   now main development is done on the snout , speculative versions are on tails and snap-shots of individual releases are paw-prints.. See where Lynxlet s snout leads it at the.. Habilis Public Subversion Repositories.. Case Study: Blistering Barnacles! release to Apple s Web App List.. February 26, 2009.. I released a simple iPhone and iPod Touch web app called.. Blistering Barnacles!.. (BB) a homage to my favorite.. Tintin.. character,.. Captain Haddock.. I submitted BB to.. Apple s Web Application Catalog.. , which produced a small flurry of hits.. Here are some of the numbers.. In total about 770 unique visitors ran the app, about 460 on the first day when BB was listed high on the front page.. There were very few repeat visitors, averaging about 1.. 08 runs per visitor.. Geographically, the English speaking countries are at the top.. Curiously, Singapore makes a very strong showing, and why so few Australians?.. After two days, BB had fallen off the front page and was in 10th place on the.. Most Popular page.. and 4th place in the.. Entertainment Category.. Interestingly, the percent of iPhones to iPod Touches was roughly 60%/40%.. I m surprised there were so many Touches.. I wasn t particularly surprised by the low numbers, partly because the Adventures of Tintin are not that well know (at least until the movie comes out).. Also, web apps are now a quiet backwater in the iPhone ecosystems in comparison to native apps which are directly accessible from the iPhone/Touch..

    Original link path: /category/code/
    Open archive

  • Title: Wanted: Comment Redaction Plugin | ExTechOps
    Descriptive info: Next.. One thought on.. Ken.. on.. May 16, 2013 at 11:35 am.. said:.. When this takes over every IDE, do I get credit for provoking it?? :-)..

    Original link path: /2013/05/15/wanted-comment-redaction-plugin/
    Open archive

  • Title: The Undead of Wikipedia | ExTechOps
    Descriptive info: February 8, 2013 at 1:26 pm.. Hmm.. There must be a criteria for being a WikiVampire??..

    Original link path: /2013/02/07/the-undead-of-wikipedia/
    Open archive

  • Title: General | ExTechOps
    Original link path: /category/general/
    (No additional info available in detailed archive for this subpage)

  • Title: There are 10 types of people in the world… | ExTechOps
    Descriptive info: July 18, 2012 at 2:21 pm.. x - x x - x.. / / / x x x.. | / / / x x x.. / / / x - x x..

    Original link path: /2012/07/18/there-are-10-types-of-people-in-the-world/
    Open archive

  • Title: Alphacon III, 30th Anniversary | ExTechOps
    Original link path: /2011/11/15/alphacon-iii-30th-anniversary/
    (No additional info available in detailed archive for this subpage)

  • Archived pages: 105