Archive for March, 2008

Saving Bytes: Efficient Data Storage (MySQL) - Part 1

Hey there! Welcome to Making the Web - my personal blog about website development. Feel free to subscribe to my RSS feed to keep up with the latest. Alternatively, subscribe by email. Hope you enjoy this article!

When storing data in databases, it is important to ensure the data is stored using a minimal amount of space, while retaining its value and processing efficiency.

There are many common practices amongst MySQL developers who write applications which store data in a human-interpretable way; they often don't think about the computer's interpretation of the data, and often fail to realise that it can be more efficient and space-saving to store data in a certain form.

It is especially important to consider data storage techniques in high-demand applications, and where speed and storage-efficiency are key values. Web services require these key values: it is important that they can cope with extra demand, and can satisfy their user's desire for immediacy.

MySQL DataTypes
(Screenshot from phpMyAdmin)

In the first part of Saving Bytes: Efficient Data Storage, we will look at the storage of strings.

__('Read the rest of this entry »')

Comments (3)

JavaScript error reporting: DamnIT

Creating compatible and portable Javascript scripts can be extremely hard. We, as developers, can test our scripts in as many browsers as we want, but, there always seems to be problems.

Now, when an error occurs, what usually happens? The browser shows a little yellow symbol in the bottom-left corner of the screen (in IE at least - I might as well use it as a good example: it is the most popular browser). The visitor will usually just ignore the error for two reasons:

  1. They don't know what the error means most of the time, unless they are Javascripters themselves; and
  2. They don't really care about your site and the errors - why should they?

Because they ignore them, and you have no idea they exist, bugs in your applications may go unnoticed for weeks, or even months. And, all the time your application is not functioning as expected, visitors are seeing your service as unprofessional and will simply go to your competitors.

But, thankfully, there is a way to catch and fix these errors. A new service called DamnIT will send you emails whenever there is a problem on the client-side. Here's an example message:

DamnIt

One thing that the service could be used for is client-side error detection and reporting during BETA tests.

Here are some great benefits of the service:

  • It allows the user to enter some details about the error, and what they did before the error;
  • It can be incorporated in to JavaScriptMVC easily; and
  • Error messages are very informative - they contain browser details, user's description and the error's line number

There is also another great benefit of DamnIT. That is its error management section. This section lists the most recent errors, and the most common - so you can prioritize. It will even categorize by browser:

DamnIT - My Errors

To use DamnIT is simple - you don't have to touch any of your existing script. All you have to do is put this code on to your page:

<script type='text/javascript'
src='https://damnit.jupiterit.com/damnit.js?_KEY_'></script>

And it is as simple as that - after obtaining your key, you will automatically receive error details by email within a few seconds.

DamnIT Demo

Comments

Making the Web | Chalvedon School and Sixth Form College | Messenger History | GCSE(WIKI): Simple bitesize revision for secondary school, KS4 students. | Encrypt files for free - high-grade encryption
Who's Populating The Web?