<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>Developer Scratch Pad</title><generator>Tumblr (3.0; @devscratchpad)</generator><link>http://devscratchpad.tumblr.com/</link><item><title>This morning I fixed the problem with the router</title><description>&lt;p&gt;I replaced it. I had the old one laying around, so I switch the new modem/router for a modem and a router setup.  I was able to reach the nginx server.  That makes me pretty happy.&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/45597482376</link><guid>http://devscratchpad.tumblr.com/post/45597482376</guid><pubDate>Sun, 17 Mar 2013 13:21:55 -0400</pubDate><category>server</category><category>web server</category><category>routing</category></item><item><title>Ideas for the rogue server</title><description>&lt;p&gt;* Mostly static content&lt;/p&gt;
&lt;p&gt;* an interactive  fiction fanzine&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/45554698495</link><guid>http://devscratchpad.tumblr.com/post/45554698495</guid><pubDate>Sat, 16 Mar 2013 23:27:39 -0400</pubDate><category>home server</category><category>web server</category><category>retro</category></item><item><title>Updates on tonight's goal</title><description>&lt;p&gt;So, I can&amp;#8217;t host a webserver because the internet mode/router sent from my isp won&amp;#8217;t let me log in.  I gave up on getting support after 17 minutes went by after told by the queuing service that I had an expected three minute wait. Yes, windstream, you suck.&lt;/p&gt;
&lt;p&gt;I  did created an octopress site and went through the basic installation and configuration. The set up to github pages doesn&amp;#8217;t seem to have worked. Also, in the local machine, it seems that there is no template set up.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;Time for me to go to bed. &lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/45554440441</link><guid>http://devscratchpad.tumblr.com/post/45554440441</guid><pubDate>Sat, 16 Mar 2013 23:24:13 -0400</pubDate><category>octopress</category><category>web server</category></item><item><title>I should also run that rogue web server </title><link>http://devscratchpad.tumblr.com/post/45534927131</link><guid>http://devscratchpad.tumblr.com/post/45534927131</guid><pubDate>Sat, 16 Mar 2013 18:59:01 -0400</pubDate></item><item><title>Okay, let's learn how to use octopress tonight</title><link>http://devscratchpad.tumblr.com/post/45534664575</link><guid>http://devscratchpad.tumblr.com/post/45534664575</guid><pubDate>Sat, 16 Mar 2013 18:55:25 -0400</pubDate><category>octopress</category></item><item><title>Getting control over a blob in canvas</title><description>&lt;p&gt;So today I pondered on what I wanted to do. And although I could keep working on it without any graphics, I decided that it would probably be very cool if I could get a rectangle moving around. And since I had to learn how to do this, why not learn how to do it in canvas? year ago I had moved around an image using the dom, but canvas seems to be the better tool for this kind of work.&lt;/p&gt;
&lt;p&gt;I found a tutorial, I copy and adjusted the right things, and now I have a rectangle that I can move around. That makes me very happy :)&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/41996387262</link><guid>http://devscratchpad.tumblr.com/post/41996387262</guid><pubDate>Thu, 31 Jan 2013 22:31:06 -0500</pubDate><category>html5</category><category>javascript</category><category>onegameamonth</category></item><item><title>Working on next game</title><description>&lt;p&gt;So I finished the development on the other game. These were the things that I learned:&lt;/p&gt;
&lt;p&gt;1. I love the minimalistic UI. You can get stuff done more quickly&lt;/p&gt;
&lt;p&gt;2. The art part is my greatest weakness. It will derail the project&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;For February I am being more ambitious. I am going to try to create a simple RPG-style game with 2-dimensional movement. In fact, I got the movement programmed right now, and so the basic talk mechanism. I am also going to work on it with a minimalistic page UI&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/41917786987</link><guid>http://devscratchpad.tumblr.com/post/41917786987</guid><pubDate>Wed, 30 Jan 2013 22:15:44 -0500</pubDate><category>onegameamonth</category></item><item><title>Day 6, making artwork</title><description>&lt;p&gt;so I am at the point of making artwork. This is the hardest to me since I spent many years as a teenager drawing. I haven&amp;#8217;t drawn in years, so I am not that good at it anymore, yet my expectations are greater. So on day 6 I was working on the hands. These are hard in 8-bit.&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/40758159572</link><guid>http://devscratchpad.tumblr.com/post/40758159572</guid><pubDate>Thu, 17 Jan 2013 07:35:36 -0500</pubDate><category>onegameamonth</category></item><item><title>Day 5, one game a month</title><description>&lt;p&gt;No programming today. I spent the day working on artwork. The game right now has the first opponent, the boss opponent, a buggy mechanism to cycle through each opponent, and ending conditions. I am at the point where I  can transition to making the game graphical.&lt;br/&gt;&lt;br/&gt;I drew the main character and then I created a series of opponents, which in reality are the same character with different cloths and hair color. I need to create the boss, the background, and the hands with rock paper scissors and the scoreboard.&lt;/p&gt;
&lt;p&gt;On other news, thanks to this project I have been getting ideas about other games. &lt;br/&gt;&lt;br/&gt;The next I will attempt to make a rhythm game where you can actually use a musical instrument to play the coming chords notes. It may be too ambitious. We will see. &lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/40616989497</link><guid>http://devscratchpad.tumblr.com/post/40616989497</guid><pubDate>Tue, 15 Jan 2013 14:40:45 -0500</pubDate><category>programming</category><category>onegameamonth</category></item><item><title>Day 4 on a game a month</title><description>&lt;p&gt;I added another opponent. The boss, actually: the random strategy for Rock-Paper-Scissors. I learned that if one starts with double the amount of money, the chances that the player will win by consistently playing the game are pretty high.&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/40493641612</link><guid>http://devscratchpad.tumblr.com/post/40493641612</guid><pubDate>Sun, 13 Jan 2013 23:05:31 -0500</pubDate><category>programming</category><category>a game a month</category></item><item><title>Third day of RPS</title><description>&lt;p&gt;I added the mechanism to advance to another level and for this to display on the screen.&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/40406101765</link><guid>http://devscratchpad.tumblr.com/post/40406101765</guid><pubDate>Sun, 13 Jan 2013 01:03:25 -0500</pubDate><category>programming</category><category>onegameamonth</category></item><item><title>Second day on rock paper scissors</title><description>&lt;p&gt;Today I have spent more than 30 minutes because I had a little of time, and it was fun.&lt;/p&gt;
&lt;p&gt;So now I have reorganized the game to fit in a table, I added the storyline, and I added a game winning condition. I also have refactored the procedural program first into functions and then into an object. I am in the process of getting the basic functionality back. I have to troubleshoot the outcome. I may be getting to the end of today&amp;#8217;s session.&lt;/p&gt;
&lt;p&gt;After I am done bringing back the basic functionality I believe I will begin using bdd to keep moving forward. &lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/40288831579</link><guid>http://devscratchpad.tumblr.com/post/40288831579</guid><pubDate>Fri, 11 Jan 2013 18:40:57 -0500</pubDate><category>programming</category><category>OneGameAMonth</category></item><item><title>I am doing the game in a month challenge</title><description>&lt;p&gt;Yet I don&amp;#8217;t have time at all. Not only do I not have time, but I am in semi-burn out mode. So how will I handle it?&lt;/p&gt;
&lt;p&gt;Easy: make a lame game. Because it is more important to participate and try a little than shoot for the stars and hit nothing.&lt;/p&gt;
&lt;p&gt;I even decided on a name for my endeavor: Lame Games Studios. The first game that I will work on is Rock Paper Scissors. Actually, I already finished it. I can play the game. From this point until the end of the month I will be improving it, 30 minutes a day.&lt;br/&gt;&lt;br/&gt;I should share how over the top lame version -0.21 is. I should put it in github to share its lame glory.&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/40215684157</link><guid>http://devscratchpad.tumblr.com/post/40215684157</guid><pubDate>Thu, 10 Jan 2013 20:06:30 -0500</pubDate><category>programming</category><category>Lame Games Studios</category></item><item><title>How to start minecraft in windows on a lan with unique name</title><description>&lt;p&gt;java -Xms512m -Xmx1024m -cp &amp;#8220;%APPDATA%\minecraft\bin*&amp;#8221; -Djava.library. &amp;#8220;%APPDATA.minecraft\bin\natives&amp;#8221; net.minecraft.client.Minecraft &amp;#8220;dopey&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/39840234623</link><guid>http://devscratchpad.tumblr.com/post/39840234623</guid><pubDate>Sun, 06 Jan 2013 10:40:08 -0500</pubDate><category>minecraft</category></item><item><title>The workflow</title><description>&lt;p&gt;Here are two simple practices that I want to start.&lt;/p&gt;

