Saturday, August 30, 2008

Photosynth

Last Thursday I happened to stumble upon an interesting site that allows you to take multiple photos and combine them into a 3-D model. That happened to be the day they rolled it out to the general public. I was able to put together a synth that was 100% synthy on the first try which was beginner's luck and perhaps a little spoiling too.

Since then I have put together about 4 major synths, and I have tried to revisit each of them a few different times to try and get them to be 100% synthy.

NOTE: I will be expanding upon this in the next few weeks, please check back. This is not nearly complete yet, sorry...

There have been some challenges with Photosynth that I have come across and I have been able to address some of them too.

Wednesday, May 28, 2008

I'm just saying...

The phrase "I'm just saying..." is an interesting example of how we can get by with expressing almost anything that happens to be on your mind, without reaping the consequences. Or at least that is how it has been explained to me, usually with the addition of "I'm just saying..." of which I find to be a bit circular.

Every once in a while I have a few things pop in to my mind, of which if I happen to share of others, then tend to think the thoughts are rather deep in nature. Now, I am not tooting my own horn or trying to imply that that I have any delusions of grandeur, but I am just saying...

Please enjoy, where you can. ;-)


Little Minds mind little.
Big minds mine big.


This was an interesting creation that I enjoyed about six months ago. I do like the fact that it is a palindrome (when using words as a unit), but the meaning and enjoyment does go a bit deeper than just that. What I have noticed when I have shared this with others, is that initially they tend to overlook on the second line, the word "mine" instead of a repeat of "mind" as the pattern was setup in the first line. This still keeps it a valid palindrome, but to me, it makes it far more humorous in the nature that the individual to whom is speaking this is, in the first line, scolding folks with little minds, but then marvels about how large their mind is, which to me, confirms that that individual last the smallest mind of all. I personally read the first line's "minds" as a noun referring to the mental faculties and or opinion or views that someone has. The adjective of little both refers to the diminutive state of someones mental faculties, if you will, due to their warped perspective on humanity (see below), and their lack of caring. Of which the "mind" in line one is focused on the verb to be concerned about.

Now what got me thinking about this juxtaposition was that I have been a frequent observer (and dare I say complainer) about how little minded individuals tend to care (mind) that much for other or even that which is around them. They tend to be out for themselves at any cost. This could be reflected through racism, hatred, deception, criminal activities such as preying upon the elderly or under privileged, etc. I'll let you use your own imagination to fill in the examples on who might fit this build.


Another interesting palindrome that I just thought of a few weeks ago is...


Humanity is inhumane.

I think the likes of individuals such as Hitler, Chairman Mao, Stalin, and ect..., or events in modern history such as The Spanish Inquisitions, Salem Witch Hunts, or even events such as the Trail of Tears sums this up succinctly.

Interesting note, I just Googled this phrase and it appears to be fairly popular with 194 hits, but some are duplicates and circular too.

Monday, February 11, 2008

Microsoft's attempt to drive customers to buy macs

I must admit, if there is one feature that makes you scratch your head and wonder what the heck the folks at microsoft were smoking on the day they dreamed up that wonderful set of tools called Accessibility Options within XP.

It may be a great set of tools that for those who need them because of unfortunate handicaps, but the boneheaded folks at microsoft sure did goof on common sense interfaces.

It behaves like a virus for it can hose your computer without your knowledge and there is no way to permanently disable it. I am sure many of users have been burned by it.

I saw that I am not alone in this common snake pit, for the following person summed it up quite nicly:
http://www.classicdosgames.com/blog/?p=3

I think this one feature alone could cause many folks to seriously consider the Mac platform, if not for any reason other than a good grasp of the concept behind a common human interface design.

Or perhaps it could also be one of the greatest marketing ploys ever devised, MS to harward manufacturers: "Bundle our OS with your hardware and we will include a software feature that would be sure to increase sales due to physical abuse by users to their hardware."

Thursday, January 10, 2008

Eclipse v3.3.x PermGen Memory Errors

Out-of-the-box Eclipse v3.3.x was giving me on average 12 to 16 crashes per day! I was even seriously considering dropping Eclipse altogether and finding something more stable.

