<?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>Philosophically Secure &#187; development</title>
	<atom:link href="http://eugk.net/wordpress/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://eugk.net/wordpress</link>
	<description>Eugene Kogan&#039;s blog on information security and software engineering</description>
	<lastBuildDate>Mon, 27 Jun 2011 13:25:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>X-Content-Security-Policy</title>
		<link>http://eugk.net/wordpress/2011/04/05/x-content-security-policy/</link>
		<comments>http://eugk.net/wordpress/2011/04/05/x-content-security-policy/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 20:42:09 +0000</pubDate>
		<dc:creator>eugenekogan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://eugk.net/wordpress/?p=357</guid>
		<description><![CDATA[Content Security Policy (CSP) is a draft specification from W3C, and was recently implemented in the latest version of Firefox. Basically, CSP is a way for a website owner to specify how a browser should treat content that it receives from his site. For example, it&#8217;s possible to list which domains you trust to serve [...]]]></description>
			<content:encoded><![CDATA[<p>Content Security Policy (CSP) is a <a href="https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html" target="_blank">draft specification</a> from W3C, and was recently implemented in the latest version of Firefox. Basically, CSP is a way for a website owner to specify how a browser should treat content that it receives from his site. For example, it&#8217;s possible to list which domains you trust to serve JavaScript. Any JavaScript received from a domain not on your list will not be executed by the browser. This feature alone is a great security improvement, and there are many <a href="https://developer.mozilla.org/en/Introducing_Content_Security_Policy" target="_blank">other attacks</a> that can be entirely or partially mitigated using CSP.</p>
<p>Another beneficial side effect of adopting CSP is that it will force organizations to take stock of everything that their site is doing, and perhaps even make some smart some design changes in the process (like removing and disabling all in-line JavaScript). For developers, Mozilla has some great references, like <a href="https://developer.mozilla.org/en/Security/CSP/Using_Content_Security_Policy" target="_blank">this overview</a> and <a href="https://developer.mozilla.org/en/Security/CSP/CSP_policy_directives" target="_blank">this detailed list</a> of policy directives.</p>
<p>I look forward to seeing CSP adopted more widely and supported by every major browser. If anyone has some practical experience with deploying CSP, please share some of your lessons learned.</p>
]]></content:encoded>
			<wfw:commentRss>http://eugk.net/wordpress/2011/04/05/x-content-security-policy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mmm, forever cookies</title>
		<link>http://eugk.net/wordpress/2010/09/22/mmm-forever-cookies/</link>
		<comments>http://eugk.net/wordpress/2010/09/22/mmm-forever-cookies/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 00:27:26 +0000</pubDate>
		<dc:creator>eugenekogan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://eugk.net/wordpress/?p=291</guid>
		<description><![CDATA[My dad is always worried about persistent cookies in his web browser for some reason. He claims they slow down his computer over time, and maybe he&#8217;s a little paranoid about the privacy aspect of cookies. Well, today he has a new reason to worry: evercookie. Evercookie is a small bit of evil/genius JavaScript code [...]]]></description>
			<content:encoded><![CDATA[<p>My dad is always worried about persistent cookies in his web browser for some reason. He claims they slow down his computer over time, and maybe he&#8217;s a little paranoid about the <a href="http://epic.org/privacy/internet/cookies/" target="_blank">privacy</a> aspect of cookies.</p>
<p>Well, today he has a new reason to worry: <a href="http://samy.pl/evercookie/" target="_blank">evercookie</a>. Evercookie is a small bit of evil/genius JavaScript code that allows a website to create ultra-persistent cookies on its users&#8217; computers. Currently, it uses eight different methods of cookie storage, with plans to develop at least four more. Not only are some of these difficult to remove, but evercookie will attempt to recreate them all, if even one of its stored cookies is still present the next time you visit the site.</p>
<p>Some of the methods evercookie takes advantage of are typical and considered more or less legitimate, like using <a href="http://en.wikipedia.org/wiki/Local_Shared_Object" target="_blank">Local Shared Object</a> cookies through the Flash plug-in. Other are pretty bizarre, such as creating web history entries in the browser that point to nonexistent URLs under the google.com domain. These weird entries are actually the Base64 encoded über-cookie, which it can recover later using a simple brute forcing algorithm and a <a href="http://samy.pl/csshack/" target="_blank">CSS history hack</a>. Yes, I said it was bizarre.</p>
<p>To some people, evercookie might seem like a strange, pointless, or downright malicious project. After all, no user wants to be tracked across the web with some new, intrusive type of cookie. But in my mind, releasing this functionality in an easy-to-use and open source package is a good thing. Most of the cookie storage mechanisms it uses are not all that new, and are being used already anyway.</p>
<p>To me, the real point of evercookie is to raise awareness among everyday web users, the IT crowd, privacy advocates, and hopefully web browser companies. Yes, there are a million ways for shady or malicious websites to track you across the Internet, and your browser just wasn&#8217;t designed to properly protect you. Things like evercookie remind me that we need to do a lot more work on improving the security and privacy features for web clients, so that users don&#8217;t need to be worried or paranoid about visiting any web sites &#8211; including new ones that they don&#8217;t necessarily <a href="http://lcamtuf.blogspot.com/2010/09/rise-and-fall-of-perfect-security.html" target="_blank">trust</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eugk.net/wordpress/2010/09/22/mmm-forever-cookies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nested dictionaries in Python</title>
		<link>http://eugk.net/wordpress/2010/08/12/nested-dictionaries-in-python/</link>
		<comments>http://eugk.net/wordpress/2010/08/12/nested-dictionaries-in-python/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 20:58:19 +0000</pubDate>
		<dc:creator>eugenekogan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://eugk.net/wordpress/?p=284</guid>
		<description><![CDATA[This isn&#8217;t exactly ground-breaking, but rather just a handy tip. If you&#8217;re looking to create nested dictionaries in Python, like a &#8220;multi-dimensional hash,&#8221; or just a &#8220;dict of dicts,&#8221; there is a very simple method. All you need to do is use the defaultdict class in the collections module. Defaultdict objects can specify what factory [...]]]></description>
			<content:encoded><![CDATA[<p>This isn&#8217;t exactly ground-breaking, but rather just a handy tip. If you&#8217;re looking to create nested dictionaries in Python, like a &#8220;multi-dimensional hash,&#8221; or just a &#8220;dict of dicts,&#8221; there is a very simple method. All you need to do is use the <a href="http://docs.python.org/library/collections.html#collections.defaultdict" target="_blank">defaultdict</a> class in the collections module. Defaultdict objects can specify what factory (method) to use when creating new elements in the dictionary. If you pass in &#8220;dict&#8221; as the argument, all members of your dictionary will themselves be dictionaries. Of course, you could pass in another type, such as list. For example, this will make a two-level dictionary:</p>
<blockquote>
<pre>&gt;&gt;&gt; from collections import defaultdict
&gt;&gt;&gt; double_dict = defaultdict(dict)
&gt;&gt;&gt; double_dict['foo']['bar'] = 42
&gt;&gt;&gt; double_dict['fun']['ball'] = 77
&gt;&gt;&gt; double_dict['fun']
{'ball': 77}
</pre>
</blockquote>
<p>What if you want an unlimited number of dicts within a dict? Well, all you need is a simple function to create a defaultdict(dict) object on the fly, like this:</p>
<blockquote>
<pre>
&gt;&gt;&gt; def make_infinite_dict():
 return defaultdict(make_infinite_dict)

&gt;&gt;&gt; inf_dict = make_infinite_dict()
&gt;&gt;&gt; inf_dict[1][2][3][4][5] = 100
&gt;&gt;&gt; inf_dict[1][2][3][4][5]
100
</pre>
</blockquote>
<p>Like I said, nothing magical, but it could come in handy!</p>
]]></content:encoded>
			<wfw:commentRss>http://eugk.net/wordpress/2010/08/12/nested-dictionaries-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Green text, black background</title>
		<link>http://eugk.net/wordpress/2009/11/03/green-text-black-background/</link>
		<comments>http://eugk.net/wordpress/2009/11/03/green-text-black-background/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 12:24:04 +0000</pubDate>
		<dc:creator>eugenekogan</dc:creator>
				<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://eugk.net/wordpress/?p=269</guid>
		<description><![CDATA[I tend to do my development using vim, in a terminal window connected to a remote server that looks very much like the production environment. Thankfully, I am not the only one who works this way. Perhaps I&#8217;m not crazy after all? Green text. Black background. I’ll tell you why right now. I’m an old [...]]]></description>
			<content:encoded><![CDATA[<p>I tend to do my development using vim, in a terminal window connected to a remote server that looks very much like the production environment. Thankfully, I am not the only one who works this way. Perhaps I&#8217;m not crazy after all?</p>
<blockquote><p>Green text. Black background. I’ll tell you why right now. I’m an old school DOS guy. My first word processor was Wordstar and that’s the word processing program I came to associate with the fugue-like state of maximum productivity: the Zone. This is why I continue to favor colored text on a black background in my current favorite editor, Textmate. The coloring reminds me of an primal safe place where the tool is serving its purpose — to get the hell out of the way so I can go be exponentially more productive.</p>
<p>This is why, as engineers, we stick with something that works for us. This is why the ancient likes of vi and Emacs continue to flourish. Once we find a tool that works for us, once we’ve chosen that tool, it becomes ours and remains ours. It allows us to get foamy.</p></blockquote>
<p>I&#8217;ve had similar experiences with Dreamweaver and other WYSIWYG tools, where they are just too helpful and end up jumbling up my carefully formatted code. To be honest, I never even really liked working in Eclipse, either. It&#8217;s just too distracting, and again, too &#8220;helpful&#8221; for my taste. But like Rands says, to each his own.</p>
<p>via <a href="http://www.randsinrepose.com/archives/2009/11/02/the_foamy_rules_for_rabid_tools.html">Rands In Repose</a></p>
]]></content:encoded>
			<wfw:commentRss>http://eugk.net/wordpress/2009/11/03/green-text-black-background/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rethinking &#8220;control&#8221; in software engineering</title>
		<link>http://eugk.net/wordpress/2009/07/17/rethinking-control-in-software-engineering/</link>
		<comments>http://eugk.net/wordpress/2009/07/17/rethinking-control-in-software-engineering/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 21:33:51 +0000</pubDate>
		<dc:creator>eugenekogan</dc:creator>
				<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://eugk.net/wordpress/?p=258</guid>
		<description><![CDATA[I just read a short but interesting article by Tom DeMarco on the concepts of metrics and control in software engineering. Here&#8217;s the bottom line that really resonated with me: This leads us to the odd conclusion that strict control is something that matters a lot on relatively useless projects and much less on useful [...]]]></description>
			<content:encoded><![CDATA[<p>I just read a short but interesting article by Tom DeMarco on the concepts of metrics and control in software engineering. Here&#8217;s the bottom line that really resonated with me:</p>
<blockquote><p>This leads us to the odd conclusion that strict control is something that matters a lot on relatively useless projects and much less on useful projects.</p></blockquote>
<p>That might not sound intuitive at first, but it makes sense after reading what he has to say.</p>
<p>The article (PDF) is available here: <a href="http://www2.computer.org/cms/Computer.org/ComputingNow/homepage/2009/0709/rW_SO_Viewpoints.pdf">http://www2.computer.org/cms/Computer.org/ComputingNow/homepage/2009/0709/rW_SO_Viewpoints.pdf</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eugk.net/wordpress/2009/07/17/rethinking-control-in-software-engineering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

