Saturday, February 27, 2010

Denis Krjuchkov vs. Oracle

I’m glad to introduce yet another™ technology-related blog by Denis Krjuchkov, one of the most ambitious and highly talented software architects I’ve ever known. I’m pretty sure that the blog will be extremely interesting especially for those who is keen on investigating the very depth of modern software technologies, concepts and languages.

The first post is dedicated to a struggle with a weird bug in Oracle which prevents robust serializable access to database even when there is only one opened connection. So check this out.

BTW, the long-awaited DataObjects.Net 4.2 is planned to be released at the end of this week. Stay tuned!

Saturday, February 20, 2010

DataObjects.Net 4.2 RC’s health status

It is considered as a good and beneficial idea for a development team and the whole product’s development process to become more open for its community. DataObjects.Net 4 team shares these views and tries to move step by step towards the goal of openness and transparency.

We moved the project repository to Google Code, which means that everybody has access to the source code, revision history and changeset tracking. We started to use publicly available issue tracker. Anybody can report an issue, request a feature and vote for it. We use it by ourselves to track development tasks and therefore the current status of the development process can be seen on project’s update page. Finally, support forum is open 24 hours a day, so everybody is always welcome.

A part of our English-speaking developers began their personal blogs in order to share their thoughts, ideas, new concepts, samples and examples with the community. The most outstanding blogs are:

  • the well-known Alex Yakunin’s blog. A must have source of information if you are interested in .Net in general and in DataObjects.Net in particular.
  • Alex Kofman’s blog. Not so frequently updated but anyway, it is worth reading. Alex prefers to discuss general ORM-related concepts, often in DataObjects.Net 4 context.
  • Alex Ilyin’s blog. Although he doesn’t work on DataObjects.Net 4 directly but he makes a contribution to the project on everyday basis participating in hot discussions and reporting tons of suggestions and remarks. It is he, who tests the very green alphas of DataObjects in his sophisticated (and sometimes even a bit weird) scenarios.
  • This blog. As you are already here, I suppose that you know what the blog is about ;)

But sometimes I’m asking myself – is it enough to  feel and understand whether the project is healthy, robust, well-doing, or not? How to figure out the core understanding of the product’s quality through the deluge of these numerous activities?
Finally, I’ve got the idea. It’s all about numbers, not words. Unit tests results can be used to assess the health status of the product. For now DataObjects.Net 4 has almost 1000 unit tests for the Core part and almost 1500 tests for storage providers (In-memory database, Oracle, PostgreSQL, MS SQL Server) and such number of tests is enough for a simple statistical analysis.

Here is the indication of DataObjects.Net 4 RC’s health status for today (20-02-2010):

The green/red bar shows the percentage of successful/failed tests for the Core and every storage provider. Note that PostgreSql 8.2, 8.3, 8.4, MS SQL Server 2005 providers show no failed tests at all. The worse result is for Oracle, its 90% only. Support for Oracle 11g is still in beta stage but we are going to improve it. The next unlucky one is the provider for MS SQL Server CE 3.5, it is also waiting for a bunch of fixes as well as its big brother  - MS SQL Server 2008.

So, I’m going to invent this health status meter publishing on a regular basis. Hope you’ll find it useful. In this case it could move to the official website of the project.

BTW, in case you have any suggestions on the topic – don’t hesitate to post a comment or two. You know, you are always welcome!

Thursday, February 18, 2010

Google URL shortener for everyone

The above-mentioned Google service is definitely useful, especially for long URLs, but it has one big disadvantage, at least for those who prefer any browser other than Google Chrome and don’t want Google toolbar to be installed. Not a nice strategy for such web service-oriented company, I suppose.

Luckily, there is an alternative way to get your URLs shortened with the Google URL shortener. It doesn’t require any software to be installed, it is no more than a simple web page:

Note, that the project is not affiliated with Google.

Wednesday, February 17, 2010

Microsoft Sql Server CE 3.5 provider for DataObjects.Net 4

The first version of Microsoft Sql Server CE 3.5 provider for DataObjects.Net 4 is going to be officially shipped in the upcoming DataObjects.Net 4.2 release.

Let me shortly introduce Sql server CE’s limitations. So it doesn’t support:

