<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title>Studio Koi Blog</title>
    <link>http://studiokoi.com/blog/</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:creator>StudioKoi.com</dc:creator>
    <dc:rights>Copyright 2011</dc:rights>
    <dc:date>2011-10-16T01:56:19+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://www.expressionengine.com/" />
    

    <item>
      <title>Setting Gnome 3 as the default desktop in Ubuntu 11.10</title>
      <link>http://studiokoi.com/blog/comments/setting_gnome_3_as_the_default_desktop_in_ubuntu_11.10</link>
      <guid>http://studiokoi.com/blog/comments/setting_gnome_3_as_the_default_desktop_in_ubuntu_11.10#When:01:56:19Z</guid>
      <description>So, like most people who get excited about new software, I installed the Ubuntu 11.10, Oneiric Ocelot update as soon as it was available this week. I have said it loudly on twitter before, but I really dislike Ubuntu Unity. The sad thing is that 11.10 not only comes with Unity as default, it uninstalls Gnome classic on upgrade, so if you were using classic in 11.04 like I was: Rude awakening.

Fortunately, there are some steps you can take to install Gnome 3 and make it the default booting shell for Ubuntu 11.10. First, you will need to install the Gnome shell in the terminal or through the software sources app. (I prefer to install from the terminal as it gives better information if an install fails.)

sudo apt&#45;get install gnome&#45;shell

You might be tempted to install GDM instead of using LightDM for the initial login screen. I had trouble doing this and the system absolutely does not like having GDM and LightDM installed at the same time (for obvious reasons). But to get past that, I edited the LightDM conf to always boot into Gnome and went into System Settings &gt; User Accounts and set my user account to auto login. This way i only have to see the LightDM screen or Unity if i specifically log out to that screen. Thankfully, someone on  AskUbuntu had the right answer for setting the default shell in LightDM.

Once you&#8217;ve installed Gnome, go to the terminal and sudo edit the LightDM conf file (I prefer to use gedit):

sudo gedit /etc/lightdm/lightdm.conf

Then edit the line that says:

user&#45;session=ubuntu

to

user&#45;session=gnome&#45;shell

Now reboot. This will have you happily booting into Gnome 3 without a login prompt or the ugly ass LightDM screen. On another note, if you don&#8217;t want to see that screen when you want to invoke the reboot command (as its not possible from inside Gnome or Unity, you have to log out), from the terminal, type:

sudo reboot

Some other good resources for pimping out your Ubuntu 11.10 Gnome3 install:

Things to tweak after installing Ubuntu 11.10 Oneiric Ocelot

Official Gnome Shell Extensions</description>
      <dc:subject></dc:subject>
      <dc:date>2011-10-16T01:56:19+00:00</dc:date>
    </item>

    <item>
      <title>Ascension Gets an iOS version and it&#8217;s really really good</title>
      <link>http://studiokoi.com/blog/comments/ascension_gets_an_ios_version_and_its_really_really_good</link>
      <guid>http://studiokoi.com/blog/comments/ascension_gets_an_ios_version_and_its_really_really_good#When:14:18:32Z</guid>
      <description>Last weekend I went with some friends to GenCon Indy. It was a blast and we got to try out some new board glare that we&#8217;ve had our eyes on.

My friend Dave picked up a couple of pre&#45;release games like Quarriors (amazing dice deck building game), and some dominion expansions. One of the games we demoed was Ascension. Ascension is a deck building game like Dominion, but instead of piles of cards, only a few are out at a time and get replaced when purchased or defeated. I wasn&#8217;t blown away with it, but it was a cool idea. I just liked Quarriors better and we went home with it.

Fast forward to this week where Dave tells me that there is an iOS version of Ascension, and not only is it pretty good, it&#8217;s for both iPad and iPhone. I hate it when you have to purchase an app for each device instead of it being universal, so that&#8217;s a huge bonus for me.

Normally I dont write about games, but what really intrigues me about it is how seamless of a transition it is from the board game to the handheld as far as understanding of play. Literally, since i knew how to play the board game, the only part of the tutorial for the iOS game i needed was the flyouts for the cards. However, if you don&#8217;t know how to play the game, the built in tutorial is rather good.

