Get a Quote

Your source for insights and trends in software development

Databases: slow count() statement with where clause on large tables

The typical task where count with where could be used in applications is showing data in html table with paging. So for instance to calculate number of pages you’ll use count(). Where clause used usually in case you apply some filters to find particular data. The problem is that count(*) is very slow on large tables in all databases that uses MVCC method of concurrency control ( including MySql when InnoDB is used as storage engine). And it is slow…

Dissapearing IE window

Sometimes we can have the situation when the download window disappears because of the IE security settings. This problem occurred in our GWT application. We have several places which return different kind of reports. The behaviour was really different in different places, while all of the reports are using the same method to write data and to open a new browser window. Some of the reports functioned properly, while IE window was closed immediately on others. I’ve spent hours trying…

Sound on HP Pavilion dv7 laptop with Fedora 11

I really like to work in Fedora 11. It’s much quicker than Vista OS which was preinstalled.However the common problem of the HP laptop is the detection of the sound card. In my case I had several situations:1. There’s no sound at all2. The sound works through the headphones, but not through the headphones3. The sound works through the speakers, but not through the headphones The behaviour was rather random after every boot. Finally I’ve found the solution. I needed…

Downloading generated RTF/XLS file in IE6/7

Downloading generated RTF/XLS file in IE6/7

Today we had to do some changes in the way the reports are generated. Previously a new page has been opened and the content was sent to the browser. We used the following headers:1. Content-Type – mime type of the content2. Content-Length – length of the contents data3. Content-Disposition – this helped us to control the name of the file which browser uses during saving.This approach worked fine for IE and Firefox. Now we decided to store the generated reports…

eunit bug with timeout

From time to time in our application eunit tests we were facing with timeouts in eunit. Despite the big timeout we set in the group of tests, it anyway happened. So I started to look deeper into eunit application itself. And figured out, that in case when one of the tests throws and exception (or anything), timeout for the group sets up to the default one that is 5 sec in eunit 2.1.3 I wrote a simple module to reproduce…

Checking session expiration in GWT

Every web-application has mechanisms for checking session expiration. Most of them use standard mechanisms, which are provided by the application server. A GWT-based web application is an exception in this case and standard mechanisms will not work here. In this post I’m describing, how to implement the mechanism for checking session status. SessionExpirationException First of all, let’s create Exception, which will be used for notifying the GWT client about session expiration.

It is a simple extension of an Exception-class,…

Rounding in Java

Rounding in Java

Today I’ve got a defect from QA which deals with the rounding. During the fix of it, I’ve decided to measure which way of rounding is the fastest one. I’ve got several in my mind, so I’ve wrote a small test which measures time. Three approaches(iterations: 10.000.000, accuracy: 3 digits, value: 3.1574454353) have been tested out. My laptop configuration: 1. Fedora 11 i686 2. Sun JDK 3. CPU: Intel Core 2 Duo P7350 @ 2.00GHz 4. RAM: 3 GB…

GWT on Ubuntu x64

I have installed new Ubuntu 9.10 (karmic) x64 and found that GWT browser is not working – it shows: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) This problem can be solved by switching on Java SE x32, but after that another problem was occurred: cannot open shared object file no such file or directory In previous build of Ubuntu it can be solved by simple install of libstdc++, but Ubuntu karmic does not contains it….

Invisible text in JasperReports

Invisible text in JasperReports

I really like JasperReports, it’s cool.But sometimes it can ruin your mind when you’re trying to understand why this report looks like so weird. So today I was trying to generating Excel report and saw the following picture: What the hell? Where’s my data? I had to debug JasperReports to understand why it happens. Finally I’ve got down to JRGridLayout#isOverlap which calculates whether the item intersects with some other report items. If isOverlap returns true the text is not rendered….

Date in GWT

Once more about date and its usage… In client-server application client send date to server using own TimeZone. So server receives client date and it will manipulate this client date. Sometimes it is not suitable. For example in applications, which is based on server date. So client should be also based on server date. GWT application is very similar on client desktop applications, because JavaScript code is executed on client side. So by default GWT application uses client date. Solution…

Ready To Take The Next Step?

quote Get a Quote

Sumbit your project request by special form.
We'll get to you promtly with our costing of your project.