&lt;p&gt;The first one is to work off a virtual machine locally for every project that I have. This should make it easier to share work, and should keep the speed of development up. Ideally I would learn about puppet or chef, but having an imperfect virtual machine beats nothing.&lt;/p&gt;

&lt;p&gt;The second one is to use cucumber more aggressively. Even if the tests won&amp;#8217;t be that good when compared with unit tests, just having a guiding test is  better than nothing. It helps to focus. Ideally I will set up some web testing workflow, but, again, starting with anything is better than nothing.&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/39238461650</link><guid>http://devscratchpad.tumblr.com/post/39238461650</guid><pubDate>Sun, 30 Dec 2012 15:20:45 -0500</pubDate><category>programming</category></item><item><title>Fun task for today: learning how to use require.js</title><description>&lt;p&gt;When I scanned quickly on the toolset for JavaScript, I found that require.js was mentioned often. Having lived through a project that had JavaScript library hell, require.js seems attractive. I started setting up my personal project using require.js, but it was already late, so I had to stop. I am going to attempt to get a basic version going tonight.&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/39235307641</link><guid>http://devscratchpad.tumblr.com/post/39235307641</guid><pubDate>Sun, 30 Dec 2012 14:40:40 -0500</pubDate><category>programming</category><category>JavaScript</category></item><item><title>JavaScript: underscore.js</title><description>&lt;p&gt;I remember going to a conference where a person told me about &lt;a href="http://underscorejs.org/"&gt;underscore.js&lt;/a&gt; . He told me it was this handy library that had a bunch of missing properties from JavaScript. He also claimed that it made JavaScript more functional in practical use.&lt;/p&gt;

&lt;p&gt;I finally got to use it yesterday. He was right.&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/39149534643</link><guid>http://devscratchpad.tumblr.com/post/39149534643</guid><pubDate>Sat, 29 Dec 2012 15:20:43 -0500</pubDate><category>JavaScript</category><category>programming</category></item><item><title>JavaScript: using null as a placeholder in object properties</title><description>&lt;p&gt;I ran into this use for null while BDDing a personal project.&lt;/p&gt;

&lt;p&gt;I wanted to create a placeholder property, test that it wasn&amp;#8217;t assigned correctly, and then give it the right initial assignment. But when I ran the test, it said that the property didn&amp;#8217;t exist.&lt;/p&gt;

&lt;p&gt;Well, after a few tries, I attempted to set the property to &lt;em&gt;null&lt;/em&gt;. And then it worked. Now, I don&amp;#8217;t know exactly how this is working, since I didn&amp;#8217;t find this issue in the standards, or how it is implemented, but in practical terms if one fails to give a property a value, it will not be created.&lt;/p&gt;

&lt;p&gt;So the easy work around is to set the property to null. Then the property will be created and available for use.&lt;/p&gt;

&lt;p&gt;Below is code that shows the difference between not assigning a value and assigning null;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    function Storm(){
      this.type;
      this.name = null;   
    }

    function metaphysicalCheck(name, theObject){
        var message, doesOrDoesNot = '';

       if (!(name in theObject)){
           doesOrDoesNot = "doesn't";
        }
        message = "'" + name + "' "+ doesOrDoesNot + " exists in tropicalStorm";

        alert(message);   
    }


    var tropicalStorm = new Storm();
    metaphysicalCheck("type", tropicalStorm);
    metaphysicalCheck("name", tropicalStorm);