I have yet to find a bug and thats just nutty for such potential complication as translating a board game with specials rules to a handheld device. (Granted, many more complicated games like RPGs, etc are coded on devices, but they are created with the intent of the device in the first place.) It&#8217;s just a really well done game.

There is a video of the game on iPad from Gen Con, with an upcoming expansion that ill be available through in app purchasing, but i&#8217;ve also included some screenshots.



Opening Screen:



Choose character and CPU opponent or other players for pass and play!



Have multiple games going in case you want to stop a personal game and play a new one with friends (also has online play):



Zoom in on cards to see what they do and use them while zoomed. (Very intuitive.):



View opponents hand:



View opponents previous play log:



View discard pile:



End game view showing all cards for each player and how the score was obtained:



This is just a really well put together game and how mobile games should be.</description>
      <dc:subject></dc:subject>
      <dc:date>2011-08-12T14:18:32+00:00</dc:date>
    </item>

    <item>
      <title>Automator: Add &#8216;right click, open with&#8217; to folders in Finder</title>
      <link>http://studiokoi.com/blog/comments/automator_add_right_click_open_with_to_folders_in_finder</link>
      <guid>http://studiokoi.com/blog/comments/automator_add_right_click_open_with_to_folders_in_finder#When:03:35:35Z</guid>
      <description>I use OS X and Ubuntu on a daily basis with my dev machines. One of the things that I like that Ubuntu can do is open folders with applications on right click. Unfortunately, OS X doesn&#8217;t do this by default, but we can accomplish it easily with an Automator Workflow. (It would be nice if  Binary Age would add this feature to TotalFinder   ) .

One of the options in OS X&#8217;s Automator workflow outputs is &#8216;Service&#8217;, which will allow us to put a finished workflow into a right click menu for files and folders.

First, launch Automator and choose &#8216;Service&#8217;:



Now, the first item shown is an automatic file list receiver from Finder. Because we need to select the app we want to open the files with, we need to store this as a variable. The first thing we need is &#8216;Set Value of Variable&#8217; from the Utilities heading. This will allow us to store the files into a variable so we can use it later. Drag the &#8216;Set Value of Variable into the workflow and double click the variable dropdown and make a new variable named &#8216;files&#8217;.



The next thing we need is &#8216;Ask for Finder Items&#8217; under Files &amp;amp; Folders. This will allow us to prompt for the application we are going to open the selected files with. (If you can restrict it to file extensions, i am not sure how, so for now, I just set it to type &#8216;file&#8217;.) Change the Prompt to &#8216;Choose an Application&#8217; and set the starting folder to your Applications folder. Then, right click the action window and select &#8216;Ignore Input&#8217; so we don&#8217;t receive any of the files from the previous action in the workflow:



Now we need to capture this as a variable, so from the Utilities folder, find &#8216;Set Value of Variable&#8217; and drag it into your workflow. It should automatically pin itself to the previous item. Name the variable &#8216;selectedapp&#8217; by double clicking the &#8216;New Variable&#8217; dropdown box.



We have our chosen app, and we need to retrive the value of the selected Finder items so we can feed them to the app to open them. From the Utilities folder, select &#8216;Get Value of Variable&#8217; and drag it into the workflow. From the variable list at the bottom, drag the &#8216;files&#8217; variable into the variable dropdown. Then, right click the action window and select &#8216;Ignore Input&#8217; so we don&#8217;t receive any of the files from the previous action in the workflow:



The last item we need is an Application opener to open the selected Finder items with the previously prompted for application. Under &#8216;Files &amp;amp; Folders&#8217;, select &#8216;Open Finder Items&#8217; and add it to the workflow. Then, from the variable list at the bottom of the window, drag in the &#8216;selectedapp&#8217; variable we created before onto the &#8216;Open Finder Items&#8217; item in the workflow. It should automatically change the &#8216;Open with:&#8217; value to the variable.



Your completed workflow should look like this:



Now safe the file (It should automatically be saving as a finder service) and name it &#8216;Open Files With&#8230;&#8217;. Use the workflow by highlighting the folder you want to open, right click and go to the services menu and select &#8216;Open Files With&#8230;&#8217;.



