<?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>Note to Self &#187; Web development</title>
	<atom:link href="http://notetoself.vrensk.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://notetoself.vrensk.com</link>
	<description>lest I forget</description>
	<lastBuildDate>Fri, 23 Feb 2018 12:54:38 +0000</lastBuildDate>
	<language>sv-SE</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Catching up on JS and CSS</title>
		<link>http://notetoself.vrensk.com/2018/02/catching-up-on-js-and-css/</link>
		<comments>http://notetoself.vrensk.com/2018/02/catching-up-on-js-and-css/#comments</comments>
		<pubDate>Fri, 23 Feb 2018 12:54:38 +0000</pubDate>
		<dc:creator>David Vrensk</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://notetoself.vrensk.com/?p=106</guid>
		<description><![CDATA[I haven&#8217;t used JavaScript and CSS seriously for many years now. These dinosaur-riddled posts provided good catch-up material for both: https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs https://medium.com/actualize-network/modern-css-explained-for-dinosaurs]]></description>
				<content:encoded><![CDATA[<p>I haven&#8217;t used JavaScript and CSS seriously for many years now. These dinosaur-riddled posts provided good catch-up material for both:</p>
<ul>
<li><a href="https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs" onclick="pageTracker._trackPageview('/outgoing/medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs?referer=');">https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs</a></li>
<li><a href="https://medium.com/actualize-network/modern-css-explained-for-dinosaurs" onclick="pageTracker._trackPageview('/outgoing/medium.com/actualize-network/modern-css-explained-for-dinosaurs?referer=');">https://medium.com/actualize-network/modern-css-explained-for-dinosaurs</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://notetoself.vrensk.com/2018/02/catching-up-on-js-and-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Really killing rails processes at FS-data</title>
		<link>http://notetoself.vrensk.com/2009/04/really-killing-rails-processes-at-fs-data/</link>
		<comments>http://notetoself.vrensk.com/2009/04/really-killing-rails-processes-at-fs-data/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 11:51:38 +0000</pubDate>
		<dc:creator>David Vrensk</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://notetoself.vrensk.com/?p=44</guid>
		<description><![CDATA[FS-data was the first web hotel in Sweden to support Ruby on Rails (in August 2006, I think) and I’m glad they did. Unfortunately they haven’t touched their setup since, so patrons are still limited to (a) apps in subdirectories only and (b) FastCGI (FCGI). I have seen many complaints about FCGI, but I have [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.fsdata.se/" onclick="pageTracker._trackPageview('/outgoing/www.fsdata.se/?referer=');">FS-data</a> was the first web hotel in Sweden to support Ruby on Rails (in August 2006, I think) and I’m glad they did.  Unfortunately they haven’t touched their setup since, so patrons are still limited to (a) apps in subdirectories only and (b) FastCGI (FCGI).  I have seen many complaints about FCGI, but I have only one: it’s really hard to know if it’s running my latest release.  FS-data have added a control panel of sorts, but it’s pretty unreliable.  Thus, I have to resort to <code>kill</code>ing.  But what to <code>kill</code>?</p>
<pre><code>$ ps -fe | grep rails
UID        PID  PPID  C STIME TTY          TIME CMD
wcj      27292  3558 27 13:41 ?        00:00:02 RAILS: /home/w/wcj/rails/sis/public/dispatch.fcgi
wcj      27365  3558 40 13:41 ?        00:00:02 RAILS: /home/w/wcj/rails/sis/public/dispatch.fcgi
...
</code></pre>
<p>With more than two processes I refuse to <code>kill</code> by PID – FCGI is just too quick to spawn new processes, and I’m not sure if they will run the right version of my app either.  So it’s <code>killall</code>.  But what to <code>killall</code>?</p>
<pre><code>$ killall -9 'RAILS: /home/w/wcj/rails/sis/public/dispatch.fcgi'
</code></pre>
<p>does not work.  So it’s <code>ps</code> to the rescue:</p>
<pre><code>$ ps -eo pid,comm:30
  PID COMMAND
27365 rails_dispatche
27292 rails_dispatche
</code></pre>
<p><code>rails_dispatche</code>, really?  No final ‘r’?  Whatever:</p>
<pre><code>killall -9 rails_dispatche
</code></pre>
<p>It works and I’m happy again.</p>
]]></content:encoded>
			<wfw:commentRss>http://notetoself.vrensk.com/2009/04/really-killing-rails-processes-at-fs-data/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XHTML unsupported, prefer HTML</title>
		<link>http://notetoself.vrensk.com/2008/08/xhtml-unsupported-prefer-html/</link>
		<comments>http://notetoself.vrensk.com/2008/08/xhtml-unsupported-prefer-html/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 15:27:04 +0000</pubDate>
		<dc:creator>David Vrensk</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://notetoself.vrensk.com/?p=19</guid>
		<description><![CDATA[[This is a re-write of a project note I wrote in project over a year ago. Published here to make the world a better place.] There has been some commotion recently regarding XHTML and HTML, where standardistas have reiterated their arguments about XHTML: it’s a nice standard, but since is isn’t actually treated as XHTML [...]]]></description>
				<content:encoded><![CDATA[<p><em>[This is a re-write of a project note I wrote in project over a year ago.  Published here to make the world a better place.]</em></p>
<p>There has been some commotion recently regarding XHTML and HTML, where standardistas have reiterated their arguments about XHTML: it’s a nice standard, but since is isn’t actually treated as XHTML by browsers, it’s better to use HTML.</p>
<p>The “standard” text on this (at least for me) is <a href="http://www.hixie.ch/advocacy/xhtml" onclick="pageTracker._trackPageview('/outgoing/www.hixie.ch/advocacy/xhtml?referer=');">http://www.hixie.ch/advocacy/xhtml</a> from which I&#8217;d like to quote the executive summary:</p>
<blockquote>
<p>If you use XHTML, you should deliver it with the application/xhtml+xml MIME type. If you do not do so, you should use HTML4 instead of XHTML. The alternative, using XHTML but   delivering it as text/html, causes numerous problems that are outlined below. Unfortunately, IE6   does not support application/xhtml+xml (in fact, it does not support XHTML at all).</p>
</blockquote>
<p>I have come back to that text on several occasions, but it never quite convinced me.  I didn&#8217;t want to lose the well-formedness of XHTML.  Then I ran across <a href="http://www.webdevout.net/articles/beware-of-xhtml" onclick="pageTracker._trackPageview('/outgoing/www.webdevout.net/articles/beware-of-xhtml?referer=');">http://www.webdevout.net/articles/beware-of-xhtml</a> which made me change my mind. The article uses numerous examples to show that XHTML is not just a syntactically nicer version of HTML, but it actually has slightly differing rules for how to apply CSS.  So basically, in all projects that I have used XHTML, I have been relying on bugs in present browsers.  Ouch.</p>
<h3 id="time_to_change8212back">Time to change&#8212;back</h3>
<p>They promised us that XHTML was the future, so I haven&#8217;t worried too much about HTML lately. Are there any downsides to using HTML instead?  Well, not per se.  But the tools and platforms I use are slightly XHTML-centric.</p>
<ol>
<li>
<p>All the standard Rails helpers (form helpers, JS helpers, etc.) produce xhtml.  The simple solution is to drop this in a file in <code>lib/</code>:</p>
<pre><code>module ActionView::Helpers::TagHelper
  def tag_with_html_syntax(name, options = nil, open = true, escape = true)
    tag_without_html_syntax(name, options, open, escape)
  end
  alias_method_chain :tag, :html_syntax
end
</code></pre>
</li>
<li>
<p><a href="http://macromates.com/" onclick="pageTracker._trackPageview('/outgoing/macromates.com/?referer=');">TextMate</a> snippets produce XHTML. Most of them can be controlled by an  environment variable, but there are exceptions, like C-ret which produces produces an XHTML self-closed br element.</p>
</li>
<li>External tools, data sources and parsers are usually xml-centric.</li>
<li><a href="http://wordpress.org/" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/?referer=');">WordPress</a>, which I have used for a few client projects lately, spits out XHTML. I&#8217;ll see if I can create a patch for that and have it accepted.</li>
</ol>
<p>Oh well.  XHTML, I&#8217;ll miss you.  HTML, can we be friends again?</p>
]]></content:encoded>
			<wfw:commentRss>http://notetoself.vrensk.com/2008/08/xhtml-unsupported-prefer-html/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
