• Home

CodingExperiments.com

CodingExperiments.com is a site where I can (obviously) experiment with various demonstrations of code.

Search

Category:

  • AJAX
  • Announcement
  • Apple-related
  • Best Practices
  • Blogger
  • Blogging
  • BurstCMS
  • Content Management System
  • Debugging
  • Experiments
  • FriendFeed
  • Gaming
  • General Code
  • Internet
  • Javascript
  • Linux
  • Microsoft
  • Microsoft Windows
  • Networks
  • Open Source
  • PHP
  • Programming Tips
  • Rant
  • Security
  • Storage
  • Twitter
  • Ubuntu
  • Uncategorized
  • Web Development
  • Windows Vista
  • WordPress

Archives:

  • 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
    • 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

Winning the CodingExperiments Worst Website of the Year Is… Every Website Coded Entirely in Adobe Flash!

October 5th, 2008 by possible248

Introduction

Adobe Flash, while it appears to be buggier on Linux, is a neat thing. I can watch animations and play games right through my web browser. Now, I would prefer that Adobe Flash not be put to the use of making entire websites, or even major parts of websites, such as a navigation menu.

Flash usability hasn’t had major improvements in eight years, as evident by Jakob Nielsen’s similar article on Flash and usability.

Why too much Flash is bad

1) The user interface is nonstandard.

Flash websites have a tendency to make their own (shinier) scroll bars to help me navigate large amounts of text.

A web designer creating his or her own scrollbar, and then refusing to let me use the browser’s scrollbar is like the web designer poking holes in my car’s tires and replacing the tires with cardboard boxes. Well, perhaps I’m being a bit dramatic with the metaphor.

Interaction with the user interface also totally gives the user unexpected surprises. Most Flash websites do not allow me to right-click*, middle-click, or use my web browser’s scroll bar.

*Whenever I say, “no right-click”, I mean that the user cannot access a context menu from right-clicking.

2) Flash websites often take longer to load.

Oftentimes, I want good ol’ fashioned text coming down the pipeline to my screen. I do not want:

  • text animations.
  • animations of somewhat related images.
  • sound.
  • a screen that tells me that the above three are loading.

3) Ctrl+F doesn’t work on Flash websites.

I cannot use text manipulation tools to edit or search the webpage. I cannot type Ctrl+F and then search the text of the page. Greasemonkey would not work well in all-Flash websites. Neither would bookmarklets or Firefox extensions that allow me to manipulate the page.

4) OS-specific Flash Player bugs

I recently visited a website that had a bug with an embedded Flash slideshow. The bug was only visible when using the Linux Flash Player. On Windows, even on Firefox, the Flash slideshow worked perfectly.

The bug was that the Javascript drop down navigation was being hidden under the Flash slideshow on Linux, which made most of the menu inaccessible.

Designers shouldn’t have to test on multiple operating systems, because the vast majority of designers probably do not have the time or resources to do so.

5) Redundancy

Plenty of website designers will provide a plain HTML version of the content on the website for users that do not have Adobe Flash. I just don’t understand why there needs two versions of a webpage, with one being flashier than the other.

The main usability issue here is that any text or link pointing to the HTML version is often in very small text and sometimes only visible to users that do not use Flash. Users that do have Flash and want to use the text version might have a hard time finding the text version.

6) Redundancy

Sorry, I couldn’t resist.

Conclusion

I would rather visit an ugly webpage full of HTML hacks that were inserted by a poorly coded WYSIWYG editor than an impressive looking (but completely unusable) Flash website.

Why?

Because in an HTML website, the defaults are more usable because defaults in HTML pages are what most users are used to. In an HTML page, developers would have to go out of their way to create some of the annoyances that are common on Flash websites.

The vast majority of people that create HTML pages don’t have an impulse to disable right-clicking in the browser, or to make their own scrollbar when the browser has a scrollbar that works just fine.

So, please. I beg you to start an HTML page with a DOCTYPE tag, end it with </html>, and make sure that the only uses of Flash in between are not for displaying text and images.

Posted in Best Practices, Javascript, Rant | Comments

Python, Javascript, And PHP as Languages for Beginners

