<?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>Henrik Falck&#039;s blog &#187; programming</title>
	<atom:link href="http://henrikfalck.com/blog/tag/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://henrikfalck.com/blog</link>
	<description>reinventing web 3.0</description>
	<lastBuildDate>Mon, 12 Apr 2010 00:33:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Japanese for programmers (and software developers)</title>
		<link>http://henrikfalck.com/blog/2009/04/japanese-for-programmers-and-software.html</link>
		<comments>http://henrikfalck.com/blog/2009/04/japanese-for-programmers-and-software.html#comments</comments>
		<pubDate>Sun, 12 Apr 2009 23:54:00 +0000</pubDate>
		<dc:creator>Henrik Falck</dc:creator>
				<category><![CDATA[language learning]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[Japanese]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[search queries]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://henrikfalck.com/blog2/2009/04/japanese-for-programmers-and-software-developers.html</guid>
		<description><![CDATA[After literally years of gathering materials and many full days of writing work, I&#8217;ve finally published my page on technical and business Japanese for software professionals (code monkeys) looking for a job in Japan or already working in Japanese companies or with Japanese clients who want to improve their programming Japanese.
The page consists of basically [...]]]></description>
			<content:encoded><![CDATA[<p>After literally years of gathering materials and many full days of writing work, I&#8217;ve finally published my <a rel="nofollow" href="http://www.squidoo.com/japanese-for-programmers" style="font-weight: bold;" >page on technical and business Japanese for software professionals</a> (code monkeys) looking for a job in Japan or already working in Japanese companies or with Japanese clients who want to improve their programming Japanese.</p>
<p>The page consists of basically three main parts: <a rel="nofollow" href="http://www.squidoo.com/japanese-for-programmers#module23232662" >Essential Japanese programming vocabulary</a>, <a rel="nofollow" href="http://www.squidoo.com/japanese-for-programmers#module23235132" >Expressions for communicating technical issues in Japanese</a> (with a <a rel="nofollow" href="http://www.squidoo.com/japanese-for-programmers#module26963502" >Part II</a>), and <a rel="nofollow" href="http://www.squidoo.com/japanese-for-programmers#module26520382" >A look at a Japanese software specification</a>. They&#8217;re based on material I&#8217;ve gathered during my years working in Japan, mostly in completely disorganized, scattered text files, so collecting and choosing the useful bits of it for this page was more work than it should have been&#8230;<br /><a href="http://henrikfalck.com/blog/uploaded_images/japanese-apple-mac-keyboard-730526.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" ><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px; height: 240px;" src="http://henrikfalck.com/blog/uploaded_images/japanese-apple-mac-keyboard-730523.jpg" alt="" border="0" /></a><br />Actually, I first got the idea of writing a &#8220;Japanese for Programmers&#8221; <span style="font-weight: bold;">book</span> some time ago when talking with a former colleague. The idea was that there are so many especially <span style="font-weight: bold; font-style: italic;">Indian software developers working in Japan</span>, but there are as yet <span style="font-weight: bold;">no books</span> aimed specifically at this segment, and there should be a <span style="font-weight: bold;">huge market</span>.</p>
<p>Anyway, I&#8217;m an avid reader of <a rel="nofollow" href="http://sethgodin.typepad.com/" style="font-weight: bold;" >Seth Godin&#8217;s blog</a>, and Seth is the guy behind <a rel="nofollow" href="http://www.squidoo.com/" style="font-weight: bold;" >Squidoo</a> as well, so I naturally stumbled upon it. I gave it a go, and it&#8217;s actually a really <span style="font-weight: bold;">fun</span> and <span style="font-weight: bold;">easy</span> way to create <span style="font-weight: bold;">modern</span>, <span style="font-weight: bold;">stylish</span>, <span style="font-weight: bold;">SEO&#8217;d web pages</span> without having to bother with the technical issues.</p>
<p>And then in last month&#8217;s <span style="font-weight: bold;">search queries</span> used to find my site I saw &#8220;<span style="font-family:courier new;">japanese speaking programming</span>&#8220;, and that finally got me going to do something with my Japanese for Programmers idea &#8211; I mean people are searching for it, and they&#8217;re already finding my site from it (there&#8217;s no &#8220;Japanese for Programmers&#8221; site on the net anyhow!), despite me not specifically covering that topic, so it seems everything falls into place. And thus the <a rel="nofollow" href="http://www.squidoo.com/japanese-for-programmers" >Japanese for Programmers Squidoo &#8220;lens&#8221;</a> was born!</p>
<p>So I hope it&#8217;ll get lots of readers and comments. I still have loads more material, so if it gets popular I might do a follow up. <img src='http://henrikfalck.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Here&#8217;s the URL again:</p>
<p><span style="font-size:130%;"><a rel="nofollow" href="http://www.squidoo.com/japanese-for-programmers" >http://www.squidoo.com/japanese-for-programmers</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://henrikfalck.com/blog/2009/04/japanese-for-programmers-and-software.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Software Architecture &#8211; What Is It? Down To The Monkey&#8217;s Balls</title>
		<link>http://henrikfalck.com/blog/2009/01/software-architecture-what-is-it-down.html</link>
		<comments>http://henrikfalck.com/blog/2009/01/software-architecture-what-is-it-down.html#comments</comments>
		<pubDate>Tue, 20 Jan 2009 14:08:00 +0000</pubDate>
		<dc:creator>Henrik Falck</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[bogus quotes]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software architecture]]></category>
		<category><![CDATA[software engineering]]></category>

		<guid isPermaLink="false">http://henrikfalck.com/blog2/2009/01/software-architecture-what-is-it-down-to-the-monkeys-balls.html</guid>
		<description><![CDATA[This morning just as I had left the house and turned left into one of the roads that make up the maze of narrow roads between the haphazardly built, tightly packed houses of Kami-meguro, from the far end of the road came flying, at full blast, a small budgerigar. I could feel the flapping of [...]]]></description>
			<content:encoded><![CDATA[<p>This morning just as I had left the house and turned left into one of the roads that make up the maze of narrow roads between the haphazardly built, tightly packed houses of Kami-meguro, from the far end of the road came flying, at full blast, a small budgerigar. I could feel the flapping of its wings as it swooshed above my left shoulder, just barely missing my head.</p>
<p>I don&#8217;t know what the little fellow was up to, but imagine the destruction, had it hit me in the face (I walk pretty fast too). I suppose it had escaped from one of the houses. It probably won&#8217;t survive very long, considering it won&#8217;t get warm for a while yet and the abundance of cats in the neighborhood. Not to mention its suicidal tendency of flying towards people on the street.</p>
<p>By the way, did you know there&#8217;s a population of <span style="font-weight: bold;">wild parrots in Tokyo</span>? Escaped parrots have taken up residence in the trees lining the south side of the French Formal Garden of <a href="http://www.env.go.jp/garden/shinjukugyoen/english/" >Shinjuku Gyoen</a>. Yes, they are very particular about where they live. They&#8217;re larger than budgerigars though, and manage to survive.</p>
<div style="text-align: center;"><a href="http://henrikfalck.com/blog/uploaded_images/budgerigar-blue-703193.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" ><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://henrikfalck.com/blog/uploaded_images/budgerigar-blue-703191.jpg" alt="" border="0" /></a><span style="font-size:78%;"><a href="http://www.mzephotos.com/gallery/birds/budgerigar-blue.html" >© MzePhotos.com, Some Rights Reserved</a></span></div>
<p>Anyway, I was going to write about <span style="font-weight: bold;">software architecture</span>, not parrots. The last couple of days I&#8217;ve been thinking about what software architecture is. The word gets thrown around a lot, and people even carry the title &#8220;software architect&#8221;.</p>
<p>In <a href="http://www.picsel.com/picselux/" >my work</a> there&#8217;s talk about architecture as well. We&#8217;re doing architecture.</p>
<p>Now, I&#8217;ve figured out that what gets called <span style="font-weight: bold;">software architecture</span> can, in down to the monkey&#8217;s balls practice, be classified as <span style="font-weight: bold; font-style: italic;">one out of five tangible things</span>. I might at some point come up with more, and if you have any suggestion then please leave a comment. Anyway, here they are:</p>
<ol>
<li><span style="font-weight: bold;">Build-time composition</span><br />Can be in the form of invasive composition done by a proper composition system, as outlined in the book <a href="http://www.ida.liu.se/%7Euweas/InvasiveSoftwareComposition/" >Invasive Software Composition</a>, written by my favorite professor Uwe Aßmann. But more often in the form of simple <span style="font-family:courier new;">#ifdef</span>s, or link-time selection of different libraries.<a href="http://henrikfalck.com/blog/uploaded_images/invasive-software-composition-727475.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" ><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 165px; height: 249px;" src="http://henrikfalck.com/blog/uploaded_images/invasive-software-composition-727473.jpg" alt="" border="0" /></a></p>
</li>
<li><span style="font-weight: bold;">Design patterns</span><br />This is probably my favorite one. Design patterns are powerful not primarily because the pattern in itself is clever, but because they communicate the intention of the programmer to others quickly. If someone knowledgable reads a piece of codes that says it&#8217;s doing a <a href="http://c2.com/cgi/wiki?VisitorPattern" >visitor pattern</a>, say, then you immediately know what to expect.
</li>
<li><span style="font-weight: bold;">Naming conventions</span><br />This might be the most common excuse for an architecture. And I&#8217;d count object oriented languages&#8217; attempts to hide things behind (often long) namespace and (often nested) class names as just another naming convention (often termed <span style="font-style: italic;">&#8220;object oriented design&#8221;</span>). Architecture often seems to take the meaning that things that belong to one part of the system starts with a certain prefix (such as a class name). It&#8217;s useful for finding things in the source tree, though.
</li>
<li><span style="font-weight: bold;">Function pointers</span><br />&#8230; in one form or another. All programmers use function pointers, often termed callbacks, handlers, functors, virtual methods, delegates, etc. Function pointers allows control of flow during runtime, but more often they seem to be used as a bad substitute for <span style="font-style: italic;">build-time composition</span>. At some point there seems to be a line where this common code monkey tool turns into architecture.
</li>
<li><span style="font-weight: bold;">Layers of indirection</span><br />It has been said, perhaps by Mark Twain, that <span style="font-style: italic;">any programming problem can be solved by adding another layer of indirection</span>. It is often implemented in the form of <span style="font-weight: bold;">function calls</span>, or by using <span style="font-style: italic;">function pointers</span>, often in combination with <span style="font-style: italic;">naming conventions</span>. Of course any code monkey can do function calls. But by doing small transformations of values and data types, and perhaps branching depending on the data, and letting the next layer do this in succession, one can seemingly achieve architecture.</li>
</ol>
<div style="text-align: center;">-</div>
<p>Barring further bird attacks, I will consider these five items to be the fundamental building blocks of software architecture. Next, I intend to write about how these can be used to create good architecture. Because one man&#8217;s architecture is another man&#8217;s code bloat.<br /><!-- inline --></p>
]]></content:encoded>
			<wfw:commentRss>http://henrikfalck.com/blog/2009/01/software-architecture-what-is-it-down.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We&#8217;ll Always Have C</title>
		<link>http://henrikfalck.com/blog/2008/04/well-always-have-c.html</link>
		<comments>http://henrikfalck.com/blog/2008/04/well-always-have-c.html#comments</comments>
		<pubDate>Sat, 26 Apr 2008 04:02:00 +0000</pubDate>
		<dc:creator>Henrik Falck</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[programming languages]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://henrikfalck.com/blog2/2008/04/well-always-have-c.html</guid>
		<description><![CDATA[The other day there was an interview in Dr. Dobb&#8217;s Journal with the managing director of TIOBE Software, who publishes the TIOBE Programming Community Index, a ranking of programming language popularity. It was also discussed on Slashdot.
The methodology used by TIOBE to calculate a language&#8217;s popularity is basically the good old google hits ad-hoc voodoo [...]]]></description>
			<content:encoded><![CDATA[<p>The other day there was an <a href="http://www.ddj.com/development-tools/207401593" >interview in Dr. Dobb&#8217;s Journal</a> with the <span style="font-weight: bold;">managing director of TIOBE Software</span>, who publishes the <a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html" style="font-weight: bold;" >TIOBE Programming Community Index</a>, a ranking of <span style="font-weight: bold;">programming language popularity</span>. It was also <a href="http://tech.slashdot.org/article.pl?sid=08/04/24/1955257" >discussed on Slashdot</a>.</p>
<p>The <a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/tpci_definition.htm" >methodology used by TIOBE</a> to calculate a language&#8217;s popularity is basically the <span style="font-weight: bold;">good old google hits ad-hoc voodoo index</span>, using &#8220;<language name="">[language] programming&#8221; as the query. This measures the <span style="font-weight: bold; font-style: italic;">&#8220;web presence&#8221;</span> of a programming language.</p>
<p>First of all, it&#8217;s obvious to you and me that this measures something, that something being the amount of web pages including the term &#8220;<language name="">[language] programming&#8221;, obviously. There&#8217;s nothing wrong with this method, as long as one is aware of what they&#8217;re measuring. But is it fair to call this the popularity of a language?</p>
<p></language></language><a href="http://blog.rvburke.com/wp-content/uploads/2006/10/gary-larson-oct-1987.gif" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" ><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;" src="http://blog.rvburke.com/wp-content/uploads/2006/10/gary-larson-oct-1987.gif" alt="" border="0" /></a><br /><language name=""><language name=""><span style="font-weight: bold; font-style: italic;">Look at this blog, for example.</span> I mostly mention <span style="font-weight: bold;">JavaScript</span> and <span style="font-weight: bold;">PHP</span> here, just like everyone else. Throw in some <span style="font-weight: bold;">Ruby</span> and <span style="font-weight: bold;">Python</span> too to max out the buzz factor. There is no mention of relics such as C in this blog. <span style="font-weight: bold; font-style: italic;">But you know what language I use ten times more than any other?</span> C. I&#8217;d love to have a job hacking away in JavaScript, Ruby, and Python all days, <span style="font-weight: bold; font-style: italic;">but I&#8217;d have to settle with half the salary.</span> <span style="font-style: italic;">So here it goes:</span> <span style="font-weight: bold;">C programming</span>. Index that. <span style="font-style: italic;">Embedded, heavily multi-threaded, efficient, minimum memory, hardcore badass C programming</span>, that&#8217;s what I do, and I love doing it.</p>
<p></language></language><language name=""><language name="">Most coders can&#8217;t do C. <span style="font-weight: bold; font-style: italic;">That&#8217;s why you see all these Visual This and Dot That</span> and <span style="font-weight: bold;">scripting languages</span> on the ranking, because these kids blog about every little insignificant hobby project they manage to cut and paste together, just like I do. But let there be no mistake about it:<span style="font-weight: bold; font-style: italic;"> real programmers can code in C</span>. They do <span style="font-weight: bold; font-style: italic;">syntactically correct typedefs of function pointers in their sleep</span>. <span style="font-size:85%;">(just kidding that&#8217;s impossible.)</span></p>
<p></language></language><a href="http://existentialtype.net/wp-content/uploads/2007/05/im-in-ur-stackz-overflowing-ur-bufferz.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" ><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;" src="http://existentialtype.net/wp-content/uploads/2007/05/im-in-ur-stackz-overflowing-ur-bufferz.jpg" alt="" border="0" /></a><br /><language name=""><language name=""><span style="font-weight: bold;">At work</span> I also hack in Python, Perl, and Makefile. <span style="font-weight: bold;">At home</span> it&#8217;s mostly JavaScript, PHP, Ruby, Python&#8230; <span style="font-weight: bold; font-style: italic;">Lately Python has replaced Ruby as my language of choice</span> for home hacking because of its <span style="font-weight: bold;">decent unicode support</span>. (Although I&#8217;ve had to hack the Python standard library in some places where it didn&#8217;t properly support unicode. I read the next version of Python (2.6?) will use unicode strings by default, which is great, and only ten years late.) I also sold my soul the other day and installed <span style="font-weight: bold;">Visual C# 2008 Express Edition</span> for some hobby hacking. Turned out not very fun though, but I haven&#8217;t given up yet.</p>
<p>At my previous job I used C++ for doing essentially the same thing as I do in C now. I&#8217;m completely convinced that C is the right tool for the job. <span style="font-weight: bold; font-style: italic;">I&#8217;m also convinced C does object orientation better than C++</span>, but that is a topic for another post. And I <span style="font-weight: bold;">used to be a Java fan</span>, but now I&#8217;m considering Java the best examples of software suckiness ever. It&#8217;s a volatile industry, technologies come and go, but <span style="font-weight: bold; font-style: italic;">no amount of blogging will convince me that the C programming language is anything but #1</span>.</p>
<p>I&#8217;m saying it because it&#8217;s true: <span style="font-weight: bold;">We&#8217;ll always have C.</span> Because we&#8217;ve got jobs to do.<br /></language></language></p>
]]></content:encoded>
			<wfw:commentRss>http://henrikfalck.com/blog/2008/04/well-always-have-c.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minesweeper!</title>
		<link>http://henrikfalck.com/blog/2007/08/minesweeper.html</link>
		<comments>http://henrikfalck.com/blog/2007/08/minesweeper.html#comments</comments>
		<pubDate>Thu, 02 Aug 2007 14:39:00 +0000</pubDate>
		<dc:creator>Henrik Falck</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[minesweeper]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web apps]]></category>

		<guid isPermaLink="false">http://henrikfalck.com/blog2/2007/08/minesweeper.html</guid>
		<description><![CDATA[Finally! My Minesweeper game is ready for the web! It&#8217;s the classic game in a web 2.0 costume. Why did I do that? when surely it&#8217;s been done before. Because I like minesweeper.
Developing this game has taught me one something about the time it can take from prototype to somewhat finished product: Developing the completely [...]]]></description>
			<content:encoded><![CDATA[<p>Finally! My <a href="http://henrikfalck.com/minesweeper/" ><span style="font-weight: bold;">Minesweeper</span></a> game is ready for the web! It&#8217;s the classic game in a web 2.0 costume. Why did I do that? when surely it&#8217;s been done before. Because I like minesweeper.</p>
<p>Developing this game has taught me one something about <span style="font-style: italic; font-weight: bold;">the time it can take from prototype to somewhat finished product</span>: Developing the completely playable &#8220;offline&#8221; prototype version was quick and easy &#8211; after all, I developed minesweeper already in <span style="font-weight: bold;">high school</span> on my programmable Casio calculator. So I thought it would take about trice the time to finish it, but in the end it took about <span style="font-weight: bold;">ten times that time</span>.</p>
<p>One reason for this is the <span style="font-weight: bold;">online highscore</span> functionality. <span style="font-style: italic;">But T-rex, online highscores just means keeping a list of the best times on the server and sending it to the client.</span> Yes, but then it wouldn&#8217;t take much to figure that all you need to do is type &#8220;register_highscore.php?time=0&#038;name=script%20kiddie&#8221; into your browser&#8217;s address field to get an <span style="font-weight: bold;">instant all-time high</span>. So how did I solve that?</p>
<p><span style="font-weight: bold; font-style: italic;">The game is played simultaneously on the client</span> (i.e. in the web browser) <span style="font-weight: bold; font-style: italic;">and on the server</span> (in php). Sweeps are sent at regular intervals to the server, which then plays the same moves and checks the results. So in the end it&#8217;s <span style="font-weight: bold;">the server that decides</span> that a game is over, how long it took, and whether that&#8217;s a new highscore or not. That, ideally, is not so complicated either, but well there are lots of opportunities to make <span style="font-weight: bold;">stupid mistakes</span>. (Especially when you&#8217;re having a shochu on the rocks while coding (I did it during my vacation).)</p>
<p><span style="font-weight: bold; font-style: italic;">The other reason</span> is that it&#8217;s <span style="font-weight: bold; font-style: italic;">hard to make a web app behave like a nifty game</span>. You need graphics, animations, and that kind of stuff that often causes you to run into problems with layout positioning and, most of all, <span style="font-weight: bold;">browser inconsistencies</span>. <span style="font-style: italic;"><span style="font-weight: bold;">Web browsers just aren&#8217;t ideal for making applications yet</span>.</span> (Well, tell me a platform that is, anyway&#8230;) The game runs best, as always, in Firefox. Although I admit I haven&#8217;t tried IE 6 yet. I&#8217;ll tackle that beast tomorrow. <img src='http://henrikfalck.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  IE 7 works good, though.</p>
<p>I still have a number of features planned that I&#8217;ll implement during the coming weeks, but at least now it&#8217;s good enough to play. Try and beat my times! Here&#8217;s the url again:</p>
<p><a href="http://henrikfalck.com/minesweeper/" >http://henrikfalck.com/minesweeper/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://henrikfalck.com/blog/2007/08/minesweeper.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Caching in Php</title>
		<link>http://henrikfalck.com/blog/2007/07/caching-in-php.html</link>
		<comments>http://henrikfalck.com/blog/2007/07/caching-in-php.html#comments</comments>
		<pubDate>Mon, 16 Jul 2007 04:16:00 +0000</pubDate>
		<dc:creator>Henrik Falck</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://henrikfalck.com/blog2/2007/07/caching-in-php.html</guid>
		<description><![CDATA[Php by default tries as hard as it can to make the web browser not cache pages. While I can understand the rationale behind this a bit, sometimes you want caching. Caching is actually a good thing! you know. It means faster load times and lower bandwidth and processing requirements.
So I was surprised by how [...]]]></description>
			<content:encoded><![CDATA[<p>Php by default tries as hard as it can to make the web browser <span style="font-weight: bold;">not</span> cache pages. While I can understand the rationale behind this a bit, sometimes you want caching. <span style="font-weight: bold; font-style: italic;">Caching</span> is actually a <span style="font-weight: bold; font-style: italic;">good thing</span><span style="font-style: italic;">!</span> you know. It means faster load times and lower bandwidth and processing requirements.</p>
<p>So I was surprised by <span style="font-weight: bold; font-style: italic;">how hard it is to turn off this aggressive non-caching policy</span>. I googled for a few minutes and browsed the php documentation without finding an easy way of doing it. Ok, so you can use the following code snippet to enable caching in php (the argument to the function is number of seconds the page is valid):<br /><code><br />function send_cache_headers($expire) {<br />&nbsp;&nbsp;header("Cache-Control: max-age=$expire");<br />&nbsp;&nbsp;header("Pragma: cache");<br />&nbsp;&nbsp;header("Expires: " . gmdate('D, d M Y H:i:s \G\M\T', time() + $expire));<br />}<br /></code></p>
]]></content:encoded>
			<wfw:commentRss>http://henrikfalck.com/blog/2007/07/caching-in-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A JavaScript messaging library</title>
		<link>http://henrikfalck.com/blog/2007/07/javascript-messaging-library.html</link>
		<comments>http://henrikfalck.com/blog/2007/07/javascript-messaging-library.html#comments</comments>
		<pubDate>Thu, 05 Jul 2007 12:03:00 +0000</pubDate>
		<dc:creator>Henrik Falck</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[messagelib]]></category>
		<category><![CDATA[paintmyblog]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web apps]]></category>

		<guid isPermaLink="false">http://henrikfalck.com/blog2/2007/07/a-javascript-messaging-library.html</guid>
		<description><![CDATA[I&#8217;m working on a library for sending messages between browsers using JavaScript, XMLHttpRequest, and PHP/sqlite on a server. The idea is that even though it&#8217;s not possible to open a connection of sorts directly between the clients (i.e. web browsers viewing a page, or even different pages, or running a widget), you can pull for [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a library for sending messages between browsers using JavaScript, XMLHttpRequest, and PHP/sqlite on a server. The idea is that even though it&#8217;s not possible to open a connection of sorts directly between the clients (i.e. web browsers viewing a page, or even different pages, or running a widget), you can pull for updates in a way that will make it seem like you have a connection open. Not only that, but all client listening on the same channel, so to speak, will receive the messages, so it&#8217;s like broadcasting. Technically this is nothing fancy, it&#8217;s just that you don&#8217;t see it much, and if implemented and packaged nicely I think it&#8217;ll be useful and fun to use.</p>
<p>How do I know this works? Because it&#8217;s based on a much cleaned up version of the code used on <a href="http://paintmyblog.com/" >paintmyblog.com</a> &#8211; which has proven itself already. I look forward to writing some cool apps using this library, and I hope other people will use it as well. Expect the first release next week.</p>
]]></content:encoded>
			<wfw:commentRss>http://henrikfalck.com/blog/2007/07/javascript-messaging-library.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful JavaScript Programming Sites</title>
		<link>http://henrikfalck.com/blog/2007/07/useful-javascript-programming-sites.html</link>
		<comments>http://henrikfalck.com/blog/2007/07/useful-javascript-programming-sites.html#comments</comments>
		<pubDate>Tue, 03 Jul 2007 10:21:00 +0000</pubDate>
		<dc:creator>Henrik Falck</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://henrikfalck.com/blog2/2007/07/useful-javascript-programming-sites.html</guid>
		<description><![CDATA[There are some sites I tend to consult all the time while programming in JavaScript. Let&#8217;s see what they are&#8230;
Core JavaScript 1.5 Reference &#8211; Mozilla Developer CenterA thorough and complete reference for the JavaScript language and standard library, with examples and links to more information, etc. Really good.http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference
Gecko DOM Reference &#8211; Mozilla Developer CenterComplements the [...]]]></description>
			<content:encoded><![CDATA[<p>There are some sites I tend to consult all the time while programming in JavaScript. Let&#8217;s see what they are&#8230;</p>
<p><span style="font-weight: bold;">Core JavaScript 1.5 Reference &#8211; </span><span style="font-weight: bold;">Mozilla Developer Center</span><br />A thorough and complete reference for the JavaScript language and standard library, with examples and links to more information, etc. Really good.<br /><span style="font-size:85%;"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference" >http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference</a></span></p>
<p><span style="font-weight: bold;">Gecko DOM Reference &#8211; </span><span style="font-weight: bold;">Mozilla Developer Center</span><br />Complements the above reference with a complete reference to the document object model, i.e. all the methods and classes that are available in JavaScript for manipulating the web page in the browser.<span style="font-size:85%;"><a href="http://developer.mozilla.org/en/docs/Gecko_DOM_Reference" ><br />http://developer.mozilla.org/en/docs/Gecko_DOM_Reference</a></span><br /><span style="font-weight: bold;"><br />Canvas Class Reference &#8211; </span><span style="font-weight: bold;">Apple Developer Connection</span><br />If you like playing with the canvas tag like I do, then this is the place to go for reference documentation on the 2d graphics context object. Complete and handy with all in one page.<br /><span style="font-size:85%;"><a rel="nofollow" href="http://developer.apple.com/documentation/AppleApplications/Reference/SafariJSRef/Classes/Canvas.html" >http://developer.apple.com/documentation/AppleApplications/Reference/SafariJSRef/Classes/Canvas.html</a></span></p>
<p><span style="font-weight: bold;">Prototype JavaScript Framework API</span><br />The reference documentation for the <span style="font-style: italic;">Prototype</span> framework. Of course, this is only useful if you&#8217;re using Prototype. But if you&#8217;re not, you better have a really good excuse&#8230; such as using some bloated alternative like the <a rel="nofollow" href="http://developer.yahoo.com/yui/" >Yahoo UI Library</a> or <a rel="nofollow" href="http://code.google.com/webtoolkit/" >Google Web Toolkit</a>.<br /><span style="font-size:85%;"><a href="http://www.prototypejs.org/api" >http://www.prototypejs.org/api</a><br /></span><span style="font-weight: bold;"><br />Dojo ShrinkSafe</span><br />Dojo ShrinkSafe shrinks the sizes of your JavaScript source files by removing whitespace and renaming local variables to shorter names, and some other stuff. Saves bandwidth and loading time without really giving much up, except debuggability. But you&#8217;re not doing debugging on your live site anyway, right? Riiight?!<span style="font-weight: bold;"><br /></span><span style="font-size:85%;"><a href="http://alex.dojotoolkit.org/shrinksafe/" >http://alex.dojotoolkit.org/shrinksafe/</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://henrikfalck.com/blog/2007/07/useful-javascript-programming-sites.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Note On PHP</title>
		<link>http://henrikfalck.com/blog/2007/06/note-on-php.html</link>
		<comments>http://henrikfalck.com/blog/2007/06/note-on-php.html#comments</comments>
		<pubDate>Mon, 25 Jun 2007 13:31:00 +0000</pubDate>
		<dc:creator>Henrik Falck</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[anecdote]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software engineering]]></category>

		<guid isPermaLink="false">http://henrikfalck.com/blog2/2007/06/a-note-on-php.html</guid>
		<description><![CDATA[Php is the most useful piece of crap ever shat on the face of the Earth. My old software engineering professor Uwe Aßmann (who held the by far best lectures I&#8217;ve ever had the pleasure to attend) used to call it Some Dude&#8217;s Law (I can&#8217;t remember whose) &#8211; that the ugly and worst designed [...]]]></description>
			<content:encoded><![CDATA[<p>Php is the most useful piece of crap ever shat on the face of the Earth. My old software engineering professor <a href="http://www.ida.liu.se/%7Euweas/" >Uwe Aßmann</a> (who held the by far best lectures I&#8217;ve ever had the pleasure to attend) used to call it Some Dude&#8217;s Law (I can&#8217;t remember whose) &#8211; that the ugly and worst designed software (Windows, PHP&#8230;) always win over the sexy and well designed (BeOS, Smalltalk&#8230;). Well, that&#8217;s how it is. Php makes me feel sick all the time, but I still use it. Because I have to (because that&#8217;s what&#8217;s installed) is only half the reason. The documentation is top notch, and I&#8217;m very productive using it. In Windows&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://henrikfalck.com/blog/2007/06/note-on-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
