<?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>Reflecting Knowledge</title>
	<atom:link href="http://pavletic.de/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://pavletic.de</link>
	<description>Software Architectures, Language Engineering and Technologies</description>
	<lastBuildDate>Wed, 20 Jun 2012 14:14:18 +0000</lastBuildDate>
	<language>en-CA</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Reverting Git Commits</title>
		<link>http://pavletic.de/?p=252</link>
		<comments>http://pavletic.de/?p=252#comments</comments>
		<pubDate>Wed, 20 Jun 2012 09:09:51 +0000</pubDate>
		<dc:creator>Domenik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://pavletic.de/?p=252</guid>
		<description><![CDATA[Sometimes you recognize after committing some changes a bug or a failure that you introduced with your commit. In those cases, you usually fix the problem by fixing the problem in a second commit. Git allows you to restore your commits, so you don&#8217;t have to mess up your commit log. After committing, at first [...]]]></description>
				<content:encoded><![CDATA[<p align="justify">
Sometimes you recognize after committing some changes a bug or a failure that you introduced with your commit. In those cases, you usually fix the problem by fixing the problem in a second commit. Git allows you to restore your commits, so you don&#8217;t have to mess up your commit log.
</p>
<p align="justify">
After committing, at first you use the following command to figure out the hash of the commit that you would like to revert (usually the commit before your faulty commit):</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">git log</div></div>
</p>
<p align="justify">
Now you use the following command with the hash in sharpen brackets to revert to the previous commit:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">git reset --hard &lt;hash&gt;</div></div>
</p>
<p align="justify">
After this procedure the faulty commit is not recognized anymore by your Git repository and you can continue working on your project.</p>
]]></content:encoded>
			<wfw:commentRss>http://pavletic.de/?feed=rss2&#038;p=252</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Eclipse in Fullscreen Mode on Mac OSX</title>
		<link>http://pavletic.de/?p=245</link>
		<comments>http://pavletic.de/?p=245#comments</comments>
		<pubDate>Sun, 17 Jun 2012 17:53:32 +0000</pubDate>
		<dc:creator>Domenik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://pavletic.de/?p=245</guid>
		<description><![CDATA[The Eclipse IDE doesn&#8217;t support fullscreen on Mac OSX per default. To overcome this issue, simply install the fullscreen enabler plugin.]]></description>
				<content:encoded><![CDATA[<p>The Eclipse IDE doesn&#8217;t support fullscreen on Mac OSX per default. To overcome this issue, simply install the <a href="http://marketplace.eclipse.org/content/full-screen-enabler-eclipse-3637-osx-lion"><em>fullscreen enabler</em></a> plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://pavletic.de/?feed=rss2&#038;p=245</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typing Class Objects in Java</title>
		<link>http://pavletic.de/?p=236</link>
		<comments>http://pavletic.de/?p=236#comments</comments>
		<pubDate>Thu, 14 Jun 2012 18:48:02 +0000</pubDate>
		<dc:creator>Domenik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://pavletic.de/?p=236</guid>
		<description><![CDATA[Java provides a rich Reflection API which allows you to inspect field declarations, invokation of methods or instantiation of objects based on a Class object. If you work with Class objects in your code, then you can use the ? extends keyword to force method callers to pass only Class objects of a specific class [...]]]></description>
				<content:encoded><![CDATA[<p align="justify">
Java provides a rich Reflection API which allows you to inspect field declarations, invokation of methods or instantiation of objects based on a Class object. If you work with Class objects in your code, then you can use the <em>? extends <class></em> keyword to force method callers to pass only Class objects of a specific class or subclass.
</p>
<p align="justify">
The following code snippet shows the application of this feature. Callers can pass only classes that implement the interface <em>IMessage</em>. In the method body we can refer to methods of this interface.
</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">String getString(Class&lt;? extends IMessage&gt; msg) { <br />
&nbsp; return message.getTitle + message.getID();<br />
}</div></div>
]]></content:encoded>
			<wfw:commentRss>http://pavletic.de/?feed=rss2&#038;p=236</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Deleted Files to your Index</title>
		<link>http://pavletic.de/?p=233</link>
		<comments>http://pavletic.de/?p=233#comments</comments>
		<pubDate>Fri, 08 Jun 2012 17:56:56 +0000</pubDate>
		<dc:creator>Domenik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://pavletic.de/?p=233</guid>
		<description><![CDATA[Sometimes when working with Git you are faced with the situation where you delete a couple of files. Those files are then marked as deleted by Git, but are not added to your index. To add those files to your index use the following command: git -u]]></description>
				<content:encoded><![CDATA[<p align="justify">
Sometimes when working with Git you are faced with the situation where you delete a couple of files. Those files are then marked as deleted by Git, but are not added to your index. To add those files to your index use the following command:
</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">git -u</div></div>
]]></content:encoded>
			<wfw:commentRss>http://pavletic.de/?feed=rss2&#038;p=233</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Chronon Time-Travelling Debugger</title>
		<link>http://pavletic.de/?p=94</link>
		<comments>http://pavletic.de/?p=94#comments</comments>
		<pubDate>Sat, 21 Apr 2012 12:18:29 +0000</pubDate>
		<dc:creator>Domenik</dc:creator>
				<category><![CDATA[Debugger]]></category>
		<category><![CDATA[Chronon]]></category>
		<category><![CDATA[Time-Travelling]]></category>

		<guid isPermaLink="false">http://pavletic.de/?p=94</guid>
		<description><![CDATA[In my previous post I have commented a talk on the Time Travelling Debugger by Chronon wich is targeted towards Java. In this post I will describe the architecture of the system and its features. Components The architecture of the debugger generally consists of two components: a recorder that is responsible for collecting and storing the execution [...]]]></description>
				<content:encoded><![CDATA[<p align="justify">In my <a title="Limitations of today’s Debuggers" href="http://pavletic.de/?p=52">previous post</a> I have commented a talk on the <em>Time Travelling Debugger </em>by <em>Chronon </em>wich is targeted towards Java. In this post I will describe the architecture of the system and its features.</p>
<p align="justify"><strong>Components</strong><br />
The architecture of the debugger generally consists of two components: a <em>recorder</em> that is responsible for collecting and storing the execution and program state; and a <em>frontend</em> that is integrated into the Eclipde Debugger UI. The frontend reads the recordings to realize the debug behavior.
</p>
<p align="justify"><strong>Frontend</strong><br />
As mentioned in the previous paragraph, the frontend is integrated into the Eclipse IDE, actually in the Debugger perspective. Chronon provides a <a title="tutorial" href="https://chronon.onconfluence.com/display/DOC/Using+Chronon+with+Intellij+IDEA" target="_blank">tutorial</a> on how to migrate IntelliJ projects to Eclipse, in order to use their debugger, but a real IntelliJ integration is currently not provided.</p>
<p align="justify">Just like with other Java debuggers, users can debug their programs with the well known step-through metaphor and view the values of local variables and arguments. The debugger shows the variables for the current context and their corresponding values in a separate window. Beside watching the values of variables for the current context, users can also inspect the <em>value history</em> of variables and continue debugging with the state that the program had at the time of a specific value assignment (that is cool!). The following figure shows the related UI elements: the variables view in the upper left corner, the editor view in the lower right corner and the variables history in the lower left corner.</p>
<p><img src="https://chronon.onconfluence.com/download/attachments/1147110/varhistory.png?version=3&amp;modificationDate=1293062451183" alt="localVars" /></p>
<p align="justify">
In the previous paragraph we have seen the <em>variable history</em> which allows users to step through different program states of the debugged program. The debugger also provides the well known stepping commands, such as <em>step over</em> or <em>step into</em>, but it also allows users to step backwards (<em>step back</em>). With this feature users can do and undo assignments or other changes to the program or execution state on the level of statements. The following figure shows the call stack and the command bar with the debug operations.
</p>
<p><img src="https://chronon.onconfluence.com/download/attachments/1147112/currentline.png?version=1&amp;modificationDate=1293066889694" alt="editor" /></p>
<p align="justify">
<strong>Recorder</strong><br />
In the previous section we have seen the features provided by the debugger and its UI-integration in Eclipse. We will now talk about the backend component which is responsible for collecting and storing the trace/debug data from the running Java program. The following figure shows the involved components and the data flow between them:
</p>
<p><img src="http://getfile2.posterous.com/getfile/files.posterous.com/temp-2010-12-01/BJkjsfoEdfjqkmgtpohDiAyDFsHDHDnxFmHCAmHbpFuhwuapHzjDrsuCmgIh/chronon_architecture2.png.scaled1000.png" alt="Architecture of the Chronon Time Travelling Debugger" /></p>
<p>The shown components have the following responsibilities:</p>
<ul>
<li>Application threads store debug data in the <em>memory buffer</em> (RAM).</li>
<li><em>Flusher Threads</em> read the data, do processing on it and save it to disk (<em>Recordings</em>).
</ul>
<p align="justify">
While studying the architecture I started wondering how the garbage collector performs with debugged applications. From my point of view this might be the bottleneck, but it seems like Chronon solved this <a href="http://eblog.chrononsystems.com/design-and-architecture-of-the-chronon-record-0" title="problem" target="_blank">problem</a>:<br />
&#8220;<em>It is a well known fact that current JVMs don&#8217;t handle heap sizes above 2gb very well. It is possible that if you have an extremely computationally intensive program that Chronon does generate utilize that much memory or that your application already is reaching the 2gb limit and Chronon makes it go over that. To solve this issue we use a custom memory management. Thus even if the data generated by Chronon goes a little high, it wont have a heavy impact on the GC. It is common to see a 2-3gb Chronon heap shrink to a few hundred megabytes within a blink of an eye, which would ordinarily take many seconds or minutes without our custom memory management.</em>&#8221;
</p>
<p><strong>Requirements</strong><br />
Chronon designed the bakcend based on the following non-functional requirements:</p>
<ul>
<li>Scalability</li>
<li>Minimum impact on application responsiveness</li>
<li>Libraray and Framework Independence</li>
</ul>
<p align="justify">
The first requirement deals with vertical scaling across multiple CPU cores. The figure shows this by multiple <em>flusher threads</em>. The second requirement deals with the altered performance of the debugged appllication. The debugger instruments the bytecode at runtime to gain the tracing/debug data while the program is executed. The third requirement is related to different frameworks and libraries, such as JEE, SWT or SWING. The debugger provides debugging support, independent of the Java technology the application is based on.
</p>
<p><strong>Summary</strong><br />
In this article I have shown the features of the <a href="http://www.chrononsystems.com/products/chronon-time-travelling-debugger" title="conronon debugger" target="_blank">Chronon Time Travelling Debugger</a>, how it is integrated into the Eclipse Debugger perspective, the design of its backend component and finally its non-functional requirements.</p>
]]></content:encoded>
			<wfw:commentRss>http://pavletic.de/?feed=rss2&#038;p=94</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git complaining about known_hosts</title>
		<link>http://pavletic.de/?p=126</link>
		<comments>http://pavletic.de/?p=126#comments</comments>
		<pubDate>Fri, 20 Apr 2012 18:03:05 +0000</pubDate>
		<dc:creator>Domenik</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[key_read]]></category>
		<category><![CDATA[uudecode]]></category>

		<guid isPermaLink="false">http://pavletic.de/?p=126</guid>
		<description><![CDATA[Today I was faced with the following error message in Git: key_read: uudecode AAAAB3NzaC1yc2EAAAABIwA ... Nu6yT6+Ze/JzJiR3s2Azs1z5+5w== &#160;failed After asking Google without success I started searching for the key, listed in the message, on my file system. It seems my known_hosts file, locaed in the ~/.ssh/ folder, had an error in one of the listed lines: [...]]]></description>
				<content:encoded><![CDATA[<p>Today I was faced with the following error message in Git:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">key_read: uudecode AAAAB3NzaC1yc2EAAAABIwA<br />
...<br />
Nu6yT6+Ze/JzJiR3s2Azs1z5+5w==<br />
&nbsp;failed</div></div>
<p style="text-align:justify">
After asking Google without success I started searching for the key, listed in the message, on my file system. It seems my <em>known_hosts</em> file, locaed in the <em>~/.ssh/</em> folder, had an error in one of the listed lines: there were two entries (with the key listed above) in a single row. After deleting the line, the error message disapeared.</p>
<p>Problem fixed! <img src='http://pavletic.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://pavletic.de/?feed=rss2&#038;p=126</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limitations of today&#8217;s Debuggers</title>
		<link>http://pavletic.de/?p=52</link>
		<comments>http://pavletic.de/?p=52#comments</comments>
		<pubDate>Thu, 12 Apr 2012 22:37:58 +0000</pubDate>
		<dc:creator>Domenik</dc:creator>
				<category><![CDATA[Debugger]]></category>

		<guid isPermaLink="false">http://pavletic.de/?p=52</guid>
		<description><![CDATA[Recently I found this talk on debugging in 2011. The speaker talks about problems of today&#8217;s debuggers and how a new architecture, denoted as Time-Travel Debugging, can solve them. I provide an overview of the talk in this article, with my personal opinion on the topic. The speaker describes at first the context in which debuggers were designed [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Recently I found this <a title="talk" href="http://i.cmpnet.com/ddj/images/mediacenter/jvmlanguagesummit/2011_Deva_Debugging_In_2011.pdf" target="_blank">talk </a>on <em>debugging in 2011</em>. The speaker talks about problems of today&#8217;s debuggers and how a new architecture, denoted as <em>Time-Travel Debugging</em>, can solve them. I provide an overview of the talk in this article, with my personal opinion on the topic.</p>
<p><object id="flashObj" width="640" height="360" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashVars" value="videoId=1113248906001&amp;linkBaseURL=http%3A%2F%2Fmedianetwork.oracle.com%2Fvideo%2Fplayer%2F1113248906001&amp;playerID=1217746023001&amp;playerKey=AQ~~,AAAAAFcSbzI~,OkyYKKfkn3x1llKvCBQgVazGCPhNSKRX&amp;domain=embed&amp;dynamicStreaming=true" /><param name="base" value="http://admin.brightcove.com" /><param name="seamlesstabbing" value="false" /><param name="allowFullScreen" value="true" /><param name="swLiveConnect" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://c.brightcove.com/services/viewer/federated_f9?isVid=1&amp;isUI=1" /><param name="flashvars" value="videoId=1113248906001&amp;linkBaseURL=http%3A%2F%2Fmedianetwork.oracle.com%2Fvideo%2Fplayer%2F1113248906001&amp;playerID=1217746023001&amp;playerKey=AQ~~,AAAAAFcSbzI~,OkyYKKfkn3x1llKvCBQgVazGCPhNSKRX&amp;domain=embed&amp;dynamicStreaming=true" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="swliveconnect" value="true" /><param name="pluginspage" value="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" /><embed id="flashObj" width="640" height="360" type="application/x-shockwave-flash" src="http://c.brightcove.com/services/viewer/federated_f9?isVid=1&amp;isUI=1" flashVars="videoId=1113248906001&amp;linkBaseURL=http%3A%2F%2Fmedianetwork.oracle.com%2Fvideo%2Fplayer%2F1113248906001&amp;playerID=1217746023001&amp;playerKey=AQ~~,AAAAAFcSbzI~,OkyYKKfkn3x1llKvCBQgVazGCPhNSKRX&amp;domain=embed&amp;dynamicStreaming=true" base="http://admin.brightcove.com" seamlesstabbing="false" allowFullScreen="true" swLiveConnect="true" allowScriptAccess="always" flashvars="videoId=1113248906001&amp;linkBaseURL=http%3A%2F%2Fmedianetwork.oracle.com%2Fvideo%2Fplayer%2F1113248906001&amp;playerID=1217746023001&amp;playerKey=AQ~~,AAAAAFcSbzI~,OkyYKKfkn3x1llKvCBQgVazGCPhNSKRX&amp;domain=embed&amp;dynamicStreaming=true" allowfullscreen="true" allowscriptaccess="always" swliveconnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" /></object></p>
<p style="text-align: justify;">The speaker describes at first the context in which debuggers were designed from late 70&#8242;s till today:</p>
<ul>
<li>Programs are single threaded</li>
<li>Execution flow is sequential</li>
<li>Bugs are always reproducible</li>
<li>Programs run for short periods of time</li>
</ul>
<p>Then he talks about the requirements on debuggers in 2011 and problems they face today:</p>
<ul>
<li>Multithreading</li>
<li>Flow of execution not 100% sequential</li>
<li>Reproducing bugs is (very) tough</li>
<li>Programs run for weeks/months/years</li>
</ul>
<p style="text-align: justify;">I agree on the first two arguments, although I would summarize both under <em>multithreading,</em> since multithreaded programs are already less than 100% sequential. The third statement is from my point of view dependent on the actual project (technologies and infrastructure). The final point is not specific for 2011 (today). Back in the days, developers also wrote programs with millions loc. Additionally to the mentioned requirements, I would add the following two:</p>
<ul>
<li>Distribution across multiple machines</li>
<li>Development with different languages</li>
</ul>
<p style="text-align: justify;">The first requirement addresses applications that are distributed across multiple machines. Many debuggers allow remote debugging, but this is not the point here. What I want as a developer is a unified debugging view on my system. I should be able to step into (of course also step out, over etc.) a web-service on machine B from machine A. The tool should handle the the execution flow and update the UI accordingly. The other requirement deals with multi-language systems, developed with multiple languages. Not only with the rise of JVM languages are systems developed with multiple languages. Back in the days, Java EE developers used already multiple languages, such as Java and JSPs (both as a language), to develop their systems. Here, as a developer, I want a unified debugger which abstract from the process barriers and allows me to debug the whole system in the same context.</p>
<p style="text-align: justify;">Vraný et al. describe in their <a title="paper" href="https://www.google.de/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0CCkQFjAA&amp;url=https%3A%2F%2Fusers.fit.cvut.cz%2F~vranyj1%2Fdata%2Fpapers%2FVrany10a-unified-debugger.pdf&amp;ei=gliHT8qLPM7itQbM7rGXBA&amp;usg=AFQjCNEHsPHIgdGEpRpLz9Y2SHz-9jBMDQ&amp;sig2=JQ2v8syO7BnEzqMYIwJ5JA" target="_blank">paper</a> an architecture for integrating multiple heterogenous debugger in a common UI. With their system, users can revisit the execution flow and control it. This is a good starting point for tackling the mentioned requirements, but not yet the last word on the subject.</p>
<p style="text-align: justify;">In my next post I will provide an overview of the presented debugger prototype, which provides already the time-travelling feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://pavletic.de/?feed=rss2&#038;p=52</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Stash</title>
		<link>http://pavletic.de/?p=17</link>
		<comments>http://pavletic.de/?p=17#comments</comments>
		<pubDate>Tue, 10 Apr 2012 14:39:36 +0000</pubDate>
		<dc:creator>Domenik</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Stash]]></category>

		<guid isPermaLink="false">http://pavletic.de/?p=17</guid>
		<description><![CDATA[You propably know the situation: you&#8217;re working on a new feature and suddenly someone interrupts you. This situation happens when you must work on an incoming bug or when someone pushed to the repository and you must continue working on this new commit. With Git, you can simply store your changes locally and pull the latest [...]]]></description>
				<content:encoded><![CDATA[<p align="justify">
You propably know the situation: you&#8217;re working on a new feature and suddenly someone interrupts you. This situation happens when you must work on an incoming bug or when someone pushed to the repository and you must continue working on this new commit.
</p>
<p align="justify">
With Git, you can simply store your changes locally and pull the latest commit from the remote repository. After pulling, you can work directly on the pulled commit or you can merge you previously saved changes and continue working on them.
</p>
<p align="justify">
The following snippet shows the commands for storing your changes locally and merging them into the head after pulling new changes:
</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">git stash</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">git pull</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">git stash</span> pop</div></div>
]]></content:encoded>
			<wfw:commentRss>http://pavletic.de/?feed=rss2&#038;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
