<?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"
	>

<channel>
	<title>dev&#124;sushi</title>
	<atom:link href="http://devsushi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://devsushi.com</link>
	<description>Discussion on Development in Several Different Flavours</description>
	<pubDate>Thu, 17 Jan 2008 06:04:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Blackberry JDE API - User Interface Field Reference</title>
		<link>http://devsushi.com/2007/12/02/blackberry-jde-api-user-interface-field-reference/</link>
		<comments>http://devsushi.com/2007/12/02/blackberry-jde-api-user-interface-field-reference/#comments</comments>
		<pubDate>Sun, 02 Dec 2007 22:25:25 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
		
		<category><![CDATA[miscellaneous]]></category>

		<category><![CDATA[blackberry]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://devsushi.com/2007/12/02/blackberry-jde-api-user-interface-field-reference/</guid>
		<description><![CDATA[


When I first dug into programming with the RIM APIs installed with the Blackberry JDE I ran into quite a few roadblocks that took a while to circumvent. Most stemmed with my unfamiliarity with Java and the standard Java UI toolkits (Swing and AWT). After figuring out how to create and display each of the [...]]]></description>
			<content:encoded><![CDATA[<p><div id="adblock"><script type="text/javascript"><!--
google_ad_client = "pub-4846995254171248";
//300x250, created 11/10/07
google_ad_slot = "5407275797";
google_ad_width = 300;
google_ad_height = 250;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<p>When I first dug into programming with the RIM APIs installed with the Blackberry JDE I ran into quite a few roadblocks that took a while to circumvent. Most stemmed with my unfamiliarity with Java and the standard Java UI toolkits (Swing and AWT). After figuring out how to create and display each of the most interesting fields I figured I might as well document them, provide screenshots, and sample application code to help others like myself.<span id="more-56"></span></p>
<p>First off for those out there only interested in the download-able code example — here you go. Simply open the FieldExample.jdw workspace in the JDE editor and click Debug -> Go.<br />
<a href="/files/FieldExamples.zip">Field Examples source code (.zip)</a></p>
<p>The following field objects are found in the <a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/package-summary.html">net.rim.device.api.ui.component package</a>. These objects are built-in time savers for building GUIs for Blackberry applications. One of the key benefits is that it provides your application with a consistent interface experience which guarantees users will feel right at home. Custom widgets are great and can make your application unique but each has a learning curve which could frustrate users. We&#8217;ll start with the easiest and move to the more complex.</p>
<h3>Quick Reference</h3>
<ul>
<li><a href="#nullfield">NullField</a></li>
<li><a href="#separatorfield">SeparatorField</a></li>
<li><a href="#labelfield">LabelField</a></li>
<li><a href="#textfield">TextField</a></li>
<li><a href="#richtextfield">RichTextField</a></li>
<li><a href="#editfield">EditField</a></li>
<li><a href="#passwordeditfield">PasswordEditField</a></li>
<li><a href="#bitmapfield">BitmapField</a></li>
<li><a href="#radiobuttonfield">RadioButtonField</a></li>
<li><a href="#checkboxfield">CheckboxField</a></li>
<li><a href="#objectchoicefield">ObjectChoiceField</a></li>
<li><a href="#numericchoicefield">NumericChoiceField</a></li>
<li><a href="#gaugefield">GaugeField</a></li>
<li><a href="#datefield">DateField</a></li>
<li><a href="#listfield">ListField</a></li>
<li><a href="#buttonfield">ButtonField</a></li>
</ul>
<p>Note: The latest API available online is v4.2.1 so all API URLs point there. Please utilize the documentation for the latest version installed with the development kit. It should be available in the start menu alongside the editor. Hopefully RIM will fix this issue soon, sorry for the inconvienience.</p>
<h3 id="nullfield">NullField</h3>
<p>I don&#8217;t actually have one of these in the code example since to me they seem completely pointless. I&#8217;m sure some programmers rely on them for various weird hacks but for the most part I would avoid them. They are invisible but can have focus.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/NullField.html">NullField API reference</a></p>
<h3 id="separatorfield">SeparatorField</h3>
<p>In the standard MainScreen layout it is usually necessary to use these. They are very simple to add and provide a single pixel grey horizontal line on the screen from one side to the other. The general purpose is to separate two sections of UI elements. It is possible to override the drawing behavior and change the color/shape of the line but that is a more advanced topic for a future post.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/SeparatorField.html">SeparatorField API reference</a></p>
<pre><code>add(new SeparatorField());</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/separatorfield.png' title='SeparatorField screenshot'><img src='http://devsushi.com/wp-content/uploads/separatorfield.png' alt='SeparatorField screenshot' /></a></p>
<h3 id="labelfield">LabelField</h3>
<p>This element is essentially a glorified String which knows how to draw itself on the screen. As with all text based Fields you can change the drawing Font and use it as the Screen title. By default this element does not accept focus but as will all Fields you can change this by setting the Field.FOCUSABLE style.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/LabelField.html">LabelField API reference</a></p>
<pre><code>// LabelField variations

add(new LabelField("LabelField"));

add(new LabelField("LabelField 2", 0, -1, Field.FIELD_RIGHT));

LabelField lbl = new LabelField("LabelField 3", 0, -1, Field.FIELD_HCENTER);
Font fnt = this.getFont().derive(Font.BOLD | Font.ITALIC);
lbl.setFont(fnt);
add(lbl);</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/labelfield.png' title='LabelField screenshot'><img src='http://devsushi.com/wp-content/uploads/labelfield.png' alt='LabelField screenshot' /></a></p>
<h3 id="textfield">TextField</h3>
<p>This class seems to be abstract since it has no constructors listed in the APIs. You can create a TextField but I would avoid it since from everything I have seen it is not used. It is the parent class of RichTextField and BasicEditField which are the fields you should actually use for selectable and editable text respectively.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/TextField.html">TextField API reference</a></p>
<h3 id="richtextfield">RichTextField</h3>
<p>TextFields provide the equivalent of standard TextBox from other platforms. Each letter of the text is focusable and selectable. The RichTextField is not editable by default but can made editable by setting the Field.EDITABLE style. The major benefit of using a RichTextField over other text based fields is the configurability of the text formatting. It is quite cumbersome to setup as you can see by the following code example but is handy.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/RichTextField.html">RichTextField API reference</a></p>
<pre><code>// RichTextField variations

add(new RichTextField("RichTextField"));

String str[] = new String[] {"RichTextField:", "Value"};
int off[] = new int[] {0, str[0].length(), str[0].length() + str[1].length()};
byte attr[] = new byte[] {0, 1};
FontFamily fontfam[] = FontFamily.getFontFamilies();
Font fon[] = new Font[2];
fon[0] = fontfam[0].getFont(FontFamily.SCALABLE_FONT, 16);
fon[1] = fontfam[1].getFont(FontFamily.SCALABLE_FONT, 18);
add(new RichTextField(str[0] + str[1], off, attr, fon, RichTextField.TEXT_ALIGN_HCENTER));</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/richtextfield.png' title='RichTextField screenshot'><img src='http://devsushi.com/wp-content/uploads/richtextfield.png' alt='RichTextField screenshot' /></a></p>
<h3 id="editfield">EditField</h3>
<p>Pretty much the equivalent of the LabelField but is focusable, selectable and editable. There are some mechanisms included which allow configuration of how the key presses interact with the field but overall it is very simple.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/EditField.html">EditField API reference</a></p>
<pre><code>// EditField

EditField edit = new EditField("Username: ", "");
add(edit);</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/editfield.png' title='EditField screenshot'><img src='http://devsushi.com/wp-content/uploads/editfield.png' alt='EditField screenshot' /></a></p>
<h3 id="passwordeditfield">PasswordEditField</h3>
<p>As you might expect this is exactly the same as the EditField but replaces keystrokes with asterisk&#8217;s. Both Fields are children of the BasicEditField class. On the Pearl there is a short delay where it shows the actual character before switching it to the asterisk (another benefit of using the built in Fields). Some of the standard features like cut/copy and the auto manipulators are disabled.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/PasswordEditField.html">PasswordEditField API reference</a></p>
<pre><code>// PasswordEditField

PasswordEditField pass = new PasswordEditField("Password: ", "");
add(pass);</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/passwordeditfield.png' title='PasswordEditField screenshot'><img src='http://devsushi.com/wp-content/uploads/passwordeditfield.png' alt='PasswordEditField screenshot' /></a></p>
<h3 id="bitmapfield">BitmapField</h3>
<p>The BitmapField allows you to add a Bitmap to your application. It can be aligned just like any other field with Field.FIELD_RIGHT or Field.FIELD_HCENTER and additionally can have border padding. I haven&#8217;t looked to far into positioning beyond the standard but I will get into more complex layouts in a future post. The Bitmap class can load PNG, GIF or JPEG images along with raw byte data. If you include an image in the project it is automatically added to the .cod file as a resource which can be loaded using getBitmapResource(). When targeting a resource the path begins at the root project level. I&#8217;ve made the image focusable just as an example, I belive you can also turn an image into a button.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/BitmapField.html">BitmapField API reference</a></p>
<pre><code>// BitmapField
Bitmap img = Bitmap.getBitmapResource("com/examples/img/rainbow.png");
BitmapField bf = new BitmapField(img, BitmapField.FOCUSABLE);
add(bf);</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/bitmapfield.png' title='BitmapField screenshot'><img src='http://devsushi.com/wp-content/uploads/bitmapfield.png' alt='BitmapField screenshot' /></a></p>
<h3 id="radiobuttonfield">RadioButtonField</h3>
<p>There are the implementation of the standard radio selection object where you put a bunch into a group and then the user can select one (and only one) of those options. If you have a fairly small set of options these can be nicer than a choice field (a.k.a. drop-down list) since a user doesn&#8217;t have to click into the list and then pick an option. You must place the RadioButtonField objects into a RadioButtonGroup or an error will occur.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/RadioButtonField.html">RadioButtonField API reference</a></p>
<pre><code>// RadioButtonField (must be part of group)
RadioButtonGroup rgrp = new RadioButtonGroup();
RadioButtonField radio = new RadioButtonField("Radio Button", rgrp, true);
RadioButtonField radio2 = new RadioButtonField("Radio 2", rgrp, false);
add(radio);
add(radio2);</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/radiobuttonfield.png' title='RadioButtonField screenshot'><img src='http://devsushi.com/wp-content/uploads/radiobuttonfield.png' alt='RadioButtonField screenshot' /></a></p>
<h3 id="checkboxfield">CheckboxField</h3>
<p>Again the standard implementation of a checkbox where each is individual and you can check as many as you want. It appears that you are unable to set the checkbox state to other than on or off. Other platforms generally have a third version representing half checked but it appears the user would need to extend this control to provide that functionality.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/CheckboxField.html">CheckboxField API reference</a></p>
<pre><code>// CheckboxField
CheckboxField chk = new CheckboxField("Checkbox 1", true);
CheckboxField chk2 = new CheckboxField("Checkbox 2", false);
add(chk);
add(chk2);</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/checkboxfield.png' title='CheckboxField screenshot'><img src='http://devsushi.com/wp-content/uploads/checkboxfield.png' alt='CheckboxField screenshot' /></a></p>
<h3 id="objectchoicefield">ObjectChoiceField</h3>
<p>The object choice field is essentially what most programmers would know as a drop-down box or list. You provide a list of objects that have the toString() method and it uses that to generate the list the user chooses from. Hitting the space key will roll through the options or the user can click to see all options at one is a list (as seen in the screenshot below). These fields are very handy when you have many options to present or when screen space is at a premium (as it is on most options pages).<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/ObjectChoiceField.html">ObjectChoiceField API reference</a></p>
<pre><code>// ObjectChoiceField
String choicestrs[] = {"Opt 1", "Opt 2", "Opt 3"};
ObjectChoiceField choice = new ObjectChoiceField("Object Choice Field: ", choicestrs, 0);
add(choice);</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/objectchoicefield.png' title='ObjectChoiceField screenshot'><img src='http://devsushi.com/wp-content/uploads/objectchoicefield.png' alt='ObjectChoiceField screenshot' /></a></p>
<h3 id="numericchoicefield">NumericChoiceField</h3>
<p>My only guess is that the RIM developers needed lots of choice fields that were numeric. I&#8217;m not sure why but that is the only reason to create this very limited field. It simply creates a standard choice field with numeric choices within the range given in the constructor. You can specify a start number, end number and the increment. For the most part I would recommend just using an ObjectChoiceField since it is more flexible.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/NumericChoiceField.html">NumericChoiceField</a></p>
<pre><code>// NumericChoiceField
NumericChoiceField numeric = new NumericChoiceField("Numeric Choice Field: ", 1, 10, 1, 4);
add(numeric);</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/numericchoicefield.png' title='NumericChoiceField screenshot'><img src='http://devsushi.com/wp-content/uploads/numericchoicefield.png' alt='NumericChoiceField screenshot' /></a></p>
<h3 id="gaugefield">GaugeField</h3>
<p>The gauge is a very handy field which allows you to show a progress bar style value selector. If the ObjectChoiceField wasn&#8217;t enough for you never to use NumericChoiceField then perhaps this field could shoulder the load. It can be a straight uneditable field or it can allow focus and edit so the user can change the value. Overall this control is great and would be handy for anybody working on game programming.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/GaugeField.html">GaugeField API reference</a></p>
<pre><code>// GaugeField
GaugeField gauge = new GaugeField("Gauge Field: ", 1, 100, 50, Field.EDITABLE | Field.FOCUSABLE);
add(gauge);</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/gaugefield.png' title='GaugeField screenshot'><img src='http://devsushi.com/wp-content/uploads/gaugefield.png' alt='GaugeField screenshot' /></a></p>
<h3 id="datefield">DateField</h3>
<p>I&#8217;ve never actually seen one of these in the standard suite of applications on the blackberry so it took me a bit to figure out how to use it properly. First you get down to the field and click the trackball on it. The appearance of the field will change to be the same as the screenshot below and the date, if not already set, will change to be today. You can then use the trackball to choose the date part and roll through the various dates. When finished click the trackball again to complete. Of all the fields this one has the most configuration options for what I can see. You can choose from many different date input formats and representations, overall it probably needs a full post just for itself.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/DateField.html">DateField API reference</a></p>
<pre><code>// DateField
DateField dte = new DateField("Date Field: ", Long.MIN_VALUE, DateField.DATE);
add(dte);</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/datefield.png' title='DateField screenshot'><img src='http://devsushi.com/wp-content/uploads/datefield.png' alt='DateField screenshot' /></a></p>
<h3 id="listfield">ListField</h3>
<p>This element is what set me on this project in the first place. I was looking to recreate the Status screen under the Wrench icon which has a list with left and right aligned text. I wanted to make an About screen for my game that included device specs like screen size, etc and figured that would be a good way to lay it out. It certainly wasn&#8217;t easy to find out how to do it even after I discovered that ListField was the basis for it. The ListFieldCallback is more complicated than I figure is necessary but the most important part is the drawListRow method. drawText defaults to drawing left aligned text which works for the label of the field and if you add the DrawStyle.RIGHT style it will draw right aligned, voila!<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/ListField.html">ListField API reference</a></p>
<pre><code>// Listfield (must have a callback)
ListField list = new ListField();
list.setEmptyString("Nothing to see here", DrawStyle.LEFT);
list.setSize(3);
list.setCallback(new TestListCallback());
add(list);

&hellip;

final class TestListCallback implements ListFieldCallback {
    public void drawListRow(ListField list, Graphics g, int index, int y, int w) {
        g.drawText("Testing:", 0, y, 0, w);
        g.drawText(String.valueOf(index * 111), 0, y, DrawStyle.RIGHT, w);
    }
    public Object get(ListField listField, int index) {
        return null;
    }
    public int getPreferredWidth(ListField listField) {
        return Graphics.getScreenWidth();
    }
    public int indexOfList(ListField listField, String prefix, int start) {
        return listField.indexOfList(prefix, start);
    }
}</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/listfield.png' title='ListField screenshot'><img src='http://devsushi.com/wp-content/uploads/listfield.png' alt='ListField screenshot' /></a></p>
<h3 id="buttonfield">ButtonField</h3>
<p>The API had to have a button field and here it is but I don&#8217;t feel it is very useful overall. I&#8217;ve never seen one in use in the applications on the blackberry but I haven&#8217;t dug to deeply. Most applications use a ListField for their buttons instead of actual buttons. The FieldChangeListener is used to catch the click event after it is attached to the ButtonField. You can also attach the listener to any Field since the setChangeListener function is in the parent class so you could easily make a BitmapField clickable using this technique.<br />
<a href="http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/ButtonField.html">ButtonField API reference</a></p>
<pre><code>// ButtonField
ButtonField btn = new ButtonField("myButton");
btn.setChangeListener(new ButtonListener());
add(btn);

&hellip;

final class ButtonListener implements FieldChangeListener {
    public void fieldChanged(Field field, int context) {
        ButtonField btn = (ButtonField) field;
        Status.show("Button pressed: " + btn.getLabel());
    }
}</code></pre>
<p><a href='http://devsushi.com/wp-content/uploads/buttonfield.png' title='ButtonField screenshot'><img src='http://devsushi.com/wp-content/uploads/buttonfield.png' alt='ButtonField screenshot' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2007/12/02/blackberry-jde-api-user-interface-field-reference/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Getting started with the Blackberry Java Development Environment (JDE)</title>
		<link>http://devsushi.com/2007/11/15/getting-started-with-the-blackberry-java-development-environment-jde/</link>
		<comments>http://devsushi.com/2007/11/15/getting-started-with-the-blackberry-java-development-environment-jde/#comments</comments>
		<pubDate>Fri, 16 Nov 2007 00:15:25 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
		
		<category><![CDATA[miscellaneous]]></category>

		<category><![CDATA[blackberry]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://devsushi.com/2007/11/15/getting-started-with-the-blackberry-java-development-environment-jde/</guid>
		<description><![CDATA[


Recently I became frustrated with the state of free games for the Blackberry platform. Brickbreaker is really hard and choppy on the newer devices so I decided to do something about it. I also have a Blackberry Pearl just sitting at home since my recent upgrade to the Blackberry Curve. So frustration + extra device [...]]]></description>
			<content:encoded><![CDATA[<p><div id="adblock"><script type="text/javascript"><!--
google_ad_client = "pub-4846995254171248";
//300x250, created 11/10/07
google_ad_slot = "5407275797";
google_ad_width = 300;
google_ad_height = 250;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<p>Recently I became frustrated with the state of free games for the Blackberry platform. Brickbreaker is really hard and choppy on the newer devices so I decided to do something about it. I also have a Blackberry Pearl just sitting at home since my recent upgrade to the Blackberry Curve. So frustration + extra device + time = developement on the Blackberry platform. After wading through some webpages on the developer site and running into more than one snag I decided to document to process in tutorial form. I hope this helps you get starting with the Blackberry JDE. Please feel free to drop questions in the comments or to email me at <a href="mailto:ahewgill@gmail.com">ahewgill@gmail.com</a>.<span id="more-52"></span></p>
<h3>Installation</h3>
<p>The first step is to install the <a href="http://na.blackberry.com/eng/developers/downloads/jde.jsp">Blackberry Java Development Environment (JDE)</a> available on from the <a href="http://na.blackberry.com/eng/developers/">Blackberry Developer website</a>. (As of this writing the latest version is 4.3.0). You have to register for an account and verify via email in order to download the software which is very annoying. It took them 24 hours to send me the verification link so that I could sign in and begin the download. It is best to download the full JDE rather than the individual pieces in my opinion but this is up to you and your bandwidth constraints.</p>
<h3>Running a few samples</h3>
<p>Once you have the JDE installed it is time to try out a few of the samples provided. First open the editor by clicking <em>Start -> Programs -> Research in Motion -> Blackberry JDE 4.x.x -> JDE</em>. Once in the editor click <em>File -> Open Workspace&#8230;</em> and browse to <em>C:\Program Files\Research in Motion\Blackberry JDE 4.x.x\samples</em> and select <em>samples.jdw</em>. </p>
<p>Let&#8217;s run the <em>HelloWorld</em> sample. First thing you must do it set <em>HelloWorld</em> to be the only active project. Click <em>Project -> Set Active Projects&#8230;</em> and then in the dialog that appears click <em>Clear All</em> and then check off <em>com_rim_helloworld</em> and click <em>Ok</em>. You are now ready to build and run the project. Click <em>Debug -> Go</em> to build the code and run the simulator (can take time to load so be patient).</p>
<p>The first thing you will notice is that you&#8217;re presented with a Blackberry 8120 Pearl in its default configuration. Click the menu key and find <em>HelloWorld</em> in the application list. Click the trackball to run it, voila! To exit the application click the menu key and then click the close option. Simple right! I encourage you to take a look through the code of the various demos at some point to become familiar with the Blackberry APIs. </p>
<p>In the editor click <em>File -> Close Workspace</em> and then close any code windows you might have open on the right before continuing.</p>
<p><a href='http://devsushi.com/wp-content/uploads/helloworld.png' title='HelloWorld Application in list'><img src='http://devsushi.com/wp-content/uploads/helloworld.thumbnail.png' alt='HelloWorld Application in list' /></a><a href='http://devsushi.com/wp-content/uploads/helloworld-01.png' title='HelloWorld Application running'><img src='http://devsushi.com/wp-content/uploads/helloworld-01.thumbnail.png' alt='HelloWorld Application running' /></a></p>
<h3>Creating your own <em>HelloWorld</em></h3>
<p>Now that you know how to use the editor and run an application it is time to start your first program. I&#8217;m going to give you the code but the idea of this section is to learn how to create a new workspace, project, and code file. Click <em>File -> New Workspace&#8230;</em> and then give your program a name like <em>MyHelloWorld</em>. In the second box add <em>MyHelloWorld</em> to the end of the creation path leaving off the last backslash. Click <em>Ok</em> and then <em>Yes</em> to the directory creation question. You now have a new workspace in which to put your project.</p>
<p>To create the project simply click <em>Project -> Create New Project&#8230;</em> and enter the project name (eg <em>HelloWorld</em>) into the first box. This time you don&#8217;t have to mess with the directory, just click <em>Ok</em>. </p>
<p>Now it is time to add a code file to your empty project. On the left click the <em>HelloWorld</em> project in the Files tree view. Now click <em>Project -> Create New File</em> and enter a file name (eg <em>HelloWorld.java</em>) into the first box. In the second box we need to add at least one directory because Java likes to organize things into packages. Add <em>\com\sample</em> to the end of the second box and note that the automatically generated code has the line <em>package com.sample;</em>. You&#8217;ll notice this type of thing throughout the Java APIs, this is how classes are organized.</p>
<p>Now that we have a code file it is time to add some code. Replace the tiny little empty class stub with the follow code (I stole this directly from the <em>HelloWorld</em> sample we ran above).</p>
<pre><code>import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.system.*;

/*
 * BlackBerry applications that provide a user interface
 * must extend UiApplication.
 */
public class HelloWorld extends UiApplication
{
        public static void main(String[] args)
        {
                //create a new instance of the application
                //and start the application on the event thread
                HelloWorld theApp = new HelloWorld();
                theApp.enterEventDispatcher();
        }

        public HelloWorld()
        {
                //display a new screen
                pushScreen(new HelloWorldScreen());
        }
}

//create a new screen that extends MainScreen, which provides
//default standard behavior for BlackBerry applications
final class HelloWorldScreen extends MainScreen
{
        public HelloWorldScreen()
        {
                //invoke the MainScreen constructor
                super();

                //add a title to the screen
                LabelField title = new LabelField("HelloWorld Sample",
                       LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
                setTitle(title);

                //add the text "Hello World!" to the screen
                add(new RichTextField("Hello World!"));
        }

        //override the onClose() method to display a dialog box to the user
        //with "Goodbye!" when the application is closed
        public boolean onClose()
        {
            Dialog.alert("Goodbye!");
            System.exit(0);
            return true;
        }
}
</pre>
<p></code></p>
<p>Click <em>Build -> Build</em> (or hit F7) to make sure it compiles with no errors. Any syntax errors or other messages will appear in the bottom Build window so make sure to look there before assuming everything worked. Now hit <em>Debug -> Go</em> to run the code in the Blackberry simulator.</p>
<p><a href='http://devsushi.com/wp-content/uploads/helloworld-02.png' title='Our own HelloWorld application in list'><img src='http://devsushi.com/wp-content/uploads/helloworld-02.thumbnail.png' alt='Our own HelloWorld application in list' /></a></p>
<h3>Setting up the PATH</h3>
<p>In order to run the command line tools it is easiest to put the JDE <em>\bin</em> directory into your PATH environment variable. To do this right click on <em>My Computer</em> and click <em>Properties</em>. Now click the <em>Advanced</em> tab and then the <em>Environment Variables</em> button. In the system variables (lower) part find and select the PATH variable and then click the <em>Edit</em> button. Now at the very end of the string add <em>;C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin</em> (make sure you have the semi-colon at the front). Click <em>Ok</em>, then <em>Ok</em> again and finally one last time.</p>
<h3>Installation on a physical device</h3>
<p>Once you have an application and have run the simulator a few times you might get the desire to install your app on an actual device. It is fairly easy to do this once you have setup the PATH variable. Open a command window by clicking <em>Start -> Run&#8230;</em> type <em>cmd</em> and hit enter. In the little black window go to the location of your application and find the .cod file. Make sure you&#8217;ve connected your device with the USB cable and then run the following command.</p>
<pre><code>javaloader -usb load HelloWorld.cod</pre>
<p></code></p>
<p>You&#8217;re handset will go white with a spinning hour glass for a few seconds and then back to normal.  You will now see the application icon installed on the device. Congratulations you are now a Blackberry developer!</p>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2007/11/15/getting-started-with-the-blackberry-java-development-environment-jde/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ASP.Net DropDownList annoyance</title>
		<link>http://devsushi.com/2007/10/19/aspnet-dropdownlist-annoyance/</link>
		<comments>http://devsushi.com/2007/10/19/aspnet-dropdownlist-annoyance/#comments</comments>
		<pubDate>Fri, 19 Oct 2007 21:26:58 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
		
		<category><![CDATA[miscellaneous]]></category>

		<category><![CDATA[annoyances]]></category>

		<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://devsushi.com/2007/10/19/aspnet-dropdownlist-annoyance/</guid>
		<description><![CDATA[I recently ran into a problem with using the ASP.Net DropDownList for toggling the status of an element. The problem stems from how the ASP.Net page object works. In this article I present the problem and then show a solution that seems to work with some caveats.
My goal is to create a toggle for the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently ran into a problem with using the ASP.Net DropDownList for toggling the status of an element. The problem stems from how the ASP.Net page object works. In this article I present the problem and then show a solution that seems to work with some caveats.<span id="more-51"></span></p>
<p>My goal is to create a toggle for the status of a page. For example I have a report and it has the possible status of <em>Open</em> or <em>Closed</em>. The DropDownList contains only the opposite of the current status of the report so when the report is <em>Open</em> the DropDownList contains an empty item (no change) and <em>Closed</em>. Here is the code.</p>
<pre><code>&lt;script runat="server"&gt;
  Sub Page_Load()
    If Not Page.IsPostBack Then
      Session("bool") = "Open"
    End If

    ' Setup drop down
    ddlItems.Items.Clear()
    ddlItems.Items.Add("")
    If Not Session("bool") = "Open" Then ddlItems.Items.Add("Open")
    If Not Session("bool") = "Closed" Then ddlItems.Items.Add("Closed")
  End Sub

  Sub Click_Submit(ByVal s As Object, ByVal e As EventArgs)
    If ddlItems.SelectedValue = "Open" Then
      Session("bool") = "Closed"
    ElseIf ddlItems.SelectedValue = "Open" Then
      Session("bool") = "Closed"
    End If
  End Sub
&lt;/script&gt;

&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Drop Down Annoyance&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;form runat="server"&gt;
  &lt;h1&gt;Drop Down Annoyance&lt;/h1&gt;
  &lt;p&gt;Current Status: &lt;%= Session("bool") %&gt;&lt;/p&gt;
  &lt;p&gt;Update to: &lt;asp:DropDownList ID="ddlItems" runat="server" /&gt;&lt;/p&gt;
  &lt;asp:Button ID="btnSubmit" Text="Update" OnClick="Click_Submit" runat="server" /&gt;
  &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p></code></p>
<p>There are two problems at work here that cause a complete failure of the intended action. Firstly, during <em>Page_Load</em> the <em>Click_Submit</em> event has not yet fired so the Session variable still contains the old value of <em>Open</em>. The code then rebuilds the DropDownList based on the Session variable being unchanged. Secondly, doing the change of the DropDownList resets which option is selected loosing the users input.</p>
<p>We can fix both of these problems with one change to the code. Simply move the DropDownList change to the very last moment right before its declaration. Make sure to add all possible options to the declaration using ListItems, this is a must for it to work.</p>
<pre><code>&lt;%@ Page Language="VB" Debug="True" %&gt;

&lt;script runat="server"&gt;

  Sub Page_Load()
    If Not Page.IsPostBack Then
      Session("bool") = "Open"
    End If
  End Sub

  Sub Click_Submit(ByVal s As Object, ByVal e As EventArgs)
    If ddlItems.SelectedValue = "Open" Then
      Session("bool") = "Open"
    ElseIf ddlItems.SelectedValue = "Closed" Then
      Session("bool") = "Closed"
    End If
  End Sub

&lt;/script&gt;

&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Drop Down Annoyance&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;form runat="server"&gt;
  &lt;h1&gt;Drop Down Annoyance&lt;/h1&gt;
  &lt;p&gt;Current Status: &lt;%= Session("bool") %&gt;&lt;/p&gt;
  &lt;%
    ' Setup drop down
    ddlItems.Items.Clear()
    ddlItems.Items.Add("")
    If Not Session("bool") = "Open" Then ddlItems.Items.Add("Open")
    If Not Session("bool") = "Closed" Then ddlItems.Items.Add("Closed")
  %&gt;
  &lt;p&gt;Update to: &lt;asp:DropDownList ID="ddlItems" runat="server"&gt;
    &lt;asp:ListItem Text="" Selected="True" /&gt;
    &lt;asp:ListItem Text="Open" /&gt;
    &lt;asp:ListItem Text="Closed" /&gt;
  &lt;/asp:DropDownList&gt;&lt;/p&gt;
  &lt;asp:Button ID="btnSubmit" Text="Update" OnClick="Click_Submit" runat="server" /&gt;
  &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p></code></p>
<p>What is going on here is that when ASP.Net creates the ddlItems object it loads it up with all the ListItems given in the declaration. These items are available throughout the code right up until the point where we Clear and then change the DropDownList. The Session variable has been changed by this time and so everything works out. One very important caveat of this method is that you must not use ddlItems.SelectedIndex since the number of options in the list changes, instead use ddlItems.SelectedValue.</p>
<p>Does anybody else have any novel solutions for working with DropDownList controls?</p>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2007/10/19/aspnet-dropdownlist-annoyance/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mambo to the beat of the internet</title>
		<link>http://devsushi.com/2007/08/10/mambo-to-the-beat-of-the-internet/</link>
		<comments>http://devsushi.com/2007/08/10/mambo-to-the-beat-of-the-internet/#comments</comments>
		<pubDate>Fri, 10 Aug 2007 16:59:41 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
		
		<category><![CDATA[miscellaneous]]></category>

		<category><![CDATA[css/xhtml]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[web standards]]></category>

		<guid isPermaLink="false">http://devsushi.com/2007/08/10/mambo-to-the-beat-of-the-internet/</guid>
		<description><![CDATA[A few years ago I looked into using a Content Management System (CMS) to develop a site for a friend. At the time there were a few choices including Mambo, Joomla, Drupal, and about a hundred more which you can test at Open Source CMS. Mambo was really the only player that had the needed [...]]]></description>
			<content:encoded><![CDATA[<p>A few years ago I looked into using a Content Management System (CMS) to develop a site for a friend. At the time there were a few choices including <a href="http://mambo-foundation.org/">Mambo</a>, <a href="http://www.joomla.org/">Joomla</a>, <a href="http://drupal.org/">Drupal</a>, and about a hundred more which you can test at <a href="http://www.opensourcecms.com/">Open Source CMS</a>. Mambo was really the only player that had the needed feature set which included forum/gallery/blogs/etc all in one user based interface (thanks to the many extensions). The only issue was that the system was horribly unfriendly to the internet and its standards. Each control/plugin box on the page was wrapped in a table inside another table and finally another table. Doing any template work was nightmare-ish especially if you wanted to use proper XHTML and CSS; and don&#8217;t even get me started on accessibility. I didn&#8217;t end up doing the project because my recommendation was to write it all myself.<span id="more-50"></span></p>
<p>Today I came across a del.icio.us link from <a href="http://snook.ca/jonathan/">Jonathon Snook</a> about how <a href="http://www.source.mambo-foundation.org/content/view/126/1/">Mambo will be integrating Cake PHP for version 5.0</a>. I wasn&#8217;t able to find a development time line but did come across some other interesting news.</p>
<blockquote><p>The team has spent a considerable amount of time working on XHTML validation, WCAG 1.0 (Priority 1, 2, and some 3), removal of unnecessary and/or inaccessible JavaScript code, improved usability, plus much more.<br />
<cite><a href="http://www.source.mambo-foundation.org/content/view/126/1/">from &quot;Baking Mambo&quot; written by Chad Auld</a></cite>
</p></blockquote>
<p>I hope that 4.7 comes out soon and that the work indicated by the preceding quote actually makes a difference. It would be great to see a success for Mambo that causes a cascade of other CMSs to follow suit.</p>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2007/08/10/mambo-to-the-beat-of-the-internet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ASP.Net has 9 to 5 appeal</title>
		<link>http://devsushi.com/2007/07/23/aspnet-has-9-to-5-appeal/</link>
		<comments>http://devsushi.com/2007/07/23/aspnet-has-9-to-5-appeal/#comments</comments>
		<pubDate>Mon, 23 Jul 2007 18:13:03 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
		
		<category><![CDATA[miscellaneous]]></category>

		<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://devsushi.com/2007/07/23/aspnet-has-9-to-5-appeal/</guid>
		<description><![CDATA[ 

My first article on this blog was the first in the &#8220;Dynamic Control Creation&#8221; series. I wrote it because I was frustrated with how ASP.Net worked and wanted to share my discoveries/workarounds with other frustrated developers. After a period of time Google picked up my article and I started to receive a decent amount [...]]]></description>
			<content:encoded><![CDATA[<p> <img src='http://devsushi.com/wp-content/uploads/9to5appeal.png' alt='9 to 5 Appeal' /><br />
<span id="more-49"></span></p>
<p>My first article on this blog was the first in the &#8220;<a href="http://devsushi.com/2006/08/27/aspnet-dynamic-control-creation-part-1/">Dynamic Control Creation</a>&#8221; series. I wrote it because I was frustrated with how ASP.Net worked and wanted to share my discoveries/workarounds with other frustrated developers. After a period of time Google picked up my article and I started to receive a decent amount of traffic and some positive feedback. Here at work I use ASP.Net for a majority of my applications and so the blog has continued to focus on it primarily. An interesting thing that I&#8217;ve noticed is that site traffic has a very consistent pattern &mdash; which I attribute to my focus on ASP.Net. Above you see a graph &mdash; from <a href="https://www.google.com/analytics/home/">Google Analytics</a> &mdash; that shows daily traffic over the last five months. Each valley in the graph made up of the numbers for Saturday and Sunday which are consistently very small compared to the weekday traffic.</p>
<p>I&#8217;ve done a few inquiries and looked at a few other sites I have stats for and found that this isn&#8217;t all that common. When other sites match my pattern they have a high number of work time surfers coming to their site as I do.  I use this loose research to conclude that ASP.Net is widely used in the workplace and much less common for personal/weekend projects. PHP blogs and websites have a very consistent amount of traffic on all days of the week as many weekend programmers surf for information.</p>
<p>What does this signify for ASP.Net? Very few people use it for fun for one thing. I certainly don&#8217;t when I don&#8217;t have to. In fact I am phasing it out at work slowly too, starting most new projects in PHP &mdash; which I&#8217;m not really a fan of either. Companies across the globe are buying into Microsoft server products and technologies and forcing it down their employees throats. </p>
<p>How do your traffic statistics look? What is your main theme/topic? Would you prefer to use a different programming language at work? Leave a comment, I&#8217;m very interested.</p>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2007/07/23/aspnet-has-9-to-5-appeal/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ASP.Net CheckBoxes should be able to have values</title>
		<link>http://devsushi.com/2007/07/16/aspnet-checkboxes-should-be-able-to-have-values/</link>
		<comments>http://devsushi.com/2007/07/16/aspnet-checkboxes-should-be-able-to-have-values/#comments</comments>
		<pubDate>Mon, 16 Jul 2007 19:06:33 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
		
		<category><![CDATA[miscellaneous]]></category>

		<category><![CDATA[annoyances]]></category>

		<category><![CDATA[asp.net]]></category>

		<category><![CDATA[css/xhtml]]></category>

		<category><![CDATA[web standards]]></category>

		<guid isPermaLink="false">http://devsushi.com/2007/07/16/aspnet-checkboxes-should-be-able-to-have-values/</guid>
		<description><![CDATA[
The ASP.Net CheckBox and CheckBoxList control don&#8217;t allow for the use of the full W3C HTML standard. For some reason Microsoft decided to implement a reduced functionality version that creates more work for the programmer. Come on Microsoft why can&#8217;t you follow even the simplest of standards? In this case it would make coding the [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>The ASP.Net <em>CheckBox</em> and <em>CheckBoxList</em> control don&#8217;t allow for the use of the full W3C HTML standard. For some reason Microsoft decided to implement a reduced functionality version that creates more work for the programmer. Come on Microsoft why can&#8217;t you follow even the simplest of standards? In this case it would make coding the .Net framework easier for you not to mention us!<span id="more-47"></span></p>
<p>The W3C HTML 4.01 specification specifically states for the <em>value</em> attribute to:</p>
<blockquote><p>
&#8211; Specify for radio buttons and checkboxes &#8211;<br />
<cite><a href="http://www.w3.org/TR/html401/interact/forms.html#edef-INPUT">W3C HTML 4.01 Specification - INPUT Element</a></cite>
</p></blockquote>
<p>To me this quote reads as a strong recommendation to specify the <em>value</em> attribute rather than leave it up to the browsers default (generally &quot;On&quot;). Microsoft decided to not even allow the value attribute to be set. They went so far as to have a validation message built into Visual Studio that says:</p>
<blockquote><p>
Attribute &#8216;Value&#8217; is not a valid attribute of element &#8216;CheckBox&#8217;
</p></blockquote>
<p>If you ignore the warning and run the page, the <em>value</em> attribute is missing. I have even tried circumventing the ASP.Net HTML-izer by adding <em>value</em> to the attributes collection with no success. Microsoft intentionally strips it, so I can only assume they have some reasoning behind this behavior and I imagine they will say something about security in defense.</p>
<p>There is one way to circumvent the behavior but it requires not using ASP.Net controls. Simply insert traditional <em>input type=&#8221;checkbox&#8221;</em> elements into your page and collect their values using <em>Request.Form</em>.</p>
<pre><code>Sub Page_Load ()
  Dim value As String
  value = Request.Form(&quot;chkItem&quot;)
End Sub
&hellip;
&lt;input type=&quot;checkbox&quot; id=&quot;chkItem&quot; name=&quot;chkItem&quot; /&gt;
&lt;label for=&quot;chkItem&quot;&gt;CheckBox Item Text&lt;/label&gt;
</code></pre>
<p>I made a big deal out of this issue simply because to me it doesn&#8217;t make any sense. You can get around the issue and still use ASP.Net controls but it requires extra coding.</p>
<pre><code>Sub Page_Load ()
  Dim value As String
  If chkItem.Checked Then
    value = &quot;Some Value&quot;
  Else
    value = &quot;Some Other Value&quot;
  End If
End Sub
&hellip;
&lt;asp:CheckBox ID=&quot;chkItem&quot; Text=&quot;CheckBox Item Text&quot; runat=&quot;server&quot; /&gt;
</code></pre>
<p>When using the <em>CheckBoxList</em> control you will notice ASP.Net uses tables to layout the list. To keep it from doing this you simply need to add a few attributes. It should then use much more standards compliant code. I also show how to access which boxes are checked after postback in a <em>CheckBoxList</em>.</p>
<pre><code>Sub Page_Load ()
  ' Find out which boxes were checked
  Dim value As String = &quot;&quot;
  For Each item As ListItem In cblTest.Items
    If item.Selected Then
      value &amp;= item.Value
    End If
  Next
End Sub
&hellip;
&lt;asp:CheckBoxList ID=&quot;cblList&quot; RepeatLayout=&quot;Flow&quot; RepeatDirection=&quot;Horizontal&quot; runat=&quot;server&quot;&gt;
  &lt;asp:ListItem Text=&quot;Item 1&quot; Value=&quot;1&quot; /&gt;
  &lt;asp:ListItem Text=&quot;Item 2&quot; Value=&quot;2&quot; /&gt;
  &lt;asp:ListItem Text=&quot;Item 3&quot; Value=&quot;3&quot; /&gt;
&lt;/asp:CheckBoxList&gt;
</code></pre>
<p>As always let me know if you have any questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2007/07/16/aspnet-checkboxes-should-be-able-to-have-values/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Time to take a look at Python I guess</title>
		<link>http://devsushi.com/2007/04/25/time-to-take-a-look-at-python-i-guess/</link>
		<comments>http://devsushi.com/2007/04/25/time-to-take-a-look-at-python-i-guess/#comments</comments>
		<pubDate>Thu, 26 Apr 2007 00:52:43 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
		
		<category><![CDATA[miscellaneous]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://devsushi.com/2007/04/25/time-to-take-a-look-at-python-i-guess/</guid>
		<description><![CDATA[I was reading Reddit today and came across an interesting article titled Solving Every Sudoku Puzzle. My girlfriend and I enjoy doing Sudoku quite a bit, so an article about solving them obviously caught my eye. I clicked through and arrived at what appeared to be an essay written by Peter Norvig who is (was?) [...]]]></description>
			<content:encoded><![CDATA[<p>I was reading <a href="http://reddit.com">Reddit</a> today and came across an interesting article titled <a href="http://norvig.com/sudoku.html"><em>Solving Every Sudoku Puzzle</em></a>. My girlfriend and I enjoy doing Sudoku quite a bit, so an article about solving them obviously caught my eye. I clicked through and arrived at what appeared to be an essay written by <a href="http://www.amazon.ca/gp/search?ie=UTF8&#038;keywords=peter%20norvig&#038;tag=adamhewgillco-20&#038;index=books-ca&#038;linkCode=ur2&#038;camp=15121&#038;creative=330641">Peter Norvig</a><img src="http://www.assoc-amazon.ca/e/ir?t=adamhewgillco-20&amp;l=ur2&amp;o=15" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> who is (was?) an artificial intelligence (AI) researcher and now works at Google. If you&#8217;ve ever taken an AI course in school you&#8217;ve probably heard his name before. Norvig&#8217;s algorithmic genius is apparent by his simple attack of this potentially expensive problem. The elegance of his solution speaks to his years of programming experience and inherited wisdom.<span id="more-46"></span></p>
<p>The thing that most caught my eye was that Norvig has chosen <a href="http://www.python.org/">Python</a> to implement the solution in. The syntax is a little confusing and would probably require a quick read of the reference manual to follow along. The required use of white space really helps to make the code more readable which should help out beginners a fair bit. His choice tells me that there is something to Python that is worth looking into.</p>
<p>Recently I&#8217;ve been curious about alternatives to ASP.Net and PHP, one of which is <a href="http://www.rubyonrails.org/">Ruby on Rails (RoR)</a>. A lot of people are talking about RoR and there are some clear lines in the sand. A lot of people criticize its problems with memory use and the unorthodox way dynamic pages are served. Others extoll the virtues of the languages syntax, its tight integration with AJAX libraries and its scaffolding technology for rapid development. I&#8217;ve not had enough time to formulate an opinion but I can definitely see the validity of points on both sides of the argument.</p>
<p>Python has a web framework similar to RoR called <a href="http://www.djangoproject.com/">Django</a>. One of its major proponents in the web industry is <a href="http://www2.jeffcroft.com/">Jeff Croft</a> who has used it to great success for his blog. Django, much like RoR, has an unorthodox page serving technique which makes it difficult to find a hosting company. From the information I could find via Google it appears that AJAX is also integrated along with scaffolding. It looks like Python is worth taking a look at, time to find somewhere to host Django and test it out. Thanks Mr. Norvig.</p>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2007/04/25/time-to-take-a-look-at-python-i-guess/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Country list formatted for MySQL import</title>
		<link>http://devsushi.com/2007/04/14/country-list-formatted-for-mysql-import/</link>
		<comments>http://devsushi.com/2007/04/14/country-list-formatted-for-mysql-import/#comments</comments>
		<pubDate>Sat, 14 Apr 2007 23:32:10 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
		
		<category><![CDATA[miscellaneous]]></category>

		<category><![CDATA[database]]></category>

		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://devsushi.com/2007/04/14/country-list-formatted-for-mysql-import/</guid>
		<description><![CDATA[
To break my hiatus here at dev&#124;sushi I decided to publish something I made for myself while working on a project for my freelance business. The form I am creating requires a country selection box and then later to display country names within the application. Instead of doing a god awful static select box on [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>To break my hiatus here at dev|sushi I decided to publish something I made for myself while working on a project for <a href="http://adamhewgill.com">my freelance business</a>. The form I am creating requires a country selection box and then later to display country names within the application. Instead of doing a god awful static select box on the form and then storing the full country name in the database, I decided to use the MySQL table approach. Simple and effective and allows you to use a nice space saving char(2) over a varchar(150) in your other tables.<span id="more-45"></span></p>
<p>I&#8217;ve made the two letter country code the primary key and have the full names as used by PayPal. If anybody can think of other important fields that could be included in an update of this reference let me know. Also, any additions or corrections are appreciated.</p>
<p><a href="/files/countries246.txt">246 Country MySQL import plain text (.txt) file</a><br />
<a href="/files/countries103.txt">103 Country MySQL import plain text (.txt) file</a></p>
<pre><code>--
-- Table structure for table `countries`
-- 

CREATE TABLE `countries` (
  `ccode` varchar(2) NOT NULL default '',
  `name` varchar(200) NOT NULL default '',
  PRIMARY KEY  (`ccode`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `countries`
-- 

INSERT INTO `countries` VALUES ('AF', 'Afghanistan');
INSERT INTO `countries` VALUES ('AX', 'Åland Islands');
INSERT INTO `countries` VALUES ('AL', 'Albania');
INSERT INTO `countries` VALUES ('DZ', 'Algeria');
INSERT INTO `countries` VALUES ('AS', 'American Samoa');
INSERT INTO `countries` VALUES ('AD', 'Andorra');
INSERT INTO `countries` VALUES ('AO', 'Angola');
INSERT INTO `countries` VALUES ('AI', 'Anguilla');
INSERT INTO `countries` VALUES ('AQ', 'Antarctica');
INSERT INTO `countries` VALUES ('AG', 'Antigua and Barbuda');
INSERT INTO `countries` VALUES ('AR', 'Argentina');
INSERT INTO `countries` VALUES ('AM', 'Armenia');
INSERT INTO `countries` VALUES ('AW', 'Aruba');
INSERT INTO `countries` VALUES ('AU', 'Australia');
INSERT INTO `countries` VALUES ('AT', 'Austria');
INSERT INTO `countries` VALUES ('AZ', 'Azerbaijan');
INSERT INTO `countries` VALUES ('BS', 'Bahamas');
INSERT INTO `countries` VALUES ('BH', 'Bahrain');
INSERT INTO `countries` VALUES ('BD', 'Bangladesh');
INSERT INTO `countries` VALUES ('BB', 'Barbados');
INSERT INTO `countries` VALUES ('BY', 'Belarus');
INSERT INTO `countries` VALUES ('BE', 'Belgium');
INSERT INTO `countries` VALUES ('BZ', 'Belize');
INSERT INTO `countries` VALUES ('BJ', 'Benin');
INSERT INTO `countries` VALUES ('BM', 'Bermuda');
INSERT INTO `countries` VALUES ('BT', 'Bhutan');
INSERT INTO `countries` VALUES ('BO', 'Bolivia');
INSERT INTO `countries` VALUES ('BA', 'Bosnia and Herzegovina');
INSERT INTO `countries` VALUES ('BW', 'Botswana');
INSERT INTO `countries` VALUES ('BV', 'Bouvet Island');
INSERT INTO `countries` VALUES ('BR', 'Brazil');
INSERT INTO `countries` VALUES ('IO', 'British Indian Ocean Territory');
INSERT INTO `countries` VALUES ('BN', 'Brunei Darussalam');
INSERT INTO `countries` VALUES ('BG', 'Bulgaria');
INSERT INTO `countries` VALUES ('BF', 'Burkina Faso');
INSERT INTO `countries` VALUES ('BI', 'Burundi');
INSERT INTO `countries` VALUES ('KH', 'Cambodia');
INSERT INTO `countries` VALUES ('CM', 'Cameroon');
INSERT INTO `countries` VALUES ('CA', 'Canada');
INSERT INTO `countries` VALUES ('CV', 'Cape Verde');
INSERT INTO `countries` VALUES ('KY', 'Cayman Islands');
INSERT INTO `countries` VALUES ('CF', 'Central African Republic');
INSERT INTO `countries` VALUES ('TD', 'Chad');
INSERT INTO `countries` VALUES ('CL', 'Chile');
INSERT INTO `countries` VALUES ('CN', 'China');
INSERT INTO `countries` VALUES ('CX', 'Christmas Island');
INSERT INTO `countries` VALUES ('CC', 'Cocos (Keeling) Islands');
INSERT INTO `countries` VALUES ('CO', 'Colombia');
INSERT INTO `countries` VALUES ('KM', 'Comoros');
INSERT INTO `countries` VALUES ('CG', 'Congo');
INSERT INTO `countries` VALUES ('CD', 'Congo, The Democratic Republic of the');
INSERT INTO `countries` VALUES ('CK', 'Cook Islands');
INSERT INTO `countries` VALUES ('CR', 'Costa Rica');
INSERT INTO `countries` VALUES ('CI', 'Côte D'Ivoire');
INSERT INTO `countries` VALUES ('HR', 'Croatia');
INSERT INTO `countries` VALUES ('CU', 'Cuba');
INSERT INTO `countries` VALUES ('CY', 'Cyprus');
INSERT INTO `countries` VALUES ('CZ', 'Czech Republic');
INSERT INTO `countries` VALUES ('DK', 'Denmark');
INSERT INTO `countries` VALUES ('DJ', 'Djibouti');
INSERT INTO `countries` VALUES ('DM', 'Dominica');
INSERT INTO `countries` VALUES ('DO', 'Dominican Republic');
INSERT INTO `countries` VALUES ('EC', 'Ecuador');
INSERT INTO `countries` VALUES ('EG', 'Egypt');
INSERT INTO `countries` VALUES ('SV', 'El Salvador');
INSERT INTO `countries` VALUES ('GQ', 'Equatorial Guinea');
INSERT INTO `countries` VALUES ('ER', 'Eritrea');
INSERT INTO `countries` VALUES ('EE', 'Estonia');
INSERT INTO `countries` VALUES ('ET', 'Ethiopia');
INSERT INTO `countries` VALUES ('FK', 'Falkland Islands (Malvinas)');
INSERT INTO `countries` VALUES ('FO', 'Faroe Islands');
INSERT INTO `countries` VALUES ('FJ', 'Fiji');
INSERT INTO `countries` VALUES ('FI', 'Finland');
INSERT INTO `countries` VALUES ('FR', 'France');
INSERT INTO `countries` VALUES ('GF', 'French Guiana');
INSERT INTO `countries` VALUES ('PF', 'French Polynesia');
INSERT INTO `countries` VALUES ('TF', 'French Southern Territories');
INSERT INTO `countries` VALUES ('GA', 'Gabon');
INSERT INTO `countries` VALUES ('GM', 'Gambia');
INSERT INTO `countries` VALUES ('GE', 'Georgia');
INSERT INTO `countries` VALUES ('DE', 'Germany');
INSERT INTO `countries` VALUES ('GH', 'Ghana');
INSERT INTO `countries` VALUES ('GI', 'Gibraltar');
INSERT INTO `countries` VALUES ('GR', 'Greece');
INSERT INTO `countries` VALUES ('GL', 'Greenland');
INSERT INTO `countries` VALUES ('GD', 'Grenada');
INSERT INTO `countries` VALUES ('GP', 'Guadeloupe');
INSERT INTO `countries` VALUES ('GU', 'Guam');
INSERT INTO `countries` VALUES ('GT', 'Guatemala');
INSERT INTO `countries` VALUES ('GG', 'Guernsey');
INSERT INTO `countries` VALUES ('GN', 'Guinea');
INSERT INTO `countries` VALUES ('GW', 'Guinea-Bissau');
INSERT INTO `countries` VALUES ('GY', 'Guyana');
INSERT INTO `countries` VALUES ('HT', 'Haiti');
INSERT INTO `countries` VALUES ('HM', 'Heard Island and McDonald Islands');
INSERT INTO `countries` VALUES ('VA', 'Holy See (Vatican City State)');
INSERT INTO `countries` VALUES ('HN', 'Honduras');
INSERT INTO `countries` VALUES ('HK', 'Hong Kong');
INSERT INTO `countries` VALUES ('HU', 'Hungary');
INSERT INTO `countries` VALUES ('IS', 'Iceland');
INSERT INTO `countries` VALUES ('IN', 'India');
INSERT INTO `countries` VALUES ('ID', 'Indonesia');
INSERT INTO `countries` VALUES ('IR', 'Iran, Islamic Republic of');
INSERT INTO `countries` VALUES ('IQ', 'Iraq');
INSERT INTO `countries` VALUES ('IE', 'Ireland');
INSERT INTO `countries` VALUES ('IM', 'Isle of Man');
INSERT INTO `countries` VALUES ('IL', 'Israel');
INSERT INTO `countries` VALUES ('IT', 'Italy');
INSERT INTO `countries` VALUES ('JM', 'Jamaica');
INSERT INTO `countries` VALUES ('JP', 'Japan');
INSERT INTO `countries` VALUES ('JE', 'Jersey');
INSERT INTO `countries` VALUES ('JO', 'Jordan');
INSERT INTO `countries` VALUES ('KZ', 'Kazakhstan');
INSERT INTO `countries` VALUES ('KE', 'Kenya');
INSERT INTO `countries` VALUES ('KI', 'Kiribati');
INSERT INTO `countries` VALUES ('KP', 'Korea, Democratic People's Republic of');
INSERT INTO `countries` VALUES ('KR', 'Korea, Republic of');
INSERT INTO `countries` VALUES ('KW', 'Kuwait');
INSERT INTO `countries` VALUES ('KG', 'Kyrgyzstan');
INSERT INTO `countries` VALUES ('LA', 'Lao People's Democratic Republic');
INSERT INTO `countries` VALUES ('LV', 'Latvia');
INSERT INTO `countries` VALUES ('LB', 'Lebanon');
INSERT INTO `countries` VALUES ('LS', 'Lesotho');
INSERT INTO `countries` VALUES ('LR', 'Liberia');
INSERT INTO `countries` VALUES ('LY', 'Libyan Arab Jamahiriya');
INSERT INTO `countries` VALUES ('LI', 'Liechtenstein');
INSERT INTO `countries` VALUES ('LT', 'Lithuania');
INSERT INTO `countries` VALUES ('LU', 'Luxembourg');
INSERT INTO `countries` VALUES ('MO', 'Macao');
INSERT INTO `countries` VALUES ('MK', 'Macedonia, The Former Yugoslav Republic of');
INSERT INTO `countries` VALUES ('MG', 'Madagascar');
INSERT INTO `countries` VALUES ('MW', 'Malawi');
INSERT INTO `countries` VALUES ('MY', 'Malaysia');
INSERT INTO `countries` VALUES ('MV', 'Maldives');
INSERT INTO `countries` VALUES ('ML', 'Mali');
INSERT INTO `countries` VALUES ('MT', 'Malta');
INSERT INTO `countries` VALUES ('MH', 'Marshall Islands');
INSERT INTO `countries` VALUES ('MQ', 'Martinique');
INSERT INTO `countries` VALUES ('MR', 'Mauritania');
INSERT INTO `countries` VALUES ('MU', 'Mauritius');
INSERT INTO `countries` VALUES ('YT', 'Mayotte');
INSERT INTO `countries` VALUES ('MX', 'Mexico');
INSERT INTO `countries` VALUES ('FM', 'Micronesia, Federated States of');
INSERT INTO `countries` VALUES ('MD', 'Moldova, Republic of');
INSERT INTO `countries` VALUES ('MC', 'Monaco');
INSERT INTO `countries` VALUES ('MN', 'Mongolia');
INSERT INTO `countries` VALUES ('ME', 'Montenegro');
INSERT INTO `countries` VALUES ('MS', 'Montserrat');
INSERT INTO `countries` VALUES ('MA', 'Morocco');
INSERT INTO `countries` VALUES ('MZ', 'Mozambique');
INSERT INTO `countries` VALUES ('MM', 'Myanmar');
INSERT INTO `countries` VALUES ('NA', 'Namibia');
INSERT INTO `countries` VALUES ('NR', 'Nauru');
INSERT INTO `countries` VALUES ('NP', 'Nepal');
INSERT INTO `countries` VALUES ('NL', 'Netherlands');
INSERT INTO `countries` VALUES ('AN', 'Netherlands Antilles');
INSERT INTO `countries` VALUES ('NC', 'New Caledonia');
INSERT INTO `countries` VALUES ('NZ', 'New Zealand');
INSERT INTO `countries` VALUES ('NI', 'Nicaragua');
INSERT INTO `countries` VALUES ('NE', 'Niger');
INSERT INTO `countries` VALUES ('NG', 'Nigeria');
INSERT INTO `countries` VALUES ('NU', 'Niue');
INSERT INTO `countries` VALUES ('NF', 'Norfolk Island');
INSERT INTO `countries` VALUES ('MP', 'Northern Mariana Islands');
INSERT INTO `countries` VALUES ('NO', 'Norway');
INSERT INTO `countries` VALUES ('OM', 'Oman');
INSERT INTO `countries` VALUES ('PK', 'Pakistan');
INSERT INTO `countries` VALUES ('PW', 'Palau');
INSERT INTO `countries` VALUES ('PS', 'Palestinian Territory, Occupied');
INSERT INTO `countries` VALUES ('PA', 'Panama');
INSERT INTO `countries` VALUES ('PG', 'Papua New Guinea');
INSERT INTO `countries` VALUES ('PY', 'Paraguay');
INSERT INTO `countries` VALUES ('PE', 'Peru');
INSERT INTO `countries` VALUES ('PH', 'Philippines');
INSERT INTO `countries` VALUES ('PN', 'Pitcairn');
INSERT INTO `countries` VALUES ('PL', 'Poland');
INSERT INTO `countries` VALUES ('PT', 'Portugal');
INSERT INTO `countries` VALUES ('PR', 'Puerto Rico');
INSERT INTO `countries` VALUES ('QA', 'Qatar');
INSERT INTO `countries` VALUES ('RE', 'Reunion');
INSERT INTO `countries` VALUES ('RO', 'Romania');
INSERT INTO `countries` VALUES ('RU', 'Russian Federation');
INSERT INTO `countries` VALUES ('RW', 'Rwanda');
INSERT INTO `countries` VALUES ('BL', 'Saint Barthélemy');
INSERT INTO `countries` VALUES ('SH', 'Saint Helena');
INSERT INTO `countries` VALUES ('KN', 'Saint Kitts and Nevis');
INSERT INTO `countries` VALUES ('LC', 'Saint Lucia');
INSERT INTO `countries` VALUES ('MF', 'Saint Martin');
INSERT INTO `countries` VALUES ('PM', 'Saint Pierre and Miquelon');
INSERT INTO `countries` VALUES ('VC', 'Saint Vincent and the Grenadines');
INSERT INTO `countries` VALUES ('WS', 'Samoa');
INSERT INTO `countries` VALUES ('SM', 'San Marino');
INSERT INTO `countries` VALUES ('ST', 'Sao Tome and Principe');
INSERT INTO `countries` VALUES ('SA', 'Saudi Arabia');
INSERT INTO `countries` VALUES ('SN', 'Senegal');
INSERT INTO `countries` VALUES ('RS', 'Serbia');
INSERT INTO `countries` VALUES ('SC', 'Seychelles');
INSERT INTO `countries` VALUES ('SL', 'Sierra Leone');
INSERT INTO `countries` VALUES ('SG', 'Singapore');
INSERT INTO `countries` VALUES ('SK', 'Slovakia');
INSERT INTO `countries` VALUES ('SI', 'Slovenia');
INSERT INTO `countries` VALUES ('SB', 'Solomon Islands');
INSERT INTO `countries` VALUES ('SO', 'Somalia');
INSERT INTO `countries` VALUES ('ZA', 'South Africa');
INSERT INTO `countries` VALUES ('GS', 'South Georgia and the South Sandwich Islands');
INSERT INTO `countries` VALUES ('ES', 'Spain');
INSERT INTO `countries` VALUES ('LK', 'Sri Lanka');
INSERT INTO `countries` VALUES ('SD', 'Sudan');
INSERT INTO `countries` VALUES ('SR', 'Suriname');
INSERT INTO `countries` VALUES ('SJ', 'Svalbard and Jan Mayen');
INSERT INTO `countries` VALUES ('SZ', 'Swaziland');
INSERT INTO `countries` VALUES ('SE', 'Sweden');
INSERT INTO `countries` VALUES ('CH', 'Switzerland');
INSERT INTO `countries` VALUES ('SY', 'Syrian Arab Republic');
INSERT INTO `countries` VALUES ('TW', 'Taiwan, Province Of China');
INSERT INTO `countries` VALUES ('TJ', 'Tajikistan');
INSERT INTO `countries` VALUES ('TZ', 'Tanzania, United Republic of');
INSERT INTO `countries` VALUES ('TH', 'Thailand');
INSERT INTO `countries` VALUES ('TL', 'Timor-Leste');
INSERT INTO `countries` VALUES ('TG', 'Togo');
INSERT INTO `countries` VALUES ('TK', 'Tokelau');
INSERT INTO `countries` VALUES ('TO', 'Tonga');
INSERT INTO `countries` VALUES ('TT', 'Trinidad and Tobago');
INSERT INTO `countries` VALUES ('TN', 'Tunisia');
INSERT INTO `countries` VALUES ('TR', 'Turkey');
INSERT INTO `countries` VALUES ('TM', 'Turkmenistan');
INSERT INTO `countries` VALUES ('TC', 'Turks and Caicos Islands');
INSERT INTO `countries` VALUES ('TV', 'Tuvalu');
INSERT INTO `countries` VALUES ('UG', 'Uganda');
INSERT INTO `countries` VALUES ('UA', 'Ukraine');
INSERT INTO `countries` VALUES ('AE', 'United Arab Emirates');
INSERT INTO `countries` VALUES ('GB', 'United Kingdom');
INSERT INTO `countries` VALUES ('US', 'United States');
INSERT INTO `countries` VALUES ('UM', 'United States Minor Outlying Islands');
INSERT INTO `countries` VALUES ('UY', 'Uruguay');
INSERT INTO `countries` VALUES ('UZ', 'Uzbekistan');
INSERT INTO `countries` VALUES ('VU', 'Vanuatu');
INSERT INTO `countries` VALUES ('VE', 'Venezuela');
INSERT INTO `countries` VALUES ('VN', 'Viet Nam');
INSERT INTO `countries` VALUES ('VG', 'Virgin Islands, British');
INSERT INTO `countries` VALUES ('VI', 'Virgin Islands, U.S.');
INSERT INTO `countries` VALUES ('WF', 'Wallis And Futuna');
INSERT INTO `countries` VALUES ('EH', 'Western Sahara');
INSERT INTO `countries` VALUES ('YE', 'Yemen');
INSERT INTO `countries` VALUES ('ZM', 'Zambia');
INSERT INTO `countries` VALUES ('ZW', 'Zimbabwe');
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2007/04/14/country-list-formatted-for-mysql-import/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Kinetic Typography: typographic treatment of an audio sample</title>
		<link>http://devsushi.com/2007/02/26/kinetic-typography-typographic-treatment-of-an-audio-sample/</link>
		<comments>http://devsushi.com/2007/02/26/kinetic-typography-typographic-treatment-of-an-audio-sample/#comments</comments>
		<pubDate>Mon, 26 Feb 2007 17:56:43 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
		
		<category><![CDATA[miscellaneous]]></category>

		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://devsushi.com/2007/02/26/kinetic-typography-typographic-treatment-of-an-audio-sample/</guid>
		<description><![CDATA[kinetic [adj.] Of, relating to, or produced by motion.
typography [n.] The general character or appearance of printed matter.
I was browsing through the typography tagged bookmarks on Ma.gnolia.com over the weekend and ran into a video that I found extremely engaging to watch. The video was comprised of lyrics moving on screen set to music; the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>kinetic</strong> <em>[adj.]</em> Of, relating to, or produced by motion.<br />
<strong>typography</strong> <em>[n.]</em> The general character or appearance of printed matter.</p>
<p>I was browsing through the <a href="http://ma.gnolia.com/tags/typography">typography tagged</a> bookmarks on <a href="http://ma.gnolia.com/">Ma.gnolia.com</a> over the weekend and ran into a video that I found extremely engaging to watch. The video was comprised of lyrics moving on screen set to music; the timing of the words appearing was synchronized to the vocals too great effect. See for yourself.<span id="more-43"></span></p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/WXxouXt5dz4"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/WXxouXt5dz4" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object><br />
The Hush Sound - The Lions Roar</p>
<p>I&#8217;ve seen stuff like this before on occasion and have always been captivated.  TBS did a few self promotional advertisements for <em>Everybody loves Raymond</em> and <em>Seinfeld</em> that used the technique to punctuate well-known series moments. The only unfortunate part was they used <a href="http://www.identifont.com/find?font=Arial+Rounded+Bold&amp;q=Go">Arial Rounded Bold</a> which in my opinion is much overused in their marketing.</p>
<p>A second bookmark on Ma.gnolia.com also caught my eye during my search. It was a kinetic typography video set to <a href="http://www.imdb.com/name/nm0000168/">Samuel L. Jackson</a>&#8217;s amazing speech in <a href="http://www.amazon.ca/gp/product/B00006BSBW?ie=UTF8&amp;tag=adamhewgillco-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=B00006BSBW">Pulp Fiction</a>. At a few points in the video the camera motion didn&#8217;t work very well causing the type to be lost but overall it is good. The video has been going around the web and is linked on a few different services including <a href="http://boingboing.hexten.net/2007/02/23/pulp_fiction_as_typo.html">boing boing</a> but check out the <a href="http://www.jarrattmoody.com/intonation.html">author&#8217;s site</a> which has some other interesting stuff.</p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/syf8olcM0z4"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/syf8olcM0z4" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object><br />
Intonation - Jarratt Moody</p>
<p><a href="http://motionographer.com/2007/02/21/say-what-again/">Motionographer</a>, one of the linking sites, had a lengthy discussion about how this was ripped off from a video done by <a href="http://www.youtube.com/watch?v=5qgqbdBnD1k">MK12 called MachoBox</a> (boring warning). The site is an authority on motion graphics so they would know and I can see why they would say it but I don&#8217;t agree that it was &#8220;ripped off&#8221;. The author of the video is a student at Savannah College of Art and Design (SCAD) and is taking a course on kinetic typography where the instructor likely gave them the reference material to pull from for the project.</p>
<blockquote><p><strong>BCST 369 Time-based Typography I</strong><br />
This course addresses historical and contemporary typographic design concepts using film and television. Students construct graphic elements and typography for use in projects while addressing issues of motion and dynamic relationships. Prerequisite: GRDS 205.<br />
<a href="http://www.scad.edu/academic/majors/bcst/courses.cfm">SCAD Course List</a></p></blockquote>
<p>After watching these videos I decided to see if I could find more so I went trolling through <a href="http://youtube.com">YouTube</a> with a search for kinetic typography and didn&#8217;t really turn up anything worth watching. I did find a <a href="http://www.youtube.com/watch?v=3y07-Kso4vg">music video</a> by <a href="http://www.zero7.co.uk/">zero 7</a> that is alright (not sure if it is the official video or not). If you&#8217;re wondering where you&#8217;ve heard that name before it was probably from their inclusion on the <a href="http://www.amazon.ca/gp/product/B0002J58LK?ie=UTF8&amp;tag=adamhewgillco-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=B0002J58LK">Garden State soundtrack</a><img src="http://www.assoc-amazon.ca/e/ir?t=adamhewgillco-20&amp;l=as2&amp;o=15&amp;a=B0002J58LK" style="border: medium none  ! important; margin: 0px ! important" border="0" height="1" width="1" /> or <a href="http://www.amazon.ca/gp/product/B00005JNC2?ie=UTF8&amp;tag=adamhewgillco-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=B00005JNC2">movie</a>.<img src="http://www.assoc-amazon.ca/e/ir?t=adamhewgillco-20&amp;l=as2&amp;o=15&amp;a=B00005JNC2" style="border: medium none  ! important; margin: 0px ! important" border="0" height="1" width="1" /> Have you seen anything out there like this? I&#8217;d love some more links to check out.</p>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2007/02/26/kinetic-typography-typographic-treatment-of-an-audio-sample/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MSN Video Sucks</title>
		<link>http://devsushi.com/2007/02/18/msn-video-sucks/</link>
		<comments>http://devsushi.com/2007/02/18/msn-video-sucks/#comments</comments>
		<pubDate>Mon, 19 Feb 2007 03:48:42 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
		
		<category><![CDATA[miscellaneous]]></category>

		<guid isPermaLink="false">http://devsushi.com/2007/02/18/msn-video-sucks/</guid>
		<description><![CDATA[Online video has now become a mainstay on the internet. There are hundreds of video hosting sites and literally millions of videos. Missed Jon Stewart&#8217;s latest headlines or that Bush zinger everyone at work is talking about? How about Stephen Colbert&#8217;s The Word segment? Don&#8217;t fret it is on the Internet.
Most people by now have [...]]]></description>
			<content:encoded><![CDATA[<p>Online video has now become a mainstay on the internet. There are hundreds of video hosting sites and literally millions of videos. Missed <a href="http://www.comedycentral.com/shows/the_daily_show/index.jhtml">Jon Stewart&#8217;s</a> latest <a href="http://www.comedycentral.com/shows/the_daily_show/videos/headlines/index.jhtml">headlines</a> or that <a href="http://www.comedycentral.com/motherload/player.jhtml?ml_video=81278&amp;ml_collection=&amp;ml_gateway=&amp;ml_gateway_id=&amp;ml_comedian=&amp;ml_runtime=&amp;ml_context=show&amp;ml_origin_url=%2Fshows%2Fthe_daily_show%2Fvideos%2Fheadlines%2Findex.jhtml&amp;ml_playlist=&amp;lnk=&amp;is_large=true">Bush zinger everyone at work is talking about</a>? How about <a href="http://www.comedycentral.com/shows/the_colbert_report/index.jhtml">Stephen Colbert&#8217;s</a> <a href="http://www.comedycentral.com/shows/the_colbert_report/videos/the_word/index.jhtml"><em>The Word</em></a> segment? Don&#8217;t fret it is on the Internet.<span id="more-39"></span></p>
<p>Most people by now have been to <a href="http://youtube.com/">YouTube</a> (now a Google property) at least once to view some stupid video that a friend told them about. Perhaps <a href="http://youtube.com/watch?v=U8J4RdX5H8Y">Diet Coke and Mentos</a> or maybe <a href="http://youtube.com/watch?v=HPPj6viIBmU">Starwars Kid</a>, paradied to great effect on Arrested Development. The <a href="http://digg.com/videos">Digg video section</a> is very popular and usually contains a few gems beside the regular <em>America&#8217;s Funniest Home Videos</em> type clips; here are the <a href="http://digg.com/videos/popular/365days">best of the year</a>. Another video service that is very popular at the moment is <a href="http://one.revver.com/revver">Revver</a>; take a look at the their <a href="http://one.revver.com/revver/browse/Most+Watched">most watched list</a>. They put advertising into the videos and then share the profit 50/50 with the creators. I still don&#8217;t know if that is a sustainable business model but it is interesting.</p>
<p>I upgraded to Windows Live Messenger a while ago and have occasionally noticed an interesting video roll across the bottom of the main window. It started with mostly celebrity gossip clips that I suspect were quite unpopular. Next came music video clips and movie trailers which was a step in the right direction. I generally get my movie clips from <a href="http://www.apple.com/trailers/">Apple&#8217;s trailer site</a> so this didn&#8217;t interest me either. Finally they started to collect user submitted video which was added to the mix.</p>
<p>The player that MSN uses is Window Media Player and not a flash based solution like the majority of other sites. Every time I&#8217;ve clicked on a video thus far it has failed during streaming. I have a very good connection and never have any trouble with other services. The problem is that MSN Video doesn&#8217;t seem to buffer the video very well. I suspect it is a combination of Windows Media Player and a very strong DRM but I haven&#8217;t looked into it. Give it a <a href="http://video.sympatico.msn.com">try yourself</a> and see how it goes. Oh ya, it requires Internet Explorer, Windows Media Player and apparently Macromedia Flash for some reason. Overall I give this product a huge thumbs down; MSN Video sucks.</p>
<p>While researching this article I ran into <a href="http://soapbox.msn.com/">MSN SoapBox</a> which is yet another video service but this time uses a Flash based player. It is definatly an improvement but has a small set of videos and a poorly designed interface. I noticed bandwidth issues with a video or two from this service too but they are far less frequent. For some reason the site fails to load in FireFox on MacOSX but works fine on FireFox in Windows. Two javascript errors prevent the page from loading but I didn&#8217;t spend any time figuring out what specifically was at fault. I am going to reserve judgement on this service for a while but I recommend Microsoft spends a bit of time on it and moves all MSN Video over, including the Live Messenger links. I&#8217;m curious to hear the opinions and experiences of others who have tried out this stuff, so leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2007/02/18/msn-video-sucks/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
