<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Tech Per</title>
	
	<link>http://www.techper.net</link>
	<description>About Technology in My Life</description>
	<lastBuildDate>Wed, 28 Oct 2009 20:48:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/TechPer" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Flex Spinning Progress Indicator Component</title>
		<link>http://www.techper.net/2009/10/28/flex-spinning-progress-indicator-component/</link>
		<comments>http://www.techper.net/2009/10/28/flex-spinning-progress-indicator-component/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 20:48:58 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rich Internet Applications]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=282</guid>
		<description><![CDATA[Sometimes you need to indicate progress to users when the application is doing something, like calling a remote web-service or something. At times, it can be nice to incorporate this as an element in the UI, that operates in an unobtrusive way. For instance showing a small indicator on or besides the button, that initiated [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to indicate progress to users when the application is doing something, like calling a remote web-service or something. At times, it can be nice to incorporate this as an element in the UI, that operates in an unobtrusive way. For instance showing a small indicator on or besides the button, that initiated the operation in progress.</p>
<p><a href="http://www.techper.net/blog/wp-content/uploads/2009/10/spinningwheel1.swf">Here is a small spinning wheel</a> example on how to do this with an old style ASCII spinning wheel animation. Enter the <tt>LabelProgressIndicator.mxml</tt> component:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; ?&gt;
&lt;mx:HBox xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&gt;
    &lt;mx:Script&gt;&lt;![CDATA[
        [Bindable]
        private var statusText:String;

        [Bindable]
        private var progressText:String;

        private const SPIN_CHARS:String = &quot;/-\\|/-\\|&quot;;

        private var workingDotsTimer:Timer;
        private var progressCounter:int;

        public function startProgress(status:String):void {
            if (workingDotsTimer == null) {
                statusText = status;
                workingDotsTimer = new Timer(200);
                progressCounter = 0;
                workingDotsTimer.addEventListener(TimerEvent.TIMER, onWorkingDotsTimer);
                workingDotsTimer.start();
            }
        }

        public function stopProgress():void {
            if (workingDotsTimer != null) {
                workingDotsTimer.removeEventListener(TimerEvent.TIMER, onWorkingDotsTimer);
                workingDotsTimer.stop();
                workingDotsTimer = null;
                statusText = null;
                progressText = null;
            }
        }

        private function onWorkingDotsTimer(event:TimerEvent):void {
            if (progressCounter == SPIN_CHARS.length - 1) {
                progressCounter = 0;
            } else {
                progressCounter++;
            }
            progressText = SPIN_CHARS.charAt(progressCounter);
        }

        ]]&gt;&lt;/mx:Script&gt;

    &lt;mx:Label id=&quot;status&quot; text=&quot;{statusText}&quot;/&gt;
    &lt;mx:Label id=&quot;progress&quot; text=&quot;{progressText}&quot; fontFamily=&quot;courier&quot; fontWeight=&quot;bold&quot;/&gt;
&lt;/mx:HBox&gt;
</pre>
<p>and here is how to use it:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; xmlns:ui=&quot;*&quot;&gt;

    &lt;mx:Button click=&quot;progress.startProgress('working')&quot; label=&quot;Start&quot;/&gt;
    &lt;mx:Button click=&quot;progress.stopProgress()&quot; label=&quot;Stop&quot;/&gt;

    &lt;ui:LabelProgressIndicator id=&quot;progress&quot; /&gt;

&lt;/mx:Application&gt;
</pre>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/Lm9R64gwUc4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/10/28/flex-spinning-progress-indicator-component/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Flex Data Bindings – Behind The Scenes</title>
		<link>http://www.techper.net/2009/10/12/flex-data-bindings-behind-the-scenes/</link>
		<comments>http://www.techper.net/2009/10/12/flex-data-bindings-behind-the-scenes/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 20:20:04 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rich Internet Applications]]></category>
		<category><![CDATA[data binding]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=251</guid>
		<description><![CDATA[Ever wondered how flex data bindings actually work behind the scenes? I have, and sometimes I have had troubles with it, that made me wish I knew some more. This post is a writeup of the knowledge about flex data bindings I uncovered, when looking into the mxmlc generated code for bindings.
Vanilla Example
Here is a [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wondered how flex data bindings actually work behind the scenes? I have, and sometimes I have had troubles with it, that made me wish I knew some more. This post is a writeup of the knowledge about flex data bindings I uncovered, when looking into the mxmlc generated code for bindings.</p>
<h2>Vanilla Example</h2>
<p>Here is a dead simple vanilla sample of flex that does a little bit of data binding:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; ?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&gt;
    &lt;mx:Script&gt;&lt;![CDATA[
        [Bindable] public var value: String = &quot;blah&quot;;
    ]]&gt;&lt;/mx:Script&gt;

    &lt;mx:TextInput id=&quot;textInput&quot; text=&quot;{value}&quot;/&gt;
&lt;/mx:Application&gt;
</pre>
<p>where <tt>value</tt> is bound into <tt>textInput.text</tt> will generate quite a bit of supporting code, when being mxmlc&#8217;ed. Basically, it seems like flex operates with two concepts behind the scenes: <em>Bindings</em> and <em>Watchers</em>.</p>
<h3>Bindings</h3>
<p>A Binding is a <em>one-way connection</em>, that can read a value from a source and set it on a destination, <em>but only when explicitly executed</em>. There is not listening for changes built into a binding as such, it is just a mechanism that can be executed by someone, to transfer a value between a source and a destination.</p>
<p>So, how does a binding get executed? It does so, when the Watchers it is connected to fires. A binding acts as listener for  <tt>watcherFired</tt> on a Watcher, which is how it gets executed when changes happen.</p>
<p>Here is the binding setup, that flex generates for the above example:</p>
<pre class="brush: as3;">
        binding = new mx.binding.Binding(this,
            function():String {
                var result:* = (value);
                var stringResult:String = (result == undefined ? null : String(result));
                return stringResult;
            },
            function(_sourceFunctionReturnValue:String):void {
                textInput.text = _sourceFunctionReturnValue;
            },
            &quot;textInput.text&quot;);
</pre>
<p>basically, it instantiates a <tt>mx.binding.Binding</tt> with the parameters:</p>
<ul>
<li><tt>this</tt> which is this context &#8211; pun intended &#8211; means the <tt>FlexTest</tt> application class</li>
<li>a function that can read the source value when executed</li>
<li>a function that can set the target property when executed</li>
<li>a textual string of the target (docs says it is used for validation)</li>
</ul>
<p>this sets up a &#8220;channel&#8221; from source to target.</p>
<h3>Watchers</h3>
<p>While Bindings only implement the reading of the source and setting into target, the other big part of flex data bindings is actually determining if and when, a binding should execute. This is where Watchers come in.</p>
<p>A Watcher can watch for changes on something, one typical example is a change of a property value. When such a change is detected, the watcher notifies its listeners (which are Binding instances) about the change. It is then up to the listener (the bindings), to actually read out the source and set the target (aka: Execute the binding). It is the Watcher, that determines if a value has actually changed.</p>
<p>Here is the watcher setup, that flex generates for the above example:</p>
<pre class="brush: as3;">
        watchers[0] = new mx.binding.PropertyWatcher(&quot;value&quot;,
            { propertyChange: true },
            [ bindings[0] ],
            propertyGetter);
</pre>
<p>as you can see, it instantiates a <tt>mx.binding.PropertyWatcher</tt> instance, as it is a property we are binding from, with the following parameters:</p>
<ul>
<li>a map of event names as keys, that are the event to listen for, when watching changes. This is what can be overridden with <tt>[Bindable("otherEventNameHere"])</tt></li>
<li>an array of listeners, that get called on their <tt>watcherFired</tt> method when the watcher detects a change (the listeners are <tt>Binding</tt> instances, and in this context <tt>bindings[0]</tt> is the exact binding that we saw the code for just before</li>
<li>and lastly <tt>propertyGetter</tt> is a method, that can return access to properties in the context watched</li>
</ul>
<p>I am sure you can image how this works then. By hey, &#8230; when is the &#8220;propertyChange&#8221; event being dispatched in our code. I mean, when you look at the initial example code, if I was to assign a new value to the <tt>value</tt> property, there sure ain&#8217;t any code there, which fires any events.</p>
<p>Well, it turns out mxmlc has generated code for that too:</p>
<pre class="brush: as3;">
    [Bindable(event=&quot;propertyChange&quot;)]
    public function get value():String {
        return this._111972721value;
    }

    public function set value(value:String):void {
    	var oldValue:Object = this._111972721value;
        if (oldValue !== value) {
            this._111972721value = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, &quot;value&quot;, oldValue, value));
        }
    }
</pre>
<p>it simply moves the original <tt>value</tt> property to a generated name <tt>_111972721value</tt> and adds a get/set pair on the <tt>value</tt> name instead. Clever. And hey, look into that setter. It dispatches the <tt>propertyChange</tt> event, when changed.</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/h0ielJBZu28" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/10/12/flex-data-bindings-behind-the-scenes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AppleScript to Check Image Ratio on a Bunch of Files</title>
		<link>http://www.techper.net/2009/10/07/applescript-to-check-image-ratio-on-a-bunch-of-files/</link>
		<comments>http://www.techper.net/2009/10/07/applescript-to-check-image-ratio-on-a-bunch-of-files/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 20:32:49 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[crop]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=246</guid>
		<description><![CDATA[Faced with the tedious task of checking a large bunch of image files for the correct ratio before uploading to a print service website, I set out to write a small AppleScript application that could do it for me. It turned out to be quite fun and at the same time I got my feet [...]]]></description>
			<content:encoded><![CDATA[<p>Faced with the tedious task of checking a large bunch of image files for the correct ratio before uploading to a print service website, I set out to write a small AppleScript application that could do it for me. It turned out to be quite fun and at the same time I got my feet wet for the first time in AppleScript.</p>
<p>This is what the script does:</p>
<ul>
<li>Ask the user for an input folder and an output folder</li>
<li>Ask the user for which ratio he wants to check against (e.g. 1.5 if you want a 2:3 ratio)</li>
<li>Run throug all image files in the input folder, check if the ratio is the requested, and if not, moves files to output folder</li>
</ul>
<p>All I have to do then, is to crop the files moved to the output folder, to my requested ratio. Actually, the &#8220;Image Events&#8221; library that I use to check dimensions can also crop, but it does so from the center. I want to control what is cropped myself.</p>
<p>And respect to Apple for giving us such an easy to use yet still powerful tool like AppleScript. I used the AppleScript Editor to write the script, and then noticed how I could just save it as an application. Cool!<br />
Here&#8217;s the script:</p>
<pre class="brush: plain;">
-- ask for input folder containing images
set theInputFolder to (choose folder with prompt &quot;Pick the folder containing the images to check ratio against&quot;) as string

-- ask for output folder to move files that does not fulfill ratio
set theOutputFolder to (choose folder with prompt &quot;Move image files not fulfilling ratio where?&quot; without multiple selections allowed and invisibles) as string

-- check folders are not the same
if theInputFolder is equal to theOutputFolder then
	error &quot;Input and output folder may not be the same&quot; number 500
end if

-- ask user for the ratio
display dialog &quot;Enter image ratio&quot; default answer &quot;1.5&quot;
set theRatio to text returned of result as real

tell application &quot;System Events&quot;
	set theImageFiles to every file of folder theInputFolder whose name does not start with &quot;.&quot; and (file type is &quot;TIFF&quot; or file type is &quot;JPEG&quot; or name extension is &quot;tiff&quot; or name extension is &quot;tif&quot; or name extension is &quot;jpeg&quot; or name extension is &quot;jpg&quot;)
end tell

repeat with i from 1 to the count of theImageFiles
	set theImgFile to (item i of theImageFiles as alias)
	tell application &quot;Image Events&quot;
		set theImg to open theImgFile
		set theDimensions to dimensions of theImg
		set theWidth to item 1 of theDimensions
		set theHeight to item 2 of theDimensions
		set min to theHeight
		set max to theWidth
		if (theWidth &lt; theHeight) then
			set min to theWidth
			set max to theHeight
		end if
		close theImg
	end tell

	-- a little rounding
	set theImgRatio to (((max / min) * 10) as integer) / 10

	if (theImgRatio is not equal to theRatio) then
		tell application &quot;Finder&quot;
			move theImgFile to theOutputFolder
		end tell
	end if
end repeat

display dialog &quot;Done&quot; buttons {&quot;OK&quot;} default button 1
</pre>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/6XCllV0gBQE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/10/07/applescript-to-check-image-ratio-on-a-bunch-of-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Photography Challenges Can Do To You</title>
		<link>http://www.techper.net/2009/09/06/what-photography-challenges-can-do-to-you/</link>
		<comments>http://www.techper.net/2009/09/06/what-photography-challenges-can-do-to-you/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 19:53:45 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=242</guid>
		<description><![CDATA[Recently, I got inspired by a post on DPS about photography projects to spark ones creativity, and I committed myself to do one self portrait every day for 30 days in a row. Now, only 6 days into my challenge, I can speak for some of the great things following such a challenge do to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I got inspired by <a href="http://digital-photography-school.com/7-photography-projects-to-jumpstart-your-creativity">a post</a> on <a href="http://digital-photography-school.com/">DPS</a> about <a href="http://digital-photography-school.com/7-photography-projects-to-jumpstart-your-creativity">photography projects to spark ones creativity</a>, and I committed myself to do <a href="http://www.flickr.com/photos/polesen/sets/72157622084588287/">one self portrait every day for 30 days</a> in a row. Now, only 6 days into my challenge, I can speak for some of the great things following such a challenge do to you and your photography.</p>
<h2>Sparks Creativity</h2>
<p>Well, that one was kind of obvious, as that was one of the main reasons I started doing it. Nevertheless, it is pretty important.</p>
<p>Okay, I could have gone for a 365 days challenge, but that just seemed too much for me. Anyways, faced with the task of doing 30 self portraits in a row, one has to come up with some ideas. For starters, I have some myself, but what I also did (and do) was to go out there on the net, and see what others have done. Searching flickr for self portraits has proven really helpful, and sparked many ideas to new ways of doing portraits.</p>
<h2>Force Learning of Techniques</h2>
<p>Even though I have had a DSLR for some years now, it is only within the last copuple of months, that I bought myself a decent tripod. And even then, I haven&#8217;t taken that many shots using it yet. Going into self portraits, I am using my tripod for many of the shots. And already now, I feel much more confident using the tripod, setting it up, knowing what it can do and what it cannot, etc.</p>
<p>Another learning experience I am into currently, is setting up flashes. Not long ago, I bough some cheap wireless Cactus triggers and an extra cheap-o Hong-Kong flash. These are really fun to play with. More and more, I am starting to think lighting into my pictures. And that does not only go for the portaits, but for all shots. I acknowledge, that I should have done this long ago, but I haven&#8217;t.</p>
<h2>Opportunity to Gear Up</h2>
<p>We all know it. Photography is a gear sport <img src='http://www.techper.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  and I simply <em>had</em> to buy a wireless remote trigger for this project. Still eagerly awaiting it though, &#8230; from Hong-Kong again.</p>
<p>So, if you are into photography, I can only recommend <a href="http://digital-photography-school.com/7-photography-projects-to-jumpstart-your-creativity">taking up a photography challenge</a> of some sort. You can follow the results of my challenge in <a href="http://www.flickr.com/photos/polesen/sets/72157622084588287/">my flickr set here</a>.</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/R3ddzXH2Qi0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/09/06/what-photography-challenges-can-do-to-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dead Easy Informal Restrospectives</title>
		<link>http://www.techper.net/2009/08/22/dead-easy-informal-restrospectives/</link>
		<comments>http://www.techper.net/2009/08/22/dead-easy-informal-restrospectives/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 12:42:55 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Software Process]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[retrospective]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=239</guid>
		<description><![CDATA[Recently, I was introduced to restrospectives by a wise colleague of mine. Something I had heard about, but really not gotten around to using in my software development process yet. After participating, I found the retrospective really useful, hence I thought I would share.
A restrospective in an agile process is the simple idea about &#8220;stepping [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I was introduced to restrospectives by <a href="http://sthen.blogspot.com/">a wise colleague of mine</a>. Something I had heard about, but really not gotten around to using in my software development process yet. After participating, I found the retrospective really useful, hence I thought I would share.</p>
<p>A restrospective in an agile process is the simple idea about &#8220;stepping back and looking at the process&#8221;. What we did, was take out 30-45 minutes, where:</p>
<ol>
<li>the development team meet up</li>
<li>an <em>outsider</em> acts as facilitator</li>
</ol>
<p>I like agile processes for software development, but aside from that, I do not care much for a lot of process. I like my time spent on development &#8211; designing and writing code. This is also why I liked (and was surprised that) an agile restrospective can be so short and lightweight.</p>
<p>In the retrospective I participated in, I acted as the facilitator. As such, I was not a part of the development team. I had some, albeit little, knowledge of what they were developing, but that turned out to matter less. In short, this is what we did:</p>
<ul>
<li>on the morning of the retrospective day, we agreed on time to meet later</li>
<li>at that time, the team and I met up in a meeting room &#8211; pretty much blank and unprepared</li>
<li>I, the facilitator, started asking questions against the process</li>
<li>the team answered and discussed back and forth</li>
</ul>
<p>The whole thing took around 30 minutes. The questions asked were stuff like:</p>
<ul>
<li>what went well in the last sprint?</li>
<li>what did not go that well?</li>
<li>what to take with us and repeat in coming sprints?</li>
<li>what to do better in coming sprints?</li>
<li>&#8230;</li>
</ul>
<p>but the really nice thing is, that having a project-external facilitator proved to be really helpful in the way that:</p>
<ul>
<li>He (the external facilitator) will ask the questions, that lies as implicit knowledge in team members, and hence wouldn&#8217;t be touched upon. Like, when I asked &#8220;how do you do your etimates&#8221;, which led to a discussion on diffent ways to do estimation.</li>
<li>The team being retrospected can get new input from the knowledge of the facilitator &#8211; <em>and the other way around</em>, making the facilitator take something with him too (a true win-win)</li>
<li>The facilitator gets insight into how other projects in the organisation is run and what they do. This is knowledge and project-status sharing while retrospecting.</li>
</ul>
<p>All in all, I had the fealing that this was helpful. As a consequence of this, I repeated it on a project at a client where I was part of the team, and we brought in another party as facilitator &#8211; a developer on another project, but from the same organization.</p>
<p><strong>Some important rules I feel compelled to emphasize</strong>:</p>
<ol>
<li>Keep the retrospective short (less than 60 min), and</li>
<li>Come largely unprepared and resist documenting the output.</li>
</ol>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/eBdjXvmGV1E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/08/22/dead-easy-informal-restrospectives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Codecs Should Be Patent Free</title>
		<link>http://www.techper.net/2009/08/20/codecs-should-be-patent-free/</link>
		<comments>http://www.techper.net/2009/08/20/codecs-should-be-patent-free/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 12:33:23 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[codec]]></category>
		<category><![CDATA[DRM]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=236</guid>
		<description><![CDATA[In the times we currently live in, where the music, video and tele industries are in constant battle with the consumers, trying to make them pay, it should be obvious that patented codecs are a bad thing.
Now, do not get me wrong. I think everybody should pay for what they use. I think pirates are [...]]]></description>
			<content:encoded><![CDATA[<p>In the times we currently live in, where the music, video and tele industries are in constant battle with the consumers, trying to make them pay, it should be obvious that <em>patented codecs are a bad thing</em>.</p>
<p>Now, do not get me wrong. I think everybody should pay for what they use. I think pirates are a bad thing. But we need an open solution, that everyone are free to provide implementations of, without the need to buy specs or pay roalties for the use or implementation of a certain codec.</p>
<p>This is also why I think <a href="http://www.opera.com/">Opera</a> and <a href="http://www.mozilla.org/">The Mozilla Foundation</a> are <a href="http://www.infoq.com/news/2009/07/HTML-5-Video-Codec">doing the right thing</a> when speaking about which video codec to choose for the open web platform. Of course, either H.264 should be patent free or everybody should team up around an open, patent free codec like <a href="http://www.theora.org/">Ogg Theora</a>.</p>
<p>If not, consumers will pay. Less products/players to choose from. No free players or encoders. Platform locked features. Etc. For instance, currently I have no way to use the SF Anytime VOD service on my Mac, because they have choosen to tie it to the Windows Media format and player. I understand their choice, given the current availability of DRM solutions around.</p>
<p>If everybody would just team up on an open, patent free codec, like <a href="http://www.theora.org/">Theora</a>, I am sure there would be viable DRM solutions around too. Solutions that would play on all major platforms, and not just in one specific player on one specific platform. Instead of battling patents with eachother, the major players should battle on providing the best implementation and best products with the coolest features. Stuff that would really give the users a better experience.</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/Gl9SVCaRfi8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/08/20/codecs-should-be-patent-free/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Color Coding Source Files</title>
		<link>http://www.techper.net/2009/08/20/color-coding-source-files/</link>
		<comments>http://www.techper.net/2009/08/20/color-coding-source-files/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 12:09:34 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[IDEA]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=234</guid>
		<description><![CDATA[This upcoming feature about color coding file scopes in IntelliJ IDEA Maia looks awfully lot like a plugin idea I and a colleague had once. We had the idea, that different &#8220;layers&#8221; or &#8220;modules&#8221; of the source of an application could be color coded differently inside IDEA. This way, one would have a direct visual [...]]]></description>
			<content:encoded><![CDATA[<p>This <a href="http://blogs.jetbrains.com/idea/2009/07/more-colors-with-maia/">upcoming feature about color coding file scopes</a> in IntelliJ IDEA Maia looks awfully lot like a plugin idea I and a colleague had once. We had the idea, that different &#8220;layers&#8221; or &#8220;modules&#8221; of the source of an application could be color coded differently inside IDEA. This way, one would have a direct visual indication, if one for instance were editing core domain source or maybe some web layer source.</p>
<p>Nice to see JetBrains are thinking some of the same thoughts, considering we never followed through on our own idea way back.</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/pNW1CYTITa4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/08/20/color-coding-source-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IDEAs Deep Flex-Mojos Support</title>
		<link>http://www.techper.net/2009/08/20/ideas-deep-flex-mojos-support/</link>
		<comments>http://www.techper.net/2009/08/20/ideas-deep-flex-mojos-support/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 11:51:44 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[flex-mojos]]></category>
		<category><![CDATA[IDEA]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=232</guid>
		<description><![CDATA[If you are writing Flex applications using IntelliJ IDEA, you should also choose the Flexmojos maven plugin for building (if you build with maven, that is) and not the other alternatives. Why? Well, for once, it seems to be the best plugin around for flex building, but also because IDEA has deep support for it.
Currently, [...]]]></description>
			<content:encoded><![CDATA[<p>If you are writing Flex applications using IntelliJ IDEA, you should also choose the <a href="http://flexmojos.sonatype.org/">Flexmojos</a> maven plugin for building (if you build with maven, that is) and not the other alternatives. Why? Well, for once, it seems to be the best plugin around for flex building, but also because IDEA has deep support for it.</p>
<p>Currently, with the IDEA8, there is some support for importing POMs that use <a href="http://flexmojos.sonatype.org/">flexmojos</a>. With the upcoming Maia release, this <a href="http://blogs.jetbrains.com/idea/2009/08/flexmojos-in-dian/">integration is further enhanced</a>.</p>
<p>In <a href="http://blogs.jetbrains.com/idea/2009/08/flexmojos-in-dian/">this blogpost</a>, JetBrains explains how to import for POM, and there are some good pointers, that I need to remember for my next POM import. Most notably, enabling the generation of a compiler config file, to have the same settings used by IDEA as flexmojos do at compilation.</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/cY88m7mHRsg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/08/20/ideas-deep-flex-mojos-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple iPhoto Libraries</title>
		<link>http://www.techper.net/2009/08/15/multiple-iphoto-libraries/</link>
		<comments>http://www.techper.net/2009/08/15/multiple-iphoto-libraries/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 19:38:10 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[iphoto]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=227</guid>
		<description><![CDATA[Just discovered a cool feature of iPhoto (&#8217;08) that I did not know about. It can handle multiple iPhoto libraries.
Due to serious color-related limitations on the display of my wifes laptop, she currently imports her pictures onto my Mac. In addition, my oldest child is taking more and more pictures with her camera, all of [...]]]></description>
			<content:encoded><![CDATA[<p>Just discovered a cool feature of iPhoto (&#8217;08) that I did not know about. It can handle multiple iPhoto libraries.</p>
<p>Due to serious color-related limitations on the display of my wifes laptop, she currently imports her pictures onto my Mac. In addition, my oldest child is taking more and more pictures with her camera, all of which also goes onto my Mac. To avoid &#8220;polluting&#8221; my own iPhoto library, I wanted to create and manage separate libraries.</p>
<p>It turns out, that if you hold down the Option-key (Alt-key) while starting iPhoto, it will popup a dialog with the options to either create a new library or choose an existing one.</p>
<p><a href="http://www.techper.net/blog/wp-content/uploads/2009/08/multiple-iphoto-libs.png"><img class="alignnone size-medium wp-image-229" title="Multiple iPhoto Libraries" src="http://www.techper.net/blog/wp-content/uploads/2009/08/multiple-iphoto-libs-300x83.png" alt="" width="500" height="138" /></a></p>
<p>Nice!</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/z9w0DOCYwvs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/08/15/multiple-iphoto-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Debugging JAXP Internals</title>
		<link>http://www.techper.net/2009/06/25/tip-debugging-jaxp-internals/</link>
		<comments>http://www.techper.net/2009/06/25/tip-debugging-jaxp-internals/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 19:41:35 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[jaxp]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=224</guid>
		<description><![CDATA[In my latest battle with JAXP and Schema validation, I found out a little trick. It turns out, that implementation classes in JAXP use a debug flag to control stdout debugging. And this little flag is initialized from the system property jaxp.debug
So, starting your program, application server, &#8230; with -Djaxp.debug=true enables all sorts of initialization/bootstrap [...]]]></description>
			<content:encoded><![CDATA[<p>In my latest battle with <a href="http://www.techper.net/2009/06/25/jaxp-schema-validation-in-java5-and-java6/">JAXP and Schema validation</a>, I found out a little trick. It turns out, that implementation classes in JAXP use a debug flag to control stdout debugging. And this little flag is initialized from the system property <tt>jaxp.debug</tt></p>
<p>So, starting your program, application server, &#8230; with <tt>-Djaxp.debug=true</tt> enables all sorts of initialization/bootstrap debug information, that can be helpful.</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/Viv2g5g3O9Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/06/25/tip-debugging-jaxp-internals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JAXP Schema Validation in Java5 and Java6</title>
		<link>http://www.techper.net/2009/06/25/jaxp-schema-validation-in-java5-and-java6/</link>
		<comments>http://www.techper.net/2009/06/25/jaxp-schema-validation-in-java5-and-java6/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 19:23:59 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[jaxp]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=221</guid>
		<description><![CDATA[I have had a little battle with schema validation of XML documents and thought I would share it with the world.
I wrote the below code on Java5, thinking this was a way of validating a piece of XML against a schema definition. And indeed, it does work on Java5:

SchemaFactory sf = SchemaFactory.newInstance(&#34;http://www.w3.org/2001/XMLSchema&#34;);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setSchema(sf.newSchema(schemaUrl));
DocumentBuilder [...]]]></description>
			<content:encoded><![CDATA[<p>I have had a little battle with schema validation of XML documents and thought I would share it with the world.</p>
<p>I wrote the below code on Java5, thinking this was a way of validating a piece of XML against a schema definition. And indeed, it does work on Java5:</p>
<pre class="brush: java;">
SchemaFactory sf = SchemaFactory.newInstance(&quot;http://www.w3.org/2001/XMLSchema&quot;);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setSchema(sf.newSchema(schemaUrl));
DocumentBuilder parser = dbf.newDocumentBuilder();
parser.parse(new InputSource(new CharArrayReader(xml.toCharArray())));
</pre>
<p>Only thing is, this does not validate on Java6. In fact, if I install an <tt>ErrorHandler</tt> on the <tt>DocumentBuilder</tt> that simply rethrows exceptions, the parsing will complain about the very first attribute it meets, even though the Schema allows it.</p>
<p>It took me a while, to figure out what to do. In the process, I debugged into both Apache and the com.sun&#8230;apache packages, to try and find out what was different with parser behaviour on Java6. In the end, it proved really simple. I just hard to learn to actually use the javax.xml.validation API instead. An API made for, &#8230; validation. Duuh! Here is the code, that works on both Java5 and Java6:</p>
<pre class="brush: java;">
SchemaFactory sf = SchemaFactory.newInstance(&quot;http://www.w3.org/2001/XMLSchema&quot;);
Schema schema = sf.newSchema(schemaUrl);
Validator validator = schema.newValidator();
Source source = new StreamSource(new CharArrayReader(xml.toCharArray()));
validator.validate(source);
</pre>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/EfpgkQcxm_g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/06/25/jaxp-schema-validation-in-java5-and-java6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Acess Target Object Behind a Spring Proxy</title>
		<link>http://www.techper.net/2009/06/05/how-to-acess-target-object-behind-a-spring-proxy/</link>
		<comments>http://www.techper.net/2009/06/05/how-to-acess-target-object-behind-a-spring-proxy/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 14:07:15 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=217</guid>
		<description><![CDATA[When annotating spring managed beans with stuff like @Transactional, spring will behind the scenes produce code, that ensures that transaction logic is applied before and after your code. Depending on the configuration, this is often done using a JDK proxy, which is a dynamically generated class implementing the bean interfaces. This dynamically generated code will [...]]]></description>
			<content:encoded><![CDATA[<p>When annotating spring managed beans with stuff like <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/transaction/annotation/Transactional.html">@Transactional</a>, spring will behind the scenes produce code, that ensures that transaction logic is applied before and after your code. Depending on the configuration, this is often done using a <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/reflect/Proxy.html">JDK proxy</a>, which is a dynamically generated class implementing the bean interfaces. This dynamically generated code will apply its logic and then dispatch the call on to what is called the &#8220;target object&#8221;, that is, the object that has been proxied.</p>
<p>But sometimes, it would be nice to have direct access to the instance behind the proxy. In my case, it was in a test case, where I wanted to inject one dependency out of many, with a stub implementation. I am using the spring <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/test/jpa/AbstractJpaTests.html">AbstractJpaTests</a> class, which will inject proxied dependencies of beans into my testcase. All the dependencies of the injected, proxied class has also been setup by spring from the context, but I would like to set one specific of them to a stub implementation.</p>
<p>Problem is, the setters for dependency injection is not on the bean interface, and as such, I cannot call them on the bean instance. I also cannot cast it to the implementation class, because in my case, spring is applying the aspect using a JDK proxy, hence it is not the the implementation type, only the interface type.</p>
<p>Here is the code I ended up with for getting the target object:</p>
<pre class="brush: java;">
  @SuppressWarnings({&quot;unchecked&quot;})
  protected &lt;T&gt; T getTargetObject(Object proxy, Class&lt;T&gt; targetClass) throws Exception {
    if (AopUtils.isJdkDynamicProxy(proxy)) {
      return (T) ((Advised)proxy).getTargetSource().getTarget();
    } else {
      return (T) proxy; // expected to be cglib proxy then, which is simply a specialized class
    }
  }
</pre>
<p>I found out (by debugger inspection), that the proxy class that spring generates implements <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/aop/framework/Advised.html">Advised</a>, which contains the <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/aop/framework/Advised.html#getTargetSource()">getTargetSource()</a> method. And on a <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/aop/TargetSource.html">TargetSource</a>, one can <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/aop/TargetSource.html#getTarget()">get the actual target</a>. I am not sure if all spring proxies always implement <tt>Advised</tt>, but it seems to do in my code <img src='http://www.techper.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I am using the code like this:</p>
<pre class="brush: java;">
  @Override
  protected void onSetUp() throws Exception {
    getTargetObject(fooBean, FooBeanImpl.class).setBarRepository(new MyStubBarRepository());
  }
</pre>
<p>One question: The <tt>targetClass</tt> parameter on the above <tt>getTargetObject</tt> method is not used within the method itself. But I cannot find another good way to pass the type paramter into the method. Can you?</p>
<p>Another question: Are there any other good ways, from a test, to inject one dependency on a spring managed bean?</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/xkXwHPeEwCU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/06/05/how-to-acess-target-object-behind-a-spring-proxy/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Auto-Grabbing Dependencies with Groovy Scripts</title>
		<link>http://www.techper.net/2009/05/18/auto-grabbing-dependencies-with-groovy-scripts/</link>
		<comments>http://www.techper.net/2009/05/18/auto-grabbing-dependencies-with-groovy-scripts/#comments</comments>
		<pubDate>Mon, 18 May 2009 19:44:49 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=212</guid>
		<description><![CDATA[Now here&#8217;s something cool for your once-in-while, small, groovy sysadmin scripts&#8230;
When you write a groovy script, chances are that, when it gets just a little bigger than damn-small, it will require some third party dependencies, to be able to run properly. So, what do you do? You end up either a) package dependent jars in [...]]]></description>
			<content:encoded><![CDATA[<p>Now here&#8217;s something cool for your once-in-while, small, groovy sysadmin scripts&#8230;</p>
<p>When you write a groovy script, chances are that, when it gets just a little bigger than damn-small, it will require some third party dependencies, to be able to run properly. So, what do you do? You end up either a) package dependent jars in a lib folder and dist as a zip with a script that can build a classpath or, b) re-package all dependencies into one big runnable jar including both dependencies and your not so little script anymore.</p>
<p>But now, there&#8217;s &#8220;Grab&#8221; <img src='http://www.techper.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre class="brush: java;">
@Grab(group='com.ancientprogramming.fixedformat4j', module='fixedformat4j', version='1.2.2')
class Grabber {
  Grabber() {
    println &quot;Code that is supposed to use fixedformat4j&quot;
  }
}
new Grabber()
</pre>
<p>The &#8220;Grabber&#8221; class above is an example of a class, which is pretending it needs fixedformat4j in its classpath. When compiled, the groovy compiler will add code to lookup and download the dependencies from some repository (maven, ivy). When run, this generated code is executed, dependencies located and downloaded (if needed), and your script is then executed with access to the downloaded classes/jars.</p>
<p>After trying it out, a little digging around made me discover, that the downloaded dependencies end up in <tt>$HOME/.groovy/grapes</tt></p>
<p>Cool?</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/dtw71l4acmY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/05/18/auto-grabbing-dependencies-with-groovy-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile Time Meta Programming in Groovy</title>
		<link>http://www.techper.net/2009/05/18/compile-time-meta-programming-in-groovy/</link>
		<comments>http://www.techper.net/2009/05/18/compile-time-meta-programming-in-groovy/#comments</comments>
		<pubDate>Mon, 18 May 2009 19:07:17 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=207</guid>
		<description><![CDATA[Today at gr8conf&#8211;which by the way is a grait conference&#8211;I heard Guillaume LaForge, talk about the new stuff in groovy 1.6. One of those being AST transformations or what they call compile time meta programming.
Through annotations, one is able to tell the compiler to change the code, before it is producing actual byte-code output from [...]]]></description>
			<content:encoded><![CDATA[<p>Today at <a href="http://gr8conf.org/">gr8conf</a>&#8211;which by the way is a grait conference&#8211;I heard Guillaume LaForge, talk about the new stuff in groovy 1.6. One of those being AST transformations or what they call compile time meta programming.</p>
<p>Through annotations, one is able to tell the compiler to change the code, before it is producing actual byte-code output from the AST. One example is the ever present Singleton &#8220;pattern&#8221;, which is implemented as an annotation, like this:</p>
<pre class="brush: java;">
@Singleton
public class SingletonTest {
}
new SingletonTest()
</pre>
<p>When run, this code will produce an exception at runtime, like this:</p>
<pre><code>
Caught: java.lang.RuntimeException: Can't instantiate singleton SingletonTest. Use SingletonTest.instance
  at SingletonTest.&lt;init&gt;(SingletonMain.groovy)
  at SingletonMain.run(SingletonMain.groovy:4)
</code></pre>
<p>What happens here is, that the compiler is producing a singleton from SingletonTest, putting a property &#8220;instance&#8221; on the class, at compile-time.</p>
<p>I guess stuff like this are making the job even harder for IDE developers. Not only do they not get as much type information to work with as with statically typed languages, but also shall they know about meta-programming like this, that changes the code when compiled. The code above does not color red in IDEA (<a href="http://www.jetbrains.net/jira/browse/IDEA-22955">yet</a>).</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/YjNfwfJH9uk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/05/18/compile-time-meta-programming-in-groovy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open RAWs from iPhoto in External Editor</title>
		<link>http://www.techper.net/2009/05/14/open-raws-from-iphoto-in-external-editor/</link>
		<comments>http://www.techper.net/2009/05/14/open-raws-from-iphoto-in-external-editor/#comments</comments>
		<pubDate>Thu, 14 May 2009 19:35:55 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[elements]]></category>
		<category><![CDATA[iphoto]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=202</guid>
		<description><![CDATA[I finally got my Adobe Photoshop Elements for Mac and of course jumped right into iPhoto to try and open an image in the great Camera Raw converter.
First thing to do was to go into iPhoto preferences &#8220;General&#8221; and set Photoshop Elements as the external editor program. Nice and easy. I then tried to open [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got my Adobe Photoshop Elements for Mac and of course jumped right into iPhoto to try and open an image in the great Camera Raw converter.</p>
<p>First thing to do was to go into iPhoto preferences &#8220;General&#8221; and set Photoshop Elements as the external editor program. Nice and easy. I then tried to open my photos in external editor and sure enough, photoshop elements opened up, &#8230; with the JPEG image <img src='http://www.techper.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p><em>Here is the tip</em>: You need to set the &#8220;Use RAW when using external editor&#8221; inside iPhoto preferences &#8220;Advanced&#8221;. Like this pictures shows:</p>
<p><a href="http://www.techper.net/blog/wp-content/uploads/2009/05/iphoto-advanced-prefs.jpg"><img class="alignnone size-medium wp-image-203" title="iPhoto Preferences \&quot;Advanced\&quot;" src="http://www.techper.net/blog/wp-content/uploads/2009/05/iphoto-advanced-prefs-300x156.jpg" alt="" width="300" height="156" /></a></p>
<p>Only thing I need now, is to find out how to make iPhoto notice the edits in Photoshop Elements when I come back. Anyone know how to do that?</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/cXQwenHs6R4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/05/14/open-raws-from-iphoto-in-external-editor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oracle, WebLogic and “The Network Adapter could not establish the connection”</title>
		<link>http://www.techper.net/2009/04/28/oracle-weblogic-and-the-network-adapter-could-not-establish-the-connection/</link>
		<comments>http://www.techper.net/2009/04/28/oracle-weblogic-and-the-network-adapter-could-not-establish-the-connection/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 18:47:02 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=199</guid>
		<description><![CDATA[Today I battled a periodic error, where my development WebLogic would not start, due to connection problems against the database. It was kinda strange, because other Java tools like DbVisualizer had no trouble. The exception:
Error starting JDBC transaction.  Cause: java.sql.SQLException: Io-exeption: The Network Adapter could not establish the connection.
..turned out to lead me in [...]]]></description>
			<content:encoded><![CDATA[<p>Today I battled a periodic error, where my development WebLogic would not start, due to connection problems against the database. It was kinda strange, because other Java tools like DbVisualizer had no trouble. The exception:</p>
<p><code>Error starting JDBC transaction.  Cause: java.sql.SQLException: Io-exeption: The Network Adapter could not establish the connection.</code></p>
<p>..turned out to lead me in the wrong direction.</p>
<p>I have had these kind of exceptions before, saying &#8220;The Network Adapter could not establish the connection&#8221;, and it has always been a problem of network connectivity. But this time, it was due to a driver misconfiguration. Or at least, an update of the <tt>ojdbc14.jar</tt> inside weblogic <tt>lib</tt> directory made the problem go away.</p>
<p>I do not know which version of <tt>ojdbc14.jar</tt> that came with my weblogic 8.1, but I dropped a v10.2.0.2.0 there, and it worked.</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/y2MMmukYt14" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/04/28/oracle-weblogic-and-the-network-adapter-could-not-establish-the-connection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex DataGrid and Image as ItemRenderer</title>
		<link>http://www.techper.net/2009/04/27/flex-datagrid-and-image-as-itemrenderer/</link>
		<comments>http://www.techper.net/2009/04/27/flex-datagrid-and-image-as-itemrenderer/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 19:20:43 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Rich Internet Applications]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=196</guid>
		<description><![CDATA[Just a quick note or advice.
When using the Image component as a drop-in item renderer in a Flex DataGrid, there are things to remember or know about sizing. You can give the individual columns a width setting of their own, but the row height is a little different:

either (a) set rowHeight of the grid, which [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note or advice.</p>
<p>When using the <a href="http://livedocs.adobe.com/flex/3/langref/mx/controls/Image.html">Image</a> component as a drop-in item renderer in a Flex <a href="http://livedocs.adobe.com/flex/3/langref/mx/controls/DataGrid.html">DataGrid</a>, there are things to remember or know about sizing. You can give the individual <em>columns</em> a <tt>width</tt> setting of their own, but the row height is a little different:</p>
<ul>
<li>either (a) set <tt>rowHeight</tt> of the grid, which will render all rows same height no matter the dimensions of the images&#8230;</li>
<li>or, (b) set <tt>variableRowHeight</tt> to <tt>true</tt>, in which can the dimensions of the images will determine the height of each individual row</li>
</ul>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/lRcpk7Rek1E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/04/27/flex-datagrid-and-image-as-itemrenderer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IDEA Is Back to Being Great!</title>
		<link>http://www.techper.net/2009/04/04/idea-is-back-to-being-great/</link>
		<comments>http://www.techper.net/2009/04/04/idea-is-back-to-being-great/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 18:59:11 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[IDEA]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=193</guid>
		<description><![CDATA[Some time ago, I got frustrated with working with IDEA flex support. I had some complaints about the quality of the flex support in IDEA7 and 8, and I let the steam come out in that blog entry.
Well, just to be fair, I thought I would post a short blog entry about how things have [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago, I <a href="http://www.techper.net/2008/09/16/are-you-using-intellij-idea-flex-support/">got frustrated</a> with working with IDEA flex support. I had some complaints about the quality of the flex support in IDEA7 and 8, and <a href="http://www.techper.net/2008/09/16/are-you-using-intellij-idea-flex-support/">I let the steam come out in that blog entry</a>.</p>
<p>Well, just to be fair, I thought I would post a short blog entry about how things have changed.</p>
<p>Since then, many of the issues I and others have reported in the IDEA Feedback Jira have been solved, sometimes within hours of them being reported. Currently, I am really enjoying Flex development using IDEA, and I am doing it day in and day out.</p>
<p>What is really nice is, that when I am <em>not</em> doing Flex code, I am doing backend code for the Flex client. And that code is Java. And IDEA never left being the greatest IDE for Java development. Now, it is also great for Flex.</p>
<p>Sincerely, an IDEA fan boy! <img src='http://www.techper.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/T58LyavRouI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/04/04/idea-is-back-to-being-great/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Where is that damn oblique arrow on my Mac?</title>
		<link>http://www.techper.net/2009/04/04/where-is-that-damn-oblique-arrow-on-my-mac/</link>
		<comments>http://www.techper.net/2009/04/04/where-is-that-damn-oblique-arrow-on-my-mac/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 18:48:41 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IDEA]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=187</guid>
		<description><![CDATA[Here&#8217;s a question for the reader: When using IDEA on my MacBook Pro, I cannot find the key combination to &#8220;goto end of file&#8221; or &#8220;goto top of file&#8221;. It used to be Ctrl-End or Home on PC, as far as I remember. But, MacBook Pro users do not need Home and End keys, &#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a question for the reader: When using IDEA on my MacBook Pro, I cannot find the key combination to &#8220;goto end of file&#8221; or &#8220;goto top of file&#8221;. It used to be Ctrl-End or Home on PC, as far as I remember. But, MacBook Pro users do not need Home and End keys, &#8230; or so it seems.</p>
<p>So, I went into IDEA settings for keyboard bindings and found what the picture below shows:</p>
<div class="mceTemp">
<dl id="attachment_188" class="wp-caption alignnone" style="width: 491px;">
<dt class="wp-caption-dt"><a href="http://www.techper.net/blog/wp-content/uploads/2009/04/idea-keymap.png"><img class="size-full wp-image-188" title="idea-keymap" src="http://www.techper.net/blog/wp-content/uploads/2009/04/idea-keymap.png" alt="IDEA Keymap settings" width="481" height="214" /></a></dt>
</dl>
</div>
<p>First thing: I assume, that &#8220;Move Caret to Text End&#8221; is what I want, as in, other words for &#8220;goto file end&#8221;. Am I right?</p>
<p>Next thing: What the heck is that oblique arrow doing in the shortcut <img src='http://www.techper.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I looked hard but could not find it on my MacBook Pro keyboard:</p>
<p><a href="http://www.techper.net/blog/wp-content/uploads/2009/04/macbookpro-keyboard.jpg"><img class="alignnone size-full wp-image-189" title="macbookpro-keyboard" src="http://www.techper.net/blog/wp-content/uploads/2009/04/macbookpro-keyboard.jpg" alt="" width="500" height="169" /></a></p>
<p>I then got to looking on the external keyboard for the mac of a colleague of mine, and spotted the keys on that keyboard, like here:</p>
<p><a href="http://www.techper.net/blog/wp-content/uploads/2009/04/large-external-mac-keyboard.jpg"><img class="alignnone size-full wp-image-190" title="large-external-mac-keyboard" src="http://www.techper.net/blog/wp-content/uploads/2009/04/large-external-mac-keyboard.jpg" alt="" width="500" height="398" /></a></p>
<p>Is there any way for me to emulate these keybindings on my MacBook Pro, using some kind of weird and hard to remember combination of shift, fn, ctrl, option, arrows, command key or something completely different like a secret trackpad gesture?</p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/Lmbx4VC2W14" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/04/04/where-is-that-damn-oblique-arrow-on-my-mac/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>IDEA fucked up indices</title>
		<link>http://www.techper.net/2009/04/03/idea-fucked-up-indices/</link>
		<comments>http://www.techper.net/2009/04/03/idea-fucked-up-indices/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 12:10:10 +0000</pubDate>
		<dc:creator>polesen</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[IDEA]]></category>

		<guid isPermaLink="false">http://www.techper.net/?p=184</guid>
		<description><![CDATA[Since v7 (I think), IDEA has had some internal indexing strategy of the files in projects. These indices  somehow got messed up in my current Diana install. I started getting exceptions like:
java.lang.NullPointerException
        at com.intellij.psi.stubs.StubTree.(StubTree.java:9)
        at com.intellij.lang.javascript.index.JSPackageIndex$2.map(JSPackageIndex.java:60)
     [...]]]></description>
			<content:encoded><![CDATA[<p>Since v7 (I think), IDEA has had some internal indexing strategy of the files in projects. These indices  somehow got messed up in my current Diana install. I started getting exceptions like:</p>
<pre><code>java.lang.NullPointerException
        at com.intellij.psi.stubs.StubTree.<init>(StubTree.java:9)
        at com.intellij.lang.javascript.index.JSPackageIndex$2.map(JSPackageIndex.java:60)
        at com.intellij.lang.javascript.index.JSPackageIndex$2.map(JSPackageIndex.java:91)
        at com.intellij.util.indexing.MapReduceIndex.mapNew(MapReduceIndex.java:82)
        ...
</code></pre>
<p>and</p>
<pre><code>java.lang.AssertionError
        at com.intellij.util.io.storage.Storage.deleteRecord(Storage.java:315)
        at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.b(FSRecords.java:213)
        at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.a(FSRecords.java:296)
        ...
</code></pre>
<p>In addition, one file showed in IDEA to have strange content, looking like it came from another sourcefile. Though, when i looked into the file from the console, it wasn&#8217;t changed at all.</p>
<p>I ended up solving this by closing down IDEA and deleting its cache files (on my Mac stored in <tt>~Library/Caches/IntelliJIDEA8x/caches</tt>).</p>
<p>Starting IDEA again and opening my project, it rebuilt indices and everything seems to work again <img src='http://www.techper.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/TechPer/~4/J1YG7EbtEsQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techper.net/2009/04/03/idea-fucked-up-indices/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
