• Home

CodingExperiments.com

$ sudo make money

Search

Category:

  • Apple Inc.
  • Facts
  • Fun
  • Google
  • Google Android
  • Ideas
  • Internet
  • Linux
  • Microsoft
  • Programming
  • Rants
  • Security
  • Uncategorized
  • web 2.0

Archives:

  • April 2010
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007

Pages

  • About
  • About
    • The Authors
  • Commenting your code
  • How to Write Papers with Groff
  • ModCMS Anti-Spam Component Set
  • ModCMS Technical Specifications
  • Regular Expressions Guessing Game
  • Saving code directly to a web server
  • The (Almost) Perfect PHP 404 Page

Meta:

  • RSS
  • Comments RSS

Awesomeness tracker

CodingExperiments at Blogged View blog authority
Free Page Rank Tool

Due to Popular Demand, I Present an mp3 of Me Singing 'Never Gonna Give C Up'

August 29th, 2008 by Rishabh Mishra

You can find the song at http://codingexperiments.com/examples/song.mp3

I’m not that great of a singer, but I don’t think that the song is *too* bad for a silly parody that I came up with in an IM conversation.

EDIT: If you didn’t see the original post, you can find the lyrics to my parody song here.

Well, to fill up space, I think I’ll advertise the guest posting offer. Email me at possible248@gmail.com if you would like to write a short, tech-related guest post. If you wish, you can read up more on why you should guest post on this website.

Posted in Fun | View Comments

A Beginner's Guide to Firefox Extensions

August 27th, 2008 by freezewarp

Note from possible248 (main author of CodingExperiments): freezewarp is a new author here. You won’t find much info on him by Googling his nick because he recently abandoned his old one. If you want to guest post on this website too, send me an email at possible248@gmail.com.

Intro

One advantage Firefox has in the web browser world is the large community of developers all contributing to Firefox by building extensions for it. Most of these developers post their extensions on Firefox’s official extension homepage. Here you will nearly 5,300 extensions, referred to as addons, though this is an unfair count. On the whole 600 are themes, 3,000 have no support for Firefox 3, and 600 do not work with linux. Though this means that some users will not be able to utilize all Firefox extensions, they will still be able to the best.

Best Addons

Adblock Plus

My Rating: 5/5

Community Rating: 5/5

Weekly Downloads: 480,000

Best Suited For: Pretty much anybody.

Last Updated: July 17, 2008 (Version .7.5.5)

Works with: 1.5 – 3.0.x (Older versions having support for Firefox versions as early as .7)

Summary: Adblock does one thing, and it does it better than anyone else, it blocks adds. Be it pop-ups, google adds, or the annoying flashy adds, it blocks them all.

Snapshots:

The Adblock Extension in Action

The Adblock extension in action.

Video Download Helper

My Rating: 5/5

Community Rating: 5/5

Weekly Downloads: 390,000

Best Suited For: People who want their favorite content to go right with them.

Last Updated: July 22, 2008 (Version 3.2)

Works with: 1.5 – 3.0.x

Summary: Download Helper gives you the power to download embedded videos from almost any site. In more recent versions you even have to power of instant video conversion through FFMPEG or MEncoder. Using it on older versions of Firefox with little memory, however, can else be troublesome.

DownThemAll

My Rating: 5/5

Community Rating: 5/5

Weekly Downloads: 280,000

Best Suited For: People with a slow internet connection and those who download excessively.

Last Updated: June 07, 2008 (Version 1.0.3)

Works with: 2.0.8 – 3.0.x (Older versions having support for Firefox versions as early as 1.0)

Summary: DownloadThemAll is simply a download manager. It integrates directly into Firefox, allowing faster downloads in the default download manager in addition to many features in the newly existing one, such as page download and integrity checking with MD5Hashes.

Snapshots:

Downloadthemall Extension

The Downthemall extension.

Better Gmail 2

My Rating: 5/5

Community Rating: 5/5

Weekly Downloads: 95,000

Best Suited for: People who use GMail online.

Last Updated: August 20, 2008 (Version 0.6.1)

Works with: Firefox Versions .8 – 3.0.x

Summary: Better Gmail 2 adds a better look to GMail that will make it sleeker and often easier to use. Functionality wise you won’t see a change.

Snapshots:

The BetterGmail2 extension in action.

The BetterGmail2 extension in action.

WOT

My Rating: 5/5

Community Rating: 5/5

