You are currently only viewing entries by the user Carl Turner.

To view the other authors active here, click here, or to go back to view all items, click here.

Sunday, 25 March 2007

Gotcha

CAPTCHA & The Turing Test # Permalink C Comment

Even the most casual user of the internet is familiar with the irritating moment at which a website asks you to "Type in the characters in this image" - surely it knows what they are?!

The slightly more advanced surfer is acquainted with the reason why, too - the point is that computers can't read images! And, if you don't want spammers using automated programs to send thousands of comments/applications/requests to your website every day, you need to ensure that the end-user is an actual human. This is akin to the, in some circles well-known, concept known as the Turing Test.

The Turing Test is a test of a machine's capability to react in the same way as a human to stimuli. The classic example, often cited in relation to this matter, is of the game in which a person and a computer both respond to the same question, and another person attempts to discern which is which, given that they are both trying to impersonate the other. A computer which can succeed in convincing a person that it is human is said to have passed this test.

This particular test is orientated towards textual responses to textual questions; however, the concept of the CAPTCHA (NB: the term is ™ Carnegie Mellon University, so don't go using it everywhere :D) deals with a substantially separate issue.

The difference is twofold.

Obviously, the aspect of the human mind which is being tested for is no longer the ability to respond to a series of generic letters - it is to identify the shape of letters concealed within an image - i.e. from a set of coloured pixels. This task is of a significantly different nature.

Also, the entity (thing, person, computer etc.) which is performing the test is not a human playing the game, but a computer - the server. Therefore, the CAPTCHA-style tested is comprised of a computer trying to identify whether the entity it is communicating with is a human or a computer. This means that the test must have a firm logical grounding, in practice.

The general method for using CAPTCHA-style tests follows a structure similar to the following:

  1. Receive new connection
  2. Make some note of a detail which identifies it (such as PHP session ID, or IP address)
  3. Generate the string (i.e. piece of text) to be disguised
  4. Record it along with the identifying information
  5. Write the text to an image, applying distortions and so on
  6. Send the image to the user
  7. Wait for a reply
  8. Test if the response matches with the recorded string, and act accordingly

I've chosen to use the most common platform for this - a PHP script with the GD library. However, I have chosen to write my own script to generate the images... it's not very good. Have a look at the commenting page for some idea of how very bad they are :D

Anyway, I think that this will make a good front line against spammers (especially seeing as the comments must be approved anyway) seeing as it is a unique format, with even the image format being randomised. Shortly, as I do say on the commenting page, I will soon make it possible to register. Then, after the account is approved, no more verification images or moderation delays! Obviously, the registering system will be abused, but I can then ban accounts, and make the registering process tedious for the liar.

That's all folks! Why don't you comment me?

Posted by carl at 04:00

Saturday, 17 March 2007

Aesthetics 101

Organising a web page elegantly # Permalink C Comment

It's difficult to say what 'looks good' on a web page. There's no shortage of CSS tutorials, kits, and, of course, examples - but how does one actually construct one? This is my first real website, and I'm not exactly 'mature' (lol).

My Background

I'm a fan of the white background. It's a damn sight cleaner visually speaking, and hence a lot easier to read. The orange colour scheme originates in Seth Godin's blog, which is currently 9th in the Google search for "blog". :drops jaw: It's both lively and quite warm, IMHO.

And my much loved clean white colour complements it nicely - the slightly shaded in side panel (#FAFAFA) makes sure you remain interested in the primary material, as you don't get so easily distracted by another empty white space. The eye seems to gravitate towards white space.

An accompanying design-related observation is that large line-spacing is essential for good readability. Admittedly, my site is currently still very much in development - but I think (read: hope) you'll find it easy on the eye! The large grey space won't be such an issue in weeks to come, since, after adding the commenting facility to this blog/journal, I will definitely be creating an automated side-bar which fills with appropriate links and information. That hideous breadcrumb which is to be found at the top right if you visit an article (such as this one) will probably be moved over there too; I do think it's best to have one somewhere though, since the ability to jump by category is often very useful. I do wonder if Wikipedia would benefit from a breadcrumb which tracks your history of visited pages.

Font

I've switched from Georgia to the general sans-serif font. Everybody else uses it, so it appeals to the viewer's sense of continuity, and, of course, it's highly readable. I have heard it said that Georgia is highly readable on the screen, and will readily agree too - except where mathematics, equations and symbols are concerned.

My page on Euler's Identity looked horrific with Georgia, and all those little serifs. And trying to following the hierarchy of brackets just gave you headaches. Admittedly, they're still not classic examples of clarity, but they're better - trust me. I'll eventually install LaTeX, but that's still just another good intention. It's a remarkably good project, though, it must be said.

Anyway, everything's still evolving. Next generation: comments.

Posted by carl at 04:00

Filed under: Style

Saturday, 3 March 2007

Redecorating

The latest update to site design # Permalink C Comment

Okay, I admit it, I left the site unchanged for a long while.

Unforgivable.

But, now I've changed the main CSS style, I feel that I can start to develop the site's content. I'm also planning some restructuring work.

I spent this morning fixing up couple of CMS flaws. Firstly, curiously, different versions of MySQL seem to treat the timestamp type in different ways. I was getting the A non well formed numeric value encountered error at the point that my PHP script retrieved the value of such a field, when it was retrieved raw - but only on my local machine. Admittedly, my test platform and release platform should have the same versions, but I'm running Windows locally, not a version of Linux (I know, how could I?).

Anyway, it turns out that the Linux version has timestamp values returned as Unix timestamps, but the Windows version receives the textual representation. Solution? The UNIX_TIMESTAMP() function, a MySQL function which converts a column which would normally give textual representation into a Unix timestamp. Simple enough.

Now I use SELECT *,UNIX_TIMESTAMP(timestamp), so that the timestamp is returned in two ways. Then, test if UNIX_TIMESTAMP(timestamp) is 0. If it is, use the first value of timestamp. Otherwise, use UNIX_TIMESTAMP(timestamp). And then you're left with a normal Unix-style timestamp (seconds since '1970-01-01 00:00:00' UTC).

Anyway, that's fixed for now. Next project: revamp the site structure. The home page will become this blog - that's my first objective.

Posted by carl at 05:00

Filed under: Style

Thursday, 18 January 2007

Getting Somewhere

Me being frustrated # Permalink C Comment

You wouldn't know that I'd built a site from scratch.

I'm getting frustrated at the lack of actual progress I'm making; i.e. it's like I'm not actually getting anywhere. With anything. And I'm the 'genius' here, lol. Never listen to anything that teachers say(!)

I'm setting up blog rotation at the moment. This is a distraction. But soon you'll be able to view my blog posts like reading a bog-roll. An amusing image, but the blog-roll pun has already been made, unfortunately. You see a progression of sections of text, some of which may, unintentionally, be interesting. The "slideshow" which I'll be setting up will be incredibly absorbing - by comparison. A series of commentated images. © me, I think, though the most commonly used CC license may be a nice idea - similarly for the rest of the site. That's an idea used by Colin Hughes over at Project Euler.

Anyway, back to work. Get something done for a change.

UPDATE: I did it! Blogroll here - and on the day I started :O

Posted by carl at 05:00

Saturday, 6 January 2007

On Starting From Scratch

A look at what it's like to make something from absolutely nothing # Permalink C Comment

Hello, World!

It's lovely to finally have a little corner to type into, a textbox of my own. And now, I have the pleasure of taking out my new toy for the very first time...

Craftsmanship

I've put quite a lot of time and effort into all this business.

The XHTML, CSS and the JavaScript is all customized, as is the PHP and MySQL structure (have a look over here for information), and I've done it with real care. Even the Admin bit which is online is valid XHTML! I believe that you should do things well if you're gonna be stuck with them for a while.

It was an old idea of mine, making a website (a couple of years old, maybe?) - I wasn't really serious until I downloaded Apache and PHP and MySQL onto my desktop, and started seeing what you could really do. And expression has always been quite important to me.

My first hypothetical site was RandomIdea.com (I'll get around to putting up a little archive, I expect); it had a Greek theme, curiously. ΡΙ. But that was a hope soon crushed, by the vicious habit of whois engines registering domains that are checked for availability. >.< That's infuriatingly cynical. Having successfully avoided setting myself up for a dodgy porn site ("nitebyte.com"... you know who you are!), I came to "suchideas.com" - easy to type, easy to remember, and blissfully short!

I'm glad I decided to build everything from the bottom up now. It's so much fun! I began with style, the "Formal Blue" look for the site main (I'm going to change my styles though, sometime), and then added the "Lively Red" version. All the while checking validity!

And then came the PHP - and the dreaded Apache RewriteRules. They look like swear-words, censored by text editors everywhere for the benefit of the sensitive user.

And I was eventually left with a backend which I'm calling "Expression" at the moment. I'm thinking of GNU'ing it; it's not greatly efficient or anything, but I reckon it's an ideal framework for constructing a site with multiple sections.

Interested? Maybe, some time soon, you'll be able to tell me!

Over and out.

Posted by carl at 05:00

Journal by Carl Turner

All entries by user Carl Turner

Simple diagrams for LaTeX with Inkscape • 1.7.2013 Yesterday I discovered how to make nice, simple, elegant diagrams for fairly painless inclusion… [read more - comment]No Data Connection (Android) • 4.6.2013 Just spent an age dealing with a phone (Samsung Galaxy S2, I9100, on the UK network 3) running a… [read more - comment]Android/BusyBox Segmentation Faults • 30.9.2012 Just had a terrifying moment when, after attempting to install BusyBox on an Android device,… [read more - comment]Temporarily Redefining In-built Mathematica Functions • 16.7.2012 Suppose a package you're using is, say, zealously Simplifying lots of Mathematica expressions… [read more - comment]Nuclear Power • 24.7.2011 I've never known the answers to the big questions about energy. I do know that with … [read more - comment]
top / xhtml / css
© Carl Turner 2008-2017
design & engine by suchideas / hosted by xenSmart