If you use some applications more than others, then an option to create a directly opening right click workflow is to remove the middle two steps for selecting an application, and for the last step, use a selected application instead of the &#8216;selectedapp&#8217; variable. 

Enjoy!&amp;nbsp;</description>
      <dc:subject></dc:subject>
      <dc:date>2011-06-19T03:35:35+00:00</dc:date>
    </item>

    <item>
      <title>Promote JS ExpressionEngine plugin</title>
      <link>http://studiokoi.com/blog/comments/promote_js_expressionengine_plugin</link>
      <guid>http://studiokoi.com/blog/comments/promote_js_expressionengine_plugin#When:14:53:24Z</guid>
      <description>Have you been promoting JavaScript? Did you even know that you could/should be? It just got easier to help if you are using ExpressionEngine.

At JSConf 2010, Chris Williams started a project called PromoteJS to help get bad JavaScript references off the web. You will know how important a cause this is if you have ever done a Google search for JavaScript documentation or help. The top results are deplorable. (NEVER use w3schools.)

The aim of PromoteJS is to use a banner with keywords relating to JavaScript to help the SEO of better documentation. There is even a site named Are We First Yet? to help us see when better docs are at the top.

It&#8217;s easy to help. You can go to the PromoteJS website and copy the code for a banner there for your website, or you can use the Wordpress plugin located there.

For ExpressionEngine users, I have made a plugin that works on EE 1.x and 2.x and you can download it here.</description>
      <dc:subject></dc:subject>
      <dc:date>2011-04-25T14:53:24+00:00</dc:date>
    </item>

    <item>
      <title>Converting numbers to letters quickly in PHP</title>
      <link>http://studiokoi.com/blog/comments/converting_numbers_to_letters_quickly_in_php</link>
      <guid>http://studiokoi.com/blog/comments/converting_numbers_to_letters_quickly_in_php#When:18:22:03Z</guid>
      <description>For a personal project, I needed to convert numbers to letters and double letters when greater than 26. This is rather a simple thing in PHP using the chr function.

The short of it is that you divide by 26 and get the letter, then repeat the letter for every multiple of 26. This gives us our double letters accurately. I also added an option for uppercase.</description>
      <dc:subject></dc:subject>
      <dc:date>2011-02-27T18:22:03+00:00</dc:date>
    </item>

    <item>
      <title>Quickly unserialize PHP serialized object data from the command line</title>
      <link>http://studiokoi.com/blog/comments/quickly_unserialize_php_serialized_object_data_from_the_command_line</link>
      <guid>http://studiokoi.com/blog/comments/quickly_unserialize_php_serialized_object_data_from_the_command_line#When:21:53:38Z</guid>
      <description>I do a lot of testing with PHP that requires serialized data to be passed and retrieved. Many times this can be a pain to read, so i made a quick shell script that will take a normal input or if thats missing, get the clipboard from OS X and serialize it. This requires that you have the PHP CLI installed (default on OS X).

 Then quite handily, you can just type php_unserialize in your terminal and it will spit out a var_dump of the unserialized data that you can read.</description>
      <dc:subject></dc:subject>
      <dc:date>2010-12-19T21:53:38+00:00</dc:date>
    </item>

    <item>
      <title>The Cobbler&#8217;s assistant&#8217;s children have no shoes, either</title>
      <link>http://studiokoi.com/blog/comments/the_cobblers_assistants_children_have_no_shoes_either</link>
      <guid>http://studiokoi.com/blog/comments/the_cobblers_assistants_children_have_no_shoes_either#When:23:48:10Z</guid>
      <description>Last week we released a new design for Solspace. Everything went over pretty well, aside from some small hiccups. Not bad for a new site design launch. I am quite proud that we have a new face as we are very dedicated to our work and our old website just didn&#8217;t reflect that. Good change.

Like the  blog post about the redesign suggests, it is hard to work on your on self image when you are spending all of your time trying to make sure everything else is taken care of. Customer service, bug fixes, and fresh products are first and foremost, because that&#8217;s what&#8217;s most useful to customers. However, a good face is very important.