Weekly Downloads: 80,000

Best Suited For: Pretty much anybody.

Last Updated: August 11, 2008 (Version 20080811)

Works with: 1.5 – 3.1a2pre

Summary: WOT is a relatively new extension to me, though so far I’ve founded it to be nothing but exceptionally good. In turn you are the one powering it as it ranks sites based on what users think of them. Anyone can rate a site on four aspects, trustworthiness, vendor reliability, privacy, and child safety. This means that you now can make important transactions and ensure your child is safe on the Internet rather easily. If in the case a site has poor reliability, it will bring up a warning screen questioning if you would like to continue to the site or go back. Here are some examples of sites that have been rated:

Site Trustworthiness Vendor Reliability Privacy Child Safety
Myspace 4 4 4 3
Yahoo 5 5 5 5
Google 5 5 5 5
Freedownloadscenter.com 2 2 2 2
KDE.org 5 5 5 5
CodingExperiments.com 5 NR 5 5

Snapshots:

WOT warning you of the danger of the page you are trying to view

WOT warning you of the danger of the page you are trying to view.

The WOT danger level icon beside search results.

The WOT danger level icon beside search results.

Web Developer Toolbar

My Rating: 5/5

Community Rating: 5/5

Weekly Downloads: 70,000

Best Suited for: People who develop the web.

Last Updated: May 19, 2008 (version 1.1.6)

Works with: 1.0 – 3.0.x

Summary: The Web Developer Toolbar adds many great features for all users, though as the title would imply, it is best employed by web developers. You can easily gather information about a web page’s source, structure, style sheets, scripts, and other miscellaneous attributes of a page. Additionally, validation of a web page, from its HTML to its accessibility can be done instantly. If your a regular user you can also easily reap the benefits of showing hidden passwords, disabling images, styles, JavaScript, Java, and pop-up blockers, and magnifying the page.

Snapshots:

The Web Developer Toolbar.

The Web Developer Toolbar.

FireFTP

My Rating: 5/5

Community Rating: 5/5

Weekly Downloads: 55,000

Best Suited For: People who frequently use FTP.

Last Updated: August 15, 2008 (Version 1.0.2)

Works with: 3.0 – 3.0.x (old versions support Firefox versions as early as 1.5)

Summary: FireFTP integrates a mediocre FTP client directly into Firefox. I find it to be a good choice as its often easier to view the changes your making as you make them. It offers standard FTP access, though with the addition of SSL Encryption, SFTP, filtering, file hashing, and other features. None the less normal desktop FTP clients do tend to have more features, and so may be a better choice for people who want the most out of an FTP client..

Snapshots:

The FireFTP extension in action.

The FireFTP extension in action.

ScrapBook

My Rating: 5/5

Community Rating: 5/5

Weekly Downloads: 20,000

Best Suited For: People who want their favorite content to go right with them.

Last Updated: June 28, 2008 (Version 1.3.3.7)

Works with: 2.0 – 3.0.x (Older versions having support for Firefox versions as early as .9)

Summary: The Scrapbook extension has the general purpose of archiving web pages to your local computer. Though it lacks features it is great as what is does. Simply enter a number of links to spider and the content to store (images, CSS, JavaScript) and it will download every page it finds. Unfortunately large loads can do a computer in that lacks memory in.

Snapshots:

ScrapBook Extension

The ScrapBook extension dialog for advance downloads.

NoScript

My Rating: 4/5

Why I Rate It Lower: It can be very tiresome having to allow scripts for every site you go to.

Community Rating: 5/5

Weekly Downloads: 350,000

Best Suited For: People who prefer to be security conscious, such as those working for large companies.

Last Updated: July 15, 2008 (Version 1.7.7)

Works with: 1.5.0.4 – 3.1a1 (Older versions having support for Firefox versions as early as 0.7)

Summary: Noscript also ensures security like with WOT, however rather than simply warning you, it stops scripts, such as JavaScript, Flash, and Java cold, while still allowing you to view all the content of a page. Naturally this does come at a price, though. Since all it does is prevent scripts, harmless scripts are blocked just the same. Even worse you have to allow scripts for every site one by one. This means that on many sites you will have to click allow multiple times, once for the local site and the rest for embedded content. For many people who have constant problem or malware this is a small price to pay, but if you’ve never had to deal with malware then you probably don’t have much need for it.

All-in-One Sidebar

My Rating: 4/5

