December 2005 Archive

December 24, 2005

24
Dec
2005
Live Filtering
Posted by Eugene Lazutkin in Development::Python::Django ...

What is Filtering? It is a selection of items using some criteria (filter). In this tutorial I am going to filter documents of my blog (made with Django, of course) matching titles against user-specified substring. Later on I'll talk about generalization of this approach.

Just like a big boy I am going to use Custom Manipulators, which can be avoided, but I want to show how to use it.

We all want to improve end user's experience. To improve usability I'll put a little "live" in it using Ajax (courtesy of Dojo) later on. You can see for yourself how simple it is.

[Read more]

Save/recommend this post:  del.icio.us  Digg  Reddit  StumbleUpon  Facebook    Subscribe to this blog:  Bloglines  Netvibes

December 20, 2005

20
Dec
2005
TinyMCE 2.0.1
Posted by Eugene Lazutkin in Development::Web::AJAX

In case you missed it too: TinyMCE 2.0.1 is out.

I am getting a feeling that everybody is trying to roll out something for Xmas. Hmm. Maybe I should do it too.

[See details]

Save/recommend this post:  del.icio.us  Digg  Reddit  StumbleUpon  Facebook    Subscribe to this blog:  Bloglines  Netvibes

20
Dec
2005
Dojo 0.2.1
Posted by Eugene Lazutkin in Development::Web::AJAX::Dojo

Dojo 0.2.1 is out. This is a maintenance release, which doesn't change API but fixes some pesky bugs. Go and get it.

[See details]

Save/recommend this post:  del.icio.us  Digg  Reddit  StumbleUpon  Facebook    Subscribe to this blog:  Bloglines  Netvibes

December 17, 2005

17
Dec
2005
New releases
Posted by Eugene Lazutkin in Development::Web

Today I saw new search phrase, which brought visitors to my humble blog: rails 1.0 "Lost connection to MySQL server during query". Yes, you guessed it right! Ruby on Rails 1.0 was released 4 days ago. Scrip.aculo.us 1.5 and Prototype 1.4 were released as well.

On 15th Dojo 0.2 was released too. It sports many widgets, improved speed, and new BSD license, which was added to AFL. Now you can use it in GPL projects as well as in commercial applications even, if you don't understand legalese of AFL. Now there is no excuse for reinventing the wheel..

[See details]

Save/recommend this post:  del.icio.us  Digg  Reddit  StumbleUpon  Facebook    Subscribe to this blog:  Bloglines  Netvibes

December 16, 2005

16
Dec
2005
DIY and NIH syndromes
Posted by Eugene Lazutkin in Development::Rants ...

Many programmers have DIY attitude. It is understandable: they want to do new exciting stuff themselves. In some cases it is perfectly reasonable: exotic functionality, special requirements, performance enhancements, and so on. Sometimes incorporating 3rd-party library makes overall API inconsistent, which is bad especially for programming tools, or big projects.

There is a fine line between DIY and NIH, when DIY part is used without rational explanations. Of course, in some cases NIH is reasonable too, e.g., high price of acquisition of required 3rd-party tools, or intellectual property concerns.

In most cases DIY and NIH are not justified. If you see something like that you may assume that developers didn't do their homework, which is not acceptable in the Internet era. In many cases this ignorance is combined with aggressive protection of irrational decisions.

Spending years working on high-performance computer graphics I learned a lot of lessons. One of them was "structure your code as a thin layer on top of existing graphics APIs". The thinner your layer is, the faster your performance will be. Vendors spend a lot of time and money to improve graphics performance. Even if you found faster route, next vendor's version will close the gap and leap forward with MMX, SSE, SSE2, hardware acceleration, geometry processors, and so on. The battle was lost before it started. Yet I watched in amusement how Java camp constructed rasterizers in Java and built GUI on top of them! Of course that implementation was ditched after spending years in development. Nowadays successful Java programs use GUI toolkits, which are thin wrappers on top of native GUI primitives. This is the way to go.

But history has a way of repeating itself. You can see DIY and NIH in action in different fields. Today my favorite example is JavaScript libraries. JavaScript is highly restricted language. Browser market is Balkanized and every browser is different. Even if you can concentrate on a singler browser, don't forget that it may have and will have slightly incompatible versions. It is tempting to wrap the differences. And there are several high quality libraries, which do exactly that. Yet a lot of people are rolling out their own wrappers of XHR, their own remappers of DOM attributes, and so on. Just take a look at results of a recent Ajax Survey by Burton Group (Ajaxian has mentioned it in October along with some analysis). Whopping 40% of developers didn't use any toolkit, 13% used "other", which means "some home-brewed library" in most cases.

If you look for Ajax libraries, you will find hundreds of them. Most of them are done by a single guy, who was assigned to do it by his professor. You can imaging what kind of code can be produced by a fresher!

