Roumazeilles.net

Archive for the 'Create a web site' category


Script for 404 random page found

(Thursday, June 14th, 2007)

Some people have been wondering how I did the random selection of 404 page not found messages that are used on this web site.

So, here is the nice little PHP script that I use here to redirect randomly to one of the right pages:

  1.  
  2. <?PHP
  3.         $address_list = array(
  4.                 "/404/404-01.php",
  5.                 "/404/404-02.php",
  6.                 "/404/404-03.php",
  7.                 "/404/404-04.php",
  8.                 "/404/404-05.php",
  9.                 "/404/404-06.php",
  10. /*              "/404/404-07.php",      */
  11.                 "/404/404-08.php",
  12.                 "/404/404-09.php",
  13.                 "/404/404-10.php",
  14.                 "/404/404-11.php",
  15.                 "/404/404-12.php",
  16.                 "/404/404-13.php",
  17.                 "/404/404-14.php",
  18.                 "/404/404-15.php",
  19.                 "/404/404-16.php",
  20.                 "/404/404-17.php",
  21.                 "/404/404-18.php",
  22.                 "/404/404-19.php",
  23.                 "/404/404-20.php",
  24.                 "/404/404-21.php",
  25.                 "/404/404-22.php",
  26.                 "/404/404-23.php",
  27.                 "/404/404-00.php"
  28.         );
  29.         srand((double)microtime()*1000000);
  30.         $randomtopic = rand(0,count($address_list));
  31.         header(‘Location: ‘.$address_list[$randomtopic]);
  32.         exit;
  33. ?>

You can re-use it on your own web site if you want to. It’s free.

Fight SPAM and scan books

(Monday, May 28th, 2007)

It is well known that the human brain has pattern matching capabilities much further advanced than those of the best equivalent software programs. This explains that failure rates of OCR (Optical Character Recognition) program may be as high as 1% (or even 2%) of errors, which is requiring later human proof-reading to ensure a reasonable quality for document scans. But when the document is old, badly printed, or degraded, error rates may climb further into the unusable (even more so when we address the scan of thousands of documents like is done by libraries and cultural institutions all over the world).

On another issue, the SPAM problem on the Internet became a major problem: Prorams try to make believe that they are human beings in order to insert advertisment anywhere a user can write (in the messages of a forum, in the comments of a blog, etc). For some time now, it became common that human users must identify themselves by their capacity to recognize a badly written word. Theoretically, this is a very efficient Turing test allowing to differentiate a human from a machine only by the results of their actions. Practically, the abilities of software programs have become so impressive that SPAM is slowly coming back again through those filters named CAPTCHAs (those images that you must read and copy back in order to be identified and approved for a specific action).

The problem appears to be: create CAPTCHA tremendously difficult for the automated software and, simultaneously, bring human beings to the task of checking scans of documents difficult to read by program.

The solution: reCAPTCHA.

reCAPTCHA - example/exemple

The idea is to provide a CAPTCHA service to thousands of bloggers and forum administrators (WordPress, phpBB, etc.) Users are invited to recognize two words specifically difficult to read (profesional OCR programs failed during scans done by Carnegie Mellon University). The user must recognize them both. One is used to check that this is a human being, the other will fill a database of OCR translations that will be used to deliver even more CAPTCHAs and to improve the quality of a document scanned by Carnegie Mellon. Dual core technology: efficiently fight spammers and deliver millions of human users to improve the scan quality of thousands of ancient documents (without using slave labor).

Example of a difficult to read/scan document:

Example of a really difficult scan (reCAPTCHA)

One of the key advantages is that most pro OCR programs can tell when they fail to recognize a character or a word (when they are not confident enough).

Publish your own book

(Monday, May 7th, 2007)

Print on Demand (POD) has become a very affordable solution for people willing to publish their own books. Previously, you had to convince a publisher to invest in printing hundreds if not thousands of copies of your book; then, you hoped for success and -usually- failed.

Print your own book at:

With Print of Demand, the cost becomes so low that you can actually print one copy for you and one for your mother. Then, you print whenever you find a customer. This is still affordable and it works.

In this context, I wanted to help a friend interested in this and I started looking for a good solution. So, here are my rants and raves about publishing solutions I could find.

Best Print-on-Demand solutions

(more…)

Experiment: Mobile Roumazeilles.net

