<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Disco Shiny</title>
	<atom:link href="http://discoshiny.com/feed" rel="self" type="application/rss+xml" />
	<link>http://discoshiny.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 09 Aug 2010 18:20:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Project Management &#8211; Features</title>
		<link>http://discoshiny.com/post/project-management-features</link>
		<comments>http://discoshiny.com/post/project-management-features#comments</comments>
		<pubDate>Wed, 26 May 2010 19:50:52 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://discoshiny.com/?p=87</guid>
		<description><![CDATA[In this post I&#8217;ll be going over the more overarching feature set that Andy and myself planned out at several lunch meetings. I suppose this is the post that should have happened first, this being the distillation of my raw notes from which came those data structures. We started talking about this because we needed [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I&#8217;ll be going over the more overarching feature set that Andy and myself planned out at several lunch meetings. I suppose this is the post that should have happened first, this being the distillation of my raw notes from which came those data structures.</p>
<p>We started talking about this because we needed some way of managing our productivity. Most project management is for very complicated software development and we needed something more general. We also believed that the program should be brain-dead simple to use so that we would actually use it. There should be very few clicks for commonly used features like time tracking, and more clicks allowed for document management and invoicing, but it should still be quick and simple. Andy and I also wanted to be able to replicate some of the better parts of other applications we&#8217;ve come into contact with like Salesforce as future add-ons or plugins. I want to take baby steps though since I am the sole developer and thinking too large is the number one killer of a good idea.<br />
<span id="more-87"></span></p>
<h3>Quotes and Invoices</h3>
<p>The feature we wanted the most was quick and easy quote and invoice generation. We also wanted to be able to easily create invoices from quotes. I already made an <a href="http://discoshiny.com/post/mason-media-lab-invoicing-system">Invoicing System</a> for the Mason Media Lab, but that had a lot of very specific functionality. It would be great to create a system that is customizable enough to replicate that functionality and much more when set up properly, but that&#8217;s way beyond the scope of this initial iteration.</p>
<p>One function of that Invoicing System was PDF generation which I am certainly building into this application. It&#8217;s as simple as creating a view that outputs a PDF. The eventual goal is to make the PDF customizable, but creating an interface for that is way beyond the scope of this iteration. It would be much more feasible to allow users to create new templates that standard data is dropped into. Even this would require some amount of PHP knowledge, but it&#8217;s not terribly difficult.</p>
<p>Quotes should have version tracking. Every time a quote is updated, a copy is created and the changes between any two given revisions are noted automatically by the application. The user should be able to optionally add revision notes. This is mostly a tool for when the client asks about previous quotes.</p>
<p>Invoice items need the option of having an associated image. One of our larger clients had a previous designer who would present each invoice with a separate attached page with screen shots of work on it. We thought this was a very good idea and gives the client the impression you are going the extra mile for them. If any invoice items have associated images, by default the application will generate an invoice with an extra page that has them all laid out labeled by item number.</p>
<p>Some projects are invoiced as a fixed price for an item, others as hourly. This system should be flexible enough to handle both. For the case of single, package-priced items, it is nice to have it laid out on the invoice like so:</p>
<ol>
<li>Huge freaking database application</p>
<ul>
<li>Laundry counting, sorting, viewing</li>
<li>Statistics on different kinds of dirt found on garments</li>
<li>Garment owner tracking, sock pairing</li>
<li>Reporting by owner, garment, dirt. Export to CSV</li>
</ul>
</ol>
<h3>Other Features</h3>
<ul>
<li>User management with privileges</li>
<li>Searching for&#8230; everything. It&#8217;s not clearly defined yet.</li>
<li>Projects have categories (print, web, video, animation, mobile)</li>
<li>Blanket discounts on invoices</li>
<li>Tracking of total quote prices and total valid invoice prices for some basic accounting</li>
<li>Hours tracking on projects, eventually per user</li>
<li>Projects have statuses for tracking success</li>
</ul>
<p>I should make it clear that this application is being developed to fit our company&#8217;s needs. We&#8217;ve been taking feedback from our clients of what they&#8217;d like to see in such a program and they&#8217;ve responded, but the following are features that are not in our initial plan:</p>
<ul>
<li>Time sheet API to interface with industry-standard and compliant time tracking to link that data to internal projects</li>
<li>Create project templates</li>
<li>Tasks can have documents associated with them</li>
<li>Option to make single tasks or entire projects public or share via email</li>
<li>Allow guests to upload these documents</li>
</ul>
<p>And that about covers it. I&#8217;ll be writing here in the future with development updates for my own organizational needs and for anyone else who cares.</p>
]]></content:encoded>
			<wfw:commentRss>http://discoshiny.com/post/project-management-features/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Management</title>
		<link>http://discoshiny.com/post/project-management</link>
		<comments>http://discoshiny.com/post/project-management#comments</comments>
		<pubDate>Tue, 25 May 2010 23:39:03 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://discoshiny.com/?p=79</guid>
		<description><![CDATA[Well, the framework from my last post is going to be one of those low and slow projects, it may never even come to fruition. After I wrote that post I came back the next day and discovered a few major errors in how I had conceived the architecture. Whatever. I still want to do [...]]]></description>
			<content:encoded><![CDATA[<p>Well, the framework from my last post is going to be one of those low and slow projects, it may never even come to fruition. After I wrote that post I came back the next day and discovered a few major errors in how I had conceived the architecture. Whatever. I still want to do it, but I want to get the project management solution finished more. I cast around for a solution and <a href="http://codeigniter.com/">CodeIgniter</a> came up. I found an ORM for it that I&#8217;m not entirely happy with but that I believe will work decently (<a href="http://stensi.com/datamapper/">DataMapper</a> with <a href="http://www.overzealous.com/dmz/">DMZ</a>).</p>
<p>Basically the problem with any ORM is that it needs to have your database structure mirrored so that you can manipulate the data and build queries in a way that mimics the database itself without actually touching the data until the moment you need it. DM/DMZ have a rather verbose method of representing this with lots of nested arrays and it&#8217;s a pain, but after it&#8217;s set up, working with it is really decent if a bit too magical. So my odyssey has begun in creating the data structures as code. This post is not supposed to be about that, it&#8217;s supposed to be a transcription of my ideas and notes that I&#8217;ve been constantly referring to. So here we go&#8230;<br />
<span id="more-79"></span><br />
We are a design company, not a software development company. Our needs in project management are a little different and often smaller, even when we do software development. The working title for this project is <strong>Yams</strong>. It doesn&#8217;t mean anything. No, it does not mean &#8216;Yet Another &#8230;&#8217; it means the root plant that is orange and tastes very good when baked/boiled/whatever. My goals in building Yams are to start simple but generalize everything so it&#8217;s easy to add features later. Yams is designed for a group of people who do projects of any sort to upload it to their own web server, have a user account for each person, and manage responsibilities per user. Let&#8217;s break it down.</p>
<h3>Users</h3>
<p>Typical user system with privileges. It&#8217;s number based, 0-10 with registered users occupying 1-9, guests occupying 0, and admins occupying 10. I haven&#8217;t put much thought into this part of it yet but I have a vague idea that users will start at level 5 or something by default, most tasks in the system will require level 5 by default, but if you want more user classes you can define them as higher or lower and then change the required access level for tasks as an admin. This is all really nebulous and not planned out at all right now so let&#8217;s move on.</p>
<h3>Accounts</h3>
<p>We separate our projects into accounts. Accounts are companies or people or whatever that we do work for. They are not user accounts in the system, those are the Users from above. This is really a top-level object and lots of things will belong to them. Accounts do have an owner who is a User and a primary contact who is a Contact. On the account summary screen, the primary contact&#8217;s email and phone will be used. I&#8217;m not sure yet if it&#8217;s a good idea to also have a phone number and email for the Account itself, but if so then it&#8217;s a trivial task to add them. This object has a notes field that can be used to store miscellaneous data. This can be used as a crutch to store data that should go in custom fields. I want to make custom fields ala Salesforce a feature but more on that below.</p>
<h3>Contacts</h3>
<p>This object is a single person that we need to talk to when working on a project. Many of these Contacts may belong to a single Account. A Contact may even be linked to multiple Accounts, but that&#8217;s not a typical scenario. On the Contact edit screen, I&#8217;m thinking a drop down box to select which Account the Contact belongs to with a JS-enabled (+) button that adds a second drop down. This object stores a first/last name, full address, phones, and email.</p>
<h3>Projects</h3>
<p>A Project is a collection of tasks. It belongs to a single Account and has a primary Contact that defaults to the primary Contact for the Account. It may only use Contacts from that Account. Dynamically populated drop down boxes everywhere. Projects can belong to Categories. I won&#8217;t dignify Categories with a section, but Yams will allow users to add Categories in a rather standard system. Each project has a status: &#8216;Not Started&#8217;, &#8216;In Progress&#8217;, &#8216;Completed&#8217;, &#8216;Deactivated&#8217;. It also stores a start date and an end or due date. A notes field is present here as well.</p>
<h3>Tasks</h3>
<p>Tasks are a major workhorse object. One or more Users are assigned a Task as being responsible for completing it. Each Task has a start date and due date as well as an hours field that may be used initially to estimate project length and later edited to reflect how much time was actually spent. In the future this functionality will be much expanded, perhaps with a desktop app (AIR maybe) and hours will be broken down by user. Tasks can also depend on each other. A major goal of this application as will be discussed in the major features section is a timeline view for projects. There&#8217;s a fancy name for these graphs that I can&#8217;t think of right now, but Yams will do that. In order for the feature to be automatic and magic-cool, Tasks need to be structured in a tree of sorts. More on this in the features section.</p>
<h3>Quotes/Invoices (Itemlists)</h3>
<p>I want this system to enable rapid quote and invoice generation from a project or projects. Itemlist is the name for these objects since they are essentially identical. Itemlists are versioned, if you make changes to one it creates a copy and changes the creation date and invoice number if applicable. It marks the old one as obsolete and notes what Items you added or deleted from it as well as an optional revision notes field from the User. In addition to storing whether it&#8217;s an invoice or quote and if it&#8217;s a current revision, invoice Itemlists make note if payment has been received.</p>
<h3>Items</h3>
<p>Items are another workhorse object. They also have a tree structure that will probably be limited in the application logic to 3 levels. An Item belongs to one or more Itemlists. Items may be either independent and store a description or they may be an alias for a Task which uses the Task&#8217;s description. This allows Users to see if their project has been correctly billed in the end. Perhaps there will be a mechanism to mark a Task as not needing to be invoiced on the screen where projects are converted to invoices or quotes. Items also store an optional image file which is an image of that particular task. For design work on a small scale, a Project may consist of many Tasks that are themselves mini projects. I look to one of our biggest clients that has us do miscellaneous small design projects and each one would be one Task in this paradigm, which means this project would have multiple images, but each Task/Item need not.</p>
<p>Phew. That about covers the major structures as we&#8217;ve planned them out so far. I think I will make another post later defining the major features we want Yams to have and the rationale for each. I&#8217;m way too zazzed after those 1200 words to write decently in this update.</p>
]]></content:encoded>
			<wfw:commentRss>http://discoshiny.com/post/project-management/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>For Some Reason I Am Writing a Framework</title>
		<link>http://discoshiny.com/post/for-some-reason-i-am-writing-a-framework</link>
		<comments>http://discoshiny.com/post/for-some-reason-i-am-writing-a-framework#comments</comments>
		<pubDate>Thu, 29 Apr 2010 02:39:52 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://discoshiny.com/?p=71</guid>
		<description><![CDATA[Well business has been pretty good, but the work has either been sensitive or pedestrian. I haven&#8217;t had the time or the reason to develop an interesting or challenging web project for about a year now. The paradigm&#8230; *dons shades* has changed *walks away as The Who destroys your ears*. Recently we decided to develop [...]]]></description>
			<content:encoded><![CDATA[<p>Well business has been pretty good, but the work has either been sensitive or pedestrian. I haven&#8217;t had the time or the reason to develop an interesting or challenging web project for about a year now. The paradigm&#8230; <i>*dons shades*</i> has changed <i>*walks away as The Who destroys your ears*</i>. Recently we decided to develop some sort of project management solution for Outside The Lab that would contain a superset of the features from the <a href="http://discoshiny.com/post/mason-media-lab-invoicing-system">MML Invoicing System</a>. The only problem is that the entire codebase for that thing is garbage and unusable. It contains zero separation of code and logic from design and layout. It is a paragon example of spaghetti code and it&#8217;s glorious in a weird, trainwreck kind of way.</p>
<p>Since then I&#8217;ve taught myself some Python and revamped my video host with <a href="http://www.djangoproject.com/">Django</a> (<a href="http://video.discoshiny.com/">Link</a>). I hadn&#8217;t had experience with the <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">MVC design pattern</a> although I knew the theory. Django really drove the point home and forced me to use it. I had such a wonderful experience that I wanted to be able to code the same way in PHP, but after trying CakePHP and CodeIgnitor, I was still wanting. These frameworks tried to do too much. I just wanted something that would abstract the database stuff away for me and let me do my own thing with the controllers and views. Something really minimal. Now maybe there is something out there like that, but I couldn&#8217;t find it. Plus, I figured this would be a great learning opportunity. My initial plan is detailed below for my own reference and for others who may be interested.<br />
<span id="more-71"></span><br />
Andy and I sat down and figured out what functionality we wanted in the project management system and thus the data we wanted to store. I created a schema on paper that is decently complex and will serve as a good test case for this framework.</p>
<p>I spent some time today thinking really hard about how Django does the database stuff and why I liked it so much. Basically it does the following:</p>
<ol>
<li>You define a number of models that extend the base model class</li>
<li>You run a script that automatically creates tables in your database from these models</li>
<li>You access all your data from an object, run filters, and sort using methods in the base models class</li>
<li>All this time, the model has been building an SQL query which is not executed until you access the data itself. It can do this because it knows the structure of the data in the database.</li>
</ol>
<p>That last point is very important. I have to somehow create a way to codify the database schema that can be parsed by the framework to build SQL queries without hitting the database to take a look. There are a few possibilities for doing this using the PHP language, but short of porting the functionality of the Django Model base class over to PHP (which might not even be 100% possible), there was no way to create an easy-to-read and semantic schema in the PHP language itself. So I&#8217;ve created a parser that takes an INI file and creates a schema from it. The format follows:</p>
<pre class="brush: plain;">[&lt;table_name&gt;]
&lt;field_name&gt; = &lt;type&gt;(&lt;default_value&gt;)[,unique][,index]
&lt;foreign_key&gt; = fkey(&lt;foreign_table&gt;)[,array]
&lt;enumeration&gt; = enum(&lt;value1&gt;|...)
...
</pre>
<p><code><type></code> can be one of &#8216;string&#8217;,'text&#8217;,'integer&#8217;,'float&#8217;,'date&#8217;,'boolean&#8217;. <code>array</code> is an optional parameter on foreign keys to indicate that there is a many-to-many relationship between the two tables.</p>
<p>An INI file. Cute. I&#8217;ve created a parser that dumps all this into a multidimensional array in the form</p>
<pre class="brush: php;">$structure = array(&quot;table1&quot; =&gt; array(Field, Field,...), &quot;table2&quot; =&gt; array(Field, Field, ...))</pre>
<p>where Field is a class that is little more than a struct to hold useful information about a field. I don&#8217;t know if this is the best way to proceed, but I&#8217;ve got a pretty good feeling about it. My goal is to create a Model class that can be passed a table name in the constructor and can use the information in the structure array to build queries. My next step though is to write the function that builds tables in the database from the information in the structure array so I can standardize how it will handle pivot tables and other stuff I haven&#8217;t thought of yet.</p>
<p>I intend to update this blog more regularly in the future with further developments with the project management system which entirely too long of a title. We&#8217;re working on it under the name Dorsia but that will absolutely not be the final name. We&#8217;re thinking YAMS (doesn&#8217;t stand for anything, or maybe we&#8217;ll invent an ironic recursive acronym) but really it could be anything.</p>
]]></content:encoded>
			<wfw:commentRss>http://discoshiny.com/post/for-some-reason-i-am-writing-a-framework/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caching In On Performance Boosts</title>
		<link>http://discoshiny.com/post/caching-in-on-performance-boosts</link>
		<comments>http://discoshiny.com/post/caching-in-on-performance-boosts#comments</comments>
		<pubDate>Tue, 16 Jun 2009 18:10:24 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://discoshiny.com/?p=69</guid>
		<description><![CDATA[Part of my intent in making this blog was to be able to talk about ongoing development in my various projects. Unfortunately, a lot of the work I typically do is simple HTML and CSS and it&#8217;s not challenging me to learn something new. Today, however, I have something to report. I received an email [...]]]></description>
			<content:encoded><![CDATA[<p>Part of my intent in making this blog was to be able to talk about ongoing development in my various projects. Unfortunately, a lot of the work I typically do is simple HTML and CSS and it&#8217;s not challenging me to learn something new. Today, however, I have something to report.</p>
<p>I received an email from Dreamhost last week informing me that they were throttling connections to my video hosting site because recent traffic spikes from the <a href="http://forums.somethingawful.com/showthread.php?threadid=3140021">Sonic Unleashed Let&#8217;s Play</a> were causing the Apache server to have problems. Now I&#8217;ll be the first to admit that my video hosting solution is not elegant or efficient. I started it small and hacked on features as I went. Yeah, one of <em>those</em>. Everyone makes one eventually, but in this case, mine got popular so I needed to fix it.<br />
<span id="more-69"></span><br />
I determined that I needed to implement a form of caching to cause my spaghetti code to run as infrequently as possible. Professional-level caching solutions require control of the server the site is running on, both hardware and software. These same solutions are also rather complicated and work to cache selectively only those parts of the site (and sometimes within individual pages) that do not change very often or ever. For my site, I know that once a video is added, the page that lets you view it almost never changes, so this is the part of the site that will be cached. This is also the part of the site that sees ~80% of the traffic total and closer to 100% of the traffic during the spikes. Fantastic.</p>
<p>The rewrite involved a few steps. First I removed all the code used to draw the page contents and put it in a function. The function, <code>printVideoPage</code>, takes the ID of the video in the database and returns a string of the page content. I also took this opportunity to optimize the way I use ADOdb because I have a better understanding of it now than when I wrote this 3 years ago.</p>
<p>The second function I wrote creates a cache file. This function, <code>updateCache</code>, also takes an ID. It opens the cache file located at the configured location with the configured file name and starts writing. It actually writes a PHP file which declares two variables, <code>$name</code> and <code>$contents</code>. When show.php includes the cache file for the requested ID, it can put the name of the video in the title and the contents where they belong.</p>
<p>For the average visitor to my site, this eliminates all SQL calls and a great deal of very bad PHP. If a cache file does not exist, the site displays an error. This means that the cache must absolutely be a correct and accurate representation of the database at all times which annoys me, but as long as I call <code>updateCache</code> any time I change or add a video record in the database, everything should be fine. I do not think there are any bugs, but there are certain aspects which have not yet been tested as much as they should be. show.php is functioning as expected which for now is the most important thing.</p>
<p>I cannot show you empirical evidence that my measures to reduce load have worked. I&#8217;m on shared hosting; I don&#8217;t get access to that kind of stuff. I can only hope it has made a difference and that Dreamhost sees that and unthrottles me. If that&#8217;s not good enough for them (and it really should be, Sonic 2006 had way more traffic and this didn&#8217;t happen), I am at the end of my bag of tricks on the current codebase and I will have to rewrite. Ughh.</p>
]]></content:encoded>
			<wfw:commentRss>http://discoshiny.com/post/caching-in-on-performance-boosts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Body Classes Can Be A Smart Choice</title>
		<link>http://discoshiny.com/post/body-classes-can-be-a-smart-choice</link>
		<comments>http://discoshiny.com/post/body-classes-can-be-a-smart-choice#comments</comments>
		<pubDate>Sat, 23 May 2009 17:28:53 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://discoshiny.com/?p=62</guid>
		<description><![CDATA[At my place of work, one of my projects is to develop our department website. Because this is a major website at the university, it has to follow all the rules. These include accessibility, cross-browser support, and conservative design sensibilities. But being a non-technical corporate environment, they want to have their cake and eat it [...]]]></description>
			<content:encoded><![CDATA[<p>At my place of work, one of my projects is to develop our department website. Because this is a major website at the university, it has to follow all the rules. These include accessibility, cross-browser support, and conservative design sensibilities. But being a non-technical corporate environment, they want to have their cake and eat it too, so I have to reconcile the JavaScript carousel and scrolling news widgets they wanted with the accessibility concerns for people with text readers or what have you.</p>
<p>I was poking around the internet and found the solution on another page at our university. I believe it was created by our competition, Creative Services, who we&#8217;re pretty sure take templates and butcher them to be Mason-branded. The implementation on that page was the answer no matter how much I loathe their cookie-cutter techniques. The answer is <code>&lt;body&gt;</code> classes.</p>
<p><span id="more-62"></span></p>
<p>In the past I had dismissed body classes as being a poor design strategy for a site. This was because I&#8217;d only ever seen poor implementations of them, parroted by Lynda.com. You should not use <code>&lt;body&gt;</code> classes automatically on every site you design. This encourages inconsistency in design between pages. It also bloats your CSS because if you&#8217;re using a <code>&lt;body&gt;</code> class, you&#8217;re using a lot of descending selectors and creating styles like <code>.bodyclass #sidebar ul li</code>.</p>
<p>But there are circumstances in which body classes can be used correctly and one of these circumstances is my problem. The idea is to first create your page without any JavaScript functionality at all, but with JavaScript functionality in mind. That carousel of images, for example, becomes a grid of images. The scrolling news shows only the top three items. The animation is not present. Then in your <code>$(document).ready()</code> block before anything else, you do this:</p>
<pre class="brush: jscript;">$('body').addClass('js_ready');</pre>
<p>You&#8217;ve just added a class to your body tag with JavaScript. If the user does not have JavaScript enabled, this will not trigger. So now you can put all your JavaScript styles under the <code>.js_ready</code> selector. Because of the specificity of CSS, adding more information to an element selector will override any other reference to that selector. So if you have <code>#carousel ul li</code> and <code>.js_ready #carousel ul li</code>, any styling in the latter block will override the former, making your page style differently in the presence of JavaScript. This may necessitate updating the prepackaged CSS that came with your widget to include the body selector.</p>
<p>Well that&#8217;s a pretty cool thing, and while I was realizing how it worked I thought of another possibility. Admittedly it&#8217;s not going to be widely used, but I guess it could make a good tech demo. What if you want to have different themes for your page? Each theme is under a different body class and could be changed via JavaScript. I imagine this would be most handy if you&#8217;re pitching to a client and you&#8217;ve created a couple different designs and you wish to cycle quickly through them for comparison. The theme change would not be persistent across pages without some extra work, and who wants to create more than one completely realized style per site anyway? But it was a neat idea I had. Maybe I will implement it here on Disco Shiny&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://discoshiny.com/post/body-classes-can-be-a-smart-choice/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Serial For Breakfast</title>
		<link>http://discoshiny.com/post/serial-for-breakfast</link>
		<comments>http://discoshiny.com/post/serial-for-breakfast#comments</comments>
		<pubDate>Wed, 20 May 2009 21:14:08 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://discoshiny.com/?p=60</guid>
		<description><![CDATA[As I posted mere minutes ago, I&#8217;m working on an invoicing system. Part of this blog&#8217;s function is to be a regurgitation of things I think about when working of various projects, so here we go. Being a central database for all our services and all jobs we&#8217;ve ever done, it becomes easy to update [...]]]></description>
			<content:encoded><![CDATA[<p>As I posted mere minutes ago, I&#8217;m working on an <a href="http://discoshiny.com/post/mason-media-lab-invoicing-system">invoicing system</a>. Part of this blog&#8217;s function is to be a regurgitation of things I think about when working of various projects, so here we go.</p>
<p><span id="more-60"></span></p>
<p>Being a central database for all our services and all jobs we&#8217;ve ever done, it becomes easy to update information regarding our services and have them take effect immediately. It has occurred to me, however, that this could be very bad for invoices we have already submitted and been paid for if, say, we changed the price of plain paper. Those completed invoices would suddenly change. I&#8217;ve decided the answer is serialization.</p>
<p>When we submit an invoice to accounting, it changes status to &#8220;Submitted&#8221; (or it will when the admin section is up and running). At this point, we don&#8217;t want the invoices to change any more ever, so we load up an invoice in our Invoice class and call <code><a href="http://us2.php.net/serialize" target="_blank">serialize()</a></code> on it. This makes it a string which we then store in a new field. Upon loading an invoice, the class should check a) the status of the invoice and b) if the serialized field is populated. If the conditions are right, it replaces itself with an <code><a href="http://us2.php.net/unserialize" target="_blank">unserialize()</a></code>&#8216;d version of the invoice.</p>
<p>I&#8217;m just glad I thought of this before I started coding the admin section. If all goes well, though, nothing should change from the perspective of the parts of the application using the class. It just seems like something that could have easily slipped under the radar and then never gotten fixed because we don&#8217;t change our prices often at all and I would be gone the next time we did it.</p>
]]></content:encoded>
			<wfw:commentRss>http://discoshiny.com/post/serial-for-breakfast/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mason Media Lab Invoicing System</title>
		<link>http://discoshiny.com/post/mason-media-lab-invoicing-system</link>
		<comments>http://discoshiny.com/post/mason-media-lab-invoicing-system#comments</comments>
		<pubDate>Wed, 20 May 2009 20:30:03 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://discoshiny.com/?p=50</guid>
		<description><![CDATA[XHTML CSS PHP MySQL jQuery/AJAX PDF Creation Limited Demo One major project I&#8217;ve been working on has been replacing the person who&#8217;s job it was to aggregate all our invoices, send them off to accounting, and report our numbers each month. Her system comprised a number of excel spreadsheets between which she would copy all [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_51" class="wp-caption alignleft" style="width: 160px"><a href="http://discoshiny.com/wp-content/uploads/2009/05/invoicing-screenshot.png"><img src="http://discoshiny.com/wp-content/uploads/2009/05/invoicing-screenshot-150x150.png" alt="The Front Page" title="MML Invoicing System" width="150" height="150" class="size-thumbnail wp-image-51" /></a><p class="wp-caption-text">The Front Page</p></div>
<ul class="projectTech">
<li>XHTML</li>
<li>CSS</li>
<li>PHP</li>
<li>MySQL</li>
<li>jQuery/AJAX</li>
<li>PDF Creation</li>
</ul>
<p><a href="http://projects.discoshiny.com/invoicing/" target="_blank">Limited Demo</a></p>
<p>One major project I&#8217;ve been working on has been replacing the person who&#8217;s job it was to aggregate all our invoices, send them off to accounting, and report our numbers each month. Her system comprised a number of excel spreadsheets between which she would copy all relevant data. Naturally a database is a much better solution and so I set about creating one. The project is not yet complete, I still have to create the administration section. Most of the framework is in place, though, and the front end is what I consider to be beta status.</p>
<p><span id="more-50"></span></p>
<p>This project was a vehicle for me to learn JavaScript. Since our previous system of creating invoices was entirely based in Excel, the new system had to have at least as much functionality. This meant creating a rich web application which would carry out the calculations for costs automatically.</p>
<p>Using jQuery has allowed me to do a number of things with the site that are both aesthetically pleasing and highly functional. The page that allows users to search for and filter invoices, for instance, uses hidden form inputs combined with a table to simulate rich checkboxes. Clicking a table cell highlights or normalizes it, indicating that it is active or not. The actual form element is a hidden input for each table cell that toggles between &#8216;off&#8217; and &#8216;on&#8217; through the use of jQuery.</p>
<p>One very important feature of the new system relates to the way we are paid as a university organization. Each organization has one or more fund numbers which they can supply as a form of payment, and funds are automatically deducted when we submit the completed invoices to accounting. Unfortunately, these are simply numbers and are rather non-descriptive. This invoicing system uses PHP/cURL and AJAX to look up the unit name tied to a given org number so we can double check with clients. We have since caught three instances of clients giving us entirely the wrong department&#8217;s number.</p>
<p>The system is incomplete, as I have said. I am actively developing it and hope to have it deployed in beta or gold status by the next fiscal year. At this point we intend to start shopping it all over the university to other organizations that provide services within the university. This is highly tentative and should not be taken as official word.</p>
]]></content:encoded>
			<wfw:commentRss>http://discoshiny.com/post/mason-media-lab-invoicing-system/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Blinded By JavaScript</title>
		<link>http://discoshiny.com/post/blinded-by-javascript</link>
		<comments>http://discoshiny.com/post/blinded-by-javascript#comments</comments>
		<pubDate>Tue, 12 May 2009 06:30:09 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://discoshiny.com/?p=32</guid>
		<description><![CDATA[Before about a month ago I had never touched JavaScript, I thought it unnecessary. I had been able to do everything I ever wanted in CSS, and if some task could only be done in JavaScript, then it was not a task worth persuing. Well as of a month or so ago, I began a [...]]]></description>
			<content:encoded><![CDATA[<p>Before about a month ago I had never touched JavaScript, I thought it unnecessary. I had been able to do everything I ever wanted in CSS, and if some task could only be done in JavaScript, then it was not a task worth persuing. Well as of a month or so ago, I began a project at work to create an invoicing system. I&#8217;ll get into the specifics of the project in some other post, but a large part of it was using jQuery to create a true dynamic web application. Picking up jQuery does not strictly imply that you pick up JavaScript, but they are rather close enough that you begin to see the majesty and wonder of being able to manipulate the DOM so freely.</p>
<p>This is a trap. I fell for the trap.<span id="more-32"></span></p>
<p>A large part of the web designer&#8217;s job is to translate a mockup of a design from Photoshop or something into HTML/CSS. This means looking for logical divisions of content and thinking about how the box model can help you achieve this layout. When I created the current design, I saw two columns separated by the fake 3D effect and said &#8220;Ah! I will have two columns! One of them will have the repeating background trick and an image each at the top and bottom!&#8221; Easy to think, impossible to implement. First off, the sidebar needs to scale with the content, or the 3D illusion is broken. And thus begins my descent (the highest form of patriotic) into the trap. I turned to JavaScript.</p>
<p>All I need to do is grab the heights of the sidebar and content, find which is bigger, and resize the other! Oh, but I need to take into account the offset. Oh but I need to move that bottom image as well. And after not too long, I&#8217;ve created something that functions. Hooray. Unfortunately, this is a problem for a number of reasons,</p>
<ol>
<li>It is highly inelegant. It&#8217;s overly complicated and the browser should be doing it for me.</li>
<li>The syntax highlighting code breaks it because it takes longer to execute</li>
<li><strong>It can be easily solved in CSS with a little more creativity</strong></li>
</ol>
<p>Look, all that needs to happen is have the content div be the combined width of the current content and sidebar divs, images at the top and bottom (use an inner footer div that clears both and has an image background), and then have the two columns with no image backgrounds just take up however much height they need and let the browser sort it all out. <strong>That&#8217;s what browsers do best.</strong></p>
<p>I got caught up in the shine. I saw what JavaScript could do and was tempted to make bad layout choices by the fact that JavaScript can be used to crutch almost any situation. Learn from this. Think long and hard about each thing you want JavaScript to do. Can it be done no other way? Could you handle it in either the PHP/ASP/Perl/Python or the CSS? Because you should. Here are some things which you can and sometimes should use JavaScript for:</p>
<ol>
<li>Animation. This is a whole can of worms, another post maybe.</li>
<li>AJAX and all that cool web 2.0 stuff</li>
<li>Form validation. Can be used with number 2</li>
</ol>
<p>If it&#8217;s not one of those things, <strong>think again.</strong></p>
<p><em>This post brought to you once again by the <code>&lt;ol&gt;</code> tag.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://discoshiny.com/post/blinded-by-javascript/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Monocle Radio</title>
		<link>http://discoshiny.com/post/monocle-radio</link>
		<comments>http://discoshiny.com/post/monocle-radio#comments</comments>
		<pubDate>Sat, 09 May 2009 15:25:03 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://discoshiny.com/?p=22</guid>
		<description><![CDATA[XHTML/CSS layout PHP MPD class for PHP MySQL for user management Icecast2 streaming server Monocle Radio is a front end to Music Player Daemon, an application for Linux that does exactly what its name implies. The only way to use it is to run a front end, such as Monocle Radio. SourceForge Page In my [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_23" class="wp-caption alignleft" style="width: 160px"><a href="http://discoshiny.com/wp-content/uploads/2009/05/monocle-screenshot.png"><img class="size-thumbnail wp-image-23" title="Monocle Radio Screenshot" src="http://discoshiny.com/wp-content/uploads/2009/05/monocle-screenshot-150x150.png" alt="Monocle Radio" width="150" height="150" /></a><p class="wp-caption-text">Monocle Radio</p></div>
<ul class="projectTech">
<li>XHTML/CSS layout</li>
<li>PHP</li>
<li><a href="http://mpd.24oz.com/" target="_blank">MPD class for PHP</a></li>
<li>MySQL for user management</li>
<li>Icecast2 streaming server</li>
</ul>
<p>Monocle Radio is a front end to <a href="http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki" target="_blank">Music Player Daemon</a>, an application for Linux that does exactly what its name implies. The only way to use it is to run a front end, such as Monocle Radio.</p>
<p><a href="http://sourceforge.net/projects/monoradio" target="_blank">SourceForge Page</a></p>
<p><span id="more-22"></span></p>
<p>In my freshman year of college I had an old computer I used as a server. I kept some backups on it as well as my music. I wanted to be able to listen to my music even when I was not in my room, so I decided to set up a streaming solution.</p>
<p>I looked into available solutions and at the time all the software I could find was either incomplete or too complete. My server was not powerful enough to handle <a href="http://ampache.org/" target="_blank">Ampache</a>, for instance. It was for this reason that I decided to make a web-based interface to suit my needs. I wanted something no-nonsense and responsive, even on my aging Pentium 2 box.</p>
<p>My roommate and a couple other people I know wanted to be able to listen as well and have control when I wasn&#8217;t using it, so I implemented a multi-user system. It was not very secure and focused more on getting the job done. It required users to be logged in to change the playlist or control the playback, but anyone could listen.</p>
<p>At its completion, Monocle Radio fulfilled my needs. I released a couple bug-fixing releases, but have since ceased development. I no longer maintain a server for my music due to bandwidth and power constraints. Also the old server was 2.5 feet tall and weighed well around 40lbs, an impractical machine at best.</p>
]]></content:encoded>
			<wfw:commentRss>http://discoshiny.com/post/monocle-radio/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on Cross-Browser Coding</title>
		<link>http://discoshiny.com/post/thoughts-on-cross-browser-coding</link>
		<comments>http://discoshiny.com/post/thoughts-on-cross-browser-coding#comments</comments>
		<pubDate>Fri, 08 May 2009 16:37:30 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://discoshiny.com/?p=10</guid>
		<description><![CDATA[I&#8217;ve met some people who hold low opinions of IE. Scratch that, I&#8217;ve met a whole lot of people for whom IE doesn&#8217;t butter their bread. I&#8217;m one of these people. These people tend to be web developers, because IE did a number of unfortunate things for people looking to create websites beyond the very [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve met some people who hold low opinions of IE. Scratch that, I&#8217;ve met a whole lot of people for whom IE doesn&#8217;t butter their bread. I&#8217;m one of these people. These people tend to be web developers, because IE did a number of unfortunate things for people looking to create websites beyond the very baseline. <span id="more-10"></span>There exist a number of &#8220;danger zones,&#8221;</p>
<ul>
<li>Transparent PNG support</li>
<li><span class="code">z-order</span></li>
<li>Rounded corners</li>
<li>Floats and margins</li>
<li>Expanding boxes</li>
</ul>
<p>Okay that&#8217;s all I can think of off the top of my head. The point is though, that none of these things are strictly necessary for a website. It&#8217;s easy enough to create a site that looks pretty much the same in IE5.5+ and the Firefox/Safari/Opera crowd, but if people choose to use a more modern browser, including newer versions of IE, the site will only get shinier.</p>
<p>Point of all this is, the people who don&#8217;t like IE and <em>actively leave out fixes for it</em> are not really professional level yet. Professional level developers neutrally regard or hate every browser equally. Firefox 2 has some weird layout issues, for instance, on sites that look fine in every other browser! CSS 3 support is still handled differently by everyone, each browser supporting a subset. The list continues.</p>
]]></content:encoded>
			<wfw:commentRss>http://discoshiny.com/post/thoughts-on-cross-browser-coding/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
