<?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>marcus ramberg</title>
	<atom:link href="http://marcus.nordaaker.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://marcus.nordaaker.com</link>
	<description>nordaaker</description>
	<lastBuildDate>Mon, 07 May 2012 15:29:57 +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>Makers</title>
		<link>http://marcus.nordaaker.com/makers/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=makers</link>
		<comments>http://marcus.nordaaker.com/makers/#comments</comments>
		<pubDate>Mon, 07 May 2012 15:29:57 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://marcus.nordaaker.com/?p=3661</guid>
		<description><![CDATA[You can start making something in seconds. One simple idea is all you need before your brain automatically explores problems, solutions, and dreams. Turning that idea into something tangible and wonderful is harder. You need structure, strategies, people, hard work. The software world is young and we are still figuring out the most basic processes [...]]]></description>
			<content:encoded><![CDATA[<p><strong>You can start making something in seconds.<br />
One simple idea is all you need before your brain<br />
automatically explores problems, solutions, and dreams.<br />
Turning that idea into something tangible and wonderful is harder.<br />
You need structure, strategies, people, hard work.</strong></p>
<p>The software world is young and we are still figuring out the most basic processes of the craft. For instance, we tend to label ourself architects or designers, inspired by people who build houses or work in mass production.</p>
<p>Designers tend to paint pictures, while engineers tend to make diagrams describing what they want to make. Both of these approaches are fundamentally flawed in software. They make a lot of sense in the trades that inspired them, where the cost of change is high and getting it right the first time is essential. Making software is pretty much the opposite.</p>
<p>With software it&#8217;s so easy to reiterate that there&#8217;s no need to choose between ideas on the drawing board. You can simply build it and see for yourself how it would work. As long as you always make the <strong>simplest possible version</strong>, you can quickly verify if it&#8217;s a good idea or not, and it can be rather efficient too.</p>
<p>I&#8217;m not saying that you shouldn&#8217;t use Photoshop or OmniGraffle in the process of making. They are useful tools for making your software better. Refining it, making sure they play well with others. However, I believe that a lot of the<br />
&#8216;design processes&#8217; that go on now are flawed.</p>
<p>In fact, I would like to remove all labels. Take a big magic marker, cross out &#8216;engineer&#8217; or &#8216;designer&#8217;, and write one word on all of them:</p>
<p><strong>MAKER</strong></p>
<p>I sometimes hear people say &#8216;everything is design&#8217;. I do agree that everyone who is involved in making software needs to care about what it does, how it works, how it feels, and so on. The problem in my mind is that this definition<br />
makes &#8216;design&#8217; too generic.</p>
<p>It also tends to exclude programmers and gives the impression that they don&#8217;t need to care about the look and behaviour of the end result. In my experience, this pattern leads to massive amounts of suck.</p>
<p>Stop thinking about programmers and designers. We&#8217;re all makers, so don&#8217;t feel limited by such a poorly placed label. You&#8217;re job is to <strong>make</strong> the software. I don&#8217;t care what hats you wear as long as you&#8217;re contributing. We should always strive to learn more skills, to become better makers.</p>
<p>People with a classic IT background should learn more about writing, colors and traditional design principles. Those who possess these skills should learn more about markup, CSS, Interface Builder, or maintaining resources in version control systems and project files. The more you know about how software is made, the better you can help making it great.</p>
<p>This does not mean that I advocate design by committee. I do believe all software needs a director; one who maintains the vision of what we are making, and who instructs and directs the rest of the team. This person is ultimately<br />
responsible for the shape of the product. But without good makers, that person is doomed to fail.</p>
<p><strong>Let us all become better makers.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://marcus.nordaaker.com/makers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Onion browser &#8211; TOR on IOS</title>
		<link>http://marcus.nordaaker.com/onion-browser-tor-on-ios/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=onion-browser-tor-on-ios</link>
		<comments>http://marcus.nordaaker.com/onion-browser-tor-on-ios/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 07:08:23 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://marcus.nordaaker.com/?p=3655</guid>
		<description><![CDATA[The Onion Router is a internet project that aims to anonymize your traffic by routing it through a darknet with various exit points to the Internet. Normally you would have to install a browser proxy on your machine to access TOR, but now there&#8217;s a browser available for the iPad and iPhone. Of course, I [...]]]></description>
			<content:encoded><![CDATA[<p>The Onion Router is a internet project that aims to anonymize your traffic by routing it through a darknet with various exit points to the Internet. Normally you would have to install a browser proxy on your machine to access TOR, but now there&#8217;s a <a href="http://itunes.apple.com/us/app/onion-browser/id519296448?mt=8">browser available for the iPad and iPhone</a>.</p>
<p>Of course, I had to test it by checking out the <a href="http://en.wikipedia.org/wiki/Silk_Road_(marketplace)">Silk Road</a>, a much publicized &#8220;Amazon of illegal drugs&#8221; that only exists on the TOR network.</p>
<p><center><a href='http://marcus.nordaaker.com/assets/6A8B0B7F-6DB1-4BF7-8453-87DBB705F9940.jpg'><img src='http://marcus.nordaaker.com/assets/6A8B0B7F-6DB1-4BF7-8453-87DBB705F9940.jpg' border='0' width='281' height='210' style='margin:5px'/></a></center></p>
]]></content:encoded>
			<wfw:commentRss>http://marcus.nordaaker.com/onion-browser-tor-on-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great Tmux config.</title>
		<link>http://marcus.nordaaker.com/great-tmux-config/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=great-tmux-config</link>
		<comments>http://marcus.nordaaker.com/great-tmux-config/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 00:18:12 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[tmux]]></category>

		<guid isPermaLink="false">http://marcus.nordaaker.com/?p=3650</guid>
		<description><![CDATA[I`ve been working a bit on the iPad using Prompt, tmux and vim with a bluetooth keyboard, and this .tmux.conf is essential for efficient work. &#160; &#160; &#160; &#160;]]></description>
			<content:encoded><![CDATA[<p> I`ve been working a bit on the iPad using Prompt, tmux and vim with a bluetooth keyboard, and <a href="http://dev.gentoo.org/~wired/conf/tmux.conf">this .tmux.conf</a> is essential for efficient work.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://marcus.nordaaker.com/great-tmux-config/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Oslo Skyline &amp; Opera</title>
		<link>http://marcus.nordaaker.com/new-oslo-skyline-opera/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-oslo-skyline-opera</link>
		<comments>http://marcus.nordaaker.com/new-oslo-skyline-opera/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 23:15:52 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Picture]]></category>
		<category><![CDATA[landscape]]></category>
		<category><![CDATA[oslo]]></category>

		<guid isPermaLink="false">http://marcus.nordaaker.com/?p=3647</guid>
		<description><![CDATA[&#160;]]></description>
			<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;"><a href="http://marcus.nordaaker.com/wp-content/uploads/2012/03/wpid-Photo-2137-4.-mars-2012.jpg" target="_blank" style="margin-left: 1em; margin-right: 1em;"><img src="http://marcus.nordaaker.com/wp-content/uploads/2012/03/wpid-Photo-2137-4.-mars-2012.jpg" id="blogsy-1332112480603.2722" class="aligncenter" alt="Oslo Skyline" width="500" height="333"/></a></div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://marcus.nordaaker.com/new-oslo-skyline-opera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Mojolicious 2011.</title>
		<link>http://marcus.nordaaker.com/a-mojolicious-2011/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-mojolicious-2011</link>
		<comments>http://marcus.nordaaker.com/a-mojolicious-2011/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 22:45:48 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[2011]]></category>
		<category><![CDATA[Mojolicious]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://marcus.nordaaker.com/?p=3634</guid>
		<description><![CDATA[A new year is upon us, and I figured this would be good time to take a look at the improvements in the Mojolicious framework in the last year. There has been a dazzling number of releases, 122 in fact, including the current release, 2.42. Some of the releases were mere bugfix releases, with nothing [...]]]></description>
			<content:encoded><![CDATA[<p><em>A new year is upon us, and I figured this would be good time to take a look at the improvements in the Mojolicious framework in the last year. There has been a dazzling number of releases, 122 in fact, including the current release, 2.42</em>.</p>
<p>Some of the releases were mere bugfix releases, with nothing noteworthy to add, but I&#8217;ll try going through the major releases in the last year. When this year started, we already had a robust MVC Web framework, and through the year you will note that a lot of the work has gone into building a first class real time web framework. 2010 ended with  1.0,  codename Snow Flake, released 26th of december 2010. 1.01 fixed a couple of bugs, and added TLS Authentication.</p>
<p>The next major release, code name &#8220;Smiling Cat Face With Heart-Shaped Eyes&#8221;, was released on 2011-02-14. This release deprecated wildcard route names in favor of automatically generated default names for all routes. There were several new experimental features, including a more Moose-like attribute generator, on_start attribute for Mojo::Client, support for setting the user agent, mode-specific built-in templates to easily add a production error template, and CSS selectors in the &#8216;get&#8217; command. There were also a new image helper, and support for session cookies.</p>
<p>The next major change was in 1.13, which deprecated the ailing Mojo::Client for a much improved Mojo::UserAgent, which handled async requests in a much more coherent fashion.There were also features added like IPV6 support and the default Fail Raptor added in 1.17 and argument localization in 1.18 before 1.3 which was released the 5th of may1.4. </p>
<p>1.3 was codenamed &#8220;Tropical Drink&#8221;, and tried to deprecate 5.8 support, 5.8 no longer being supported by the Perl core developers, and having serious security issues. However, due to RedHat users with old Perls, we had to temporarily revert that decision, before finally removing 5.8 support in release 2.0; Mojo::Base was also updated to enable 5.10 features. This release also added an experimental &#8220;before_render&#8221; hook and exposed the hooks in Lite apps.</p>
<p>1.4, &#8220;Smiling Face With Sunglasses&#8221;, followed about a month later, 2nd of june, and contained a major update to the Mojo::DOM parser, adding an &#8216;append&#8217; method, direct hash access for attributes, and child element accessor, as well as collections. The release also added an &#8216;eval&#8217; command, improved long poll support and started serializing sessions as JSON, which is more efficient than Storable.</p>
<p>Several minor releases followed, including 1.42 allowing status as an argument to render and 1.44 adding <a href="http://www.youtube.com/watch?v=6bbIBs0P2t0">Morbo</a>, the fearsome restarting development server. (DOOOM) this release also added an application mount plugin. 1.47 included a new callback condition as well as a host condition for the routes. 1.53 added format support to Mojo::Log and 1.57 dramatically improved <a href="http://www.youtube.com/watch?v=8AOfbnGkuGc">Hypnotoad</a> hot restart, allowing you a hot restart just by running <a href="http://www.youtube.com/watch?v=8AOfbnGkuGc">Hypnotoad</a> again, as well as adding a &#8212;stop parameter.</p>
<p>1.65 changed the IOLoop to be event based, and added support for using the EV event loop, allowing for great performance and compability with AnyEvent modules. In 1.69, IOLoop::Trigger allowed grouping nonblocking requests easily, and Mojo::DOM added healing support, allowing it to parse most markup that renders in a browser.</p>
<p>To make Mojolicious more RESTish, 1.73 added the experimental respond_to renderer, as well as type detection. 1.78 added a cpanify command and plugin generator to allow easy plugin writing and sharing. 1.80 normalized the casing of plugins, and 1.82 added a grep method to collections, later joined by &#8216;first&#8217;, &#8216;reverse,&#8217;,shuffle&#8217; and &#8216;sort&#8217;.</p>
<p>Web socket testing was added in 1.86, 1.87 added an app command and a &#8216;t&#8217; helper, and 1.99 adding group support to Lite apps, as well as binary support for web sockets.</p>
<p>All this as well as several minor features, bugfixes and documentation updates adds up to Mojolicious 2.0, code named &#8220;Leaf Fluttering In Wind&#8221; which was released 17th of october. It also added  slice support to collections and completed the transition from callbacks to events. Web socket support was updated to ietf-17. </p>
<p>2.01 followed two days later, adding upgrade and part events, and 2.03 adding new experimental ietf http status codes. 2.10 added a websocket send_frame method and frame event, 2.19 revised the hook system to use events, and 2.27 was a major streamlining of the core IOLoop, deprecating several methods.</p>
<p>2.29 added chained events from the plugin system, and a new around_dispatch hook. 2.35 added etag support to Mojo Headers, and 2.37 marked the change of Mojolicious to being maintained by a core team, adding  me(Marcus Ramberg), Glen Hinkle and Abhijit Menon-Sen to the core. This release also worked around a serious memory leak in Perl itself.</p>
<p>2.39 was released just before the holidays, and updated the user agent to use an &#8216;error&#8217; event, as well as exposing &#8216;local_address&#8217; and adding a close method to IOLoop Streams. 2.40 was released on the 24th, adding JSON Pointer support, and finally 2.41 was released on the 28th stabilizing many of the experimental features mentioned above, and allowing session expiry to be turned off.</p>
<p>We now believe the real time part of Mojolicious to be as robust as the MVC part, and expect less frequent releases of the framework in 2012. If you want to learn more about the features in Mojolicious, check out our <a href="http://mojolicio.us/perldoc/Mojolicious/Guides">excellent guides</a>.</p>
<h3>Happy New Year, and thanks for 2011.</h3>
<p>[<em>All the information in this document was extracted from the <a href="https://metacpan.org/source/TEMPIRE/Mojolicious-2.41/Changes">Mojo Changelog</a>.</em>]</p>
]]></content:encoded>
			<wfw:commentRss>http://marcus.nordaaker.com/a-mojolicious-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beautiful Open Source</title>
		<link>http://marcus.nordaaker.com/beautiful-open-source/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=beautiful-open-source</link>
		<comments>http://marcus.nordaaker.com/beautiful-open-source/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 00:12:33 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[webos]]></category>

		<guid isPermaLink="false">http://marcus.nordaaker.com/?p=3624</guid>
		<description><![CDATA[Earlier today, HP announced that they are open sourcing webOS, the mobile OS that they bought from Palm, inspired by BeOS, which Palm acquired a few years before that. Of course, these news comes as a consequence of HP canning their hardware platform, ending their tablet ambitions in a spectacular fire sale where they lost [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier today, <a href="http://www.hp.com/hpinfo/newsroom/press/2011/111209xa.html">HP announced</a> that they are open sourcing webOS, the mobile OS that they bought from Palm, inspired by BeOS, which Palm acquired a few years before that. Of course, these news comes as a consequence of HP canning their hardware platform, ending their tablet ambitions in a spectacular fire sale where they lost money on every device sold.</p>
<p>I&#8217;ve been a fan of the simplicity and elegance of webOS for a while. I even used BeOS back in it&#8217;s day. I didn&#8217;t really like the HP devices tho, and for me this is the optimal outcome. Provided that HP choses a liberal license, this means that webOS might actually get some adoption. </p>
<p>I even belive webOS would make a foundation for a nice Linux based desktop OS (Something Linux desperately needs), if provisions were made for a usable keyboard and touchpad multitouch gestures. Some of the leading internet pundits are less optimistic about this move than I am tho. John Gruber of Daring Fireball <a href="http://daringfireball.net/linked/2011/12/09/hp-webos">writes</a>:</p>
<blockquote><p>I hope I’m wrong, but I think this is just the difference between putting your dog down and letting it free on a distant mountain road.
</p></blockquote>
<p>Matt Gemmel takes it <a href="http://feedproxy.google.com/~r/mattgemmell/rss2/~3/vOQ7reqFIFU/">even further</a>:</p>
<blockquote><p> Want to know what happens when you make an operating system open? The same thing as when you leave your car open: sooner or later, it ends up smelling like a urinal.</p></blockquote>
<p>Which I find a rather ridicolous notion. Certainly, a lot of Open Source apps were made by neckbeards with little or no design skills. However, WebOS is already very well designed, and even contains a nice style guide for apps. Just look how nice this Open Source twitter client for WebOS looks (<a href="https://github.com/rmxdave/phnx">phnx</a>):</p>
<p><a href="https://github.com/rmxdave/phnx"><img src="http://marcus.nordaaker.com/wp-content/uploads/2011/12/phnx.png" alt="" title="phnx" width="650" height="480" class="aligncenter size-full wp-image-3625" /></a></p>
<p>The distinguished interface style is already there, with gui widgets for app developers to use, which makes it more likely that usable and user friendly apps may be developed by an open source community. From running <a href="http://iusethis.com">iusethis.com</a>, I&#8217;ve noticed that when there&#8217;s already a defined style like on the mac, there&#8217;s a better chance of getting well designed open source apps.</p>
<p>Just look at <a href="http://osx.iusethis.com/hp/quicksilver">QuickSilver</a>, <a href="http://osx.iusethis.com/hp/cyberduck">Cyberduck</a>, <a href="http://osx.iusethis.com/hp/transmission">Transmission</a> and even <a href="http://osx.iusethis.com/hp/adium">Adium</a>, widely used open source mac apps that are far ahead of their equivalent Linux-based apps. Being open source doesn&#8217;t have to mean design by comittee. It&#8217;s not like closed source is a guarantee of good design either.</p>
<p>What WebOS does need  is improved performance, stability, better apis, and wider availability. The first things are absolutely things that we beardy Unix types are quite good at. Obviously Open Sourcing a codebase also means that professionals from several companies contribute, just look at the kind of boost this has given to Webkit. While on the subject of WebKit, the fact that WebOS apps are made using open web technologies is a very good fit for the open source community as well. Some of us that have been developing for the IOS platform are secretly yearning for a equally good open platform. Android is certainly not it.</p>
<p>Hopefully Open Sourcing with a liberal license will  help with the last point too. I specially see Chinese cell phone producers as likely to pick up this opportunity, but possibly some of the existing android players as well. I&#8217;m even hoping there might be a distribution available for the iPad, and as I mentioned earlier, I am hoping to see webOS on prominent Linux distributions in the near future..</p>
<p>It&#8217;s not like this is a big closed source platform that is totally alien to the Open Source community. webOS already runs on linux, and uses a lot of the same open source technology we know and love (just check the open source information in the OS to verify this).</p>
<p>Hopefully HP will allow the current team to steward the OS forward. In my ideal world they would move the project to github and keep the contribution flow through pull requests where the core team is able to maintain a certain level of control.</p>
<p>If this happens, I see a bright future ahead for WebOS. </p>
]]></content:encoded>
			<wfw:commentRss>http://marcus.nordaaker.com/beautiful-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visualization of the Mojo class tree.</title>
		<link>http://marcus.nordaaker.com/visualization-of-the-mojo-class-tree/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visualization-of-the-mojo-class-tree</link>
		<comments>http://marcus.nordaaker.com/visualization-of-the-mojo-class-tree/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 23:56:04 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Mojo]]></category>
		<category><![CDATA[Mojolicious]]></category>
		<category><![CDATA[omnigraffle]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://marcus.nordaaker.com/?p=3615</guid>
		<description><![CDATA[In this visualization, I&#8217;ve tried to group the various Mojo classes by function and color code them. The classes are placed in layers, and related groups are close to each other. Note that I&#8217;ve dropped abstract base classes and Mojolicious related subclasses from this visualization, as well as some servers and all the commands. This [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://marcus.nordaaker.com/wp-content/uploads/2011/12/Mojolicious-Classes1.jpg"><img src="http://marcus.nordaaker.com/wp-content/uploads/2011/12/Mojolicious-Classes1.jpg" alt="" title="Mojolicious Classes" width="806" height="546" class="alignleft size-full wp-image-3620" /></a></p>
<p>In this visualization, I&#8217;ve tried to group the various Mojo classes by function and color code them. The classes are placed in layers, and related groups are close to each other. Note that I&#8217;ve dropped abstract base classes and Mojolicious related subclasses from this visualization, as well as some servers and all the commands. </p>
<p>This might be useful as a quick reference, if you want to print it, you can get the PDF <a href="https://github.com/marcusramberg/mojo-classes/blob/master/Mojolicious%20Classes.pdf?raw=true">here</a>.</p>
<p>I&#8217;ve stuffed the omnigraffle source as well as a pdf and jpeg representation on github, in case someone wants to play with it:<br />
<a href="https://github.com/marcusramberg/mojo-classes">https://github.com/marcusramberg/mojo-classes</a>. It&#8217;s all licensed under CC BY-SA, so feel free to hack on it.</p>
<p>*updated* Was missing Test::Mojo, also made it a bit more symetrical while I was at it.</p>
]]></content:encoded>
			<wfw:commentRss>http://marcus.nordaaker.com/visualization-of-the-mojo-class-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>$ mojo get is X-ray for the web</title>
		<link>http://marcus.nordaaker.com/mojo-get-is-x-ray-for-the-web/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mojo-get-is-x-ray-for-the-web</link>
		<comments>http://marcus.nordaaker.com/mojo-get-is-x-ray-for-the-web/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 00:43:13 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[Mojo]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://marcus.nordaaker.com/?p=3571</guid>
		<description><![CDATA[Mojolicious isn&#8217;t just useful for perl coders, it also includes a command line tool that can be quite handy for anybody who wants to get info from the web: usage: /Users/marcus/perl5/perlbrew/perls/perl-5.14.2/bin/mojo get [OPTIONS] \ URL [SELECTOR] [COMMANDS] mojo get / mojo get mojolicio.us mojo get -v -r google.com mojo get --method POST --content 'trololo' mojolicio.us [...]]]></description>
			<content:encoded><![CDATA[<p>Mojolicious isn&#8217;t just useful for perl coders, it also includes a command line tool that can be quite handy for anybody who wants to get info from the web:</p>
<pre>
usage: /Users/marcus/perl5/perlbrew/perls/perl-5.14.2/bin/mojo get [OPTIONS] \
URL [SELECTOR] [COMMANDS]
  mojo get /
  mojo get mojolicio.us
  mojo get -v -r google.com
  mojo get --method POST --content 'trololo' mojolicio.us
  mojo get --header 'X-Bender: Bite my shiny metal ass!' mojolicio.us
  mojo get mojolicio.us 'head &gt; title' text
  mojo get mojolicio.us .footer all
  mojo get mojolicio.us a attr href
  mojo get mojolicio.us '*' attr id
  mojo get mojolicio.us 'h1, h2, h3' 3 text

These options are available:
  --charset &lt;charset&gt;     Charset of HTML5/XML content, defaults to auto
                          detection or "UTF-8".
  --content &lt;content&gt;     Content to send with request.
  --header &lt;name:value&gt;   Additional HTTP header.
  --method &lt;method&gt;       HTTP method to use, defaults to "GET".
  --redirect              Follow up to 5 redirects.
  --verbose               Print verbose debug information to STDERR.</pre>
<p>First, the name can be a bit awkward when you use it often. I tend to shorten it to &#8216;mg&#8217;:</p>
<pre>    $ alias mg='mojo get'</pre>
<p>mg is a command line utility similar to curl, but with some really neat tricks up it&#8217;s sleeve. </p>
<p>As you can see from the examples above, mg allows you to use familiar CSS selectors  to process the response body. This turns out to be very useful. For instance, to get the links to the frontpaged apps on my site <a href="http://iusethis.com/">iusethis.com</a>:
<pre>
$ mg -r iusethis.com 'h2 a' attr href 

http://osx.iusethis.com/app/corebreach

http://osx.iusethis.com/app/terraray

http://osx.iusethis.com/app/preferencemanager

http://osx.iusethis.com/app/panoedit

http://osx.iusethis.com/app/findanyfile

http://osx.iusethis.com/app/webkit

http://osx.iusethis.com/app/nulanaslauncher

http://osx.iusethis.com/app/pagelayers

http://osx.iusethis.com/app/arrivalsampdepartures

http://osx.iusethis.com/app/iawriter
</pre>
<p>Check the top one for link tags:</p>
<p>$ mg -r http://osx.iusethis.com/app/corebreach link</p>
<pre>
&lt;link href="http://osx.iusethis.com/appcast/corebreach" rel="alternate" title="Sparkle AppCast" type="application/rss+xml" /&gt;
&lt;link href="http://osx.iusethis.com/comment/app.rss/corebreach" rel="alternate" title="Recent Comments" type="application/rss+xml" /&gt;
&lt;link href="http://osx.iusethis.com/static/opensearch.xml" rel="search" title="iusethis" type="application/opensearchdescription+xml" /&gt;
</pre>
<p>Neat, an appcast, let&#8217;s take a look at the version history:</p>
<pre> $ mg http://osx.iusethis.com/appcast/corebreach title text
Appcast for CoreBreach
CoreBreach 1.1
CoreBreach 1.0.2
CoreBreach 1.0.1
CoreBreach 1.0
</pre>
<p>Mojo understands much more complex queries than these tho. Pretty much anything you can use in jQuery or CSS 3 works.<br />
A good way to find these defintions is to open up your web page with the Chrome debugger:</p>
<p><a href="http://osx.iusethis.com/"><img src="http://nordaaker.no/docs/skitch/i_use_this_mac_os_x_software__New_Releases-20111130-005241.jpg"/></a></p>
<p>Just right-click the element you want to know more about and choose &#8216;Inspect Element&#8217; from the menu. This gives you a really simple view of the DOM, which shows you which element on the web page you are highlighting, as well as the parent nodes to your element for use in selectors.</p>
<p>As for the last argument, you can call anything that you can call on a <a href="http://mojolicio.us/perldoc/Mojo/DOM">Mojo DOM Node</a>.<br />
If you exclude it you just get the markup as you saw above.</p>
<p>Because the client uses the Mojo UserAgent, it already supports features like HTTPS and basic authentication credentials in the URL.<br />
mojo get also supports features like doing posts and setting headers, as well as setting the method and the request body, but I think it&#8217;s this DOM queries that puts it apart from the other HTTP clients like curl, wget or lwp-download.  Here&#8217;s a final trick:</p>
<p>Set MOJO_USERAGENT_DEBUG=1 in your environment to get full traces of your HTTP requests.</p>
<p>Like it? Installation is really simple and fast. <a href="http://mojolicio.us">Go get it</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://marcus.nordaaker.com/mojo-get-is-x-ray-for-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easily integrating your Mojolicious app with Facebook.</title>
		<link>http://marcus.nordaaker.com/easily-integrating-your-mojolicious-app-with-facebook/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=easily-integrating-your-mojolicious-app-with-facebook</link>
		<comments>http://marcus.nordaaker.com/easily-integrating-your-mojolicious-app-with-facebook/#comments</comments>
		<pubDate>Sat, 08 Jan 2011 11:31:05 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[Mojolicious]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://marcus.nordaaker.com/?p=3564</guid>
		<description><![CDATA[Facebook has recently released a new Graph API. It&#8217;s a simple RESTish API, and uses the newly released OAuth2 spec for authorization. This makes it a great match for Mojolicious, and using my new OAuth2 plugin (Also coming to a CPAN mirror near you), it&#8217;s absolutely trivial. Here is a simple Lite example. Just register [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook has recently released a<a href="http://graph.facebook.com/"> new Graph API</a>. It&#8217;s a simple RESTish API, and uses the newly released OAuth2 spec for authorization. This makes it a great match for <a href="http://mojolicio.us">Mojolicious</a>, and using my new <a href="https://github.com/marcusramberg/mojolicious-plugin-oauth2">OAuth2</a> plugin (Also coming to a CPAN mirror near you), it&#8217;s absolutely trivial.</p>
<p>Here is a simple Lite example. Just register an app with facebook to get the key and secret.</p>
<pre>
   use Mojolicious::Lite;
   # configure the plugin
   plugin 'oauth2', facebook => {
       key => 'my-key',
       secret => 'my-secret' };

   get 'hello' => sub {
      My $self=shift;
      #redirects the gets the token asynchronous
   $self->get_token('facebook', callback => sub {
      my $token=shift;
      my $me=$self->client->get(
        'https://graph.facebook.com/me?access_token='.$token)->res->json;
          $self->render( text =>
            "Hello ".$me->{name} );
    });
</pre>
<p>As you can see, the plugin handles the request flow automatically. We then use the built in JSON parsing in the Mojolicious Client to turn the API data into structures we can work with in our application.</p>
<p>Updating facebook data is just as trivial, you just use post requests with the data you need to update. See http://graph.facebook.com/ for more info on that.</p>
<p>If you plan to run your app through a standalone daemon such as Hypnotoad (I really think you should :) It could be worth it to rewrite the last section of your app to take advantage of async operations like this:</p>
<pre>
  $self->client->async->get(        'https://graph.facebook.com/me?access_token='.$token, sub {
  my $me=shift->res->json;
  $self->render( text=>"Hello ".$me->{name} );
})->start;
</pre>
<p>The async plugin itself also supports an optional async=>1 setting to enable async fetching of the token.</p>
]]></content:encoded>
			<wfw:commentRss>http://marcus.nordaaker.com/easily-integrating-your-mojolicious-app-with-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad as a writer&#8217; s tool</title>
		<link>http://marcus.nordaaker.com/ipad-as-a-writer-s-tool/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ipad-as-a-writer-s-tool</link>
		<comments>http://marcus.nordaaker.com/ipad-as-a-writer-s-tool/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 22:31:26 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://marcus.nordaaker.com/?p=3561</guid>
		<description><![CDATA[I believe I have found my ideal writing tool. For the last couple of months, I have been drafting text using iA Writer on the iPad. While the softward keyboard is cumbersome to use, I find the focus the combination gives very inspiring. Nothing but me and the text, no IMs or emails to disturb [...]]]></description>
			<content:encoded><![CDATA[<p>I believe I have found my ideal writing tool. For the last couple of months, I have been drafting text using <a href="http://itunes.apple.com/no/app/ia-writer/id392502056?mt=8">iA Writer</a> on the iPad. While the softward keyboard is cumbersome to use, I find the focus the combination gives very inspiring. Nothing but me and the text, no IMs or emails to disturb me. I have turned off notifications on the iPad, so not even a ongoing game of <a href="http://itunes.apple.com/no/app/words-with-friends/id322852954?mt=8">Words With Friends</a> can spoil my productivity.</p>
<p>Today I was out shopping on Oxford street, and on a whim I picked up the <a href="http://store.apple.com/us/searchresult?p=MC533LL/B&#038;ra=1&#038;r=/us/product/MC533LL/B%3Fmco%3DMTY3ODQ5OTY&#038;t=ipad+keyboard">iPad keyboard dock</a>. This thing is awesome! It has the required special keys to interact with the iPad&#8217;s functionality, but otherwise it feels just like Apple&#8217;s other excellent keyboards. It holds the iPad vertically in just the right angle, and plugs into a power source, as well as external speakers if I need music while I work. In short, I am in love.</p>
<p>I expect this to be my primary writing tool for the near future. If I&#8217;m going to nitpick, the only thing I am hoping for is higher DPI on the next generation of iPads so that iA Writer can fit a bit more text per line. One final trick; The keyboard lets you switch between languages with cmd-space. Exactly the same combination I use to switch between norwegian and english keyboard layouts on the mac. Pretty awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://marcus.nordaaker.com/ipad-as-a-writer-s-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.218 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-10 01:23:02 -->

