<?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>Sun, 13 May 2012 04:04:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<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 face, did it? It 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>0</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>
		<item>
		<title>Removing duplicate rows in SQL</title>
		<link>http://www.krakentechnologies.com/2010/11/removing-duplicate-rows-in-sql/</link>
		<comments>http://www.krakentechnologies.com/2010/11/removing-duplicate-rows-in-sql/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 21:15:22 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[duplicate rows]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=53</guid>
		<description><![CDATA[Since I&#8217; ve had to look this up twice in the last year, I should blog about it so I&#8217;ll remember. This is the quickest solution I&#8217;ve found. Problem: You have duplicate rows in your database. Even if you have &#8230; <a href="http://www.krakentechnologies.com/2010/11/removing-duplicate-rows-in-sql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217; ve had to look this up twice in the last year, I should blog about it so I&#8217;ll remember. This is the quickest solution I&#8217;ve found.</p>
<p>Problem:<br />
You have duplicate rows in your database. Even if you have an <code>AUTOINCREMENT</code> primary key, that doesn&#8217;t necessarily prevent you from having rows with identical information.</p>
<p>Solution:<br />
Find a column that will uniquely identify a record. If there isn&#8217;t one column, find a combination of columns. If there isn&#8217;t a combination of columns that uniquely identify your row, you probably have database design issues.</p>
<p><code>CREATE TEMPORARY TABLE nonduplicates LIKE table_with_duplicates;<br />
INSERT INTO nonduplicates SELECT * FROM table_with_duplicates GROUP BY unique_column;</code></p>
<p>To use a combination of columns, do:</p>
<p><code>INSERT INTO nonduplicates SELECT * FROM table_with_duplicates GROUP BY unique_column_1, unique_column_2, etc...;</code></p>
<p>If you have a very large data set, this technique is going to take a lot of time and resources. It may not even be possible due to memory constraints. In that case, here is an article on <a href="http://www.15seconds.com/issue/011009.htm">analyzing duplicate rows without using temporary tables</a>. In essence, you <code>JOIN</code> a table to itself in a subquery that matches all of your unique_columns against themselves with a <code>HAVING</code> clause that checks for an <code>id</code> lower or higher than the <code>MAX(id)</code> or <code>MIN(id)</code> depending on whether or not you want to keep the older or newer records. You could also use a timestamp field for this if there is one. This allows you much finer control over which records you keep. And in the time it will take you to understand my explanation, you could have read the (commented!) SQL code in the link above and understood it much better.</p>
<p>Of the many languages I work in and have worked with, SQL is the most unintuitive to me. I ran across the above link while idly searching for links on SQL and set theory. I can think of functional languages in terms of mathematical functions, but I don&#8217;t have that mapping in my brain with SQL. I think it&#8217;s the syntax. It&#8217;s always felt so awkward and COBOL-ish to me. I guess I&#8217;m spoiled by Python.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2010/11/removing-duplicate-rows-in-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Life with OS X on my Hackintosh</title>
		<link>http://www.krakentechnologies.com/2010/10/mac-os-x-on-my-hackintosh/</link>
		<comments>http://www.krakentechnologies.com/2010/10/mac-os-x-on-my-hackintosh/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 20:43:14 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[hackintosh]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[netbook]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[steve jobs]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=44</guid>
		<description><![CDATA[So on to what I&#8217;ve learned from getting hacked. I&#8217;ve learned that Windows is not to be trusted with anything. I&#8217;m still not sure whether I got the virus by transferring a file from another computer or if it was &#8230; <a href="http://www.krakentechnologies.com/2010/10/mac-os-x-on-my-hackintosh/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So on to what I&#8217;ve learned from getting hacked. I&#8217;ve learned that Windows is not to be trusted with anything. I&#8217;m still not sure whether I got the virus by transferring a file from another computer or if it was from a Vista security hole.</p>
<p>My experience with my Hackintosh has been very positive, except it (a Dell Mini 10v) doesn&#8217;t get anywhere near the battery life of my Samsung NC310. It doesn&#8217;t auto-dim the screen when on battery power.</p>
<p>It also has problems with hibernation/safe sleep. I&#8217;m getting the message &#8220;hibernation image too old&#8221; and this is after I had to use the pmset command in Terminal. Is there really no menu setting for this in OS X? I have no problem going into the command line, but I&#8217;d expect Apple to have some shiny, lickable interface for this.</p>
<p>Firefox 3.6 is almost unbearably slow on this. Chrome feels more or less like a desktop browser if you reasonably limit your tabs. Safari is fine, but not quite as peppy as Chrome.</p>
<p>Two-finger vertical scrolling works, which is nice, but the Dell Mini 10V&#8217;s  trackpad is a bit uncomfortably small. I can&#8217;t get horizontal gestures, three-finger gestures, or pinch and zoom to work, but maybe this is possible and I&#8217;m just not doing it right.</p>
<p>I&#8217;m sure that a lot of these problems could be solved with fairly simple tweaks. I haven&#8217;t had time to research it as I&#8217;m working hard on the new version of Yodelscope. I didn&#8217;t even hack this Hackintosh myself, which is shameful to my nerd status. An Apple mega-nerd friend of mine gave it to me to play with Apple&#8217;s various dev kits (He also makes an iPhone app called <a href="http://www.dopieslife.com">How Did I Get Home?</a> which you should definitely check out). I will get around to turning this thing into a triple-booting little beast one of these days.</p>
<p>I also ran across this really interesting <a href="http://www.cultofmac.com/john-sculley-on-steve-jobs-the-full-interview-transcript/63295">Cult of Mac interview with former Apple CEO John Sculley</a>. I&#8217;m too attached to the idea(l)s of open source to join the Mac (or more appropriately Apple) cult, but this article certainly does help cement Jobs&#8217; mythical status. As a young nerd, I read a lot about Apple, but many things focused on Steve Wozniak&#8217;s technical genius rather than the organizational/design genius of Jobs. Call me culturally clueless, but this interview is what first drew this to my attention.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2010/10/mac-os-x-on-my-hackintosh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site hacked!</title>
		<link>http://www.krakentechnologies.com/2010/09/site-hacked/</link>
		<comments>http://www.krakentechnologies.com/2010/09/site-hacked/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 20:38:56 +0000</pubDate>
		<dc:creator>m</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krakentechnologies.com/?p=37</guid>
		<description><![CDATA[If you came here or to some of my other sites recently, you may have noticed that Google blacklisted them as site distributing malware. This was a result of a virus that infected my PC and used a keylogger to &#8230; <a href="http://www.krakentechnologies.com/2010/09/site-hacked/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you came here or to some of my other sites recently, you may have noticed that Google blacklisted them as site distributing malware. This was a result of a virus that infected my PC and used a keylogger to steal passwords. Then, on Sept. 25, it used those passwords to download files via FTP and re-upload them with malicious Javascript files included from addonrock.ru and alienradar.ru. It did this to any file named index or default with an extension of .php or .html. It also affected many .js files, adding a document.write call to insert malware scripts.</p>
<p>The way this all started is that I had a Windows Vista laptop that was sitting around forever and when I connected it to the Internet, it must have gotten infected before I had a chance to apply essential Windows upgrades. This was months ago and I don&#8217;t think that infection specifically was the keylogger. I cleaned that virus up as much as I could using advice from www.bleepingcomputer.com and tools like <a href="http://www.malwarebytes.org">Malware Bytes&#8217; Malware Defender</a> and <a href="http://www.safer-networking.org">Spybot Search &amp; Destroy</a>. Unfortunately, I don&#8217;t think that totally removed whatever virus it was. There was some part of the trojan left lurking around, dormant. I think it later re-activated to download another part or an updated version of itself, which is what stole my passwords. I&#8217;m still not sure whether to just totally wipe the hard drive on my Windows laptop. Painstakingly removing all traces of the viruses could a learning experience, but I can think of slightly more fun ways to spend my time.</p>
<p>So, now I&#8217;m typing this from OS X, on  a little Hackintosh netbook, which I got from my pal over at <a href="http://www.dopieslife.com">Dopie&#8217;s Life</a>. It&#8217;s probably a stepping stone to an all-Linux life. Or maybe I&#8217;ll get really paranoid about security and use some customized NetBSD install with encrypted everything. I&#8217;m already looking at encrypting my files using something like TrueCrypt.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krakentechnologies.com/2010/09/site-hacked/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

