Monday, April 19, 2010

need features

C++ need to be improved at least in two things:
1. An ability to call the base class constructor in any place of the derived class constructor, not only in that special section.
2. An ability to declare the overridden virtual method explicitly, to let the compiler verify is there a corresponded base virtual method.
3. Separate read and write data members protection.

Tuesday, April 6, 2010

Speak up!

I hate Microsoft - because they think only how to wide up the buyers mass, not about the quality of the products. They ignore common sense and needs of IT people favors only crowd of users.
I hate Apple - because of hordes of followers not only among the end users but also the competitors.
I hate GNU - because I believe they disfigured the common sense about the idea of paid software.
I hate touchscreen PDAs and smartphones - because I'm not an octopus and not Davy Jones.
I hate priests - because mostly they are fat corrupted liars .

Web Browsers nightmare

There is a problem exist with modern web development. For somebody it may be not a problem at all, but I'm blocked up by ....... and have to face it. The problem is the coexisting of the web server session management and multiply open browser's tabs/windows. Each window should have its own session on the server. When a new window opens, the new, its own session has to be created.
It would be said loud, it's not a problem at all if browser's url contains all necessary information about what actual data is being browsed/edited. But sadly, not in this case.
I wonder, what the W3C thinks about that? They invented the sessionStorage object which is supported poorly (IE, Opera) or is not supported at all (WebKit) by modern browsers.
It seems my vision and needs are in contrary with the browser developers'. For instance, Opera has a feature called "clone tab", which creates an exact copy of an existed tab, of course with the sessionStorage object same values, ruining all my efforts to achieve independency of tabs.
Despite some advantages of the sessionStorage object it does not allow to solve the problem of independent session.
It's pity, to solve the problem it would be enough one simple extension to browsers API - session cookies stored separately in each window or tab.

Sunday, April 4, 2010

Exception fight

Yet again that java.lang.IllegalStateException occurs with "The content of the adapter has changed but ListView did not receive a notification".

Looking on the platform source, I see the following:

This is thrown in the ListView.layoutChildren() when adapter's getCount() is not equal to AdapterView<>.mItemCount.

AdapterDataSetObserver in an inner class of AdapterView<>, it assigns the AdapterView<>.mItemCount in own method onChanged() taking the value from the adapter (AdapterView.java:778).

An AdapterDataSetObserver instance is AbsListView.mDataSetObserver, created in ListView.setAdapter()

Where that onChanged() called from? It need to be called before the adapter starts reportn the new count number. I see it's called only on some header/footer adds and removes in the ListView class.

mDataSetObservable is created in BaseAdapter and notifyDataSetChanged() passed to it.

Assuming those objects are related, I just need to change the data in adapter in the UI thread on completion and then call notifyDataSetChanged()

Wednesday, March 31, 2010

Capacitive solution

Got a package directly from HongKong ordered at cellphoneshop.net
This store is good, selling cheap accessories and ships it right from Asia shores.
So, now I have a capacitive stylus and a protective screen for my new Nexus One.
The stylus is very weird, its rubber tip is not sharp ended at all and you need apply it strictly perpendicular to the screen surface, or else it won't work. At least it allow type more easily taping the screen, but almost impossible to use it to drag something.
The protective screen package's instruction is just four tiny not discernible pictures, so I did not understand their meaning and did something wrong left some areas not firmly attached and also I scratched the screen a little trying to use the special included little card which I assumed supposed to smooth out bubbles.
The protective screen has not protected itself from scratches...
But! The new surface feels so good! I like touch it and no more greasy traces!!!

Tuesday, March 30, 2010

unit replaced

Received replaced "Nexus One" from HTC. Gosh, that was swift! They used an overnight FedEx in both ways, and I got a working phone back in two(!) business days.
HTC customer service is outstanding!!!
Thank you HTC and thank you Google!

SeaMonkey 2

Google docs site stopped working with old version (1.x) of SeaMonkey browser, but newer version (2.x) is not compatible with the theme pack I made. The default one looks ugly. So I postponed the upgrade.
But recently I found out there is quite pretty theme for the new SeaMonkey available.
So, now I'm with 2.0
One major difference is discovered - it does not keep a process in the memory anymore, loading each time fresh. It loads pretty fast, though.
Another problem - they have reversed the mouse wheel direction and have not provided any option. What a stupid decision! I scroll the wheel toward myself because I want see the page context closely, but in this version the content becomes smaller. Another case when stupid majority overruled a common sense.

Upd: In this case I was stupid. I've found how to change the direction and it's exactly how it was suggested. The only difference, I should do it using the UI dialog, not by the about:config preferences.
So, to reverse the zoom direction need to uncheck the "Use system default" checkbox and enter the "-1" value to the "Scroll the document by" input field. That's it.