Why I Rate It Lower: AiOS often closes or opens unexpectedly, making it harder to use.

Community Rating: 5/5

Weekly Downloads: 130,000

Best Suited for: People who are often unorganized or those who find FireFox confusing.

Last Updated: June 24, 2008 (Version 0.7.6)

Works with: 2.0 – 3.0.x (Older versions having support for Firefox versions as early as 1.0)

Summary: All-in-One Sidebar is nothing greater than a sidebar that acts as a control panel for all of Firefox. By combining downloads, history, bookmarks, page info, add-ons, and more all in one place it makes Firefox much simpler, easier, and quicker to use.

Snapshots:

The All in One Sidear

The All-in-One Sidebar.

A few other good addons you may like if…

You are big on Internet Relay Chats: ChatZilla

You are big on Podcasts: FoxyTunes

You like to be in tuned to the weather: ForcastFox

You never type the URL right: URL Fixer

Posted in Internet | View Comments

Integer->String conversion in C/C++

August 27th, 2008 by i80and

I had cause of late to convert an integer into a string in C.  My research indicated that there was no standardized function to do this, and thus the most portable thing to do was to write my own algorithm.  After fiddling with numbers and masks and such things, I came up with the following core algorithm:

#define CONVERT_DIGIT(mask, n, offset)    (( n/mask - ( n/(mask*10))*10) + offset )

This algorithm may not be as efficient as it could be, but I’m fairly happy with it given that normally I dodge anything with even a distant correlation to mathematics as if it were the plague.  mask is a power of your number system base b; most of the time, this is going to be a power of 10.  n is the number you want to convert.  offset is used to offset the resulting integer to an ASCII equivalent; this could actually be hard-coded as 48.

Given that the number of digits in n is L, you need to initialize mask to bL-1.  Then run a loop that for each digit in n runs CONVERT_DIGIT( mask, n, 48) and then divides mask by b for the next iteration.

Caveats

While the algorithm itself should be O(L), the actual output is going to have some worthless zeros at the start for most values of n that may have to be stripped.  In addition, I’m not going to explain how to create a string in C, or how to implement this in other languages.  You’re on your own there.

Also note that while the premise should be solid and I haven’t seen a situation where it fails, I disavow all responsibility for algorithmic failures and weaknesses.

EDIT: Daniel Bruce informed me that the function sprintf() would do the job just as well, only should also work for floating point numbers and is more flexible.  I wish I had known about that before I had spent the time to write this algorithm.

Posted in Programming | View Comments

"Never Gonna Give You Up" Lyrics Adjusted for Programming Twist

August 27th, 2008 by Rishabh Mishra

We’re no strangers to algorithms.
You know the syntax, and so do I.
You know pointers are what I’m thinking of.
You wouldn’t get this from any other app.
I just want to tell you how I’m coding.
Gotta make you understand.


Never gonna give C up!
Never gonna let C down!
Never gonna run around and write Python.
Never gonna throw an error.
Never gonna corrupt files and hurt you.


I’ve known C for so long.
Your heart’s been aching, but you’re too shy to say.
You wanna see my source code.
You know the language, and so do I.
And if you ask me how’s my coding,
Don’t tell me you’re too blind to see.

Never gonna give C up!
Never gonna let C down!
Never gonna run around and write Python.
Never gonna throw an error.
Never gonna corrupt files and hurt you.
Never gonna give C up!
Never gonna let C down!
Never gonna run around and write Python.
Never gonna throw an error.
Never gonna corrupt files and hurt you.

Never gonna give, never gonna give
give C up.
Never gonna give, never gonna give
give C up.

I’ve known C for so long.
Your heart’s been aching, but you’re too shy to say.
You wanna see my source code.
You know the language, and so do I.
I just want to tell you how I’m coding.
Gotta make you understand.

Never gonna give C up!
Never gonna let C down!
Never gonna run around and write Python.
Never gonna throw an error.
Never gonna corrupt files and hurt you.
Never gonna give C up!
Never gonna let C down!
Never gonna run around and write Python.
Never gonna throw an error.
Never gonna corrupt files and hurt you.
Never gonna give C up!
Never gonna let C down!
Never gonna run around and write Python.
Never gonna throw an error.
Never gonna corrupt files and hurt you.

I wrote the above song today after a funny IM conversation. It doesn’t actually make much sense, but I think it is funny, and I know this blog needs some funny posts.

Posted in Fun | View Comments

How to Avoid Some of the Problems in Writing a Working Recommendation Engine

August 24th, 2008 by Rishabh Mishra

Introduction

When you think about it, having a computer analyze your interests and tell you other things that you might be interested sounds seriously cool. But a lot of recommendation engines hardly ever actually find anything interesting for human users. This post will cover some of the issues that software developers face when trying to write a recommendation engine, and how to reduce the impact of those issues.

Developers making recommendation engines get annoyed by

1. Speed and scalability

A lot of recommendation engines are for websites such as Amazon. The recommendations have to be served up quickly. One way to solve this is by not generating the recommendations when the page with the recommendations is being requested. The recommendations can be generated at an earlier time and, on page load, can be fetched with database queries or similar.

Another way to solve this is to use the client’s processing power to either generate the recommendations. For a web application, Javascript can be used to generate recommendation, as this Delicious recommendation engine does.

There is also the issue of scalability. The system has to be able to quickly generate recommendations for large amounts of users. It would be sad for a recommendation engine to fail, Twitter style.

2. Malicious folk

This is an issue when having a recommendation engine that deals with user generated content. It doesn’t take long to find a Youtube video with literally hundreds of unrelated tags in the hope of tricking users to watch the video.

For some recommendation engines, this isn’t a problem, but for many, it can be difficult. For the Youtube example that I gave, videos with copious amounts of tags could be ignored by the recommendation engine because it is highly doubtful that nearly every single one of those hundreds of tags are relevant.

3. Little data

It would be snap-easy if all the users that your recommendation engine will analyze had large pools of data clearly describing what the users do. It is very difficult to give recommendations based on little data.

One way to attack the little data issue is to not give recommendations until enough data from the user is collected. This results in the user having to do work and wait for the recommendations to appear, which usually isn’t a good thing.

Another way is to make the recommendations based on the data of others. Recommendations popular among the vast majority of other users (think Digg front page) could be made.

4. Nothing good to recommend

Recommendation engines work really well for big sites such as Amazon, Youtube, Digg, and Delicious because those websites have a lot to recommend. It doesn’t matter what the user’s interests are, because those websites probably have to have something that would interest the user.

Smaller applications typically do not have as much to recommend, unless they are drawing upon the content of larger applications.

In order for the programmer to solve this, more content must exist in order so at least something interesting can be recommended to the user. If the content is user-generated, encourage users to generate more content by providing some sort of benefit for creating more content.

5. Duplication

Youtube is a great example of content duplication. Multiple people will frequently upload the same copyrighted content, creating duplicate content on the Youtube servers. How can a recommendation engine give relevant recommendations, but not have the recommendations be so relevant that the user sees duplicate content.

In the case of Youtube, having the recommendation engine ignore suspiciously similar video titles might help reducing the duplicate recommendations.

Posted in Programming | View Comments

Debunking Myths That Say Linux Won't Reach the Desktop

August 18th, 2008 by Rishabh Mishra

Introduction

Every couple of weeks, I’ll hear someone or read a blog post that says that Linux will never reach mainstream desktop users.

I completely disagree.

Of course, saying that I don’t agree and then ending the post here would be foolish, so I will debunk some myths about Linux, and hopefully illustrate why I think that Linux will reach the desktop.

PS: i80and points out he saw another article titled 9 Linux Myth Debunked. The myths that the author covers are mostly different from the ones covered in the article, and I started the first draft of the article several days before the article was published.

Arguments and my responses

Myth 1: Windows Vista showed us that six different versions of one operating system is bound to confuse users. The hundreds of Linux distros out there will only confuse users further.

Response 1: Users will only be confused if they have to make the distro choice on their own. If users can get help to narrow down the choices to one distro, they won’t feel confusion and frustration due to the massive amount of distros.

Myth 2: It doesn’t matter if Linux is better, because users will not like Linux because Linux is different.

Response 2: Linux will never be Windows, but user interfaces of Linux applications can be made with former Windows users in mind. Clever theming can modify existing application user interfaces to feel more like Windows.

Efforts to make Linux more friendly for former Windows users have already started. There is already an entire Linux desktop environment designed to look like Windows.

Myth 3: Linux will never succeed because big companies do not support Linux.

Response 3: This is a chicken-and-egg issue. Big companies will not support Linux because Linux has few users in comparison to Windows, and some users will not try Linux because the big companies do not support Linux.