This sort of brings me to this website. I added a new design recently, but didn&#8217;t spend much time on it, as i don&#8217;t usually have much to give because I am trying to make my work at Solspace the best it can be. It really needed the update, though because it was just slow and hard to read. However, it&#8217;s still not to my liking and will probably redesign again in the coming months and start to chronicle a bit more of what i am working on now.

I still want to share knowledge and pay forward the help so many others have given me over time.&amp;nbsp;</description>
      <dc:subject>News,</dc:subject>
      <dc:date>2010-08-17T23:48:10+00:00</dc:date>
    </item>

    <item>
      <title>Ghetto tag limiting in EE 2</title>
      <link>http://studiokoi.com/blog/comments/ghetto_tag_limiting_in_ee_2</link>
      <guid>http://studiokoi.com/blog/comments/ghetto_tag_limiting_in_ee_2#When:00:33:39Z</guid>
      <description>So, I finally decided to take the time to update my website to the ExpressionEngine 2.0 Beta.

This means that some of my stuff is going to be broken, but I can live with that. Going to improve how things are done and use better components this way. But the transition had a couple of small hiccups&#8230;

Step one, however, is that I use a tag limiter on the front page because I am too lazy to copy paste paragraphs into the summary field. Besides, i shouldn&#8217;t have to. This is a CMS right? I should only have to work once. Well, the tag limiter i was using was broken, so instead of working too hard, I made this ghetto tag limiter with in template php.


&#36;content = &amp;lt;&amp;lt;&amp;lt; END_OF_CONTENT
{body}

END_OF_CONTENT;
	
&#36;content_array = explode(&apos;&amp;lt;/p&amp;gt;&apos;, &#36;content);

echo &#36;content_array[0] . &apos;&amp;lt;/p&amp;gt;&apos; . &#36;content_array[1] . &apos;&amp;lt;/p&amp;gt;&apos;;


Pretty simple, and as you can see, quite effective. Though, I will have to make this into an addon for later. That is my job now .</description>
      <dc:subject>ExpressionEngine,</dc:subject>
      <dc:date>2010-05-16T00:33:39+00:00</dc:date>
    </item>

    <item>
      <title>Simple argument defaults in JavaScript</title>
      <link>http://studiokoi.com/blog/comments/simple_argument_defaults_in_javascript</link>
      <guid>http://studiokoi.com/blog/comments/simple_argument_defaults_in_javascript#When:03:51:50Z</guid>
      <description>In many other interpreted programming languages like: Python, PHP, ActionScript 3.0, etc., you can have defaults to arguments that do not get passed to functions. In the three a fore mentioned languages, it&apos;s as easy as saying arg = &apos;default&apos; inline in the function definition. This however is not available in the JavaScript interpreter. (It might be in ECMAScript 5, though.) But that can easily be remedied with a simple helper function.

I have met other programmers that find it ridiculous that you have to create features in JavaScript that are built into other languages. They use that to put down JavaScript and call it a terrible language. However, I think that&apos;s part of what makes JavaScript so great. JavaScript, though not as powerful in features as some other languages, offers enough flexibility and expressiveness that you can create what you feel that you are missing. Lets take a look at the problem and see how easy we can remedy it.

First, look at a basic function that is about the same in most C based languages:


function foo(arg1, arg2)
{
	return arg2;
}
foo(&apos;one&apos;, &apos;two&apos;); 	// returns &apos;two&apos;
foo(&apos;one&apos;); 		// undefined


In the above example, you MUST have a second argument passed to the function, or you get an error. Some people remedy that like so:


function foo(arg1, arg2)
{
	//check for defaults
	var arg1 = arg1 || &quot;one&quot;;
	var arg2 = arg2 || &quot;two&quot;;
	
	return arg2;
}
foo(&apos;one&apos;, &apos;also two&apos;);	// returns &apos;also two&apos;
foo(&apos;one&apos;); 		// returns &apos;two&apos;