I was using Eclipse v3.3.1 with the WST extension and tigris.org's subclipse v1.2.0 (since the v2.x has serious bugs that prevents it from installing) on a Windows XP Pro platform.

The short of the problems came down to a mistake in the eclipse.ini file that had the
--launcher.XXMaxPermSize
statement come before the
-vmargs
statement. It is a little more involved that that, one issue was that the duel-level launch configuration that Eclipse uses does not always do a great job of detecting Sun VMs, of which the
--launcher.XXMaxPermSize
only works with a Sun VM, which defaults the PermGen space to a size of 64MB.

The suggested fix is to remove
--launcher.XXMaxPermSize
and replace it with
-XX:MaxPermSize=256m
after
-vmargs
it should now pickup the change.

This change and usage of
-XX:MaxPermSize
is said to be universal (to some degree) to other VM's such as the mac.

An example of my config which works, which is "fairly" close to the original eclipse.ini:
-showsplash org.eclipse.platform
-vmargs
-Xms512M
-Xmx1028M
-XX:MaxPermSize=256M

One area of great disappointment with all of this, is that it appears like they were spending a fair amount of time arguing how and when to apply this fix or even announce this potential problem instead of just getting it done. I really do enjoy the Eclipse experience, but because of this problem, I was about to drop it and probably never give it another chance. Good thing I went snooping through their Bugzilla!

References
Eclipse's Bugzilla Entry on this bug

Tuesday, January 01, 2008

FireFox Add-On worth trying - FireBug

For the last few months I have been wishing that the PC version of Safari had the same full robust HTML and CSS debugging tools as the mac counterpart. Well, I have just found in the last week a tool that should make any Mac Safari user quite envious.

The tool's name is FireBug.

What is great about it? Here is a very short list:

  • JavaScript Error Console

  • JavaScript profiler

  • View source code for HTML, CSS, JavaScript, Images, etc...

  • HTML Source hover-highlighting

  • Select an DOM element, and it can show the CSS styles that contribute to it, the Box model layout, and DOM hooks

  • Dynamically modify CSS elements without modifying any source code or reloading the page to see the results

  • Set JavaScript breakpoints for debugging

  • See Network performance stats on object/page loads

  • Review dynamic AJax calls: parms, headers, and response



This is a really useful tool. If you spend any time in HTML, JavaScript, CSS, this tool is well worth looking in to. I don't think many would be disappointed.

References
FireBug's Website

Prototype v1.6 Ajax.Updater and textarea in FireFox v2.x

There is a slight issue with how Prototype v1.6 (and prior) deals with textarea form elements when used in combination with Ajax.Updater. This appears to only be an issue with FireFox v2.0.0.x and not IE7 or Safari v3 for Windows. I have not tested to confirm if this is an issue on non-windows versions of FireFox or other browsers or platforms.

The problem enters when Updater is successful in putting the results content in to the textarea innerHTML, but the contents are not displayed. Most of the solutions that I have been able to find on the web suggests to use a onSuccess: callback then within there, pull the responseText from the response object and shove it in to the value of the textarea.

Example of a BAD use of Ajax.Updater with the textarea:

<form id="formid">
<textarea id="textareaid" />
</form>
Ajax Status: <div id="ajaxStatus"></div>
...
new Ajax.Updater( 'textareaid', 'anSOAapp.jsp', {
parameters: { id: anId, afield : avar },
onFailure: function(){
$('ajaxStatus').update('An error occurred.');
},
onSuccess: function(response) {
$('textareaid').value = response.responseText;
$('ajaxStatus').update( response.status );
}});

How wasteful! Not only in redundant processing (the contents of the textarea is being updated twice!), but also in memory that JavaScript is now having to allocate and use. What is the point of using the Ajax.Updater function if you are just going to overwrite its output?! For small tidbits of data, it may not be noticeable, but for larger data sets, then you can not only risk the out of memory exceptions, but also a non-functional page.

The whole point of utilizing the Ajax.Updater function is to help streamline the whole data flow and to offset the needs to keeping the data in a variable or as a String in JavaScript, which is what occurs when using the responseText field.

