<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Perpendicular Angel Design</title>
	<atom:link href="http://www.perpendicularangel.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.perpendicularangel.com</link>
	<description>Organizing and simplifying, one illumination at a time</description>
	<lastBuildDate>Wed, 15 May 2013 02:20:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Things I have done in the last three weeks</title>
		<link>http://www.perpendicularangel.com/2013/05/things-i-have-done-in-the-last-three-weeks/</link>
		<comments>http://www.perpendicularangel.com/2013/05/things-i-have-done-in-the-last-three-weeks/#comments</comments>
		<pubDate>Wed, 15 May 2013 02:20:42 +0000</pubDate>
		<dc:creator>Anne Gibson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.perpendicularangel.com/?p=180</guid>
		<description><![CDATA[Hectic, harrowing, and headachey are the ways to describe the last three weeks, but so much of it is design-oriented I felt like it was time for a blog post. I attended Future Insights Live in Las Vegas and live-tweeted &#8230; <a href="http://www.perpendicularangel.com/2013/05/things-i-have-done-in-the-last-three-weeks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Hectic, harrowing, and headachey are the ways to describe the last three weeks, but so much of it is design-oriented I felt like it was time for a blog post.</p>
<ul>
<li><span style="line-height: 15px;">I attended <a href="http://futureinsightslive.com/las-vegas-2013/" target="_blank">Future Insights Live</a> in Las Vegas and <a title="Link to my twitter account" href="https://twitter.com/perpendicularme" target="_blank">live-tweeted</a> the conference sessions I attended. (In short: this is a great conference you should attend, despite it being in Las Vegas. Yes, I said &#8220;despite&#8221;. I&#8217;m a shy introvert who&#8217;s allergic to cigarette smoke and that place was a new circle of hell for me.) </span></li>
<li>I built a new website called <a href="http://www.borrowablog.com" target="_blank">BorrowABlog.com</a>. What&#8217;s that about? Well occasionally folks say they wish they had a blog to post to, but they only really have one or two things they occasionally want to write about. If that describes you, register, blog when you want, and link to your blog post from wherever.</li>
<li>I built a website for close friends who lost their son to brain cancer, and are now raising money for cancer research. (I&#8217;d love to link to it, but the parents in question haven&#8217;t given it the thumbs-up yet.)</li>
<li>I accepted a new position at work, moving from Interaction Designer back to Information Architect &#8212; with a lot of interaction design still in my future. I&#8217;m really excited to join my new team and stretch a bit more into the &#8220;UX generalist&#8221; role. It&#8217;s a little scary, too (what new job isn&#8217;t?) because I&#8217;ll be moving to a different division of the company and serving a different business group for the first time in thirteen years.</li>
<li>I wrote two articles &#8212; like actual articles, not just tech writing &#8212; for aforementioned primary employer, which at some point will be published up on the main site. As an Engish major with heavy IT leanings (or a Software Engineer Poet, depending on the day) I&#8217;m really grateful to have the opportunity to communicate in words as well as designs.</li>
</ul>
<p>In other words, life is full of change, but those changes are good.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.perpendicularangel.com/2013/05/things-i-have-done-in-the-last-three-weeks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arrgh</title>
		<link>http://www.perpendicularangel.com/2012/05/arrgh/</link>
		<comments>http://www.perpendicularangel.com/2012/05/arrgh/#comments</comments>
		<pubDate>Thu, 24 May 2012 18:11:51 +0000</pubDate>
		<dc:creator>Anne Gibson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Internet Explorer bugs]]></category>

		<guid isPermaLink="false">http://www.perpendicularangel.com/?p=170</guid>
		<description><![CDATA[Me (working on a month 3 of the same huge prototype): OK, so I need this cell to be 110px wide&#8230; Internet Explorer 8: OH HAI I see you want this last cell to be 110px wide. I can do &#8230; <a href="http://www.perpendicularangel.com/2012/05/arrgh/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Me (working on a month 3 of the same huge prototype): OK, so I need this cell to be 110px wide&#8230;</p>
<p>Internet Explorer 8: OH HAI I see you want this last cell to be 110px wide. I can do that no problem but first Imma gonna shift the contents of the cell to align left, mmkay?</p>
<p>Me: What?!? No!</p>
<p>Internet Explorer 8: Yup. </p>
<p>Me: Okaaaaay, what if I add a class=&#8221;right&#8221;, will you put it back?</p>
<p>IE8: Nuh uh. </p>
<p>Me: Align right? tbody class=&#8221;right&#8221;? </p>
<p>IE8: LALALALA I CAN&#8217;T HEEEAR YOU&#8230;.</p>
<p>Me: (searches web frantically&#8230;.) OK, this makes NO sense, but this cell&#8217;s in a table with a width of 100%&#8230;. so if I set the width of the cell to 13% instead of 110 px&#8230;?</p>
<p>IE8: Hey, I see you want to make the width of this cell 13% so Imma gonna put this cell back to right alignment, mmkay?</p>
<p>Me:  I hate you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.perpendicularangel.com/2012/05/arrgh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Zoo Story philosophy, and when it doesn&#8217;t work.</title>
		<link>http://www.perpendicularangel.com/2012/02/the-zoo-story-philosophy-and-when-it-doesnt-work/</link>
		<comments>http://www.perpendicularangel.com/2012/02/the-zoo-story-philosophy-and-when-it-doesnt-work/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 02:19:41 +0000</pubDate>
		<dc:creator>Anne Gibson</dc:creator>
				<category><![CDATA[Meta posts]]></category>
		<category><![CDATA[literary references]]></category>
		<category><![CDATA[responsive design]]></category>
		<category><![CDATA[responsive images]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.perpendicularangel.com/?p=119</guid>
		<description><![CDATA[In his play The Zoo Story, Edward Albee once wrote, &#8220;Sometimes a person has to go a very long distance out of his way to come back a short distance correctly.&#8221; I&#8217;ve always seen that as a bit of a &#8230; <a href="http://www.perpendicularangel.com/2012/02/the-zoo-story-philosophy-and-when-it-doesnt-work/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In his play <em>The Zoo Story</em>, Edward Albee once wrote, &#8220;Sometimes a person has to go a very long distance out of his way to come back a short distance correctly.&#8221;</p>
<p>I&#8217;ve always seen that as a bit of a motto for my design work. As designers, it&#8217;s rare that we get handed a problem to solve that has a straightforward easy-to-implement solution. It&#8217;s all about the context of the problem, especially when <a href="http://www.inkblurt.com/2012/01/20/the-contexts-we-make/">we&#8217;re creating the context</a> as we go. A thoroughly researched and implemented design requires capability strategy, iteration, research, iteration, design, iteration, testing, iteration, iteration, and iteration. You can try to cut off somewhere in the middle or skip a few steps, but you&#8217;ll usually come out of it with something that feels just a bit like you installed shelves with only some of the pieces that were supposed to be in the box. There&#8217;s nothing wrong with approaching complex problems with the mindset that the journey will be long, but the destination might be two blocks over from where you started.</p>
<p>Today, though, I&#8217;m thinking of rethinking the <em>Zoo Story</em> approach to this blog.</p>
<p>I&#8217;ve been going a long distance out of my way to design and develop a visually-attractive responsive theme for this blog, so I could come back the short distance of &#8220;provide evidence that you can produce a quality blog&#8221; correctly. I want to prove to myself that I could work on mobile-first content-first responsive design projects by making this a responsive-design (responsively-designed?) blog about design, development, and user experience.</p>
<p>I&#8217;ve hand-coded the theme(s) to <a href="http://www.kirabug.com">my other blog</a> since I moved to WordPress in 2004, and before that I hand-coded all the pages. I learned most of my CSS and all of my PHP developing for my now-sleeping comic. When I started, there was no good canned theme solution for comic presentation in WordPress. (There still isn&#8217;t. That&#8217;s a rant for another day and one that requires <a href="http://www.alistapart.com/articles/responsive-images-how-they-almost-worked-and-what-we-need/">responsive images to be solved</a>.)</p>
<p>The problems I ran into were threefold:</p>
<p>First, WordPress&#8217;s crack development team beat me to it. Their 2011 theme is already responsive. So to make <em>my! very! own!</em> responsive design theme, I had to cover my eyes and LALALALA a lot to pretend I hadn&#8217;t seen anything in their code. Even though it&#8217;s excellent, and it works for my site structure.</p>
<p>Second, the development of a responsive design layout takes a <em>lot</em> of work. It is an absolutely great experience from an educational standpoint, and one I plan to continue. It&#8217;s just not something I can produce fast enough to also blog on a regular basis, which was the point of having a blog. </p>
<p>Third, I&#8217;ve had a stubborn blind spot about using other peoples&#8217; code for my website(s) since the beginning. I was &#8220;raised&#8221; in the world of apps producing truly crap code &#8220;for me&#8221; (see Microsoft Word, FrontPage, and even Dreamweaver to a certain extent). I struggle against using any code-generation system because my gut says it must be full of bloat. Why use WordPress&#8217;s image uploader when a simple &lt;img src&gt; declaration would be enough to meet my needs? </p>
<p>But the fact is that, for a responsive site with responsive images, they&#8217;ve got a damn good system going here. </p>
<p>It might be worth noting that in <em>The Zoo Story</em> the &#8220;right&#8221; solution involves <a href="http://www.enotes.com/zoo-story">forcing an unsuspecting stranger to knife you</a>. So, y&#8217;know, there&#8217;s an argument to be made for staying local and not provoking others into violence. </p>
<p>Sometimes, you have to go a long way out of your way to come back a short distance correctly. But sometimes, <em>sometimes</em> you can walk two blocks and reach the same destination, without any fuss or heartache at all. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.perpendicularangel.com/2012/02/the-zoo-story-philosophy-and-when-it-doesnt-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wait, what?</title>
		<link>http://www.perpendicularangel.com/2012/02/wait-what/</link>
		<comments>http://www.perpendicularangel.com/2012/02/wait-what/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 21:29:07 +0000</pubDate>
		<dc:creator>Anne Gibson</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobile web]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.perpendicularangel.com/?p=114</guid>
		<description><![CDATA[From Google’s Worlds Collide as Chrome Browser Comes to Android The big promise of Chrome is that browsing on the phone would shift to something that people do often instead of something only done when one has to. “We can &#8230; <a href="http://www.perpendicularangel.com/2012/02/wait-what/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>From <a href="http://allthingsd.com/20120207/googles-worlds-collide-as-chrome-comes-to-android/?reflink=ATD_smartmoney&#038;link=SM_portfolio">Google’s Worlds Collide as Chrome Browser Comes to Android</a></p>
<blockquote><p>The big promise of Chrome is that browsing on the phone would shift to something that people do often instead of something only done when one has to.</p>
<p>“We can really take a leap forward on the mobile Web,” Chrome boss Sundar Pichai said in an interview. “Previously, it is something you would do once in a while. You would hesitate.”</p></blockquote>
<p>Clearly, they are not reading <a href="https://twitter.com/#!/lukew/status/166985173274066945"> Luke Wroblewski</a>&#8216;s twitter stream. </p>
<blockquote><p>Avg smartphone user downloads .083 apps a day. Visits 24 different web sites a day.</p></blockquote>
<p>Who are these supposed non-web-surfers and what are they afraid of?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.perpendicularangel.com/2012/02/wait-what/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hard drive tear-down</title>
		<link>http://www.perpendicularangel.com/2011/10/hard-drive-tear-down/</link>
		<comments>http://www.perpendicularangel.com/2011/10/hard-drive-tear-down/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 19:05:13 +0000</pubDate>
		<dc:creator>Anne Gibson</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://www.perpendicularangel.com/?p=74</guid>
		<description><![CDATA[That hard drive in your computer? Here&#8217;s how it works.]]></description>
				<content:encoded><![CDATA[<p>That hard drive in your computer? Here&#8217;s how it works.</p>
<div class="video-container"><iframe src="http://www.youtube.com/embed/Wiy_eHdj8kg" frameborder="0" width="560" height="315"></iframe></div>
]]></content:encoded>
			<wfw:commentRss>http://www.perpendicularangel.com/2011/10/hard-drive-tear-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Allow me to introduce &#8220;Looking backwards for one value&#8221;</title>
		<link>http://www.perpendicularangel.com/2011/08/passing-variables/</link>
		<comments>http://www.perpendicularangel.com/2011/08/passing-variables/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 03:52:20 +0000</pubDate>
		<dc:creator>Anne Gibson</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.perpendicularangel.com/?p=53</guid>
		<description><![CDATA[How to check for specific variables passed from previous pages using Javascript for your prototypes I use this technique when I&#8217;m prototyping a multi-step form/application and I know what data I want to show on the page depending on whether &#8230; <a href="http://www.perpendicularangel.com/2011/08/passing-variables/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>How to check for specific variables passed from previous pages using Javascript for your prototypes</p>
<p>I use this technique when I&#8217;m prototyping a multi-step form/application and I know what data I want to show on the page depending on whether I&#8217;m walking through scenario A, B, or C. It&#8217;s good in situations where you&#8217;re setting radio buttons on the previous page and just need to know which one was clicked. It&#8217;s lousy for situations where you don&#8217;t know what value your previous page might&#8217;ve sent. It&#8217;s best used when your &#8220;Review&#8221; and &#8220;Confirmation&#8221; pages are virtually identical except for one or two key pieces of data. There, it saves you time from building 3 review pages and 3 confirmation pages.</p>
<p>It is extremely breakable and probably shouldn&#8217;t be used in production code.</p>
<p>This uses forms submitted via GET so all the variables are in the URL.</p>
<p>First, on the page with the form, make sure the value you want to pass is in an input element in the form with a name (and the value) assigned to it. Input type=hidden is handy for this.</p>
<p>Second, make sure you&#8217;re submitting the form on the first page. Yes, this sounds obvious but when you&#8217;re prototyping sometimes folks take the quick way out and just code a button with a location.href Javascript on it, and that&#8217;s not a form submission.</p>
<p>Third, make sure that when you submit the form, the variable you want shows up as a name/value pair in the URL of the next page. That means the value is getting to where you&#8217;re going.</p>
<p>Now for the fun part. On the page receiving the value you need to do two things:</p>
<ul>
<li>Get the method out of the URL</li>
<li>Tell the page to use it to do something</li>
</ul>
<p>To get the method out of the URL, we do this:</p>
<p><code>function getMethod(){<br />
var thisurl = window.location.href;<br />
var locationOfValue = thisurl.search('TheValueYouAreHuntingFor');<br />
if (locationOfValue = -1){<br />
//write yourself an error condition handler in case your value's not there<br />
} else {<br />
//do the thing you want to do if you found it<br />
}<br />
} </code></p>
<p>(Please excuse WordPress&#8217;s built-in CodeMangler for the spacing&#8230;sigh)</p>
<p>So what&#8217;s that do exactly?</p>
<p>window.location.href grabs the href (URL) of the current window in string format so you can search it.</p>
<p>String.search(regex) tells you the position where a regular expression occurs in a string. If it&#8217;s not present, String.search() returns -1. So we take our string (thisurl) and search it for the value of the name/value pair we&#8217;re sending, and assign the result to a variable (locationOfValue). (Yes, you can definitely use shorter variables. This is a sanitized version of a function I&#8217;m using elsewhere. And it&#8217;s more readable this way.)</p>
<p>If locationOfValue is equal to -1 we didn&#8217;t find it. Either your value wasn&#8217;t passed correctly or you came into the page directly and the first page didn&#8217;t get the opportunity to pass anything. This is a good place to put a &#8220;if there&#8217;s no value here&#8217;s what I want you to display&#8221; clause.</p>
<p>If locationOfValue is NOT equal to -1 we found the value somewhere in the URL. Do whatever it was you were planning to do when you got it.</p>
<p>Obviously, once you have the tools to grab the location and parse it for a value or three, you can build more complex if/else if/else statements, but this is the simple version.</p>
<p>Now the final challenge is getting your page to call your function. Because we want to read in from the URL and use its results to modify the page, we want to throw a script block on the bottom of the page  that calls getMethod. Something like:</p>
<p>&lt;script&gt;<br />
getMethod();<br />
&lt;/script&gt;</p>
<p>Write the page itself to be generic to whatever you want if it all crashes and burns spectacularly. (As they say on Mythbusters, failure is ALWAYS an option.) Then use the getMethod to read in your variables and modify your content accordingly.</p>
<p>I&#8217;ll try to build an example at some point soon.</p>
<p class="note">*if you got the titular reference to the video game Catherine, w00t! Also, is that one creepy game or what?!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.perpendicularangel.com/2011/08/passing-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The manual in the glove compartment</title>
		<link>http://www.perpendicularangel.com/2011/07/the-manual-in-the-glove-compartment/</link>
		<comments>http://www.perpendicularangel.com/2011/07/the-manual-in-the-glove-compartment/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 02:00:30 +0000</pubDate>
		<dc:creator>Anne Gibson</dc:creator>
				<category><![CDATA[Design heuristics]]></category>
		<category><![CDATA[Error handling]]></category>

		<guid isPermaLink="false">http://www.perpendicularangel.com/?p=20</guid>
		<description><![CDATA[Design principles have been a hot topic this spring, with both Jeremy Keith and Whitney Hess giving talks throughout the country, and lots of folks looking for, and building, lists of principles. (Note: I haven&#8217;t heard either talk, but I&#8217;ve &#8230; <a href="http://www.perpendicularangel.com/2011/07/the-manual-in-the-glove-compartment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p class="note">Design principles have been a hot topic this spring, with both <a href="http://adactio.com/">Jeremy Keith</a> and <a href="http://whitneyhess.com/blog/">Whitney Hess</a> giving talks throughout the country, and lots of folks looking for, and building, lists of principles. (Note: I haven&#8217;t heard either talk, but I&#8217;ve seen retweeted notes and my understanding is that they were both excellent.)</p>
<p class="note">We have a set of design principles and heuristics at my primary employer, which I&#8217;m developing training for. I&#8217;m exploring concrete examples inside and outside of the web, since I&#8217;m the type that learns from those best.</p>
<p>Error handling: Make it easy to identify an error when it occurs.</p>
<p>I drive an 11-year-old 2001 Saturn SL 1, which I&#8217;ve owned since it was 12 miles old. That car and I know each other pretty well. (Her name is Fluffy.)</p>
<p>This morning, a new thing lit up on Fluffy&#8217;s dashboard.</p>
<p><img class="aligncenter" src="http://www.perpendicularangel.com/wp-content/uploads/2011/06/20110615-010029.jpg" alt="" /></p>
<p>Clearly a warning light, it was trying to tell me something, but I&#8217;d never seen it before. My first guess was &#8220;GO TO THE BEACH&#8221;, because it&#8217;s June and that&#8217;s where I want to be. My second guess was &#8220;oil is low&#8221; because oil burning is the biggest problem Fluffy has had in her later years, and thus it was fresh in my mind. But low oil hasn&#8217;t triggered a light before, so despite being this car&#8217;s expert user, all I really knew was what I didn&#8217;t know.</p>
<p>Fortunately, I keep Fluffy&#8217;s manual in the glove compartment. The manual describes all the obvious error messages and error conditions, what to do about them, and when to contact someone. It&#8217;s both unobtrusive in its home in the glove box, and accessible when I needed it, regardless of the error. (well, &#8220;passenger seat on fire&#8221; might have caused problems, but there&#8217;s no light for that anyway.)</p>
<p>I could have chosen to take out my iPhone, and Google the problem. But the book was easily accessible without power, without cell signal, and without searching a half-dozen websites for a solution. It fits perfectly in the lowest reaches of my glove compartment, where it doesn&#8217;t interfere with the napkins, pens, and (yes actually) gloves I&#8217;ve piled in there over the years. It was <em>designed</em> to be accessible when I need it and out of the way the rest of the time. It was easier for me to look up the light&#8217;s meaning than to drive away and worry, which is a triumph in designing against inertia.</p>
<p>(The light, by the way, is a warning that I&#8217;m low on engine coolant.)</p>
<p>Error handling design heuristics are tightly coupled with learnability heuristics. A novice user who learns where to look for help will eventually become an expert user that doesn&#8217;t use the manual for years, but might need to look up a random light on a sunny July morning. The language and icons need to be as understandable as possible for both the novice and the expert user. (Had I followed up on my first guess and added a quart of unnecessary oil, Fluffy would&#8217;ve been smoking for days!)</p>
<p>When we&#8217;re designing a process, we decide what the manual will look like. The manual can&#8217;t just be rainbows and puppies, regardless of how badly we want to give the impression that our sites will never fail. Everyone &#8211; even our expert users &#8211; will occasionally run into an event they weren&#8217;t expecting. It&#8217;s a task outside the happy path. The more obscure the problem, the better a chance we&#8217;re going to want to avoid building both the error notification and the follow-up steps altogether. That&#8217;s a temptation we should avoid.</p>
<p>Make sure that your messaging is findable and clear. If you can detect an error occurred, don&#8217;t just give a warning light, but also give instructions on what to do about it. Make choices on when to display that message immediately (&#8220;GET OUT YOUR CAR IS ON FIRE&#8221;) and when to put the error in the manual in the glove compartment. Make good conscious choices about all of the unhappy paths, and you&#8217;ll satisfy the people using your process even when things go slightly awry.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.perpendicularangel.com/2011/07/the-manual-in-the-glove-compartment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript tip: Variadic functions</title>
		<link>http://www.perpendicularangel.com/2011/07/javascript-tip-variadic-functions/</link>
		<comments>http://www.perpendicularangel.com/2011/07/javascript-tip-variadic-functions/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 05:02:34 +0000</pubDate>
		<dc:creator>Anne Gibson</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.perpendicularangel.com/?p=56</guid>
		<description><![CDATA[Let&#8217;s say you have a table of data, and you have a requirement to hide some or all of the data by clicking some &#8220;hide&#8221; or &#8220;show&#8221; links. If your data is only one-tier, it&#8217;s pretty easy to do. You &#8230; <a href="http://www.perpendicularangel.com/2011/07/javascript-tip-variadic-functions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Let&#8217;s say you have a table of data, and you have a requirement to hide some or all of the data by clicking some &#8220;hide&#8221; or &#8220;show&#8221; links. If your data is only one-tier, it&#8217;s pretty easy to do. You can wrap the rows that you want to hide or show in a &lt;tbody&gt; tag and use that tag to make the rows it contains display or disappear. <a href="http://www.perpendicularangel.com/tests/variated2.html">Here&#8217;s an example.</a></p>
<p>But while a &lt;table&gt; can have multiple &lt;tbody&gt; tags, they have to be stacked, they can&#8217;t be nested.</p>
<table>
<tbody>
<tr>
<td>
<pre><strong>Good:</strong>
&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;...&lt;/tr&gt;
    &lt;tr&gt;...&lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;tbody&gt;
    &lt;tr&gt;...&lt;/tr&gt;
    &lt;tr&gt;...&lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;</pre>
</td>
<td>
<pre><strong>Bad:</strong>
&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;...&lt;/tr&gt;
    &lt;tbody&gt; <em><span style="color: #999999;">&lt;!-- ack! --&gt;</span></em>
      &lt;tr&gt;...&lt;/tr&gt;
      &lt;tr&gt;...&lt;/tr&gt;
    &lt;/tbody&gt;
    &lt;tr&gt;...&lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;</pre>
</td>
</tr>
</tbody>
</table>
<p>So what to do when someone designs a table that has multiple levels of expand and collapse and asks you to build it?</p>
<p>(A valid answer is &#8220;ask them if they really honestly truly need that much info at one time, because I mean c&#8217;mon really? There isn&#8217;t an information architecture solution better than that? Are they crazy?&#8221; but alas, sometimes that doesn&#8217;t cut it.)</p>
<p>If you knew that every time you needed to hide the subcategory&#8217;s rows you&#8217;d be hiding the same number of rows, you could write a function that accepted exactly that number of rows:</p>
<pre>function hide3rows('ID1', 'ID2', 'ID3'){
  document.getElementById('ID1').style.display="none";
  document.getElementById('ID2').style.display="none";
  document.getElementById('ID3').style.display="none";
}</pre>
<p>But I tell you as soon as you do that, some pest is going to come along and change the requirements to more rows or fewer rows, or sometimes six rows and sometimes eight. And you certainly don&#8217;t want to spend your time building a library of hide1row(), hide2rows(), etc. because you need that free time to follow around the person who wrote these requirements so you can keep asking them if they are in fact crazy.</p>
<p>This is where <a href="http://en.wikipedia.org/wiki/Variadic_function">variadic functions</a> come in. A variadic function is one that accepts a variable number of arguments. Generally, it does the same thing to all of the arguments, like add them together, or print them, or in our case figure out which elements they refer to and change their display attribute from visible to hidden. Different languages support variadic functions in different ways. JavaScript actually makes them pretty easy to use, by treating the arguments passed to the function like an array, so we can check the arguments/array length and iterate over its elements.</p>
<pre>function hideThings() {
  for (var i = 0; i &amp;lt; arguments.length; i++) {
    document.getElementById(arguments[i]).style.display='none';
  }
}</pre>
<p><a href="http://www.perpendicularangel.com/tests/variated.html">Here&#8217;s our previous table modified to use this function.</a><br />
Now we can call our hide function with as many or as few arguments as we need to hide. hideThings(&#8216;mon&#8217;, &#8216;tue&#8217;, &#8216;wed&#8217;, &#8216;thu&#8217;, &#8216;fri&#8217;); is just as valid as hideThings(&#8216;birthdays&#8217;); and we don&#8217;t need to clutter up our files with sixty five versions of the same function.</p>
<tbody></tbody>
<tbody></tbody>
]]></content:encoded>
			<wfw:commentRss>http://www.perpendicularangel.com/2011/07/javascript-tip-variadic-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript tip:  Style display and table rows</title>
		<link>http://www.perpendicularangel.com/2011/06/javascript-tip-style-display-and-table-rows/</link>
		<comments>http://www.perpendicularangel.com/2011/06/javascript-tip-style-display-and-table-rows/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 04:37:54 +0000</pubDate>
		<dc:creator>Anne Gibson</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.perpendicularangel.com/?p=37</guid>
		<description><![CDATA[It seems like about half the world knows this one, but the other half doesn&#8217;t. Let&#8217;s say you have a table, and you want to be able to toggle various rows on and off. So you write yourself a couple &#8230; <a href="http://www.perpendicularangel.com/2011/06/javascript-tip-style-display-and-table-rows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>It seems like about half the world knows this one, but the other half doesn&#8217;t. </p>
<p>Let&#8217;s say you have a table, and you want to be able to toggle various rows on and off. So you write yourself a couple of simple Javascript functions to hide and show your stuff.<br />
<code><br />
function hide(thingID){<br />
	document.getElementById(thingID).style.display = 'none';<br />
}</p>
<p>function show(thingID){<br />
	document.getElementById(thingID).style.display = 'block';<br />
}<br />
</code></p>
<p>Here&#8217;s the problem: display:block turns a table row into a block element &#8212; which is to say it compresses the whole table row into one big chunk and stuffs it into the space for your first table cell in that row. </p>
<p><img src="http://www.perpendicularangel.com/wp-content/uploads/2011/06/blockbusted.png" alt="" title="blockbusted" width="650" height="241" class="alignnone size-full wp-image-39" /></p>
<p>If you do your research, you&#8217;ll quickly learn that <a href="http://www.w3.org/TR/CSS2/visuren.html#display-prop">the W3C says you&#8217;re supposed to use &#8220;display:table-row&#8221; for tables</a>. But when you change your &#8220;show&#8221; function to use the preferred method, all the standards-compliant browsers start working, but IE 7 and the other annoying old IE browsers you&#8217;re forced to support just flat out drop the rows. </p>
<p><img src="http://www.perpendicularangel.com/wp-content/uploads/2011/06/rowsgone.png" alt="" title="rowsgone" width="650" height="117" class="alignnone size-full wp-image-41" /></p>
<p>The secret? So obvious almost no one thinks of it until they&#8217;re told:<br />
<code><br />
function show(thingID){<br />
	document.getElementById(thingID).style.display = '';<br />
}<br />
</code></p>
<p>By setting the display to effectively &#8220;ain&#8217;t got one&#8221;, you tell the browser to display the row the way it would have if you hadn&#8217;t messed with it. Which results in what you were looking for:</p>
<p><img src="http://www.perpendicularangel.com/wp-content/uploads/2011/06/allrows.png" alt="" title="allrows" width="650" height="168" class="alignnone size-full wp-image-38" /></p>
<p>To check the results in your browser(s) of choice, feel free to <a href="http://www.perpendicularangel.com/tests/jsdisplaytest.html">fiddle with this test page</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.perpendicularangel.com/2011/06/javascript-tip-style-display-and-table-rows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pet peeves: Review pages you can&#8217;t review</title>
		<link>http://www.perpendicularangel.com/2011/05/pet-peeves-review-pages-you-cant-review/</link>
		<comments>http://www.perpendicularangel.com/2011/05/pet-peeves-review-pages-you-cant-review/#comments</comments>
		<pubDate>Mon, 30 May 2011 21:57:47 +0000</pubDate>
		<dc:creator>Anne Gibson</dc:creator>
				<category><![CDATA[Pet peeves]]></category>
		<category><![CDATA[security questions]]></category>

		<guid isPermaLink="false">http://www.perpendicularangel.com/?p=13</guid>
		<description><![CDATA[There&#8217;s security, and then there&#8217;s stupidity. We&#8217;re all familiar by now with the security pattern where you set up 2-3 questions that &#8220;only you&#8221; will know the answer to (well, only you and people who know you really well, anyway) &#8230; <a href="http://www.perpendicularangel.com/2011/05/pet-peeves-review-pages-you-cant-review/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>There&#8217;s security, and then there&#8217;s stupidity.</p>
<p>We&#8217;re all familiar by now with the security pattern where you set up 2-3 questions that &#8220;only you&#8221; will know the answer to (well, only you and people who know you really well, anyway) in addition to your username and password. It essentially sets up a two-password system. If you can&#8217;t answer the first password (your security question&#8217;s answer) you never get to the second password, thus securing it.</p>
<p>Or something.</p>
<p>I have a lot of problems with that security pattern, which I won&#8217;t get into here, because this post isn&#8217;t about the security, it&#8217;s about the stupidity. It&#8217;s security when you ask me to set up a double-password system. Since it&#8217;s critical information, it&#8217;s good design and good sense to ask me to review the information before I submit it, and print it for my records. One password is hard enough to remember, but this pattern essentially asks me to set up three.</p>
<p>It&#8217;s stupidity when you decide that your security policies need to be strong that when you ask me to review my information for accuracy, you obscure the answers to my questions.</p>
<p>And yet&#8230; that&#8217;s what we have here.<br />
<img class="aligncenter" src="/graphics/comic/strips/not-helpful.png" alt="Asterisking out the answers to the security questions? Not helpful when part of reviewing is confirming that I spelled them right!" /><br />
I&#8217;m willing to guess that the vast majority of people are not dumb enough to fill out a registration form for a medical billing website on the Jumbotron of their local stadium, or anywhere else that would allow a significant number of people to view the process. So why make that registration even harder by blocking the review of critical account-access-granting information? It&#8217;s security absurdity.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.perpendicularangel.com/2011/05/pet-peeves-review-pages-you-cant-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
