<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>oTTaJ@Y: Undercover Agent of Awsum Failure</title>
	<atom:link href="http://ottajay.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ottajay.wordpress.com</link>
	<description>School, Programming and Politics.</description>
	<lastBuildDate>Sun, 09 Oct 2011 20:50:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ottajay.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>oTTaJ@Y: Undercover Agent of Awsum Failure</title>
		<link>http://ottajay.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ottajay.wordpress.com/osd.xml" title="oTTaJ@Y: Undercover Agent of Awsum Failure" />
	<atom:link rel='hub' href='http://ottajay.wordpress.com/?pushpress=hub'/>
		<item>
		<title>The Most Important Role of Business</title>
		<link>http://ottajay.wordpress.com/2011/09/22/the-most-important-role-of-business/</link>
		<comments>http://ottajay.wordpress.com/2011/09/22/the-most-important-role-of-business/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 18:52:15 +0000</pubDate>
		<dc:creator>ottajay</dc:creator>
				<category><![CDATA[Politics]]></category>
		<category><![CDATA[business studies]]></category>
		<category><![CDATA[essay]]></category>

		<guid isPermaLink="false">http://ottajay.wordpress.com/?p=235</guid>
		<description><![CDATA[The following is an essay wrote for my business studies class. The brief was to take six &#8216;roles&#8217; a business might fore fill and rank them in order of importance. Businesses may be created for a multitude of reasons, but one that is common to almost all business is the intention to make money. In plenty of cases, the money &#8230; <a href="http://ottajay.wordpress.com/2011/09/22/the-most-important-role-of-business/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=235&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>The following is an essay wrote for my business studies class. </strong>The brief was to take six &#8216;roles&#8217; a business might fore fill and rank them in order of importance.</p>
<p>Businesses may be created for a multitude of reasons, but one that is common to almost all business is the intention to make money. In plenty of cases, the money making aspect of a business is often considered its primary role. However, it is not as simple, and businesses must take up several roles and balance them appropriately. The most important role for any business is to innovate and create in order to improve and develop humanity.</p>
<p>If humanity does not advance it shall surely, ultimately crumble as many pressures are put on it. In recent times for example: climate change and depletion of natural resources &#8212; the end of our current era of certain technologies.</p>
<p>The concepts of value and business are dependant on the existence of humanity. After all, humans created them. Therefore, if business doesn’t play its part in the advancement of humanity, thus increasing its likeliness of eventually failing, businesses themselves will also cease to exist, or at least function effectively. Consequently all other roles of business are fundamentally underlined by the role to serve to humanity. However it is not the sole responsibility of business to develop humanity. Governments and individuals must also play their part.</p>
<p>Although the advancement of humanity should be a key priority of business, many do not give a significant enough focus to it in order to, for example, bolster profits.</p>
<p>The high priority of contributing to the progress of humanity gives rise to the role of providing employment for individuals. Each individuals possesses varying skills and to varying degrees. So that humanity continues progressing, everyone’s abilities should be used to their maximum via employment. Also, in the world we live in nothing is truly free, so one must have access to income of some kind. Paying salaries according to how much ‘work’ an individual does is a as-fair-as-it-can-reasonably-get way of supplying someone with income, whilst still respecting the primary role of business; to evolve humanity.</p>
<p>This need for employment gives rise to another role that business should put into high regard: providing goods/services to individuals which they could not have [easily] provided on their own. Certain goods and services can allow people to live their lives more efficiently and get more enjoyment out of it. Businesses that produce such goods and services give access to such items to people who lack the ability and or opportunity to produce the product themselves. Conversely however, personal development may be stifled. When things are easily available people may reject or dismiss the opportunity to learn new skills.</p>
<p>Another fundamental role of business is to add value to raw materials. In fact, this is arguably the basis of “business;” takes “X” raw-material as input, performs some process to add value and pushes out “Y” goods or service. So you may assume that this should be considered the most important role, however it must be appreciated that the whole process of adding value is done solely to make profit. This, as previously discussed, does not &#8211;or should not&#8211; take precedence over the businesses responsibility to contribute to humanity.</p>
<p>One of the main benefits of business is the fact that it can be used to distribute wealth. They pay taxes which is then, theoretically allotted by the government to those who is believed to need it. But the fact that this distribution is required suggests that there are more foundational issues, such as people not being paid appropriately according to the job they do. So, instead of businesses focusing their efforts on the role in the distribution of wealth, they should tackle the principal issues instead.</p>
<p>Yet another role of business is to bring money into the United Kingdom; or any country for that matter. There is little to no doubt that money coming in to UK has benefits. The money funds investment in education and healthcare via taxation for example. But, ultimately this means money must leave another country, potentially depriving them of the same investment, hence any local benefit may be negated.</p>
<p>In any case, nowadays people have the chance to, relatively easily, move to another country with more economic opportunities. So, placing a high-priority on bringing money to the UK is comparably not all that important.</p>
<p>In conclusion, business may indeed assume multiple roles, but these must come second to contributing to humanity. For, if it doesn’t, and too many businesses adopt this flawed prioritisation scheme, humanity will stumble and business will subsequently get destroyed, or be dramatically changed in unforeseen ways. Business depends on humanity, so it’s right that it contributes to its future direction. Besides, the betterment of humanity is in business’ interest for that reason.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ottajay.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ottajay.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ottajay.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ottajay.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ottajay.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ottajay.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ottajay.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ottajay.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ottajay.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ottajay.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ottajay.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ottajay.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ottajay.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ottajay.wordpress.com/235/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=235&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ottajay.wordpress.com/2011/09/22/the-most-important-role-of-business/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ottajay</media:title>
		</media:content>
	</item>
		<item>
		<title>Managing Game Assets at Runtime</title>
		<link>http://ottajay.wordpress.com/2011/04/26/managing-game-assets-at-runtime/</link>
		<comments>http://ottajay.wordpress.com/2011/04/26/managing-game-assets-at-runtime/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 01:30:02 +0000</pubDate>
		<dc:creator>ottajay</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[PyGame]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://ottajay.wordpress.com/?p=185</guid>
		<description><![CDATA[It&#8217;s been a while, so I thought I&#8217;d share some of the fruits of my labour. Until a few weeks ago I was working on a fairly large (in terms of relative scale) game development project in my spare time. Well, as per usual I had to discontinue it due to lack of time. However, &#8230; <a href="http://ottajay.wordpress.com/2011/04/26/managing-game-assets-at-runtime/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=185&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while, so I thought I&#8217;d share some of the fruits of my labour. Until a few weeks ago I was working on a fairly large (in terms of relative scale) game development project in my spare time. Well, as per usual I had to discontinue it due to lack of time. However, parts of it can, and I&#8217;m sure will be recycled.</p>
<p>One such part would be the asset management <em>stuff.</em> In previous projects having anything too sophisticated would have been overkill, but this time I felt it was the appropriate to do something a little more &#8230; elegant. My main motivation largely came from the fact that having asset-managing code all over the place is, frankly, messy. So, I derived the following requirements of my soon to be super-awesome-sexy-asset-thingy!</p>
<ul>
<ul>
<li><strong>Abstraction of the file-system.</strong> Worrying about case-sensitivity and whether I should be using forward or backslashes isn&#8217;t a very productive use of my time.</li>
<li><strong>Extensibility.</strong> Although in my case it was only used for handling graphics, audio and fonts, it should be easy to add the ability to handle arbitrary resources at will.</li>
<li><strong>Flexible</strong>, especially in regards to loading policies (Caching and such.)</li>
</ul>
</ul>
<pre>from os import listdir, getcwd, sep
from os.path import join, split, normpath, isdir, isfile
from string import letters

assets = None

class Loader(object):

    def __init__(self, path):

        self.path = path
        self.reference = None

        fname = "".join(split(self.path)[-1].split(".")[:-1])
        self.flags = fname[fname.find("[") + 1:-1].lower()

        if "l" in self.flags:
            self.reference = self.load()

    def fetch(self):

        if not self.reference:
            self.reference = self.load()

        if "t" in self.flags:
            # Unbind the reference as to force reloading.
            ref = self.reference
            self.reference = None
            return ref

        return self.reference

    def load(self):
        raise NotImplementedError

class AssetLibrary(object):

    def __getattribute__(self, name):
        attr = object.__getattribute__(self, name)
        if isinstance(attr, AssetLibrary):
            return attr
        else:
            return attr.fetch()

def _gen_file_list(path):

    file_paths = []

    for entry in listdir(path):
        entry = normpath(join(path, entry))

        if isdir(entry):
            if not split(entry)[-1].startswith("."):
                file_paths.extend(_gen_file_list(entry))
        elif isfile(entry):
            file_paths.append(entry)

    return file_paths

def load(roots, loaders):

    global assets

    assets = AssetLibrary()

    file_paths = []
    for root in roots:
        file_paths.extend(_gen_file_list(root))

    for path in file_paths:

        extension = "." + path.split(".")[-1]
        path = ".".join(path.split(".")[:-1])

        for loader_class in loaders:

            if extension.lower() in loader_class.extensions:

                names = ["".join(c for c in seg.lower() if c in letters)
                                for seg in path.split(sep)][:-1]
                # Ignore the loader flags to get the "real" name...
                fname = path.split(sep)[-1]
                chars = []
                for c in fname[:fname.find("[")].lower():
                    if c not in letters:
                        chars.append("_")
                    else:
                        chars.append(c)
                names.append("".join(chars))

                lib = assets
                for name in names[:-1]:
                    if not hasattr(lib, name):
                        setattr(lib, name, AssetLibrary())

                    lib = getattr(lib, name)

                setattr(lib, names[-1], loader_class(path + extension))</pre>
<p>Fairly sizable (for Python that is), weighing in at roughly 150 lines. The concept however, isn&#8217;t too complex. You have all your files arranged in sensibly named directories; &#8220;SFXs&#8221;, &#8220;Images&#8221; and so on. Essentially, <em>load()</em> will recursively search through these directories &#8211;provided by a list of strings as an argument <em>roots</em>&#8211; and build a tree-like object of AssetLibrary and Loader instances. AssetLibrary roughly translate to &#8220;a directory&#8221;, and Loader as &#8220;a file&#8221;.</p>
<p>AssetLibrary does a bit of magic to make sure everything works properly. The __getattribute__ method is overridden to handle instances of Loader in a special way. I say &#8220;special&#8221;, all it does is invoke the <em>fetch</em> method of the loader when accessed and return the returned value of that, instead of the loader it self. It&#8217;s more cosmetic than anything else and isn&#8217;t a requirement by any means.</p>
<p>I keep referencing &#8220;loaders&#8221;, yet have neglected to explain properly what they are.  The file analogy is a little misleading. Loaders are interfaces to the resources, rather than representing the resources directly; although this is handled transparently. The idea is that you&#8217;ll create your own sub-classes of Loader to handle the various types of assets you have. In most cases all you should need to do is implement the <em>load</em> method which should return an object that exemplifies a &#8216;usable asset&#8217;. For example, an image loader would return a pygame.Surface&#8230;</p>
<pre>class GraphicLoader(Loader):

    # Define what file extensions are associated with this loader.
    extensions = [".jpg", ".jpeg", ".png", ".gif"]

    def load(self):
        print "Loading image:", self.path
        return pygame.image.load(self.path)</pre>
<p>In some cases, something a little more fancy may be required. When you create a pygame.Font instance, you need to pass a size argument to the intialiser. There is no obvious way to do this&#8230;</p>
<pre>class FontLoader(Loader):

    extensions = [".ttf"]

    class FontSizer(object):

        def __init__(self, path):

            self.path = path
            self.cache = {}

        def __call__(self, size):

            size = int(size)

            if size not in self.cache:
                self.cache[size] = pygame.font.Font(self.path,  size)

            return self.cache[size]

    def load(self):
        print "Loading font:", self.path
        return FontLoader.FontSizer(self.path)</pre>
<p>This adds another layer between the file and the &#8216;usable asset&#8217; so we can get our requested font-size. In order to keep it pretty, we introduce a FontSizer class which produces a callable that takes one and only argument: size. Then, it loads the font as per usual, storing it in a cache for faster access. In the end it would look something like&#8230;</p>
<pre># Load "My Awesome Font" at size 50
assets.fonts.my_awesome_font(50)</pre>
<p>Now, what if you don&#8217;t want caching? No problem, just tell the FontSizer. You may have noticed that loaders have an attribute by the name of &#8220;flags&#8221;. It is the only real way to indicate the loading policy to use for each file. Each filename includes a series of one-character flags just before the file-extension, surrounded in square-braces.</p>
<pre>my_file[flags].ext</pre>
<p>Three flags are used by the Loader base-class, they are</p>
<ul>
<li><strong>T,  &#8221;tee&#8221;;</strong> the loader will temporarily load the asset, as in, it will not be bound to the loader, therefore, once all references are gone, it will be freed.</li>
<li><strong>L, &#8220;ell&#8221;;</strong>when specified, the loader will load the asset immediately (during initialisation) and bind the reference to itself.</li>
<li><strong>D, &#8220;dee&#8221;;</strong> similar to L except that the asset is only loaded upon first request. This is the default behavior.</li>
</ul>
<p>You can of course define your flags as you wish. Parsing of the flags is handled in Loader.__init__, so nothing messy for you to do. Merely use membership test, <strong>if-in</strong>, on the <em>flags</em> attribute.</p>
<p>This solution may not be ideal for some, and I&#8217;d be lying to say if I was totally happy with it. But, it gets the job done, and manages to maintain it&#8217;s dignity in the process. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you&#8217;re crazy enough and would like to use the any of the above in your own work, consider it<a href="http://www.opensource.org/licenses/lgpl-3.0.html"> LGPL&#8217;d</a>. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ottajay.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ottajay.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ottajay.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ottajay.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ottajay.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ottajay.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ottajay.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ottajay.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ottajay.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ottajay.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ottajay.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ottajay.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ottajay.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ottajay.wordpress.com/185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=185&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ottajay.wordpress.com/2011/04/26/managing-game-assets-at-runtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ottajay</media:title>
		</media:content>
	</item>
		<item>
		<title>2D Particle Effects Engine using Python and PyGame</title>
		<link>http://ottajay.wordpress.com/2011/03/01/2d-particle-engine-using-python-and-pygame/</link>
		<comments>http://ottajay.wordpress.com/2011/03/01/2d-particle-engine-using-python-and-pygame/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 21:55:26 +0000</pubDate>
		<dc:creator>ottajay</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[particle engine]]></category>
		<category><![CDATA[PyGame]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://ottajay.wordpress.com/?p=170</guid>
		<description><![CDATA[Not too long ago I came across a brilliant tutorial on implementing 2D particle engines by RB Whitaker. Sadly it was aimed at the C#/XNA platform, which wasn't much use to me. So, I decided to port the example to Python/PyGame. <a href="http://ottajay.wordpress.com/2011/03/01/2d-particle-engine-using-python-and-pygame/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=170&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Warning: </strong>This implementation has a memory leak, thus not suitable for practical use. It is merely a proof of concept.</p>
<p>Not too long ago I came across a brilliant <a href="http://rbwhitaker.wikidot.com/2d-particle-engine-1">tutorial on implementing 2D particle engines</a> by RB Whitaker. Sadly it was aimed at the C#/XNA platform, which wasn&#8217;t much use to me. So, I decided to port the example to Python/PyGame. Surprisingly it was very easy and the resulting Python code is almost identical in most respects. (Yay C#)</p>
<p><em>The three resources required (circle.png, star.png, diamond.png) can be downloaded from the link provided above.</em></p>
<pre>class Particle(object):

    __slots__ = ["texture", "position", "velocity", "angle",
                    "angular_velocity", "colour", "size", "ttl"]

    def __init__(self, texture, position, velocity, angle,
                    angular_velocity, colour, size, ttl):

        self.texture = texture

        self.position = Vec2d(position)
        self.velocity = Vec2d(velocity)
        self.angle = float(angle)
        self.angular_velocity = float(angular_velocity)

        if not isinstance(colour, pygame.color.Color):
            self.colour = pygame.color.Color(*colour)
        else:
            self.colour = colour

        self.size = float(size)
        self.ttl = int(ttl)

    def update(self):
        self.ttl -= 1
        self.position += self.velocity
        self.angle += self.angular_velocity

    def draw(self, surface):

        source_rectangle = self.texture.get_rect()
        origin = Vec2d(int(self.texture.get_width()/2),
                        int(self.texture.get_height()/2))

        # As there is nothing (AFAIK) like XNA's SpriteBatch.Draw() for
        # Pygame we'll implement it's drawing logic our selves.

        # The source_rectangle isn't really needed, because by default
        # the whole surface will be blitted, but is incldued to maintain
        # compatibility with the tutorial.

        texture = self.texture.copy()

        filter_ = pygame.surface.Surface(texture.get_size())
        filter_.fill(self.colour)
        texture.blit(filter_, (0, 0), None, pygame.BLEND_RGB_MULT)
        del filter_

        texture = pygame.transform.rotozoom(texture, self.angle, self.size)

        surface.blit(texture, tuple(self.position - origin),
                            source_rectangle)

class ParticleEngine(object):

    def __init__(self, textures, location):

        self.emitter_location = Vec2d(location)
        self.textures = textures
        self.random = random.Random()
        self.particles = []

    def _generate_new_particle(self):

        # Random().random() behaves exactly like Random().NextDouble()

        texture = self.random.choice(self.textures)
        position = self.emitter_location
        velocity = Vec2d(
                        float(1) * (self.random.random() * 2 - 1),
                        float(1) * (self.random.random() * 2 - 1),
                        )
        angle = 0
        angular_velocity = 0.1 * (self.random.random() * 2 - 1)
        colour = pygame.color.Color(
                                    self.random.randint(0, 255),
                                    self.random.randint(0, 255),
                                    self.random.randint(0, 255)
                                   )

        size = self.random.random()
        ttl = 20 + self.random.randint(0, 40)

        return Particle(texture, position, velocity, angle,
                            angular_velocity, colour, size, ttl)

    def update(self):

        total = 10

        for i in xrange(total):
            self.particles.append(self._generate_new_particle())

        for particle in self.particles:
            particle.update()

        # Filter out dead particles
        self.particles = [particle for particle in self.particles if particle.ttl &gt;= 0]

    def draw(self, surface):
        for particle in self.particles:
        particle.draw(surface)

if __name__ == '__main__':

    # Set up display...
    screen = pygame.display.set_mode((400, 300), 0, 32)  

    textures = []
    textures.append(pygame.image.load("circle.png").convert_alpha())
    textures.append(pygame.image.load("star.png").convert_alpha())
    textures.append(pygame.image.load("diamond.png").convert_alpha())

    particle_engine = ParticleEngine(textures, Vec2d(0, 0))

    while True:

        screen.fill((0, 0, 0))

        for event in pygame.event.get():

            if event.type == pygame.QUIT:
                pygame.quit()
                exit()

        particle_engine.emitter_location = Vec2d(
                                                pygame.mouse.get_pos()[0],
                                                pygame.mouse.get_pos()[1]
                                                )

        particle_engine.update()
        particle_engine.draw(screen)

        pygame.display.flip()<em> </em></pre>
<p>&nbsp;</p>
<p>The Vec2d class is taken from the PyGame cookbook and will need to be in the namespace for the code to work.</p>
<p>Obviously, being Python, iteration can be a bottleneck, so large particle lists may prove problematic; although, I haven&#8217;t noticed any issues so far. We make use of __slots__ to minimise memory, and instance creation overhead. It is technically a premature optimisation, but how much harm can it do really? &#8230;Really? <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Particle rotation doesn&#8217;t have much effect, due to an implementation difference with XNA&#8217;s SpriteBatch.Draw() and PyGame&#8217;s transform.rotozoom(). Seeing as I don&#8217;t know how SpriteBatch.Draw() handles angles, I couldn&#8217;t provide an accurate work-around. However, you can change the following line to demonstrate rotation:</p>
<p><code># in Particle.draw<br />
texture = pygame.transform.rotozoom(texture, self.angle, self.size)<br />
# becomes...<br />
texture = pygame.transform.rotozoom(texture, self.angle*100, self.size)</code></p>
<p>Please note that rotation can cause the texture to appear off-center, but this can most probably be fixed easily.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ottajay.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ottajay.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ottajay.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ottajay.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ottajay.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ottajay.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ottajay.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ottajay.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ottajay.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ottajay.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ottajay.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ottajay.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ottajay.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ottajay.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=170&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ottajay.wordpress.com/2011/03/01/2d-particle-engine-using-python-and-pygame/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ottajay</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Social Media&#8221; is a Bubble, but it&#8217;s okay!</title>
		<link>http://ottajay.wordpress.com/2011/02/25/social-media-is-a-bubble-but-its-oka/</link>
		<comments>http://ottajay.wordpress.com/2011/02/25/social-media-is-a-bubble-but-its-oka/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 21:39:07 +0000</pubDate>
		<dc:creator>ottajay</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[future of the web]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[social media]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://ottajay.wordpress.com/?p=157</guid>
		<description><![CDATA[It&#8217;s true! The web is currently in an economic bubble, and it&#8217;s only going to end badly with a big bang followed by the sound of thousands of men wearing suits crying over their worthless investments. It&#8217;s hard to deny that the &#8220;Social Media&#8221; is a bubble. Investment in online companies is immense right now. &#8230; <a href="http://ottajay.wordpress.com/2011/02/25/social-media-is-a-bubble-but-its-oka/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=157&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s true! The web is currently in an economic bubble, and it&#8217;s only going to end badly with a big bang followed by the sound of thousands of <a href="http://www.google.co.uk/search?q=define%3A+venture+capitalist">men wearing suits</a> crying over their worthless investments.</p>
<p>It&#8217;s hard to deny that the &#8220;Social Media&#8221; is a bubble. Investment in <em>online companies</em> is immense right now. Just look at Facebook, <a href="http://mashable.com/2011/01/03/facebook-raises-500-million-now-worth-50-billion-report/">currently valued at around 50,000,000,000 shiny US dollars</a>. That places a price-tag of the average Facebook user at $1,000! Why is this significant? Because &#8220;Social Media&#8221; companies&#8217; wealth comes from it&#8217;s users. Now, I don&#8217;t care how good your advertising programmes are, you are not going to get them to click ads to the tune of one (whole) grand in any realistic timeframe.</p>
<p>However, I think I should be clear about this, I don&#8217;t actually think that Facebook it self is over valued. Facebook is at that point where it has acquired such a strong, involved user-base that it has cemented it self in the history books alongside the greats such as eBay and Google. It even has a <a href="http://www.imdb.com/title/tt1285016/">Hollywood movie about it</a>! A movie&#8230; about a website!</p>
<p>The &#8220;Social Media&#8221; bubble will burst because of it&#8217;s overvalued nature, and some day, these people who have been throwing their cash at it are going to realise that it isn&#8217;t likely that there will be another Facebook. This follows the proud tradition in the technology world that there should be One Ring To Rule Them All; to set the standards. Just a few examples&#8230;</p>
<ul>
<li><strong>Business and personal computing:</strong> Microsoft</li>
<li><strong>Web search and advertising:</strong> Google</li>
<li><strong>Massively Multiplayer Online Gaming:</strong> Activision Blizzard</li>
<li><strong>Secure web financial transactions:</strong> PayPal</li>
</ul>
<p>My purpose of writing this isn&#8217;t to whine about &#8220;Social Media&#8221; though. For that <a href="http://theoatmeal.com/comics/websites_stop">we have The Oatmeal</a>. Instead, I want to explain why have a if-you-can&#8217;t-beat-them-join-them relationship with Twitter et al.</p>
<p>Although I <del>hate</del> have a strong dislike of the &#8220;Social Media&#8221; culture, I do consider it a force for good in the technology world. As is known, plenty of investment has been poured into the web on the back of the glossy button clad 140 characters per hour, status-updating bandwagon. This has led to the rise of many sexy new things for us to play around with.</p>
<p>The rise of &#8220;Web 2.0&#8243; plus it&#8217;s younger, in-bred cousin &#8220;Social Media&#8221; has definitely helped provide a strong case for spending the time and money to produce the technologies that will allow us to make better, faster and generally more awesome <em>stuff (think HTML5) </em>for the web. Furthermore, it created the perfect catalytic environment for really cool existing tools that were previously, barely used/known, to be shown off to the whole world. Remember Google with &#8220;Suggest&#8221;. I doubt Ajax would have exploded onto the scene so violently &#8211;leading to great innovations in user interaction with web sites&#8211; if Google hadn&#8217;t of shown it off in all it&#8217;s magnificent glory in such a public way.</p>
<p>Although &#8220;Social Media&#8221; could, economically speaking, blow up in many people&#8217;s faces, I don&#8217;t care as long as it continues to cultivate improvements in the way the web works. Therefore in conclusion, as Jeff Atwood mentions in <a href="http://www.codinghorror.com/blog/2011/01/lived-fast-died-young-left-a-tired-corpse.html">his post about the web 1.0 bubble</a>, things come and go in this wonderful industry, and each one has the opportunity to leave a &#8220;meaningful legacy&#8221;. I hope &#8220;Social Media&#8221; will be one of them.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ottajay.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ottajay.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ottajay.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ottajay.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ottajay.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ottajay.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ottajay.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ottajay.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ottajay.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ottajay.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ottajay.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ottajay.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ottajay.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ottajay.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=157&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ottajay.wordpress.com/2011/02/25/social-media-is-a-bubble-but-its-oka/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ottajay</media:title>
		</media:content>
	</item>
		<item>
		<title>All Quiet on the Plugin Front: the Benefits of Planning in Code</title>
		<link>http://ottajay.wordpress.com/2011/02/12/all-quiet-on-the-plugin-front-the-benefits-of-planning-in-code/</link>
		<comments>http://ottajay.wordpress.com/2011/02/12/all-quiet-on-the-plugin-front-the-benefits-of-planning-in-code/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 19:25:45 +0000</pubDate>
		<dc:creator>ottajay</dc:creator>
				<category><![CDATA[Plashy]]></category>
		<category><![CDATA[FireBreath]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://ottajay.wordpress.com/?p=141</guid>
		<description><![CDATA[Continuing my commentary on the development of my browser plug-in, I have to admit there is little to report. CMake has been beaten into submission after a long campaign against it. My first few advances into FireBreath&#8216;s territories have yet to prompt a mass counter attack. Everything is looking good for putting my carefully laid &#8230; <a href="http://ottajay.wordpress.com/2011/02/12/all-quiet-on-the-plugin-front-the-benefits-of-planning-in-code/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=141&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Continuing my commentary on the development of my browser plug-in, I have to admit there is little to report. CMake has been beaten into submission after <a href="http://ottajay.wordpress.com/2011/02/09/cmake-hell-working-with-python/">a long campaign against it</a>. My first few advances into <a href="http://www.firebreath.org/">FireBreath</a>&#8216;s territories have yet to prompt a mass counter attack. Everything is looking good for putting my carefully laid out battle plan into action.</p>
<p>From past experience I&#8217;ve learnt that if you&#8217;re going to plan ahead, make sure you do it well. If you don&#8217;t, not only have you wasted your time, but you&#8217;ll find that your following a path that can only lead to certain, in most cases metaphorical, death. A good plan is the foundation of a good project, a bad one is only going to come back to bite you in the ass at some time.</p>
<p>How you choose to plan varies greatly from person to person. Some like to doodle on whiteboards. Some like to make flow charts. Some like to sit down and write a write fancy technical documents that have lots of hyphenated words, bullet-points and acronyms. I used to be a whiteboard doodler myself, but I think that might all be over.</p>
<p>This may seem obvious to some, but planning code, <strong>in code</strong> surpasses all other methods in terms of productivity, motivation and detail. By &#8220;planning in-code&#8221; I really mean: <strong>using early prototypes as the plan</strong> &#8211;this doesn&#8217;t mean you shouldn&#8217;t have a clear idea of what you&#8217;re trying to achieve before you do it however.</p>
<p>Seeing as you&#8217;re always writing code, you are constantly contributing directly to the end goal. Even if you decide to completely rewrite from scratch, move to a different environment or even simply decide you weren&#8217;t approaching the task in the right way, you always have working prototypes to visualise progress.</p>
<p>Another great benefit I&#8217;ve found is that you have complete control of the level you are abstracted away from the real dirty work. You get to control how much detail you go into. It also enables you to progressively approach these parts of the task, therefore you won&#8217;t suffer burnout.</p>
<p>My plan for the bulk of what will eventually make up the plug-in&#8217;s core logic is contained in one modestly-sized Python script. Now all I have to do is translate the appropriate bits to fit within the FireBreath framework.</p>
<p>I&#8217;m feeling good about this little side-project of mine, and I&#8217;m sure its the decent planning that is the reason as to why its going smoothly at the moment. I suppose this could all be considered part of the ideology of &#8220;<a href="http://en.wikipedia.org/wiki/Agile_software_development">agile development</a>&#8220;. I&#8217;m not really qualified to say whether it is or not, but whatever it is, I like it!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ottajay.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ottajay.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ottajay.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ottajay.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ottajay.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ottajay.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ottajay.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ottajay.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ottajay.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ottajay.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ottajay.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ottajay.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ottajay.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ottajay.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=141&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ottajay.wordpress.com/2011/02/12/all-quiet-on-the-plugin-front-the-benefits-of-planning-in-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ottajay</media:title>
		</media:content>
	</item>
		<item>
		<title>CMake Hell: Working With Python</title>
		<link>http://ottajay.wordpress.com/2011/02/09/cmake-hell-working-with-python/</link>
		<comments>http://ottajay.wordpress.com/2011/02/09/cmake-hell-working-with-python/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 19:06:44 +0000</pubDate>
		<dc:creator>ottajay</dc:creator>
				<category><![CDATA[Plashy]]></category>
		<category><![CDATA[CMake]]></category>
		<category><![CDATA[FireBreath]]></category>
		<category><![CDATA[PyGame]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://ottajay.wordpress.com/?p=132</guid>
		<description><![CDATA[I attempted to get started with FireBreath a week or so back to develop a browser plug-in for integrating Python and PyGame mainly for learning experience. Only today was I able to get everything set up properly so I can start writing actual code. FireBreath is a framework for abstracting away all the gritty stuff &#8230; <a href="http://ottajay.wordpress.com/2011/02/09/cmake-hell-working-with-python/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=132&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I attempted to get started with <a title="FireBreath hompage" href="http://www.firebreath.org/">FireBreath</a> a week or so back to develop a browser plug-in for integrating <a title="Python homepage" href="http://python.org/">Python</a> and <a title="PyGame hompage" href="http://pygame.org/">PyGame</a> mainly for learning experience. Only today was I able to get everything set up properly so I can start writing actual code.</p>
<p>FireBreath is a framework for abstracting away all the gritty stuff required for producing browser plug-ins. It works for both <a title="Wikipedia article on NPAPI" href="http://en.wikipedia.org/wiki/NPAPI">NPAPI</a> compliant browsers (Firefox, Chrome, etc.) and those that make use of ActiveX controls. It should also work on Windows, Linux and Mac transparently without any major hic-ups. When I stumbled across it after seeing it mentioned on <a href="http://stackoverflow.com/">Stackoverflow</a>, it was music to my ears. No faffing about. Getting straight to writing code that does something interesting.</p>
<p>Now, this was all looking lovely. It seemed perfect for my needs. I checked the latest beta out of Git fine. Setting up a project was a breeze with the &#8220;fbgen&#8221; utility. However, immediately after I hit a 2 metre thick, steel-reinforced, concrete wall of pain, suffering and WTFs.</p>
<p>FireBreath makes use of <a title="CMake hompage" href="http://www.cmake.org/">CMake</a>, a cross-platform alternative to Make. The FireBreath developers provide a good <a href="http://www.firebreath.org/display/documentation/Using+CMake+With+FireBreath">rationale for using it</a>, which I respect. But, this CMake dependency nearly put a permanent stopper in my grand dreams of stealing Flash&#8217;s crown as King of the Browser Plug-ins.</p>
<p>Now, I should make it clear that it wasn&#8217;t really CMake&#8217;s fault, rather, my incompetence. All I wanted to do was make use of Python&#8217;s C-API, therefore, I had to make a few simple modifications to the CMakeLists and off and away I would be. This turned out to be the most categoric evidence of my amateurism, ever!</p>
<p>I spent a whole week on-and-off just trying to solve this little problem. At first I tried the good ol&#8217; trick of starting at it for a bit, then trying it again in the hope that I was able to intimidate it in to co-operation. When that failed I tried Google which, considering it was a niche problem I was having, wasn&#8217;t too helpful. For pretty much every query I tried it gave me the CMake tutorial (which I read) as the first result and a bunch of mailing-list entries which I had the displeasure of trawling through. Gradually I managed to build up the scraps of information I had found into solution.</p>
<p>With my first few attempts I didn&#8217;t make use of the FIND_PACKAGE directive in CMake. It wasn&#8217;t for the want of trying; I tried FIND_PACKAGE(Python), but it ultimately failed. Things started to look up when I realised that I was meant to be using &#8220;PythonLibs&#8221; instead of &#8220;Python&#8221; &#8211;a very simple mistake, but it took me an age to track down. Next step was to link the Python library to my plug-in. CMake provides a nice TARGET_LINK_LIBRARIES for handling this, but I couldn&#8217;t find out the correct way to use it (I only came across it by chance reading of an old mailing-list). Eventually I ended up with the following which appears to work&#8230;</p>
<p><code><br />
SET(PYTHON_INCLUDE_DIRS "/usr/include/python2.6")<br />
find_package(PythonLibs REQUIRED)<br />
include_directories(${PYTHON_INCLUDE_DIRS})<br />
target_link_libraries(${PROJNAME} ${PYTHON_LIBRARIES})</code></p>
<p>It struck me that it took so damn long to come up with a four line answer. I&#8217;m sure its just my <em>amateur enthusiast </em>unfamiliarity with &#8220;build processes&#8221; that was a major factor. None the less, it works (I think) now. Finally I can get to admiring the awesomeness of FireBreath. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ottajay.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ottajay.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ottajay.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ottajay.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ottajay.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ottajay.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ottajay.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ottajay.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ottajay.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ottajay.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ottajay.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ottajay.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ottajay.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ottajay.wordpress.com/132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=132&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ottajay.wordpress.com/2011/02/09/cmake-hell-working-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ottajay</media:title>
		</media:content>
	</item>
		<item>
		<title>Are our PRIORITIES right when it comes to economy-vs-taking care of the planet?</title>
		<link>http://ottajay.wordpress.com/2009/03/26/are-our-priorities-rite/</link>
		<comments>http://ottajay.wordpress.com/2009/03/26/are-our-priorities-rite/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 00:41:40 +0000</pubDate>
		<dc:creator>ottajay</dc:creator>
				<category><![CDATA[Politics]]></category>
		<category><![CDATA[enviroment]]></category>
		<category><![CDATA[tata]]></category>
		<category><![CDATA[worlds cheapest car]]></category>

		<guid isPermaLink="false">http://ottajay.wordpress.com/?p=70</guid>
		<description><![CDATA[&#8220;Are the world&#8217;s priorities right?&#8221; is a question I recently pondered. The recent news that &#8216;Tata Motors&#8217; has finally released the worlds cheapest car the &#8216;TATA Nano&#8217; has finally got my attention,&#8217; but is this really appropriate when we&#8217;re meant to be saving our atmosphere and conserving our natural resources?  So! Although the nano has &#8230; <a href="http://ottajay.wordpress.com/2009/03/26/are-our-priorities-rite/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=70&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#8220;Are the world&#8217;s priorities right?&#8221; is a question I recently pondered. The recent news that &#8216;Tata Motors&#8217; has finally released the worlds cheapest car the &#8216;TATA Nano&#8217; has finally got my attention,&#8217; but is this really appropriate when we&#8217;re meant to be saving our atmosphere and conserving our natural resources? </p>
<p>So! Although the nano has a small 624cc engine you mustn&#8217;t forget that it runs on petrol, a hydrocarbon, so when the engine does what engines do, it produces carbon dioxide and other harmful <em>stuff</em> which negatively affects our environment.</p>
<p>By making cars cheaper you allow more people to purchase them. Which means more people driving. Which means more carbon dioxide (and <em>stuff</em>) is being released into our atmosphere! Also it means more fuel being purchased which could mean higher prices at the pumps! Not that it bothers me&#8230;</p>
<p>So by encouraging more people to drive &#8211;Which essentially that&#8217;s what <em>they&#8217;re</em> doing&#8211; we are adding more pointless pressure on our planet. The target market for the Nano &#8211;I believe&#8211; is the less well off people in the world. There must a fair few of people that don&#8217;t currently drive but if you get all them people driving you are releasing more CO2! Mobility for the less well off is fine, but not at the price of humanity. </p>
<p>The Nano, although economically a sensible and great step forward, I feel it&#8217;s a step backwards on the environmental front. I&#8217;m no tree hugger, I do the small things which we&#8217;re told so often does so much good, but I do feel we should stop putting economics before the greater good that is protecting our planet from ourselves.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ottajay.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ottajay.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ottajay.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ottajay.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ottajay.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ottajay.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ottajay.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ottajay.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ottajay.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ottajay.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ottajay.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ottajay.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ottajay.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ottajay.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=70&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ottajay.wordpress.com/2009/03/26/are-our-priorities-rite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ottajay</media:title>
		</media:content>
	</item>
		<item>
		<title>Smash that keyboard!</title>
		<link>http://ottajay.wordpress.com/2009/03/11/smash-that-keyboard/</link>
		<comments>http://ottajay.wordpress.com/2009/03/11/smash-that-keyboard/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 23:04:15 +0000</pubDate>
		<dc:creator>ottajay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[drums]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[supercalifragilisticexpialidocious]]></category>

		<guid isPermaLink="false">http://ottajay.wordpress.com/?p=57</guid>
		<description><![CDATA[Ever got really angry with your computer and just wanted to smash it to pieces? Well now you can make beautiful music in the process at www.ronwinter.tv/drums. I&#8217;m sure this will provide hours of fun&#8230; Alternately, hours of torment for your neighbours. A small suggestion. Try your name it may produce an interesting combination! If not try &#8230; <a href="http://ottajay.wordpress.com/2009/03/11/smash-that-keyboard/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=57&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever got really angry with your computer and just wanted to smash it to pieces? Well now you can make beautiful music in the process at <a href="http://www.ronwinter.tv/drums.html">www.ronwinter.tv/drums</a>. I&#8217;m sure this will provide hours of fun&#8230; Alternately, hours of torment for your neighbours.</p>
<p>A small suggestion. Try your name it may produce an interesting combination! If not try other words like, xylophone or supercalifragilisticexpialidocious or if that still don&#8217;t float your boat just smash random keys!</p>
<p><sub>I did honestly try to spell &#8216;supercalifragilisticexpialidocious&#8217; by myself. I was close, but no cigar, so I just looked it up</sub></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ottajay.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ottajay.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ottajay.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ottajay.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ottajay.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ottajay.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ottajay.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ottajay.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ottajay.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ottajay.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ottajay.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ottajay.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ottajay.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ottajay.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=57&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ottajay.wordpress.com/2009/03/11/smash-that-keyboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ottajay</media:title>
		</media:content>
	</item>
		<item>
		<title>My pecil case is a TARDIS!?</title>
		<link>http://ottajay.wordpress.com/2009/03/06/my-pecil-case-is-a-tardis/</link>
		<comments>http://ottajay.wordpress.com/2009/03/06/my-pecil-case-is-a-tardis/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 00:44:49 +0000</pubDate>
		<dc:creator>ottajay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[doctor who]]></category>
		<category><![CDATA[pencil case]]></category>
		<category><![CDATA[tardis]]></category>

		<guid isPermaLink="false">http://ottajay.wordpress.com/?p=27</guid>
		<description><![CDATA[TARDIS: Time And Relative Dimension In Space. Nearly everyday I reach into my pencil-case and I pull out a pencil, pen or a ruler but I never notice the junk that hides away in there. There seems to be no end to it, and perhaps by coincident, or perhaps not, it is a very TARDISy &#8230; <a href="http://ottajay.wordpress.com/2009/03/06/my-pecil-case-is-a-tardis/">Continue reading <span class="meta-nav">&#187;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=27&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Tardis" target="_blank">TARDIS</a>: <strong>T</strong>ime <strong>A</strong>nd <strong>R</strong>elative <strong>D</strong>imension <strong>I</strong>n <strong>S</strong>pace.</p>
<p>Nearly everyday I reach into my pencil-case and I pull out a pencil, pen or a ruler but I never notice the junk that hides away in there. There seems to be no end to it, and perhaps by coincident, or perhaps not, it is a very <em>TARDISy</em> shade of blue.</p>
<p>There is the usual stuff: several pens, a few pencils, a calculator and not forgetting the seemingly pointless set square. But there is also car insurance applications? Two coursework drafts, one of them not even mine! A maths test &#8211;which I never <del datetime="2011-02-05T09:03:27+00:00">plan on handing</del> handed back. Twelve sheets of blank paper. Pencil sharpenings from so long ago they&#8217;ve started decomposing. 132 centimetres worth of shattered rulers. Some plastic wrapping that appears to be for a ruler/geometry-set or small calculator, but it has absolutely no markings to indicate which. There is also the early blueprints of a cat mincing machine. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> </p>
<p>It truly does seem to be bigger on the inside than out. But ponder this, how comes there doesn&#8217;t seem to be a single pencil case IN THE WORLD that can fit a full length 30 cm ruler!?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ottajay.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ottajay.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ottajay.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ottajay.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ottajay.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ottajay.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ottajay.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ottajay.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ottajay.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ottajay.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ottajay.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ottajay.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ottajay.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ottajay.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ottajay.wordpress.com&amp;blog=6815160&amp;post=27&amp;subd=ottajay&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ottajay.wordpress.com/2009/03/06/my-pecil-case-is-a-tardis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">ottajay</media:title>
		</media:content>
	</item>
	</channel>
</rss>