(Saturday, May 5th, 2007)

I just installed a WordPress plugin to make Roumazeilles.net usable from a mobile phone (WordPress Mobile). If you want to test and tell me about problem, you’ll be thanked.

Display code in WordPress

(Saturday, April 21st, 2007)

WordPress v2.1When, as I do, you want to include some bits and pieces of software code in a WordPress post, it starts to become a serious headache. As a matter of fact, WP has not really been prepared for this and it creates a number of issues. Those I already encountered here:

  • The <?php tend to disappear (unless you start juggling)
  • Some charcaters would not display at all (or badly)
  • The overall presentation is pretty bland if you use <code>

So, I looked for a plugin (nearly everything in WordPress is done by adding on of those marvellous little code gems that can be included in a few seconds into the basic configuration) adapted to this task, easy to install (I don’t want to be stuck with heavy maintenance just for this), easy to use.

Here is the summary of what I checked and my opinion regarding them.
(more…)

Make your favicon easily

(Thursday, April 12th, 2007)

Favicon’s are those little icon files that you place at the root of your web site. They display in Internet Explorer along with your bookmarks, in Opera and Firefox on the address bar near to the address of the site you visit.

Example of a favicon seen under Opera

When you want to produce a favicon for your web site, you probably do not want to loose a lot of time. I selected a small free software that takes a few simple graphics and transforms them in a small icon (it tells you the best choice of size and colors for a true favicon):

Adsen Favicon

Simple and to the point. Exactly what you need in such a case.

Open source/free alternatives

(Tuesday, April 10th, 2007)

I’ve been telling often (too often?) that you should replace your Microsoft Office with the cheap (free!) and powerful OpenOffice desktop suite. But some of my readers wanted to know about other replacement solutions for PC applications running under MS-Windows.

Here are my “Open source alternatives to popular PC software“:

Title / Download Comments
Firefox (from Mozilla) Replacement for Internet Explorer, with easy extension through free plug-ins.
Opera Replacement for Internet Explorer, with faster load times, tabbed-browsing and mouse gestures to replace common menu commands (very handy evolution).
OpenOffice Full-featured replacement for MS-Office.
Pegasus mail Replacement for Outlook and Outlook Express, very security-oriented and very powerful (may be less user-friendly). Exists with extensions for many languages other than English.
Thunderbird (from Mozilla) Replacement for Outlook and Outlook Express, with many more features (incl. SPAM filtering using statistical Bayesian algorithm).
N|vu To replace Adobe DreamWeaver or GoLive! or FrontPage in most of the applications needing to manage a web site.
CD Burner XP Pro In order to burn any CD or DVD without using Nero or EasyCD Pro.

Don’t ask for an alternative to PhotoShop; For me, there is none. Adobe still has an impressively good product.

You can also check the external web site I presented here some weeks ago: The Linux Equivalent project that provides alternatives running under GNU/Linux (about the same list as for Windows, but not always).

YAPB: A photoblog using WordPress

(Monday, March 19th, 2007)

I did not yet have time to evaluate it formally but, on the paper, it seems that YAPB (Yet another photo blog) is a plugin allowing ot easily build a photoblog based upon WordPress (the size of thumbnails is configurable, WordPress themes are still usable, but there is no galery).

One rule: One image, one title, one description.

Worth evaluating. Worth downloading.

Why login?

(Friday, February 9th, 2007)

If you look at the left-hand side menu on this page, you will notice that there is a link to either register yourself (Register) or login (Login). These links are here to give you the ability to identify yourself when your are visiting the Roumazeilles.net web site. It is a two-step process:

  1. Register yourself, for us to know your pseudo and to know how to recognize you
  2. Login, to identify yourself when you are visiting the web site

But what are the advantages for you? There are several of them.

Once you are identified, you can directly send replies or comments to the various posts. Without further ado, you can help other readers with your experience relating to an existing post that you are just reading. Just click on the comment link you will find with each post/article. If you are identified and reading the special page for a post, you will also see a large empty box to type your comments.

When you are identified, you have access to the web site administration (Site Admin). One important possibility here is that you can write a new post/article. It will be submitted for approval and may end in the web site front page, like some other people did. In that case, your name (or pseudo-name) will appear along with the post/article.

