<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>flagrantdisregard</title>
	
	<link>http://flagrantdisregard.com</link>
	<description />
	<lastBuildDate>Mon, 10 Jun 2013 22:11:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/flagrantdisregard" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="flagrantdisregard" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">flagrantdisregard</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>BaconGameJam – Dark Arena</title>
		<link>http://flagrantdisregard.com/bacongamejam05-info/</link>
		<comments>http://flagrantdisregard.com/bacongamejam05-info/#comments</comments>
		<pubDate>Sun, 09 Jun 2013 22:58:22 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[gamedev]]></category>
		<category><![CDATA[1gam]]></category>
		<category><![CDATA[bacongamejam]]></category>
		<category><![CDATA[haxe]]></category>
		<category><![CDATA[haxeflixel]]></category>
		<category><![CDATA[nme]]></category>

		<guid isPermaLink="false">http://flagrantdisregard.com/?p=3245</guid>
		<description><![CDATA[Play it! Full source @ GitHub It&#8217;s dark and you are alone against a horde of VERY ANGRY things. Explore to find five different weapon types including the mighty auto-shotgun. Find candles to temporarily light up the darkness. Survive as long as you can. There are five different weapon types Conserve your ammo and switch [...]]]></description>
				<content:encoded><![CDATA[<p><iframe width="500" height="375" src="http://www.youtube.com/embed/nIxyJOm3tiM?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<ul>
<li><a href="http://flagrantdisregard.com/bacongamejam05/"><span style="line-height: 13px;">Play it!</span></a></li>
<li><a href="https://github.com/jotson/darkarena">Full source @ GitHub</a></li>
</ul>
<p>It&#8217;s dark and you are alone against a horde of VERY ANGRY things. Explore to find five different weapon types including the mighty auto-shotgun. Find candles to temporarily light up the darkness. Survive as long as you can.</p>
<ul>
<li>There are five different weapon types</li>
<li>Conserve your ammo and switch weapons carefully</li>
<li>Find candles to increase visibility</li>
<li>Difficulty increases over time</li>
<li>Can run through stunned monsters</li>
</ul>
<p>I entered the <a href="http://bacongamejam.org/jams/bacongamejam-05/">BaconGameJam</a> and finished a game (solo) in 48 hours! I am SO tired right now. This was my first jam and I&#8217;m fairly proud of what I was able to accomplish. I even recorded some acoustic guitar for the music track with 30 minutes left on the clock. As time ticked down, I was exhilarated and panic-stricken at the same time. It was interesting and I&#8217;ll probably do another jam soon.</p>
<p>The theme for BaconGameJam was &#8220;Lights Out&#8221;.  The most interesting part of this game, for me, was the system for implementing a flickering area light around the player. It&#8217;s just a mask with a hole in it overlayed on top of the scene. The flickering is achieved by randomly scaling the mask a small amount each frame.</p>
<p>Once again I used Haxe/NME+HaxeFlixel. It&#8217;s a great combo that allows very fast development.</p>
<img src="http://feeds.feedburner.com/~r/flagrantdisregard/~4/M403QWnsGUM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://flagrantdisregard.com/bacongamejam05-info/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#1GAM January 2013: 115</title>
		<link>http://flagrantdisregard.com/1gam-115/</link>
		<comments>http://flagrantdisregard.com/1gam-115/#comments</comments>
		<pubDate>Fri, 31 May 2013 23:48:48 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[gamedev]]></category>
		<category><![CDATA[1gam]]></category>
		<category><![CDATA[asteroids]]></category>
		<category><![CDATA[conet]]></category>
		<category><![CDATA[love2d]]></category>

		<guid isPermaLink="false">http://flagrantdisregard.com/?p=3235</guid>
		<description><![CDATA[Full source @ GitHub Download cross-platform (.love file) Download Windows 32 bit Download Windows 64 bit &#8220;115&#8243; is a small asteroid mining game I made for the #OneGameAMonth challenge for January 2013. This game was written in LÖVE2d. This was my first real, complete, published game. I created the music (using LMMS) and the art. All [...]]]></description>
				<content:encoded><![CDATA[<p><iframe width="500" height="375" src="http://www.youtube.com/embed/ph6iKJBmEAk?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<ul>
<li><a href="https://github.com/jotson/1gam-jan2013">Full source @ GitHub</a></li>
<li><a href="http://flagrantdisregard.com/wp-content/uploads/2013/01/115-1gam-johnwatson-1c9419e.love">Download cross-platform (.love file)</a></li>
<li><a href="http://flagrantdisregard.com/wp-content/uploads/2013/01/115-1gam-johnwatson-1c9419e_win-x86.zip">Download Windows 32 bit</a></li>
<li><a href="http://flagrantdisregard.com/wp-content/uploads/2013/01/115-1gam-johnwatson-1c9419e_win-x64.zip">Download Windows 64 bit</a></li>
</ul>
<p>&#8220;115&#8243; is a small asteroid mining game I made for the #OneGameAMonth challenge for January 2013. This game was written in <a href="https://love2d.org/">LÖVE2d</a>. This was my first real, complete, published game. I created the music (using LMMS) and the art. All of the sprite graphics and effects in the game are procedural. The spooky voice comes from the <a href="http://archive.org/details/ird059">Conet Numbers Stations project</a>.</p>
<img src="http://feeds.feedburner.com/~r/flagrantdisregard/~4/Mrdn3dVcJdo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://flagrantdisregard.com/1gam-115/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#1GAM February 2013: Meteor Defense</title>
		<link>http://flagrantdisregard.com/1gam-meteor-defense/</link>
		<comments>http://flagrantdisregard.com/1gam-meteor-defense/#comments</comments>
		<pubDate>Fri, 31 May 2013 23:47:28 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[gamedev]]></category>
		<category><![CDATA[1gam]]></category>
		<category><![CDATA[love2d]]></category>
		<category><![CDATA[nin]]></category>

		<guid isPermaLink="false">http://flagrantdisregard.com/?p=3233</guid>
		<description><![CDATA[Full source @ GitHub Download cross-platform (.love file) Downloads Windows 32 bit Download Windows 64 bit In this game you take indirect control of a swarm of meteor defense robots that destroy incoming meteors upon impact. It was written in LÖVE2d. The game features Creative Commons licensed music from Nine Inch Nails. The theme this month was [...]]]></description>
				<content:encoded><![CDATA[<p><iframe width="500" height="375" src="http://www.youtube.com/embed/3mOqFVJPNtE?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<ul>
<li><a href="https://github.com/jotson/1gam-feb2013">Full source @ GitHub</a></li>
<li><a href="http://flagrantdisregard.com/wp-content/uploads/2013/01/meteordefense-johnwatson-bbc8c5d.love">Download cross-platform (.love file)</a></li>
<li><a href="http://flagrantdisregard.com/wp-content/uploads/2013/01/meteordefense-johnwatson-bbc8c5d_win-x86.zip">Downloads Windows 32 bit</a></li>
<li><a href="http://flagrantdisregard.com/wp-content/uploads/2013/01/meteordefense-johnwatson-bbc8c5d_win-x64.zip">Download Windows 64 bit</a></li>
</ul>
<p>In this game you take indirect control of a swarm of meteor defense robots that destroy incoming meteors upon impact. It was written in <a href="http://love2d.org">LÖVE2d</a>. The game features Creative Commons licensed music from <a href="http://ghosts.nin.com/main/faq">Nine Inch Nails</a>. The theme this month was SOUND. One of the interesting features is that a lot of the animation and timing is based on the tempo of the song (61 bpm). The interval between meteors, the interval between new defense robots being spawned, the period of the defense robot bounce and sway and their flashing patterns, are all some multiple of the beat. Another interesting feature is the flocking behavior of the swarm of defense robots. All of the patterns and movement is emergent from the fairly simple rules of the individual units.</p>
<p>This game isn&#8217;t as polished as my January game. I didn&#8217;t have nearly as much free time this month. But it came together <em>much</em> quicker, almost a single weekend.</p>
<img src="http://feeds.feedburner.com/~r/flagrantdisregard/~4/Sdg9bNuLV_g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://flagrantdisregard.com/1gam-meteor-defense/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#1GAM March 2013: Reverse Invaders</title>
		<link>http://flagrantdisregard.com/1gam-reverse-invaders/</link>
		<comments>http://flagrantdisregard.com/1gam-reverse-invaders/#comments</comments>
		<pubDate>Fri, 31 May 2013 23:46:11 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[gamedev]]></category>
		<category><![CDATA[1gam]]></category>
		<category><![CDATA[crafty]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://flagrantdisregard.com/?p=3231</guid>
		<description><![CDATA[Play it! Full source @ GitHub The game is inspired by Space Invaders but in reverse. You don&#8217;t control the invaders or the humans but you can move your mouse pointer over an invader ship to activate a temporary shield. Try to get as many invaders as possible to the surface before they are slaughtered. Oh, [...]]]></description>
				<content:encoded><![CDATA[<p><iframe width="500" height="375" src="http://www.youtube.com/embed/OQZ8xB8lYBI?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<ul>
<li><a href="http://flagrantdisregard.com/invaders/">Play it!</a></li>
<li><a href="https://github.com/jotson/1gam-march2013">Full source @ GitHub</a></li>
</ul>
<p>The game is inspired by Space Invaders but in reverse. You don&#8217;t control the invaders or the humans but you can move your mouse pointer over an invader ship to activate a temporary shield. Try to get as many invaders as possible to the surface before they are slaughtered. Oh, and the invaders say 51 different things! Amazing!</p>
<p>I wrote this game twice: once as an HTML5/Javascript game built with the <a href="http://craftyjs.com">Crafty</a> engine and again with <a href="http://nme.io">NME</a> which builds to native desktop apps, Flash, Android, and iOS. It started as a demo project to learn Crafty and the quirks of Javascript for game dev. Chrome performance of the Javascript version is slightly better than Firefox. I haven&#8217;t tested in IE at all. But I was disappointed to find that running the Javascript game on mobile was a problem. <a href="http://phonegap.com/">PhoneGap</a> worked but the frame rates were bad (&lt;5fps). <a href="http://www.ludei.com/tech/cocoonjs">CocoonJS</a> looked promising but didn&#8217;t work at all. So I tried NME. While it isn&#8217;t perfect, it did allow me to build Flash, Linux, and Android apps from the same code all running at 60fps. The source code and all assets for both versions are at GitHub.</p>
<p>Crafty is a capable engine and it was fun to use. The javascript game features over 500 on screen entities (each bunker is something like 100 individual entities and there are 150 stars), particle effects, sprite animation/rotation/alpha, collision detection, and multi-channel sound. I also wrote a minimal sound manager and an object pool.</p>
<img src="http://feeds.feedburner.com/~r/flagrantdisregard/~4/_sX3ksdBxjg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://flagrantdisregard.com/1gam-reverse-invaders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#1GAM April 2013: Jellyfish Escape</title>
		<link>http://flagrantdisregard.com/1gam-jellyfish-escape/</link>
		<comments>http://flagrantdisregard.com/1gam-jellyfish-escape/#comments</comments>
		<pubDate>Fri, 31 May 2013 23:43:54 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[gamedev]]></category>
		<category><![CDATA[1gam]]></category>
		<category><![CDATA[haxe]]></category>
		<category><![CDATA[haxeflixel]]></category>
		<category><![CDATA[nme]]></category>

		<guid isPermaLink="false">http://flagrantdisregard.com/?p=3228</guid>
		<description><![CDATA[Play it! When I was very young, I played a game called Bubble Ghost. For April, I essentially just copied the mechanics of that game so that I could spend most of my time on art production. I learned a great deal about 2D animation, tile-based level building (with Tiled), a little bit about 3D modelling [...]]]></description>
				<content:encoded><![CDATA[<p><iframe width="500" height="375" src="http://www.youtube.com/embed/_dO4UWZZCGU?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<ul>
<li><a href="http://flagrantdisregard.com/jellyfish">Play it!</a></li>
</ul>
<p>When I was very young, I played a game called <a href="http://en.wikipedia.org/wiki/Bubble_Ghost">Bubble Ghost</a>. For April, I essentially just copied the mechanics of that game so that I could spend most of my time on art production. I learned a great deal about 2D animation, tile-based level building (with Tiled), a little bit about 3D modelling (with Blender), and got to practice my drawing, which I love.</p>
<p>I stuck with Haxe/NME with the HaxeFlixel framework for April. The code came together in about 7 days. One hurdle involved getting pixel-perfect collision detection working. This is my first game where the player and the things it touches are not only oddly shaped but also change shape constantly. I spent about two days getting collision detection working including optimizations for mobile.</p>
<p>I have a lot of plans for this game. More enemies, more environmental hazards, puzzles, and many, many more levels. When it&#8217;s ready, I plan to release it for mobile.</p>
<img src="http://feeds.feedburner.com/~r/flagrantdisregard/~4/gE6NEpP7Ljs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://flagrantdisregard.com/1gam-jellyfish-escape/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#1GAM May 2013: Duel!</title>
		<link>http://flagrantdisregard.com/1gam-duel/</link>
		<comments>http://flagrantdisregard.com/1gam-duel/#comments</comments>
		<pubDate>Fri, 31 May 2013 23:42:10 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[gamedev]]></category>
		<category><![CDATA[1gam]]></category>
		<category><![CDATA[haxe]]></category>
		<category><![CDATA[haxeflixel]]></category>
		<category><![CDATA[nme]]></category>

		<guid isPermaLink="false">http://flagrantdisregard.com/?p=3222</guid>
		<description><![CDATA[http://www.youtube.com/watch?v=XnKHd9riIiQ Get it free @ Google Play Full source @ GitHub This month I tackled multitouch and single-screen multiplayer. The game itself is fairly simple and, I&#8217;m proud to say, I was able to create the core game in 2 hours and 15 minutes. Still with Haxe/NME+HaxeFlixel&#8212;I&#8217;m feeling very productive with it. With all the #1GAM [...]]]></description>
				<content:encoded><![CDATA[<p>http://www.youtube.com/watch?v=XnKHd9riIiQ</p>
<ul>
<li><a href="https://play.google.com/store/apps/details?id=com.happyshiny.duel">Get it free @ Google Play</a></li>
<li><a href="https://github.com/jotson/1gam-may2013">Full source @ GitHub</a></li>
</ul>
<p>This month I tackled multitouch and single-screen multiplayer. The game itself is fairly simple and, I&#8217;m proud to say, I was able to create the core game in 2 hours and 15 minutes. Still with Haxe/NME+HaxeFlixel&#8212;I&#8217;m feeling very productive with it. With all the #1GAM practice I&#8217;ve been getting, I can go from zero to stuff moving on the screen in about 15 minutes now.</p>
<p>To play: First, find a friend. Launch missiles at each other by holding a finger on the screen until it charges up. Then lift your finger to release it. You can charge three missiles simultaneously. Each player&#8217;s base can take exactly 10 hits before being destroyed. I only tested the game on my Nexus 7 so, no promises it&#8217;ll work on your device.</p>
<img src="http://feeds.feedburner.com/~r/flagrantdisregard/~4/0RDXe8xFRh8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://flagrantdisregard.com/1gam-duel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pants</title>
		<link>http://flagrantdisregard.com/pants/</link>
		<comments>http://flagrantdisregard.com/pants/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 19:09:49 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[conversations]]></category>

		<guid isPermaLink="false">http://flagrantdisregard.com/?p=3094</guid>
		<description><![CDATA[Me: Are you guys dressed yet? The Girl: No. The Boy: No&#8230; I&#8217;m not even wearing pants.]]></description>
				<content:encoded><![CDATA[<blockquote><p><strong>Me:</strong> Are you guys dressed yet?</p>
<p><strong>The Girl: </strong>No.</p>
<p><strong>The Boy: </strong>No&#8230; I&#8217;m not even wearing pants.</p></blockquote>
<img src="http://feeds.feedburner.com/~r/flagrantdisregard/~4/nzwZN0aHnY8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://flagrantdisregard.com/pants/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It. Just. Works.</title>
		<link>http://flagrantdisregard.com/it-just-works/</link>
		<comments>http://flagrantdisregard.com/it-just-works/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 17:47:07 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://flagrantdisregard.com/?p=3091</guid>
		<description><![CDATA[Just upgraded the guts of my Ubuntu 11.10 desktop to Sandy Bridge: Asus P8Z68-V PRO/GEN3 paired with an i5-2500K and 16GB of G.SKILL DDR3 1866. I&#8217;m using an Nvidia card rather than the onboard graphics. No drivers to install. No fuss. Ubuntu booted without missing a beat. It just works.]]></description>
				<content:encoded><![CDATA[<p>Just upgraded the guts of my Ubuntu 11.10 desktop to Sandy Bridge: Asus P8Z68-V PRO/GEN3 paired with an i5-2500K and 16GB of G.SKILL DDR3 1866. I&#8217;m using an Nvidia card rather than the onboard graphics.</p>
<p>No drivers to install. No fuss. Ubuntu booted without missing a beat. It just works.</p>
<img src="http://feeds.feedburner.com/~r/flagrantdisregard/~4/s3b1clRYzDA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://flagrantdisregard.com/it-just-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cycling + Google Spreadsheets</title>
		<link>http://flagrantdisregard.com/cycling-google-spreadsheets/</link>
		<comments>http://flagrantdisregard.com/cycling-google-spreadsheets/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 19:30:10 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[health & fitness]]></category>

		<guid isPermaLink="false">http://flagrantdisregard.com/?p=3067</guid>
		<description><![CDATA[I&#8217;ve been cycling on a stationary bike for a little over a month now. The bike itself has gizmos to record miles and speeds and stuff but I wanted to keep a record that was outside of the bike itself. Looked around for some software for this (of course) and found a bunch of software [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been cycling on a stationary bike for a little over a month now. The bike itself has gizmos to record miles and speeds and stuff but I wanted to keep a record that was outside of the bike itself. Looked around for some software for this (of course) and found a bunch of software and online services that would fit the bill (of course) but decided to just go simple with a Google docs spreadsheet.</p>
<p>My spreadsheet has three columns that track the date I biked, how far I went, and how long it took me: Date, Miles, Time. That&#8217;s all I care about, for now. But from that I can derive data like my average speed (miles/time) and do a chart of my progress. But what I really want to know is how far I&#8217;ve gone in total, how far I&#8217;ve gone this week, and how far I&#8217;ve gone this month. And that&#8217;s when I discovered the magic that is the Google docs <a href="https://docs.google.com/support/bin/answer.py?answer=1388882">QUERY</a> function. It is very cool. It basically lets you do something akin to a SQL select statement on your spreadsheet data. So here&#8217;s what I came up with to automatically calculate my total miles this week and this month (overall total is easily done with the built-in sum() function). The hairy stuff below are the contents of cells and you can copy and paste into your spreadsheet.</p>
<p>This week:</p>
<p><code>=query(A:B, "select sum(B) where A &gt;= date '" &amp; text(date(year(today()-weekday(today())+1),month(today()-weekday(today())+1), day(today()-weekday(today())+1)), "YYYY-MM-DD") &amp;  "' and A &lt;= date '" &amp; text(date(year(today()-weekday(today())+7),month(today()-weekday(today())+7), day(today()-weekday(today())+7)), "YYYY-MM-DD") &amp; "' label sum(B) 'THIS WEEK " &amp; text(date(year(today()-weekday(today())+1),month(today()-weekday(today())+1), day(today()-weekday(today())+1)), "M/D") &amp; "'")</code></p>
<p>This month:</p>
<p><code>=query(A:B, "select sum(B) where A >= date '" &#038; text(date(year(today()),month(today()), 1), "YYYY-MM-DD") &#038;  "' and A <= date '" &#038; text(date(year(today()),month(today())+1, 1)-1, "YYYY-MM-DD") &#038; "' label sum(B) 'THIS MONTH " &#038; upper(text(date(year(today()),month(today()), 1), "MMM")) &#038; "'")</code></p>
<p>So let's break down the "This week" query. The cell starts with <code>=query()</code> which tells the spreadsheet to calculate that function and put the result in this cell. <code>A:B</code> is the range for the query. In this case, every cell in columns A and B (where A has my dates and B has my miles). Then the query itself is structured like this:</p>
<p><code>select sum(B) where A >= date 'XXX' and A <= date 'YYY' label sum(B) 'ZZZ'</code></p>
<p>I took out all of the date calculations so you can see it more clearly. It just says "get the sum of column B where column A is between two dates". Pretty simple. The main trick is calculating the date ranges for the start and end of the current week and the start and end of the current month. And here's how you do that. Hopefully you can see where the calculations below plug in above and follow along.</p>
<p>The current week starts on <code>today()-weekday(today())+1</code>. That is, "today - the day of the week + 1". So if today is Monday Oct 24, then this code would calculate: Monday Oct 24 - 2 + 1. Which ends up being Sunday Oct 23. And of course the last day of the week is just 6 days after that: <code>today()-weekday(today())+7</code>. (This is just the first expression +6 where the +1 and +6 have been summed.)</p>
<p>"This month" works exactly the same way but with different dates. The current month starts on <code>date(year(today()),month(today()), 1)</code>. That is, "a new date based on the current year, the current month, and use 1 for the day". And the current month ends on <code>date(year(today()),month(today())+1, 1)-1</code>. That is, "a new date based on the 1st of the month after this one minus 1 day". You can optimize this a little by using the <code>eomonth()</code> function (which calculates end of month dates)---but I like my way because I can see exactly what's going on.</p>
<img src="http://feeds.feedburner.com/~r/flagrantdisregard/~4/Keodw57BT_s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://flagrantdisregard.com/cycling-google-spreadsheets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It’s the little things</title>
		<link>http://flagrantdisregard.com/its-the-little-things/</link>
		<comments>http://flagrantdisregard.com/its-the-little-things/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 06:36:14 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[conversations]]></category>
		<category><![CDATA[food]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[peanut butter]]></category>
		<category><![CDATA[son]]></category>

		<guid isPermaLink="false">http://flagrantdisregard.com/?p=1951</guid>
		<description><![CDATA[Son: Dad, I need help. Me: With what? Son: I&#8217;m trying to make a peanut butter and jelly but I can&#8217;t open the jelly. It&#8217;s too hard. Me: OK, I can help you with that. Son: And the second problem is I can&#8217;t find the bread! Me: We&#8217;ll find that, too. Come on. Son: Thanks, [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p><strong>Son:</strong> Dad, I need help.<br />
<strong>Me:</strong> With what?<br />
<strong>Son:</strong> I&#8217;m trying to make a peanut butter and jelly but I can&#8217;t open the jelly. It&#8217;s too hard.<br />
<strong>Me:</strong> OK, I can help you with that.<br />
<strong>Son:</strong> And the second problem is I can&#8217;t find the bread!<br />
<strong>Me:</strong> We&#8217;ll find that, too. Come on.<br />
<strong>Son:</strong> Thanks, Dad.</p></blockquote>
<img src="http://feeds.feedburner.com/~r/flagrantdisregard/~4/tcu5AHzalV0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://flagrantdisregard.com/its-the-little-things/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