There is an easy solution that helps to avoid these problems of redundancy and excessive memory utilization. It is actually quite simple.

Example of the correct use of Ajax.Updater with the textarea:

<form id="formid">
<textarea id="textareaid" />
</form>
Ajax Status: <div id="ajaxStatus"></div>
...
new Ajax.Updater( 'textareaid', 'anSOAapp.jsp', {
parameters: { id: anId, afield : avar },
onFailure: function(){
$('ajaxStatus').update('An error occurred.');
},
onSuccess: function(response) {
if ( Prototype.Browser.Gecko ) {
$('formid').reset();
}
$('ajaxStatus').update( response.status );
}});


Notice that the key element was
$('formid').reset();
inside a conditional to ensure it only is performed for FireFox browsers.

Give it a try.

Resources
Prototype API Docs
Prototype's Form.reset() function API Docs

Tuesday, December 11, 2007

Lead in Children's Toys and Books

Sad. It is really sad the extend to which manufacturers are willing to put our children's health and lives in jeopardy to just make a profit.

The current batch of recalls tend to be related to paint that has high amounts of lead, which brings me to wonder what about the children's books and ink? How much lead are in those? Is anyone even testing children's books?

Here is a site that is trying to list toys that have been independently tested to be free from surface lead and embedded lead. Unfortunately they do warn that even though these toys tested OK, that does not necessarily mean other batches of the same product (future or past) will not contain lead.
http://www.toyportfolio.com/

Get the Lead Out - Reply

I came across the following post:
http://atatude.wordpress.com/2007/12/10/get-the-lead-out/

It had a reference to the following CNN article on Lead in Christmas Lights:
http://www.cnn.com/2007/HEALTH/12/10/christmas.lights/

My reply:

Nice find on the CNN article!

Who do they think we are? A bunch of mindless idiots who will blindly buy their products irrespective to the toxins they are willing to dump in to them so they can make a bigger buck? Sure sounds like it from some of the responses given by Wal-mart and other companies that were interviewed.

I think the only way these arrogant companies will learn is through the bottom line. When parents stop spending "their" money on these tainted products and even return the products that have been recalled, their profits will suffer. Please do not just throw away recalled products, but try to return them. There is no better way to make the irresponsible retailers and manufacturers realize what the true impact of their "mistakes" will cost them.

If surface lead can come off with a wipe test, just imagine how much lead comes off upon contact with the tree or other decorations? How much of that lead is microscopic to the point it is easily airborne too? How much lead are they putting in the artificial trees? How safe are the non-electrical ornaments? Since lipstick and children's toys has been found to have high levels of lead, what can we trust?

One point that should be made about blood tests for lead, is that the body completely absorbs all lead within about 30 days of exposure so blood lead tests can only check for recent exposures and is no good at prior exposures. Once the lead is absorbed in to the tissue, I don't think even detoxification treatments can remove it.

Last year I found some extension cords that were rated for indoor and outdoor use that had a label that specified that they were lead-free. Lead-free products can be made if the manufacturers want to. Personally, I'd be more than happy to pay a 20% or even 40% premium if the product can be guaranteed to be lead-free.

Thursday, August 30, 2007

Go for the Bitter Coffee

Just wanted to share something interesting about how healthly a bitter cup of coffee may actually be. It turns out the higher the bitter content, the greater the amount of anti-oxidants. It appears that the bitterness is caused by the roast, so the darker the roast, the more anti-oxidants it may contain.

Check out the original story at Bitter Coffee Better Health with references back to the original studies (just in case this sounds too good to be true and you want to read it yourself ;-) ).

Also, as a note, there are many other interesting articles of note, all with a good dose of references too.

Thursday, July 19, 2007

Status of Safari and some comments about JavaScript and AJax

Sorry to say, but I have not been working with Safari for a while now. I did get a few comments pointing out some flaws in what I have done in the past. I am not too surprised, but luckily that is one of the best ways to learn and grow. I'll be activating those comments shortly.

