<?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>Chapter 42 &#187; application</title>
	<atom:link href="http://chapter42.whitewhale.net/tag/application/feed/" rel="self" type="application/rss+xml" />
	<link>http://chapter42.whitewhale.net</link>
	<description></description>
	<lastBuildDate>Thu, 30 Sep 2010 17:20:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Uncommon Application, Part I:  The personal touch</title>
		<link>http://chapter42.whitewhale.net/2008/11/22/the-uncommon-application/</link>
		<comments>http://chapter42.whitewhale.net/2008/11/22/the-uncommon-application/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 20:51:22 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Strategy]]></category>
		<category><![CDATA[admissions]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[the uncommon application]]></category>
		<category><![CDATA[whitewhale]]></category>

		<guid isPermaLink="false">http://chapter42.whaleblogs.net/?p=138</guid>
		<description><![CDATA[I have made no secret of the fact that White Whale would jump at the chance to develop a customized college admission application.
More and more of our clients are moving to the Common Application— in most cases that&#8217;s because homegrown applications tend to be unwieldy and hard to manage, and it&#8217;s easy to see how [...]]]></description>
			<content:encoded><![CDATA[<p>I have made no secret of the fact that White Whale would jump at the chance to develop a customized college admission application.</p>
<p>More and more of our clients are moving to the <a title="Common Application" href="https://www.commonapp.org/" target="_blank">Common Application</a>— in most cases that&#8217;s because homegrown applications tend to be unwieldy and hard to manage, and it&#8217;s easy to see how tempting it&#8217;d be to outsource that whole process— information gathering, account creation, payment collection, reporting, security, etc.— to a third party.  I don&#8217;t know if the Common App is a publicly held company, but I wouldn&#8217;t say no to a gift of stock options if they were.</p>
<p>However.  Although the Common App is certainly a convenient way to manage the process of college admission, doesn&#8217;t it feel like a missed opportunity?</p>
<p>The process of applying to college is an anxious, scary time, as anyone who&#8217;s ever done it can attest.  With a very few exceptions, nobody&#8217;s going to be accepted everywhere they apply.  So in applying, you know you&#8217;ll be rejected somewhere, and the kind of self-revelation required in a good college application adds a fear of exposure to the process.   (At least that&#8217;s what it was like for me.)</p>
<p>If that&#8217;s the case, it seems that a college or university could do a great deal to alleviate this anxiety— and build a relationship with the prospective student— by presenting her with a thoughtful, friendly, easy to use, customized, streamlined and responsive, online application.</p>
<p>The first step in applying using the Common App looks like this:</p>
<p><a href="http://www.whitewhale.net/wordpress/wp-content/uploads/2008/11/picture-3.png"><img class="size-full wp-image-139" title="Common App opening screen" src="http://www.whitewhale.net/wordpress/wp-content/uploads/2008/11/picture-3.png" alt="Common App opening screen" width="500" height="386" /></a></p>
<p>Wouldn&#8217;t it be better if the first page started like this?</p>
<blockquote><p><strong>Hi.</strong></p>
<p><strong>It&#8217;s great that you&#8217;re applying to Middlebury.  Our applicant pool always includes an incredibly diverse group of interesting and thoughtful young people from around the country and around the world.  The students that join Middlebury next fall will become part of a close-knit academic community; we expect a lot from our students, and we give a lot in return.  In other words, we aren&#8217;t just looking for the best students, we&#8217;re looking for the best neighbors.</strong></p>
<p><strong>We&#8217;re looking forward to reading your application. If you have any questions at all about the process, e-mail John Doe, our online application support counselor, at JohnDoe@middlebury.edu.</strong></p>
<p><strong>To get started, enter your first and last name below.<br />
</strong></p></blockquote>
<p>We know from experience that students choose colleges based on direct connections.  Sometimes it&#8217;s a friend they made touring campus; sometimes it&#8217;s a favorite book by an alumni author; sometimes it&#8217;s a discussion on Facebook.  Sometimes university Web sites include tools that encourage connections as well— for example, Haverford will occasionally let a select group of admits or top prospects create student profiles, and we&#8217;re working on a project for Lewis &amp; Clark that will let prospective students create customized portal pages just like faculty, staff and current students.</p>
<p>The question is, <em>why can&#8217;t that sense of personal contact extend to the application itself? </em> I&#8217;ve suggested some of the most typical reasons why colleges go to the Common App— convenience, security, stability, etc.  These are all fine reasons to outsource the application; there are other reasons too.  It is undeniably more convenient for the *applicant* to only enter their information one time and apply to multiple colleges at once.  Web database development projects done in-house are notoriously hard to maintain over time; this is one reason why schools&#8217; own online applications are often a little clunky.  And there aren&#8217;t many companies that offer customized application development.</p>
<p>(The reason for this last case are clear.  The perfect online application would be the better mousetrap, and it&#8217;s hard to even think about how you&#8217;d build a college application without seeing visions of how the world of higher ed would beat a path to your door.)</p>
<p>But it&#8217;s my belief that when the right school— unsatisfied with the Common App, wanting to create personal contact with applicants, and without the staff or the time to develop an application in house— meets the right Web development vendor, a few steps might be taken toward an online application that will <em>itself</em> do some of the work of recruiting great applicants.</p>
<p>Consider this blog post a want ad; I think we&#8217;re the right company for that job, and if anybody&#8217;s interested in talking about it, <a title="E-mail Jason about this post" href="mailto:jason@whitewhale.net?Subject=The Uncommon Application">let me know</a>.  Over the next several days I&#8217;ll be posting a few more thoughts on this topic— how an application might reach out and speak directly to students, building connections in the process.  If anyone else has any ideas about what the ideal application might do, please drop me a line.</p>
]]></content:encoded>
			<wfw:commentRss>http://chapter42.whitewhale.net/2008/11/22/the-uncommon-application/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Optimization in PHP</title>
		<link>http://chapter42.whitewhale.net/2008/08/20/optimization-in-php/</link>
		<comments>http://chapter42.whitewhale.net/2008/08/20/optimization-in-php/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 20:10:07 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Behind the scenes]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[livewhale]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[whitewhale]]></category>

		<guid isPermaLink="false">http://chapter42.whaleblogs.net/?p=94</guid>
		<description><![CDATA[Optimization is one of the most enjoyable parts of software design, but unfortunately it does not claim a high percentage of development time. Generally speaking, it is not a task to consider until the time spent is justified, which is often toward the end of the development cycle (but not always!) Still, it is an [...]]]></description>
			<content:encoded><![CDATA[<p>Optimization is one of the most enjoyable parts of software design, but unfortunately it does not claim a high percentage of development time. Generally speaking, it is not a task to consider until the time spent is justified, which is often toward the end of the development cycle (but not always!) Still, it is an important step, especially with products like LiveWhale, which has to perform well under high traffic spikes. I&#8217;ve already talked about general page caching before, but fine-tuning a PHP application for speed when something is not cached is also important. Here are some thoughts on how to do just that.</p>
<p>At the code level, LiveWhale is a framework, which means the same codebase is hit for many different types of requests. The question is then: how to achieve high performance with a codebase that has to perform so many tasks and is therefore code heavy. It makes sense to divide code across a handful of files. The objective here is to only load libraries when you need them. A typical request will only use a tiny percentage of the entire codebase, so there&#8217;s no need to read a great deal of code from the filesystem and eat up RAM per PHP request. Also, with a modular system like LiveWhale, it is not explicitly known what modules exist that will need to be loaded. An important optimization is one where only the first request to the server has to perform logic to determine what to load. The results of this expensive operation are cached, and all subsequent LiveWhale requests enjoy dramatic savings in the module loader.<span id="more-94"></span></p>
<p>A common problem with application frameworks is that they perform two very expensive tasks with every single page load: 1) initializing a session and 2) connecting to a database. Neither of these two should be assumed. In LiveWhale, a session is started only when a component requires it. A database connection only occurs when/if the first query to it is performed. Making your application sufficiently &#8220;smart&#8221; about if and when these initializations take place will also lead to dramatic speed improvements.</p>
<p>Less is more. That means you should optimize out any hit to the file system that you can, or remove extraneous database queries. Also, be wary of OO (object oriented) slowdowns. If something doesn&#8217;t need to be a class, don&#8217;t use one. Remember that calls to an object&#8217;s method are more expensive than global function calls. The same holds true for accessing an object&#8217;s properties. An obvious optimization is done when dealing with data from a foreign server. Such content should be cached as much as possible, so that rapid hits to your site don&#8217;t rely on the performance (or availability) or an external data source. Another tip would be to use error suppression (@) sparingly. This is a known performance hit. There are a number of similar, simple tips available via a quick Google search for &#8220;php optimizations&#8221;, and there are slideshows available from PHP developers on the subject.</p>
<p>Analyze how your code operates. If you have a function that uses a lot of logic (if/then, switch), make sure you understand what the &#8220;common case&#8221; is. In other words, what&#8217;s the most likely condition that function will come across? Then determine if the function&#8217;s logic is conducive to the fastest possible result under the most common case. For example, I had a function that has to intercept a variety of XML structures and handle them in different ways. One particular XML structure (the simplest possible one) was far and away the most common case. Rather than parsing the XML with simplexml_load_string() as I do with all the chunks of XML I receive, I first do a preg_match() to determine if I have the common case. In this situation, I can immediately return a simple result and skip both the parsing of the XML and the lengthy logic that goes with performing operations with it.</p>
<p>Identify &#8220;hot&#8221; functions. Functions that are called many times, often within a loop, should get the most attention in terms of optimization. First, make sure the function should be called at all, as opposed to using inline code, otherwise you needlessly acquire function overhead. Second, move any redundant logic outside of the hot function. Perhaps the check can be performed just once before the hot code is executed. There are also situations where a function can potentially be called repeatedly and end up with the same result. It might make sense to declare a static variable inside the function, to locally cache content generated by the function. On a subsequent call, it can first check the static array to see if a result already exists, and simply return that if so. This sort of fine-grained optimization will only help when there is a significant bottleneck with a particular function, but it can make a huge difference if done wisely.</p>
<p>Lastly, use <a href="http://www.xdebug.org/" target="_blank">XDebug</a>! XDebug is your friend. Among the many things it can do, it will let you profile your PHP code and generate a report about how much time your script is taking overall and within particular functions. Here&#8217;s a mockup of the type of information it provides:</p>
<table border="1" cellspacing="0" cellpadding="4">
<tbody>
<tr>
<td>Function</td>
<td>Line(s)</td>
<td>Calls</td>
<td>Cycles</td>
<td>Time</td>
</tr>
<tr>
<td>LiveWhale-&gt;foo</td>
<td>128</td>
<td>1</td>
<td>1911</td>
<td>38.3%</td>
</tr>
<tr>
<td>LiveWhale-&gt;bar</td>
<td>40</td>
<td>1</td>
<td>854</td>
<td>17.1%</td>
</tr>
<tr>
<td>do_something</td>
<td>41</td>
<td>1</td>
<td>313</td>
<td>6.3%</td>
</tr>
<tr>
<td>do_something_else</td>
<td>218/218/218/218/218/218/218/21 &#8230;</td>
<td>15</td>
<td>252 (17)</td>
<td>5.1%</td>
</tr>
<tr>
<td>do_this</td>
<td>131</td>
<td>1</td>
<td>118</td>
<td>2.4%</td>
</tr>
<tr>
<td>do_that</td>
<td>1</td>
<td>1</td>
<td>72</td>
<td>1.4%</td>
</tr>
<tr>
<td>fast</td>
<td>886</td>
<td>1</td>
<td>58</td>
<td>1.2%</td>
</tr>
<tr>
<td>faster</td>
<td>124</td>
<td>1</td>
<td>47</td>
<td>0.9%</td>
</tr>
</tbody>
</table>
<p>In this example, the function LiveWhale-&gt;foo() clearly takes the majority of the time for this request. At 38.3% of request time for a single call, it is a good candidate for serious analysis. LiveWhale-&gt;bar() is also expensive compared to other operations, and there may be ways to make this function perform better too. The function do_something() takes 6.3% for a single call, on line 41. Another function, do_something_else(), takes nearly the same amount of time but due to the fact that it was called 15 times (at 17 CPU cycles each, so 252 cycles total). Knowing why each function takes the time that it does, and why it might be called so many times, will help you maximize the performance of your application.</p>
<p>Familiarity with what makes PHP code perform well will only lead to the best decisions being made early on, so that XDebug reveals fewer inefficiencies. In the long run, many of these tips become automatic and part of your coding style, but for the best quality, production ready code, a little bit of analysis and thought goes a long way.</p>
]]></content:encoded>
			<wfw:commentRss>http://chapter42.whitewhale.net/2008/08/20/optimization-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