If you are worried about providing personal details, don’t. We request only a very limited amount of data. The only compulsory information is a username (or pseudo) that you can choose freely and an email address that is not shown to the visitors. If you indicate a web site address, it will be associated to your username any time it is displayed (isn’t it a nice advertising feature for your own blog?). You will be provided a password that will protect your access rights, and that you can modify later by accessing your account.

Summary of the possible actions (available from the menu)

  • Register to register yourself (and choose you pseudo)
  • Login to identify yourself using your pseudo and password
  • Logout to leave the site
  • Site Admin to submit a new post or modify your account

CSS: Combining styles

(Tuesday, February 6th, 2007)

CSS (Cascading Style Sheets) are a very powerful way to apply styles to an HTML page. It has the advantage of removing most of the formatting (styling) and putting it in a single location. However, in my first tries I tended to create a lot of styles which where very similar one to each other.

For example, I would write:

  1. p {
  2.         margin:0px 10px 5px 10px;
  3.         font-size:13px;
  4.         font-family: Arial, Helv, Helvetica, Geneva, sans-serif;
  5.         color: #000000
  6. }
  7. pre {
  8.         margin:0px 10px 10px 10px;
  9.         font-size:13px;
  10.         color: #000000
  11. }
  12. ol {
  13.         font-size:13px;
  14.         font-family: Arial, Helv, Helvetica, Geneva, sans-serif;
  15.         color: #000000;
  16. }
  17. ul {
  18.         font-size:13px;
  19.         font-family: Arial, Helv, Helvetica, Geneva, sans-serif;
  20.         color: #000000;
  21. }

I wanted to improve and optimize all this. It took me several steps to get it. The first (nearly obvious one since it is described clearly in all CSS tutorials and books) was to group exactly identical styles (like ul and ol, in my example), leading to the following:

  1. p {
  2.         margin:0px 10px 5px 10px;
  3.         font-size:13px;
  4.         font-family: Arial, Helv, Helvetica, Geneva, sans-serif;
  5.         color: #000000;
  6. }
  7. pre {
  8.         margin:0px 10px 10px 10px;
  9.         font-size:13px;
  10.         font-family: Courier, "Courier New", monospace;
  11.         color: #000000;
  12. }
  13. ul, ol {
  14.         font-size:13px;
  15.         font-family: Arial, Helv, Helvetica, Geneva, sans-serif;
  16.         color: #000000;
  17. }

No big deal, but it is reducing the amount of redundancy.

After that point, I was left in the dark with trying to group styles which where not exactly identical and so could not obviously be grouped. What I needed was to understand that a style can be defined in separate (additive) declarations, like:

  1. p {
  2.         margin:0px 10px 5px 10px;
  3.         font-family: Arial, Helv, Helvetica, Geneva, sans-serif;
  4. }
  5. p {
  6.         font-size:13px;
  7.         color: #000000;
  8. }
  9. pre {
  10.         margin:0px 10px 10px 10px;
  11.         font-family: Courier, "Courier New", monospace;
  12. }
  13. pre {
  14.         font-size:13px;
  15.         color: #000000;
  16. }

In the spotlight:

Now, it becomes nearly obvious how to combine styles even when they are not fully identical: Group what can be grouped, keep the rest separated.

  1. p, pre {
  2.         font-size:13px;
  3.         color: #000000;
  4. }
  5. p {
  6.         margin:0px 10px 5px 10px;
  7.         font-family: Arial, Helv, Helvetica, Geneva, sans-serif;
  8. }
  9. pre {
  10.         margin:0px 10px 10px 10px;
  11.         font-family: Courier, "Courier New", monospace;
  12. }
The base CSS for my web site is freely readable and you can study it following the link: roumazeillesv5.css

The final code for my example is then:

  1. p, pre, ul, ol {
  2.         font-size:13px;
  3.         color: #000000;
  4. }
  5. p {
  6.         margin:0px 10px 5px 10px;
  7.         font-family: Arial, Helv, Helvetica, Geneva, sans-serif;
  8. }
  9. ul, ol {
  10.         font-family: Arial, Helv, Helvetica, Geneva, sans-serif;
  11. }
  12. pre {
  13.         margin:0px 10px 10px 10px;
  14.         font-family: Courier, "Courier New", monospace;
  15. }

15 lines instead of 21, nearly no redundancy left (none except what I chose to keep for readability); This has been leading to significant simplifications of my style sheets. I hope it will be the case for you too.