In my opinion the most productive contribution to software industry is to select one of high quality libraries and improve it. What about a talented lone coder? Even a genius will reach stars faster standing on shoulders of giants.

Alex Russell of Dojo fame gives yet another example why well supported library is better than a home-made solution: Dojo takes care of fine details of platform-specific optimization.

It is nice to reimplement something in your spare time for educational purposes. But if you are set to conquer the world, it is better to do it reusing existing tools while focusing on your mission instead of mundane technical details. It sounds like common knowledge to me yet we have a lot of examples to the contrary..

[See details]

Save/recommend this post:  del.icio.us  Digg  Reddit  StumbleUpon  Facebook    Subscribe to this blog:  Bloglines  Netvibes

December 12, 2005

12
Dec
2005
Snakes, rubies, and some comments
Posted by Eugene Lazutkin in Development::Python::Django ...

A week ago I posted a link to David's take on "Snakes and Rubies" event. Of course I am talking about article written by RoR's creator. It is a great read, but this time I've read reader's comments (or "challenges to the Loud Thinking"). Oh, boy! It gives you insight into Rails, Django, and their perception by developers and users. For example, I am not very familiar with i18n problem, but it looks like a lot of people were quite passionate about it.

In general it gave me a different prospective on problems of fellow DreamHost customer Alex Payne (outlined here). When I was setting up some of my stuff on DreamHost using Django I had to figure out some things: proper FastCGI setup, .htaccess incantations, and so on. I was kind of envious of RoR's users because "Ruby on Rails now fully supported complete with FastCGI!" (taken from What's New marquee section of DreamHost's main page). I assumed DreamHost had these problems solved. It did. I didn't know at that time that there are some other problems mentioned by Alex.

Django is rock solid, I never had problems with stability, memory leaks, and so on. My blog is up since August 2005 and so far this train is on schedule. Is it so because it doesn't use Rails?

And, yes, I am still getting visitors googling for "lost connection to mysql server during query rails" on regular basis. Sigh..

[See details]

Save/recommend this post:  del.icio.us  Digg  Reddit  StumbleUpon  Facebook    Subscribe to this blog:  Bloglines  Netvibes

December 10, 2005

10
Dec
2005
Django Ajax Redux
Posted by Eugene Lazutkin in Development::Python::Django ...

Three weeks ago we had a discussion about Ajax support in Django, which resulted in "Ajax and Django" wiki page. A short recap: it lists a vague goal, some general considerations, and possible strategies; it scratches the surface of existing implementations (mostly RoR), existing third-party toolkits (Mochikit/Dojo), and related RPC-style and REST-style services. No code was produced, no consensus was reached, but now it is a part of Django's Version One roadmap.

Now three weeks later I assume that everybody had time to think about it. I want to move the whole discussion on to a more practical plane. Basically I want to propose an implementation. At least I’ll collect your thoughts, criticism, corrections, and, hopefully, blessings. Giving the speculative nature of this proposal, which is based solely on my experience, I decided against posting it in the wiki in its present form. The size of this proposal is not conductive to mail list posting. Hence it is here. Saddle up.

[Read more]

Save/recommend this post:  del.icio.us  Digg  Reddit  StumbleUpon  Facebook    Subscribe to this blog:  Bloglines  Netvibes

December 6, 2005

06
Dec
2005
What RoR's creator think about Django
Posted by Eugene Lazutkin in Development::Python::Django

David Heinemeier Hansson (the creator of Ruby on Rails) wrote a little piece on Snakes and Rubies event highlighting differences between Ruby on Rails and Django. Very interesting read!

[See details]

Save/recommend this post:  del.icio.us  Digg  Reddit  StumbleUpon  Facebook    Subscribe to this blog:  Bloglines  Netvibes

December 3, 2005

03
Dec
2005
1st news on Django/Rails bash
Posted by Eugene Lazutkin in Development::Python::Django

Rob Lambert just posted his thoughts on Snakes and Rubies event in Chicago today. I am sure we will have more info later (including promised video) but it is an interesting read anyway. And it is available now.

Update: Eric Sinclair posted his notes on the event.

[See details]

Save/recommend this post:  del.icio.us  Digg  Reddit  StumbleUpon  Facebook    Subscribe to this blog:  Bloglines  Netvibes

03
Dec
2005
WebUI refresher
Posted by Eugene Lazutkin in Development::Linux::OpenWrt

I just released a refresher for OpenWrt WebUI alpha package. It fixes a bug, which was reported by several people.

Some users had problems with Net configurator applet, if wl0_country_code was unset in NVRAM. While it is extremely easy to set, I suggest reinstalling webui. Please read the original post on how to do it.

Thank you guys for your great feedback! Working together we will make webui even better.

[See details]

Save/recommend this post:  del.icio.us  Digg  Reddit  StumbleUpon  Facebook    Subscribe to this blog:  Bloglines  Netvibes

Made with Django.