Feature Where is used Workaround, if any
Temporary tables Local collections support Regular tables are created and dropped automatically
Full-text search Full-text queries -
Batches Batch database operations -
CROSS APPLY SQL operator “First”, “Single”, “ElementAt”, etc. LINQ methods inside sub queries;
”SelectMany” LINQ method without “DefaultIfEmpty” specifying
UPDATE FROM [Table] Upgrade procedure Another, but analogous SQL statement is used
INSERT DEFAULT VALUES Insert operation Default values are explicitly specified
Savepoints Nested transactions -
ROW NUMBER SQL operator “Skip” LINQ methods -
INTERSECT, EXCEPT SQL operators “Except”, “Intersect” LINQ methods -
nvarchar(max), varchar(max), varbinary(max) datatypes   text, ntext, image are used instead
COUNT_BIG function “Count” LINQ method Result of “Count” is explicitly casted to bigint type

But despite of all these limitations there is one huge advantage of CE usage: it doesn’t require separate installation. This is significant feature for developers who works on desktop applications for personal use, for example. Just ship, install and it works. No more problems with database server installation, connections, firewalls, network configurations, etc. Another case is running tests on your business model. Actually, you don’t need big database server for this.

In order to use DataObjects.Net 4 with Sql Server CE instead of his big brother, use the following connection url:

<domain connectionUrl="sqlserverce://user:password@localhost/<Path to your database file>"/>

Another option is to use native connection string:

<domain provider="sqlserverce"
        connectionString="Data Source=<Path to your database file>"/>

Sql Server CE 3.5 provider for DataObjects.Net 4 is already available in DataObjects.Net 4.2 RC.

Tuesday, February 16, 2010

File sync problem and possible solutions

It is well-known fact that an overwhelming majority of people are quite lazy, especially programmers. The latter invented functions and subroutines, classes and components in order not to code things twice. In this very case it seems that a sort of creative laziness can bring huge benefits to the world we are living in. But what if a person is not lazy enough to invent a brilliant idea or use an existing one? I was that person for last several years.

My problem was connected to my work. Not to the work itself but to the fact that I usually work at the office as well as at home and I want to get the whole working environment with me wherever I go. By the environment I mean not only projects that I’m working on (this case is handled rather well with the help of hg or subversion) but the entire set of files, documents, may be some music, electronic books, etc.

I tried a number of ways. The most long-lived one was an approach with a flash drive usage. I had to plug-in it every time I came to the office and upload the updated files onto my computer. Before I left the office I had to do the reverse operation – copy updated files back to the flash drive. The same routine was waiting for me at home. If I forget any of these operations – I get out of sync and simply can’t continue my normal working process.

The other options that I tried:

  • Working from home via VPN + Remote desktop. This is not very useful especially when your ISP is not stable. It requires that both computers are on, network speed is rather high.
  • Using a FTP server in order to  sync 2 computers. Not convenient, counts on your manual actions. But doesn’t require that both computers are on.
  • Using one of Opera unite applications such as File Sharing, or Document Sync + Document Courier bundle. The latter one is very promising though. Opera-based solutions don’t require external ftp server although the maximum size of synchronizable directory in case of DS+DC must not exceed 350 Mb.
  • Microsoft FolderShare – the same as the previous one but from Microsoft. Requires a specified application to be installed. Files are stored on your computer but the application provide access to it from the other ones. So again, both computers must be on in order to access shared files.

During those unsuccessful attempts to get a bit of happiness with all that stuff I suddenly realized what I actually wanted. It was simple and genius at the same time: all I wanted is to have on both computers a folder that can automatically synchronizes with some external internet storage. No more.

So my next step was to find an internet service of such kind. But no luck. Actually, there are tons of internet services which provides you with backup capabilities of any sort but not with auto synchronization. Moreover, I started to think that there is no such service and I had to invent my own one. 
Finally, after fruitless searches I found one, but it was worth hours of googling. In fact, even google couldn’t help me as I found the answer in Wikipedia =).

So the solution is – Dropbox! It does exactly what I want, simply syncs a folder in you computer with a cloud, so there is no any necessity to keep your computer working after the sync procedure is completed. It listens to the file system events and uploads updated files immediately. You don’t have to do anything special, just install, configure and that’s it! I really loved the service. It helps to forget about sync problem and concentrate on something really important. It provides free of charge account with 2 Gb limit and it seems that it is enough for me, at least for now. There is a small video presentation on the main page, so I suppose that it is worth watching.

Don’t get me wrong, this is not an advertisement of any kind.  I decided to write the post just because I really, really impressed by the finding. Hope you’ll like it too. They say – “Happy dropboxing!” =).

Sunday, February 7, 2010

A code quality assessment concept

Alex Ilyin shares an interesting concept of code quality assessment. Don’t miss it. The idea is quite fresh and promising.
The only minus that I can see is that the actual realization might be a bit time consuming.