Why you want to start your own blog

(Saturday, February 3rd, 2007)

Some time ago, most people would not even think about creating a web site. Today, it became so easy to do (see another post coming soon) that the only question is not how, but why. Consequently, I decided to give you a few of the common ideas that led most web site designers and bloggers (even amateur ones):

In the spotlight:

  • Initially, because you have something to tell. Of course, you should start only if people usually ask you about something and consider that you have something interesting to say about it. If it is not the case, you may be led by the will to become this kind of expert or reference person on an issue you like.
  • Because you can. We do a lot of things just because we can, not for very complex reasons ;-)
  • Because being recognized expert on a field may attract some interesting job that you could not consider in any other way. I remember that Tom’s Hardware was started by a medical student who had some understanding of technology and hitech gadgets. He moved from Medecine to Technology.
  • Because -if you do it well- you may earn a neat income. Most blogs do not bring any money. However, some are quite a neat source of money. A few thousands of visits per day (easily reachable if you are persistent enough to produce at least 100 posts per year) will be easily monetized to a few hundred dollars per year with the help of Google AdSense or other polite/discreet advertising.

Of course, you need to spend some time to it. But, this is not a lot. For many people browsing the Internet is already a daily activity. Spending a few minutes to keep a log of your activities or researches would be easy. Spending a few hours a week to write about your hobby is usually a neat way to ensure that your knowledge is understandable and that you can share it with others. In some cases, you will even notice that some of your friends will go to your web site before asking you for details that will make the matter for further posts (I often re-use some of my emails into posts).

Will 2007 be the year of your web site?

Your blog in 6 minutes

(Friday, February 2nd, 2007)

You want your own blog? After all, it’s so easy. There are many solutions for this including:

As a matter of fact, with the second solution, you will find all tools already installed and you can start writing posts immediately.

Use HTML tables, even with CSS styling

(Friday, February 2nd, 2007)

After a previous post about the reasons there are not to use the HTML tables (and to prefer CSS tables), I want to come back to this issue with my own experience.

When I went to the fifth version of this web site interface (the one you see at the time of posting this article), I tried to build the site theme using as much CSS as possible in order to ease future migrations and to lighten the result by separating content and styles. However, it soon appeared clear that the 3-column organization (with footer) i sone of the most difficult contruction for CSS tables and it always creates problems of rendering on different browsers.

This is why I decided to choose the best of both worlds. Let’s clarify this position. HTML tables are very simple to build and are correctly implemented in the vast majority of Internet browsers (their definition is so old now…). I decided to build the basic squeleton out of HTML tables. But I limited myself to the structure only. All the styling and formatting is done in CSS tags.

This is a very powerful solution. Use one technique for what it’s best. HTML tables allow easy definition of columns, clear grouping, etc. CSS tags allow splitting content and structure, defining clearly sizes, margins, paddings, borders, cell backgrounds, colours, etc. This gives a theme that is very tolerant (e.g. HTML tables behave well when an image is sized erroneously big -a quite common error- and forces the column dimensions). But the styling is very flexible in CSS.

If you are interested, I invite you to check the sources of this page and the associated CSS file.

Upgrading to WordPress v2.1

(Monday, January 29th, 2007)

WordPress v2.1Going from one version to the newest for a software program like WordPress that I rely upon to operate this web site is not necessarily difficult, but it is always a bit safer to work smoothly, orderly and slowly rather than rushing into the dark.

I started by updating all the plugins I use to enhance WordPress. After checking that they were compatible with WP2.1 or that they had a new version compatible with it, I went and downloaded them before installing them one after the other. I could immediately detect an issue with WP-Polls and I invalidated it after a few seconds to secure the quality of the visits (knowing that there us not yet any online polls, it wouldn’t create problems for the visitors).

Then, from a safe situation, I could download WordPress v2.1 and install it separately. Importantly enough, there are plenty of details about how to make a safe upgrade, right in the download page.

Following the instructions was fairly fail-safe and, apart from a minute of file uploading, there was no real impact on the operation.

WordPress 2.1 is out

(Wednesday, January 24th, 2007)