&lt;/code&gt;&lt;/pre&gt;</description><link>http://devscratchpad.tumblr.com/post/39146454403</link><guid>http://devscratchpad.tumblr.com/post/39146454403</guid><pubDate>Sat, 29 Dec 2012 14:40:40 -0500</pubDate><category>JavaScript</category><category>programming</category></item><item><title>JavaScript: hoisted functions</title><description>&lt;p&gt;I learned this one last night reading &amp;#8220;OOP in JS&amp;#8221;&lt;/p&gt;

&lt;p&gt;So, when you declare a function in JavaScript using the &lt;em&gt;function&lt;/em&gt; keyword, all of those functions will get hoisted to the top of the scope. What the hell does that last sentences means?&lt;/p&gt;

&lt;p&gt;What it means in practical terms is that you can use a function within an object in Javascript before you declared it.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; var funkyMarshmallow = new Marshmallow("funky");
 var tummy = eat(funkyMarshmallow);

 function eat(junkFood) {
    if (funkyMarshmallow  
}
&lt;/code&gt;&lt;/pre&gt;</description><link>http://devscratchpad.tumblr.com/post/39062424966</link><guid>http://devscratchpad.tumblr.com/post/39062424966</guid><pubDate>Fri, 28 Dec 2012 15:20:33 -0500</pubDate><category>programming</category></item><item><title>Javascript: The value and uses of null</title><description>&lt;p&gt;In C# and other related languages &lt;em&gt;null&lt;/em&gt; mean a variable that hasn&amp;#8217;t been assigned yet. Not so in JavaScript. When a variable hasn&amp;#8217;t been set yet it has the value &lt;em&gt;undefined&lt;/em&gt;. Undefined is different from &lt;em&gt;null&lt;/em&gt;. So what is &lt;em&gt;null&lt;/em&gt;? And what is it used for?&lt;/p&gt;

&lt;p&gt;It has to do with scope. A variable set to null is known in the scope. Undefined means that the scope doesn&amp;#8217;t know of the existence of the variable.&lt;/p&gt;

&lt;p&gt;When is it used?&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;For climbing the prototype chain&lt;/strong&gt; Prototype can either be set to an object or to null. Once you reach the null value, JavaScript will stop looking for a variable or method through the prototypes of the object.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;To keep placeholder properties&lt;/strong&gt; in an object. When creating properties with &lt;em&gt;this&lt;/em&gt;, if you don&amp;#8217;t set it to null, it will not be available.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Assigning a property to null will &lt;strong&gt;keep the property in JSON&lt;/strong&gt;. If the property is undefined, it is erased from the object. Related to the previous one.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One source claims that the setting a variable to null will &lt;strong&gt;tell the garbage collector&lt;/strong&gt; to pick it up. This doesn&amp;#8217;t appear in ECMA document, so it may be implementation specific.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Semantic difference.&lt;/strong&gt; One source says that the difference between &lt;em&gt;null&lt;/em&gt; and &lt;em&gt;undefined&lt;/em&gt; is semantic: values set to null are values that the programmer intentionally set to nothing. Anything else is set to &lt;em&gt;undefined&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Funky facts
* Converting &lt;em&gt;null&lt;/em&gt; to Number returns +0&amp;#160;!!
* typeof null returns &amp;#8220;object&amp;#8221;&lt;/p&gt;

&lt;p&gt;I wish that there is some source that gets the inventor of the language explaining why he decided to add &lt;em&gt;undefined&lt;/em&gt; and &lt;em&gt;null&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;References:
&lt;a href="http://saladwithsteve.com/2008/02/javascript-undefined-vs-null.html"&gt;http://saladwithsteve.com/2008/02/javascript-undefined-vs-null.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf"&gt;http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://stackoverflow.com/questions/801032/null-object-in-javascript"&gt;http://stackoverflow.com/questions/801032/null-object-in-javascript&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.gibdon.com/2006/05/javascript-difference-between-null-and.html"&gt;http://www.gibdon.com/2006/05/javascript-difference-between-null-and.html&lt;/a&gt;&lt;/p&gt;</description><link>http://devscratchpad.tumblr.com/post/39059383845</link><guid>http://devscratchpad.tumblr.com/post/39059383845</guid><pubDate>Fri, 28 Dec 2012 14:40:47 -0500</pubDate><category>javascript</category></item></channel></rss>
