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

<channel>
	<title>David Otton &#187; 2008 &#187; January</title>
	<atom:link href="http://www.otton.org/2008/01/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.otton.org</link>
	<description>Look! Bunnies!</description>
	<pubDate>Tue, 18 Nov 2008 12:46:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Kewl libs, d00d!</title>
		<link>http://www.otton.org/2008/01/02/kewl-libs-d00d/</link>
		<comments>http://www.otton.org/2008/01/02/kewl-libs-d00d/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 11:20:20 +0000</pubDate>
		<dc:creator>David Otton</dc:creator>
		
		<category><![CDATA[programming]]></category>

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

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

		<guid isPermaLink="false">http://www.otton.org/2008/01/02/kewl-libs-d00d/</guid>
		<description><![CDATA[http://www.ajaxian.com/archives/mad-cool-date-library
/still laughing
Or despairing. Or something. Honestly, who lets these people walk around loose?
Update: found another one. &#8220;Eventually the goal is to save all the functions in one php.js file and make it publicly available for your coding pleasure&#8221;.
Ye gods. It must be one of those days. Oh well, I guess it makes for good link [...]<p><a href="http://sharethis.com/item?&#038;wp=2.6.1&#38;publisher=bc909746-74af-4cee-b8ac-b785a5c864b4&#38;title=Kewl+libs%2C+d00d%21&#38;url=http%3A%2F%2Fwww.otton.org%2F2008%2F01%2F02%2Fkewl-libs-d00d%2F">ShareThis</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ajaxian.com/archives/mad-cool-date-library">http://www.ajaxian.com/archives/mad-cool-date-library</a></p>
<p>/still laughing</p>
<p>Or despairing. Or something. Honestly, who lets these people walk around <em>loose</em>?</p>
<p>Update: found <a title="basename() in Javascript" href="http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_basename/">another one</a>. <em>&#8220;Eventually the goal is to save all the functions in one php.js file and make it publicly available for your coding pleasure&#8221;</em>.</p>
<p>Ye gods. It must be one of those days. Oh well, I guess it makes for good link bait, if nothing else. &#8220;javascript_equivalent_for_phps_array_rand&#8221; indeed.</p>
<p>Update2: C# this time - <a href="http://www.dev102.com/c/why-sortedlistkeyval-is-useless/">this is why</a> high-level programmers who don&#8217;t have a handle on the underlying algorithms can&#8217;t do their jobs properly. For the record, there are SortedList vs SortedDictionary discussions all over the net that tell you exactly what the differences are. Even some basic testing would give you empirical data to work with. Gotta say, he&#8217;s got some chutzpah to slap auto-refreshing Google and Amazon ads all over that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2008/01/02/kewl-libs-d00d/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#8220;What were they thinking?&#8221;: &#8220;They were thinking like C programmers&#8221;</title>
		<link>http://www.otton.org/2008/01/02/what-were-they-thinking-they-were-thinking-like-c-programmers/</link>
		<comments>http://www.otton.org/2008/01/02/what-were-they-thinking-they-were-thinking-like-c-programmers/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 03:41:21 +0000</pubDate>
		<dc:creator>David Otton</dc:creator>
		
		<category><![CDATA[programming]]></category>

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

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

		<guid isPermaLink="false">http://www.otton.org/2008/01/02/what-were-they-thinking-they-were-thinking-like-c-programmers/</guid>
		<description><![CDATA[API Archaeology. Heh.
If he thinks he has troubles, he should try PHP&#8217;s string and array libraries. You can really see the accretion of &#8220;thought&#8221; there. On a related note, here are some signatures for various PHP error handlers. First, an assert handler:

function assert_handler&#40; $file, $line, $message &#41;;

an error handler:

function error_handler&#40; $errno, $message, $file, $line, $errcontext [...]<p><a href="http://sharethis.com/item?&#038;wp=2.6.1&#38;publisher=bc909746-74af-4cee-b8ac-b785a5c864b4&#38;title=%26%238220%3BWhat+were+they+thinking%3F%26%238221%3B%3A+%26%238220%3BThey+were+thinking+like+C+programmers%26%238221%3B&#38;url=http%3A%2F%2Fwww.otton.org%2F2008%2F01%2F02%2Fwhat-were-they-thinking-they-were-thinking-like-c-programmers%2F">ShareThis</a></p>]]></description>
			<content:encoded><![CDATA[<p><a title="Short comment on Java APIs" href="http://fishbowl.pastiche.org/2007/12/24/api_archaeology">API Archaeology</a>. Heh.</p>
<p>If he thinks he has troubles, he should try PHP&#8217;s string and array libraries. You can really see the accretion of &#8220;thought&#8221; there. On a related note, here are some signatures for various PHP error handlers. First, an assert handler:</p>
<p><code>
<pre><span style="color: #000000; font-weight: bold;">function</span> assert_handler<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$file</span>, <span style="color: #0000ff;">$line</span>, <span style="color: #0000ff;">$message</span> <span style="color: #66cc66;">&#41;</span>;</pre>
<p></code></p>
<p>an error handler:</p>
<p><code>
<pre><span style="color: #000000; font-weight: bold;">function</span> error_handler<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$errno</span>, <span style="color: #0000ff;">$message</span>, <span style="color: #0000ff;">$file</span>, <span style="color: #0000ff;">$line</span>, <span style="color: #0000ff;">$errcontext</span> <span style="color: #66cc66;">&#41;</span></pre>
<p></code></p>
<p>How to set an assert handler:</p>
<p><code>
<pre><a href="http://www.php.net/assert_options"><span style="color: #000066;">assert_options</span></a><span style="color: #66cc66;">&#40;</span> ASSERT_CALLBACK, <span style="color: #ff0000;">'assert_handler'</span> <span style="color: #66cc66;">&#41;</span></pre>
<p></code></p>
<p>And an error handler:</p>
<p><code>
<pre><a href="http://www.php.net/set_error_handler"><span style="color: #000066;">set_error_handler</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'error_handler'</span> <span style="color: #66cc66;">&#41;</span></pre>
<p></code></p>
<p>Nobody could get it this wrong by chance. I think it&#8217;s wilful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otton.org/2008/01/02/what-were-they-thinking-they-were-thinking-like-c-programmers/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
