<?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>James Padolsey&#187; My Life category &#8211; James Padolsey</title>
	<atom:link href="http://james.padolsey.com/category/my-life/feed/" rel="self" type="application/rss+xml" />
	<link>http://james.padolsey.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 21 Aug 2010 04:38:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Me&#8230;</title>
		<link>http://james.padolsey.com/general/me/</link>
		<comments>http://james.padolsey.com/general/me/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 17:24:12 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[My Life]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Me]]></category>
		<category><![CDATA[Opinion]]></category>

		<guid isPermaLink="false">http://james.padolsey.com/?p=1613</guid>
		<description><![CDATA[Okay. For once, I&#8217;m going to say what I actually think on this site of mine! I&#8217;ve done it to a degree before but I got frequently hushed by the few people that see anything but neutrality as a weakness or a threat. I&#8217;m only&#8230;]]></description>
			<content:encoded><![CDATA[<p>Okay. For once, I&#8217;m going to say what I actually think on this site of mine! I&#8217;ve done it to a degree before but I got frequently hushed by the few people that see anything but neutrality as a weakness or a threat. I&#8217;m only human, and I have some damned opinions. So here they are!</p>

<p><em>Be prepared for mildly offensive rhetoric and inappropriate usage of the ellipsis and exclamation mark!!!</em></p>

<ul>
    <li>
        <p>I think this universe is simply awesome. We&#8217;re quite tiny when everything is put into perspective. Heck, we&#8217;re just one form of life, on one planet, in one star system of hundreds of billions of star systems in this galaxy alone (which itself is accompanied by hundreds of billions of other galaxies), and yet some people still have the arrogance to feel that the human race is at the centre of the whole universe! Our wonderful yet miniscule existence is aptly covered in this <a href="http://www.youtube.com/watch?v=p86BPM1GV8M">beautifully poetic video</a> from the late Carl Sagan.</p>
    </li>
    <li>I think inline documentation, like that made possible with JSDoc, makes code ugly and unreadable. I want to see the code, and that&#8217;s all!</li>
    <li>I love the outdoors. I envy people that have jobs outside. And I don&#8217;t mean outside on the street cleaning up human sewage. I mean outside in the real world &#8212; the places that we haven&#8217;t yet destroyed.</li>
    <li>I think heavy UI abstractions like ExtJS totally take away all of the fun, excitement and challenges that should form a central part in any programmer&#8217;s role. To me, it looks like a product built for business people, and business people rarely understand the motives and desires of programmers &#8212; they only understand a couple of things: profit margins and economic viability.</li>
    <li>I&#8217;ve yet to sit in an office chair that won&#8217;t make my back hurt like hell after eight hours.</li>
    <li>I don&#8217;t believe in a God. I also don&#8217;t believe in fairies or unicorns.</li>
    <li>I get annoyed when people don&#8217;t realise the difference between believing that something doesn&#8217;t exist and rejecting the belief that something does exist, for it should be apparent that there is a huge difference.</li>
    <li>My favourite comedians of all time are <a href="http://www.youtube.com/watch?v=hYytaZ06Hco">Ricky Gervais</a>, <a href="http://www.youtube.com/watch?v=MvgN5gCuLac">George Carlin</a>, <a href="http://www.youtube.com/watch?v=QvOQxeQKrdw">Frankie Boyle</a> and <a href="http://www.youtube.com/watch?v=Q95kX_EP2Nk">Bill Hicks</a> (watch all the videos!).</li>
    <li>I hate running, but I absolutely love cycling!</li>
    <li>I don&#8217;t understand Node.js. I really did try, but it just ended up confusing me. I&#8217;m not a Linux wizz so installing it was trouble enough.</li>
    <li>I think modern day advertising and marketing techniques are the bane of western society. Oh, and politicians!</li>
    <li>I didn&#8217;t care for the World Cup, and I always find it amusing how people shout at the TV and put flags on their cars when it won&#8217;t have the slightest effect on the game itself.</li>
    <li>I&#8217;m trying to become a vegetarian. Watch the documentary, <a href="http://www.earthlings.com/">Earthlings</a>, and you&#8217;ll understand why.</li>
    <li>Pixar <a href="http://www.imdb.com/title/tt0435761/">made me cry</a>. I don&#8217;t know how they did it&#8230;</li>
    <li>I&#8217;d love to know how to play a musical instrument properly. Preferably the piano.</li>
    <li>I think humans have a responsibility to stop using non-renewable resources, but I don&#8217;t think playing the blame-game is helpful. I also don&#8217;t think change will happen given the current political and economic powers that be.</li>
    <li>I have a love-hate relationship with PHP. Doing most things is dead simple (which is great), but it&#8217;s such an ugly language!</li>
    <li>Even after all this time, jQuery is still my favourite JavaScript library. It&#8217;s small, intuitive and doesn&#8217;t require me to adopt a new programming paradigm!</li>
    <li>Other movies that have made me weep like a baby include <a href="http://www.imdb.com/title/tt1277737/">The Stoning of Soraya M</a>, <a href="http://www.imdb.com/title/tt0109830/">Forrest Gump</a>, <a href="http://www.imdb.com/title/tt0078950/">The Champ</a> and <a href="http://www.imdb.com/title/tt0223897/">Pay It Forward</a>.</li>
</ul>

<p>Okay, that&#8217;s enough for today. Comment if you want. If you disagree with me on any of these points, then, GOOD! This world would be such a dull place without such varied opinions and people!</p>]]></content:encoded>
			<wfw:commentRss>http://james.padolsey.com/general/me/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Pong, and what it taught me</title>
		<link>http://james.padolsey.com/javascript/pong-and-what-it-taught-me/</link>
		<comments>http://james.padolsey.com/javascript/pong-and-what-it-taught-me/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 17:20:42 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[My Life]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OOP]]></category>

		<guid isPermaLink="false">http://james.padolsey.com/?p=1194</guid>
		<description><![CDATA[For those of you that don&#8217;t know, I&#8217;m currently studying Computer Science at the University Of Kent. As our first programming assignment we had to create a game of Pong (<a href="http://james.padolsey.com/stuff/ss/pong.jpg">see screenshots here</a>) using Java and a 2D-graphics platform called Greenfoot. It was a challenging&#8230;]]></description>
			<content:encoded><![CDATA[<p>For those of you that don&#8217;t know, I&#8217;m currently studying Computer Science at the University Of Kent. As our first programming assignment we had to create a game of Pong (<a href="http://james.padolsey.com/stuff/ss/pong.jpg">see screenshots here</a>) using Java and a 2D-graphics platform called Greenfoot. It was a challenging and interesting assignment, within which I was able to discover many new things about Java and about general game development.</p>

<p>In my opinion, Java&#8217;s insistence on a class based approach makes it a fantastic programming language to start with, albeit being quite hefty, in terms of the sheer quantity of available classes. I also liked the fact that most of my knowledge of JavaScript could be applied to Java. There are a few syntactical discrepancies that left me confused, but all the foundation concepts were (more or less) the same.</p>

<p>I thought it&#8217;d be fun to port my Pong game over to JavaScript. It was painlessly quick to do actually, and it&#8217;s the first time I&#8217;ve ever built a game with JavaScript <em>and</em> the HTML5 canvas tag/API. You can head over to the <a href="/demos/jspong/"><strong>demo to play it</strong></a> for yourself, and feel free to <a href="/demos/jspong/js/pong.js/view">have a look at the source code</a>. It&#8217;s not quite as sophisticated as the Java one, I didn&#8217;t have time to add cool graphics or a scoring mechanism. And yes, I know it&#8217;s the wrong way round &#8211; we were told to do it that way!</p>

<h2>What I discovered</h2>

<h3>It&#8217;s a frame-by-frame thing</h3>

<p>One of my very first revelations was that, to create a game, it&#8217;s important to think about everything on a frame-by-frame basis. Every new frame is a fresh slate upon which you reflect the various states represented in your program. The relationship between any two frames depends on a persisting programmable interface that &#8220;remembers&#8221; previous states.</p>

<p>It all becomes wonderfully simply when you think about it in this way&#8230; <em>move the ball one cell to the left, if its position is equal to zero then it must be at the left wall, therefore we can bounce it off the wall!</em> (okay, so it&#8217;s not actually that simple &#8211; you have to take the ball&#8217;s width into account)</p>

<p>It&#8217;s a massive contrast from &#8216;event-driven&#8217; development, wherein you wait for the user to make a choice and then carry out something following that. In the Pong game, I&#8217;m not waiting for the user to do anything &#8211; on every new frame I simply query the necessary information to make stuff happen. For example, <em>If the left cursor key is currently down then move this (paddle) one cell to the left</em>! (I&#8217;m not <em>waiting</em> for the user to press the left cursor key, each frame is being drawn regardless.)</p>

<h3>Everything&#8217;s an object</h3>

<p>In my Pong game, each physical object in the game is represented as an object within the programmable layer, each one an instance of a predefined class. For example, there&#8217;d be one Paddle class from which two Paddle instances (&#8220;objects&#8221;) would be created, each representing a single physical paddle on the screen.</p>

<p>OOP really shines here!</p>

<h3>Abstract, but not too much!</h3>

<p>Abstraction really is very important, especially when there are tonnes of things that need to be happening at any time. What I actually mean here, is that it&#8217;s important to separate out functionality between your methods. This is obviously better:</p>
<span id="more-1194"></span>


<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span> <span class="kw1">this</span>.<span class="me1">atSideEdge</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// ...</span>
<span class="br0">&#125;</span></pre></div></div>




<p>&#8230; than this:</p>


<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span>curX <span class="sy0">&lt;=</span> halfBallWidth <span class="sy0">||</span> curX <span class="sy0">&gt;=</span> worldWidth <span class="sy0">-</span> halfBallWidth<span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// ...</span>
<span class="br0">&#125;</span></pre></div></div>




<p>Although, this is obviously a bit too far:</p>


<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span> <span class="kw1">this</span>.<span class="me1">isCurrentlyWithinFivePixelsOfLeftEdge</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// ...</span>
<span class="br0">&#125;</span></pre></div></div>




<h3>Game development used to be scary!</h3>

<p>The idea of it used to be quite daunting. I feel that creating a game of Pong has opened my mind a little more to the paradigms involved in game development. It&#8217;s still a bit scary though&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://james.padolsey.com/javascript/pong-and-what-it-taught-me/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Trying to learn Java</title>
		<link>http://james.padolsey.com/general/trying-to-learn-java/</link>
		<comments>http://james.padolsey.com/general/trying-to-learn-java/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 23:25:14 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[My Life]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[University]]></category>

		<guid isPermaLink="false">http://james.padolsey.com/?p=1031</guid>
		<description><![CDATA[I’m off to University in just over a month and I thought it’d be a good idea to get a head start, academically. I’ve applied to study Computer Science, and, as only sense dictates, the first language we touch upon will be Java, the big&#8230;]]></description>
			<content:encoded><![CDATA[<p>I’m off to University in just over a month and I thought it’d be a good idea to get a head start, academically. I’ve applied to study Computer Science, and, as only sense dictates, the first language we touch upon will be Java, the big brother of JavaScript… kidding; I can hear Crockford screaming! So, with all this spare time I&#8217;ve decided to learn Java, or, at least begin on the journey!</p>

<p>I downloaded Eclipse and the &#8220;Java runtime&#8221;, only, of course, to find out that I already had about 10 different Java runtimes already installed. I fired everything up and then stopped; I had absolutely no idea what to create&#8230; What can I say? The command-line doesn&#8217;t excite me! Yes, I know pretty much anything can be created with Java, even hardware-accelerated games, but all the beginner-tutorials out there only show you the monotonous command-line drivel.</p>

<p>I also purchased a book recommended by the University; I believe it&#8217;s the one we&#8217;ll be learning from in the first year. It&#8217;s called &#8220;Objects first with Java&#8221; and goes into a tremendous amount of (unnecessary?) detail; I haven&#8217;t really got past the first few pages. I&#8217;ll tell you something about objects; you&#8217;re never going to learn squat about them from tutorials or books. Yeh sure, you&#8217;ll get an idea about what they are but you&#8217;ll never appreciate the abstraction provided by OO language until you dive in.</p>

<p>Now, don&#8217;t get me wrong about this whole University thing; I am looking forward to the &#8220;experience&#8221; but I&#8217;m not exactly overly-excited about the impending course material. I haven&#8217;t even begun and I&#8217;m already finding it dull; I&#8217;ve no doubt that I&#8217;ll be pleasantly surprised though&#8230; I&#8217;m sure the first lecture will prove enthralling!</p>

<p>I&#8217;ll be honest with you; I&#8217;m only going to University because &#8220;that&#8217;s what one does after school&#8221;. Heck, most people go to Uni for exactly the same reason (they just don&#8217;t know it); it&#8217;s what&#8217;s expected of us. You can say what you want about it but essentially, University is yet another device used to extend and perpetuate the status-quo; i.e. us working and the government getting richer. I just can&#8217;t wait; out of uni with a load of debts and then into the monotony of a &#8220;career&#8221;. Eventually I&#8217;ll have additional burdens that will require monetary attention and before you know it I&#8217;ll be where most of the British upper-middle-class finds itself, paying off debts&#8230; living the dream!</p>

<p>Isn&#8217;t it amazing, I haven&#8217;t experienced any of this impending fate yet and I already have the capacity to be utterly dismissive and totally negative about it all! Here&#8217;s hoping the grass is greener!</p>]]></content:encoded>
			<wfw:commentRss>http://james.padolsey.com/general/trying-to-learn-java/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>I&#8217;m on Github!</title>
		<link>http://james.padolsey.com/javascript/im-on-github/</link>
		<comments>http://james.padolsey.com/javascript/im-on-github/#comments</comments>
		<pubDate>Sat, 16 May 2009 18:12:11 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[My Life]]></category>
		<category><![CDATA[Github]]></category>

		<guid isPermaLink="false">http://james.padolsey.com/?p=818</guid>
		<description><![CDATA[
Yes, finally I&#8217;ve joined the masses on Github and I plan to sporadically share special things on there, starting with the following recent developments:

&#8220;literalHTML&#8221;

A tiny but powerful modification allowing you to specify HTML/DOM structures inline in your JavaScript code, an example:


<pre class="javascript" style="font-family:monospace;"><span class="kw2">var</span> className <span class="sy0">=</span> <span class="st0">'active'</span><span class="sy0">;</span>
<span class="kw2">var</span> myMenu&#8230;</pre>]]></description>
			<content:encoded><![CDATA[
<p>Yes, finally I&#8217;ve joined the masses on Github and I plan to sporadically share special things on there, starting with the following recent developments:</p>

<h2>&#8220;literalHTML&#8221;</h2>

<p>A tiny but powerful modification allowing you to specify HTML/DOM structures inline in your JavaScript code, an example:</p>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw2">var</span> className <span class="sy0">=</span> <span class="st0">'active'</span><span class="sy0">;</span>
<span class="kw2">var</span> myMenu <span class="sy0">=</span> <span class="sy0">|</span>
    <span class="sy0">&lt;</span>ul<span class="sy0">&gt;</span>
        <span class="sy0">&lt;</span>li <span class="kw2">class</span><span class="sy0">=</span><span class="st0">&quot;{className}&quot;</span><span class="sy0">&gt;</span>Item <span class="nu0">1</span><span class="sy0">&lt;/</span>li<span class="sy0">&gt;</span>
        <span class="sy0">&lt;</span>li<span class="sy0">&gt;</span>Item <span class="nu0">2</span><span class="sy0">&lt;/</span>li<span class="sy0">&gt;</span>
        <span class="sy0">&lt;</span>li<span class="sy0">&gt;</span>Item <span class="nu0">3</span><span class="sy0">&lt;/</span>li<span class="sy0">&gt;</span>
    <span class="sy0">&lt;/</span>ul<span class="sy0">&gt;</span>
<span class="sy0">|;</span>
&nbsp;
<span class="co1">// myMenu is now a DOM object:</span>
myMenu.<span class="me1">nodeName</span><span class="sy0">;</span> <span class="co1">// &quot;ul&quot;</span>
myMenu.<span class="me1">childNodes</span><span class="sy0">;</span> <span class="co1">// [ &lt;li.active&gt;, &lt;li&gt;, &lt;li&gt; ]</span>
&nbsp;
<span class="co1">// Do something:</span>
jQuery<span class="br0">&#40;</span><span class="st0">'body'</span><span class="br0">&#41;</span>.<span class="me1">append</span><span class="br0">&#40;</span>myMenu<span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>




<p><strong><a href="http://github.com/jamespadolsey/javascript-dom-general/tree/master">View here &raquo;</a></strong></p>


<h2>&#8220;getDescendants&#8221;</h2>

<p>Something I required for a project; a function to gather all descendant-elements down until a certain depth is reached:</p>


<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span class="sc2">&lt;<span class="kw2">div</span>&gt;</span>
    <span class="sc2">&lt;<span class="kw2">ul</span>&gt;</span>
        <span class="sc2">&lt;<span class="kw2">li</span>&gt;</span>Something <span class="sc2">&lt;<span class="kw2">strong</span>&gt;</span>interesting<span class="sc2">&lt;<span class="sy0">/</span><span class="kw2">strong</span>&gt;&lt;<span class="sy0">/</span><span class="kw2">li</span>&gt;</span>
    <span class="sc2">&lt;<span class="sy0">/</span><span class="kw2">ul</span>&gt;</span>
    <span class="sc2">&lt;<span class="kw2">p</span>&gt;</span>Something <span class="sc2">&lt;<span class="kw2">span</span>&gt;</span>else<span class="sc2">&lt;<span class="sy0">/</span><span class="kw2">span</span>&gt;&lt;<span class="sy0">/</span><span class="kw2">p</span>&gt;</span>
<span class="sc2">&lt;<span class="sy0">/</span><span class="kw2">div</span>&gt;</span></pre></div></div>




<p>Examples:</p>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw2">var</span> div <span class="sy0">=</span> document.<span class="me1">getElementsByTagName</span><span class="br0">&#40;</span><span class="st0">'div'</span><span class="br0">&#41;</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="sy0">;</span>
getDescendants<span class="br0">&#40;</span>div<span class="sy0">,</span> <span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// -&gt; [ &lt;ul&gt;, &lt;p&gt; ]</span>
                        <span class="co1">// i.e. children</span>
getDescendants<span class="br0">&#40;</span>div<span class="sy0">,</span> <span class="nu0">2</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// -&gt; [ &lt;ul&gt;, &lt;p&gt;, &lt;li&gt;, &lt;span&gt; ]</span>
                        <span class="co1">// i.e. children + grandchildren</span>
getDescendants<span class="br0">&#40;</span>div<span class="sy0">,</span> <span class="nu0">3</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// -&gt; [ &lt;ul&gt;, &lt;p&gt;, &lt;li&gt;, &lt;span&gt;, &lt;strong&gt; ]</span>
                        <span class="co1">// i.e. children + grandchildren + great-grandchildren</span></pre></div></div>




<p><strong><a href="http://github.com/jamespadolsey/javascript-dom-general/tree/master">View here &raquo;</a></strong></p>

<p>I&#8217;ll hopefully be adding to the repositroy with new exciting discoveries in the near future; visit <a href="http://github.com/jamespadolsey">my profile</a> and &#8220;follow me&#8221; to stay updated!</p>]]></content:encoded>
			<wfw:commentRss>http://james.padolsey.com/javascript/im-on-github/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Things you may not know about jQuery</title>
		<link>http://james.padolsey.com/javascript/things-you-may-not-know-about-jquery/</link>
		<comments>http://james.padolsey.com/javascript/things-you-may-not-know-about-jquery/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 10:43:57 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[My Life]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://james.padolsey.com/?p=558</guid>
		<description><![CDATA[I was going to do a bit of a series, releasing a jQuery tip every day or week or something, but I think I&#8217;m a little too lazy to commit to something like that. So I&#8217;ve compiled them all into one post! I&#8217;ll probably add&#8230;]]></description>
			<content:encoded><![CDATA[<p>I was going to do a bit of a series, releasing a jQuery tip every day or week or something, but I think I&#8217;m a little too lazy to commit to something like that. So I&#8217;ve compiled them all into one post! I&#8217;ll probably add to the list at later dates so make sure to bookmark it!</p>

<p>Do you have a tip nobody knows about? &#8211; Add it in the comments&#8230;</p>

<ul class="imp">
    <li><code>$.fn</code> is just a shortcut to <code>jQuery.prototype</code>.</li>
    <li>You can test if a jQuery collection contains any elements by trying to access the first element, e.g. <code>if($(selector)[0]){...}</code>.</li>
    <li>jQuery normalizes the event object across all browsers! Have a look at all the available properties/methods over here: <a href="http://docs.jquery.com/Events/jQuery.Event">http://docs.jquery.com/Events/jQuery.Event</a>.</li>
    <li>When you create a plugin you have access to the jQuery chain&#8217;s previous object:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery.<span class="me1">fn</span>.<span class="me1">doSomething</span> <span class="sy0">=</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="kw1">this</span><span class="sy0">;</span> <span class="co1">// =&gt; $('a')</span>
    <span class="kw1">this</span>.<span class="me1">prevObject</span><span class="sy0">;</span> <span class="co1">// =&gt; $('li')</span>
    <span class="co1">// Remember chaining in your plugins:</span>
    <span class="kw1">return</span> <span class="kw1">this</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="sy0">;</span>
&nbsp;
jQuery<span class="br0">&#40;</span><span class="st0">'li'</span><span class="br0">&#41;</span>.<span class="me1">show</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    .<span class="me1">find</span><span class="br0">&#40;</span><span class="st0">'a'</span><span class="br0">&#41;</span>.<span class="me1">doSomething</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// You could even create a new 'root' plugin:</span>
<span class="co1">// (Returns the 'root' of a chain)</span>
jQuery.<span class="me1">fn</span>.<span class="me1">root</span> <span class="sy0">=</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// Root is always document so we have to </span>
    <span class="co1">// go back to one before the last:</span>
    <span class="kw2">var</span> root <span class="sy0">=</span> <span class="kw1">this</span><span class="sy0">;</span>
    <span class="kw1">while</span><span class="br0">&#40;</span>root.<span class="me1">prevObject</span>.<span class="me1">prevObject</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
        root <span class="sy0">=</span> root.<span class="me1">prevObject</span><span class="sy0">;</span>
    <span class="br0">&#125;</span>
    <span class="kw1">return</span> root<span class="sy0">;</span>
<span class="br0">&#125;</span><span class="sy0">;</span>
&nbsp;
$<span class="br0">&#40;</span><span class="st0">'li'</span><span class="br0">&#41;</span>.<span class="me1">find</span><span class="br0">&#40;</span><span class="st0">'a'</span><span class="br0">&#41;</span>.<span class="me1">children</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">root</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// &lt;= $('li') is returned</span>
<span class="co1">// Using root() is the same as using end().end() in this situation</span></pre></div></div>



    </li>
    <li>You can namespace events! This is especially useful for plugin development:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery.<span class="me1">fn</span>.<span class="me1">myPlugin</span> <span class="sy0">=</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
&nbsp;
    <span class="co1">// Clean up after yourself!</span>
&nbsp;
    jQuery.<span class="me1">myPlugin</span> <span class="sy0">=</span> <span class="br0">&#123;</span>
        cleanUp<span class="sy0">:</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
&nbsp;
            <span class="co1">// Remove all click handlers binded</span>
            <span class="co1">// as a result of the plugin:</span>
            jQuery<span class="br0">&#40;</span><span class="st0">'*'</span><span class="br0">&#41;</span>.<span class="me1">unbind</span><span class="br0">&#40;</span><span class="st0">'click.myPlugin'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
            <span class="co1">// ALternatively, remove ALL events:</span>
            jQuery<span class="br0">&#40;</span><span class="st0">'*'</span><span class="br0">&#41;</span>.<span class="me1">unbind</span><span class="br0">&#40;</span><span class="st0">'.myPlugin'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
        <span class="br0">&#125;</span>
    <span class="br0">&#125;</span><span class="sy0">;</span>
&nbsp;
    <span class="kw1">return</span> <span class="kw1">this</span>.<span class="me1">bind</span><span class="br0">&#40;</span><span class="st0">'click.myPlugin'</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
        <span class="co1">// Do something...</span>
    <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// Note, you can also namespace data:</span>
<span class="co1">// E.g. $(elem).data('whatever.myPlugin',value);</span></pre></div></div>



    </li>
    <li>You can access all event handlers bound to an element (or any object) through jQuery&#8217;s event storage:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="co1">// List bound events:</span>
console.<span class="me1">dir</span><span class="br0">&#40;</span> jQuery<span class="br0">&#40;</span><span class="st0">'#elem'</span><span class="br0">&#41;</span>.<span class="me1">data</span><span class="br0">&#40;</span><span class="st0">'events'</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// Log ALL handlers for ALL events:</span>
jQuery.<span class="me1">each</span><span class="br0">&#40;</span>$<span class="br0">&#40;</span><span class="st0">'#elem'</span><span class="br0">&#41;</span>.<span class="me1">data</span><span class="br0">&#40;</span><span class="st0">'events'</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>i<span class="sy0">,</span> event<span class="br0">&#41;</span><span class="br0">&#123;</span>
    jQuery.<span class="me1">each</span><span class="br0">&#40;</span>event<span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>i<span class="sy0">,</span> handler<span class="br0">&#41;</span><span class="br0">&#123;</span>
        console.<span class="me1">log</span><span class="br0">&#40;</span> handler.<span class="me1">toString</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// You can see the actual functions which will occur</span>
<span class="co1">// on certain events; great for debugging!</span></pre></div></div>



    </li>
    <li>jQuery natively supports JSONP (&#8216;<a href="http://json.org">JSON</a> with padding&#8217;) which effectively means you can make cross-domain &quot;Ajax&quot; requests (although not strictly Ajax since it doesn&#8217;t use XHR). For this to work the requested domain must have some JSONP API in place (it must be able wrap the JSON with a specified callback function). An example:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw2">function</span> getLatestFlickrPics<span class="br0">&#40;</span>tag<span class="sy0">,</span>callback<span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="kw2">var</span> flickrFeed <span class="sy0">=</span> <span class="st0">'http://api.flickr.com/services/feeds/photos_public.gne?tags='</span>
                   <span class="sy0">+</span> tag <span class="sy0">+</span> <span class="st0">'&amp;tagmode=any&amp;format=json&amp;jsoncallback=?'</span><span class="sy0">;</span>
    jQuery.<span class="me1">getJSON</span><span class="br0">&#40;</span>flickrFeed<span class="sy0">,</span> callback<span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="co1">// Usage:</span>
getLatestFlickrPics<span class="br0">&#40;</span><span class="st0">'ferrari'</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>data<span class="br0">&#41;</span><span class="br0">&#123;</span>
    jQuery.<span class="me1">each</span><span class="br0">&#40;</span>data.<span class="me1">items</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>i<span class="sy0">,</span> <span class="kw1">item</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
        $<span class="br0">&#40;</span><span class="st0">&quot;&lt;img/&gt;&quot;</span><span class="br0">&#41;</span>.<span class="me1">attr</span><span class="br0">&#40;</span><span class="st0">&quot;src&quot;</span><span class="sy0">,</span> <span class="kw1">item</span>.<span class="me1">media</span>.<span class="me1">m</span><span class="br0">&#41;</span>.<span class="me1">appendTo</span><span class="br0">&#40;</span><span class="st0">'body'</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>


                                                                                                                                   
    </li>
    <li>You might find it a little messy but jQuery enables us to create an entire DOM structure within a single chain:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="co1">// Create and inject in one chain:</span>
jQuery<span class="br0">&#40;</span><span class="st0">'&lt;div/&gt;'</span><span class="br0">&#41;</span>
    .<span class="me1">append</span><span class="br0">&#40;</span><span class="st0">'&lt;p&gt;&lt;a href=&quot;#&quot;&gt;Foo&lt;/a&gt;&lt;/p&gt;'</span><span class="br0">&#41;</span>
    .<span class="me1">find</span><span class="br0">&#40;</span><span class="st0">'p a'</span><span class="br0">&#41;</span>
        .<span class="me1">click</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
            <span class="co1">// Do something...</span>
            <span class="kw1">return</span> <span class="kw2">false</span><span class="sy0">;</span>
        <span class="br0">&#125;</span><span class="br0">&#41;</span>
        .<span class="me1">end</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    .<span class="me1">append</span><span class="br0">&#40;</span><span class="st0">'&lt;p&gt;&lt;a href=&quot;#&quot;&gt;Bar&lt;/a&gt;&lt;/p&gt;'</span><span class="br0">&#41;</span>
    .<span class="me1">find</span><span class="br0">&#40;</span><span class="st0">'p:eq(1) a'</span><span class="br0">&#41;</span>
        .<span class="me1">click</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
            <span class="co1">// Do something else...</span>
            <span class="kw1">return</span> <span class="kw2">false</span><span class="sy0">;</span>
        <span class="br0">&#125;</span><span class="br0">&#41;</span>
        .<span class="me1">end</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    .<span class="me1">appendTo</span><span class="br0">&#40;</span><span class="st0">'body'</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>



    </li>
    <li>Accessing the DOM elements within a jQuery collection is incredibly easy:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw2">var</span> HTMLCollection <span class="sy0">=</span> $<span class="br0">&#40;</span><span class="st0">'div'</span><span class="br0">&#41;</span>.<span class="me1">get</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// Alternatively, if you only want the first element:</span>
$<span class="br0">&#40;</span><span class="st0">'div'</span><span class="br0">&#41;</span>.<span class="me1">get</span><span class="br0">&#40;</span><span class="nu0">0</span><span class="br0">&#41;</span><span class="sy0">;</span>
$<span class="br0">&#40;</span><span class="st0">'div'</span><span class="br0">&#41;</span>.<span class="me1">get</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="sy0">;</span>
$<span class="br0">&#40;</span><span class="st0">'div'</span><span class="br0">&#41;</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="sy0">;</span></pre></div></div>


  
    </li>
    <li>Not only can you bind events to DOM elements; you can also bind a custom event to ANY object!


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw2">function</span> Widget<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// Do something...</span>
<span class="br0">&#125;</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">var</span> myPhotoWidget <span class="sy0">=</span> <span class="kw2">new</span> Widget<span class="br0">&#40;</span><span class="st0">'photos'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
jQuery<span class="br0">&#40;</span>myPhotoWidget<span class="br0">&#41;</span>.<span class="me1">bind</span><span class="br0">&#40;</span><span class="st0">'photoAdd'</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// Custom event handling...</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// Trigger event:</span>
jQuery<span class="br0">&#40;</span>myPhotoWidget<span class="br0">&#41;</span>.<span class="me1">trigger</span><span class="br0">&#40;</span><span class="st0">'photoAdd'</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>



    </li>
    <li>Finding the index of a selected element is very easy. jQuery gives us the &#8216;index&#8217; method:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="st0">'table tr'</span><span class="br0">&#41;</span>.<span class="me1">click</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
    <span class="co1">// Find index of clicked table row:</span>
    <span class="kw2">var</span> index <span class="sy0">=</span> $<span class="br0">&#40;</span><span class="st0">'table tr'</span><span class="br0">&#41;</span>.<span class="me1">index</span><span class="br0">&#40;</span><span class="kw1">this</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>


 
    </li>
    <li>You can create your own filter selectors. I did a <a href="http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/">post on this</a> a while back, but take a look at an example anyway:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$.<span class="me1">expr</span><span class="br0">&#91;</span><span class="st0">':'</span><span class="br0">&#93;</span>.<span class="me1">external</span> <span class="sy0">=</span> <span class="kw2">function</span><span class="br0">&#40;</span>elem<span class="sy0">,</span>index<span class="sy0">,</span>match<span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="kw2">var</span> url <span class="sy0">=</span> elem.<span class="me1">href</span> <span class="sy0">||</span> elem.<span class="me1">src</span><span class="sy0">,</span>
        loc <span class="sy0">=</span> window.<span class="me1">location</span><span class="sy0">;</span>
    <span class="kw1">return</span> <span class="sy0">!!</span>url.<span class="me1">match</span><span class="br0">&#40;</span><span class="kw2">new</span> RegExp<span class="br0">&#40;</span><span class="st0">'^'</span> <span class="sy0">+</span> loc.<span class="me1">protocol</span> <span class="sy0">+</span> <span class="st0">'//'</span> <span class="sy0">+</span> <span class="st0">'(?!'</span> <span class="sy0">+</span> loc.<span class="me1">hostname</span> <span class="sy0">+</span> <span class="st0">')'</span> <span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// You can now use it within your selectors:</span>
&nbsp;
<span class="co1">// Find all external anchors:</span>
$<span class="br0">&#40;</span><span class="st0">'a:external'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// Find all external script elements:</span>
$<span class="br0">&#40;</span><span class="st0">'script:external'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// Determine if link is external:</span>
$<span class="br0">&#40;</span><span class="st0">'a#mylink'</span><span class="br0">&#41;</span>.<span class="kw1">is</span><span class="br0">&#40;</span><span class="st0">':external'</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// true/false</span></pre></div></div>



    </li>
    <li>I see quite a lot of people still using JavaScript&#8217;s FOR or WHILE constructs to create loops in their jQuery scripts. There&#8217;s nothing wrong with this but be aware that jQuery&#8217;s &#8216;each&#8217; method can also iterate over arrays and objects!


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw2">var</span> myArr <span class="sy0">=</span> <span class="br0">&#91;</span><span class="st0">'apple'</span><span class="sy0">,</span><span class="st0">'banana'</span><span class="sy0">,</span><span class="st0">'orange'</span><span class="br0">&#93;</span><span class="sy0">;</span>
&nbsp;
$.<span class="me1">each</span><span class="br0">&#40;</span>myArr<span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>index<span class="sy0">,</span> <span class="kw1">item</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// Do something with 'item'</span>
    <span class="co1">// return false to BREAK</span>
    <span class="co1">// return true to CONTINUE</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>



    </li>
    <li>The &#8216;filter&#8217; method accepts a String selector or a function. When using it with a function you must return false to remove the element from the stack and true to keep it:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="st0">'div'</span><span class="br0">&#41;</span>.<span class="me1">filter</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
    <span class="kw1">return</span> <span class="kw1">this</span>.<span class="me1">childNodes</span>.<span class="me1">length</span> <span class="sy0">&gt;</span> <span class="nu0">10</span><span class="sy0">;</span> <span class="co1">// Must return a Boolean</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>



    </li>
    <li>You don&#8217;t have to give new elements IDs or classes to reference them later, just cache them into a variable:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw2">var</span> myInjectedDiv <span class="sy0">=</span> $<span class="br0">&#40;</span><span class="st0">'&lt;div/&gt;'</span><span class="br0">&#41;</span>.<span class="me1">appendTo</span><span class="br0">&#40;</span><span class="st0">'body'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// Use 'myInjectedDiv' to reference the element:</span>
myInjectedDiv.<span class="me1">bind</span><span class="br0">&#40;</span><span class="st0">'click'</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
    <span class="co1">// ...</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>



    </li>
    <li>jQuery&#8217;s &#8216;map&#8217; method is incredibly useful, the passed function will be run on every item of the passed array (or object) and whatever the function returns each time is added to the new array, take a look:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="co1">// Create an array containing all anchor HREF attributes:</span>
<span class="kw2">var</span> URLs <span class="sy0">=</span> $.<span class="me1">map</span><span class="br0">&#40;</span>$<span class="br0">&#40;</span><span class="st0">'a'</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>elem<span class="sy0">,</span> index<span class="br0">&#41;</span><span class="br0">&#123;</span>
    <span class="kw1">return</span> elem.<span class="me1">href</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// URLs = ['http://google.com', 'http://whatever.com', 'http://yahoo.com']</span></pre></div></div>



    </li>
    <li>This isn&#8217;t jQuery related but it can be very useful. When you need to compare two different ways of doing something (performance-wise) you can use the Firebug console to log the time taken to complete a chunk of code, for example:


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">console.<span class="me1">time</span><span class="br0">&#40;</span><span class="st0">'My first method'</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="co1">// Do something...</span>
console.<span class="me1">timeEnd</span><span class="br0">&#40;</span><span class="st0">'My first method'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
console.<span class="me1">time</span><span class="br0">&#40;</span><span class="st0">'My second method'</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="co1">// Do something else...</span>
console.<span class="me1">timeEnd</span><span class="br0">&#40;</span><span class="st0">'My second method'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="co1">// Firebug will log the time (in milliseconds) taken</span>
<span class="co1">// to complete each chunk...</span></pre></div></div>



</ul>]]></content:encoded>
			<wfw:commentRss>http://james.padolsey.com/javascript/things-you-may-not-know-about-jquery/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>Reflection on poverty</title>
		<link>http://james.padolsey.com/general/reflection-on-poverty/</link>
		<comments>http://james.padolsey.com/general/reflection-on-poverty/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 22:01:30 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[My Life]]></category>
		<category><![CDATA[Blog Action Day]]></category>
		<category><![CDATA[Charity]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Poverty]]></category>
		<category><![CDATA[Reflection]]></category>

		<guid isPermaLink="false">http://james.padolsey.com/?p=119</guid>
		<description><![CDATA[We tend to throw around the word &#34;poverty&#34; a lot  nowadays but do any of us really bother to think about it? I mean, do any of us  think about its effect on the world and on us as humans? I for one, don&#8217;t! I&#8230;]]></description>
			<content:encoded><![CDATA[<p>We tend to throw around the word &quot;poverty&quot; a lot  nowadays but do any of us really bother to think about it? I mean, do any of us  think about its effect on the world and on us as humans? I for one, don&#8217;t! I  mean to be totally honest, I very rarely think about the one billion or so  people living in absolute poverty around the world!</p>
<p>Not to place too huge a blame on western society but its  probably western culture and education that has left me and others so  apparently callous and uncaring. Yes, schools teach you about poverty and how  massive a problem it is but you don&#8217;t hear any teachers or the government  telling us go help, no, of course not! This would not benefit the economy! </p>
<p>But then, is this massive issue of poverty something which  can be solved with a few extra helping hands? I really doubt it! </p>
<p>Almost one half of the world&#8217;s population live under two  dollars each day &#8211; what an absolutely pitiful amount! How did we, as a species,  let it get so bad? Surely evolution is not just about survival of the fittest,  surely there is some instinctive drive to help others! If there is then how on  earth did we let it get so bad? What happened!?</p>
<p>Maybe we should all pass the blame on to ignorant  generations of the past and then forget about it, or maybe it is, in fact, the  governments fault (isn&#8217;t everything!?)&#8230; Maybe every single person on the  planet is to blame, even the ones living in poverty! I don’t&#8217; know!</p><span id="more-119"></span>
<p>I just don&#8217;t know what we can do to fix this mess! Maybe  it&#8217;s all beyond repair!</p>
<p>What about giving to charity? Does that help? I&#8217;ve not given  much to &quot;charity&quot; in my life, I don&#8217;t see the benefit! Actually, you  know what I really hate; it&#8217;s the general ethos and concept of charity. What do  you feel when you give to charity? Altruism? Commitment? Pride? Honour?  Humility?</p>
<p>Face it! Giving to charity makes you feel good, it makes you  feel all warm and fuzzy inside as if you&#8217;ve really helped someone! But have you  really helped anyone, or have you, by giving that tenner at the church  collection, actually fuelled an already burning fire of dependency &#8211; the  dependency which poverty-stricken countries now have on the western world!</p>
<p>I&#8217;m <strong>not</strong> against charity but I would just like to know where my money is going. I would much rather save up some money and go and help do something real instead of blindly giving money!</p>
<p>I don&#8217;t know the answer, I don&#8217;t think anyone does. But then  it&#8217;s not about any single answer &#8211; that won&#8217;t fix anything &#8211; the only thing  which has a hope of helping is if we all start to give a damn and do our bit to  help out, including me!</p>
<p>I am sorry for this post being so negative. The subject of  poverty really is a nasty one; there is no easy way to be even a tiny bit positive  about it. It’s a very horrible thing to have to think about! Hopefully “Blog  Action Day” has helped in gaining something other than pity and hatred;  hopefully BAD#08 has helped, just a bit, to raise awareness, not of poverty,  but of the collective realisation of our responsibility towards those who  suffer because of it.</p>
<p>Okay, enough bad news, let’s do something about it! Let’s get up and do something tiny each day to help the poor! <a href="http://site.blogactionday.org/poverty/fight-poverty/">Have a look  at this list</a> for some good ideas… Let’s be positive, happy and excited about this – otherwise it&#8217;s not going to work!</p>
<h2>What is &quot;Blog Action Day&quot;?</h2>
<p>Have a look at this video to get an idea! -</p>
<p class="video">
<object width="600" height="453">	<param name="allowfullscreen" value="true" />	<param name="allowscriptaccess" value="always" />	<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=1529825&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" />	<embed src="http://vimeo.com/moogaloop.swf?clip_id=1529825&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="600" height="453"></embed></object>
</p>
<script src="http://blogactionday.org/js/ffc771d231bef614ebcbb490f088a4250e8474e2"></script>]]></content:encoded>
			<wfw:commentRss>http://james.padolsey.com/general/reflection-on-poverty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My first &#8220;real&#8221; job</title>
		<link>http://james.padolsey.com/general/my-first-real-job/</link>
		<comments>http://james.padolsey.com/general/my-first-real-job/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 06:40:27 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[My Life]]></category>
		<category><![CDATA[AKQA]]></category>
		<category><![CDATA[Career]]></category>
		<category><![CDATA[Job]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Me]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://james.padolsey.com/?p=30</guid>
		<description><![CDATA[Having left school in June I needed a job to make some money over the summer. I was going to settle for something tedious and in-my-view boring like waiting tables at the local restaurant or working at the nearby supermarket, but instead I decided to&#8230;]]></description>
			<content:encoded><![CDATA[<p>Having left school in June I needed a job to make some money over the summer. I was going to settle for something tedious and in-my-view boring like waiting tables at the local restaurant or working at the nearby supermarket, but instead I decided to go further and look for a job which I would actually enjoy.</p>
<p>I’d already been designing websites (mostly personal projects) for about two years, and I’d earned quite a bit off freelancing, so it made sense, since I had the skill set, to look for jobs in the web development/design industry.</p>
<p>Searching online for &quot;web design&quot; jobs yielded rubbish results. Most of the jobs listed were freelance focused or not based in the UK. I would have been happy to adopt a couple of freelance jobs but nothing is more valuable than real industry experience, and that meant getting employed properly for the summer.</p>
<p>After even more searching I eventually came across NMA’s &quot;<a href="http://top100.nma.co.uk/section.php?section_id=1">top 100 interactive agencies</a>&quot;. I started at the top of the list, visiting each agency’s website, having a look at their client list, and seeing where they were based. I ended up picking eight agencies, all based in London. I wasn’t looking for &quot;vacancies&quot; because I knew I would be unsuitable for any official listed job. Since I was only looking for an internship to get me through the summer I figured it would be best to simply send some emails explaining this amd hope for the best.</p>
<p>After writing my CV and emailing the applications nothing much happened. Obviously I had to give it a bit of time, so I did&#8230;</p>
<span id="more-30"></span>
<p>A few days later I picked up the phone to the HR manager of <a href="http://akqa.com">AKQA</a> London! She asked me to come in for an interview with her and the &quot;Presentation Technical Architect&quot;! After the first interview she mentioned the possibility of me doing a year’s internship! This was great! I hadn’t even considered doing a whole year but now that she’d hinted at it I started to consider how cool that would be, to have a whole year of developing proper online solutions for massive multinational corporations, plus it would look really good on my CV!</p>
<p>The interview consisted of some questions and a short test in which I had to demonstrate my skills. Overall it went quite well considering how nervous I was&#8230; my nervousness was mainly due to the fact that this was my first job interview in my life! I had to go in for a second interview with one of the heads of technology before they made their decision… luckily this interview went well too!</p>
<p>Two days later I was offered a year’s internship as Web Developer at AKQA. I had no idea what to expect in terms of a salary so their proposal sounded very reasonable considering I had no prior experience in the industry. I accepted and agreed to start on the following Monday. </p>
<p>The whole application&gt;interview&gt;acceptance process happened very quickly and was really exciting! I&#8217;d had jobs before but none of them were what I would class as real jobs, they mostly just lasted for a couple of weeks so the possibility of doing one job for a whole year was a little daunting!</p>
<p>My first day at the new job was overwhelming. I was thrown right into a massive project. The first week was just totally confusing to me, I didn’t really get anything done, I just spent the whole time trying to learn the way in which they did things. Plus the project I had joined was close to completion so getting accustomed to its structure and components took a while… actually I didn’t really get a chance to get used to anything because after the first week I was transferred to another project.</p>
<p>This new project involved developing for mobile devices which is something I had never done before; it was a massive learning curve.</p>
<p>I’d never used any version-control software before either so Subversion was totally new to me. The project was Java based; again something I had never worked with before. Luckily my job only required fluency in front-end technologies so my lack of Java knowledge didn’t hold me back too much. Another totally new thing was Velocity templates! I’d never heard of those!</p>
<p>Within about a week on this new project I had a rough idea what was going on, although there was still a lot to learn! Bug-fixing, QA and user-acceptance testing were all totally new concepts to me. Obviously I knew that testing occurred on sites like these but I never really thought it would affect me as a web developer. I was wrong of course! The amount of testing that occurs is phenomenal, all to guarantee the client an excellent product. </p>
<p>So far, the work which I have enjoyed most is that which has challenged me and made me think. I don’t really have a long attention span for monotonous tasks which, I suppose, is one of my weaknesses. Luckily this internship has challenged me quite a lot and as a result I’ve learnt a massive amount about how the industry operates and the various technologies used… I just hope the next nine months will as interesting as the first three!</p>]]></content:encoded>
			<wfw:commentRss>http://james.padolsey.com/general/my-first-real-job/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