As some background, I have tended to keep away from JavaScript in the past. The same holds true today, but at a lesser degree. The primary reason was cross browser compatibility and the fact that sometimes the JavaScript can get quite complex when you start to include all of the variations for past browsers and future ones.

One thing that has been winning me over is the JavaScript tools that are focused on prototype.js and the use of AJax. It also helps that the advanced features in CSS 2.0 and what will be coming with CSS 3.0 specifications will help reduce the need for scripting.

I have continuously been on the hunt for a good JavaScript based code set that allows table scrolling. I found a bunch of bad stuff out there. I found a few good ones too. One of which actually does work with AJax. I am wanting to post reviews and links to these tools for they are hard to find, and I think the information will be beneficial. The tool that works with AJax utilizes prototype.js which is great, but I have some enhancements that I am working on that will be increasing the performance by about a factor of 10 or greater (I think. Need to benchmark.) when dealing with rowsets greater than 1000 when the will be needing to deal with 40,000+, probably up to 100,000 rows... I know... I don't write the specs, just follow them :-(

For now I'll provide some links...

References:


http://www.sergiopereira.com/articles/prototype.js.html
  • Excellent independent documentation on prototype.js!
  • Using version 1.5.1

http://www.tetlaw.id.au/view/blog/table-sorting-with-prototype/
  • Excellent! Uses prototype.js and the code is very clean and readable.
  • Works with AJax
  • Sluggish with 1000+ rows. I have some fixes in the pipeline that once I get them tested I'll see about getting the code changes adopted.
  • Using version 1.0 with Prototype version 1.5.1 instead of 1.5.0_r
http://www.litotes.demon.co.uk/example_scripts/tableScroll.html
  • Works great with IE5, IE6, IE7, FireFox v2 (Windows and Mac OSx), and Safari
  • Low impact. Just call the function with passing the ID for your table and it does the rest.
  • Problem? It does not work with AJax. Works great with static HTML tables. Honestly, the code is a bit cluttered since it does not utilize prototype.js so it has to handle so much more internally.
  • Another problem appears to be that it was last updated in 2004.
  • Sad, it has strong potential if it was not for the lack of AJax support.

Thursday, March 01, 2007

Pet Peeve with Technical Help on the Internet

I guess I am just in a complaining mood, but one pet peeve I have with technical help on the internet is the lack of documenting some the basics.

These basics include:

  • timestamp of posting
  • technologies involved
  • versions of all technologies
  • clear descriptions on how to repeat the problem or the solution
  • posting the solution if it is found
  • citing references for solutions or other concepts

It is amazing how many websites have obsolete and dated information on them. At least blogs and message threads do timestamp their content, but when someone creates a website with general information, it is difficult to judge how old the content is.

I guess I could also complain about titles of documents and messages in that many people like to use very generic descriptions such “I have a problem” or “I need a solution fast”. I feel titles should contain the most basic essence of the content of the document. In light of technical help, when you are presented with a list of thousands of titles, it does make it easier to search through them if they were more logically created. Yes, and I feel the same way about email in general.

To summarize: Please give careful consideration to what you choose for titles and the content of postings. It may make for better searches.

Tuesday, February 27, 2007

Java Web Start – JNLP Tuning

My relevant environment background is as follows:
  • Eclipse v3.2.1
  • JDK 1.5.0_10

JNLP Tuning:
------------

It is possible to tune the JNLP files to improve performance in the loading of the jar files. For example, you can specify which jars are needed and which ones are optional. The point being that the application may not need to download all of the jars to get up and running.

There are two major components that I will list here. One is to specify which jar files need to be aggressively loaded versus ones that can be lazily loaded. The other technique is to list all of the contained packages in the related jar files so Java Web Start does not have to download all Jars just to find a class file or resource. The later will make for larger JNLP files and of course make them more complex, but could improve the initial download time for users to get up and running.

Both of these techniques should actually be combined to provide the greatest performance gains.

Regardless as to what techniques are used to improve the initial loading time of the jar files, once they are in the Java Web Start cache, the load time will be measured in seconds instead of minutes for subsequent launches of the application.

Example of lazy and eager loading
---------------------------------

