<?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>Anything goes</title>
	<atom:link href="http://www.hkon.org/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.hkon.org/blog</link>
	<description></description>
	<lastBuildDate>Sun, 18 Dec 2011 00:51:11 +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>Decomposing the web</title>
		<link>http://www.hkon.org/blog/?p=736</link>
		<comments>http://www.hkon.org/blog/?p=736#comments</comments>
		<pubDate>Mon, 18 Apr 2011 01:11:45 +0000</pubDate>
		<dc:creator>Hkon</dc:creator>
				<category><![CDATA[computer science]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[reflector]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[swf decompiler]]></category>

		<guid isPermaLink="false">http://www.hkon.org/blog/?p=736</guid>
		<description><![CDATA[The two main technologies for making cool internet applications are Silverlight and Flash. If you ever play a cool flash or silverlight game and would like to know how it was made, you can actually take a peek if you know the tricks. In this extremely basic guide to decompiling web applications, I will show [...]]]></description>
			<content:encoded><![CDATA[<p>The two main technologies for making cool internet applications are Silverlight and Flash. If you ever play a cool flash or silverlight game and would like to know how it was made, you can actually take a peek if you know the tricks.</p>
<p>In this extremely basic guide to decompiling web applications, I will show you how you can take a look at any Silverlight or Flash application with just a few steps and some cool software.</p>
<p>I think these possibilities have ups and downs. Downside: Programmers who release such applications shoud absolutely be aware of such possibilies. And it raises the bar for security, obscurity does not work when you can look at source code.</p>
<p>The upside is that you can see how other people have solved certain problems, and if you ever delete your source code and got the executable. You  can reverse engineer it back.</p>
<p><span id="more-736"></span></p>
<h1>Silverlight</h1>
<p>Find some silverlight page you would like to study a bit.</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb.png" border="0" alt="image" width="682" height="500" /></a></p>
<p>Silverlight applications are packed in files with .xap extension. Xap files are really just regular .zip files with a certain file structure. So when viewing the source of the site in question, search for .xap.</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image1.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb1.png" border="0" alt="image" width="767" height="312" /></a></p>
<p>Once you have found the path and name of the .xap file you would like to download, enter the url directly in your browsers address bar.</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image2.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb2.png" border="0" alt="image" width="552" height="38" /></a></p>
<p>The .xap file is now being downloaded like a regular file</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image3.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb3.png" border="0" alt="image" width="462" height="111" /></a></p>
<p>Open the folder which you downloaded the file to and rename the file to end with .zip’</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image4.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb4.png" border="0" alt="image" width="523" height="64" /></a></p>
<p>Open the .zip file</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image5.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb5.png" border="0" alt="image" width="630" height="437" /></a></p>
<p>Extract the contents to a folder of your liking.</p>
<p>Open the up any of the .dll files in <a href="http://reflector.red-gate.com/download.aspx?TreatAsUpdate=1">reflector</a></p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image6.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb6.png" border="0" alt="image" width="310" height="309" /></a></p>
<p>Expand the MashooHeaderGames.dll</p>
<p>When you find something interesting</p>
<p>Right click and select “Disassemble”</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image7.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb7.png" border="0" alt="image" width="496" height="455" /></a></p>
<p>A window appears to the right:</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image8.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb8.png" border="0" alt="image" width="636" height="458" /></a></p>
<p>Click the “Expand Methods” green text to look at the implementation details</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image9.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb9.png" border="0" alt="image" width="652" height="474" /></a></p>
<p>Does not look like I found a game .xap this time. Finding the right .xap file and a .xap file at all can be quite hard sometimes. As stuff get included and linked and whatnot. But if your browser can show it, you can find it.</p>
<h1>Flash</h1>
<p>Find a flash application you would like to look at</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image10.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb10.png" border="0" alt="image" width="548" height="398" /></a></p>
<p>View source of the page and look for .swf files</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image11.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb11.png" border="0" alt="image" width="602" height="159" /></a></p>
<p>We’re in luck. If you ever want to see a flash application in fullscreen. You can just type in the url to the .swf file in your browser. But I can always play it later, right now lets download the file and decompile it. Once you have opened the pure .swf file in your browser. You can just save it like you would a web-page to a folder of your liking.</p>
<p>There are many tools for decompiling flash applications available on the internet. I have been trying out a rather cool one lately. It’s from Sothink and it’s called <a href="http://www.sothink.com/product/flashdecompiler/">SWF Decompiler</a></p>
<p>When you are opening the .swf file in SWF Decompiler, you get this</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image12.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb12.png" border="0" alt="image" width="854" height="394" /></a></p>
<p>A rather neat user interface. Expand the tree on the right to see more details about the code inside the .swf file.</p>
<p><a href="http://www.hkon.org/blog/wp-content/uploads/2011/04/image13.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/image_thumb13.png" border="0" alt="image" width="930" height="360" /></a></p>
<p>The interesting stuff is often under the Action folder. In this case, a file called MainMovie seems to be where all the cool stuff goes on. I can read the code and get inspired to create some portals of my own <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" src="http://www.hkon.org/blog/wp-content/uploads/2011/04/wlEmoticon-smile.png" alt="Smile" /></p>
<h1>Additional pointers</h1>
<p>Both flash and silverlight are CLIENT applications, this means that they are downloaded to your machine and are running on your machine just like any of your normal applications. The only differences is that they appear in your browser and are running in a completely locked environment so you don’t have to worry about viruses or anything.</p>
<p>Any communication the application got with the backend server for displaying data such as high-scores for games is run over the network, and is therefore possible to pick up with a packet sniffer such as <a href="http://www.wireshark.org/">Wireshark</a></p>
<p>With the decompiled source code of an internet application and Wireshark, there is nothing stopping you from creating your own client to the services used by the flash and silverlight applications. You can create your own youtube client, any flash/silverlight multiplayer game can be completely replaced by your own super copy. This is one of the methods you can use if you want to create a bot for a flash/silverlight mmo.</p>
<p>But you should prepare for days/weeks of work getting every little synchronization message perfect, it is painstakingly boring work, but the rewards in high-score might be great!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hkon.org/blog/?feed=rss2&#038;p=736</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book recommendations</title>
		<link>http://www.hkon.org/blog/?p=599</link>
		<comments>http://www.hkon.org/blog/?p=599#comments</comments>
		<pubDate>Sun, 20 Feb 2011 22:10:34 +0000</pubDate>
		<dc:creator>Hkon</dc:creator>
				<category><![CDATA[Books]]></category>

		<guid isPermaLink="false">http://www.hkon.org/blog/?p=599</guid>
		<description><![CDATA[This is a post that have been lying around in my draft folder for some time, A list of books which have provided me with some insight and changed the way I think about various problems and situations; Innumeracy This is my favorite book. It&#8217;s about every day use of numbers and how people fail [...]]]></description>
			<content:encoded><![CDATA[<p>This is a post that have been lying around in my draft folder for some time,</p>
<p>A list of books which have provided me with some insight and changed the way I think about various problems and situations;</p>
<h3>Innumeracy</h3>
<p>This is my favorite book. It&#8217;s about every day use of numbers and how people fail to utilize even the most basic number theory in their daily decisions.<br />
I picked up a few points, but to me it was more an eye opener to another world. A world driven by hope and feelings, rather the hard cold truth that are numbers.</p>
<div id="attachment_670" class="wp-caption alignright" style="width: 269px"><a href="http://www.hkon.org/blog/wp-content/uploads/2011/02/images.jpg"><img class="size-full wp-image-670 " title="images" src="http://www.hkon.org/blog/wp-content/uploads/2011/02/images.jpg" alt="" width="259" height="194" /></a><p class="wp-caption-text">Richard Dawkins, the worlds most evil man according to some.</p></div>
<h3>Irrationality</h3>
<p>This is my favorite book, full of documented studies of irrational behavior. Stories in this book also has great re-tell value to other people. I can converse with my grandmother over the content of this book, sadly she is not into StarCraft.</p>
<p>My favorite examples are the ones about how normal, rational people acts irrational as soon as they are being told to do irrational things by a man in a lab-coat. And the ones about how people conform in a group.</p>
<h3>Pragmatic thinking &amp; learning</h3>
<p>This is my favorite book, it really changed the way I view myself, other people, experts, beginners and the five other levels of knowledge. It has also helped a great deal in teaching me to think about my thinking.<br />
Making me a faster learner.</p>
<h3>The selfish gene</h3>
<p>This is my favorite book, I really thought I had a basic understanding about hos evolution works before I read this book. As it turned out, I didn&#8217;t.</p>
<p>Also, the tit-for-tat approach, that is being nice, with some retaliation, a willingness to forgive and total lack of envy does the trick.</p>
<div id="attachment_660" class="wp-caption alignright" style="width: 386px"><a href="http://www.hkon.org/blog/wp-content/uploads/2011/02/main_godel.jpg"><img class="size-full wp-image-660 " title="main_godel" src="http://www.hkon.org/blog/wp-content/uploads/2011/02/main_godel.jpg" alt="" width="376" height="250" /></a><p class="wp-caption-text">Kurt Gödel, the crusher of dreams</p></div>
<h3>Chaos and Fractals: New Frontiers of Science</h3>
<p>This is my favorite book. I worked on this bastard for nearly a year. At the end of every chapter there is source code helping you to create some really neat graphics. As I was reading this I was learning OpenGL, the examples are in some obscure language. Pascal or Fortran if I remember correctly. But  it&#8217;s easy to read so porting to other languages are easy. I also spotted this book under Georges arm, in a Seinfeld episode (The one where George suddenly becomes really smart).</p>
<p>But the main thing I took from it was from one of it&#8217;s opening chapters. When they explain how chaos theory came to be. They tell the story of a meteorologist&#8217;s discovery of the butterfly effect. How small insignificant changes, have huge impact on the end results. (Software change requests anyone1? ).</p>
<p>It was also the book which made me think about the Heisenbergs uncertainty principle. About how the observer can not know everything and is therefore unable to predict the future. (Various crashes in stock market).</p>
<p>This is probably the best book on chaos and fractals to date, and it&#8217;s getting quite old.</p>
<h3>Gödel Escher Bach</h3>
<p>This is my favorite book. Gödels Incompleteness Theorem made me crazy. However, I&#8217;m not able to assert that <img src='http://www.hkon.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>As a programmer though, I enjoyed it a lot, many of it&#8217;s chapters would make some good headway into computer science. It also changed how I view code in general. But in the end, it&#8217;s just turtles all the way down.</p>
<p>We can only hope that we are declared in the outer scope of the application that is the universe. And again can we only hope that the universe in indeed the outer scope. But some days it seems as if we are stuck in an infinite deeply nested inner loop and our existence only awaits termination by the ever increasing variable that is our sun&#8230;</p>
<p>I need a break</p>
<p><em>Tl;Dr; If I should name one book to read? I clearly would recommend you read my favorite book.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hkon.org/blog/?feed=rss2&#038;p=599</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magicka, worth my time</title>
		<link>http://www.hkon.org/blog/?p=636</link>
		<comments>http://www.hkon.org/blog/?p=636#comments</comments>
		<pubDate>Sun, 20 Feb 2011 05:14:13 +0000</pubDate>
		<dc:creator>Hkon</dc:creator>
				<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://www.hkon.org/blog/?p=636</guid>
		<description><![CDATA[Magicka is a great game. Awesome humor and infinite possibilities. The game is a typical kill monsters and the boss, then you advance to the next level rpg style game. Forget mana and levelups. What makes this game special is the . . . Spell casting system. You basically know about 8 kinds of magic: [...]]]></description>
			<content:encoded><![CDATA[<p>Magicka is a great game. Awesome humor and infinite possibilities.</p>
<p>The game is a typical kill monsters and the boss, then you advance to the next level rpg style game.</p>
<p>Forget mana and levelups. What makes this game special is the . . .</p>
<p><strong>Spell casting system. </strong></p>
<p>You basically know about 8 kinds of magic:</p>
<ul>
<li>Healing</li>
<li>Shielding</li>
<li>Water magic</li>
<li>Ice magic</li>
<li>Lightningmagic</li>
<li>Arcane magic</li>
<li>Fire magic</li>
<li>Dirt magic</li>
</ul>
<p>At any given time you can mix all of these magic elements into a magic-mixer which has five slots.</p>
<p>You can fill the slots up with one kind of magic, or mix suitable base magics together to create among other things, bombs and land mines.</p>
<p>There is nothing stopping you from creating every spell in the game the first time you walk out the castle door. But it would be kind of hard to figure all the special combinations of magic out yourself.</p>
<p>The game solves this by hiding recipes of powerful spells in books which you can find around the world. After a book has been picked up, the spell becomes available in the spell library. But this does not mean you can hotkey the spell, you must manually add the elements of the spell each time you want to cast it. You&#8217;ll get a cool overlay to help you remember the spells. Just choose a spell with mouse scrollwheel and it shows you what kind of magic should be applied in what order.</p>
<p>The eight kinds of magic are mapped to eight different buttons on the keyboard. After a bit of getting used to, this system works like a charm.</p>
<p>Each spell you create can be casted in one of three modes. You can cast at a target, an area around you, or on yourself. Shielding and healing spells is casted upon self. But all the other spells can be casted onto self as well.</p>
<p>E.g if you start to burn, you can cast water spell on yourself to put it out. If you walk into a river, you become wet. And lightning magic works a ton better against you. So you better dry yourself by casting a little fire magic onto yourself.</p>
<p>There is nothing stopping you from casting healing spells upon targets as well. The first time you unintentionally heals a boss right about to crumble is indeed a special moment of wtfs. Or when you cast a heal-block spell upon yourself, denying yourself to be healed. etc ;D</p>
<p>The spellcasting system is a joy to use. I have spent countless hours experimenting and trying to find  some really powerful spells, I have come across a particular spell which must be the death ray. I can basically one-shot every boss in the game. But it&#8217;s not good against crowds so I die a lot while trying to use it on hoards of enemies.</p>
<div id="attachment_642" class="wp-caption aligncenter" style="width: 770px"><a href="http://www.hkon.org/blog/wp-content/uploads/2011/02/Burning-e1298233516569.jpg"><img class="size-full wp-image-642" title="Burning" src="http://www.hkon.org/blog/wp-content/uploads/2011/02/Burning-e1298233516569.jpg" alt="" width="760" height="490" /></a><p class="wp-caption-text">Burning with desire</p></div>
<p><strong>Your ingame mentor, Vlad</strong></p>
<p>He is totally not a vampire!</p>
<p><strong>Why is this game so awesome</strong></p>
<p>This game is so awesome because of the way they have managed to create a game of logic and puzzle-solving by using spells. There is basically a spell or mix of spells right for every situation, and you must careful choose which one or else you die. But you can always resort to brute-force. One of the best spells in the game consists of loading up with 5-parts of dirt-magic. Which basically hauls a large boulder at your enemy, smoldering them. If there are many enemies walking in a line, the boulder grinds them all to stew.</p>
<p>So I guess the humor and the countless possibilies of the spellcaster system are the two most important parts of this game. Something which is a bit of a drawback is the level system and saving. The game is checkpoint based. But if you reach a checkpoint, quit the game then and start playing again at a later time. The checkpoint save is disregarded and you start from the beginning of the level. So beware of this when you start to play 10 minutes before you are supposed to go to bed&#8230;. lesson learned.</p>
<p>But all it really did for me was extending the Magick experience that is Magicka. 9 /10</p>
<p>ps: Super spell = S-FQ-FQ-AA (Arcane-Steam-Steam-Lightning-Lightning)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hkon.org/blog/?feed=rss2&#038;p=636</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New gadget</title>
		<link>http://www.hkon.org/blog/?p=624</link>
		<comments>http://www.hkon.org/blog/?p=624#comments</comments>
		<pubDate>Wed, 15 Dec 2010 20:43:54 +0000</pubDate>
		<dc:creator>Hkon</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Stuff I've acquired]]></category>
		<category><![CDATA[gadget]]></category>

		<guid isPermaLink="false">http://www.hkon.org/blog/?p=624</guid>
		<description><![CDATA[HTC desire. Nice keyboard, I wrote this without swearing. Huge improvement over my old &#8220;hero&#8221;]]></description>
			<content:encoded><![CDATA[<p>HTC desire. Nice keyboard, I wrote this without swearing. Huge improvement over my old &#8220;hero&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hkon.org/blog/?feed=rss2&#038;p=624</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>some guy said something i liked</title>
		<link>http://www.hkon.org/blog/?p=616</link>
		<comments>http://www.hkon.org/blog/?p=616#comments</comments>
		<pubDate>Tue, 23 Nov 2010 19:49:21 +0000</pubDate>
		<dc:creator>Hkon</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.hkon.org/blog/?p=616</guid>
		<description><![CDATA[I remember reading about some guy, who was very internet famous. Then suddenly one day, he disappeared from the internet. It made a lot of people really sad. I tried to find out his true identify, but stopped after I read the following observation by the &#8220;_why the lucky stiff&#8221; when you don&#8217;t create things, [...]]]></description>
			<content:encoded><![CDATA[<p>I remember reading about some guy, who was very internet famous. Then suddenly one day, he disappeared from the internet. It made a lot of people really sad. I tried to find out his true identify, but stopped after I read the following observation by the &#8220;_why the lucky stiff&#8221;</p>
<blockquote><p>when you don&#8217;t create things, you become defined by your tastes rather than ability. your tastes only narrow &amp; exclude people. so create.</p></blockquote>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hkon.org/blog/?feed=rss2&#038;p=616</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Someone almost became lunch</title>
		<link>http://www.hkon.org/blog/?p=603</link>
		<comments>http://www.hkon.org/blog/?p=603#comments</comments>
		<pubDate>Sat, 07 Aug 2010 12:17:28 +0000</pubDate>
		<dc:creator>Hkon</dc:creator>
				<category><![CDATA[Sharks]]></category>

		<guid isPermaLink="false">http://www.hkon.org/blog/?p=603</guid>
		<description><![CDATA[Great white sharks are great and brutal. This is why I will never trespass into their domain. Some people submerge themselves in a cage, thinking that it&#8217;s a safe way to get a great view of sharks in their natural habitat. I would never do this, and certainly never ever after viewing this spectacular video [...]]]></description>
			<content:encoded><![CDATA[<p>Great white sharks are great and brutal. This is why I will never trespass into their domain. Some people submerge themselves in a cage, thinking that it&#8217;s a safe way to get a great view of sharks in their natural habitat. I would never do this, and certainly never ever after viewing this spectacular video of a great-white ravaging a &#8220;solid shark-cage&#8221;</p>
<p><span id="more-603"></span></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/MWzkmwMYTUo&amp;hl=nb_NO&amp;fs=1?rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/MWzkmwMYTUo&amp;hl=nb_NO&amp;fs=1?rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hkon.org/blog/?feed=rss2&#038;p=603</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ridiculous software, which works surprisingly well</title>
		<link>http://www.hkon.org/blog/?p=580</link>
		<comments>http://www.hkon.org/blog/?p=580#comments</comments>
		<pubDate>Wed, 28 Jul 2010 22:56:55 +0000</pubDate>
		<dc:creator>Hkon</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[day]]></category>
		<category><![CDATA[f.lux]]></category>
		<category><![CDATA[light]]></category>
		<category><![CDATA[night]]></category>
		<category><![CDATA[sleep]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[vampire]]></category>

		<guid isPermaLink="false">http://www.hkon.org/blog/?p=580</guid>
		<description><![CDATA[Tl;Dr f.lux A couple of months back a friend messaged me on MSN screaming, nudging and going completely crazy about a little app called f.lux. When he first told me about it&#8217;s features, I could barely, barely keep myself from laughing my ass off. It&#8217;s like this application which based on the time of day, [...]]]></description>
			<content:encoded><![CDATA[<p>Tl;Dr <a title="f.lux something which does something to your something" href="http://www.stereopsis.com/flux/">f.lux</a></p>
<p>A couple of months back a friend messaged me on MSN screaming, nudging and going completely crazy about a little app called <em>f.lux</em>. When he first told me about it&#8217;s features, I could barely, barely keep myself from laughing my ass off.</p>
<blockquote><p>It&#8217;s like this application which based on the time of day, lights your computer screen according to the amount of sunlight outside. This makes it easier to sit in front of a computer at night.</p></blockquote>
<p><span id="more-580"></span></p>
<p>My first thought was, ok, is this some sort of phishing attempt? But he assured me, that it was pure genious to use and not evil. So I installed the app, and fired it up.</p>
<p>This was all happening on a saturday afternoon, the sun was shining at it&#8217;s fullest force outside and f.lux is not noticeable at all, the screen lights up as normal.</p>
<p>F.lux has this time-emulator, which lets you emulate the suns movement during  the 24 hours with a slider. When I emulated a 24 hour intervall, I was not at all impressed. All it did was making my screen go a little more red at night. I just cracked a few jokes about it&#8217;s complete #FAILness on my friends behalf and forgot all about it. The app, when minimized is located in the systray, and on windows7, hidden until you click the little arrow. So I forgot I had it running.</p>
<div class="wp-caption aligncenter" style="width: 405px"><img title="f.lux screenshot" src="http://s3.herf.org/flux-shot.png" alt="" width="395" height="200" /><p class="wp-caption-text">f.lux screenshot</p></div>
<p>A couple of days passed and I didn&#8217;t notice it was still running. Until this one night! I had gone early to bed, and woke up in the middle of the night. Ah yeah well, better go kill some time in front of the computer.</p>
<p>Now this scenario is a relatively common scenario for me, and the following thing usually happens. I turn on my monitors, open a browser and <strong>AAAAAAAAAAAAAHHH!!</strong> The light is burning my eyes away! The browser has a default white start-page, google, and thus the monitors let out light in all their glory, (desktop background black of course). I have found a solution to this,  I just close one eye, and read news with half-an-eye. It&#8217;s not pleasant, but it sure beats the hell out of not doing it. It takes about 4-5 minutes until I can exit from cyclopsmode/2.</p>

<a href='http://www.hkon.org/blog/?attachment_id=584' title='cyclops'><img width="150" height="150" src="http://www.hkon.org/blog/wp-content/uploads/2010/07/cyclops-150x150.jpg" class="attachment-thumbnail" alt="Without f.lux" title="cyclops" /></a>
<a href='http://www.hkon.org/blog/?attachment_id=585' title='happycamper'><img width="150" height="150" src="http://www.hkon.org/blog/wp-content/uploads/2010/07/happycamper-150x150.jpg" class="attachment-thumbnail" alt="With f.lux" title="happycamper" /></a>

<p>As you can probably guess by now, the scenario described before did not occur, I could just sit down and use my computer as usual. No fancy Jim Carey moves required. I pondered what might be the reason for this, and then I remebered the f.lux app. I expanded the systray and opened f.lux up. Hmmph it was running for all this time, I knew you were a nag? I was thinking to myself.</p>
<p>I now proceded to run the &#8220;sun&#8221; emulator again, this is pretty much all you can do in the application, so it sorta happens everytime I open it up. And when the sun was up, or more precisely, the slider hit midday, the screen was becoming an unwatchable white sun again. Have not had to go cyclops ever again.</p>
<p>So if you&#8217;re a night-stalker light me, it&#8217;s a <a title="FLUX the must have software for nightcrawlers" href="http://www.stereopsis.com/flux/">INSTA DOWNLOAD</a>!</p>
<h2><a href="http://www.stereopsis.com/flux/">Download f.lux</a></h2>
<p>Disclaimer: I&#8217;m not associated with the creators of f.lux in any way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hkon.org/blog/?feed=rss2&#038;p=580</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Max Test</title>
		<link>http://www.hkon.org/blog/?p=535</link>
		<comments>http://www.hkon.org/blog/?p=535#comments</comments>
		<pubDate>Mon, 07 Jun 2010 21:51:18 +0000</pubDate>
		<dc:creator>Hkon</dc:creator>
				<category><![CDATA[Training 2010]]></category>

		<guid isPermaLink="false">http://www.hkon.org/blog/?p=535</guid>
		<description><![CDATA[New personal bests: Bench press: 142,5 kg Front squat: 130 kg Deadlift: 200 kg Pull down: 135 kg ( maxed out machine ) Finally lifted 200 kg of something ;D]]></description>
			<content:encoded><![CDATA[<p>New personal bests:</p>
<ul>
<li>Bench press: 142,5 kg</li>
<li>Front squat: 130 kg</li>
<li>Deadlift: 200 kg</li>
<li>Pull down: 135 kg ( maxed out machine <img src='http://www.hkon.org/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  )</li>
</ul>
<p>Finally lifted 200 kg of something ;D</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hkon.org/blog/?feed=rss2&#038;p=535</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developing on Android</title>
		<link>http://www.hkon.org/blog/?p=531</link>
		<comments>http://www.hkon.org/blog/?p=531#comments</comments>
		<pubDate>Mon, 31 May 2010 22:46:02 +0000</pubDate>
		<dc:creator>Hkon</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.hkon.org/blog/?p=531</guid>
		<description><![CDATA[As a .NET developer in my day-job I get to work with all the new cool Microsoft technology, but alas I have a HTC Hero Android phone. So lately I’ve been developing a personal applicaton for the android which is going to help me perform a tedious task. Some thoughts on java, developing for Android, [...]]]></description>
			<content:encoded><![CDATA[<p>As a .NET developer in my day-job I get to work with all the new cool Microsoft technology, but alas I have a HTC Hero Android phone. So lately I’ve been developing a personal applicaton for the android which is going to help me perform a tedious task. Some thoughts on java, developing for Android, tools and commnuity.</p>
<p><span id="more-531"></span></p>
<p>The application I am making is similar to a diary application, only it’s specialized for logging my daily(I wish) workouts. This application is obviously data driven, and its not rocket science to create a few input forms and some output forms. But IT’S LIKE ON MY PHONE, so-that-automatically-means-that-it’s-good.</p>
<p>The database stuff is up, completed a few views/activities, experimented with web-services. So now I basically know how to complete this app. But that’s always the hard part, isn’t it? Once you know how to do something, it’s not that interesting to do anymore.</p>
<p>Along the way I’ve had a friend helping me with the basics regarding some gui and db. That is really usefull to have some pointers, it’s one thing to read tutorials and documentation, but it’s always 10 times more productive to have conversations with people who have struggled with the same issues you run into yourself.</p>
<p>When you would like to start developing applications for Android, and you have no clue where to start or even what language and tools you’ll use. You start out at google and you are quickly brought to the android developer homepage, resource center and epi-center for android developers: <a href="http://developer.android.com/index.html">http://developer.android.com/index.html</a>. Fairly well organized site, with API style documentation, which generally is of high quality.</p>
<p>In addition there are also multiple sections dedicated to Android concepts and how everything is related to each other. Starting <a href="http://developer.android.com/guide/topics/fundamentals.html">http://developer.android.com/guide/topics/fundamentals.html</a> here, I fairly quickly got an overview of the structure, I am in no way an expert yet, but the overall structure is easy to grasp.</p>
<p>Ok, theory is all well and good, but how do you write some code.? Short answer, you use Java.</p>
<p><strong>Netbeans</strong></p>
<p>I downloaded NetBeans, because I wanted to try it, have not used it since like hmm back in school 2003 or something. It has changed quite drastically for the better I would say. It actually has more code-editing functionality than Visual Studio 2010, but with the Re-Sharper plugin to Visual Studio, the differences are evened out. (At least from a developers perspective, any license ordering department in an office might disagree on that ).</p>
<p>I was really excited to see the “ReSharper” features embeedded in NetBeans, a pleasant surprise. When you have downloaded netbeans and the Android SDK, you can create a new android project and just build and run. A cool emulator phone comes up, showing your app. There are some issues with the debugger as it sometimes has problems connecting. Another cool feature is to execute apps on an actual android phone. Just hook it up and it pops up in the “select device you would like to run the app on”.</p>
<p>I also like how the netbeans continously checks your project for errors and make it easy for you to locate that error and fix it. I still enjoy visual studio over NetBeans, but NetBeans definetly is on the right track.</p>
<p><strong>Android SDK</strong></p>
<p>I have not dug too much into the nitty gritty details yet, as I just wanted a working application as fast as possible. But I have noticed a few cool things and a few odd things.</p>
<p>For example when you dig a bit into the android SDK you quickly run into the concept of “activities”, an activity typically represents a screen. So in your app you navigate back and forth between your activities by using “intents”. Now say you have an object that you start to create in one activity, and you build it up over several activities, it would be cool to pass the object between the activities in some manner. The intents has this property bag you can use for passing state from one activity to another, but it only takes primitives. The solution (which is actually mentioned in the SDK) is to have static variables with static setters on the activities which you must set before switching the screen to that activity. That is kind of hairy, I guess it could be stored in a more central place, like a singleton class designed to maintain app state. Storing state in activities is also kind of risky, because if your app is “minimized” or paused as is the Android term, the activity is regarded as a disposable object and might get gc’ed if the phone is running low on resources.</p>
<p>Also the fact that there is no embedded SOAP parser in the SDK baffled me, there is however a JSON parser. And the logic behind that is that xml parsing is heavy duty job to do on the android as compared to JSON parsing.</p>
<p>I enjoy the way you create a GUI, you just script it with with XML and load it into your activities. In the activities you can implement your GUI logic. It’s kind of hard knowing how much logic to put in the activity implementation and how much to abstract away from the activity. I’m still not 100% sure on what is the best way of implementing activities. There is also a tool for drawing android GUI, <a href="http://www.droiddraw.org/">http://www.droiddraw.org/</a>, which raawks. You can copy paste XML back and forth to see a preview of your handcrafted GUI or just draw the GUI and copy the XML to your project. Neat</p>
<p>Another thing which is really great is how Android handles resources. basically you have these folders which are resource folders. And everything you drag/drop to those folders are automatically picked up by the android resource manager which generates id’s for them and lets you use them by referring a public static generated Java class,R for resources I guess ;D (e.g: R.images.myimage). The same system is used for strings and app settings as well.</p>
<p>The fact that there is a SQLite database running on the android is AWESOME, it makes it soo much easier to maintain ur data. SQLite is very lite, in fact it is so lite that you will WTF the first time you see how lite it is. No foreigh keys, no DATE. But it works just fine for the app segment on the android.</p>
<p><strong>The tools</strong></p>
<p>Android SDK has a nice toolchain with a lot of tools I have not even looked at yet. The most noticeable, usefull and awesome tool is the Android Emulator. It allows you to run your applications on a virtual phone. It uses the internet connection on your computer for Internet. You can access it by a shell tool which gives you a Linux shell from which you can perform basic tasks, e.g open up the SQLite3 shell to do some querying against your databases to see that they are all set up just fine.</p>
<p>As I have an alpha version of my app ready, I am going to look at the packaging and release tools for Android in the near future. I have skimmed the docs over at at developer.android.com, and it looks like som fairly friendly recipe applications.</p>
<p>The “Dalvik Debug Monitor” is an absolute necessary thing to know about, this is the application that monitors your device and show you logging output, debug output, unhandeled exception stacktraces and so forth. It’s hidden from plain sight by a script known as “ddms.bat” in the android/tools folder.</p>
<p><strong>Misc</strong></p>
<p>Check out the Day2 Keynote from Google IO with Vic Gendutra, he talks about the success of the Android devices and the future of Android. With lots of demos from the upcoming Froyo release of Android, looks awesome, check it out. <a href="http://www.youtube.com/user/GoogleDevelopers#p/c/CF01A789E62F2454/0/IY3U2GXhz44">http://www.youtube.com/user/GoogleDevelopers#p/c/CF01A789E62F2454/0/IY3U2GXhz44</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hkon.org/blog/?feed=rss2&#038;p=531</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>chest</title>
		<link>http://www.hkon.org/blog/?p=527</link>
		<comments>http://www.hkon.org/blog/?p=527#comments</comments>
		<pubDate>Mon, 19 Apr 2010 22:04:13 +0000</pubDate>
		<dc:creator>Hkon</dc:creator>
				<category><![CDATA[Training 2010]]></category>

		<guid isPermaLink="false">http://www.hkon.org/blog/?p=527</guid>
		<description><![CDATA[Bench press: 3*3*120 kg Biceps: 3*6*22 kg Triceps: 3*10*MAX Arnold: 3*7*22 kg Walked home from majorstua, tired, sleep]]></description>
			<content:encoded><![CDATA[<p>Bench press: 3*3*120 kg<br />
Biceps: 3*6*22 kg<br />
Triceps: 3*10*MAX<br />
Arnold: 3*7*22 kg</p>
<p>Walked home from majorstua, tired, sleep</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hkon.org/blog/?feed=rss2&#038;p=527</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

