<?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>BlackHC's Adventures in the Dev World &#187; Personal Rantings</title>
	<atom:link href="http://blog.blackhc.net/category/personal-rantings/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.blackhc.net</link>
	<description>Just another weblog</description>
	<lastBuildDate>Wed, 16 Nov 2011 23:12:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Reading Nonfiction Books Quickly</title>
		<link>http://blog.blackhc.net/2011/11/reading-nonfiction-books-quickly/</link>
		<comments>http://blog.blackhc.net/2011/11/reading-nonfiction-books-quickly/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 13:56:29 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[University]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=877</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2011/11/reading-nonfiction-books-quickly/" title="Reading Nonfiction Books Quickly"></a>I like to read books and I also like to read nonfiction books and in particular nonfiction books that I do not agree with. Speed Reading For this I've decided to look into speed reading. It is an umbrella term &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2011/11/reading-nonfiction-books-quickly/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2011/11/reading-nonfiction-books-quickly/" title="Reading Nonfiction Books Quickly"></a><p>I like to read books and I also like to read nonfiction books and in particular nonfiction books that I do not agree with.</p>
<h6>Speed Reading</h6>
<p>For this I've decided to look into <strong><a href="http://en.wikipedia.org/wiki/Speed_reading" target="_blank">speed reading</a></strong>. It is an umbrella term for methods that increase your reading speed while keeping a satisfactory comprehension level. A usual reading speed is 200-300 wpm (words per minute). Speed reading advertises increasing your speed to &gt; 600 wpm.</p>
<p>I've searched around for a bit and read lots of blog posts and articles and here are my favorites:</p>
<p><span class="Apple-style-span" style="line-height: 18px;"><a href="http://www.fourhourworkweek.com/blog/2009/07/30/speed-reading-and-accelerated-learning/">http://www.fourhourworkweek.com/blog/2009/07/30/speed-reading-and-accelerated-learning/</a> is a good introduction to the main techniques of speed-reading. It also includes some exercises and is a short read.</span></p>
<p><span class="Apple-style-span" style="line-height: 18px;"><a href="http://noahfleming.com/blog/speed-read-like-rain-man-75-increased-reading-speed-in-20-minutes">http://noahfleming.com/blog/speed-read-like-rain-man-75-increased-reading-speed-in-20-minutes</a> describes the author's personal experience with fourhourworkweek's article.</span></p>
<p>There is also speed-reading software available. The idea is your eye movement is the main hindrance to reading really fast, so this software displays the text for you to read in groups of several words in the center of the screen. This way you can read everything at once without having to move your eyes at all.<br />
As crazy as it sounds, it works to a great degree.</p>
<p><a href="http://www.spreeder.com/">http://www.spreeder.com/</a> is  an online reader that works this way. Give it a try! You can make it display the introduction text at 600 wpm or 800 wpm and see how you'll understand - you'll be surprised!</p>
<p><a href="http://numberstheorys.tripod.com/speedreading.pdf" target="_blank">'The Speed Reading Workbook'</a> is what I've been using to practise it. It's okay written and has plenty of exercises and includes timing and evaluation sheets, which are really useful for measuring your progress.</p>
<p>A good summary of many concepts can be found in the PowerPoint Presentation <a href="www.cs.unc.edu/~jjerald/classes/comp321/SpeedRead.ppt" target="_blank">'Double your Reading Speed in 25 Minutes'</a>.</p>
<h5>About Reading in General</h5>
<p><a href="http://www.matthewcornell.org/blog/2006/2/26/how-to-read-a-lot-of-books-in-a-short-time.html">http://www.matthewcornell.org/blog/2006/2/26/how-to-read-a-lot-of-books-in-a-short-time.html</a> is a good read and <a href="http://pne.people.si.umich.edu/PDF/howtoread.pdf">http://pne.people.si.umich.edu/PDF/howtoread.pdf</a> has many good suggestions about how to increase your reading productivity.</p>
<h5>Own Expierence</h5>
<p>I've been exercising with the workbook now and then for the past weeks and I've become faster but this is still an ongoing process for me, so I'm going to blog about it later (or rather update this post).</p>
<p>For what it's worth: my reading speed was 300 wpm and now it is around 550 wpm <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2011/11/reading-nonfiction-books-quickly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ANTLR Stupidity (Warning 209)</title>
		<link>http://blog.blackhc.net/2010/09/antlr-stupidity/</link>
		<comments>http://blog.blackhc.net/2010/09/antlr-stupidity/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 11:16:48 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[ANTLR]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[conversiontimeout]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[warning 209]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=829</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2010/09/antlr-stupidity/" title="ANTLR Stupidity (Warning 209)"></a>I've been playing around with a Java grammar for ANTLR that was supposed to work straight-away but it did not, with very strange warnings and errors, that made it look like ANTLR only supports lexers with a lookahead of 1 &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2010/09/antlr-stupidity/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2010/09/antlr-stupidity/" title="ANTLR Stupidity (Warning 209)"></a><p>I've been playing around with a Java grammar for ANTLR that was supposed to work straight-away but it did not, with very strange warnings and errors, that made it look like ANTLR only supports lexers with a lookahead of 1 character:</p>
<pre>warning(209): ...: Multiple token rules can match input such as "'*'": STAR, STAREQ</pre>
<p>while STAR matches only '*' and STAREQ only matches '*='. This is a huge w-t-f, especially if you have worked with ANTLR before and didn't have issues with this. This also contradicted all documentation you can find about ANTLR and its lexer rules.</p>
<p>I've spent a considerable amount of time with Google trying to find how to fix it. First I've found lots of posts on the ANTLR mailing list [antlr-interest] from people <a href="http://www.mail-archive.com/il-antlr-interest@googlegroups.com/msg04183.html" target="_blank">who had the same issue and no replies to them (really helpful, eh?)</a>. <a href="http://www.antlr.org/pipermail/antlr-interest/2009-September/035954.html" target="_blank">People had issues with replacing character ranges with unicode ranges (or rather a huge list of unicode characters)</a>, which probably caused the problem in my grammar, too. <a href="http://groups.google.com.pe/group/il-antlr-interest/browse_thread/thread/2a126c02758d6693" target="_blank">Others found that ANTLR suddenly behaved as if it only had a one character lookahead, but only if more than 300 lexer rules were used in the grammar</a>.</p>
<p>After searching for a long time and almost giving up on the mini-project I've wanted to use ANTLR for, I've found this post: <a href="http://www.antlr.org/pipermail/antlr-interest/2009-September/035954.html" target="_blank">http://www.antlr.org/pipermail/antlr-interest/2009-September/035954.html</a> (which matches my problem more or less but with additional insight)<br />
and someone even replied (someone being the guy who maintains the C runtime of ANTLR):<br />
<a href="http://www.antlr.org/pipermail/antlr-interest/2009-September/035955.html" target="_blank">http://www.antlr.org/pipermail/antlr-interest/2009-September/035955.html</a></p>
<blockquote><p>If you are sure that the messages are not correct and the lexer rules<br />
are not ambiguous, then you probably need to increase the conversion<br />
timeout:</p>
<p>-Xconversiontimeout 30000</p>
<p>if that does not work, then there is a conflict in your rules.</p>
<p>Jim</p></blockquote>
<p>And that turns out to be the right advice and the remedy to my problems and the problems of lots of other people probably.<br />
However, no warning or error message I encountered mentioned that ANTLR's internal processing actually timed-out and there was no ambiguity in the grammar itself...</p>
<p>This comes to show that any good tool like ANTLR can quickly degrade to a piece of crap and a major source of annoyance, if error and warning messages aren't clear and helpful.</p>
<p>On further investigation, you can trigger warnings that the conversion times out:</p>
<pre>internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1279):
    could not even do k=1 for decision 121; reason: timed out (&gt;1ms)</pre>