The above works OK, but is a little cumbersome. The logical or operator or &apos;||&apos; (double pipe) in JavaScript returns the first item if it is truthy, or the second item no matter what. Usually, you&apos;ll only see that in if statement blocks, but this idiom works well as an either or return value and is used such. NOTE: This idiom would not work well with any value passed that is falsey: A blank string, an integer 0, boolean false, etc., because it returns the second item when the first argument is a falsey value and not just undefined or null.

The above fix is lousy, though, because it becomes a mess when you have more than one optional argument. Take the following example that uses an object literal as the only argument and allows for passing only the arguments you want to send:


function foo(args)
{
	//check for defaults
	args.arg1 = args.arg1 || &quot;one&quot;;
	args.arg2 = args.arg2 || &quot;two&quot;;
	args.arg3 = args.arg3 || &quot;three&quot;;
	
	return args.arg2;
}
foo({&quot;arg2&quot;:&quot;also two&quot;});	// returns &apos;also two&apos;
foo({&quot;arg1&quot;:&quot;also one&quot;});	// returns &apos;two&apos;


The above works a little better because it allows you to pass only the arguments you want without having to null out others. It still presents ugly default checking and the same issues with falsey statements. We can use the same idea, but implement it far better with a simple function that will take a set of defaults and replace passed items over it and return the a useable object with all defaults and arguments in one.


function defaults(def, arg)
{
	for(var i in arg)
	{
		def = arg;
	}
	return def;
}


The above code takes exactly two arguments, the first being an object with the default &apos;name:value&apos; pairs for your arguments. The second one is the argument object actually passed to the defaults function. The second object is iterated over and all of its values are placed over the default ones and the default object is returned. This will give a usable object with defaults in place and actual passed arguments where presented.

How it actually works can be displayed as such:


	
		
			Defaults Object
			Arguments Object
			Resulting Object
		
	
	
		
			&quot;one&quot;
			(nothing passed)
			&quot;one&quot;
		
		
			&quot;two&quot;
			&quot;also two&quot;
			&quot;also two&quot;
			
		
			&quot;three&quot;
			(nothing passed)
			&quot;three&quot;
		
	


Lets see it in action:


function foo(args)
{
	args = defaults({
		arg1 :&quot;one&quot;,
		arg2 :&quot;two&quot;,
		arg3 :&quot;three&quot;
	}, args);
	
	return args.arg2;
}
foo({&quot;arg2&quot;:&quot;also two&quot;});	// returns &apos;also two&apos;
foo({&quot;arg1&quot;:&quot;also one&quot;});	// returns &apos;two&apos;


The default arguments are much less cluttered and were properly applied to items missing from the passed args object. Armed with our new defaults function and knowledge of how to use a single object to send all arguments, we can now safely send only select arguments, falsey or not, and have default arguments take care of the rest.

Enjoy!</description>
      <dc:subject>JavaScript,</dc:subject>
      <dc:date>2009-09-27T03:51:50+00:00</dc:date>
    </item>

    <item>
      <title>I Won Frank Peak&#8217;s Twitter Contest!</title>
      <link>http://studiokoi.com/blog/comments/i_won_frank_peaks_twitter_contest</link>
      <guid>http://studiokoi.com/blog/comments/i_won_frank_peaks_twitter_contest#When:06:18:06Z</guid>
      <description>If you like art at all and you don&apos;t already follow Frank Peak on twitter, or visit his website, I would highly recommend it. He periodically has &quot;Almost Daily Drawings&quot; that are his random doodles and concept drawings. His portfolio is also very, VERY good.

Frank is a very skilled illustrator and 3D artist who recently held a contest on Twitter for people who would retweet him. I was one of the fortunate winners of the contest.

Included in the package was a SWEET envelope that Frank personalized for each winner with random (and rather cute) artwork. Inside the package was a button pack with buttons by Royal Buttons Custom Buttons. There was also an unbent copy of the package art, and a sweet random drawing on nice card stock with a personal note from Frank, thanking the winner for participation.

Frank said he would also have some future contests, so even though this one is over, there could be some stuff up for grabs later.</description>
      <dc:subject>News,</dc:subject>
      <dc:date>2009-09-09T06:18:06+00:00</dc:date>
    </item>

    
    </channel>
</rss>
