<?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"
	>

<channel>
	<title>lyingonthecovers.net</title>
	<atom:link href="http://www.lyingonthecovers.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.lyingonthecovers.net</link>
	<description>As one world ends... the Death of Kings.</description>
	<pubDate>Thu, 08 Apr 2010 17:03:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>WebApp up iPad home screen bookmarks</title>
		<link>http://www.lyingonthecovers.net/?p=371</link>
		<comments>http://www.lyingonthecovers.net/?p=371#comments</comments>
		<pubDate>Thu, 08 Apr 2010 16:54:11 +0000</pubDate>
		<dc:creator>Darko</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[HTML 5]]></category>

		<category><![CDATA[iPhone OS]]></category>

		<guid isPermaLink="false">http://www.lyingonthecovers.net/?p=371</guid>
		<description><![CDATA[
While discussing mobile web frustrations with Rob, we hit on an idea to reclaim a few pixels for sites that we visit regularly enough to have added them to our device&#8217;s home screen.
Having been working a lot with HTML 5 for mobile app development recently (which Rocks, with a capital &#8216;R&#8217;) I suggested that we [...]]]></description>
			<content:encoded><![CDATA[<p>
While discussing mobile web frustrations with <a href="http://www.pixelbox.net/2010/04/08/save-as-iphone-web-app-bookmarklet/">Rob</a>, we hit on an idea to reclaim a few pixels for sites that we visit regularly enough to have added them to our device&#8217;s home screen.</p>
<p>Having been working a lot with HTML 5 for mobile app development recently (which Rocks, with a capital &#8216;R&#8217;) I suggested that we recycle Rob&#8217;s <a href="http://www.pixelbox.net/2008/01/17/custom-icons-for-your-iphone-web-clips/">home screen icon injecting bookmarklet</a> to add Apple&#8217;s web app meta tag to the document&#8217;s head, so that a site could be forced to run &#8216;full screen&#8217; when added to your device&#8217;s home screen&#8230; Simple but effective!</p>
<p>Here&#8217;s the code, for anyone interested:</p>
<div style="overflow:auto">
<pre><code>
javascript: var s = document.createElement('meta');s.setAttribute('name', 'apple-mobile-web-app-capable');s.setAttribute('content', 'yes');document.getElementsByTagName('head')[0].appendChild(s);void(s);var z = document.createElement('meta');z.setAttribute('viewport', 'apple-mobile-web-app-capable');z.setAttribute('content', 'width=device-width');document.getElementsByTagName('head')[0].appendChild(z);void(z);
</code></pre>
</div>
<p></p>
<p>So, just save the above as a bookmark in Mobile Safari (or just bookmark <a href="javascript: var s = document.createElement('meta');s.setAttribute('name', 'apple-mobile-web-app-capable');s.setAttribute('content', 'yes');document.getElementsByTagName('head')[0].appendChild(s);void(s);var z = document.createElement('meta');z.setAttribute('viewport', 'apple-mobile-web-app-capable');z.setAttribute('content', 'width=device-width');document.getElementsByTagName('head')[0].appendChild(z);void(z);">this</a>) and &#8216;go to it&#8217; before adding a site to your home screen&#8230; and, hey presto, your newly book marked site will run full screen when you go to it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lyingonthecovers.net/?feed=rss2&amp;p=371</wfw:commentRss>
		</item>
		<item>
		<title>Getting Big Brother to monitor custom processes</title>
		<link>http://www.lyingonthecovers.net/?p=369</link>
		<comments>http://www.lyingonthecovers.net/?p=369#comments</comments>
		<pubDate>Wed, 07 Jan 2009 19:54:31 +0000</pubDate>
		<dc:creator>Darko</dc:creator>
		
		<category><![CDATA[*NIX]]></category>

		<guid isPermaLink="false">http://www.lyingonthecovers.net/?p=369</guid>
		<description><![CDATA[
This is very easy to do - and the documentation is bang on the money&#8230; but as always, there are no examples!


So without further a do&#8230;


Create a bb-proctab file in the etc folder in your Big Brother&#8217;s home folder with the following syntax:

&#60;host name&#62;: &#60;yellow alert processes&#62; : &#60;red alert processes&#62;



Processes are space delimited (enclosed [...]]]></description>
			<content:encoded><![CDATA[<p>
This is very easy to do - and the documentation is bang on the money&#8230; but as always, there are no examples!
</p>
<p>
So without further a do&#8230;
</p>
<p>
Create a <em>bb-proctab</em> file in the <em>etc</em> folder in your Big Brother&#8217;s home folder with the following syntax:</p>
<pre><code>
&lt;host name&gt;: &lt;yellow alert processes&gt; : &lt;red alert processes&gt;
</code></pre>
</p>
<p>
Processes are space delimited (enclosed in quotes where necessary) and can be followed by a semicolon if you want to specify a minimum or maximum of times it should be running.
</p>
<p>
The example below will issue a yellow alert if <em>myscript.pl</em> is running more than 8 times (to check for over forking or excessive load) and then a red alert if <em>cron</em>, <em>bbrun</em> or <em>myscript.pl</em> stop running.</p>
<pre><code>
localhost: "myscript.pl;<8" : cron;>=1 bbrun;>=1 &#8220;myscript.pl&#8221;
</code></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lyingonthecovers.net/?feed=rss2&amp;p=369</wfw:commentRss>
		</item>
		<item>
		<title>Developing for iPhone (and UIScrollView Example)</title>
		<link>http://www.lyingonthecovers.net/?p=366</link>
		<comments>http://www.lyingonthecovers.net/?p=366#comments</comments>
		<pubDate>Sun, 26 Oct 2008 16:46:51 +0000</pubDate>
		<dc:creator>Darko</dc:creator>
		
		<category><![CDATA[Cocoa]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[Objective C]]></category>

		<category><![CDATA[iPhone OS]]></category>

		<guid isPermaLink="false">http://www.lyingonthecovers.net/?p=366</guid>
		<description><![CDATA[
So, what have I been doing lately? Well I&#8217;ve been wrestling with my first Mobile App in Objective C and the Cocoa Touch frame work for every bodies&#8217; favourite mobile platform!


Between a day job, a social life and a couple of other projects, I haven&#8217;t really had the time I need to really get to [...]]]></description>
			<content:encoded><![CDATA[<p>
So, what have I been doing lately? Well I&#8217;ve been wrestling with my first Mobile App in Objective C and the Cocoa Touch frame work for every bodies&#8217; favourite mobile platform!
</p>
<p>
Between a day job, a social life and a couple of other projects, I haven&#8217;t really had the time I need to really get to grips with iPhone as a development platform yet&#8230; one of the biggest things that is holding me (and I&#8217;m sure a lot of other developers) back is the limited documentation that&#8217;s available.
</p>
<p>
What you get from Apple with the SDK (both actual documents and help given by XCode&#8217;s research assistant) is very good <strong>but</strong> it suffers from being single sourced. That is to say that there are no other contributors in the periphery giving comments, suggestions or even pointing out mistakes with the official docs. This is partly because of the infamous iPhone SDK NDA (which fortunately as now being lifted) but it&#8217;s also down to the fact it&#8217;s a relatively new and proprietary technology&#8230;
</p>
<p>
A good example of this is the problem I had getting the UIScrollView class to work. The documentation was accurate to a &#8216;T&#8217; and Apple even provided some fairly complex implementations to demonstrate how to use it with paging and zooming&#8230; but there was no example or explanation of how the fundamentals worked. I was left with the impression by the sample code that I needed to set up a delegate to handle all the events that the class actually does straight out the box! An hour later I was still playing around with implementations of the UIScrollViewDelegate protocol, trying to get my scroll bars to work when, all the while, all I needed to do was tell my UIScrollView the full dimensions of its content!
</p>
<p>
All I&#8217;d have needed to see was the 4 line example I&#8217;ve drawn up below, in the absence of <em>Head First iPhone Development</em>, I&#8217;ve even made a simple colour diagram showing the relationship between the two areas you have to specify! I doubt something so simple will help many people in the future, but you never know&#8230; and I hope this will be just the first example I write up for my blog!
</p>
<hr/><br/><br/><br />
<img src="http://www.lyingonthecovers.net/wp-content/uploads/2008/10/uiscrollview-diagram.jpg" alt="uiscrollview diagram" title="basic UIScrollView diagram" width="349" height="263" /></p>
<pre style="overflow: auto;"><code>
//all variables are of type CGFloat, unless named otherwise! 

UIScrollView *myScrollViewObj = [
    [UIScrollView alloc] initWithFrame:
          CGRectMake(frameX, frameY, frameWidth, frameHeight)
];

[myScrollViewObj setContentSize:
     CGSizeMake(contentWidth, contentHeight)
];

[myParentViewObj addSubview:myScrollViewObj];
[myScrollViewObj release];
</code></pre>
<hr/><br/><br/>
<p>PS. Hey Steve, please don&#8217;t sue me! The NDA&#8217;s being lifted anyway right? <img src='http://www.lyingonthecovers.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lyingonthecovers.net/?feed=rss2&amp;p=366</wfw:commentRss>
		</item>
		<item>
		<title>Great Interview Question</title>
		<link>http://www.lyingonthecovers.net/?p=365</link>
		<comments>http://www.lyingonthecovers.net/?p=365#comments</comments>
		<pubDate>Tue, 07 Oct 2008 10:11:56 +0000</pubDate>
		<dc:creator>Darko</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.lyingonthecovers.net/?p=365</guid>
		<description><![CDATA[
So, how this for an interesting interview question:


You have two variables with integer values, without creating a third variable exchange their values.


At first it sounds fairly simple, but then it hits you that it&#8217;s actually not&#8230; there&#8217;s no simple &#8216;exchange value&#8217; function. Here&#8217;s how I solved it:


list($a, $b) = array($b, $a);


My answer provoked a surprised [...]]]></description>
			<content:encoded><![CDATA[<p>
So, how this for an interesting interview question:
</p>
<p>
<q>You have two variables with integer values, without creating a third variable exchange their values.</q>
</p>
<p>
At first it sounds fairly simple, but then it hits you that it&#8217;s actually not&#8230; there&#8217;s no simple &#8216;exchange value&#8217; function. Here&#8217;s how I solved it:
</p>
<pre><code>
list($a, $b) = array($b, $a);
</code></pre>
<p>
My answer provoked a surprised (if not bemused) <em>Yeah, that&#8217;d work&#8230; I&#8217;ve never heard that one before</em> look. After a little conversation it turned out that the answer they were expecting but rarely got was:
</p>
<pre><code>
$a = $a + $b;
$b = $a - $b;
$a = $a - $b;
</code></pre>
<p>
My answer is of course better, because it works with any type of variable, but what they were actually testing for was a logical brain that would solve the problem with simple maths&#8230; The fact that most candidates don&#8217;t even try answering the question goes to show how dastardly it is!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lyingonthecovers.net/?feed=rss2&amp;p=365</wfw:commentRss>
		</item>
		<item>
		<title>The Royal Academy&#8217;s Summer Exhibition 2008</title>
		<link>http://www.lyingonthecovers.net/?p=361</link>
		<comments>http://www.lyingonthecovers.net/?p=361#comments</comments>
		<pubDate>Mon, 09 Jun 2008 18:18:53 +0000</pubDate>
		<dc:creator>Darko</dc:creator>
		
		<category><![CDATA[Art]]></category>

		<category><![CDATA[London]]></category>

		<guid isPermaLink="false">http://www.lyingonthecovers.net/?p=361</guid>
		<description><![CDATA[ Saturday morning I attended the Friends and Members preview of the Royal Academy&#8217;s Summer Exhibition and was faced with my annual choice between spending £12 on two glasses of Pimms or going whole hog, spending £18 on a jug and getting sloshed.


The Summer Exhibition is something I always approach with some trepidation as it [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.lyingonthecovers.net/wp-content/uploads/2008/06/img_0053-version-2-1.jpg" alt="" title="Tracy Emin\&#039;s gallery at the Summer Exhibition" width="218" height="273" class="alignleft size-medium wp-image-360" /> Saturday morning I attended the Friends and Members preview of the Royal Academy&#8217;s Summer Exhibition and was faced with my annual choice between spending £12 on two glasses of Pimms or going whole hog, spending £18 on a jug and getting sloshed.
</p>
<p>
The Summer Exhibition is something I always approach with some trepidation as it can get quite overwhelming. With two or three galleries crammed full of paintings and people it is very easy to tire yourself out trying to see everything or just get frustrated and steam on through to larger stuff at the end. Although, I&#8217;m pleased to say that this wasn&#8217;t the case this year.
</p>
<p>
The standard at the &#8216;low end&#8217; was phenomenal, not that I&#8217;ve ever seen any bad work before but there has been a lot of unremarkable paintings in the past. What was missing this year was the celebrated &#8216;high end&#8217; work, there was no <a href="http://www.telegraph.co.uk/news/uknews/1553569/Naked-Blairs-expelled-from-No-10.html">naked Tony Blair</a> getting expelled from paradise or anything that you could really latch on to as being the centre or highlight of the exhibition.
</p>
<p>
I think what will stick out for people is Tracy Emin&#8217;s gallery. The very fact that it&#8217;s darkened sets it apart from the rest of the bright Summer Exhibition, then there&#8217;s the rather understated notice (pictured above) out side&#8230; and then there&#8217;s its content. This is not a collection of Emin&#8217;s work but rather her personal choice of things she wanted included (mainly from her friends and colleagues.) The content is definitely shocking and a few a pieces are definitely not for the faint hearted!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lyingonthecovers.net/?feed=rss2&amp;p=361</wfw:commentRss>
		</item>
		<item>
		<title>Friday Night at Cafe Oto</title>
		<link>http://www.lyingonthecovers.net/?p=358</link>
		<comments>http://www.lyingonthecovers.net/?p=358#comments</comments>
		<pubDate>Sun, 08 Jun 2008 17:00:30 +0000</pubDate>
		<dc:creator>Darko</dc:creator>
		
		<category><![CDATA[Gigs]]></category>

		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://www.lyingonthecovers.net/?p=358</guid>
		<description><![CDATA[
This Friday I went to see my good friend Isnaj Dui perform at a relatively new arts venue, in a rather overcast Stoke Newington, called Cafe Oto.


Despite a slightly awkward journey I was very impressed with the venue. Its white brick walls and concrete floor gave it a blank canvas feel that made it seem [...]]]></description>
			<content:encoded><![CDATA[<p>
This Friday I went to see my good friend <a href="http://www.fboxrecords.co.uk/">Isnaj Dui</a> perform at a relatively new arts venue, in a rather overcast Stoke Newington, called <a href="http://www.cafeoto.co.uk/">Cafe Oto</a>.
</p>
<p>
Despite a slightly awkward journey I was very impressed with the venue. Its white brick walls and concrete floor gave it a blank canvas feel that made it seem anything was possible in its confines (although I&#8217;d imagine this might be an acoustical nightmare for anything in the direction of a drum kit.) On the menu was the usual selection of bottled organic beers and wines, although I seemed to drink the ginger beer for most of the night - it was really amazing ginger beer, after all.
</p>
<p>
Isnaj Dui gave a beautiful recital of haunting flutes and electrodulcimer which caused quite a stir amongst the audience. On second was <a href="http://www.pickled-egg.co.uk/george.htm">Suzy Mangion</a> whose melancholy vocals and sombre rendition of <a href="http://www.youtube.com/watch?v=8GVE7lRZuFM">Down Town</a> sent many a shiver down my spine.
</p>
<p>
All in all a very interesting if not off beat evening.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lyingonthecovers.net/?feed=rss2&amp;p=358</wfw:commentRss>
		</item>
		<item>
		<title>Setting and Getting Cookies in Google&#8217;s WebApp</title>
		<link>http://www.lyingonthecovers.net/?p=357</link>
		<comments>http://www.lyingonthecovers.net/?p=357#comments</comments>
		<pubDate>Mon, 26 May 2008 16:24:52 +0000</pubDate>
		<dc:creator>Darko</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[Google App Engine]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.lyingonthecovers.net/?p=357</guid>
		<description><![CDATA[
Here&#8217;s the disclaimer: I&#8217;m currently teaching myself Python for use with Google&#8217;s App Engine and (unlike my PHP or Perl) I&#8217;m not entirely sure if the below is best practice or even remotely sane, but that said, it does seem to work for me!

Setting a Cookie

Notes: Obviously the code is running in a controller (or [...]]]></description>
			<content:encoded><![CDATA[<p>
Here&#8217;s the disclaimer: I&#8217;m currently teaching myself Python for use with Google&#8217;s App Engine and (unlike my PHP or Perl) I&#8217;m not entirely sure if the below is best practice or even remotely sane, but that said, it does seem to work for me!
</p>
<h3>Setting a Cookie</h3>
<p>
Notes: Obviously the code is running in a controller (or rather a Request Handler) that extends <em>webapp.RequestHandler</em> and you&#8217;ll notice that I had to use a Regular Expression to remove the header name from <em>Cookie.SimpleCookie&#8217;s</em> output so I could tie it in to webapp&#8217;s header frame work which should stop any output buffering issues in the future.
</p>
<pre style="overflow: auto;"><code>
import Cookie
import re
import base64

class YourHandler(webapp.RequestHandler):
   cookieName = 'MyCookie'
   domain = ''
   expires = 360
   value = 'Some value or something...'

   def get(self):
         simpleCookieObj = Cookie.SimpleCookie()

         simpleCookieObj[self.cookieName] = str(base64.b64encode(self.value))
         simpleCookieObj[self.cookieName]['expires'] = self.expires
         simpleCookieObj[self.cookieName]['path'] = '/'
         simpleCookieObj[self.cookieName]['domain'] = self.domain
         simpleCookieObj[self.cookieName]['secure'] = ''

         #Cookie.SimpleCookie's output doesn't seem to be compatible with WebApps's http header functions
         #and this is a dirty fix

         headerStr = simpleCookieObj.output()
         regExObj = re.compile('^Set-Cookie: ')
         self.response.headers.add_header('Set-Cookie', str(regExObj.sub('', headerStr, count=1)))

</code></pre>
<h3>Getting a Cookie</h3>
<p>
Notes: This is much easier, we just have to make sure that it exists.
</p>
<pre style="overflow: auto;"><code>
import Cookie
import base64

class YourOtherHandler(webapp.RequestHandler):
   cookieName = 'MyCookie'

   def get(self):
      try:
         cookieValue = str(base64.b64decode(self.request.cookies[self.cookieName]))
      except KeyError:
         #There wasn't a Cookie called that
         cookieValue = ''

</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lyingonthecovers.net/?feed=rss2&amp;p=357</wfw:commentRss>
		</item>
		<item>
		<title>Changing Default hostname in Google App Engine Launcher</title>
		<link>http://www.lyingonthecovers.net/?p=356</link>
		<comments>http://www.lyingonthecovers.net/?p=356#comments</comments>
		<pubDate>Sun, 25 May 2008 17:16:50 +0000</pubDate>
		<dc:creator>Darko</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[Google App Engine]]></category>

		<guid isPermaLink="false">http://www.lyingonthecovers.net/?p=356</guid>
		<description><![CDATA[

These past few weeks I&#8217;ve mostly been writing Python for Google&#8217;s App Engine and listening to Country Music. They say a change is as good as a holiday, so two changes must be equivalent to a cruise or something.


To cut to the chase, today I was testing some Cookie functionality and needed to run my [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.lyingonthecovers.net/wp-content/uploads/2008/05/google-app-engine-launcher.jpg" alt="Google App Engine\&#039;s WebApp preferences " title="google-app-engine-launcher" width="396" height="330" class="alignnone size-full wp-image-355" /></p>
<p>
These past few weeks I&#8217;ve mostly been writing Python for Google&#8217;s App Engine and listening to Country Music. They say a change is as good as a holiday, so two changes must be equivalent to a cruise or something.
</p>
<p>
To cut to the chase, today I was testing some Cookie functionality and needed to run my WebApp on another domain other than <em>localhost</em> and of course, since I was using the App Engine Launcher GUI rather than the command line, I couldn&#8217;t find any documentation on how to do it.
</p>
<p>
To be fair, I didn&#8217;t look very hard, I just tried the following:
</p>
<p>
I added <em>&#8211;address=</em> followed by the hostname I wanted to run my WebApp under and low and behold I could access it across my LAN!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lyingonthecovers.net/?feed=rss2&amp;p=356</wfw:commentRss>
		</item>
		<item>
		<title>Talk is Cheap.</title>
		<link>http://www.lyingonthecovers.net/?p=354</link>
		<comments>http://www.lyingonthecovers.net/?p=354#comments</comments>
		<pubDate>Mon, 05 May 2008 16:42:41 +0000</pubDate>
		<dc:creator>Darko</dc:creator>
		
		<category><![CDATA[Art]]></category>

		<category><![CDATA[Internet]]></category>

		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.lyingonthecovers.net/?p=354</guid>
		<description><![CDATA[
The above image will be deleted once it&#8217;s been downloaded from my server 100 times. 
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.lyingonthecovers.net/img/" alt="" /><br />
The above image will be deleted once it&#8217;s been downloaded from my server 100 times. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lyingonthecovers.net/?feed=rss2&amp;p=354</wfw:commentRss>
		</item>
		<item>
		<title>Brilliant&#8230;</title>
		<link>http://www.lyingonthecovers.net/?p=349</link>
		<comments>http://www.lyingonthecovers.net/?p=349#comments</comments>
		<pubDate>Mon, 28 Apr 2008 21:59:45 +0000</pubDate>
		<dc:creator>Darko</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.lyingonthecovers.net/?p=349</guid>
		<description><![CDATA[

Rob found this on the internet today&#8230; I thought it was one of the funniest things I&#8217;ve ever seen!


After some consideration I decided to post it on my blog in order to stick it to the conformists out there.


Poor kid - I&#8217;m glad we didn&#8217;t have photo sharing sites when I was 14!
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.lyingonthecovers.net/wp-content/uploads/2008/04/less-conformist.jpg" alt="Mom\&#039;s Mini Van: Less conformist than the buss" title="less-conformist" width="495" height="396" class="aligncenter size-full wp-image-350" /></p>
<p>
Rob found this on the internet today&#8230; I thought it was one of the funniest things I&#8217;ve ever seen!
</p>
<p>
After some consideration I decided to post it on my blog in order to stick it to the <strong>conformists</strong> out there.
</p>
<p>
Poor kid - I&#8217;m glad we didn&#8217;t have photo sharing sites when I was 14!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lyingonthecovers.net/?feed=rss2&amp;p=349</wfw:commentRss>
		</item>
	</channel>
</rss>