<p>but not consistently. I guess this is a bug - either in ANTLR or in ANTLRWorks... <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_neutral.gif' alt=':-|' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2010/09/antlr-stupidity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Limbo</title>
		<link>http://blog.blackhc.net/2010/09/limbo/</link>
		<comments>http://blog.blackhc.net/2010/09/limbo/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 13:51:35 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[Limbo]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=827</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2010/09/limbo/" title="Limbo"></a>Limbo is a game that has been released on Xbox Live Arcade some time ago, but I've only now found time to play it. It is a very nice game - albeit a bit on the short side: it took &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2010/09/limbo/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2010/09/limbo/" title="Limbo"></a><p><a href="http://www.limbogame.org" target="_blank">Limbo</a> is a game that has been released on Xbox Live Arcade some time ago, but I've only now found time to play it.</p>
<p>It is a very nice game - albeit a bit on the short side: it took me  about 5 hours to finish it. But this is the only negative bit I can  think of. Everything else about the game is very nice. It is very  polished and it's a charm to play. You have to think about the puzzles  for some time but the learning curve is okay and there were no unfair  bits.</p>
<p>The game is black-and-white only (with shades of gray) and you play a boy that apparently got lost in a forest (that is how it starts) and you want to get out.<a href="http://www.limbogame.org/wordpress/wp-content/uploads/screenshot071-800x449.jpg"><img class="alignright" title="Limbo Screenshot" src="http://www.limbogame.org/wordpress/wp-content/uploads/screenshot071-800x449.jpg" alt="" width="800" height="449" /></a></p>
<p>The  game mechanics are very simple: you can only move around, jump and hold  on to things to drag them around (or press buttons, etc). In this  regard the game is very similar to <a href="http://www.anotherworld.fr/anotherworld_uk/" target="_blank">Another World</a> (another very good game  worth playing).<br />
The puzzles are all phyiscs-based and because of this the aforementioned  fairness is achieved: sometimes you just have to think a bit longer how  to solve a puzzle but it is always logical.</p>
<p><a href="http://blog.blackhc.net/2010/09/limbo/"><em>Click here to view the embedded video.</em></a></p>
<p>The game is somewhat violent because it works using the "learning by dying" principle and if you don't enable the gore filter, you'll see the poor boy being halved, stabbed, squashed,... many times. However, since he is only a black shape, it's okay and won't put you off playing. The game uses many (and only) auto-saves to track your progress and you never feel punished for dying because you'll get another try straightaway without having to replay more than a few seconds.<br />
"learning by dying" works really well (and is also used in Another World): You don't have to worry about a "health bar" or rewind time or...</p>
<p>The difficulty of the game is just right and it gets harder as you progress through the world: you get to use more objects to solve the puzzles or will have to think of new ways to use physics to achieve your goals. However, one annoying bit is that also autosave points get moved further apart even when there is no need for it. This only happens in the last few "chapters" of the game though.</p>
<p>All in all it is very much a game worth playing and a very polished experience - kudos to the developers!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2010/09/limbo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Panorama Stitching</title>
		<link>http://blog.blackhc.net/2010/07/panorama-stitching/</link>
		<comments>http://blog.blackhc.net/2010/07/panorama-stitching/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 11:00:04 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[University]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=783</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2010/07/panorama-stitching/" title="Panorama Stitching"></a>I've finally come around to "clean-up" some old project I've had lying around for a few months and upload it. I'm talking about some Panorama Stitching code I wrote for our participation in Microsoft's Imagine Cup. I'm suppressing all memories &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2010/07/panorama-stitching/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2010/07/panorama-stitching/" title="Panorama Stitching"></a><p>I've finally come around to "clean-up" some old project I've had lying around for a few months and upload it.<br />