But this chicken-and-egg issue does not mean that Linux is doomed. If existing, open-source software can be made more usable for former Windows users, some new users might make the switch to Linux. If enough users switch to Linux, the big companies might reconsider their decision to not support Linux.

On the positive side, look how far Linux has come. Think of all the existing big companies that support Linux. IBM, Dell, HP, Novell, Google, Intel, VIA, and AMD support Linux.

Myth 4: Linux users have to compile everything, which confuses new users.

Response 4: Compiling is only necessary on distros where expansive repositories of software are not available. Users can avoid compiling simply by installing distros that do have the expansive respositories of software.

Myth 5: Hardly any hardware works in Linux.

Response 5: I suggest you read Greg Kroah-Hartman‘s post Linux Driver Project Status Report as of April 2008. If you don’t have time to read the whole post, I’ll just highlight an important part below (emphasis mine).

Back in 2006 I gave a talk at the Ottawa Linux Symposium about a number of myths that are around the Linux kernel. One of them was device and driver support. I stated then, and still do that:

Linux supports more different types of devices than any other operating system ever has in the history of computing.

Later on, a representative from Microsoft validated this statement saying that their research agreed with it, so this is not an unproven statement.

Myth 6: Files from Linux will not work on Windows, and vice versa.

Response 6: Plenty of files from Windows will work on Linux, and vice versa. I will use The GIMP, an image editor available, as an example. The GIMP can open and save Autodesk flic animations, Corel Paint Shop Pro images, and Adobe Photoshop Documents (from The GIMP’s Wikipedia article).

The open source office suite OpenOffice can open a variety of file formats, including those from Microsoft Office.

However, this does not mean that every file format that can be read in Windows can be read on Linux. More obscure file formats that belong to Windows-only applications may not be able to be opened on Linux, unless the Windows application to read and write to that file format can be run on Linux using WINE.

Proprietary codecs may be necessary to play some of the popular media file formats. These proprietary codecs cannot be shipped with Linux due to legal concerns. If your jurisdiction allows it, you can download the codecs and use them. Linux users in areas where just downloading the codecs would be illegal can legally obtain the codecs from Fluendo.

In conclusion, an amazingly large amount of file formats can be played on Linux. There may be slight difficulty in reading and/or writing to proprietary or obscure file formats, but the Linux community can assist with that.

Posted in Linux | View Comments

Midori 0.19 Patch

August 15th, 2008 by i80and

Recently I’ve been playing with Midori in the wake of being informed that it’s now an Xfce project.  A nice enough browser, albeit quite solidly still in the development stage.  However, on systems such as mine that lack GLib 2.16 (and therefore GIO), there is a compilation error.  Specifically, there are two problematic zones.  The first is a confusion in the macros that check for GLib 2.16 and GtkSourceView that result in a failed compile if you have an older version of GLib in combination with GtkSourceView. Secondly, Midori will attempt to use GLib 2.16 symbols without first checking if the user has GLib 2.16.

So I wrote a patch and submitted a bug report.  The bugs are now fixed in git master, but for the existing stable release (0.19), you can find my patch at the relevant bug report.  To apply it, move it into the Midori 0.19 directory and then run

cat midori-glib216.patch | patch -p1

Posted in Internet, Programming | View Comments

CodingExperiments Had a Painful Fail Today

August 13th, 2008 by Rishabh Mishra

In the previous post covering screen resolutions, I had a big messup.

I was tired of proofreading the post, which is more than a thousand words, so I just hit the Pubish button after one of my friends said it looked okay.

Big mistake.

Two hours later, I go to bed, but I can’t sleep. As usual, I’m analyzing what happened in the day, and making plans for the next day. When thinking about my blog, my eyes suddenly widen and my fists clench. I asked myself, How could have I been so careless? Well, I was careless because I was tired from a long day of work. I had just realized that I forgot to add the screenshots to the blog post that I published.

The moral of the story is don’t read this blog everybody makes mistakes, especially me.

PS: If there are grammar errors in this blog post, please politely inform me and I’ll get to it tomorrow. I’m too sleepy to proofread this post. I hope I won’t have to write another post about the failures in this post. That might result in a vicious cycle of apologizing.

Posted in Fun | View Comments

A Detailed Guide for Web Designers on Dealing with Different Screen Resolutions

August 13th, 2008 by Rishabh Mishra

UPDATE: If you saw the screenshots messed up in this post, it is now fixed.

