<?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>Kraken Technologies</title>
	<atom:link href="http://www.krakentechnologies.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.krakentechnologies.com</link>
	<description>NYC web programming and design</description>
	<lastBuildDate>Fri, 10 May 2013 10:32:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Vine, HTML5 Video, Animated GIFs, and the End of Civilization</title>
		<link>http://www.krakentechnologies.com/2013/05/vine-html5-video-animated-gifs-and-the-end-of-civilization/</link>
		<comments>http://www.krakentechnologies.com/2013/05/vine-html5-video-animated-gifs-and-the-end-of-civilization/#comments</comments>
		<pubDate>Fri, 10 May 2013 10:32:03 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Bad Code]]></category>
		<category><![CDATA[Geek]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=147</guid>
		<description><![CDATA[So, Vine was rudely thrust into my consciousness today when a friend of mine posted a link to a site (buzzfeed.com, of course) to a link with several embedded Vine videos (of Ryan Gosling, of course). I had been trying &#8230; <a href="http://www.krakentechnologies.com/2013/05/vine-html5-video-animated-gifs-and-the-end-of-civilization/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>So, Vine was rudely thrust into my consciousness today when a friend of mine posted a link to a site (buzzfeed.com, of course) to a link with several embedded Vine videos (of Ryan Gosling, of course). I had been trying to avoid it, even before I heard there was a six second limit to the videos.</p>
<p>Actually, someone else I know on Facebook had posted a Vine video earlier, but I didn&#8217;t respect their intelligence enough to click it.</p>
<p>Anyway, I had been avoiding Vine because, well, who needs another social network? One is too many. And I just don&#8217;t shoot videos all the time. Then I heard about the six second thing and was utterly baffled until I realized they&#8217;re trying to be the Twitter of video, I guess.</p>
<p>But they&#8217;re not really the Twitter of video. There was much debate about the 140 character limit of Twitter, but six seconds of video is&#8230; a trifling entertainment at best? Average speaking speed is two to three words a second and three is probably fast. A picture&#8217;s worth a thousand words, but in the age of Youtube, a Vine video is worth 18. People think they&#8217;re getting more information from video, seeing as it stimulates an extra sense, but in actuality, the bandwidth is reduced. You&#8217;re watching and hearing a low-quality MP3 of life, distracted by compression artifacts.</p>
<p>I&#8217;m sure I&#8217;ll be proven wrong by some artist who, out of desperation, creates a series of brilliant short films released via Vine. They&#8217;ll be great. They&#8217;ll be that one artist who famous from Vine. They&#8217;ll marry an Icelandic pop star and be called the new Cremaster (the muscle, not the film series).</p>
<p>But regardless of that monumental artistic achievement, Vine will only serve as a shinier, happier way of reducing our actual human interaction and replacing it with a bombardment of pre-digested social media niblets.</p>
<p>So, back to animated GIFs. Since a site with six second videos can serve no actual, useful purpose, people are now using it to create little looping videos that you can share and embed everywhere. Only, they apparently take more resources than GIFs because any page I go on with my (admittedly ancient, it&#8217;s a long story) computer, can barely deal with a few of them on the page. They&#8217;re re-inventing the wheel, only it&#8217;s a worse wheel.</p>
<p>Enough complaining. I&#8217;m sure they&#8217;ll make millions and millions of dollars, but I&#8217;m also sure they will soon be replaced by something that provides even slightly more utility. And if you give me a truckful of money, I&#8217;ll write that app for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2013/05/vine-html5-video-animated-gifs-and-the-end-of-civilization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails on Ubuntu 12.04 with Rubyenv</title>
		<link>http://www.krakentechnologies.com/2012/08/ruby-rails-on-ubuntu-12-04-rubyenv/</link>
		<comments>http://www.krakentechnologies.com/2012/08/ruby-rails-on-ubuntu-12-04-rubyenv/#comments</comments>
		<pubDate>Thu, 02 Aug 2012 20:43:16 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=130</guid>
		<description><![CDATA[I recently got involved in a project with an existing codebase in Ruby using Rails. My life isn&#8217;t hectic enough, so I decided, why not learn a new language and framework. I was familiar with the basics of Ruby from &#8230; <a href="http://www.krakentechnologies.com/2012/08/ruby-rails-on-ubuntu-12-04-rubyenv/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I recently got involved in a project with an existing codebase in Ruby using Rails. My life isn&#8217;t hectic enough, so I decided, why not learn a new language and framework.</p>
<p>I was familiar with the basics of Ruby from reading parts of  <a title="why's (poignant) Guide to Ruby" href="https://en.wikipedia.org/wiki/Why's_(poignant)_Guide_to_Ruby">&#8220;why&#8217;s (poignant)Guide to Ruby&#8221;</a> years ago, though I definitely needed a refresher, but in general I view a new language as an opportunity to learn and grow. If this was some PHP framework, I would probably not have the same enthusiasm.</p>
<p>Ubuntu 12.04 has ruby 1.8 by default, which I don&#8217;t think is supported by Rails 3, so you have to upgrade that. This can be an issue because other things on the system may expect a different version of Ruby. This can be a problem with Python as well, especially on OS X. With Python, I solved it using <a title="virtualenv for Python virtual environments" href="http://www.virtualenv.org" target="_blank">Ian Bicking&#8217;s virtualenv</a>. There are two programs that duplicate this functionality, <a title="rbenv - virtual environments for Ruby" href="http://github.com/sstephenson/rbenv" target="_blank">rbenv</a>, and <a title="Ruby Version Manager" href="http://rvm.io" target="_blank">rvm</a>. Note that you can NOT use them both at the same time. I chose rbenv because of it&#8217;s similarity to virtualenv and rvm wasn&#8217;t installable for me using gem, I believe. If you care about the differences, here&#8217;s a page that explains it<a title="Jonathan Jackson - Differences between rvm and rbenv" href="http://jonathan-jackson.net/rvm-and-rbenv" target="_blank"> with cartoons</a>.</p>
<p>After some frustration with the documentation and some other guides, I re-read this guide &#8220;How to Install Ruby with Rbenv on Ubuntu 12.04.&#8221; This guide includes the crucial step of installing <a title="rbenv ruby-build plugin" href="http://github.com/sstephenson/ruby-build" target="_blank">rbenv&#8217;s ruby-build plugin,</a> which adds the &#8220;install&#8221; command. Then you can install an updated version of Ruby and switch to it easily.</p>
<p>Stayed tuned for more fun with Ruby. I&#8217;m probably going to use it with MongoDB.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2012/08/ruby-rails-on-ubuntu-12-04-rubyenv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zynga stock shares hit all time low.</title>
		<link>http://www.krakentechnologies.com/2012/08/zynga-stock-shares-hit-all-time-low/</link>
		<comments>http://www.krakentechnologies.com/2012/08/zynga-stock-shares-hit-all-time-low/#comments</comments>
		<pubDate>Wed, 01 Aug 2012 07:11:36 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Bad Code]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[schadenfreude]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=128</guid>
		<description><![CDATA[I doubt that my article pointing out the absurdity of Zynga&#8217;s engineering blog was enough to send their stock prices into a tailspin, but I&#8217;d like to think that it helped. I&#8217;ve long been predicting the death of Facebook. Either &#8230; <a href="http://www.krakentechnologies.com/2012/08/zynga-stock-shares-hit-all-time-low/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I doubt that my article pointing out the<a title="Zynga’s Developer Blog" href="http://www.krakentechnologies.com/2012/05/zyngas-developer-blog/"> absurdity of Zynga&#8217;s engineering blog</a> was enough to send their <a title="Seeking Alpha: Analyzing Zynga's Earnings" href="http://seekingalpha.com/article/753151-analyzing-zynga-s-earnings" target="_blank">stock prices into a tailspin</a>, but I&#8217;d like to think that it helped.</p>
<p>I&#8217;ve long been predicting the death of Facebook. Either the next Facebook/Twitter will come along or privacy concerns will get them. Zynga&#8217;s withering away does not bode well for the company, since Zynga makes up some absurd amount of income and Zynga&#8217;s earning have fallen 40%.</p>
<p>There&#8217;s basically no way that either of these companies can keep up with their earnings projections. Facebook is a dinosaur, unable to react in a meaningful way to market trends and is indiscriminately buying up its competition in a desperate attempt to stay relevant. Just as they made Myspace irrelevant, something will come along to replace Facebook. Facebook is the AOL of the 2010s. Good riddance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2012/08/zynga-stock-shares-hit-all-time-low/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zynga&#8217;s Developer Blog</title>
		<link>http://www.krakentechnologies.com/2012/05/zyngas-developer-blog/</link>
		<comments>http://www.krakentechnologies.com/2012/05/zyngas-developer-blog/#comments</comments>
		<pubDate>Sun, 13 May 2012 04:04:40 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=120</guid>
		<description><![CDATA[The title of this post is not a joke, but I do find it hilarious. Despite the fact that Zynga&#8217;s &#8220;games&#8221; are thinly disguised torture devices that usually barely function, they have a technology blog, Zynga Engineering. I guess they &#8230; <a href="http://www.krakentechnologies.com/2012/05/zyngas-developer-blog/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The title of this post is not a joke, but I do find it hilarious. Despite the fact that Zynga&#8217;s &#8220;games&#8221; are thinly disguised torture devices that usually barely function, they have a technology blog, <a title="Zynga Engineering - Zynga's Dev &amp; Engineering Blog" href="http://code.zynga.com/" target="_blank">Zynga Engineering</a>.</p>
<p>I guess they are creating games on scale at least as large as anyone else out there,  but they do it so badly. From sheer bugginess to sound and graphic design for UI atrocities, there is no area in which they excel.</p>
<p>UI atrocity example:  Words With Friends on Facebook. It&#8217;s a nice HTML5 interface and the drag n&#8217; drop works fairly well, but to make a move, you place the tiles and press submit. If it&#8217;s a valid move, you&#8217;re then asked if you want to send the move to your opponent. Then there&#8217;s an modal ad that comes up, preventing (usually) all other interaction until you close the ad. That&#8217;s three clicks, just to make one move.  Not to mention that there&#8217;s a maliciously auto-checked box that says &#8220;Don&#8217;t ask again before sending move to your opponent&#8221; that will conveniently auto-spam whoever you&#8217;re playing with.</p>
<p>Maybe I&#8217;m being unfair. There&#8217;s a blurb atop their blog that says, &#8220;Zynga is a social game company and our mission is to connect the world through games — this has become quite broadly known. Perhaps less known is that Zynga is hugely focused on technology.&#8221; The quote is attributed to this man:</p>
<p><img class="aligncenter" title="Cadir Lee, one of mayn of Zynga's beauty-challenged employees" src="http://code.zynga.com/wp-content/uploads/2011/06/Cadir_Headshot.jpg" alt="Cadir Lee, one of mayn of Zynga's beauty-challenged employees" width="243" height="294" /></p>
<p>Technology, eh? Your precious technology didn&#8217;t fix your haircut!</p>
<p>But to speak seriously about technology, I can&#8217;t even begin to list the bugs I&#8217;ve encountered with Zynga games. Maybe you&#8217;re a half-full glass kinda person and you say, &#8220;Think about how many things are flashing onscreen at once. Think of the AFPS rate (Annoying Flashy things Per Second).&#8221; You could say that, and I would stop listening to you.</p>
<p>Ok, but to really talk about technology, all I&#8217;ll say is, why have we had Words With Friends for 5 years but you still can&#8217;t have more than a two-player game? Because <a title="Zynga Sucks" href="http://duckduckgo.com/?q=zynga+sucks" target="_blank">Zynga sucks</a>. Or <a title="Zynga called evil by ex-employee" href="http://gamasutra.com/view/news/30353/Zynga_Staff_Told_To_Copy_Competition_Claims_Senior_ExEmployee.php" target="_blank">Zynga is evil</a>. Probably both, come to think of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2012/05/zyngas-developer-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful WordPress Plugin to use Google&#8217;s CDN</title>
		<link>http://www.krakentechnologies.com/2012/05/useful-wordpress-plugin-to-use-googles-cdn/</link>
		<comments>http://www.krakentechnologies.com/2012/05/useful-wordpress-plugin-to-use-googles-cdn/#comments</comments>
		<pubDate>Mon, 07 May 2012 15:07:49 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=114</guid>
		<description><![CDATA[Use Google Libraries is an aptly named plugin for WordPress that uses Google&#8217;s CDN for Javascript libraries. Here&#8217;s a list of all supported libraries: Dojo jQuery jQuery UI MooTools Prototype script.aculo.us swfobject Hopefully you&#8217;re familiar with the benefits of CDNs. Even &#8230; <a href="http://www.krakentechnologies.com/2012/05/useful-wordpress-plugin-to-use-googles-cdn/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a title="Use Google Libraries WordPress Plugin" href="http://wordpress.org/extend/plugins/use-google-libraries" target="_blank">Use Google Libraries</a> is an aptly named plugin for WordPress that uses Google&#8217;s CDN for Javascript libraries. Here&#8217;s a list of all supported libraries:</p>
<ul>
<li><a href="http://dojotoolkit.org/" rel="nofollow">Dojo</a></li>
<li><a href="http://jquery.com/" rel="nofollow">jQuery</a></li>
<li><a href="http://ui.jquery.com/" rel="nofollow">jQuery UI</a></li>
<li><a href="http://mootools.net/" rel="nofollow">MooTools</a></li>
<li><a href="http://www.prototypejs.org/" rel="nofollow">Prototype</a></li>
<li><a href="http://script.aculo.us/" rel="nofollow">script.aculo.us</a></li>
<li><a href="http://code.google.com/p/swfobject/" rel="nofollow">swfobject</a></li>
</ul>
<p>Hopefully you&#8217;re familiar with the benefits of CDNs. Even if your site is not high-traffic enough to use its own CDN, you can still gain some benefits by using CDNs from companies such as Google (among others) to host common files. This saves you bandwidth and your users are more likely to have the file cached since more and more sites are using CDNs such as Google&#8217;s. You can count on the CDN existing for as long as Google does. Other companies also supply libraries on CDNs. Yahoo&#8217;s YUI is an example where the company developed their own toolset and hosts it on their own CDN as  well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2012/05/useful-wordpress-plugin-to-use-googles-cdn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Common PHP mistakes</title>
		<link>http://www.krakentechnologies.com/2012/04/common-php-mistakes/</link>
		<comments>http://www.krakentechnologies.com/2012/04/common-php-mistakes/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 03:18:42 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Bad Code]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=106</guid>
		<description><![CDATA[In doing more WordPress work, I ran across more bad code in a theme. Bad code was a reoccurring theme in this theme. global $options; foreach &#40;$options as $value&#41; &#123; if &#40;get_settings&#40; $value&#91;'id'&#93; &#41; === FALSE&#41; &#123; $$value&#91;'id'&#93; = $value&#91;'std'&#93;; &#8230; <a href="http://www.krakentechnologies.com/2012/04/common-php-mistakes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In doing more WordPress work, I ran across more bad code in a theme. Bad code was a reoccurring theme in this theme.</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="php"><pre class="de1"><span class="kw2">global</span> <span class="re0">$options</span><span class="sy0">;</span>
<span class="kw1">foreach</span> <span class="br0">&#40;</span><span class="re0">$options</span> <span class="kw1">as</span> <span class="re0">$value</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
<span class="kw1">if</span> <span class="br0">&#40;</span>get_settings<span class="br0">&#40;</span> <span class="re0">$value</span><span class="br0">&#91;</span><span class="st_h">'id'</span><span class="br0">&#93;</span> <span class="br0">&#41;</span> <span class="sy0">===</span> <span class="kw4">FALSE</span><span class="br0">&#41;</span> <span class="br0">&#123;</span> <span class="re0">$$value</span><span class="br0">&#91;</span><span class="st_h">'id'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="re0">$value</span><span class="br0">&#91;</span><span class="st_h">'std'</span><span class="br0">&#93;</span><span class="sy0">;</span> <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span> <span class="re0">$$value</span><span class="br0">&#91;</span><span class="st_h">'id'</span><span class="br0">&#93;</span> <span class="sy0">=</span> get_settings<span class="br0">&#40;</span> <span class="re0">$value</span><span class="br0">&#91;</span><span class="st_h">'id'</span><span class="br0">&#93;</span> <span class="br0">&#41;</span><span class="sy0">;</span> <span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div></div></div></div></div></div>


<p>First off, isn&#8217;t that annoying, having to scroll? Making an if-else into a one-liner doesn&#8217;t save the computer any time processing it and costs humans significantly more</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="php"><pre class="de1"><span class="kw2">global</span> <span class="re0">$options</span><span class="sy0">;</span>
<span class="kw1">foreach</span> <span class="br0">&#40;</span><span class="re0">$options</span> <span class="kw1">as</span> <span class="re0">$value</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
  <span class="kw1">if</span> <span class="br0">&#40;</span>get_settings<span class="br0">&#40;</span> <span class="re0">$value</span><span class="br0">&#91;</span><span class="st_h">'id'</span><span class="br0">&#93;</span> <span class="br0">&#41;</span> <span class="sy0">===</span> <span class="kw4">FALSE</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="re0">$$value</span><span class="br0">&#91;</span><span class="st_h">'id'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="re0">$value</span><span class="br0">&#91;</span><span class="st_h">'std'</span><span class="br0">&#93;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span>
    <span class="re0">$$value</span><span class="br0">&#91;</span><span class="st_h">'id'</span><span class="br0">&#93;</span> <span class="sy0">=</span> get_settings<span class="br0">&#40;</span> <span class="re0">$value</span><span class="br0">&#91;</span><span class="st_h">'id'</span><span class="br0">&#93;</span> <span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div></div></div></div></div></div>


<p>There, that&#8217;s nicer. Now secondly, globals are generally a bad idea, especially something so generic as options. This snippet gets all options into variables that are created on the fly using the $$ operator.</p>
<p>Thirdly, $$ operator? FTW operator? I know, I had to look it up too. Guess what? The PHP manual itself recommends against using it because of security considerations. There is no need to get this complicated to provide defaults for unset global options.</p>
<p>I&#8217;d explain what the $$ it actually does, but it might encourage people to use it. Let&#8217;s just say it&#8217;s a code mechanism that should be reserved for much better languages than PHP. I&#8217;m also discouraged to explain because I&#8217;ve discovered bonus bad code discovered while writing this very post! I was pasting the above code in and had to add a <code>pre</code> tag with lang=&#8221;php&#8221; as the attribute. TinyMCE added this attribute to all later <code>p</code> tags as well. Why? It does this with no warning.</p>
<p>I actually had even more bad PHP code to complain about, but I&#8217;ll save it for another post. Right now I&#8217;ll just complain about how I have to copy the entire raw HTHML in WP&#8217;s editor before I switch back to visual because I never know what it&#8217;s going to decide to randomly delete, mangle, or mutilate.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2012/04/common-php-mistakes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bad WordPress code, or is that redundant?</title>
		<link>http://www.krakentechnologies.com/2012/04/bad-wordpress-code-redundant/</link>
		<comments>http://www.krakentechnologies.com/2012/04/bad-wordpress-code-redundant/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 05:52:22 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=99</guid>
		<description><![CDATA[I discovered two levels of bad/bizarre/baffling code while working on customizing ghostpool.com&#8217;s Delapidated theme for WordPress. The sidebar and slider were not working because they both use the is_home function to determine whether or not to display. The WordPress Codex &#8230; <a href="http://www.krakentechnologies.com/2012/04/bad-wordpress-code-redundant/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I discovered two levels of bad/bizarre/baffling code while working on customizing <a title="Ghostpool Dilapidated WordPress Theme" href="http://ghostpool.com/wordpress/?theme=dilapidated" target="_blank">ghostpool.com&#8217;s Delapidated theme for WordPress</a>. The sidebar and slider were not working because they both use the is_home function to determine whether or not to display.</p>
<p>The <a title="is_home - WordPress Codex" href="http://codex.wordpress.org/Function_Reference/is_home" target="_blank">WordPress Codex documentation for is_home </a>says: &#8220;This conditional tag checks if the main page is being displayed. This is a boolean function, meaning it returns either TRUE or FALSE.&#8221; This last sentence is displayed on many WP Codex entries, because apparently WP programmers are not familiar with the concept of booleans*. Anyway, since this is the page at /, usually known as &#8220;the home page,&#8221; I thought is_home would be true. Sadly, no.</p>
<p>Looking further at the documentation, there is a note that something gets funked up with WP 2.1, and mentions looking at is_front_page. The <a title="is_front_page - WordPress Codex" href="http://codex.wordpress.org/Function_Reference/is_front_page" target="_blank">docs for is_front_page</a> says &#8220;It returns TRUE when the main blog page is being displayed and the <strong>Settings-&gt;Reading-&gt;Front page displays</strong> is set to &#8220;Your latest posts&#8221;, <strong>or</strong> when is set to &#8220;A static page&#8221; and the &#8220;Front Page&#8221; value is the current Page being displayed.&#8221; Clear as mud.</p>
<p>To actually figure it out, I had to go to the code, which states much more clearly what each one does.  I&#8217;d paste the code here, but the code numbers and parts of tables show up due to WP&#8217;s auto-formatting and I&#8217;m tired. Basically, is_home will only return if you are on your front page AND you have set it to the posts page. So is_home should really be called is_posts_page. is_front_page actually does what it sounds like, though.</p>
<p>So ghostpool&#8217;s Dilapidated theme uses this function and this causes the slider and sidebar to fail miserably because the front page is not the posts page. In discovering this I had to dig through and debug various theme options, where I discovered ghostpool&#8217;s unfamiliarity with booleans. They keep using 0 to mean true and 1 to mean false. I cannot think of why they did this. So then they have all of their if statements set up to test if something == 1, which you think would be true, but again, sadly, no. I mean, it&#8217;s fine, it works, it&#8217;s just that it&#8217;s massively confusing and the code is uncommented.</p>
<p>Bonus programming nonsense: WordPress has a function called _doing_it_wrong. Sooooo true.</p>
<p>* &#8211; You have to know booleans if you&#8217;re programming. It&#8217;s basic. It&#8217;s one step beyond thinking of a computer as full of infinite magic 1s and 0s.  Maybe if someone is forcing you to program with a gun to your head and you have no prior experience, I&#8217;ll forgive your ignorance. Otherwise, please just go learn.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2012/04/bad-wordpress-code-redundant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Recruiters, the pronunciation of Django, and karma</title>
		<link>http://www.krakentechnologies.com/2012/03/recruiters-pronunciation-djang-karma/</link>
		<comments>http://www.krakentechnologies.com/2012/03/recruiters-pronunciation-djang-karma/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 18:34:44 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=94</guid>
		<description><![CDATA[Hi there. It&#8217;s been a while, I know. I&#8217;m getting things together. I had a great experience working at Bankstreet College with a friend and former colleague Rory Solomon. But now I&#8217;m back on the bandwagon looking for work. Which leads &#8230; <a href="http://www.krakentechnologies.com/2012/03/recruiters-pronunciation-djang-karma/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Hi there. It&#8217;s been a while, I know. I&#8217;m getting things together. I had a great experience working at <a title="Bankstreet College of Education" href="http://www.bankstreet.edu" target="_blank">Bankstreet College</a> with a friend and former colleague <a title="Rory Solomon's harshmellow.org" href="http://www.harshmellow.org" target="_blank">Rory Solomon</a>. But now I&#8217;m back on the bandwagon looking for work.</p>
<p>Which leads me to the worst experience I&#8217;ve ever had with a recruiter. I&#8217;m tempted to name names, but I&#8217;d rather let karma* sort it out. Let me explain.</p>
<p>LinkedIn is weird. It&#8217;s unimpressive from both a design and technology perspective. It&#8217;s a weird mutant social network that has managed to systematize aspects of &#8220;professional&#8221; relations and that&#8217;s why it&#8217;s survived For me, its main purpose is to serve as a buffer between recruiters and my inbox. I get several offers a day, ranging from tasteful, personalized responses to poorly spelled/researched bulk spam.</p>
<p>And speaking of poor research, here&#8217;s a note to recruiters/everyone. The &#8216;D&#8217; in &#8216;Django&#8217; is silent. It&#8217;s not &#8216;duh-jango&#8217; or &#8216;dee-jango.&#8217; Just &#8216;jango.&#8217; It&#8217;s named after <a title="Wikipedia - Django Reinhardt" href="http://en.wikipedia.org/wiki/Django_Reinhardt" target="_blank">Django Reinhardt</a>. I can&#8217;t stand sitting through a phone interview where the recruiter repeatedly mispronounces it when I&#8217;m pronouncing it correctly about once a minute for the entire conversation. I understand that most recruiters are clueless about all of the tech they&#8217;re hiring for, but there&#8217;s just no excuse.</p>
<p>I responded to one offer recently and over the course of a week ended up sending almost 20 emails and making half a dozen phone calls to one particular recruiter, let&#8217;s call him Tom. Tom was very soft-spoken and seemed nice enough and the client was a much-buzzed startup. Regardless, I wasn&#8217;t really feeling enthusiastic about the prospect and I made this clear to Tom. After much back and forth, I got less than 24 hours notice for a meeting at 9:30 the next morning. In midtown. At a coffee shop.</p>
<p>Midtown is theoretically a good meeting point because it&#8217;s in the middle of Manhattan. Which is fine if you assume that everyone lives in Manhattan. The problem is that roughly 7/8 of NYC&#8217;s population do not. I am part of that 7/8.</p>
<p>Also, a coffee shop? This startup already claimed to have a huge percentage of its market (Easy to do when you define your market. My market is me. I have 100% of my market!) and they don&#8217;t even have an office? I also had yet to speak to the client or receive any other information about the position other than looking at the company&#8217;s website and hearing they use Python/Django.</p>
<p>So I tried to push the meeting back and the client claimed he couldn&#8217;t. I reluctantly agreed and shuffled my schedule around. Then the next morning, I had some minor web administration crises to deal with and I also realized that I&#8217;d spent hours talking to and emailing Tom. I didn&#8217;t have any idea how long the meeting was going to be and the prospect of wasting hours going to midtown when I had other things to do was less and less appealing. So I called Boris and cancelled, apologizing for the short notice. Admittedly, it was short notice, but what does that mean, he has to reschedule his latte? Boris sounded surprised, but told me to talk to Tom and we&#8217;d reschedule.</p>
<p>Then I got a one-line email from Tom saying that the client didn&#8217;t want to reschedule. When I called Tom, I apologized for cancelling and said I shouldn&#8217;t have tried to do it in the first place because I was too busy. Tom was audibly perturbed from the start and said something about how I shouldn&#8217;t have committed if I wasn&#8217;t going to do it. I explained my reservations I&#8217;ve already mentioned above. He kept saying they weren&#8217;t relevant and eventually interrupted and yelled (with a raised voice), &#8220;No, now you listen&#8230;&#8221; I was then subjected to an angry lecture on business etiquette in a raised voice that culminated in me saying, &#8220;I don&#8217;t have to listen to this&#8221; and hanging up the phone. I have never, ever had an experience like that with a recruiter.</p>
<p>I spoke to two other recruiters that day and didn&#8217;t experience anything approaching the anger and negativity from Tom. Maybe my cancellation reflected poorly on him and he lost the client and was understandably angered, but one of the other recruiters I spoke to said, &#8220;That&#8217;s completely unprofessional. Whatever happened, there&#8217;s no reason for him to yell.&#8221; He also said he&#8217;d never heard of Tom&#8217;s firm. With Tom&#8217;s people skills, it is likely that no one ever will.</p>
<p>I have a temper, so I was considering publicly naming the company and the recruiter, at least on Facebook so my programmer friends don&#8217;t have to deal with him. In the end I  wrote the client a text message explaining what happened in brief and letting him know that I didn&#8217;t hold it against him, but Tom&#8217;s actions were reflecting poorly on his company.</p>
<p>I probably still look the worst in this situation to both Tom and the client, but I don&#8217;t care. I don&#8217;t expect people to bend over backwards for me and I wouldn&#8217;t even if I was a hotshot startup entrepreneur. And this post will probably won&#8217;t help my job prospects. Good thing that people are so desperate for tech workers it&#8217;s virtually impossible to <em>not</em> get a job as a programmer.</p>
<p>* &#8211; Weird for a programmer to be talking about karma, I know. From my admittedly limited readings on Buddhism, I&#8217;ve learned that karma is not a mystical force that pervades the universe, righting wrongs and bringing balance. Karma is more like habits, which can be good or bad, helpful or harmful. Good karma are compassionate, unselfish actions. Bad karma are hurtful, selfish actions. So if you have bad karma, people are going to see this and react accordingly. To get rid of bad karma, stop your bad habits. Nothing mystical about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2012/03/recruiters-pronunciation-djang-karma/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Easy MySQL backup shell script</title>
		<link>http://www.krakentechnologies.com/2011/05/easy-mysql-backup-shell-script/</link>
		<comments>http://www.krakentechnologies.com/2011/05/easy-mysql-backup-shell-script/#comments</comments>
		<pubDate>Thu, 12 May 2011 15:07:33 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[database backup]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server administration]]></category>
		<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=80</guid>
		<description><![CDATA[I accidentally deleted my MySQL backup script. No backups is bad news. I was looking for replacements and found a bunch, but they are all overkill. And half of them don&#8217;t even zip your backups. The only two elements I &#8230; <a href="http://www.krakentechnologies.com/2011/05/easy-mysql-backup-shell-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I accidentally deleted my MySQL backup script. No backups is bad news. I was looking for replacements and found a bunch, but they are all overkill. And half of them don&#8217;t even zip your backups.</p>
<p>The only two elements I really need control over are the database name and directory to store the backups. Those are easily handled with shell variables.</p>
<p>Things to note:</p>
<ol>
<li>Don&#8217;t store passwords in the file! You need to enter a password, so use the password shadow file. On systems using Plesk, this should be /etc/psa/psa.shadow. If you don&#8217;t have a password shadow file, you can store the password in an option in the user&#8217;s .my.cnf file in their home directory. Make sure to make it readable only by the user.</li>
<li>While you&#8217;re at it, make sure the user has only the necessary privileges. Don&#8217;t use a superuser account or an account with access to other databases.</li>
<li>Ensure unique file names. I use the date command for this. The format string &#8220;%b-%d-%y_%H&#8221; produces 2011-05-12_08, but adjust to your own needs.</li>
</ol>
<p>Then just stick it in your crontab and you&#8217;re done!</p>
<p>If anyone knows a nice way to do incremental backups, that&#8217;d be nice.</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="php"><pre class="de1"><span class="co2">#!/bin/bash
</span>
BACKUP_DIR<span class="sy0">=</span><span class="st0">&quot;/YOUR/BACKUP/DIR&quot;</span>
DB<span class="sy0">=</span><span class="st0">&quot;DATABASE_NAME&quot;</span>
&nbsp;
mysqldump <span class="sy0">-</span>uUSER <span class="sy0">-</span>p`cat <span class="sy0">/</span>PATH<span class="sy0">/</span>TO<span class="sy0">/</span>PASSWDSHADOW` <span class="re0">$DB</span> <span class="sy0">|</span> gzip <span class="sy0">&amp;</span>gt<span class="sy0">;</span> <span class="re0">$BACKUP_DIR</span><span class="sy0">/</span><span class="re0">$DB</span><span class="sy0">.</span>`<span class="kw3">date</span> <span class="sy0">+%</span>b<span class="sy0">-%</span>d<span class="sy0">-%</span>y_<span class="sy0">%</span>H`<span class="sy0">.</span>sql<span class="sy0">.</span>gz</pre></div></div></div></div></div></div></div>


]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2011/05/easy-mysql-backup-shell-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solved: Cleanr WordPress Theme conflicts with Disqus comments</title>
		<link>http://www.krakentechnologies.com/2011/03/solved-cleanr-wordpress-theme-conflicts-with-disqus-comments/</link>
		<comments>http://www.krakentechnologies.com/2011/03/solved-cleanr-wordpress-theme-conflicts-with-disqus-comments/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 05:12:31 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=67</guid>
		<description><![CDATA[I&#8217;m a big fan of Disqus (especially since they use Django), but the comment form was not displaying correctly in another blog I was working on. Specifically it was being displayed in the wrong place on the individual post page. &#8230; <a href="http://www.krakentechnologies.com/2011/03/solved-cleanr-wordpress-theme-conflicts-with-disqus-comments/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m a big fan of Disqus (especially since they use Django), but the comment form was not displaying correctly in another blog I was working on. Specifically it was being displayed in the wrong place on the individual post page.<br />
At first I thought it was a CSS issue, but it was actually a function call in the wrong place in single.php. There&#8217;s an big if block that starts with:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="php"><pre class="de1"><span class="kw2">&lt;?php</span> <span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span><span class="st_h">'open'</span> <span class="sy0">==</span> <span class="re0">$post</span><span class="sy0">-&gt;</span><span class="me1">comment_status</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span> <span class="br0">&#40;</span><span class="st_h">'open'</span> <span class="sy0">==</span> <span class="re0">$post</span><span class="sy0">-&gt;</span><span class="me1">ping_status</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></pre></div></div></div></div></div></div></div>


<p>Cut that block, with all of the elses and paste it outside of the p tag that lists categories, etc, but before the two closing div tags. Voila!<br />
Note that this is for <a href="http://wordpress.org/extend/themes/cleanr">WPShoppe&#8217;s Cleanr theme</a>. Not the many others with the <a href="http://themeforest.net/item/cleanr-theme-wordpress-version/102093">same</a> <a href="http://webtint.net/resources/cleanr-a-free-wordpress-theme-from-webtint/">name</a>. WPShoppe&#8217;s theme is actually getting kind of old and that may be why this is happening. Webtint&#8217;s Cleanr looks more polished.<br />
 
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2011/03/solved-cleanr-wordpress-theme-conflicts-with-disqus-comments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