I'm talking about some Panorama Stitching code I wrote for our participation in Microsoft's Imagine Cup.<br />
I'm suppressing all memories of it since it was an epic fail, but at least I still have learnt quite a bit about computer vision and image processing - enough to know that it's incredibly hard to come up with stable algorithms and kudos to anyone working in the field.</p>
<p>Here is the code dump: <a href="http://blog.blackhc.net/wp-content/uploads/2010/07/PanoramaStitching.zip">PanoramaStitching.zip</a></p>
<p>It contains many small projects which usually use multiple pictures as inputs or multiple webcams (depending on code or chosen preprocessor macros).</p>
<p>The most advanced prototype is the SnapshotHomographyConfigurator, which allows you to determine homographies between multiple cameras at once by marking shared points between the images.</p>
<p>Another one which works okay is the PanoramaStitching project. It creates panoramas using spherical or cylindircal projections of the input images. However, it is very sensitive to translations of the viewpoint. It works quite well with optimal/artificial images:</p>
<p><a href="http://blog.blackhc.net/wp-content/uploads/2010/07/shotA.png"><img class="alignnone size-medium wp-image-788" title="Panorama Stitching shotA" src="http://blog.blackhc.net/wp-content/uploads/2010/07/shotA-300x225.png" alt="" width="300" height="225" /></a><a href="http://blog.blackhc.net/wp-content/uploads/2010/07/shotB.png"><img class="alignnone size-medium wp-image-789" title="Panorama Stitching shotB" src="http://blog.blackhc.net/wp-content/uploads/2010/07/shotB-300x225.png" alt="" width="300" height="225" /></a></p>
<p><a href="http://blog.blackhc.net/wp-content/uploads/2010/07/live.jpg"><img class="alignnone size-full wp-image-787" title="Panorama Stitching Panorama" src="http://blog.blackhc.net/wp-content/uploads/2010/07/live.jpg" alt="" width="797" height="480" /></a></p>
<p>(Note: the small misalignment on the right stems from moving the player position slightly. Usually you use a deghosting algorithm to remove such misalignments.)</p>
<p>I've used <a href="http://opencv.willowgarage.com/wiki/" target="_blank">OpenCV</a> for image processing and <a href="http://www.yaml.org/" target="_blank">yaml</a> for loading and storing settings (and also <a href="http://rapidxml.sourceforge.net/" target="_blank">rapidxml</a>). OpenCV's C++ wrapper is pretty awesome. It's not perfect but it makes life a lot easier.</p>
<p>Stay tuned for more code/project uploads soon <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>PS: Here are the links to some papers which proved useful to me (I didn't implement most of them though, and some are implemented in OpenCV already):</p>
<ul>
<li><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.91.5822" target="_blank">Eliminating Ghosting and Exposure Artifacts in Image Mosaics</a></li>
<li><a href="http://robots.stanford.edu/cs223b04/algo_tracking.pdf" target="_blank">Pyramidal Implementation of the Lucas Kanade Feature Tracker - Description of the algorithm</a></li>
<li><a href="http://research.microsoft.com/apps/pubs/default.aspx?id=70092" target="_blank">Image Alignment and Stitching: A Tutorial</a></li>
<li><a href="http://www.google.de/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBYQFjAA&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.96.3162%26rep%3Drep1%26type%3Dpdf&amp;ei=JQVDTNSNOeOJOIzamIYN&amp;usg=AFQjCNHmesBhRUp-0hpn6mxYjZwymax2Cw&amp;sig2=26VpkBOuLIZ2tW1V0VxPCQ" target="_blank">Seamless Image Stitching by Minimizing False Edges</a></li>
<li><a href="http://research.microsoft.com/pubs/75614/ShumSzeliski-IJCV00.pdf" target="_blank">Construction of Panoramic Image Mosaics with Global and Local Alignment</a></li>
<li><a href="Image Mosaicing for Tele-Reality Applications" target="_blank">Image Mosaicing for Tele-Reality Applications</a></li>
<li><a href="http://faculty.cs.tamu.edu/jchai/CPSC641/shi_tomasi_94.pdf" target="_blank">Good Features to Track</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2010/07/panorama-stitching/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Random Things</title>
		<link>http://blog.blackhc.net/2009/11/random-things/</link>
		<comments>http://blog.blackhc.net/2009/11/random-things/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 16:56:20 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Maths]]></category>
		<category><![CDATA[Personal Rantings]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=686</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2009/11/random-things/" title="Random Things"></a>It's been a while since the last update. Here's a small update on what I'm thinking about various stuff. Prototype Gameplay is okay I guess. Nothing I would spent too much time on though. It looks a lot worse than &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2009/11/random-things/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2009/11/random-things/" title="Random Things"></a><p>It's been a while since the last update. Here's a small update on what I'm thinking about various stuff.</p>
<h4>Prototype</h4>
<p>Gameplay is okay I guess. Nothing I would spent too much time on though. It looks a lot worse than GTA 4 though (same as Crackdown).</p>
<h4>Resident Evil</h4>
<p>Seems to be lots of fun and some nice graphics, too.</p>
<h4>Red Faction: Guerrilla</h4>
<p>Some weird texture filtering issues and the presentation doesn't knock off my chair (terrain popping and other ugliness), but multiplayer is loads of fun with friends. Physics isn't completely stable though. I played the game for one hour in MP with friends and there were quite a few cases where geometry dropped through the floor with enough pressure from above (after destroying a building).</p>
<h4>Brüno</h4>
<p>A bad and quite stupid movie (Ali G in Da House is probably the only movie I kinda like that stars Cohen). If you haven't watched it already, don't &gt;_&lt;</p>
<h4>Shadow Complex</h4>
<p>I bought shadow complex a few weeks ago and I have to say that it is an awesome game. I read somewhere that the developer used the Metroid series as inspiration and it shows. It's really fun to play and quite addictive. The graphics are pretty awesome (it is using the Unreal 3 engine) and the whole presentation is pretty polished. It certainly is worth its 1200 gamerpoints</p>
<h3>Summing Formulas</h3>
<p>A month ago I was doing some exercises in an analysis book (Königsberger) and found a nice/interesting problem:</p>
<p>Prove that if we denote of the sum of the numbers 1 to n to the p-th power by <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_3c6cf5781b9f871308dd7095e01ea46d.gif' style=' ' class='tex' alt=" S_n^p = 1^p + 2^p + ... + n^p " /></span><script type='math/tex'> S_n^p = 1^p + 2^p + ... + n^p </script>, then the following equation by Pascal holds: <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_131195a6c7f4bab1fa5e8a69eddcbd9e.gif' style=' ' class='tex' alt=" (p+1) S_n^p + \binom{ p + 1 }{ 2 } S_n^{p-1} + \binom{ p + 1 }{ 3 } S_n^{p-2} + ... + S_n^0 = (n+1)^{p+1} - 1 " /></span><script type='math/tex'> (p+1) S_n^p + \binom{ p + 1 }{ 2 } S_n^{p-1} + \binom{ p + 1 }{ 3 } S_n^{p-2} + ... + S_n^0 = (n+1)^{p+1} - 1 </script></p>
<p>It can be used to get recursively/iteratively get formulas for sums of higher powers of numbers.</p>
<p>This is interesting because the proof doesn't need any advanced maths (like eg the Euler-MacLaurin formula, which can be used to show this, too).</p>
<p style="text-align: left;">You can download the proof and a few examples <a href="http://blog.blackhc.net/wp-content/uploads/2009/11/PascalSumFormula.pdf" target="_blank">here</a>.</p>
<p style="text-align: left;">Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2009/11/random-things/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extracting Information from StudiVZ</title>
		<link>http://blog.blackhc.net/2009/10/extracting-information-from-studivz/</link>
		<comments>http://blog.blackhc.net/2009/10/extracting-information-from-studivz/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 18:34:42 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Profiles]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[StudiVZ]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=678</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2009/10/extracting-information-from-studivz/" title="Extracting Information from StudiVZ"></a>Some time ago somebody stole 1 million data records from StudiVZ, the German Facebook clone. I'm not exactly sure why people call the person a hacker who stole data, because it appears he simply wrote a tool that harvested the &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2009/10/extracting-information-from-studivz/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2009/10/extracting-information-from-studivz/" title="Extracting Information from StudiVZ"></a><p>Some time ago somebody stole 1 million data records from <a href="http://www.studivz.net/" target="_blank">StudiVZ</a>, the German Facebook clone. I'm not exactly sure why people call the person a hacker who stole data, because it appears he simply wrote a tool that harvested the publicly available data from StudiVZ (which everyone with an account can view).</p>
<p>People on StudiVZ share all their data by default---contrary to Facebook which values a person's private data a lot more. Thus by simply opening each profile from a dummy user and processing the HTML data from StudiVZ one can extract a lot and some more information from random people who probably don't even know about it or don't care.. so I'm not sure about the stealing part.</p>
<p>Apparently there are some captcha's when you start browsing searches beyond a few pages. I guess that is where the hacking part comes in, because getting around a captcha probably constitutes hacking---maybe?</p>
<p>Anyway I think part of the media coverage is a bit ridiculous because anyone can write a simple harvester in an hour or two. It took me one and half hours, so I think I'm on the safe side with this estimate and I didn't really have a clue about this stuff before either.</p>
<p>Since I don't want to "hack", I've only written a very tame harvester. It connects to your personal StudiVZ account, and retrieves the name and profile ID (and thus profile URL) of all your friends in the "Meine Freunde" pages.</p>
<p>It could do a lot more with that like retrieving everybody's birthday or random pictures, but I'm too lazy to code that because you use the same pattern for extracting data over and over again and it stops being interesting quite fast.</p>
<p>You can download the project <a href="http://blog.blackhc.net/wp-content/uploads/2009/10/StudiVZExtractor.zip" target="_blank">here</a>. It is a one file C# project. I'm releasing it under GPL (whatever).</p>
<p>It's really easy to explain how it works:</p>
<ul>
<li>It uses <strong>System.Net</strong>'s <strong>HttpWebRequest</strong> and <strong>HttpWebResponse</strong> to get (and post) web pages.</li>
<li>StudiVZ (like every other portal) uses cookies, so I create a <strong>CookieContainer </strong>and use it in every http request.</li>
<li>There are a few hidden values that StudiVZ expects during login. I'm retrieving them from the main page using custom built regular expressions. I've found a <a href="http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-expression-tester.ashx" target="_blank">handy AJAX tester for .NET regular expressions</a>. It was really useful for building the expressions and debugging them. (BTW you can find all URLs I used in the comments.)</li>
<li>After login I use the same pattern: get page &amp; parse using regex for everything.</li>
<li>Visual Studio has an awesome "HTML Visualizer" for strings. It displays the content of a string as HTML page, which is really nifty if you're doing anything related to HTML processing.</li>
</ul>
<p>The code is quite ugly. Well, it's not production code and this is only meant as a proof of concept.</p>
<p>Also note that I have at most violated the AGB of StudiVZ and not committed any criminal acts and I'm not planning to sell my friend's profile IDs or data either <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Maybe someone can extend the code and make it more useful. I guess it would be fun to automatically download all your pictures (including tags) and feed them into flickr or picasa... but someone else can do that.</p>
<p>Cheers,<br />
Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2009/10/extracting-information-from-studivz/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Bachelor Thesis</title>
		<link>http://blog.blackhc.net/2009/10/my-bachelor-thesis/</link>
		<comments>http://blog.blackhc.net/2009/10/my-bachelor-thesis/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 13:43:19 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[Bachelor Thesis]]></category>
		<category><![CDATA[Equalizer]]></category>
		<category><![CDATA[Inkscape]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Omondo]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[TikZ]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=661</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2009/10/my-bachelor-thesis/" title="My Bachelor Thesis"></a>For the last two months I have been working on my bachelor thesis at the Chair of Computer Graphics and Visualization. It is about "Multi-Tile Terrain Rendering with OGL/Equalizer"&#180;. The chair has a very nice Direct3D 10 terrain rendering engine &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2009/10/my-bachelor-thesis/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2009/10/my-bachelor-thesis/" title="My Bachelor Thesis"></a><div id="attachment_664" class="wp-caption alignright" style="width: 310px"><a href="http://blog.blackhc.net/wp-content/uploads/2009/10/frontshot.png"><img class="size-medium wp-image-664 " title="Screenshot of Utah" src="http://blog.blackhc.net/wp-content/uploads/2009/10/frontshot-300x238.png" alt="Screenshot of Utah" width="300" height="238" /></a><p class="wp-caption-text">Screenshot of Utah</p></div>
<p>For the last two months I have been working on my bachelor thesis at the Chair of Computer Graphics and Visualization. It is about "Multi-Tile Terrain Rendering with OGL/Equalizer"<a class="annotation" title="the German title is &quot;Multi-Tile Terrain Rendering mit OGL/Equalizer&quot; :)" href="javascript:;"><strong>&#180;</strong></a>.<br />
The chair has a very nice Direct3D 10 terrain rendering engine and they want to run it at the newly founded KAUST (King Abdullah University of Science and Technology<a class="annotation" title="women are actually allowed to drive on the campus:" href="javascript:;"><strong>&#180;</strong></a>) in a massive CAVE environment. A CAVE is a room whose walls are actually screens.<br />
The CAVE at KAUST even supports stereoscopic rendering. Thus in total 12 views can be rendered to.</p>
<p>My job was to port said terrain engine from Direct3D to OpenGL and afterwards to the Equalizer framework, which is an open-source framework for parallelizing OpenGL applications.</p>
<p>You can find/download an online version of my bachelor thesis <a title="Multi-Tile Terrain Rendering with OGL/Equalizer" href="http://blog.blackhc.net/wp-content/uploads/2009/10/BachelorThesisOnline.pdf" target="_blank">here</a>. I'll upload the LaTeX at a later date and update this post.</p>
<p>I've spent the last months writing about all this, so I don't feel like talking about the thesis itself anymore. Instead the remainder of this post will contain a post-mortem of it.<br />
<span id="more-661"></span></p>
<h3>Post-Mortem</h3>
<h4>Preparations</h4>
<p>I think I did a good job at preparing myself for the thesis: I'm a LaTex noob, so I got lots<a class="annotation" title="4 to be exact" href="javascript:;"><strong>&#180;</strong></a> of LaTeX books; I'm a (paper-)writing noob, so I got lots<a class="annotation" title="3 in this case" href="javascript:;"><strong>&#180;</strong></a> of books about writing papers and writing good English.</p>
<p>The books have helped me a lot and it is always a good decision to get as many books as possible, because the more sources you have, the better.</p>
<p>I got all the LaTeX books from our university library:</p>
<ul>
<li><a href="http://www.amazon.de/gp/product/389842510X/ref=sib_rdr_dp" target="_blank">[Einstieg in] LaTeX</a><br />
A big book (696 pages) but not particularly helpful. The reviewer on Amazon is pretty much right: it contains lots of information., but always stops short of providing the really useful details/information.</li>
<li><a href="http://www.amazon.de/LATEX-GE-PACKT-Karsten-G%C3%BCnther/dp/3826615883/ref=sr_1_6?ie=UTF8&amp;s=books&amp;qid=1255775138&amp;sr=8-6" target="_blank">LaTeX - Ge-packt</a><br />
A small but thick pocket book (608 pages). I totally forgot I had it and it stood on my bookshelf until I found it yesterday. I've used it though while writing another paper last year, and it's pretty neat. It's a nifty reference, that's what it is.</li>
<li><a href="http://www.amazon.de/LaTeX-Hacks-Techniken-professionellen-Textsatz/dp/3897214776/ref=pd_sim_b_5" target="_blank">LaTeX Hacks: Tipps und Techniken für professionellen Textsatz</a><br />
This book is very good. It contains 100 "LaTeX hacks" (on 416 pages). These are small, closed sections describing the solution to a specific problem you might encounter while using LaTeX.<br />
I've used the book a lot of times to look up solutions to my problems and it references many useful LaTeX packages, too---so it's a good start for searches.</li>
<li><a href="http://www.amazon.de/Wissenschaftliche-Arbeiten-schreiben-LaTeX-CD-ROM/dp/3826658922/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1255777607&amp;sr=1-1" target="_blank">Wissenschaftliche Arbeiten schreiben mit LATEX</a><br />
<strong>Get this book</strong> if you want to write your thesis with LaTeX. It's incredibly useful and covers most of what you'll need. It takes you on a journey through all features of LaTeX that you will use and describes the most common use cases. It even has a section describing how to fix common LaTeX errors like overflowed hboxes and others.</li>
</ul>
<p>I've also bought some  books about writing papers and the English language in general:</p>
<ul>
<li><a href="http://www.amazon.com/Manual-Writers-Research-Dissertations-Seventh/dp/0226823377/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1255778175&amp;sr=1-1" target="_blank">A Manual for Writers of Research Papers, Theses, and Dissertations, Seventh Edition: Chicago Style for Students and Researchers</a><br />
This book covers everything you need to know about the style and format of a thesis. It has a huge chapter about how to add citations and what format the bibligraphy should use, etc.<br />
In retrospect reading it was probably overkill, because a bachelor thesis apparently doesn't have very strict requirements (well, I'll see about that when I get my feedback..).<br />
It, however, contains a few nice chapters about editing your text and improving its readability, and the punctuation and spelling chapters are nice, too.</li>
<li><a href="http://www.amazon.co.uk/Oxford-Guide-Effective-Writing-Speaking/dp/0192806130/ref=pd_sim_b_1" target="_blank">Oxford Guide to Effective Writing and Speaking</a><br />
I've only read this book in parts but it's not bad. It contains a useful introduction to English grammar, if you want to refresh that knowledge.</li>
<li><a href="http://www.amazon.co.uk/Oxford-Guide-Plain-English-Martin/dp/0199233454/ref=sr_1_11?ie=UTF8&amp;s=books&amp;qid=1255779088&amp;sr=8-11" target="_blank">Oxford Guide to Plain English</a><br />
This book is simply awesome. Plain English refers to writing English in a simple and easily understood way. This book describes what makes a text 'plain' and easy to read and how to transform your texts to improve readability. It contains lots and lots of examples of complicated texts an shows how easy it is to improve them with few changes.<br />
The book itself is a very nice read and in parts even funny. The author clearly knows what he is teaching and it helped me a lot while writing my bachelor thesis.</li>
</ul>
<h4>Writing the Thesis</h4>
<p>I had two months for the implementation of the project and for writing the thesis. The plan was to implement everything in August and write everything in September and be done at the beginning of October (before my birthday).</p>
<p>Instead last week I ended up being in crunch mode working 15 hours on it every day <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_neutral.gif' alt=':-|' class='wp-smiley' /> </p>
<p>The implementation went mostly as planned. I found a few driver bugs though, bought <a href="http://www.gremedy.com/" target="_blank">gDEBugger</a> for debugging shader issues and found some bugs in it, too. I think I reported 5-7 bugs in gDEBugger's support forum in a matter of days and still have to write/extend a few reports.</p>
<p>I wrote my thesis in LaTeX and used the very good <a href="http://www.xm1math.net/texmaker/" target="_blank">Texmaker</a> as editor. It supports multiple file projects and allows you to select a main file (usually latex is called with the file that is currently being edited).</p>
<p><a href="http://www.jedit.org/" target="_blank">jEdit</a> also supports LaTeX editing through a plugin: <a href="http://plugins.jedit.org/plugins/?LaTeXTools" target="_blank">LaTeXTools</a>. It isn't working as well as Texmaker though, but it has generally more text editing options and supports directory searches and regexp which is useful for a multi-file project.</p>
<p>I used subversion for version management, which proved useful at times, even though TortoiseSVN's difference viewer doesn't support line wrapping, which sucks a bit because I always write long blocks of text in Texmaker and it made diff'ing difficult.</p>
<p>For creating vector graphics, a very cool LaTeX package exists. It's called <a href="http://sourceforge.net/projects/pgf/" target="_blank">TikZ</a> ("Tikz ist kein Zeichenprogramm"), and it allows you to create illustrations the LaTeX way: by coding them.<br />
See <a href="http://www.texample.net/tikz/examples/" target="_blank">http://www.texample.net/tikz/examples/</a> for some neat looking examples.</p>
<p>I really wanted to use it to create my illustrations, but due to time constraints I couldn't read the whole manual (it's huge!) and I think even then it would have been too difficult.<br />
You see, it suffers from the same problem TeX and LaTeX suffer from in general. It's easy to write something that looks okay, but as soon as you want to tweak something to look exactly the way you imagine it and it is not a standard option, you end up reading weird package code and wishing you had a Phd in TeX editing.</p>
<p>TikZ has exactly the same problem. I've understood the tutorials and the manual well enough, but I wanted to create class diagrams with it. I got lost quickly and the 500 page manual didn't offer a straight-forward way either.</p>
<p>In the end I installed the latest version of <a href="http://www.inkscape.org/" target="_blank">Inkscape</a> and created all my illustrations with it. Well, actually I always tried to create them with TikZ first, got frustrated after losing an hour or two, and spent another hour creating them in Inkscape.</p>
<p>While Inkscape makes it harder to change an illustration later on and there is no way to layout diagrams automatically, you can still become quite fast with it after learning a few hotkeys.</p>
<p>I wanted to use Eclipse and <a href="http://www.uml2.org/download_studio_eclipse_3.4.html" target="_blank">Omondo's UML plugin</a> to create some diagrams of a Java subproject and it failed horribly..</p>
<blockquote><p>Having to wait 20 minutes, while it hogs your computer at 100% CPU usage and 400 MB memory usage, to create a UML model of a 5 classes project is quite unacceptable!</p></blockquote>
<p>Starting Eclipse later crashed it every time, too, by the way. I had to uninstall the damned plugin for Eclipse to start at all again.</p>
<p>In the end I recreated the classes in C++ and used Visual Studio's class diagram viewer to display the classes. You can then print the diagram to PDF and edit it some more in Inkscape, which supports importing single-page PDFs.</p>
<p>I hope I'll find time to write about game development related topics again in the next weeks. There are a few things I want to work on, but sadly university starts on Monday again and it will probably use up most of my time.</p>
<p>Cheers,<br />
 Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2009/10/my-bachelor-thesis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More Book Reviews and re: Design Patterns</title>
		<link>http://blog.blackhc.net/2009/08/more-book-reviews-and-re-design-patterns/</link>
		<comments>http://blog.blackhc.net/2009/08/more-book-reviews-and-re-design-patterns/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 08:44:12 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[Chicago Manual of Style]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Gang of Four]]></category>
		<category><![CDATA[Idioms]]></category>
		<category><![CDATA[Pattern-Oriented Software Architecture]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=627</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2009/08/more-book-reviews-and-re-design-patterns/" title="More Book Reviews and re: Design Patterns"></a>Pattern-Oriented Software Architecture - A System of Patterns (PoSA I) I've finally finished Pattern-Oriented Software Architecture - A System of Patterns and I want to say a few words about it. First I don't think, it's a must-buy. It's okay &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2009/08/more-book-reviews-and-re-design-patterns/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2009/08/more-book-reviews-and-re-design-patterns/" title="More Book Reviews and re: Design Patterns"></a><h3><a href="http://www.amazon.com/Pattern-Oriented-Software-Architecture-System-Patterns/dp/0471958697" target="_blank">Pattern-Oriented Software Architecture - A System of Patterns</a> (PoSA I)</h3>
<p>I've finally finished <a href="http://www.amazon.com/Pattern-Oriented-Software-Architecture-System-Patterns/dp/0471958697" target="_blank">Pattern-Oriented Software Architecture - A System of Patterns</a> and I want to say a few words about it.<br />
First I don't think, it's a must-buy. It's okay to read (but more about that in a minute) and certainly it can come in handy to look up patterns while developing, but if you have small budget, it's better to get it from a library.</p>
<p>The book can be roughly divided into 4 parts: <em>architectural patterns</em>, <em>design patterns</em>, <em>idioms</em>, "trivia".</p>
<p>The chapter about architectural patterns is the most interesting,  where as the chapter about design patterns is okay, too, but also borrow or expands upon lots of concepts from the <a href="http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612" target="_blank">GoF book</a>. The idioms chapter only contains one idiom (think small, language-specific "design pattern", e.g. reference counting in C++).<br />
The "trivia" part contains information what pattern are, who came up with the idea, influences, the community, yada yada. The most interesting topic being the community and links in there.</p>
<p>The book itself is quite boring to read and the patterns are described in endless detail, which is good, if you want to look things up and avoid common mistakes. On the other hand this makes it a book, you should not read front to back, because it doesn't really make sense and you won't get a lot out of it either. (I actually read it front to back, and from that experience I draw my advice <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_neutral.gif' alt=':-|' class='wp-smiley' /> ) Just skim over the patterns, until you find something you don't know and then read the paragraphs that are interesting until you think you understand the pattern and then read some more to verify that you really understand it, but you can probably skip 40% (or more) of the text, if you just want to learn about new patterns and not go into all the details.</p>
<p>Next I'll try to write a few words about each pattern (so I<a class="annotation" title="and maybe you, too" href="javascript:;"><strong>&#180;</strong></a> can look up the pattern here instead of in the book)<a class="annotation" title="this is also a good way to make use of the 'expandable' tag I originally wrote for my Info1 blog" href="javascript:;"><strong>&#180;</strong></a>.</p>
<p>Note: I just found an awesome page, <a href="http://vico.org/pages/PatronsDisseny.html" target="_blank">http://vico.org/pages/PatronsDisseny.html</a>, that contains information about all patterns in the book, so it doesn't make sense for me to write about each and every one of them.</p>
<h4>Architectural Patterns</h4>
<ul>
<li>Layers
<div class="expandable"><a class="expandable_link" href="javascript:blackhc_replacements_togglediv('blackhc_expandable_7');">more &#187;</a>
<div class="expandable_text" name="blackhc_expandable_7" id="blackhc_expandable_7" style="display:none">
To sum up 20 pages: it's good to use a multi-layered architecture in your software.
</div>
<p></div>
</li>
<li>Pipes and Filters
<div class="expandable"><a class="expandable_link" href="javascript:blackhc_replacements_togglediv('blackhc_expandable_8');">more &#187;</a>
<div class="expandable_text" name="blackhc_expandable_8" id="blackhc_expandable_8" style="display:none">
This is something Pragmatic Programmer mentioned, too: Use and support the usage of your tools through pipes and filters. This is mainly something that is common on Unix, but it's incredibly useful and if you support some standard text I/O helps interoperability with little cost.
</div>
<p></div>
</li>
<li><a href="http://en.wikipedia.org/wiki/Blackboard_system" target="_blank">Blackboard</a>
<div class="expandable"><a class="expandable_link" href="javascript:blackhc_replacements_togglediv('blackhc_expandable_9');">more &#187;</a>
<div class="expandable_text" name="blackhc_expandable_9" id="blackhc_expandable_9" style="display:none">
Finally an interesting pattern, it's also described in Pragmatic Programmer, but you can read the description here, too, because it's a quite interesting pattern.
</div>
<p></div>
</li>
<li>Broker</li>
<li>Model-View-Controller</li>
<li><a href="http://en.wikipedia.org/wiki/Presentation-abstraction-control" target="_blank">Presentation-Abstraction-Control</a>
<div class="expandable"><a class="expandable_link" href="javascript:blackhc_replacements_togglediv('blackhc_expandable_10');">more &#187;</a>
<div class="expandable_text" name="blackhc_expandable_10" id="blackhc_expandable_10" style="display:none">This one is interesting and worth having heard of. It's similar to MVC above, but more general.</div>
<p></div>
</li>
<li>Microkernel</li>
<li>Reflection</li>
</ul>
<h4>Design Patterns</h4>
<ul>
<li>Whole-Part</li>
<li>Master-Slave
<div class="expandable"><a class="expandable_link" href="javascript:blackhc_replacements_togglediv('blackhc_expandable_11');">more &#187;</a>
<div class="expandable_text" name="blackhc_expandable_11" id="blackhc_expandable_11" style="display:none">Anyone who has ever done parallel programming with MPI has used this pattern extensively</div>
<p></div>
</li>
<li>Proxy</li>
<li>Command Processor
<div class="expandable"><a class="expandable_link" href="javascript:blackhc_replacements_togglediv('blackhc_expandable_12');">more &#187;</a>
<div class="expandable_text" name="blackhc_expandable_12" id="blackhc_expandable_12" style="display:none">A more elaborate version of the Command patten in the GoF book</div>
<p></div>
</li>
<li>View Handler
<div class="expandable"><a class="expandable_link" href="javascript:blackhc_replacements_togglediv('blackhc_expandable_13');">more &#187;</a>
<div class="expandable_text" name="blackhc_expandable_13" id="blackhc_expandable_13" style="display:none">The pattern describes how to design a document/view manager</div>
<p></div>
</li>
<li>Forwarder-Receiver</li>
<li>Client-Dispatcher-Server</li>
<li>Publisher-Subscriber</li>
</ul>
<h4>Idioms</h4>
<ul>
<li>Counted Pointer</li>
</ul>
<p>Now that I'm done with this, I want to share a few useful resources mentioned in the book:</p>
<ul>
<li><a href="http://www.hillside.net/patterns" target="_blank">http://www.hillside.net/patterns</a> - contains some useful links</li>
<li><a href="http://www.c2.com/ppr/" target="_blank">http://www.c2.com/ppr/</a> - contains a few pattern descriptions</li>
</ul>
<p>Personally idioms are very interesting for me, too, because the day-to-day coding work is in a specific language and idioms are exactly about that.<br />
A little googling already turns up lots of useful sources. For example:</p>
<ul>
<li><a href="http://users.rcn.com/jcoplien/Patterns/C++Idioms/EuroPLoP98.html" target="_blank">http://users.rcn.com/jcoplien/Patterns/C++Idioms/EuroPLoP98.html</a></li>
<li><a href="http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms" target="_blank">http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms</a></li>
</ul>
<p>There are a few more pattern books that I plan to read, so let's see how that turns out..</p>
<h3><a href="http://www.amazon.com/Manual-Writers-Research-Dissertations-Seventh/dp/0226823377" target="_blank">A Manual for Writers of Research Papers, Theses, and Dissertations</a></h3>
<p>This is an awesome book, that explains a lot about how to write research papers and also about all the little details you should pay attention, too. It's a good read - I spent 1.5 hours a day for a bit more than a week to read through it - and I think it's going to be quite useful, when I start writing my Bachelor Thesis in a few days.</p>
<p>I'm currently writing some <a href="http://www.antlr.org/" target="_blank">ANTLR</a> grammar and <a href="http://www.stringtemplate.org" target="_blank">StringTemplate</a> stuff and I might write something about that, too, on the weekend.<br />
I'm not sure I'm really happy with ANTLR, but it's probably the best thing out there at the moment, but I'm totally in love with StringTemplate, even though you might say it has some rough edges, too.<br />
But more on that on another day.</p>
<p>Over and otu,<br />
Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2009/08/more-book-reviews-and-re-design-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast Forward</title>
		<link>http://blog.blackhc.net/2009/07/fast-forward/</link>
		<comments>http://blog.blackhc.net/2009/07/fast-forward/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 14:50:42 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[Fahrenheit]]></category>
		<category><![CDATA[Memento]]></category>
		<category><![CDATA[Multi-Core Programming]]></category>
		<category><![CDATA[OpenGL Superbible]]></category>
		<category><![CDATA[Real-time Rendering]]></category>
		<category><![CDATA[The Pragmatic Programmer]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=562</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2009/07/fast-forward/" title="Fast Forward"></a>I've quite a few things I've wanted to write about a long time ago and I actually started working on them and taking notes, etc. but never found time for one reason or another to write and publish the actual &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2009/07/fast-forward/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2009/07/fast-forward/" title="Fast Forward"></a><p>I've quite a few things I've wanted to write about a long time ago and I actually started working on them and taking notes, etc. but never found time for one reason or another to write and publish the actual posts.<br />
So this is meant as fast forward of all these text bits.</p>
<h2>Movies and Games</h2>
<h3>Memento</h3>
<p>One awesome movie. I've seen it twice already and I still love the movie and its plot. I don't want to spoil too much of the story, but some will probably inevitable.</p>
<p>A few bullet points:</p>
<ul>
<li>Telling a story in reverse is pretty cool in itself and perfect for the movie</li>
<li>I wonder if one could use this kind of plot for a game, too, but it would make the plot quite linear because the player could only do things that won't change the outcome of the future (i.e. what he has already played).</li>
<li>If the game is linear though and goal based it could be possible easily because you would replay it like a movie. If it's plot-centric, it could be fun and create a kind of suspense similar to Memento.</li>
<li>Fahrenheit would be a game that is plot-centric like that..</li>
<li>The movie depicts a chaotic system: small imprecision leads to huge consequences ("Don't believe his lies").</li>
<li>One of the impressions I liked most is the way you have to constantly reevaluate everything you have seen so far because of some new piece of information from the past which totally changes the whole movie a whole time.</li>
<li>It's kind of difficult to remember the movie at first because the human brain is not used to this presentation of causality (seeing the effect before the cause).</li>
<li>The movie gets you thinking about what defines yourself - what are you if you can't remember things anymore and how do you define yourself through your memory.</li>
<li><em>A few weeks ago I read a psychology case book that contained a case similar to Memento. Alcoholics sometimes damage their brain through alcohol abuse and lose all ability to memorize anything new. Their long-term memory only works up until some point of time and after that they won't remember anything. They constantly live at that moment and will be lost forever.</em></li>
</ul>
<h3>Fahrenheit</h3>
<p><a href="http://en.wikipedia.org/wiki/Fahrenheit_(video_game)" target="_blank">Fahrenheit</a> is a pretty cool. Like many movies it is excellent for 90% of the playtime and then it suddenly starts to suck and/or becomes very weird story-wise.</p>
<p>It's not a typical game as more a cinematic experience that does a good job at combining gaming aspects with a very advanced plot and some pretty awesome action scenes.</p>
<p>I've really enjoyed the game and just like <a href="http://en.wikipedia.org/wiki/Omikron:_The_Nomad_Soul" target="_blank">Omikron: The Nomad Soul</a> (an earlier game by developer <a href="http://www.quanticdream.com/" target="_blank">Quantic Dream</a>) it's positively refreshing and different.</p>
<p>Some random notes:</p>
<ul>
<li>Vista compatibility sucks. I had to download a hacked binary to make it start at all on Vista. Otherwise it ran fine except for one crash that was due to my notebook overheating slightly.</li>
<li>Like in many other games you can't skip cut scenes or dialogs easily which is annoying if you just want to replay a chapter up to a certain point</li>
<li>More annoyingly it seems that if you replay an earlier chapter, you have to replay the ones following it, too. Be careful with that <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_neutral.gif' alt=':-|' class='wp-smiley' /> </li>
<li>As said - the story is awesome until you have played 90% of the game then it turns a bit into being on the bizarre side of things<a class="annotation" title="especially the internet &quot;A.I.&quot; :o" href="javascript:;"><strong>&#180;</strong></a>.</li>
<li>Also "Hiding at Tiffany's" is awful. If you ever play the game be ready to replay it a few times:<br />
You have to hide at Tiffany's place from someone who is searching for, and you have 30 seconds or so to find a hiding place, after which the person starts searching for.<br />
The problem is that you don't know where the person will search for you and if you are caught, you obviously won't see where he would search afterwards, so you have to replay the same part quite a few times if you have bad lack and I think it was one of the more frustrating parts.</li>
<li>Zero Punctuation has a good review of the story issue of Fahrenheit hidden in his review of Condemned 2, it is also funny, so <a href="http://www.escapistmagazine.com/videos/view/zero-punctuation/34-Condemned-2-Bloodshot" target="_blank">it's certainly worth watching</a> <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>The way the controls work in Fahrenheit is also pretty interesting. The wikipedia article about Fahrenheit has a good description of it in its Gameplay section.</li>
</ul>
<h2>Books</h2>
<h3>The Pragmatic Programmer</h3>
<p>Last year I think I wrote that I had started reading "<a href="http://www.pragprog.com/the-pragmatic-programmer" target="_blank">The Pragmatic Programmer</a>". I actually finished reading it quite a while ago, but here are a few remarks about it:</p>
<ul>
<li>It's a good and nice read and the book contains lots of helpful suggestions and things to keep in mind when coding or designing software or even just when you want to communicate with co-workers, etc.</li>
<li>It's a "common sense" book - similar to Code Complete - and when you read it, you'll often think "that's straight-forward" or "that's the logical thing to do", but it still valuable to have all that common sense written down somewhere and to be able to look at it now and then in search for inspiration.</li>
<li>It's not as useful as Code Complete though, which was a real eye opener (and still is) and it's not going to improve your coding style a lot or the way to think about code design.</li>
</ul>
<h3>OpenGL Superbible</h3>
<p>I've bought the "<a href="http://" target="_blank">OpenGL Superbible</a>" and it's a pretty good book if you want to learn OpenGL or read a light text about certain advanced OpenGL features before rolling up your sleeves and digging around in the extension specs. It's written like a big and pretty complete tutorial and the latest edition is a lot better suited for the new features than, say, the latest edition of the <a href="http://www.opengl.org/documentation/red_book/" target="_blank">OpenGL Programming Guide</a> (which is pretty horrible - I've read through the sixth edition and it's pretty much the second edition plus a paragraph tacked on here and there and long explanations of deprecated features).</p>
<p>The only part of the book that is really, really weak and totally useless is the part about GLSL and shader programming. It contains a short description about GLSL and while the chapter summary mentions functions like glUniform and co, the function is not mentioned anywhere in the chapter nor does it provide even one example on how to set or access vertex attributes or uniforms, which is essential.</p>
<p>If you want to learn about GLSL and shader programming in OpenGL I can only recommend the OpenGL Shading Language and the GLSL language specifications.</p>
<h3><span>Multi-Core Programming</span></h3>
<p><span>First <strong>don't buy this book</strong>. It's from Intel Press (you can read the book description <a href="http://www.intel.com/intelpress/sum_mcp.htm" target="_blank">here</a>) and it's ridiculously expensive for the content it provides.</span></p>
<p><span>I got it for free at university presentation from Intel and have read through most of it in the last weeks and really - if you want to learn about OpenMP and threading techniques and tools, there are better sources available online for free.</span></p>
<h3>Real-Time Rendering</h3>
<p>This book on the other hand is <strong>awesome</strong> - buy it if you are interested in computer graphics and want to understand the underlying principles better.<br />
It's well-written and presents lots of advanced computer graphics topics in a very understandable way. Especially the chapters about local and global illumination and the physical base of them are very good. It is good starting point to look for resources and papers and the book's homepage is also pretty useful: <a href="http://realtimerendering.com/" target="_blank">http://realtimerendering.com/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2009/07/fast-forward/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Analysis, Cauchy-Schwarz and Reciprocal Sums</title>
		<link>http://blog.blackhc.net/2009/05/analysis-cauchy-schwarz-and-reciprocal-sums/</link>
		<comments>http://blog.blackhc.net/2009/05/analysis-cauchy-schwarz-and-reciprocal-sums/#comments</comments>
		<pubDate>Thu, 07 May 2009 22:29:48 +0000</pubDate>
		<dc:creator>BlackHC</dc:creator>
				<category><![CDATA[Maths]]></category>
		<category><![CDATA[Personal Rantings]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[Bornemann]]></category>
		<category><![CDATA[Cauchy-Schwarz]]></category>
		<category><![CDATA[Konkrete Analysis]]></category>
		<category><![CDATA[Reciprocal Sum]]></category>

		<guid isPermaLink="false">http://blog.blackhc.net/?p=421</guid>
		<description><![CDATA[<a href="http://blog.blackhc.net/2009/05/analysis-cauchy-schwarz-and-reciprocal-sums/" title="Analysis, Cauchy-Schwarz and Reciprocal Sums"></a>Konkrete Analysis First I want to share some solutions for the exercises of a Maths book. The book is called Konkrete Analysis by Folkmar Bornemann and is written in German as are my solutions for some of the exercises. (I &#8230;<p class="read-more"><a href="http://blog.blackhc.net/2009/05/analysis-cauchy-schwarz-and-reciprocal-sums/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://blog.blackhc.net/2009/05/analysis-cauchy-schwarz-and-reciprocal-sums/" title="Analysis, Cauchy-Schwarz and Reciprocal Sums"></a><h3>Konkrete Analysis</h3>
<p>First I want to share some solutions for the exercises of a Maths book. The book is called <a href="http://www.springer.com/computer/mathematics/book/978-3-540-70845-2">Konkrete Analysis by Folkmar Bornemann</a> and is written in German as are my solutions for some of the exercises. (I think I cover about 70% of all exercises in the book and pretty much every easy one <img src='http://blog.blackhc.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> )</p>
<p>I don't claim that my solutions are correct and there are probably quite a few (uncorrected) mistakes, but right now I haven't been able to find any other openly available solutions. Although the book claims to be easily readable without attending the lectures of Professor Bornemann, I doubt that it is possible to do so successfully without being able to do the exercises and while doing so being able to get help or look at possible solutions to find new ideas.</p>
<p>I did all the exercises as way to prepare myself for the exam (it was very successful alas probably not in the most time efficient way), so it also contains solutions for old exams (but those are appended at the end and probably not interesting at all).</p>
<p><a href="http://blog.blackhc.net/wp-content/uploads/2009/05/konkrete-analysis-solutions.pdf" target="_blank">You can download the PDF konkrete-analysis-solutions here.</a></p>
<h3>Cauchy-Schwarz and a Problem</h3>
<p>The book is quite useful though as was the lecture "Analysis for Computer Scientists" which was based on the book (or vice-versa) and it is probably the single one lecture that has taught most since I started attending Computer Science at university.</p>
<p>One of the many topics (we covered a lot which was one of the nice things) was inequalities and the useful things you can do with them. Especially the Cauchy-Schwarz inequality turns out to be quite useful while pretty basic:</p>
<p><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_a24e1e6e9afef8a1e7522b949071edde.gif' style=' ' class='tex' alt=" <a,b> \leq ||a|| \cdot ||b|| " /></span><script type='math/tex'> <a,b> \leq ||a|| \cdot ||b|| </script> with <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_cda5cca5c6a02bbe6fb8f59a5d97800d.gif' style=' ' class='tex' alt=" <a,b> = || a || \cdot || b || " /></span><script type='math/tex'> <a,b> = || a || \cdot || b || </script> when <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_63c3f5e5399274efb59cb25a58775df0.gif' style=' padding-bottom:1px;' class='tex' alt=" \exists \lambda: a = \lambda b " /></span><script type='math/tex'> \exists \lambda: a = \lambda b </script></p>
<p>Interestingly enough this can already yield results that are quite difficult to obtain otherwise. For example we can easily prove lower or upper bounds that is the existence of a maximum or minimum by applying it.</p>
<p>First we obtain a lower or upper bound (for the right or the left side respectively) and then we can use the equality case to prove the existence of the a minium or maximum.</p>
<p>For example, let's take a look at this problem:</p>
<p>We have <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_45609f671ccf21c4981f037088184db8.gif' style=' ' class='tex' alt=" x \in \mathbb{R}^n, 0 < x, \sum_{i=1}^n {x_i} = 1 " /></span><script type='math/tex'> x \in \mathbb{R}^n, 0 < x, \sum_{i=1}^n {x_i} = 1 </script> and want to minimize <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_e6f7306e2a5b1dc4d09e2fd31e627f99.gif' style=' ' class='tex' alt=" \sum_{i=1}^n { \frac 1 x } " /></span><script type='math/tex'> \sum_{i=1}^n { \frac 1 x } </script>.<br />
We simply set <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_c15476905129abebc744f6038ed162fc.gif' style=' ' class='tex' alt=" a_i := \sqrt{x_i}, b_i := \sqrt{ \frac 1 x_i } " /></span><script type='math/tex'> a_i := \sqrt{x_i}, b_i := \sqrt{ \frac 1 x_i } </script>.</p>
<p>Then we get:</p>
<p><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_8adffed432ecc82ed7d60f6bc904a117.gif' style=' ' class='tex' alt=" \sum_{i=1}^n { a_i b_i } = \sum_{i=1}^n { \sqrt{ x_i } \frac 1 {\sqrt{ x_i }} } = \sum_{i=1}^n 1 = n  " /></span><script type='math/tex'> \sum_{i=1}^n { a_i b_i } = \sum_{i=1}^n { \sqrt{ x_i } \frac 1 {\sqrt{ x_i }} } = \sum_{i=1}^n 1 = n  </script><br />
<span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_ca4b513bda511ba9b57c85f915803ca2.gif' style=' ' class='tex' alt=" \leq \sqrt{ \sum_{i=1}^n \sqrt{x_i}^2 } \sqrt{ \sum_{i=1}^n \frac 1 {\sqrt{x_i}^2} } = \sqrt { \sum_{i=1}^n x_i } \sqrt{\sum_{i=1}^n \frac 1 x_i } = 1 \cdot \sqrt{\sum_{i=1}^n \frac 1 x_i } " /></span><script type='math/tex'> \leq \sqrt{ \sum_{i=1}^n \sqrt{x_i}^2 } \sqrt{ \sum_{i=1}^n \frac 1 {\sqrt{x_i}^2} } = \sqrt { \sum_{i=1}^n x_i } \sqrt{\sum_{i=1}^n \frac 1 x_i } = 1 \cdot \sqrt{\sum_{i=1}^n \frac 1 x_i } </script></p>
<p>That is: <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_1e26df891c906620d1aae65d87ae8b51.gif' style=' ' class='tex' alt=" \sum_{i=1}^n \frac 1 x_i \geq n^2 " /></span><script type='math/tex'> \sum_{i=1}^n \frac 1 x_i \geq n^2 </script>.</p>
<p>Now we know an lower bound for the reciprocal sum.<br />
To determine the minimal x vector, we remember to start with:</p>
<p><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_22e9de6955f13db68efcfc426d8fb653.gif' style=' ' class='tex' alt=" a = \lamda b \Leftrightarrow \sqrt x_i = \lambda \frac 1 \x_i \Leftrightarrow x_i = \lambda " /></span><script type='math/tex'> a = \lamda b \Leftrightarrow \sqrt x_i = \lambda \frac 1 \x_i \Leftrightarrow x_i = \lambda </script></p>
<p>We use that with the constraint: <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_1232946f791b2dc637f0a31c92321606.gif' style=' ' class='tex' alt=" 1 = \sum_{i=1}^n x_i = \sum_{i=1}^n \lambda = n \cdot \lambda " /></span><script type='math/tex'> 1 = \sum_{i=1}^n x_i = \sum_{i=1}^n \lambda = n \cdot \lambda </script>,<br />
resulting in: <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_9251efffc23bb66856a1a7afc2d814e0.gif' style=' ' class='tex' alt=" x_i = \lambda = \frac 1 n " /></span><script type='math/tex'> x_i = \lambda = \frac 1 n </script>.</p>
<h4>Generalization</h4>
<p>The nice thing is you can go and generalize this finding to more interesting minimization problems as there also exist more advanced versions of the Cauchy-Schwarz inequality<a class="annotation" title="actually it's Hölder's inequality" href="javascript:;"><strong>&#180;</strong></a> adding degrees of freedom to play around with<a class="annotation" title="just one DoF in my case" href="javascript:;"><strong>&#180;</strong></a>.</p>
<p>Thus it is possible to solve the following class of problems using a slightly more advanced Cauchy-Schwarz inequality:</p>
<p><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_3205bcf0d2b2770f4271a2425f17ec82.gif' style=' ' class='tex' alt=" x,q \in \mathbb{R}^n; 0 < x, q" /></span><script type='math/tex'> x,q \in \mathbb{R}^n; 0 < x, q</script><br />
<span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_b8683219a96f3a8973e82eee8ead511e.gif' style=' ' class='tex' alt="0 < \alpha, \gamma < \infty; \beta > 0 " /></span><script type='math/tex'>0 < \alpha, \gamma < \infty; \beta > 0 </script><br />
<span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_b87dc05d1e0996cc260c737f3efc7e9e.gif' style=' ' class='tex' alt="\large\sum_{i=1}^n {x_i}^\gamma = \beta " /></span><script type='math/tex'>\large\sum_{i=1}^n {x_i}^\gamma = \beta </script><br />
<span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_c6ead4e09d7480dc9759d5ee92a5fc41.gif' style=' ' class='tex' alt="\large min \sum_{i=1}^n \frac {q_i} {x_i^\alpha} " /></span><script type='math/tex'>\large min \sum_{i=1}^n \frac {q_i} {x_i^\alpha} </script></p>
<p>by utilizing</p>
<p><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_c5bf315f2db25666d67e68a697435e39.gif' style=' ' class='tex' alt="\large \sum_{i=1}^n { a_i b_i } \le \sqrt[p]{ \sum_{i=1}^n a_i^p} \sqrt[p']{ \sum_{i=1}^n b_i^p'} " /></span><script type='math/tex'>\large \sum_{i=1}^n { a_i b_i } \le \sqrt[p]{ \sum_{i=1}^n a_i^p} \sqrt[p']{ \sum_{i=1}^n b_i^p'} </script> with <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_0d6a186e22f39cb87eec1fb532862d79.gif' style=' ' class='tex' alt=" \frac 1 p + \frac 1 {p'} = 1 " /></span><script type='math/tex'> \frac 1 p + \frac 1 {p'} = 1 </script></p>
<p>Equality requires the same linear dependence condition as the normal Cauchy-Schwarz inequation.</p>
<p>I've only deduced the solution for <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_56620f44b066c09c401fc1b74d4224d0.gif' style=' ' class='tex' alt=" \gamma = 1 " /></span><script type='math/tex'> \gamma = 1 </script> but it shouldn't be difficult to adapt it once you get the idea how it works (it's fairly straight forward).</p>
<p>You can find the whole deduction in the PDF <a href="http://blog.blackhc.net/wp-content/uploads/2009/05/minimum-of-a-generalized-reciprocal-sum.pdf" target="_blank">"Minimum of a Generalized Reciprocal Sum"</a>.</p>
<p>For completeness' sake here are the results for an optimal solution <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_5fdd64df7a44ea702e2133f5cab2e491.gif' style=' padding-bottom:1px;' class='tex' alt=" x^{*} " /></span><script type='math/tex'> x^{*} </script>:</p>
<p><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_9e880f7f51811d4b691e19c4ea98bd25.gif' style=' ' class='tex' alt="\large x_i^{*} = \beta \cdot \frac { \sqrt[1 + \alpha]{q_i} }{\sum_{k=1}^n \sqrt[1 + \alpha]{q_k}} " /></span><script type='math/tex'>\large x_i^{*} = \beta \cdot \frac { \sqrt[1 + \alpha]{q_i} }{\sum_{k=1}^n \sqrt[1 + \alpha]{q_k}} </script></p>
<p><span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_7093cf869d21174715207b13a02a3d8c.gif' style=' ' class='tex' alt="\large \frac { \left (\sum_{i=1}^n \sqrt[1 + \alpha]{q_i} \right )^{1 + \alpha}} {\beta^\alpha} = \sum_{i=1}^n \frac {q_i} {x_i^{*}^\alpha}" /></span><script type='math/tex'>\large \frac { \left (\sum_{i=1}^n \sqrt[1 + \alpha]{q_i} \right )^{1 + \alpha}} {\beta^\alpha} = \sum_{i=1}^n \frac {q_i} {x_i^{*}^\alpha}</script></p>
<h4>Epilog</h4>
<p>Coming up with the solution was actually a lot of fun and quite interesting because I didn't know it was possible to deduce it this way nor did I know how to do it before. If you read the PDF, I think it's quite nice how you can play around with the formulas and come up with new things from the Cauchy-Schwarz inequality.<br />
If you are only interested in <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_d5a7d2957d1777c35f7903224ab637ff.gif' style=' padding-bottom:1px;' class='tex' alt=" x ^ {*} " /></span><script type='math/tex'> x ^ {*} </script>, you can shortcut everything by immediately skipping to the equality case once <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_74d37d601e20578216a4981034dde4bc.gif' style=' padding-bottom:2px;' class='tex' alt=" p " /></span><script type='math/tex'> p </script> and <span class='MathJax_Preview'><img src='http://blog.blackhc.net/wp-content/plugins/latex/cache/tex_d964473f93bc137b2fee290e633ae9e7.gif' style=' ' class='tex' alt=" p' " /></span><script type='math/tex'> p' </script> have been determined and solve for that.<br />
I mainly wrote it all out because I wanted to make sure, that it actually was correct.</p>
<p>If it wasn't for my Analysis lecture last term, I probably wouldn't have found this.</p>
<p>Cheers,<br />
Andreas</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.blackhc.net/2009/05/analysis-cauchy-schwarz-and-reciprocal-sums/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