1. Table of Contents

  • 2. Introduction
  • 3. Mobile screen resolutions
    • 3.1. Creating and designing mobile web pages
    • 3.2. Redirection to mobile webpages
      • 3.2.1. User agent detection
      • 3.2.2. Screen resolution detection
  • 4. Desktop screen resolutions
    • 4.1. Creating more webpages for different screen resolutions
    • 4.2. Using fluid width designs
    • 4.3. Using limited fluid width designs
    • 4.4. Using narrow fixed width designs
    • 4.5. Intelligently using horizontal scrolling
    • 4.6. Having small desktop screens view the mobile pages
  • 5. Conclusion

2. Introduction

Handling screen resolutions is a difficulty for web designers simply because there are so many screen resolutions. There are small screens on mobile devices and freakishly large and expensive screens now finding their way into the desktop market.

This post will give some guidelines which may make it easier for a web designer to deal with the vast differences in screen resolutions.

3. Mobile screen resolutions

It’s common to browse the Internet on a cell phone, especially now that the Apple iPhone (and other devices) make(s) it so easy. Many normal websites work fine or almost fine on iPhones, but for some mobile devices with different web browsers, web browsing can be a difficult task.

How can one web page be designed in such a way that it elegantly displays the content on mobile and large screens? It is possible for mobile and large screens to view the same webpage, but it is rather difficult for the content to be displayed elegantly.

3.1. Creating and designing mobile web pages

To solve this problem, a separate version of the webpage with the design tailored specifically for small screens can be created. Usually, the same content is displayed, unless the content is something that is currently problematic to display on mobile devices.

I believe that mobile web pages work best if they are fluid width, and do not strictly specify a font size. Towards the end of this post, you will see why I recommend this.

You might want to check out the W3C’s draft Mobile Web Application Best Practices“.

3.2. Redirection to mobile webpages

A problem with creating another webpage, or having server side scripting (such as PHP or Python) generate the mobile web page on the go, is that the user has to be aware of the mobile web page.

Redirection can help reduce the awareness problem. User agent and screen resolution detection can be used to redirect the users to the proper page for the user’s screen resolution.

3.2.1. User agent detection

This can be done either with client side scripting (Javascript) or server side scripting. The user agent of a mobile web browser is detected and is either redirected, or the same page is filled with different content.

3.2.2. Screen resolution detection

With screen resolution detection, only client side scripting can be used because the screen resolution is not passed to the server. Either the mobile users can be redirected, or the users with desktop screen resolutions.

I find it less reliable to rely on a mobile web browser’s Javascript capabilities, so I think it would be smarter to redirect the users with larger screen resolutions.

4. Desktop screen resolutions

Assuming that the mobile screen resolution problem has been solved, there still are a good variety of screen resolutions on the desktop market. The problem is that larger screens are being created and bought while some people can’t or don’t upgrade.

This results in screen resolutions from 800×600 (though 640×480 might still be seen) up to… Oh, I can’t give a top number. Somebody will point me to a place where larger screens are available.

Below are the various solutions for handling the differences in desktop screen resolutions.

4.1. Creating more webpages for different screen resolutions

Basically, use the techniques for mobile screen resolutions and use them again for desktop screen resolutions. This is not a very good solution, and is only used in the mobile situation because of the extremely small mobile screens.

4.2. Using fluid width designs

Because the size of desktop screens are pretty big, compared to mobile screens, a fluid-width layout might work. But if a fluid-width layout is not designed properly, problems can occur.

If the fluid with layout isn’t built with smaller screens in mind, the layout can look scrunched in smaller screens. Conversely, if the fluid with layout isn’t built with larger screens in mind, the layout can look overly spaced out (for the lack of a better term). Long lines of text, which can happen with fluid-width layouts on large screens, are hard to skim through.

Another problem with fluid width designs is that the content may contain fixed width elements, such as images. Should the fluid width container shrink to a size that is smaller than the fixed width container, the layout can get severely messed up.

4.3. Using limited fluid width designs

Cascading style sheets are quite powerful, and have the capability to limit the stretching and shrinking of fluid width designs.

The CSS properties min-width: and max-width: can be used to restrict the flexibility of a fluid width layout. But how can these properties be used in order to make webpages look good for large and small webpages?