A download hint of lazy or eager can be specified. Java Web Start will try to honor these hints, but if it cannot find a needed resource it may download all jars anyway until it finds what it is looking for.

<resources>
<jar href="plugins/mysql_connector_j_3.1.12.jar" download="eager" />
<jar href="plugins/org.apache.log4j_1.2.14.jar" download="lazy" />
</resources>

Example of Package and Part:
----------------------------

You can provide a hint to JWS as to what is contained within a jar by the use of the Package and Part within the JNLP.

Building upon the example under lazy and eager loading:

<resources>

<jar href="plugins/mysql_connector_j_3.1.12.jar" download="eager" part="mysqlcj" />

<jar href="plugins/org.apache.log4j_1.2.14.jar" download="lazy" part="log4j" />

<package part="mysqlcj" name="com.mysqlj.*" recursive="true" />

<package part="log4j" name="org.apache.log4j.*" recursive="true" />

</resources>

Part ties the package tags back to the jar tags.

The use of the recursive="true" attribute really can save a great deal of typing. Take for example the mySQL connector j example right above. It used a value of true on the recursive attribute, but if it were to use false, you would have to list out all of the possible packages contained in the jar even though they all began with com.mysql.

<package part="mysqlcj" name="com.mysqlj.jdbc.*" recursive="false" />

<package part="mysqlcj" name="com.mysqlj.jdbc.configs.*" recursive="false" />

<package part="mysqlcj" name="com.mysqlj.jdbc.integration.c3p0.*" recursive="false" />

<package part="mysqlcj" name="com.mysqlj.jdbc.integration.jboss.*" recursive="false" />

<package part="mysqlcj" name="com.mysqlj.jdbc.jdbc2.optional.*" recursive="false" />

<package part="mysqlcj" name="com.mysqlj.jdbc.log.*" recursive="false" />

<package part="mysqlcj" name="com.mysqlj.jdbc.profiler.*" recursive="false" />

<package part="mysqlcj" name="com.mysqlj.jdbc.util.*" recursive="false" />

References:
-----------

http://lopica.sourceforge.net/ref.html#package

http://lopica.sourceforge.net/ref.html#jar

Java Web Start and Eclipse – Feature Export and an Eclipse Bug

My relevant environment background is as follows:
  • Eclipse v3.2.1
  • JDK 1.5.0_10

Eclipse 3.2 Bug with Exporting a Feature to Java Web Start
----------------------------------------------------------

There is a known bug in Eclipse version 3 that generates the wrong name for an Eclipse plugin when exporting a Deployable Feature.

The bug is marked as fixed and has also been marked as being incorporated in the main stream releases of various versions of Eclipse, such as v3.2.1. But the bug still remains.

The symptoms of this bug is the following stack dump when attempted to run under Java Web Start:

!SESSION Tue Feb 06 10:48:01 EST 2007 ------------------------------------------
!ENTRY org.eclipse.core.launcher 4 0 2007-02-06 10:48:01.112
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at org.eclipse.core.launcher.WebStartMain.basicRun(WebStartMain.java:58)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.WebStartMain.main(WebStartMain.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

The cause is that Eclipse is generating the plugin with a name of org.eclipse.osgi_3.2.2.R32x_v20061101.jar when it really should be org.eclipse.osgi_3.2.2-v20061101.jar.

Depending upon your version of Eclipse, you may have different versions of this jar file. All that is needed to be done is to remove the .R32x_ and replace it with -.

You must also modify the generated JNLP file to reflect the new name.

This will occur each time you perform an export of a Deployable Feature.

The reason why this is an issue, is that internally to the plugin, (or other plugins that are trying to find this one), it is using a different name/signature that does not match the use of .R32X_ .

References:
-----------

https://bugs.eclipse.org/bugs/show_bug.cgi?id=125867

http://eclipsezone.com/eclipse/forums/t64274.html

Java Web Start and Eclipse - Signing Jars and Hibernate

As a quick note:

If you are deploying an Eclipse Plugin as a Java Web Start, there are some changes that must be made to your application to ensure it plays well with everything.

This is the first of a few quick notes on the subject. I am starting with this issue, since it was the most difficult to find a resolution for.

My environment background is as follows:

  • Eclipse v3.2.1
  • hibernate plugin : com.hibernate.eclipse_3.2.0.beta9a
  • JDK 1.5.0_10

Java Web Start is basically a tool that Sun provides that allows users to run Java applications that have been bundled in Jars on their computers. It has limitations similar to those imposed upon Java Applets, but if the jars are signed, then the Java Security Manager can grant full access to all resources on the local computer. It may take a while to download numerous signed jars and verify their signatures, but once they are downloaded, rerunning the application the start time can be measured in a matter of seconds instead of minutes. JWS also provides nice features for updates and utilization of different JDK versions.

Jar Files MUST be Signed
------------------------

All jar files that are being deployed must be signed if your application must access resources outside of the sandbox. If a jar file is to be expanded on the client's computer, all nested jars must also be signed.

Java, at least 1.5 and lower, cannot deal with nested jar files. When such a situation occurs, as with the Hibernate plugin for Eclipse, Xerces, or even the Eclipse core plugin for example, the jar file must be expanded before the resources can be accessed. When the contents of a jar file is expanded, the resources it contains is no longer digitally signed (if it was decompressed, it will not match the digital signature). This is an issue for the nested jars, since they generally must be signed.

The only exception to this rule is with the Eclipse Hibernate plugin. The two jar files that cannot be signed are: hibernate3.jar and cglib-2.1.3.jar. If these two jars are signed, the following exception will result:

java.lang.SecurityException: class "com.mypackage.MyClass$$EnhancerByCGLIB$$a1a0f853"'s

signer information does not match signer information of other classes in the same package

The key part of the above error message being "signer information does not match signer information of other classes in the same package".

A side note:
------------

I am unable to find the reference that states all nested jars must be signed (it is also a low priority to find it). Signing nested jars files works with the exception above. Upon searching for the problem as listed with the ‘signer information does not match’ exception, I have found that many other people have also signed the nested jars before exporting the plugins out of Eclipse.

To me this just sounds wrong on a few levels. I have not had the chance to really test this theory by unsigning these plugins, but it will solve that question. If it does work without signing the nested jars, then it does make sense that when JWS initially expands the jars, it keeps track of the original signature and that all expanded resources has having passed the verification.

If you have references that point to the fact that nested jars do not need to be signed, please let me know. I will probably run some tests in the next week or two to verify this.

References:
-----------

http://groups.google.co.za/group/CTJUG-Forum/tree/browse_frm/month/2006-05?_done=%2Fgroup%2FCTJUG-Forum%2Fbrowse_frm%2Fmonth%2F2006-05%3F&

States that "Never sign hibernate???.jar and cglib???.jar. They seem to work just fine as they are."

http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/development.html#security

http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/contents.html

Thursday, December 07, 2006

Lead and Christmas Lights

Lead is a highly toxic poison. There are no safe levels of exposure for children for it causes irreversible brain damage.

Lead should be outlawed in consumer products. Period.

Let technology find an alternative substitute.

Some Links:
http://jfaughnan.blogspot.com/2006/11/lead-poisoning-from-christmas-lights.html
http://checnet.greenhome.com/products/kids/art_supplies/107864/
http://answers.google.com/answers/threadview?id=435871
http://www.babycenter.com/comments/toddler/toddlersafety/10453
http://news.thomasnet.com/fullstory/469079/3839

Thursday, October 05, 2006

Useful Links for Web Development on Safari

Below are some useful links for doing web development for Safari.

Links for Limited Safari Technical Documentation
http://developer.apple.com/internet/safari/safari_css.html - This is a good quick reference. Do not assume this list is the complete listing, for it is not. It dates back to around 2004 and has not been updated. To get the full supported list try the following link.

http://developer.apple.com/documentation/AppleApplications/ Reference/SafariCSSRef/Articles/StandardCSSProperties.html# //apple_ref/doc/uid/TP30001266-SW1 - This is the full supported listing of all CSS properties. Not sure when this was published, but it is more recent than the above link. There is also the CSS Extensions that are included in Safari: see the next link.

http://developer.apple.com/documentation/AppleApplications/ Reference/SafariCSSRef/Articles/CSSExtensions.html# //apple_ref/doc/uid/TP30001265-SW1 - These are the CSS Extensions. All two of them! ;-) Try clicking on the link “show TOC” for more information from Apple.

Miscellaneous Links
http://builder.com.com/5100-6371-1050180.html#Listing%20F - An alternative solution to dealing with different media types. Using the @media in your style sheets.

http://developer.mozilla.org/en/docs/Images%2C_Tables%2C_and_Mysterious_Gaps - Gaps around images


Links from Apple
http://developer.apple.com/internet/safari/index.html - Apple’s Developer Domain’s Safari support page

http://developer.apple.com/internet/safari/safari_css.html - CCS reference for Safari. Out of date, but useful for those elements that are on the list.

http://developer.apple.com/internet/safari/uamatrix.html - Mac OS, Safari, and WebKit version matrix.

NOTE: WebKit is also the engine that drives not only Safari, but also the Mac’s Dashboard, Mail, and many other applications. This website may contain all of the updated documentation that I have been looking for. Actually not, it is mostly driven to developmental focus of the WebKit itself.

http://www.ecma-international.org/publications/standards/Ecma-262.htm - The JavaScript standard that Safari (WebKit) is based upon.

CSS Related Links
http://meyerweb.com/eric/css/edge/ - CSS Edge

http://www.quirksmode.org/viewport/compatibility.html - Screen dimensions

http://www.quirksmode.org/dom/innerhtml.html - Benchmark - w3c DOM vs. innerHTML


JavaScript Related Links
http://webkit.opendarwin.org/blog/ - Has some information on JavaScript.

http://www.alexking.org/blog/2004/03/01/mac-browser-javascript-performance/ - Has comments about browser performance. John Strung comments that turning off all languages other than English (or One) "can significantly speed up Safari". He is ASKING if anyone has tried this, so mark this down as RUMOR.

http://www.codehouse.com/javascript/tips/random_letter/ - Creating random characters

http://www.quirksmode.org/css/overflow.html
Quirksmode CCS - Contains some interesting aspects to CSS
Quirksmode CCS - Not For N4 CCS
Quirksmode CCS - Tables CCS
Quirksmode CCS - JavaScript

http://www.javascriptkit.com/jsref/regexp.shtml - JavaScript Reference

Table Related Links
http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#edef-TD - Information on how percents are only a hint

http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.5 - Table information

http://www.quirksmode.org/viewport/compatibility.html - Idea for adjusting width was found here.

http://www.workingwith.me.uk/articles/scripting/standardista_table_sorting - Table sorting
http://sourceforge.net/project/showfiles.php?group_id=162528 - Download for STS


HTML Links
http://www.w3.org/TR/1999/REC-html401-19991224/cover.html#minitoc - HTML v4.1 DOM specs

http://developer.apple.com/documentation/Cocoa/Conceptual/WebKit_DOM/index.html# //apple_ref/doc/uid/TP40001242 - DOM level 2 Specs

DOCTYPE Links
http://alistapart.com/stories/doctype/ - Good and informative, but note that it was written in 2002! Double check the current standards before using.

http://www.w3.org/QA/2002/04/valid-dtd-list.html - A detailed listing, but does not explain each usage.

http://www.w3.org/TR/html401/struct/global.html - Global Structure on an HTML document. Covers the DOCTYPE. Good information and a few more links.

http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/doctype.asp - MS’s perspective on DOCTYPE and IE v6.x.

http://msdn.microsoft.com/library/default.asp? url=/library/en-us/dnie60/html/cssenhancements.asp - CSS Enhancements for IE v6.x.
- This is also an excellent document that identifies what some (or all) of the differences are between compatibility mode and standard-compliant mode. It should be noted that standards-compliant mode is not measured against the current W3C standards, but the preliminary suggestions.


http://www.htmlhelp.com/reference/html40/html/doctype.html - Has a fairly good description as to the differences between Strict, Transitional, and Frameset. The comment about Quirk mode for IE v6.x is incorrect see the table above for the correct usages of the quirks mode with IE v6.x.

Performance Related Issues with Safari 2.0.x

There are some obvious performance issues with Safari.

TEXTAREA used in TABLEs

This is very common problem within some corporate application when trying to deal with any aspect of a table that has many TEXTAREA tags. The symptoms are a page that is very slow to load, close, update, and refresh. Assuming there is one TEXTAREA tag per table cell. Depending upon the processor power of the Mac this may occur with as few as 35 columns with 10 rows to about 30 rows before the response time starts to become unacceptable.

These performance issues do not exist if the TEXTAREA is replaced by DIV elements and performance can be increased by a factor of about 1500% by using DIV elements instead!

My guess as to the cause of this that TEXTAREA elements are defined in terms of “rows” and “cols”. These values do NOT directly map back to the W3C standard units of measurements and I suspect that there is a problem in the translation of rows and cols.

It is an incorrect usage of the TEXTAREA element to used for formatting of a table cells or other parts of the HTML document. CSS should be used instead. I suspect it was just easier for some programmers to specify container size in terms of rows and columns.

Large Select Statements

Safari tends to have performance issues when a single select statement may have well over a few thousand entries. An example would be the pick lists for issues such as routing comments.

There is basically nothing that can be done for these situations except for perhaps reducing the number of entries in the list, which may not be appropriate. Businesses should be more aware of the nature of the user interface than to expect the user to literally scroll through thousands of entries in a list.


Some Links

http://www.w3.org/TR/html4/interact/forms.html#h-17.7 - TEXTAREA as defined by the HTML v4.1 standards

What Browser Platform Should be Used For Development?

The question as to what browser platform should be used for developing a web application is a good question to ask. In the past the answer has been: What is the most popular? What will support the features? What will be around in the next 3 years? What are our developers already familiar with?

In the past, if the development was to be kept simple only one browser would be chosen for the target audience. That has been IE in most circumstances.

With today’s emphasis on standards, the answer may not be a specific browser, but more so a given standard. With the current market shares being held by IE at 84.7%, Firefox at 10.05%, and Safari at 3.19% is a total of 97.94%. Assume that most IE users will upgrade to v7.x within the first year of release, and you have a profound percent of the population using a W3C standard compliant browser! So the answer is not what browser you should develop for, but instead what standard.

The second question is, to what browser’s implementation of the standard should you develop for? Why? Because not all browsers will be able to implement 100% of the standard at the same time. Once again, the answer should not be a specific browser as the target, but instead, what features of the standards are supported by the most browsers should be the question.

The goal is to make your application more compliant with what the masses are using. The best way to achieve that is though generalization of what browsers have currently implemented. I am sure that when IE v7.x starts to hit the market you will be able to find more resources comparing the low level components of the standards to all browsers. It should be easier to find out what has been well implemented and what may be best to avoid.

This philosophy may make the most sense with new development. It may be difficult to provide an incremental set of changes to an existing application to comply with the new standard, especially if the support of these new standards are being turned on through the DOCTYPE, which is an all or nothing situation in the use of the new standards.

Friday, September 15, 2006

Macs Cursor Keys

One thing that can cause some issues when using Safari is that the Mac keyboard (OS) generates different key values for the cursor keys. Most applications that monitor key strokes will tend to discard any key value that is above 128, so for the Mac, the cursor related keys get ignored or worse yet, generates error messages indicating an invalid key was entered.

The following are Mac Key Codes values for Cursor related keys:

Key Code
Up Arrow 63232
Down Arrow 63233
Left Arrow 63234
Right Arrow 63235
DEL (fn-delete) 63272
Home (fn-LeftArrow) 63273
End of Line (fn-RightArrow) 63275
Page Up (fn-UpArrow) 63276
Page Down (fn-DownArrow) 63277


Please note that when these same keys are tested on IE v6.0.2900 for XP Pro, they did not generate any events within the JavaScript's window.event! They must be treated like silent modifiers. I would have thought that at least the DEL key or the BACKSPACE key would have a key code value being trapped.


One odd key is the ESC on the PC. It produces a code value of 27 and clears the text area. I don't know if that is expected or always a desired behavior.