WordPress v2.1Great news for the WordPress community of bloggers and web site designers: WordPress 2.1 is available for download. This is really a significant upgrade to one of the most successful blog-and-CMS software applications (the one I use for Roumazeilles.net). New features include (my own selection of the good things):

  • A new tabbed editor allows you to switch between WYSIWYG and code editing instantly while writing a post.
  • The lossless XML import and export makes it easy for you to move your content between WordPress blogs.
  • You can set any “page” to be the front page of your site, and put the latest posts somewhere else, making it much easier to use WordPress as a content management system.
  • The upload manager lets you easily manage all your uploads pictures, video, and audio.
  • Comment feeds now include all the comments, not just the last 10.
  • A new version of the Akismet plugin is bundled.
  • Redesigned login screen from the Shuttle project.
  • More AJAX to make custom fields, moderation, deletions, and more all faster.
  • Our admin has been refreshed to load faster and be more visually consistent.
  • Much more efficient database code, faster than previous versions. Domas Mituzas from MySQL went over all our queries with a fine-toothed comb.
  • Better internationalization and support for right-to-left languages.

It seems all great (and it is). However, I want to stress that existing WordPress 1.x blogs should not jump immediately into the new version. The main reason for being cautious is the unavailability of new versions of some of the plug-ins your site may be using. In my case, I will need a little more time for the transition.

Full details.

WAMP, the server solution for Windows

(Thursday, January 18th, 2007)

Needing to quickly install a web server on a Windows PC, I was drawn into looking for a free software suite providing such sevrices in a simple and nice package.

I already knew EasyPHP from Emmanuel Faivre, Laurent Abbal and Thierry Murail, three Frenchmen who put in a single tool box all the free open-source tools really needed for this:

  • an Apache server
  • the PHP language
  • a mySQL database
  • a few tools that makes nice complements to it:
    • PHPMyAdmin
    • SQLiteManager

It is always possible to grab them independently and to install them by yourself, but it’s such a pleasure to do this in a single simple move on your PC!

But, I was told that there is a competing solution, WAMP from PHPteam. After reading in the forums that WAMP seems much simpler to install on a Windows PC than EasyPHP, I decided to test WAMP.

Please notice: WAMP is the Windows version of LAMP, a similar tool dedicated to GNU/Linux.

In a few words, I can confirm the ease of deployment. The installation program is perfectly up to the level of what is normally epxected from a Windows pro installer. User choices are clear, well described and easy to understand, supposing that you know about the general issue (we are installing a web server, not yet another mini-calendar XP application…). And, there lies the only problem with WAMP (but it’s shared with EasyPHP): If they allow you to work with tools that are well known to a specialized public, don’t really believe that you could install your own server without first understanding the issues at hand with Apache, mySQL or PHP.

Nevertheless, the overall feeling I got from WAMP is even more favorable than with EasyPHP. Even better, in both cases, the support is very significant in several language (most notably in English and French). I know that this is a prerequisite for some of our readers.

RSS feed – What is it?

(Tuesday, January 16th, 2007)

You may have noticed a new logo appearing on our web site since the redesigned interface went online.

RSS Feed icon

If your web browser supports it (Opera 9, FireFox, Internet Explorer 7), a similar orange icon may appear on the web address bar.

This is a feature that is good both for users and for web site designers. For the users, it provides a simple way to access to the information on our web site by allowing FireFox or Opera to directly collect the news from the web site without even opening the page. If you click on one of these RSS feed icons Icone de RSS Feed, your web browser should propose to subscribe to the feed. After that, you will be informed more directly about news on Roumazeilles.net even if you do not open the web site. You will never miss interesting headlines!

The RSS feed icon Icone de RSS Feed is a standardized way (proposed by FireFox) to easily point you to this fast access to the web site information. By itself, this is good news for the web designer because it gives a common recognition standard: I don’t have to explain (like I do here) the meaning of the icon, I don’t have to invent some explanation or title. It looks the same on all web sites supporting this feature.

Initially, it RSS feeds were created to syndicate content (to allow other sites to seamlessly include the content of Roumazeilles.net in their own pages). This is still possible (this is what is used by news management web sites like MyYahoo!, MyAOL, Google, or Bloglines), but it has been greatly extended by the creation of specific tools integrated in your own browser.


http://www.roumazeilles.net/

Copyright (c) 1999-2009 - Yves Roumazeilles (all rights reserved)

Latest update: 8-sep-09

Search provided by Google.com
Roumazeilles.net
Roumazeilles.net