Well, the use of max-width: can be used to prevent those long lines of text that was described earlier. The property min-width: can be used to force horizontal scrolling in the smaller screen resolutions. While horizontal scrolling is typically not a good thing, there is more below about how to intelligently use horizontal scrolling (not the style of scrolling seen at http://www.thehorizontalway.com/).

4.4. Using narrow fixed width designs

This is the solution that is, at the time of this writing, used by this blog’s template. This blog is neither scrunched up 800×600 nor does it have overly long lines. The major problem that this solution has is that fixed width content can mess up the layout. The fixed width content issue can be observed by looking at posts on this website that contain images that are wider than about 500 pixels will cause horizontal scrolling.

Also, due to the problem with fixed width content, the more columns that a design has, the narrower the fixed width content has to be in order for it to fit with the layout.

4.5. Intelligently using horizontal scrolling

This section is an extension of section 4.4, but modified slightly to allow for three or more columns with a decent width. Basically, use horizontal scrolling. As I said in section 4.3, I am not referring to the horizontal scrolling demonstrated at http://www.thehorizontalway.com/.

In my opinion, horizontal scrolling is a thing that should be avoided, but here I say that minimal horizontal scrolling should be okay for screens with small resolutions.

Basically, create a fixed width design for… perhaps 1024×768.  The goal is to get all of the main content (like the content of a blog post) visible on 800×600. Use somewhere from 700 to 750 pixels for the content. Don’t get too close to 800 pixels, because some space will be taken up by the scrollbar and you also want a portion of a sidebar or something displayed to show the user that horizontal scrolling is needed in case the user does not see the scrollbar at the bottom.

For more reading on horizontal scrolling, check out Jakob Nielsen’s alertbox on scrolling.

4.6. Having small desktop screens view the mobile pages

Section 4.1 talks about creating more pages for different screen resolutions, which is not optimal in most cases. But assuming a mobile page is already created, why not have users with small screen resolutions go to the mobile page?

To some of you, that might sound crazy, but look at my below demonstration.

Below is my FriendFeed page at 800×600 in Firefox 3.0.1.

Click on the above screenshot to view it full size.

The sidebar completely messes up the design. I would not want to use FriendFeed at such a low resolution.

Now, let’s see what Benjamin Golub’s FFToGo (a FriendFeed API app for mobile devices) looks like at 800×600 in Firefox 3.0.1.

Click on the above screenshot to view it full size.

Hey… not too shabby. It’s a clean and simple design that looks a whole lot better than the FriendFeed website.

Assuming that the mobile web page

  • does not force a tiny font size,
  • does not force a width,
  • is not uglier than the main page,

it might be a good alternative for folks at 800×600. Of course, user agent detection will not work because there are very few people out there that are using a desktop browser with a mobile browser’s user agent. Screen resolution detection, or in the case of FFToGo, simple advertising will have to do.

5. Conclusion

None of these designs are for everybody. Designers creating a website for a very small audience might know what sort of hardware users would be using to access the webpage. The larger the audience, the more likely that the screen resolutions visiting the webpage will be more varied.

Posted in Internet | View Comments

Why You Should Guest Post on Codingexperiments (and Where to Sign Up)

August 7th, 2008 by Rishabh Mishra

You should guest post on this blog…

1) …because Uncle Sam told you so.

You heard the man.

2) …because it’s good for your blog’s statistics

In the intro to your guest post, you can totally post links to your blog, or whatever else you would like. That may increase the Google PageRank or Technorati Authority of your blog (or whatever else).

3) …because guest posting on other blogs makes you look more popular.

Any random person can start his or her own blog, but it takes a real good blogger to be allowed on the blogs of other folk.

If your blog is more popular than mine, well, you still increase your reputation because you show yourself as a good fellow that respects blogs that are less popular than his.

4) …because when CodingExperiments overtakes TechCrunch on Techmeme, you’ll want to say that you were part of this blog’s success.

Hey, I can totally take on TechCrunch. It might take a few decades, but it will happen.

5) …because people can quickly get tired of what I have to say.

I’d like this blog to have some diversity in it.

6) …because you want to make the kitty happy.

Click image to view on Flickr. This image was photographed by Flickr user studio-d.

You can become a guest poster by…

…sending me an email (possible248@gmail.com) containing:

  • who you are.
  • what you would like to write about.

If I approve, I’ll send you a followup message with more instructions. Assuming I let you write a guest post, you’ll make the kitty happy and Uncle Sam will be satisfied.

Posted in Fun | View Comments

« Previous Entries

 
Wordpress Themes by and Website Templates by Blogcut Blogged Blog Directory Blog Directory - Blogged