in

Emerald Hand

Emerald Hand, Inc. community home page.

This Blog

  • Home
  • Contact
  • About
  • Directory of Computers/Tech Blogs

Syndication

News

I'm back to blogging

Worm in liquid maze

Design and development of information management tools.

May 2005 - Posts

  • Blog promotion

    I’ve been looking into ways to promote this blog. So far there’s no noticeable progress, but sooner or later more people will come to check the world of liquid maze out. Anyway, there are several ways to promote that I could think of or that were suggested by a friend:

    1. Submit the blog to regular search engines
    2. Submit the blog to blogs specific search engine and directories
    3. Create a mirror blog in a community of blogs, where the blog will get listed and promoted automatically
    4. Sign all my posts on the internet and e-mails I send with the link to the blog
    5. Reference other blogs and track back link will appear automatically, or at least it should in most cases
    6. Ping (report to a sevice when a new post is created) weblogs.com or similar place

    I will spread description of each approach across several posts. At some point in time I might also think of some other way to promote and in such a case I will write about it too. Before I move on I should mention that these are the possible steps to take in order to make people more aware of the blog. Quality and freshness of content and presentation is also important and I intend to keep on writing posts on topics that I consider interesting. Still, if nobody is aware that the blog actually exists and it is not listed anywhere than there’s a slim chance of anybody stumbling across it. I also want to point to a good article posted in the blogger.com help systemPromoting Your Blog.

    1. Submit the blog to regular search engines

    It's obvious that for the blog to be indexed by the search engines they must have the link to it. In most cases, they get the link from the front page of the website or from some other website referencing the blog. I don’t have a front web page up yet and I also haven’t really left the link anywhere on the net. Event if I would have left such a link somewhere the search engine’s bot would probably take it’s time to reach and index the blog. To help the bots out I went ahead and submitted the blog to MSN and Google . I’m not sure if this will help people find the blog in a short run, as I understand it takes a while before the search engines start showing the indexed website to the users who are looking for something. In the long run though I hope people will be able to find a post or an article that will help them to solve a problem they’re having.

    In the next post I will talk about blog communities and the concept of the mirror blog.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
    Readability Stats: Word Count: 474; Sentence Count: 19; Grade Level: 10.3, more info...
    Posted May 31 2005, 02:04 PM by Ornus with no comments
    Filed under:
  • RSS feed working Atom is broken now

    RSS feed started to work all of a sudden. It actually started to work as soon as I posted that it’s broken, but I wanted to verify that it works before I said anything about it. Atom feed on the other hand is not working correctly. All posts are present, but it reports invalid feed modification date. A lot of aggregators use "modified" field to see if it’s worth putting more strain on the server to get the feed. Atom sets modified date from the first post, not the last and as the result, some aggregators might not download the feed. RSS doesn’t appear to suffer from this problem and it’s best to subscribe to RSS feed now…

    Because of all these problems I can’t wait for the next version of CS to come out. I feel bad that I’m spending the time to write posts on this blog, but that readers might have troubles reading it. On the brighter side, CS 1.1 RC1 is out. It probably does fix these problems, but remembering how many problems 1.0 release had I think it’s better to wait for the 1.1 release.

    P.S. Here's the link to the original post on CS forum describing the feeds problem: http://communityserver.org/forums/479463/ShowPost.aspx

    [Edit] RSS feed problem remains. CS puts posts in bulks in RSS, so RSS is usually lagging behind with the posts.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
    Readability Stats: Word Count: 246; Sentence Count: 19; Grade Level: 3.8, more info...
    Posted May 31 2005, 07:57 AM by Ornus with no comments
    Filed under:
  • Improving JavaScript performance

    I didn’t get to promoting my blog yet. Not enough free time. Nevertheless, that is what I’m planning to do next right after I finish this post.

    I spent a lot of time lately working on improving JavaScript performance using Mozilla’s debugger. It’s free and collects all the data I need, as well as outputs it in .csv format for any spreadsheet application to read. The only downside is that it only works on Mozilla or Firefox. Scripts that I optimize do start to run faster in IE as well, but I don’t get to see what actions take longer to complete in IE vs. Firefox. I do get a feeling that scripts run faster in Firefox, but that script engine initializes faster in IE. In other words, the code loads and starts executing earlier in IE, but takes less time to run in Firefox. I haven’t confirmed this and I don’t see a good and easy way of doing it.

    There are couple of things that I’ve learned about JavaScript performance. It’s slow, much slower than compiled or hybrid (like .NET) languages and so it is much more important to balance objects reuse vs. creating new ones. Object creation can become very expensive if there are 100s of them created. On the other hand, caching and object reuse can make code more complex. Balancing one vs. the other becomes more important in JavaScript since the margin of error in design is smaller.

    Another thing I’ve noticed is that function declaration in local scope can become expensive if the code inside local scope is executed 100s of times. For example if you’re expecting that some object will be created often try to take as many functions declarations out of the constructor and into the prototype as possible. This is in essence the problem of object reuse vs. new object initialization, since functions are objects too. I did not expect this to be a problem and ended up having to refactor the code around. The code performance increased by around 40% according to the profiler. That’s quite a lot! In the future, I hope to avoid these problems.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
    Readability Stats: Word Count: 371; Sentence Count: 28; Grade Level: 6.8, more info...
  • CSS and script performance in IE

    It doesn’t seem that there are a lot of people, practically nobody, reading this blog. This just won’t do. I’m going explore the ways to promote it as soon as I get some free time and several of my future posts will likely be on what I’ve tried and if there’s any immediate noticeable result.

    Returning back to the floating in IE now. I’ve been working with CSS lately attempting to improve visual presentation of the menu control and encountered the following problem. Imagine there’s an element with some script responsible for updating the CSS class of the element when the mouse pointer moves over it or in response to some other event. The behavior I’ve observed was that if the element is floating, to the left or to the right, or is inside of a floating box (any of the parent nodes are floating) the event handler takes longer to complete. I suspect when the class of the element is modified it takes longer for IE to visually update the element than if it would not have been floating, and so the script runs longer. Firefox doesn’t seem to have this problem, but then again Firefox script engine seems to be faster. Whatever the cause it would be nice if the problem would be mentioned somewhere in IE documentation. I won’t be surprised if there are other problems of similar nature with the CSS elements.

    The worst part is that a lot of CSS problems are unpredictable. In certain cases they appear, in some they don’t. I remember having the problem (described above) when I was limiting the width of a list (<ul> tag), but it disappeared if I started to limit the width via child’s (<li> tag) CSS style object. Now there doesn’t seem to be any problem no matter if I limit the size of the list or the list item. I’ve also seen reports that relative width ("width: xx%") or placement of the link pointing to the CSS sheet (body vs. head) can affect the browser’s performance - http://www.experts-exchange.com/Web/Browser_Issues/Q_21140730.html. It’d be nice if there would exist some kind of list of what implications certain CSS properties may have on the browser’s performance. I couldn’t find anything on connection between CSS and the browser performance, so if you have any additional information on the subject I would love to hear about it. If at some point I get enough data I might even publish a list on my own if there isn’t one by that time.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
    Readability Stats: Word Count: 451; Sentence Count: 23; Grade Level: 8.3, more info...
  • Community Server 1.0 RSS feed

    I was meaning to write about a bug in Community Server 1.0 for the last couple of days, but other issues kept my attention occupied on them. Blog's individual RSS feed is not getting updated properly. Atom feed is fine and has all the posts. RSS feed on the other hand is out of touch with the latest blog updates and as of right now shows only the first two articles. Needless to say I'm quite disappointed that such big issue was not fixed prior to release.

    The bug is recognized on Telligent Systems forums and there's a solution posted, which involves editing portal's source code and recompiling it. Now, even though I'm a developer and am familiar with .NET platform, I'm still reluctant to fix it myself. From my past experience I feel that compilation of such large project will not go smooth and there might be problems that I don't really feel like fixing. Plus after all that fuss I will have to actually test the fix and there's no guarantee RSS feed will be working correctly. So I recommend you subscribe to the Atom feed until the next version of Community Server is released, which will hopefully have the issue fixed.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
    Readability Stats: Word Count: 212; Sentence Count: 12; Grade Level: 7.4, more info...
    Posted May 24 2005, 05:21 PM by Ornus with no comments
    Filed under:
  • Size of invisible elements in IE

    I continue working on my JavaScript UI library and today I had encountered an interesting problem. If an element is made invisible via “display: none” CSS statement in some instances IE will report it's “offsetWidth” and “offsetHeight” as 0. This behavior can make exact positioning of the element problematic if positioning takes into account object’s dimensions.

    I’m sure I’m not the first one to find it, and probably not the last one. I couldn’t find any documentation on this "feature" of IE anywhere, so to help people who might get this type of behavior I’ll describe what I’ve done to solve the problem. Instead of using “display: none” I’m using “visibility: hidden”. They are similar, but not exactly the same. “visibility: hidden” does hide the element, but keeps it in the page flow of the document. Where there was supposed to be an element, there’s now a blank space. To eliminate that effect I apply the following CSS to the element: "{ position: absolute; top: 0; left: 0 }". There’s nothing to this trick and I’m sure it has been done before. I’m also not sure if this is the best solution, but as much as I've tested it, it seems to works fine.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
    Readability Stats: Word Count: 214; Sentence Count: 12; Grade Level: 8.6, more info...
  • JSDE Part II

    In my last post I talked about what tools I use to make coding in JavaScript easier. Today I will write about tools I’m using to develop the actual code and find answers to confusing problems.

    Most of the code is written in Visual Studio.NET 2003. I also use it to debug the code running in IE. It doesn’t support intellisense for JavaScript, but it provides nice highlighting. It automatically generates list of all functions in the current file making it easier to jump around the code. It’s fast, or at least faster than any of Java based editors with similar features. Best of all it has a built-in powerful debugger that makes it easy to start debugging away if I can’t understand why something is happening in an unexpected way.

    I also want all of my code work in Gecko (it's an engine used by Mozilla, Firefox, and other browsers) and to verify that it does work correctly in it I use Firefox. All unit tests have to pass in both IE and Gecko, which can be a complicated task sometimes. IE and Gecko react differently to certain code. Some difference can be very small, but implications can be big. To dig into the code while it’s running in Gecko and see what’s happening for myself I’m using Verman JavaScript Debugger. It is not as easy to use as VS debugger, but can stand up to the task of learning the browser behaves certain way. It actually helped me solve some complex problems that I would never figured out with out it.

    Most of the time I can’t remember every little detail about the language and libraries I’m using. I know the syntax, but I often forget about methods and properties of built-in objects. To find more information on what I need to know I use couple of sources. Most of the time I search MSDN which has a very nice section on JavaScript development, as well as IE DOM. However as I’m also writing for another browser I’m using Mozilla DOM reference to figure out how to do something in Gecko. These two sources are not always enough to learn everything I need to know. In rare cases when I need even more information I fall back on Google and other sources. There are too many links to write about today so they will get their own dedicated post.

    On rare occasions I need to quickly open a script or text file. To read it I use Notepad2. It’s great and is probably one of the most useful tools in my arsenal. It’s very quick, supports text formatting and highlighting and is free.

    This is it folks. At some point I will make a post with a references to all of the tools I've encountered that I think could be used to solve some specific problems, but everything I wrote about in this and previous posts I use on daily basis.

    If you have any suggestions on how to improve my everyday development life I would like to hear about it.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
    Readability Stats: Word Count: 541; Sentence Count: 31; Grade Level: 7.3, more info...
  • JavaScript Development Environment

    I didn’t get to post yesterday, so I’m trying to catch up today. As promised, I’m going to write about various tools and libraries I use which help me with JavaScript development. I might even get wild and get to the part where I discuss how I’m doing the actual development.

    For starters I should probably point out that I’m using Test Driven Development methodology, a.k.a. TDD. I go through all the trouble of writing automatic tests before writing the actual code that passes those tests, and often test code ends up being of the same size as the production code. Nevertheless, I can’t imagine writing code any other way now. I know it’s possible, I used to do it in the past, but it’s much harder without tests. They are especially helpful in verifying that everything works in both Mozilla and IE. The actual framework I use to run tests in is JSUnit. It is nice and out of all JavaScript Unit Testing frameworks I’ve looked at this one provides the best features. For example, it supports running tests from Ant which makes it possible to test websites using continuous integration.

    I like it when the code is easy to write, as it usually means it will be easy to read the code as well. Unfortunately, JavaScript does not look well when one attempts to write Object Oriented code. Messing around with prototype produces counter-intuitive code. In addition to that, JavaScript has limited support for such essential features of OO as inheritance. It can be done, but it's not a trivial task. So to overcome some of those problems I settled on using JSOLait as a foundation library to enhance JavaScript functionality. It makes it much easier to overcome aforementioned problems. In addition, it allows creation of modules that can be loaded on the fly. That means that the user of the library can only load one component that he wants to use, and all other components that the first component relies on can be loaded automatically from inside of it.

    JSOLait provides couple of components to work with strings, XML, encoding, encryption, XML RPC, HTTP requests, etc. What I’m doing is writing modules to work with browser DOM directly, as well as modules that allow creation of common visual controls.

    Writing code is not enough. It is also important to have documentation for it, especially if it is to be used by other people. I’m using NaturalDocs to help me generate documentation for the script files I create. I’ve looked at several documentation generation tools and this one provides the most satisfying features. The tool parses script files, pulls out all comments entered in a certain format and automatically generates documentation. This results in documentation, which makes it easy to look at the API of the library. At the same time, the comments in the code for the NaturalDocs to extract are very friendly and easy to read. I have C++ and .NET development background and so I’m not used to the format used by other JavaScript documentation tools, which are based on JavaDoc. This makes NaturalDocs comments look much nicer to me. NaturalDocs also relies completely on parsing of the comments and doesn’t look at the actual code. Because of that, it doesn't matter how the the function is declared in JavaScript.

    I hope you might find these tools useful if you do any kind of web development. Tomorrow I will write more about what I’m using.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
    Readability Stats: Word Count: 605; Sentence Count: 39; Grade Level: 8.0, more info...
  • Complex world of JavaScript

    I’ve been working a lot with JavaScript lately. It is a very cool language and is very flexible, which supports doing very neat things in it. It has it’s own limitations, but what language doesn’t? It is a scripting language and because of that it is very dynamic by its own nature. It allows to modify objects and methods on the fly and therefore opening a window to a whole set of new programming patterns, tricks, and ways to solve various problems. Even though I’ve been developing with it for quite some time, about a year and a half, it often feels like I’m just scratching the surface.

    I’m using it, as most JavaScript developers do, for client-side browser scripting. This only adds to the complexity of the development. Most popular browsers, such as Internet Explorer and Mozilla, support the actual JavaScript quite well. There are minor differences in how certain things work and I’m only aware of those differences. I’ve never actually had to work around them yet. However, knowing JavaScript is not enough. It needs to interact with the browser’s DOM for the user to be able to see any results of the script execution (there are small exceptions, but from a practical stand point it doesn't really matter). This is where things start to fall apart. Both IE and Mozilla allow doing very neat things through their DOM with the web page the user is looking at. However, they both require different approach to achieve the same goal. Mozilla is more W3C complaint, but I’m pretty sure it doesn’t implement the standard to the letter. It doesn’t matter anyway since the most widely used browser follows the standard to a much smaller degree. The most exciting part of working with DHTML – events, is totally different in IE.

    There are other differences as well, as well as bugs/features in IE that make it very hard to do serious script development. For example IE is pretty famous for leaking memory due to circular references between DOM object and JavaScript objects. Apparently, Mozilla does it too, but on such small scale that it’s almost impossible to notice. Anyhow, at first I thought it was a bug in IE, but now I’m not so sure. I’m more under impression now that Microsoft was not planning for IE to be used for serious web application development and decided not to go through all the trouble of making sure there was no leakage. Whatever the cause I’m not sure how hard it is to fix the problem in IE and I’m not going to point any fingers. My life doesn’t get easier though, since the problem remains.

    Well, I’ve got fed up with all the problems and differences, and decided to get my hands dirty and write by own JavaScript library to abstract what I don’t want to deal with away from me. Somewhere along the lines, I figured it would be cool to add commonly used visual controls, such as menu, to the library. So there you have it, I’m reinventing the wheel as I’m sure many developers wrote their own libraries to abstract away these problems. However, none of the solutions I found has satisfied me. Almost nobody for example take into account the leaky nature of the Internet Explorer. Therefore, unsatisfied and frustrated I have decided to spend some time and shape the wheel to the form I find the most pleasant to my eye. When it’s in a usable state I intend to release it under LGPL or similar license. Of course, I also intend to document my experience of writing it and post all neat tricks present JavaScript I learn about. Tomorrow, or sometime soon, I intend to write more about the tools I use, and about how they turn JavaScript development from very hard into just something hard.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
    Readability Stats: Word Count: 668; Sentence Count: 35; Grade Level: 8.5, more info...
  • In search for anonymous comments

    I’m using CommunityServer for the blogs, picture galleries and forums. Forums and gallery are empty for now and I’m focusing all my energy on the blogs feature. It seems like configuration of the blogs is pretty limited. Often, more often than I like, it feels like .Text was added to the CS application, but configuration of the CS was not adapted for the use with the blogs.

    There are specialized configuration panels for blogs, forums, and galleries. There’s also a configuration panel for the whole application, and that is the place that makes configuring blogs not very intuitive activity at the moment. For example to enable anonymous comments I have to turn on “Allow anonymous posts” option on, whose description says that this option controls anonymous posts onto the forums. After that, “Enable anonymous comments” option appears in each individual blog configuration, and it has to be manually enabled to allow anonymous posts. Now isn’t this slick? No, it’s not. It is counterintuitive. I’m still not 100% sure about what effects other options in the system configuration have on the blogs. CommunityServer is a very neat and useful web application, probably one of the best for ASP.NET platform with the features it provides, however there is still quite a lot of space for improvements.

    Unfortunately, this is not the only example of bad application configuration structure. Often application has some very neat and useful options buried under the layers of legacy design and bad decisions. At the same time, it is not an easy task to make configuration quick, simple, and intuitive for the user, and allow precise customization and control. I often see similarly bad trends outside of computer world, in electronic and mechanical tools.

    I don’t really have an answer for the problem of how to make the world around us easier to customize for our needs, but often I get an impression that configuration is added as an afterthought and as a result many qualities of a good and intuitive configuration are lost. It is very important to break away from this habit and look after the potential users. Too many people are confused every day by poor configuration designs and thus are unable to use various tools to their full potential.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
    Readability Stats: Word Count: 384; Sentence Count: 22; Grade Level: 10.5, more info...
    Posted May 18 2005, 11:37 AM by Ornus with no comments
    Filed under:
  • Iteration 1

    It seems everybody's blogging these days. Well, almost everybody. I can't say my grandma has one. Nevertheless, I've been following a few of the blogs personally and time has come to jump on the wagon myself.

    My goal is, of course, to make the most popular blog on the planet, which I most certainly won’t achieve due to the fact that most of the people are not interested in things like .NET and JavaScript development, XML, projects I work on, or what in the world is “liquid maze” and why would it have a worm in it. Still I will not know for certain until I try, and to do that couple of new posts will see the light every week. Most of them will be on what’s on my mind at the moment, but I will make it interesting to the readers.

    Later on you, dear reader, and me will get a chance to see where this blog will go. Oh, I almost forgot to mention that several posts on various development tools and just software I find useful are in the plans, so check back soon.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
    Readability Stats: Word Count: 190; Sentence Count: 10; Grade Level: 6.8, more info...
    Posted May 17 2005, 03:38 PM by Ornus with no comments
    Filed under:
Copyright © 2006-2007 EmeraldHand, Inc. All rights reserved.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems