<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>patorjk.com &#187; Web Apps</title>
	<atom:link href="http://patorjk.com/blog/category/web-apps/feed/" rel="self" type="application/rss+xml" />
	<link>http://patorjk.com/blog</link>
	<description>web apps, programming talk, and random thoughts</description>
	<lastBuildDate>Fri, 03 Feb 2012 04:02:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>New Keyboard Layout Analyzer (Preview)</title>
		<link>http://patorjk.com/blog/2012/02/02/new-keyboard-layout-analyzer-preview/</link>
		<comments>http://patorjk.com/blog/2012/02/02/new-keyboard-layout-analyzer-preview/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 00:06:27 +0000</pubDate>
		<dc:creator>patorjk</dc:creator>
				<category><![CDATA[General News]]></category>
		<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://patorjk.com/blog/?p=1528</guid>
		<description><![CDATA[You can now try out a preview version of the new Keyboard Layout Analyzer. I completely re-did it from scratch. I know I&#8217;ve done that before, but I&#8217;ve learned a lot about JavaScript and HTML5 over the past two years and thought the application would be best served with a fresh start. Below you can [...]]]></description>
			<content:encoded><![CDATA[<p>You can now try out a preview version of the new <a href="http://patorjk.com/keyboard-layout-analyzer/preview">Keyboard Layout Analyzer</a>. I completely re-did it from scratch. I know I&#8217;ve done that <a href="http://patorjk.com/blog/2009/07/07/new-keyboard-layout-analyzer-less-lines-of-code/">before</a>, but I&#8217;ve learned a lot about JavaScript and HTML5 over the past two years and thought the application would be best served with a fresh start. Below you can see a screen capture of the new configuration page.</p>
<div class="wp-caption aligncenter" style="width: 510px"><img src="http://patorjk.com/images/blog-2012/kla-2012-s1.png" width="500" height="250" class="size-full wp-image-1100" />
<p class="wp-caption-text">Configuration Tab</p>
</div>
<p>The biggest problem with the previous Analyzer was that it didn&#8217;t have the best configuration options. And even then, the top-based tab interface led to a lot of people not even noticing that configuration options existed. My main goal was to make configuration much more intuitive and flexible. </p>
<p>The previous Analyzer also assumed keys to be atomic and wouldn&#8217;t let you mix and match characters from different keys. For English keyboards this was mostly fine, but when I started learning about Foreign layouts and specialized layouts like the <a href="http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard#Programmer_Dvorak">Programmer Dvorak</a>, I realized I&#8217;d made a fatal mistake. The old code centered around atomic keys and even used image icons for the configuration display. For this version, I decided to draw the keyboard on a canvas element and to allow keys to mix and match characters. Theoretically, the new setup could even analyze unusual layouts like the <a href="http://en.wikipedia.org/wiki/Maltron">Maltron</a> layout, but I haven&#8217;t yet created Keyboard Maps for that layout, nor have done much testing in that area (though it&#8217;s a goal).</p>
<p>I also tried to make the app look more visually appealing and to provide a better user experience. The old layout was kind of amateurish looking, a number of people didn&#8217;t utilize the top-based tabbed interface, and the amount of scrolling you had to do on the output page made it easy to miss interesting information &#8211; not to mention that I was using pie charts, which are notoriously bad at presenting this type of information (I had a decent number of people email me asking me to switch to bar charts). I tried my best at making something that was reasonably ok looking, and I hope the new side-tabs making navigating the information easier.</p>
<p>I&#8217;ve recently taken on a lot at work, so that has slowed me down quite a bit, but I hope to finish off the rest of the output sections in the coming month. If you find any bugs or have any suggestions please let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://patorjk.com/blog/2012/02/02/new-keyboard-layout-analyzer-preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is ___ more of a boy&#8217;s name, or a girl&#8217;s name?</title>
		<link>http://patorjk.com/blog/2012/01/22/is-___-more-of-a-boys-name-or-a-girls-name/</link>
		<comments>http://patorjk.com/blog/2012/01/22/is-___-more-of-a-boys-name-or-a-girls-name/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 01:44:23 +0000</pubDate>
		<dc:creator>patorjk</dc:creator>
				<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://patorjk.com/blog/?p=1458</guid>
		<description><![CDATA[Photo By Zach Klein So my boss came into my office on Friday and off handily asked me if &#8220;Stacy&#8221; was more of a boy&#8217;s name, or more of a girl&#8217;s name. I immediately thought &#8220;piece of cake!&#8221; and brought up my Baby Naming Trends Tool, only to be really confused that there was no [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 260px"><img src="http://patorjk.com/images/blog-2012/boygirls.png" width="275" height="185" class="size-full wp-image-1100" />
<p class="wp-caption-text">Photo By <a href='http://www.flickr.com/photos/zachklein/54143396/'>Zach Klein</a></p>
</div>
<p>So my boss came into my office on Friday and off handily asked me if &#8220;Stacy&#8221; was more of a boy&#8217;s name, or more of a girl&#8217;s name. I immediately thought &#8220;piece of cake!&#8221; and brought up my <a href="http://patorjk.com/baby-names/trends/">Baby Naming Trends Tool</a>, only to be really confused that there was no feature for determining this. &#8220;Wait, I remember programming this feature last Fall, where is it?&#8221; I thought. Then I remembered I had waited to push the update out until I finished a couple of other features (which remain unfinished). D&#8217;oh! </p>
<p>Since male vs female feature was kind of fun, I decided cut out the unfinished functionality (for now), and push out the update so users could query the data. Now you can see if names are more popular for girls or for guys. Just place a &#8220;m:&#8221; or &#8220;f:&#8221; before a name when you enter it in. Here are some examples of names commonly given to both boys and girls:</p>
<ul>
<li><a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1930-2010/m:casey,f:casey/">Casey</a> &#8211; Very close, more male leaning though.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1880-2010/m:jordan,f:jordan/">Jordan</a> &#8211; More male leaning.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1930-2010/m:mackenzie,f:mackenzie/">Mackenzie</a> &#8211; More female leaning.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1880-2010/m:pat,f:pat/">Pat</a> &#8211; A nick name, but popular with female babies in the 30&#8242;s and 40&#8242;s (though it&#8217;s almost no longer used). <a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1880-2010/m:patrick,f:patti/">Patrick and Patti</a> are more popular.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1930-2010/m:quinn,f:quinn/">Quinn</a> &#8211; More female leaning.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1880-2010/m:taylor,f:taylor/">Riley</a> &#8211; More males, but trending towards more females.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1880-2010/m:stacy,f:stacy/">Stacy</a> &#8211; More female leaning.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1880-2010/m:taylor,f:taylor/">Taylor</a> &#8211; More female leaning.</li>
</ul>
<p>However, when creating this feature, I noticed some interesting abnormalities. No popular names seemed to be 100% male or female, even names that were obviously male or female. For example, according to the data, 11 females were named <a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1880-2010/m:john,f:john/">John</a> in 2010, and during its peak popularity, when 80,000 males a year were being named John, the data says 200-300 females a year were being named John. Even though that means only ~0.375% of John&#8217;s were female, it still seems bizarre that someone would name a baby girl &#8220;John&#8221;. I wondered if this was a mistake on my part, but the underlying data showed the numbers to be correct.</p>
<p>The idea that someone would give a baby girl or boy a name of the opposite sex isn&#8217;t too far fetched, I know a few guys with names more commonly associated with girls, but are there really hundreds of guys named <a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1880-2010/m:jennifer,f:jennifer/">Jennifer</a> walking around in the US? I accept that there may be a hand full, but my guess for the real reason this anomaly appears is because nurses or doctors sometimes make mistakes when recording the data. That makes me a little sad, but I suppose any data that&#8217;s hand recorded is going to have some errors. Though if this is the case, since this data comes from the <a href="http://www.ssa.gov/oact/babynames/limits.html">US Social Security</a> website, does this mean that these people may have their sex incorrectly recorded on their birth certificate? Though then again, perhaps people give a name for their baby, but then change it when it&#8217;s born and they find out it&#8217;s a different sex. Or then again, maybe there are lots of male Jennifers out there. Whatever the case, it makes for an interesting blip in the data.</p>
<p><strong>Keyboard Layout Analyzer Update</strong></p>
<p>I&#8217;ve rewritten the Keyboard Layout Analyzer. Back in November I told a guy I was close to being done and would have a new version up in &#8220;2 weeks&#8221;. I then told two other people in December who asked for additional features that I&#8217;d have it up in &#8220;2 weeks&#8221;. I now feel a little bit like a jack ass, but I honestly have been really busy. My new plan is to simply put up a preview version soon. The new app is mostly done, but rough around the edges in the output department.</p>
]]></content:encoded>
			<wfw:commentRss>http://patorjk.com/blog/2012/01/22/is-___-more-of-a-boys-name-or-a-girls-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plotting and Analyzing US Baby Naming Data</title>
		<link>http://patorjk.com/blog/2011/07/05/plotting-and-analyzing-us-baby-naming-data/</link>
		<comments>http://patorjk.com/blog/2011/07/05/plotting-and-analyzing-us-baby-naming-data/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 04:03:10 +0000</pubDate>
		<dc:creator>patorjk</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Apps]]></category>

		<guid isPermaLink="false">http://patorjk.com/blog/?p=1285</guid>
		<description><![CDATA[Photo By mahalie I&#8217;ve created a new tool that allows you to query US baby naming data from the past 130 years and play around with it on an interactive chart. I got the idea after stumbling upon the data at the US Social Security website. To cut to the chase, below you can see [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 160px"><img src="http://patorjk.com/images/blog-2011/preggers.png" alt="" title="" width="150" height="200" class="size-full" />
<p class="wp-caption-text">Photo By <a href='http://www.flickr.com/photos/mahalie/154017705/'>mahalie</a></p>
</div>
<p>I&#8217;ve created a <a href="http://patorjk.com/baby-names/trends/">new tool</a> that allows you to query US baby naming data from the past 130 years and play around with it on an interactive chart. I got the idea after stumbling upon the data at the <a href="http://www.ssa.gov/oact/babynames/limits.html">US Social Security</a> website.</p>
<p>To cut to the chase, below you can see some interesting effects of our culture on naming trends.</p>
<ul>
<li><a href="http://patorjk.com/baby-names/trends/#!/n4m0f0/1910-2010/padme,leia,anakin,han/">Star Wars</a> &#8211; George Lucas created the names &#8220;Anakin&#8221; and &#8220;Padme&#8221;, and he had a big impact on the number of babies given the name &#8220;Han&#8221;, &#8220;Leia&#8221; and &#8220;Luke&#8221;. I didn&#8217;t include Luke on the chart because it dwarfed the others so much, but between 1880 and 1977, <strong>18,027</strong> babies were named Luke, between 1977 and now, <strong>176,125</strong> babies were given that name.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n1m0f0/1880-2010/hermione/">Hermione</a> &#8211; Apparently Hermione is a real name, though the 478 babies given the name since 2000 were probably due to the recent popularity in the Harry Potter series.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n5m0f0/1910-2010/woodrow,warren,herbert,franklin,calvin/">US Presidents</a> &#8211; My friend Ben found this one. Back in the early twentieth century, who got elected president had a big impact on what people named their babies.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n2m0f0/1910-2010/kennedy,reagan/">Reagan and Kennedy</a> &#8211; I don&#8217;t want to get too political, and I&#8217;m just talking out of my ass here, but I wonder if the idealizing of past political heroes (from different sides of the aisle) has led to the recent surge in these names.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n4m0f0/1970-2010/donatello,michaelangelo,raphael,leonardo/">Ninja Turtles</a> &#8211; The Ninja Turtle craze of the late-80&#8242;s / early 90&#8242;s seems to have caused a small impact on naming trends in that time period.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n1m0f0/1910-2010/paris/">Paris</a> &#8211; Paris Hilton&#8217;s sex tape leaked onto the internet in 2003 and became a big news story. For some reason this inspired hundreds of people to name their kid after her.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n1m0f0/1880-2010/osama/">Osama</a> &#8211; The frequency of people naming their kid &#8220;Osama&#8221; actually increased after the 1998 embassy bombings, but I&#8217;m guessing after 9-11, people realized naming their kid after after the world&#8217;s most wanted terrorist was probably not a good idea.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n1m0f0/1970-2010/miley/">Miley</a> &#8211; In 2005, 26 babies were born with the name &#8220;Miley&#8221;. In March of 2006, Hannah Montana debuted with star Miley Cyrus on the Disney Channel. That year the name started to sky rocket in popularity, and peaked in popularity in 2008 when 2,643 babies were given the name.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n1m0f0/1970-2010/selena/">Selena</a> &#8211; In 1995, this name shot up in popularity by 400%, with 3,839 babies given the name &#8220;Selena&#8221;. This was most likely was caused by the 1995 death of latin super star &#8220;<a href="http://en.wikipedia.org/wiki/Selena">Selena Quintanilla-Pérez</a>&#8220;. Interestingly, Selena Gomez has not had the effect on &#8220;Selena&#8221; that Miley Cyrus has had with &#8220;Miley&#8221;.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n1m0f0/1970-2010/carson/">Carson</a> &#8211; This name had been slowly increasing in popularity, but it started to skyrocket in 1998, which coincidentally was the year MTV debuted its mega hit TV show <a href="http://en.wikipedia.org/wiki/Total_Request_Live">TRL</a>, with host Carson Daily. The name has maintained its popularity, so its probably not all due to Daily, but since TRL was a young person&#8217;s show, and <a href="http://en.wikipedia.org/wiki/Carson_(given_name)">not many notable people are named Carson</a>, he probably had some effect in getting the ball rolling.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n1m0f0/1880-2010/shirley/">Shirley</a> &#8211; Shirley Temple shot to super stardom in 1934 with <a href="http://en.wikipedia.org/wiki/Bright_Eyes_(film)">Bright Eyes</a>, and so did the use of her name for new borns.</li>
<li><a href="http://patorjk.com/baby-names/trends/#!/n1m0f0/1950-2010/britney/">Britney</a> &#8211; Britney Spears dropped &#8220;&#8230;Baby One More Time&#8221; in 1999 and had a big impact on the &#8220;Britney&#8221; (interestingly, the version spelled &#8220;Brittany&#8221; stayed in steep decline during this time period).</li>
</ul>
<p>These were all found by just trying out different names and looking at the time period for when the names peaked or dropped in popularity.</p>
<p><strong>Chart Library and Modifications</strong></p>
<p>For those of you who are curious, I used Martin Kleppmann&#8217;s <a href="https://github.com/ept/plotkit">PlotKit</a> repo as a starting place for the chart (that repo is a heavily modified version of Plotkit with lots of new features and fixes). I then modified it to add in some additional features and minor bug fixes, including the mouse interaction stuff. I&#8217;ll probably submit my changes back to him at some point, though right now I feel like I kind of hacked stuff into it, so I&#8217;ll probably wait until I polish it up and the changes are field tested more. If you have any trouble with the chart please let me know.</p>
<p>The mouse interaction stuff was done by creating a separate canvas element and having it overlay the chart. The dynamic dots you see are then drawn on this canvas. This is done because re-drawing the whole chart is time consuming. The one exception to this is IE7 (and possibly IE8), for which I couldn&#8217;t get the overlay to work. So for those browsers, the whole chart re-drawn when it changes. So you&#8217;ll notice if you use IE7 that mouse interaction isn&#8217;t smooth, while if you use Chrome, FireFox, or IE9, things should be pretty smooth.</p>
]]></content:encoded>
			<wfw:commentRss>http://patorjk.com/blog/2011/07/05/plotting-and-analyzing-us-baby-naming-data/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Extendible BBCode Parser in JavaScript</title>
		<link>http://patorjk.com/blog/2011/05/07/extendible-bbcode-parser-in-javascript/</link>
		<comments>http://patorjk.com/blog/2011/05/07/extendible-bbcode-parser-in-javascript/#comments</comments>
		<pubDate>Sat, 07 May 2011 19:52:11 +0000</pubDate>
		<dc:creator>patorjk</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://patorjk.com/blog/?p=1078</guid>
		<description><![CDATA[Photo By Dean Terry I decided to try my hand at implementing a BBCode parser in JavaScript. You can play around with it online here, and download the source here. I had looked around a little bit and noticed that the existing JavaScript BBCode parsers had at least a few of the following issues: They [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1100" class="wp-caption alignright" style="width: 260px"><img src="http://patorjk.com/blog/wp-content/uploads/2011/05/strange.png" alt="" title="Avatar" width="250" height="149" class="size-full wp-image-1100" />
<p class="wp-caption-text">Photo By <a href='http://www.flickr.com/photos/therefore/475120436/in/faves-40423570@N07/'>Dean Terry</a></p>
</div>
<p>I decided to try my hand at implementing a <a href="https://secure.wikimedia.org/wikipedia/en/wiki/BBCode">BBCode</a> parser in JavaScript. You can play around with it online <a href="http://patorjk.com/bbcode-previewer/">here</a>, and download the source <a href="http://patorjk.com/bbcode-previewer/xbbcode-src.zip">here</a>.</p>
<p>I had looked around a little bit and noticed that the existing JavaScript BBCode parsers had at least a few of the following issues:</p>
<ul>
<li>They didn&#8217;t report errors on misaligned tags (e.g., [b][u]test[/b][/u]).</li>
<li>They couldn&#8217;t handle tags of the same type that were nested within each other (e.g., [color=red]red[color=blue]blue[/color]red again[/color]). This happens because their regex will look for the first closing tag it can find.</li>
<li>They couldn&#8217;t handle BBCode&#8217;s list format (e.g., [list][*]item 1[*]item 2[/list]).</li>
<li>They didn&#8217;t report errors on incorrect parent-child relationships (e.g., [list][td]item 1?[/td][/list]).</li>
<li>They weren&#8217;t easily extendible.</li>
</ul>
<p>I naively thought it&#8217;d be easy to quickly whip up a parser, and at first it was. Most BBCode tags can be implemented with a simple find and replace. However, I quickly ran into the issues of dealing with nested tags of the same type, the noparse tag, and the list tag&#8217;s annoying [*] tag (which doesn&#8217;t have a closing tag). Luckily, I came across a neat blog post on <a href="http://blog.stevenlevithan.com/archives/reverse-recursive-pattern">finding nested patterns in JavaScript</a>, which came in handy for isolating tag pairs, from the inner-most on up. Taking the idea from that post, one can do something like this to process the inner tags first and avoid the nested tag problem:</p>
<pre class="brush:js">
var str = "[list][list]test[/list][/list]",
    re = /\[([^\]]*?)\](.*?)\[\/\1\]/gi;
while (str !== (str = str.replace(re, function(strMatch, subM1, subM2) {
    return "<some-html-tag>" + subM2 + "</some-html-tag>";
})));
// str = "<some-html-tag><some-html-tag>test</some-html-tag></some-html-tag>"
</pre>
<p>That idea works well, though you can&#8217;t implement a noparse tag if you process the inner-most tags first. So I decided to pre-process the BBCode with something similar to the idea above and add in nested-depth information to each open and close tag. Once all of the tags had that, I could  parse the processed code with a regex that could easily match-up the correct open and close tags.</p>
<p>To get around the issue of the [*] tag having no closing tag, I wrote code that inserted [/*] tags where they were supposed to go during the pre-processing period. I wont go into the algorithm here, but you can dig into the code if you&#8217;re interested.</p>
<p>Also, I should note that the fact that JavaScript allows you to use a function as the second parameter to the <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/replace">replace method</a> makes processing the tags really easy. Once you match a set of tags, you can recursively call the parse function on that tag&#8217;s contents from inside of the function you passed to replace.</p>
<p><strong>Using the parser</strong></p>
<p>To use the use the parser, you&#8217;d simply include xbbcode.js and xbbcode.css files somewhere on your page (which are contained in the zip file linked above), and then call the XBBCODE object from somewhere in your JavaScript:</p>
<pre class="brush:js">
var result = XBBCODE.process({
    text: "Some bbcode to process here",
    removeMisalignedTags: false,
    addInLineBreaks: false
});
console.log("Errors: " + result.error);
console.dir(result.errorQueue);
console.log(result.html);// the HTML form of your BBCode
</pre>
<p><strong>Adding new tags</strong></p>
<p>To add a new tag to your BBCode, add properties to the &#8220;tags&#8221; object inside of the XBBCODE object. For example, say you wanted to add a tag called [googleit] which would change its contents into a link of its google search results. You&#8217;d implement that by adding this to the tags object:</p>
<pre class="brush:js">
"googleit": {
    openTag: function(params,content) {
        var website = "\"http://www.google.com/#q=" + content + '"';
        return '&lt;a href=' + website + '>';
    },
    closeTag: function(params,content) {
        return '&lt;/a>';
    }
}
</pre>
<p>Then you could have BBCode like this: &#8220;[googleit]ta-da![/googleit]&#8221; which would be transformed into this: &#8220;&lt;a href=&#8221;http://www.google.com/#q=ta-da!&#8221;>ta-da!&lt;/a>&#8221;</p>
<p>If you have any suggestions or find any bugs let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://patorjk.com/blog/2011/05/07/extendible-bbcode-parser-in-javascript/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Programming Trivia App</title>
		<link>http://patorjk.com/blog/2011/04/23/programming-trivia-app/</link>
		<comments>http://patorjk.com/blog/2011/04/23/programming-trivia-app/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 20:23:04 +0000</pubDate>
		<dc:creator>patorjk</dc:creator>
				<category><![CDATA[Web Apps]]></category>

		<guid isPermaLink="false">http://patorjk.com/blog/?p=1059</guid>
		<description><![CDATA[This has been on my computer for months and while it&#8217;s not completely finished, I wanted get a version up since I&#8217;m starting work on it again, so I present Programming Trivia Questions. It&#8217;s born out of the basic idea I had for my old Programming Quiz App, which I released last year. Shortly after [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_1062" class="wp-caption alignleft" style="width: 209px"><img src="http://patorjk.com/blog/wp-content/uploads/2011/04/rubiks_cube.png" alt="" title="A place of puzzles..." width="199" height="300" class="size-full wp-image-1062" /><p class="wp-caption-text">Photo By <a href='http://www.flickr.com/photos/45662099@N07/5230976433/'>Mirko Junge</a></p></div>This has been on my computer for months and while it&#8217;s not completely finished, I wanted get a version up since I&#8217;m starting work on it again, so I present <a href="http://patorjk.com/programming-trivia/">Programming Trivia Questions</a>. </p>
<p>It&#8217;s born out of the basic idea I had for my old <a href="http://patorjk.com/blog/2010/03/18/quiz-app-release/">Programming Quiz App</a>, which I released last year. Shortly after creating that app I realized that creating a list of good quiz questions was actually kind of hard, and expecting someone to write a full, non-goofy quiz was probably too much. However, coming up with a question or two is usually pretty easy. So I figured I&#8217;d change the app to be like a question database where questions were tagged with certain keywords, and the user could just select categories and get questions on those categories.</p>
<p>I&#8217;m not at that point yet, but I have a working demo with 20 questions. The next step will be to connect it up to a database (right now it&#8217;s all client side) and then to allow users to submit questions. Anyway, I figured 20 random programming-themed questions would be mildly entertaining so I figured I&#8217;d share it with you all. If you have any suggestions let me know.</p>
<p>Oh, one last note, my favorite JS graphing library, <a href="http://www.liquidx.net/plotkit/">Plotkit</a>, doesn&#8217;t seem like its being updated anymore (it&#8217;s a fantastic library, but the last update was in 2006). I made some modifications to it for this app (I changed how the colorscheme mechanism worked for bar charts if just one dataset was used) and am debating forking that library or using another one. If anyone has any graphing library suggestions let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://patorjk.com/blog/2011/04/23/programming-trivia-app/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AAC Police Brief Analyzer</title>
		<link>http://patorjk.com/blog/2011/04/15/aac-police-brief-analyzer/</link>
		<comments>http://patorjk.com/blog/2011/04/15/aac-police-brief-analyzer/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 16:39:26 +0000</pubDate>
		<dc:creator>patorjk</dc:creator>
				<category><![CDATA[Web Apps]]></category>

		<guid isPermaLink="false">http://patorjk.com/blog/?p=1029</guid>
		<description><![CDATA[I&#8217;ve created a new Facebook app which I call Anne Arundel County Police Brief Analyzer. I noticed my local police department had a Facebook page and that they posted their police briefs to this page. The briefs all followed the same format, so I decided to see if I could parse them to grab out [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_1051" class="wp-caption alignright" style="width: 185px"><img src="http://patorjk.com/blog/wp-content/uploads/2011/04/bm1.png" alt="" title="Batman Cake" width="175" height="234" class="size-full wp-image-1051" /><p class="wp-caption-text">Photo By <a href='http://www.flickr.com/photos/dustinq/1438832543/'>dooq</a></p></div>
<p>I&#8217;ve created a new Facebook app which I call <a href="http://patorjk.com/aacpd-brief-analyzer/">Anne Arundel County Police Brief Analyzer</a>. I noticed my local police department had a Facebook page and that they posted their police briefs to this page. The briefs all followed the same format, so I decided to see if I could parse them to grab out some statistics.</p>
<p>The app is pretty simple, and right now all its doing is counting the number of times the various cities in the county are mentioned in the briefing sub-headings. Basically it answers the question: &#8220;Which cities show up in the police briefs the most?&#8221; This app would probably be more helpful with population data, however, it was mostly just done as an experiment, so I probably wont go any further with it. However, I figured I&#8217;d post it up since I found it kind of interesting.</p>
<p>The only hitch to creating the app was that you can only grab the 25 notes from Facebook per request, at least with their JavaScript SDK. To grab more notes, you have change the &#8220;offset&#8221; parameter (also see <a href="https://developers.facebook.com/docs/api/batch/">batch requests</a>). Example:</p>
<pre class="brush:js">
FB.api("/aacopd/notes", {offset: 175, limit:25}, function(response) {
    console.dir(response.data);
});
</pre>
<p><strong>patrickgillespie.com Update</strong></p>
<p>I&#8217;ve updated the cloud code at <a href="http://patrickgillespie.com/">patrickgillespie.com</a> to now use a canvas element in browsers that support it. This leads to a much smoother appearance in Chrome and a slightly better appearance in FireFox. I tried using <a href="https://code.google.com/p/explorercanvas/">excanvas</a> for the IE version, but it was too choppy for what I was doing, so the IE version still uses divs.</p>
]]></content:encoded>
			<wfw:commentRss>http://patorjk.com/blog/2011/04/15/aac-police-brief-analyzer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Showdown!</title>
		<link>http://patorjk.com/blog/2011/03/27/website-showdown/</link>
		<comments>http://patorjk.com/blog/2011/03/27/website-showdown/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 16:34:09 +0000</pubDate>
		<dc:creator>patorjk</dc:creator>
				<category><![CDATA[Web Apps]]></category>

		<guid isPermaLink="false">http://patorjk.com/blog/?p=995</guid>
		<description><![CDATA[I&#8217;ve created a new web app that lets you pit two groups of websites against each other to see which group is more popular on Facebook. It&#8217;s called Website Showdown! and works by using the Facebook API to read the number of &#8220;Shares&#8221;, &#8220;Likes&#8221;, and &#8220;Comments&#8221; a particular URL has gotten on Facebook. Whichever group [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1001" class="wp-caption alignright" style="width: 210px"><img src="http://patorjk.com/blog/wp-content/uploads/2011/03/tiger-fight.png" alt="" title="tiger-fight" width="200" height="209" class="size-full wp-image-1001" /><p class="wp-caption-text">Photo By <a href='http://www.flickr.com/photos/fpat/4242800364/'>fPat Murray</a></p></div>
<p>I&#8217;ve created a new web app that lets you pit two groups of websites against each other to see which group is more popular on Facebook. It&#8217;s called <a href="http://patorjk.com/showdown/">Website Showdown!</a> and works by using the Facebook API to read the number of &#8220;Shares&#8221;, &#8220;Likes&#8221;, and &#8220;Comments&#8221; a particular URL has gotten on Facebook. Whichever group has the highest count, wins. </p>
<p>Also, when comparing URLs, the exact URL counts. &#8220;http://patorjk.com/&#8221; wont reference all of the times something from &#8220;patorjk.com&#8221; has been shared, only the number of times that particular URL has been shared. Trailing slashes (/) also seem to matter.</p>
<p>The data displayed in the app is read from Facebook&#8217;s <a href="http://developers.facebook.com/docs/reference/fql/link_stat/">link_stat</a> table. I may end up adding other Social Media stats to the results, but I&#8217;ll wait to see if there&#8217;s any feedback on this app first.  </p>
<p>The Facebook API is actually kind of fun. I&#8217;ve avoided it since I&#8217;d heard some bad things, but I had no issues with it (however, this is probably the most basic type of app one can create). I&#8217;ll probably tinker around with it some more, though as of late I&#8217;ve got a lot of unfinished projects on my plate.</p>
<p>Below you can see a screen cap of some results. If you find any bugs in the app please let me know.</p>
<div id="attachment_997" class="wp-caption aligncenter" style="width: 510px"><img src="http://patorjk.com/blog/wp-content/uploads/2011/03/showdown.png" alt="" title="Google vs Facebook" width="500" height="210" class="size-full wp-image-997" /><p class="wp-caption-text">Google vs Facebook</p></div>
<p>App URL: <a href="http://patorjk.com/showdown/">Website Showdown!</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://patorjk.com/blog/2011/03/27/website-showdown/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Snake Game Update</title>
		<link>http://patorjk.com/blog/2010/12/24/snake-game-update/</link>
		<comments>http://patorjk.com/blog/2010/12/24/snake-game-update/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 08:51:08 +0000</pubDate>
		<dc:creator>patorjk</dc:creator>
				<category><![CDATA[Web Apps]]></category>

		<guid isPermaLink="false">http://patorjk.com/blog/?p=950</guid>
		<description><![CDATA[You can play snake in the box below. I decided to redo the internals of my JavaScript Snake Game since it was old and in dire need of an update. I thought about using the canvas element, but since it still has its issues with IE and excanvas can be a little slow, I decided [...]]]></description>
			<content:encoded><![CDATA[<p>You can play snake in the box below.</p>
<div id="game-area" tabindex="0">
</div>
<p>I decided to redo the internals of my <a href="http://patorjk.com/games/snake/">JavaScript Snake Game</a> since it was old and in dire need of an update. I thought about using the canvas element, but since it still has its issues with IE and excanvas can be a little slow, I decided to stick with using divs for the drawing blocks. The game is probably not the best it could be, but it&#8217;s definitely better than where it was at. If you&#8217;re interested in the inner workings I have the source available <a href="http://patorjk.com/games/snake/snake.zip">here</a>. </p>
<p><div class="wp-caption alignleft" style="width: 360px"><img alt="" src="http://patorjk.com/images/blog-2010/docs.png" width="350" height="199" /><p class="wp-caption-text">Documentation Page Example</p></div>For this update I also decided to experiment a little with <a href="http://developer.yahoo.com/yui/yuidoc/">YUI Doc</a>, which is a tool that generates documentation for source code. It caught my eye since it creates beautiful looking documentation and it&#8217;s language agnostic, so it could possibly be used for all sorts of projects. The <a href="http://patorjk.com/games/snake/docs/">documentation for this Snake game</a> probably isn&#8217;t too useful, but on larger projects I could definitely see this kind of thing coming in handy.</p>
<p>The only negative to the tool was that it didn&#8217;t seem well documented itself. I found myself somewhat frustrated in debugging some of the issues I had using it, and I ended up having to do a little hand editing of the output files to remove YUI Library labels. Other than that though, it was a pretty cool tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://patorjk.com/blog/2010/12/24/snake-game-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASCII Art Code Comments</title>
		<link>http://patorjk.com/blog/2010/12/02/ascii-art-code-comments/</link>
		<comments>http://patorjk.com/blog/2010/12/02/ascii-art-code-comments/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 04:24:52 +0000</pubDate>
		<dc:creator>patorjk</dc:creator>
				<category><![CDATA[Web Apps]]></category>

		<guid isPermaLink="false">http://patorjk.com/blog/?p=931</guid>
		<description><![CDATA[Nick Kaye emailed me yesterday suggesting I add a feature to the Text ASCII Art Generator program which would allow for the output to be formatted in the form of a C-style programming comment. He even offered to write the code patch himself. I thought the idea was really cool, and took him up on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="#">Nick Kaye</a> emailed me yesterday suggesting I add a feature to the <a href="http://patorjk.com/software/taag/">Text ASCII Art Generator</a> program which would allow for the output to be formatted in the form of a C-style programming comment. He even offered to write the code patch himself.</p>
<p>I thought the idea was really cool, and took him up on his offer. Anyway, the new feature is under the &#8220;More Options&#8221; link in the TAAG interface. Once it&#8217;s turned on, you&#8217;ll get output that&#8217;s formatted in the form of a programming comment. Here is an example:</p>
<pre style="font-family:'courier new';">
/***
 *                      .___
 *      ____   ____   __| _/ ____
 *    _/ ___\ /  _ \ / __ |_/ __ \
 *    \  \___(  <_> ) /_/ |\  ___/
 *     \___  >\____/\____ | \___  >
 *         \/            \/     \/
 */
</pre>
<p>If anyone has any issues or additional suggestions let me know. And thanks again to Nick!</p>
]]></content:encoded>
			<wfw:commentRss>http://patorjk.com/blog/2010/12/02/ascii-art-code-comments/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AsciiMo &#8211; Where have I seen this before?</title>
		<link>http://patorjk.com/blog/2010/06/21/asciimo/</link>
		<comments>http://patorjk.com/blog/2010/06/21/asciimo/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 06:22:29 +0000</pubDate>
		<dc:creator>patorjk</dc:creator>
				<category><![CDATA[General News]]></category>
		<category><![CDATA[Web Apps]]></category>

		<guid isPermaLink="false">http://patorjk.com/blog/?p=679</guid>
		<description><![CDATA[/* asciimo.js &#8211; written by Marak Squires saved from the internet @ http://patorjk.com/software/taag/ i had to do unholy things to make the original code work, seriously. check the commit logs on github and you&#8217;ll see how much &#8220;code&#8221; i had to delete and refactor. what&#8217;s left isnt really acceptable, but it does work. let&#8217;s clean [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
      /*<br />
         asciimo.js &#8211; written by Marak Squires<br />
         saved from the internet @ http://patorjk.com/software/taag/ </p>
<p>         i had to do unholy things to make the original code work, seriously.<br />
         check the commit logs on github and you&#8217;ll see how much &#8220;code&#8221; i had to delete and refactor.<br />
         what&#8217;s left isnt really acceptable, but it does work.</p>
<p>         let&#8217;s clean this  up and get a more comprehensive font database!</p>
<p>         &#8212; Marak<br />
      */
</p></blockquote>
<p><div class="wp-caption alignright" style="width: 210px"><img alt="" src="http://patorjk.com/images/blog-2010/wow-guy.png" title="South Park's WOW Guy" width="200" height="155" /><p class="wp-caption-text">How I picture code thieves</p></div>So that&#8217;s the header comment to a new open source project called asciimo. Though I&#8217;ve never heard of the project, it&#8217;s actually composed of the inner workings of my <a href="http://patorjk.com/software/taag/">Text Ascii Art Generator (TAAG)</a> web app. I&#8217;ve never heard of Marak Squires either, and I don&#8217;t particularly like his snarky comments about his difficultly in stealing of my work.</p>
<p>I&#8217;ve had stuff taken from this site. Sometimes it&#8217;s makes me smile, other times it makes me shake my head. This makes me shake my head. TAAG was the project I used to return to JavaScript. It was written with JavaScript knowledge I remembered from the late nineties.  It was a project I did for fun. Hell, <a href="http://patorjk.com/blog/2007/08/05/taag-update/">I didn&#8217;t even know what AJAX was</a> when I first released it. Underneath it ain&#8217;t so pretty, but it&#8217;s mine and not some jerk&#8217;s ticket to getting a lot of attention for themselves.</p>
<p>I should probably be angrier, but I&#8217;m actually mostly just disappointed that someone did this. This is lazy and selfish. I develop all sorts of random stuff, and I do it for fun. If I see a concept I like, I&#8217;ll try and make my own version, I don&#8217;t take someone else&#8217;s. When I see something like this, it&#8217;s upsetting. Is it for some quick attention? So they can state that they&#8217;ve started X number of open source projects on their resume?</p>
<p>I was initially told of this project through email (thank you <a href="http://dracoblue.net/">Jan</a>), though I later found Marak&#8217;s <a href="http://www.reddit.com/r/programming/comments/cgyn0/asciimo_a_javascript_ascii_art_creating_robot/" rel="nofollow">self promotion on reddit</a> (edit: <a href="http://i.imgur.com/tRZ84.png">screen capture from saved html file</a> &#8211; he deleted some of his comments). His response to my comments was that because I didn&#8217;t explicitly put a copyright notice in my code that he could use it however he wanted (which I&#8217;m pretty sure isn&#8217;t true). He tried to say he did it for altruistic reasons, but <a href="http://www.figlet.org/">FIGlet itself is open source</a>, and there are already PHP modules available for people looking to use it in the browser (<a href="http://zendframework.com/manual/en/zend.text.figlet.html">here</a> and <a href="http://www.phpclasses.org/mirrors.html?page=/package/1548-PHP-Draw-text-strings-using-ASCII-art-fonts.html">here</a>).</p>
<p>Maybe in another universe we could have had some kind of cool collaboration, but at least in this one, Marak doesn&#8217;t seem like the type of person I&#8217;d want to collaborate with. He comes off as abrasive, self-centered and thoughtless. It&#8217;s a shame he has to use the ideas and work of others to promote himself.</p>
<p><strong>Follow Up</strong>: <a href="http://patorjk.com/blog/2010/06/22/thoughts-on-marak/">Aftermath</a><br />
<strong>Follow Up #2</strong>: After notifying github, my code was eventually removed from his site and project.</p>
]]></content:encoded>
			<wfw:commentRss>http://patorjk.com/blog/2010/06/21/asciimo/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
	</channel>
</rss>

