<?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>Moritz Haarmann&#039;s Blog &#187; workaround</title>
	<atom:link href="http://momo.brauchtman.net/tag/workaround/feed/" rel="self" type="application/rss+xml" />
	<link>http://momo.brauchtman.net</link>
	<description>random thoughts.</description>
	<lastBuildDate>Fri, 27 Jan 2012 15:54:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Fun with CFHTTPMessage, Headers and the HTTP Standard</title>
		<link>http://momo.brauchtman.net/2011/08/17/fun-with-cfhttpmessage-headers-and-the-http-standard/</link>
		<comments>http://momo.brauchtman.net/2011/08/17/fun-with-cfhttpmessage-headers-and-the-http-standard/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 15:52:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[icantbelievethisistrue]]></category>
		<category><![CDATA[improvingtheworld]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://momo.brauchtman.net/?p=615</guid>
		<description><![CDATA[TL:DR; CFHTTPMessage combines duplicate headers to a single string value containing all headers comma seperated. Thank you. I am currently developing a Proxy app that visualizes requests and gives you the ability to plug-and-play like filter and modify requests, which &#8230; <a href="http://momo.brauchtman.net/2011/08/17/fun-with-cfhttpmessage-headers-and-the-http-standard/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>TL:DR; CFHTTPMessage combines duplicate headers to a single string value containing all headers comma seperated. Thank you. </p>
<p>I am currently developing a Proxy app that visualizes requests and gives you the ability to plug-and-play like filter and modify requests, which makes it a quite powerful tool for debugging web applications, mobile apps and so on.</p>
<p>Of course, this tool is built using Cocoa and Core Foundation. Interesting enough, Core Foundation brings a Type called &#8220;CFHTTPMessage&#8221;, which handles a lot of low-level message parsing and processing, and is really handy and quite easy to use. </p>
<p>There is one drawback: CFHTTPMessage is not designed to handle both the order in which the headers arrived in a message and duplicate header fields. The first point is somewhat irrelevant, as the HTTP1.1 standard points out that servers are not supposed to depend on any order in the clients – it&#8217;s really only a minor issue. The latter point is complicated. HTTP relies on duplicate headers a lot, consider this HTTP request ( Real life!! )</p>
<p><code><br />
POST /wp-admin/admin-ajax.php HTTP/1.1<br />
X-Requested-With: XMLHttpRequest<br />
Accept-Charset: ISO-8859-1<br />
Accept-Charset: utf-8;q=0.7<br />
Accept-Charset: *;q=0.3<br />
Accept-Encoding: gzip,deflate,sdch<br />
Content-Type: application/x-www-form-urlencoded<br />
Origin: http://momo.brauchtman.net<br />
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1<br />
Cookie: word<br />
Cookie:  wordpress_xxxxxxxx<br />
Cookie:  wordpress_logged_in_xxxxxx; httponly; expires=Tue<br />
Referer: http://momo.brauchtman.net/wp-admin/post-new.php<br />
Host: momo.brauchtman.net<br />
Accept-Language: de-DE<br />
Accept-Language: de;q=0.8<br />
Accept-Language: en-US;q=0.6<br />
Accept-Language: en;q=0.4<br />
Accept: */*<br />
Content-Length: 1160<br />
</code></p>
<p>There are quite some duplicates here. So the clever guys at Cupertino just forgot to handle duplicate headers at all? No, not really. But they just didn&#8217;t document what they are doing with it, which isn&#8217;t that clever at all, but fortunately, <a href="http://www.opensource.apple.com/source/CFNetwork/CFNetwork-128/HTTP/CFHTTPMessage.c">the sources are available here</a>. So after a bit of digging, I found out that duplicates are simply appended to a former header with same key, which sucks – the delimiter used is a simple comma, which is quite regularly found in header values, which makes splitting an art for itself. </p>
]]></content:encoded>
			<wfw:commentRss>http://momo.brauchtman.net/2011/08/17/fun-with-cfhttpmessage-headers-and-the-http-standard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RandomAccessFile weirdness explained, no buffers, just pain.</title>
		<link>http://momo.brauchtman.net/2009/12/18/randomaccessfile-weirdness-explained-no-buffers-just-pain/</link>
		<comments>http://momo.brauchtman.net/2009/12/18/randomaccessfile-weirdness-explained-no-buffers-just-pain/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 15:10:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[antiusability]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://momo.brauchtman.net/?p=448</guid>
		<description><![CDATA[Ola! I&#8217;ve been coding a new android keyboard lately, a project for my university degree but also : for fun. While I was doing this, specially while implementing a file-based dictionary containing frequency information of all words stored in there, &#8230; <a href="http://momo.brauchtman.net/2009/12/18/randomaccessfile-weirdness-explained-no-buffers-just-pain/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ola! I&#8217;ve been coding a new android keyboard lately, a project for my university degree but also : for fun. While I was doing this, specially while implementing a file-based dictionary containing frequency information of all words stored in there, I stumbled upon a very, very weird Java-behavior.</p>
<p>Let&#8217;s explain it. Using RandomAccessFile, you have both Interfaces, DataInput and DataOutput ( and Closeable ) at your service. Wonderful, I thought, and started to use them. Well, two weeks and endless debugging sessions later I figured out why nothing worked the way it should: RandomAccessFile.</p>
<p>This little class is unable to provide the most simple functionality: Write a byte value, say 42, to a certain position, say 11223 in a file, then seek back to 11223, read a byte value, and make sure it&#8217;s the same. The reason for this odd, strange, undesired, undocumented feature? No shared buffers. In fact, no buffers, just for the explicit read and write operations ( they are mapped to native methods anyway ). So basically, everything should work fine in an unbuffered environment, with an operating system directly writing everything down on file.</p>
<p>Because virtually no operating system works unbuffered, RandomAccessFile doesn&#8217;t work. The working workaround is to sleep for some time or something alike.</p>
<p>By the way, I was only able to figure it out by looking at the openJDK source, an excellent source in case you&#8217;re wondering about some Java behaviour. And thanks to <a href="http://www.marc-seeger.de/">Marc Seeger</a> for his help!</p>
]]></content:encoded>
			<wfw:commentRss>http://momo.brauchtman.net/2009/12/18/randomaccessfile-weirdness-explained-no-buffers-just-pain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gravatar Mac Address Book Support Updated for Snow Leopard</title>
		<link>http://momo.brauchtman.net/2009/12/10/gravatar-address-book-support-updated-for-snow-leopard/</link>
		<comments>http://momo.brauchtman.net/2009/12/10/gravatar-address-book-support-updated-for-snow-leopard/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 02:48:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[improvingtheworld]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://momo.brauchtman.net/?p=444</guid>
		<description><![CDATA[Because the bundle somehow didn&#8217;t work for snow leopard, now it does, and you can get it here. of course . So basically, your mac adressbook is now able to get the gravatars again.. hrhr-]]></description>
			<content:encoded><![CDATA[<p>Because the bundle somehow didn&#8217;t work for snow leopard, now it does, and you can <a href="http://momo.brauchtman.net/wp-content/uploads/2009/12/gravatarize.zip">get it here. </a> of course <img src='http://momo.brauchtman.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . So basically, your mac adressbook is now able to get the gravatars again.. hrhr-</p>
]]></content:encoded>
			<wfw:commentRss>http://momo.brauchtman.net/2009/12/10/gravatar-address-book-support-updated-for-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A real open-source, usable, photoshop replacement?</title>
		<link>http://momo.brauchtman.net/2009/01/20/a-real-open-source-usable-photoshop-replacement/</link>
		<comments>http://momo.brauchtman.net/2009/01/20/a-real-open-source-usable-photoshop-replacement/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 10:33:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[improvingtheworld]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://momo.brauchtman.net/?p=261</guid>
		<description><![CDATA[Good morning, folks! Now I&#8217;m back in germany, still busy getting used to all this luxury again, including my Ubuntu-desktop. I also have Windows installed, but for some reason i prefer Ubuntu. Anyway, I&#8217;m really missing a real, free and &#8230; <a href="http://momo.brauchtman.net/2009/01/20/a-real-open-source-usable-photoshop-replacement/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Good morning, folks! Now I&#8217;m back in germany, still busy getting used to all this luxury again, including my Ubuntu-desktop. I also have Windows installed, but for some reason i prefer Ubuntu. Anyway, I&#8217;m really missing a real, free and usable Photoshop replacement here. For me, GIMP is just a nice little tool enabling one of small edits, but not as sophisticated and well-designed as Photoshop. This is sad because it&#8217;s still a big point for many web-doing people not to switch to an open system. And there are plenty of examples where open software can beat the original, look at Open Office.</p>
<p>I&#8217;m convinced that there are enough people to start up a project dedicated to building a graphics suite, open, based on already existing tools. Have you heard of Scribus, a great publishing tool for Linux, free? Amazin software, and I dare to speculate that GIMPs codebase isn&#8217;t bad, it&#8217;s just some frontend stuff that is. By creating a cool team and spending some time on unifying the user interfaces among these, a great step towards permanent switching would be made.</p>
<p>Still, what are you&#8217;re experiences with GIMP or do you know any other, comparable tools?</p>
]]></content:encoded>
			<wfw:commentRss>http://momo.brauchtman.net/2009/01/20/a-real-open-source-usable-photoshop-replacement/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>C++ Pitfall prevention Cheatsheet</title>
		<link>http://momo.brauchtman.net/2008/12/28/c-pitfall-prevention-cheatsheet/</link>
		<comments>http://momo.brauchtman.net/2008/12/28/c-pitfall-prevention-cheatsheet/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 20:56:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[useful]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://momo.brauchtman.net/?p=110</guid>
		<description><![CDATA[I posted this also on my &#8220;old&#8221; blog. Please be good in judging it, I did it for a C++ course in Espoo. C++ Cheatsheet.  Edit: One thing not discussed in the cheatsheet, but at least from my point of &#8230; <a href="http://momo.brauchtman.net/2008/12/28/c-pitfall-prevention-cheatsheet/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I posted this also on my &#8220;old&#8221; blog. Please be good in judging it, I did it for a C++ course in Espoo. <a href="http://gehacktes.1topf.net/cpp.pdf">C++ Cheatsheet</a>. </p>
<p>Edit: One thing not discussed in the cheatsheet, but at least from my point of view a error-prone area is the const-modifier. I found a good explanation about it and its various uses and meanings <a href="http://duramecho.com/ComputerInformation/WhyHowCppConst.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://momo.brauchtman.net/2008/12/28/c-pitfall-prevention-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pass-by-reference workaround in Java</title>
		<link>http://momo.brauchtman.net/2008/12/18/pass-by-reference-workaround-in-java/</link>
		<comments>http://momo.brauchtman.net/2008/12/18/pass-by-reference-workaround-in-java/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 14:08:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[simpleyeteffective]]></category>
		<category><![CDATA[useful]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://momo.brauchtman.net/?p=60</guid>
		<description><![CDATA[As anybody knows, java passes variables by value. and i haven&#8217;t found the magic compiler switch to change that. of course, there are problems caused by this restriction, but in most cases, pass-by-value works just fine.  If you end up &#8230; <a href="http://momo.brauchtman.net/2008/12/18/pass-by-reference-workaround-in-java/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As anybody knows, java passes variables by value. and i haven&#8217;t found the magic compiler switch to change that. of course, there are problems caused by this restriction, but in most cases, pass-by-value works just fine. </p>
<p>If you end up in a situation where it&#8217;d come in handy to have a pass-by-reference facility, think about the way java is storing objects, and how these objects are then passed-by-value. </p>
<p>First of all, an object variable contains only a ( typed ) memory address. Thus, comparing e.g. two strings for equality will yield only true if they are in fact the same strings, same applies for all other types. And this is the value. So in fact you pass a ( kind of ) pointer to a function, enabling to manipulate the original object, as the object is not cloned or something else.</p>
<p>Its also common to encapsulate basic types like int into a object just for the sake of manipulating it in some methods.</p>
<p>So let&#8217;s break it down to a simple example:</p>
<pre lang="JAVA">class MInt {
	int x;
}

public void inc(MInt what){
	what.x++;
}</pre>
<p>This will result in the int x of a MInt object being indeed incremented. Let&#8217;s imagine calling a increase method with a plain integer. This will change just nothing, at least not outside the methods scope.</p>
]]></content:encoded>
			<wfw:commentRss>http://momo.brauchtman.net/2008/12/18/pass-by-reference-workaround-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

