<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.11.5 (http://www.squarespace.com/) on Sat, 31 Jul 2010 12:44:03 GMT--><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rss="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:cc="http://web.resource.org/cc/"><rss:channel rdf:about="http://www.bitdestroyer.com/journal/"><rss:title>Home</rss:title><rss:link>http://www.bitdestroyer.com/journal/</rss:link><rss:description></rss:description><dc:language>en-US</dc:language><dc:date>2010-07-31T12:44:03Z</dc:date><admin:generatorAgent rdf:resource="http://www.squarespace.com/">Squarespace Site Server v5.11.5 (http://www.squarespace.com/)</admin:generatorAgent><rss:items><rdf:Seq><rdf:li rdf:resource="http://www.bitdestroyer.com/journal/2010/7/26/week-scheduler-jquery-plugin.html"/><rdf:li rdf:resource="http://www.bitdestroyer.com/journal/2010/6/1/two-helpful-tools-for-undergrad-engineering-students.html"/><rdf:li rdf:resource="http://www.bitdestroyer.com/journal/2010/5/26/new-website-mydearauntsallycom.html"/><rdf:li rdf:resource="http://www.bitdestroyer.com/journal/2010/5/19/what-cant-storm-troopers-do.html"/><rdf:li rdf:resource="http://www.bitdestroyer.com/journal/2010/2/18/roomba-drinking-games.html"/><rdf:li rdf:resource="http://www.bitdestroyer.com/journal/2010/1/26/the-importance-of-rumors.html"/><rdf:li rdf:resource="http://www.bitdestroyer.com/journal/2010/1/12/google-3-the-internet.html"/><rdf:li rdf:resource="http://www.bitdestroyer.com/journal/2009/11/14/haikus-for-our-ups-man.html"/><rdf:li rdf:resource="http://www.bitdestroyer.com/journal/2009/11/8/bsod-karaoke.html"/><rdf:li rdf:resource="http://www.bitdestroyer.com/journal/2009/11/5/elegantly-handling-ajax-errors-in-aspnet-mvc-using-jquery.html"/></rdf:Seq></rss:items></rss:channel><rss:item rdf:about="http://www.bitdestroyer.com/journal/2010/7/26/week-scheduler-jquery-plugin.html"><rss:title>Week Scheduler jQuery Plugin</rss:title><rss:link>http://www.bitdestroyer.com/journal/2010/7/26/week-scheduler-jquery-plugin.html</rss:link><dc:creator>James Miller</dc:creator><dc:date>2010-07-26T21:06:43Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>Last week I released my first jQuery plugin, a <a href="http://plugins.jquery.com/project/WeekScheduler">week scheduler</a>. It's a pretty simple control that you've probably seen in many other software projects, especially if you use Outlook or Google Calendar. The only difference between this and many of those other projects (and most of the jQuery plugins out there that are similar) is that I didn't want to associate the days of the week with any dates.</p>
<p>I wanted a generic scheduler, one where I could say something to the effect of "On Tuesdays, Wednesdays, and Fridays establishment X is open from 10:00 AM to 9:00 PM." In the context of the hours of operation of a business, this makes complete sense. The problem was that most of the plugins I used couldn't be de-coupled dates. I also wanted to make it visual so you could the times over that weekly period. It would have been simple enough (and ugly enough, honestly) to simply put a list of days and hours, but I felt this would make it a bit more user friendly.</p>
<p>Hopefully this will help some people out. Feel free to submit any issues to my Github issues page, it's early in development so, as always, let me know if you come across something. My links, let me show you them:</p>
<p style="padding-left: 30px;"><a href="http://www.bitdestroyer.com/projects/#WeekScheduler">Week Scheduler Demo</a></p>
<p style="padding-left: 30px;"><a href="http://plugins.jquery.com/project/WeekScheduler">Week Scheduler jQuery Plugin</a></p>
<p style="padding-left: 30px;"><a href="http://github.com/BitDestroyer/Week-Scheduler">Week Scheduler Github Repository</a></p>
<p style="padding-left: 30px;"><a href="http://wiki.github.com/BitDestroyer/Week-Scheduler/">Week Scheduler Github Documentation</a></p>
<p style="padding-left: 30px;"><a href="http://github.com/BitDestroyer/Week-Scheduler/issues">Week Scheduler Github Issues</a></p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.bitdestroyer.com/journal/2010/6/1/two-helpful-tools-for-undergrad-engineering-students.html"><rss:title>Two helpful tools for undergrad Engineering students</rss:title><rss:link>http://www.bitdestroyer.com/journal/2010/6/1/two-helpful-tools-for-undergrad-engineering-students.html</rss:link><dc:creator>James Miller</dc:creator><dc:date>2010-06-01T18:22:21Z</dc:date><dc:subject>College Learning Help</dc:subject><content:encoded><![CDATA[<p>As an undergrad Engineering student, there are two resources that have come to my aid leaps-and-bounds above other resources. Google, while not included in my list, is a given but the other two have seemed extremely obvious after I've mentioned them to people.</p>
<p>Some of the courses on the Engineering tract, at least with UF, include Calculus 1-3, &nbsp;Chemistry 1 and 2, and Physics 1 and 2. While I haven't begun taking my physics classes yet, the first resource has been extremely helpful with both Chemistry and Calculus. That resource is <a href="http://www.wolframalpha.com" target="_blank">Wolfram Alpha</a>. When Wolfram Alpha first came out, it felt like the population collectively said "that's neat," and then moved on about their day. At first I was blown away by the wealth of data they had amassed and how it could be mashed up on the spot. But alas, after a few hours, I too felt the same way.</p>
<p>As someone who had regularly used the functions built into Google search (such as the calculator, dictionary, unit conversions, etc), Wolfram Alpha expanded that ability ten-fold. It wasn't until I thought to try plugging in an equation in my Calculus class that I truly grasped how powerful the site was. Low-and-behold, not only did it solve the problem for me, but it provided a detailed step-by-step guide as to how it arrived at that answer. It also provided the Calculus identities that we Engineering students oh-so-often forget in our calculations, as well as numerous other metrics about that particular equation. I was blown away. Calculus was much easier to grasp after that, not because it was solving equations for me, but because I could see exactly how a question was to be approached. It felt like I had my own professor around to tutor me whenever I needed it.</p>
<p>Chemistry has been the same way. I've been able to plug in practically any element or compound and glean whatever data I need about it. Being able to naturally ask for metrics about particular elements or equations has been particularly power as well. For example, plugging in "What are the isotopes of Carbon?" yields the three main isotopes that Carbon can be found in. From that information you can then go on to calculate the atomic weight of Carbon (or, you know... simply plug in "What is the atomic weight of carbon?") or gather any other data about it that may be of use.</p>
<p>The second resource that I've used has been more helpful for my Mathematics courses, particularly Calculus. This is also the resource that people <a href="http://www.redstate.com/neil_stevens/files/2009/09/doublefacepalm.jpg" target="_blank">facepalm</a> themselves for not realizing after I mention it. <a href="http://www.youtube.com" target="_blank">Youtube.com</a> is that resource. One might say "Wait wait, how are videos of <a href="http://www.youtube.com/watch?v=vSjX02FIZCk" target="_blank">kittens riding Roomba's</a> going to help me?" Fear not, my friend, for mathematics teachers love to record themselves doing lectures on how to perform almost every type of major mathematics skill. And for this, we thank them. I've been able to look up almost every permutation of Calculus concepts online and find a lecture or instructional video directed at that concept. Once again, I've essentially found a way of providing myself a virtual instructor for when I'm not in class. This resource has been so helpful in fact that when I've had a teacher that was, for lack of a better word, horrible, I've been able to relax knowing that I'll find some decent instructional videos on Youtube. My current Chemistry teacher is a great example of this scenario...</p>
<p>So, while these sites may not be very eye opening (OK, they aren't, I know), you'll be amazed how much you can accomplish with their help. If you're struggling in any technical courses I recommend checking them out to see what they can offer. Especially with Wolfram Alpha, just type in some important keywords about a concept and see what it throws out at you.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.bitdestroyer.com/journal/2010/5/26/new-website-mydearauntsallycom.html"><rss:title>New Website! MyDearAuntSally.com!</rss:title><rss:link>http://www.bitdestroyer.com/journal/2010/5/26/new-website-mydearauntsallycom.html</rss:link><dc:creator>James Miller</dc:creator><dc:date>2010-05-27T03:20:32Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>Today I formally launched a new site titled&nbsp;<a class="offsite-link-inline" href="http://www.mydearauntsally.com/" target="_blank">MyDearAuntSally.com</a>. The premise is simple, a place where mnemonic devices can live. I'm always using mnemonic devices to remember things for my college courses so I thought why not make a place where people can share their own? And that's exactly what I did.&nbsp;The site may not be anything fancy visually but it gets right to the point functionally. I designed it with Wikipedia in mind, allowing people to add and edit entries on the fly.</p>
<p>For any of you techies out there, it was written using ASP.NET MVC2. I've gotta say that I drank the ASP.NET MVC Kool-Aid and it tasted delicious.</p>
<p>So if you've got a second, feel free to browse over to <a class="offsite-link-inline" href="http://www.mydearauntsally.com/" target="_blank">MyDearAuntSally.com</a> and add any mnemonic devices you use.</p>
<p>I've also got another project I'm going to be starting that isn't quite as small as this one but is definitely more entertaining. More news to come!</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.bitdestroyer.com/journal/2010/5/19/what-cant-storm-troopers-do.html"><rss:title>What can't Storm Troopers do?</rss:title><rss:link>http://www.bitdestroyer.com/journal/2010/5/19/what-cant-storm-troopers-do.html</rss:link><dc:creator>James Miller</dc:creator><dc:date>2010-05-19T16:21:05Z</dc:date><dc:subject>Comedy Science Fiction Video</dc:subject><content:encoded><![CDATA[<p>Besides protect thermal exhaust ports. And accurately shoot a target. Ok  ok, I get it... At least they can dance.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/t7X9MQi7uOU&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/t7X9MQi7uOU&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.bitdestroyer.com/journal/2010/2/18/roomba-drinking-games.html"><rss:title>Roomba Drinking Games</rss:title><rss:link>http://www.bitdestroyer.com/journal/2010/2/18/roomba-drinking-games.html</rss:link><dc:creator>James Miller</dc:creator><dc:date>2010-02-18T18:57:07Z</dc:date><dc:subject>Drinking Roomba Gaming Technology</dc:subject><content:encoded><![CDATA[<p><strong><span class="full-image-float-right ssNonEditable"><span><img src="http://www.bitdestroyer.com/storage/Roomba-Guinness.png?__SQUARESPACE_CACHEVERSION=1266523064809" alt="" /></span></span></strong>We purchased our first iRobot Roomba the other day. I have to say  it's one of the coolest , and most useful, things I've ever bought.  Watching it pinball around our apartment vacuuming, and doing a damn  good job of it, is extremely entertaining. It makes you realize exactly  how far technology has truly come. All of this begs at one serious  question... <strong>how can we utilize this beautiful piece of  technology to get us inebriated</strong><strong>?</strong></p>
<p><strong><br /></strong></p>
<p>I've come up with a couple to start off, post yours in the comments  and I'll update the list with the good ones. Also, if you have any recommened names for games that are already posted, let me know. All drinking games should have catchy names. I take no responsibility for any damage to your Roomba or yourself, play and drink at your own risk!</p>
<p>&nbsp;</p>
<ol>
<li><strong>Spin the Robot</strong><br /><br /><strong>Basic Premise:</strong> Everyone sits/stands in a circle with the Roomba in the center and enough space between people for the Roomba to escape. Whomever the Roomba bounces off of must drink. If the Roomba escapes the circle, everyone drinks. If the Roomba escapes, he is put back into the center of the circle and the cycle starts again.<br /><br /><strong>Notes:</strong> You will need some way of randomizing what direction the Roomba faces (or where everyone is sitting/standing) since it generally travels in a straight line after being turned on. One way of doing this would be for everyone to stand in a circle and roll a pair of dice. Whatever they roll is the number of people to their left or right that they move. Also note that some Roomba's may begin with a circular pattern, in which case this isn't needed.<br /><br /></li>
<li><strong>Plinko</strong><br /><br /><strong>Basic Premise:</strong> Everyone randomly picks a position in a group with a few feet between them for the Roomba to travel. Once everyone has their places, they can not move. The Roomba is placed at the front of the group by a designated person and turned on. The Roomba will travel towards to group of people bouncing off whatever it hits. Each person it hits must drink. If the Roomba attempts to "wall follow" (or bounce around their feet to find out where the particular obstruction ends), they must finish their drink. The person who lets the Roomba loose should try their best to get the Roomba to hit its first target inside fhe group of people to keep the Roomba from hitting the first person, changing direction and going away from everyone.<br /><br /><strong>Notes:</strong> Once again, you will need a way of deciding who will place the Roomba and let it loose.<br /><br /></li>
<li><strong>Musical Robots</strong><br /><br /><strong>Basic Premise:</strong> This is a variation of Spin the Robot except everyone stands in a tight circle with no room for the Roomba to escape. Whoever the Roomba hits as it makes its way around the circle is removed from the circle. After someone is removed, everyone should move in tighter to prevent the Roomba from escaping the circle. Because it is hard for the last couple people to create a circle that will contain the Roomba (he's crazy, after all), you can either enter some kind of elimination mode or... everyone can drink. Your pick. Either way you get inebriated.<br /><br /><strong>Notes:</strong> As always, you will need to randomize the orientation of the players.<br /><br /></li>
</ol>
<p>Now give me your suggestions. I know these are basic, but I'm sure you imaginative people will come up with some better ones.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.bitdestroyer.com/journal/2010/1/26/the-importance-of-rumors.html"><rss:title>The Importance of Rumors</rss:title><rss:link>http://www.bitdestroyer.com/journal/2010/1/26/the-importance-of-rumors.html</rss:link><dc:creator>James Miller</dc:creator><dc:date>2010-01-26T14:33:55Z</dc:date><dc:subject>Rumors Innovation Technology</dc:subject><content:encoded><![CDATA[<p>Over the past few months, as Apple Tablet rumors and speculation have heated to a feverish pitch, I've noticed two trends that really caught my eye, first during the coverage of CES. The first trend is a combination of many factors that have caused an interesting response from people who are excited about the potential for a tablet computer.</p>
<p>I've observed, in listening to interviews and even in my own excitement about the devices potential, that many people have risen the idea of a tablet computer from Apple into an almost god-like symbol that solves all of their computing problems. This is, more or less (probably more), a result of the track record Apple has had in recent history regarding the success of it's products, putting Apple devices on a plateau of excellence that few companies have succeeded in achieving. People expect Apple products to fill a gap in their life in an elegant, efficient, and beautiful way.</p>
<p>I don't claim to be any exception from this rule, I have my visions of gradeur about the device as well. I personally feel that one aspect of the device that some people have not taken into consideration is one of the key demographics that Apple is most popular with: college students. The speculation that Apple's tablet will attack the Ebook market, much as it did the music market, brings up the potential for the Apple tablet to become a successor for college students who purchase Macbooks. Think of having all of your textbooks and notes on an elegant and light device... I'd buy that for a dollar.</p>
<p>And this is exactly what I'm talking about. As I am currently a student (and gadget whore, there, I said it...) with a desire to streamline the process of attending school and managing all of the information contained therein, I've imbued the tablet with all of the traits that I see as being useful to me. I've seen countless people from all interests do the same thing. Obviously we can't expect it to solve everyones problems. Hell, to be completely honest, we <a href="http://www.penny-arcade.com/comic/2010/1/22/">don't even know what <em>it</em> is</a> but I think that this explosion of theoretical thinking regarding what problems this device can solve for people is ultimately a very important thing, which brings me to my second observation.</p>
<p>Anyone who followed the coverage at CES will have certainly noticed that many device makers were preempting Apple's tablet release. Some were even brazen enough to name their devices after a few of its rumored names. While many of the devices will fade into the ether without ever hitting the shelves, I do honestly believe that the interest people have taken in crafting devices in their minds-eye that will solve whatever problems they have will ultimately drive innovation. We've already seen a slew of innovative devices that have tried to solve each of those problems, such as the Lenovo U1 and the plethora of third-party Ebook readers, each with their own unique take on the direction of the device.</p>
<p>All things considered, I find it particularly interesting that when rumors of an anticipated device begin to fly, especially with the fervor that accompanies any Apple announcement, average people begin to dream up devices that solve their problems and ultimately begin to drive the industry in a new direction by thinking differently. Even if Apple doesn't announce a tablet device, a mark has been made that there is an opportunity for someone to produce a device that solves these problems.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.bitdestroyer.com/journal/2010/1/12/google-3-the-internet.html"><rss:title>Google &lt;3 The Internet</rss:title><rss:link>http://www.bitdestroyer.com/journal/2010/1/12/google-3-the-internet.html</rss:link><dc:creator>James Miller</dc:creator><dc:date>2010-01-13T03:20:04Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>If you haven't read <a href="http://googleblog.blogspot.com/2010/01/new-approach-to-china.html">this recent post</a> on the Official Google Blog, I recommend you give it a once-over. Wait, no, give it a twice-over. Really let it sink in.</p>
<p>We all have that fear in the back of our mind about trusting Google with so much of our information but so far they've done a great job of sticking to their "do no evil" motto. I must say though, this recent move by Google has made me at least slightly more hopeful that their motto is sincere and that they will stick to it as they continue to change the web and our lives.</p>
<p>I have no statistics about the type of penetration Google has in the Chinese market since it appears that they already censor Google Apps like Gmail and Google Docs but what kind of impact do you think pulling out of China would have? Are we about to see firsthand the power of information used to strong-arm a government into complying with a policy of openness? I seriously doubt the last part, but it will be interesting to see how the Chinese government and it's people react to this momentous change.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.bitdestroyer.com/journal/2009/11/14/haikus-for-our-ups-man.html"><rss:title>Haikus for Our UPS Man</rss:title><rss:link>http://www.bitdestroyer.com/journal/2009/11/14/haikus-for-our-ups-man.html</rss:link><dc:creator>James Miller</dc:creator><dc:date>2009-11-14T07:23:10Z</dc:date><dc:subject>Haiku Literature</dc:subject><content:encoded><![CDATA[<p>In order to persuade our UPS man to leave a package I was expecting, Teya wrote him a few haikus. In the end he left the package and took the haikus.</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://www.bitdestroyer.com/storage/post-images/Haiku.jpg?__SQUARESPACE_CACHEVERSION=1258183596915" alt="" /></span></span></p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.bitdestroyer.com/journal/2009/11/8/bsod-karaoke.html"><rss:title>BSOD Karaoke</rss:title><rss:link>http://www.bitdestroyer.com/journal/2009/11/8/bsod-karaoke.html</rss:link><dc:creator>James Miller</dc:creator><dc:date>2009-11-09T03:37:20Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>Follow the bouncy... erm... memory address?</p>
<p>&nbsp;</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://www.bitdestroyer.com/storage/post-images/BSOD.jpg?__SQUARESPACE_CACHEVERSION=1257737898023" alt="" /></span></span></p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.bitdestroyer.com/journal/2009/11/5/elegantly-handling-ajax-errors-in-aspnet-mvc-using-jquery.html"><rss:title>Elegantly Handling AJAX Errors in ASP.NET MVC using jQuery</rss:title><rss:link>http://www.bitdestroyer.com/journal/2009/11/5/elegantly-handling-ajax-errors-in-aspnet-mvc-using-jquery.html</rss:link><dc:creator>James Miller</dc:creator><dc:date>2009-11-05T05:53:03Z</dc:date><dc:subject>ASP.NET MVC Error Handling Programming jQuery</dc:subject><content:encoded><![CDATA[<p>One issue I've always struggled with when using AJAX is how to handle server side errors. I would usually wind up writing a bunch of code that would return some type of response code to indicate what happened on the server. As you can imagine this is incredibly tedious, messy, and horrific to maintain. Tonight as I was working on a project I came up with an elegant way of handling such scenarios that I thought I would share.</p>

<p>To begin, I always inherit all of my controllers from a custom base controller class. Within that base controller I added a method and event, shown below:</p>

<pre><code>protected JsonResult AJAXError(string message)
{
    if (String.IsNullOrEmpty(message))
        message = "Oops! Something went wrong while processing your request.";

    Response.StatusCode = 500;

    return Json(new { ErrorMessage = message });
}

protected override void OnException(ExceptionContext filterContext)
{
    if (Request.IsAjaxRequest())
    {
        filterContext.Result            = AJAXError(filterContext.Exception.Message);
        filterContext.ExceptionHandled  = true;
    }

    base.OnException(filterContext);
}
</code></pre>

<p>The OnException event catches any exceptions that are thrown during the execution of controller actions. Within this event, we first check to see if the exception occurred during an AJAX request. If so, we set the result to the return value of our AJAXError method. The AJAXError method only does two things, it sets the StatusCode to 500 (Internal Error) so that the AJAX request shows itself to be an error and returns a JSON object with an ErrorMessage property that contains the current error. </p>

<p>Something else to keep in mind is that often times when a site is public, you won't want all of the details of the error being published to the user. This opens up a potential security risk if critical information is leaked out via errors. In my code (not shown above), I account for checking to see if the site is in production use or in debug and if so change the error message to a default error. This will prevent unwanted information from leaking out.</p>

<p>Onward!</p>

<p>The second part of the solution comes with the help of jQuery's global ajaxError event. Within a client-side javascript include, I have the following code:</p>

<pre><code>$(document).ready(function() {

    $(document).ajaxError(function(event, XMLHttpRequest, ajaxOptions, thrownError) {
        var result = $.secureEvalJSON(XMLHttpRequest.responseText);
        ShowDialog(result.ErrorMessage, "Oops! There was an error.");
    });

});
</code></pre>

<p>jQuery provides the ajaxError event as a means to catch any errors that are fired from all AJAX requests on a page. Remember the JSON object we return from the server-side AJAXError method? It winds up in the XMLHttpRequest.responseText property as a JSON string. To make things easier, we need to convert that JSON string to a JSON object. Some people will suggest using the eval method to do this but I would urge strongly against that. Doing this could potentially allow an attacker to execute client-side code.</p>

<p>After a bit of research, I opted to use the jquery-json plugin (<a href="http://code.google.com/p/jquery-json/" target="_blank">found here</a>) to handle the conversion. The jquery-json library provides us with the $.secureEvalJSON method, allowing us to translate that JSON string into a JSON object. </p>

<p>Calling result.ErrorMessage will now give you the message that was set on the server side, allowing you to alert the user about the issue. The ShowDialog function above is simply a method I put together to display a jQuery Dialog Box rather than a plain alert.</p>

<p>I'm pretty happy with this solution because not only does it catch any unexpected exceptions on the server-side, but you can use the AJAXError method to return an error when doing data validation. For example, here is some code from one of my actions:</p>

<pre><code>    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult UpdateUserDetails(FormCollection collection)
    {
        Contract.Requires(!String.IsNullOrEmpty(collection["username"]));

        var profile                 = this.Users.GetUserProfile(collection["username"]);

        if (profile == null)
            return AJAXError("There was an issue updating user details. The users profile could not be found.");

        /* Do some stuff... */

        profile.Save();

        return new EmptyResult();
    }
</code></pre>

<p>If the users profile can not be found, we just return an AJAXError with the error details and that gets reflected on the client-side automagically.</p>
]]></content:encoded></rss:item></rdf:RDF>