<?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>www.hackification.com &#187; Design</title>
	<atom:link href="http://www.hackification.com/category/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hackification.com</link>
	<description></description>
	<lastBuildDate>Sat, 05 Jun 2010 11:16:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Designing a VS2010 Color Scheme &#8211; Consistency, Consistency, Consistency</title>
		<link>http://www.hackification.com/2010/05/16/designing-a-vs2010-color-scheme-consistency-consistency-consistency/</link>
		<comments>http://www.hackification.com/2010/05/16/designing-a-vs2010-color-scheme-consistency-consistency-consistency/#comments</comments>
		<pubDate>Sun, 16 May 2010 19:05:53 +0000</pubDate>
		<dc:creator>Stu Smith</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[colors]]></category>
		<category><![CDATA[highlighting]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.hackification.com/?p=481</guid>
		<description><![CDATA[I recently found StudioStyles, a collection of Visual Studio 2010 color schemes, and it inspired me to create my own. I&#8217;ve never bothered customizing my editor colors before, but since VS2010 has an overall darker look, I thought I&#8217;d have a bash at creating a matching dark editor scheme. Looking through some of the submissions [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-503" style="margin-right: 10px;" title="Colors" src="http://www.hackification.com/wp-content/uploads/2010/05/Colors.png" alt="" width="160" height="110" />I recently found <strong><a href="http://studiostyles.info/" target="_blank">StudioStyles</a>, a collection of Visual Studio 2010 color schemes</strong>, and it inspired me to create my own. I&#8217;ve never bothered customizing my editor colors before, but since VS2010 has an overall darker look, I thought I&#8217;d have a bash at creating a matching dark editor scheme.</p>
<p><span id="more-481"></span>Looking through some of the submissions on the site, I was struck by how&#8230; well&#8230; random most of them are. Without meaning to be rude, they just look like someone went through the list, randomly assigning colors. Many many programmers believe coding and graphic design are polar opposites &#8211; that if you&#8217;re a coder, you must necessarily suffer from &#8220;programmer art&#8221;, and hence that it&#8217;s pointless to ever try to learn better design skills. <strong>I completely disagree with this diagnosis.</strong></p>
<p>I&#8217;m going to use only one design rule for this color scheme &#8211; consistency: <strong>keep similar things similar, and make different things different</strong>.</p>
<h3>Basics</h3>
<p>I&#8217;ve already decided to create a &#8220;dark&#8221; theme, so the background will be black. I also want to highlight important or dangerous elements of the source, and downplay incidental aspects. This idea will modify each of the colors chosen, and help suggest colors where there is no clear choice. Each choice will be reflected as far as is possible across many file types &#8211; for example, a C# comment should probably be the same color as an XML one, a JavaScript one, etc.</p>
<p>I&#8217;m also going to make use of color shades. I know Visual Studio has to cater for people using low-color displays, remote desktop, and those with reduced vision, but its use of primary colors leaves it looking a little dated. Color shades can be used to bring the look a little more up-to-date, and to group related elements, while still being able to distinguish between them.</p>
<h3>Comments &#8211; Green</h3>
<p>Comments have always been green in Visual Studio, and I&#8217;m going to keep them that way &#8211; a vibrant green, made bold, to catch the eye. (If comments aren&#8217;t important, then why are you writing them?) Comment hyperlinks and the text in #region blocks also match.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-483" style="border: 8px solid #000000;" title="Comments" src="http://www.hackification.com/wp-content/uploads/2010/05/Comments.png" alt="" width="400" height="128" /></p>
<h3>Literals &#8211; Blue</h3>
<p>String literals are red in the standard Visual Studio color scheme, but I wanted to reserve that color for errors and the like. In my mind strings are blue (don&#8217;t ask me why) so I&#8217;ve chosen a light blue for strings.</p>
<p>With consistency in mind, what else should match this?</p>
<ul>
<li>String literals are blue, so why not other literals, such as integers? The common color will highlight &#8220;magic values&#8221; in code.</li>
<li>We&#8217;ll need to colorize XML and HTML, so we can make attribute values blue too.</li>
<li>JavaScript and SQL obviously have literals.</li>
<li>I&#8217;ve also chosen to see CSS values as literals &#8211; they go blue too. (You could easily argue the toss about that though).</li>
</ul>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-485" style="border: solid 8px #000;" title="Code Literals" src="http://www.hackification.com/wp-content/uploads/2010/05/Literals1.png" alt="" width="400" height="66" /></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-486" style="border: 8px solid #000000;" title="CSS Literals" src="http://www.hackification.com/wp-content/uploads/2010/05/Literals2.png" alt="" width="400" height="34" /></p>
<h3>Keywords &#8211; Gray</h3>
<p>Since the background is black, &#8216;unadorned&#8217; text will be white &#8211; a nice easy choice. How about keywords?</p>
<p>I want to make them a different color &#8211; so I can tell when I&#8217;ve typed &#8216;retrun&#8217; for the billionth time &#8211; but I don&#8217;t consider them to be &#8220;core&#8221; code. I think of them as scaffolding around my identifiers. (Perhaps I&#8217;m a LISPer at heart). I&#8217;ve chosen to keep them a neutral color, but a dimmer shade, so they fade out &#8211; hence gray.</p>
<h3>Types &#8211; Yellow/Orange</h3>
<p>Colorizing types is handy as it again allows me to see when I&#8217;ve mis-typed something. I want them to stand out (so a dim color is out), and I don&#8217;t want them confused with anything else &#8211; so reds, greens, and blues are gone. Yellows and light oranges seem a good choice &#8211; close enough to the normal white text, but sufficiently different to catch the eye. I&#8217;ve chosen a light orange for types, and highlighted interface types as yellow. (I figure that looking at how interfaces are defined and used is often a good way to understand the structure of a body of code &#8211; hence the slightly more eye-catching color).</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-493" style="border: 8px solid #000000;" title="Types" src="http://www.hackification.com/wp-content/uploads/2010/05/Types.png" alt="" width="400" height="104" /></p>
<p>(Oddly enough, this doesn&#8217;t seem to work for types in C++ &#8211; they always seem to come out white. Not sure why.)</p>
<h3>Errors, Warnings, and Oddities &#8211; Red</h3>
<p>This was an easy color to choose &#8211; red (for me) means stop and think. There are a few code constructs that I wanted to highlight as either dangerous or needing attention:</p>
<ul>
<li>Compiler errors and warnings;</li>
<li>Preprocessor directives;</li>
<li>Breakpoints.</li>
</ul>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-495" style="border: 8px solid #000000;" title="Errors" src="http://www.hackification.com/wp-content/uploads/2010/05/Errors.png" alt="" width="400" height="271" /></p>
<h3>Editor Overlays &#8211; Purple/Dark Blue</h3>
<p>Visual Studio now highlights parts of the source depending on where youyr cursor is &#8211; it highlights matching braces, and will also display all usages of the symbol at the caret. These display can change rapidly, so shouldn&#8217;t be too distracting. I&#8217;ve chosen a dark purple, which is subtly visible, but which blends in with the black background.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-498" style="border: 8px solid #000000;" title="Overlays" src="http://www.hackification.com/wp-content/uploads/2010/05/Overlays.png" alt="" width="400" height="113" /></p>
<p>We need a related color for the selection too, so I&#8217;ve chosen dark blue.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-510" style="border: 8px solid #000000;" title="Selection" src="http://www.hackification.com/wp-content/uploads/2010/05/Selection.png" alt="" width="400" height="71" /></p>
<h3>Omissions</h3>
<p>There&#8217;s still quite a few entries in the colors list I haven&#8217;t filled out &#8211; the main areas being:</p>
<ul>
<li>VB.NET;</li>
<li>XSLT</li>
<li>IntelliTrace</li>
<li>Test Coverage</li>
</ul>
<p>If you fancy addressing these omissions and sending me back an updated settings file, I&#8217;ll be happy to credit you.</p>
<h3>Conclusion &amp; Download</h3>
<p>So there you go. Obviously color schemes are very personal (and contentious). I think I&#8217;ve done a pretty good job; you might well think otherwise. Even if you don&#8217;t like this particular scheme, I hope you&#8217;ll agree that setting a few design principles in place before assigning colors can help you choose (and use) the colors effectively.</p>
<p>Sadly there&#8217;s no way to upload my settings to StudioStyles, and I&#8217;m too lazy to re-do all the work by hand. Until they allow that option, I&#8217;ll host the settings from here:</p>
<blockquote><p><strong>Download <a href="http://www.hackification.com/downloads/hackification.vssettings" target="_blank">hackification.vssettings</a></strong></p></blockquote>
<p>Save this file somewhere, then use Tools -&gt; Import and Export Settings&#8230; to merge them in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackification.com/2010/05/16/designing-a-vs2010-color-scheme-consistency-consistency-consistency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resizing Single-Image-Rollovers Using jQuery</title>
		<link>http://www.hackification.com/2009/09/02/resizing-single-image-rollovers-using-jquery/</link>
		<comments>http://www.hackification.com/2009/09/02/resizing-single-image-rollovers-using-jquery/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 14:28:00 +0000</pubDate>
		<dc:creator>Stu Smith</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[rollovers]]></category>
		<category><![CDATA[sprites]]></category>

		<guid isPermaLink="false">http://www.hackification.com/?p=252</guid>
		<description><![CDATA[In this article I describe how to create shaped buttons in HTML/CSS that size to their content, have roll-over state, and require only a single image, using jQuery. I&#8217;m sure most web developers know about image rollovers (using separate images for normal and &#8220;hover&#8221; states of anchors). Hopefully also the use of &#8220;CSS Sprites&#8221; is [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I describe how to create shaped buttons in HTML/CSS that size to their content, have roll-over state, and require only a single image, using jQuery.</p>
<p><span id="more-252"></span></p>
<p>I&#8217;m sure most web developers know about image rollovers (using separate images for normal and &#8220;hover&#8221; states of anchors). Hopefully also the use of &#8220;<a href="http://www.alistapart.com/articles/sprites" target="_blank">CSS Sprites</a>&#8221; is becoming better known &#8211; combining the normal and rollover images into a single physical image file to speed up load times and reduce flicker. I won&#8217;t cover those techniques here.</p>
<p>However, if you want the anchor or button to size to its contents, it&#8217;s more difficult to make use of these techniques. Here&#8217;s one way.</p>
<p><img class="aligncenter size-full wp-image-258" title="Sizing Rollovers" src="http://www.hackification.com/wp-content/uploads/2009/09/SizingRollovers.png" alt="Sizing Rollovers" width="414" height="127" /></p>
<p style="text-align: center;"><em>(The final result &#8211; <a href="http://www.hackification.com/jquery-examples/sizing-rollovers/sizing-rollovers.htm" target="_blank">view demo</a>).</em></p>
<p><strong>Start With Markup</strong></p>
<p>Before diving into fancy techniques, get the markup down as you would like it, if you didn&#8217;t have to style anything.</p>
<pre>&lt;a href="..." class="rollover"&gt;Button Text&lt;/a&gt;</pre>
<p>Ideally we want the markup to be clean and not compromised by styling requirements.</p>
<p><strong>Handle Degradation Gracefully</strong></p>
<p>My technique is going to make use of JavaScript, so let&#8217;s handle the case where the user has it disabled for some reason. Here&#8217;s some very basic CSS to give the button a simple style:</p>
<pre>a.rollover
{
  background-color: #00f;
  border: solid 1px #000;
  color: #fff;
  font-weight: bold;
  padding: 4px;
  text-decoration: none;
}

a.rollover:hover
{
  background-color: #008;
}</pre>
<p><strong>Add Styling Naively</strong></p>
<p>Next, I&#8217;m going to add some rollover styling &#8211; but in a way that isn&#8217;t complete. Firstly I created a simple rollover image, but made it very wide &#8211; it needs to be at least as wide as the widest button is ever going to be:</p>
<p><img class="aligncenter size-full wp-image-256" title="Button Rollover" src="http://www.hackification.com/wp-content/uploads/2009/09/buttons.png" alt="Button Rollover" width="657" height="123" /></p>
<p>I&#8217;m going to define my rollover styling against a class selector of &#8220;extra&#8221; &#8211; you&#8217;ll see where that comes from in a moment.</p>
<pre>a.rollover.extra
{
  background: url(buttons.png) repeat-x left 0;
  border: none;
  height: 27px;
  padding: 23px 40px 10px 40px;
  position: relative;
}

a.rollover.extra:hover
{
  background-position: left -57px;
}</pre>
<p>Note that we&#8217;ve had to undo some of the styles applied previously, such as border.</p>
<p>We&#8217;re kind of getting there, but our buttons won&#8217;t look correct on the right-hand-side.</p>
<p><strong>Use JavaScript To Add Styling Markup</strong></p>
<p>To fix the right-hand end-caps, we need to modify our markup. However, I really don&#8217;t want to have to do that on my pages &#8211; afterall, I might change my mind about the site styling.</p>
<p>Here I recommend using JavaScript to tweak at runtime the markup to what we need. I&#8217;m going to use jQuery for this:</p>
<pre>$(function() {
  $('.rollover')
    .addClass('extra')
    .append('&lt;div class="cap"&gt;&lt;/div&gt;');
});</pre>
<p>Basically, when the pad is ready, I find all elements with class &#8220;rollover&#8221;, add another class (&#8220;extra&#8221;), and append into the rollover button an empty span element which has a class of &#8220;cap&#8221;.</p>
<p>That class &#8220;extra&#8221; triggers the image rollovers. The &#8220;cap&#8221; span can be styled as follows:</p>
<pre>a.rollover.extra .cap
{
  background: url(buttons.png) no-repeat right 0;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  width: 40px;
}

a.rollover.extra:hover .cap
{
  background-position: right -57px;
}</pre>
<p>And voila!</p>
<blockquote><p><a href="http://www.hackification.com/jquery-examples/sizing-rollovers/sizing-rollovers.htm" target="_blank">If you&#8217;d like to see this technique in action, please view the demo</a>.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.hackification.com/2009/09/02/resizing-single-image-rollovers-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Front Page</title>
		<link>http://www.hackification.com/2008/12/30/new-front-page/</link>
		<comments>http://www.hackification.com/2008/12/30/new-front-page/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 19:55:26 +0000</pubDate>
		<dc:creator>Stu Smith</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[blogging]]></category>

		<guid isPermaLink="false">http://www.hackification.com/?p=68</guid>
		<description><![CDATA[I&#8217;ve never really been happy with the front page of hackification.com &#8211; previously it was just the standard WordPress list-of-articles one. I&#8217;ve finally taken a bit of time to re-do the front page into a sort of &#8220;magazine&#8221; style, to try to reveal more of the content to visitors, and more importantly, to reveal the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve never really been happy with the front page of hackification.com &#8211; previously it was just the standard WordPress list-of-articles one. I&#8217;ve finally taken a bit of time to re-do the front page into a sort of &#8220;magazine&#8221; style, to try to reveal more of the content to visitors, and more importantly, to reveal the most interesting content first.</p>
<p><span id="more-68"></span></p>
<p>I wanted to be able to block the front page into related areas: new articles, &#8220;hot&#8221; articles, and article groups (such as my ray-tracing series). I also wanted to be able to present myself in a slightly more structured way than with the old &#8216;About&#8217; page (which is still there&#8230; but I now have a structure to expand into).</p>
<p><img class="aligncenter size-full wp-image-69" title="hackification.com front-page" src="http://www.hackification.com/wp-content/uploads/2008/12/hackification.png" alt="" width="300" height="325" /></p>
<p>I&#8217;ve split the page into six main columns:</p>
<ul>
<li>Recent articles, showcasing the three most recent articles, with summary text and more obvious dates;</li>
<li>Featured articles, starting with the &#8220;hot&#8221; articles (including approximate page view counts), and a couple of starter topics (web development and ray-tracing);</li>
<li>&#8216;About Me&#8217; and &#8216;Hire Me&#8217;, areas that I&#8217;ll build on later, which are probably never going to be viewed, but you never know;</li>
<li>Archives, for searching and spidering;</li>
<li>and finally of course adverts, because 10Gb of bandwidth per month isn&#8217;t free.</li>
</ul>
<p>Currently the page is a little blocky and needs a little more styling, but that will have to wait. It also needs some more featured sections, but again that will happen as I write more articles and they naturally group together.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackification.com/2008/12/30/new-front-page/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
