<?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>hexadecimal &#187; dasBlog</title>
	<atom:link href="http://blog.hexadecimal.se/category/dasblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hexadecimal.se</link>
	<description>Being creative in the digital age</description>
	<lastBuildDate>Fri, 07 May 2010 12:06:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Another facelift</title>
		<link>http://blog.hexadecimal.se/2009/03/23/another-facelift/</link>
		<comments>http://blog.hexadecimal.se/2009/03/23/another-facelift/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 01:43:49 +0000</pubDate>
		<dc:creator>q</dc:creator>
				<category><![CDATA[Expression]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[dasBlog]]></category>

		<guid isPermaLink="false">http://www.hexadecimal.se/2009/03/23/AnotherFacelift.aspx</guid>
		<description><![CDATA[I just installed an update to dasBlog, and I decided against porting the changes I had made to dasBlog. Partly because some of the things I had changed were bug fixes that had been addressed by this update. And while I was at it, I designed a new theme. This theme is designed to be [...]]]></description>
			<content:encoded><![CDATA[<p>I just installed an update to dasBlog, and I decided against porting the changes I had made to dasBlog. Partly because some of the things I had changed were bug fixes that had been addressed by this update. And while I was at it, I designed a new theme.</p>
<p>This theme is designed to be a lot faster to load and less heavy on the graphical elements. Unfortunately, there’s some error in the markup in regards to the page footer when using IE 8.0. <a href="http://www.hexadecimal.se/2009/02/11/Windows7.aspx">As you know by now</a>, I use <a href="http://www.google.com/chrome">Google Chrome</a>. Although the blog renders perfectly in Chrome, Firefox and IE 7, IE 8.0 will muck up the page footer, and displace the columns.&#160; If anyone can figure out why, feel free to let me know!</p>
<p>All I can say about the logo which is a remake of Leonardo da Vinci’s Vitruvian Man as a shiny cartoon jelly man is <em>lolz</em>.</p>
<p>It’s a simple vector image made in Expression Design 2.0, and consists of a mere fourteen layers.</p>
<p>The first thing I did was have a long good look at da Vinci’s Vetruvian male….</p>
<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Da_Vinci_Vitruve_Luc_Viatour[1]" border="0" alt="Da_Vinci_Vitruve_Luc_Viatour[1]" src="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/Da_Vinci_Vitruve_Luc_Viatour%5B1%5D_3.jpg" width="357" height="484" /> </p>
<p>Nice isn’t it?&#160; </p>
<p>I fired up Expression Design 2.0, and proceeded to create the constraining shapes. They’re not mathematically calculated using the <em><a href="http://en.wikipedia.org/wiki/Fibonacci_number">Fibonacci</a></em> sequence like da Vinci did, they’re merely bad approximations.</p>
<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="vmlogo_step1" border="0" alt="vmlogo_step1" src="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step1_3.png" width="238" height="240" />&#160;</p>
<p>As you can see, it’s a circle, square and two intersecting lines. With option “dash” set to 16, like this:</p>
<p>&#160;<a href="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step1_1_5.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="vmlogo_step1_1" border="0" alt="vmlogo_step1_1" src="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step1_1_thumb_1.png" width="331" height="709" /></a> </p>
</p>
<p>Next, drew the head using a filled circle and used the align tools to place it in the horizontal middle (can be found in the align bar at the bottom of the screen).</p>
<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="vmlogo_step2" border="0" alt="vmlogo_step2" src="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step2_3.png" width="238" height="240" /> </p>
<p>I drew the body contour freehand using the brush tool. I drew parts of the body separately and used the “Join Path” option (multi-select paths, right click one and and select “Join Path”), then Simplify Path (on the main menu: Object / Simplify Path…). Then I used the delete anchor point to remove any excessive anchors and the Direct Selection tool to adjust the location of the points and the angles between them. Once I had drawn the left arm, I copy and pasted it and flipped the copy horizontally, so that I now had the right arm as well. I used the Join Path option to join them together, and repeated the process for the rest of the body, like this:</p>
<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="vmlogo_step2_2" border="0" alt="vmlogo_step2_2" src="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step2_2_3.png" width="240" height="240" /> </p>
<p>Next, I created a new layer and drew the background limbs with a lighter color, like this:</p>
<p><a href="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step4_2.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="vmlogo_step4" border="0" alt="vmlogo_step4" src="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step4_thumb.png" width="240" height="240" /></a> </p>
<p>Then I proceeded to make new layers to hold the fill color, shading and highlights.&#160; I separate the contour from the fill color so that I can add shadows easier without worrying about the shadow bleeding into the contour lines. It’s an old trick most people use who scan in drawings and use the computer to color, which I used to do a lot.</p>
<p>I copied the contour shapes and pasted them in on-top, using the Ctrl+C and Ctrl+F shortcuts. This is so that the placement will be exact.&#160; Then I moved the copies to their correct layers, and removed the stroke and added a fill color.</p>
<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="vmlogo_step5" border="0" alt="vmlogo_step5" src="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step5_3.png" width="239" height="240" /> </p>
<p>Next, I created new layers to hold the shading and used the brush tool to draw them freehand, except for the head. The head I shaded by making two copies of the head circle, then dragging the lower right corner while holding the Shift key to make it smaller (while retaining proportions). Then I simply selected both and subtracted the smaller path from the larger path, changed the fill color of the remaining path to black with opacity set to 20%.</p>
<p>&#160;<img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="vmlogo_step6_1" border="0" alt="vmlogo_step6_1" src="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step6_1_3.png" width="239" height="240" /> </p>
</p>
<p>Then, I created a new layer to hold the highlights and used the brush tool for the most part, using a stroke called Crow Quill 2.</p>
<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="vmlogo_step7_1" border="0" alt="vmlogo_step7_1" src="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step7_1_3.png" width="437" height="484" /> </p>
<p>And as a finishing touch, I drew the tie freehand using the brush tool, cleaning it up with the Delete Anchor and Direct Selection tools.</p>
<p><a href="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step8_4.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="vmlogo_step8" border="0" alt="vmlogo_step8" src="http://www.hexadecimal.se/content/binary/WindowsLiveWriter/Anotherfacelift_23BF/vmlogo_step8_thumb_1.png" width="222" height="315" /></a> </p>
</p>
<p>And what you see at the top, is the finished result!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hexadecimal.se/2009/03/23/another-facelift/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dasBlog and Comments</title>
		<link>http://blog.hexadecimal.se/2009/03/01/dasblog-and-comments/</link>
		<comments>http://blog.hexadecimal.se/2009/03/01/dasblog-and-comments/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 18:18:46 +0000</pubDate>
		<dc:creator>q</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[dasBlog]]></category>

		<guid isPermaLink="false">http://www.hexadecimal.se/2009/03/01/dasBlogAndComments.aspx</guid>
		<description><![CDATA[When I decided to start this blog, I thought to myself that I’d celebrate when and if the blog ever got a total of one thousand hits. This weekend I decided to have a look and see how far toward that goal the blog had gotten. Imagine my surprise when I learned that the blog [...]]]></description>
			<content:encoded><![CDATA[<p>When I decided to start this blog, I thought to myself that I’d celebrate when and if the blog ever got a total of one thousand hits. This weekend I decided to have a look and see how far toward that goal the blog had gotten. Imagine my surprise when I learned that the blog had not only reached one thousand hits, but had actually surpassed that by a large amount! </p>
<p>So far, the blog has received a total of 5 109 hits(!)</p>
<p><em>That includes the Google bot and Feedburner, which constitute almost 100 hits combined.</em></p>
<p>An interesting note is that the single most popular article on blog is <a href="http://www.hexadecimal.se/2009/02/17/AVGAntivirusGeneralErrorWhenUpdatingFixed.aspx" target="_blank">AVG Antivirus &#8211; “General Error” when updating (fixed)</a>, with my blog being in the top 10 search results on Google when searching for <em>AVG free antivirus general error</em>.&nbsp; Yay!&nbsp; So many thousand hits, and not a single comment though? Then again, I don’t make a habit of leaving comments on blogs unless I want something.&nbsp; I think I’ll be a bit more generous with the comments in the future, to encourage the authors!</p>
<p>The problem with the blog becoming more popular, is all the spam. Today I have filtered out somewhere between ten and fifteen spam comments for each and every post on the blog. </p>
<p>The reason for this can be found in <em>CommentViewBox.ascx.cs</em>:</p>
<pre class="brush: csharp" name="code">// Why isn't Page.Valiate("Normal") working? It returns false. Hm.
if (name.Text.Trim() != String.Empty)
{
   SaveCookies();
   AddNewComment(...);
}</pre>
<p>Oops…?</p>
<p>dasBlog does not correctly validate the comment form. It merely checks to see that the name field isn’t empty. Aside from that, it basically accepts anything. It doesn’t even validate the CAPTCHA.</p>
<p>Uh oh…&nbsp; No wonder I was receiving so much automated spam on my blog!</p>
<p>First I added <a href="http://dasblog.codeplex.com/WorkItem/View.aspx?WorkItemId=3891" target="_blank">this work item</a> over at the <a href="http://www.codeplex.com/dasBlog/" target="_blank">dasBlog project on CodePlex</a>.</p>
<p>While I wait for something to happen with the work item, I updated the code like this:</p>
<pre class="brush: csharp" name="code">if (name.Text.Trim() != String.Empty &amp;&amp;
    comment.Text.Trim() != string.Empty &amp;&amp;
    CaptchaControl1.UserValidated)
{
   SaveCookies();
   AddNewComment(name.Text, email.Text, homepage.Text,
    comment.Text, ViewState["entryId"].ToString().ToUpper(),
    /* openid */ false);
}</pre>
<p>It’s not a very good fix, since it requires a full post back to validate (meaning that the whole page will refresh). Also, it doesn’t honor the validation controls on the form. But as far as an emergency fix is considered, it’ll have to do &#8211; until the dasBlog team can sort it out.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c3e2ff5b-de35-49e0-b8d3-88b9b77453cc" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Coding" rel="tag">Coding</a>,<a href="http://technorati.com/tags/C%23" rel="tag">C#</a>,<a href="http://technorati.com/tags/dasBlog" rel="tag">dasBlog</a></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.hexadecimal.se/2009/03/01/dasblog-and-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