June 7th, 2008 by possible248

Introduction

Python, Javascript, and PHP are all known as languages that beginners can use to sink their teeth in programming. Those three language are also frequently used in many commercial applications. Given all these three choices, which language should a beginner learn? Well, here’s the features of the three languages broken down.

Python

Pros:

  • Cross-platform
  • Used on the desktop and server
  • Has a module for everything that you could ever think of
  • Has good documentation

Cons:

  • Indentation is required, and errors will come up if code is not indented properly. UPDATE: A bunch of people told me that they think indentation is good as it teaches newbie programmeres to properly indent their code. I understand the good part of this, but I think that forcing indentation seems extreme. I guess whether this is a con or not is completely up to the developer.
  • It may take some Googling to figure out how to use a certain module. I can tell that from personal experience.
  • It’s not HTML-embedded like PHP or Javascript, so it’s a little more work to write web applications with it.

Python is ideal for the person that wants to create cross-platform applications on the desktop and server, and doesn’t mind having to install Python if they’re on Windows.

Javascript

Pros:

  • All you need to execute Javascript is a modern browser, which is something available on plenty of computers.
  • Reduces server load in web applications
  • With AJAX-style Javascript coding, you can make web applications more like desktop applications
  • In the form of Greasemonkey scripts and similar, Javascript can be used to modify the functionality of other webpages.
  • Since Javascript works with HTML, you can create user interfaces much more easily than with Python.
  • Javascript can be used to make desktop applications with things like Adobe AIR.

Cons:

  • You can’t expect Javascript to act the same everywhere. Different web browsers handle Javascript differently.
  • Users can disable Javascript in their browser, or have a web browser that’s too old for your application.
  • Because of the the first con, Javascript is harder to write and debug

Javascript is a good first language for people that are willing to put work into writing and debugging code, but they do not want to install things. It’s also good for people that want to make HTML pages easier to use.

PHP

Pros:

  • Is server-side like Python, but shares the same ease-of-interface making as Javascript.
  • Is HTML embedded. This makes it even easier to make user interfaces in HTML.
  • You can bet on recent versions of PHP being available on (most good) shared hosting servers due to it’s demand.
  • Has good documentation

Cons:

  • It’s easy to shoot yourself in the foot.
  • Not good for desktop applications at all.
  • The community is filled with newbie programmers showing others code examples with bad programming practices.

PHP is good for people that want to develop server-side web applications quickly, and are okay with the application not being as fast (I can’t find the link to the testing that shows that Python is faster). It is also a good idea to buy a book on PHP in order to learn all the bad programming practices that are often showed in newbie code examples that are posted on the Internet.

Posted in Javascript, PHP, Programming Tips | Comments

Javascript Mario Kart. What’s with the Javascript Craze?

May 28th, 2008 by possible248

CodingExperiments has covered an interactive 3D viewer that uses Javascript. That’s pretty neat, but it’s small potatoes to Javascript Mario Kart. Yeah, you read that right. It’s Javascript.

Now, how does it play? Well, I’ve never had a better gaming experience in my life. The controls are so wonderful, the graphics are better than a PlayStation 3 game, and the AI is very intelligent.

You probably didn’t believe me for a second. The controls are annoying as you can only press one key at a time and the graphics are ugly and slow. The AI still beats me, though that’s because I suck at Mario Kart and that I had trouble adjusting to the one-keypress thing.

Now, what does this example teach us? Let’s see.

  • Whatever it is, you have a pretty good chance that it can be written in Javascript, even though it won’t probably work that well.
  • Internet Explorer is shooting itself in the foot by having it’s own proprietary standards and not supporting the official ones.
  • Sadly, some things have to be left to Adobe Flash and Shockwave.

Now think if you’re going to be playing this a lot. Unless you are some Javascript addict, you are probably going to play Javascript games a couple times and then forget about them. This is a good example for a lot of web applications. If you’re creating a web application that uses way too much Javascript, and making the web application annoying and slow, people are going to go to other web applications or desktop ones.

Javascript Mario Kart is still pretty cool though. :D

Posted in Experiments, Gaming, Internet, Javascript | Comments

« Previous Entries

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