Tag Archives: QA

44alpha

Assertion errors – not only for devs

Hi,

So one difficult topic now. In his post I will throw around with things like precondition and code, but I really try to keep it simple.

So, let us first introduce the example. A “Linked-List”. What you need to know (just valid for this tiny example):

  • No element –> NULL
  • “->” is the link between elements
  • No element is an element
  • A list starts at “head”, so head is just the link to the first element

Let’s have an example. These are valid lists

  1. head->null
  2. head->1->2->3->null

The length of 1) is ZERO, of 2) THREE. That is most of the coding skills you need ;)

So, what are errors? You find them in LibreOffice as well as in all other software. It does not behave as expected, maybe resulting in a crash. That is quite obvious.  You can have invalid or simply unexpected input. As you can see in the above example, we do not expect to add the element “null” at position 1 [between 1 and 2] Would result in head->1->null->2->3->null (again sorry to all developers, I need easy examples).  So we are not allowed to add the element “null”, as this would result in changing the length of the list from 3 to 1, by adding one element. 3+1=1 okay, I guess that should not be like that…. So the code is a little bit inspired by Java, so sorry for the overhead ;)


public void addElement(int position /*A number from -2147483648 to +214483647*/, IntElement e /*Also a number like in our example, but it can have a link to a different IntElement*/){
assert e != null && LENGTH_OF_LIST >= 0;
if(head == null) //If we have an empty list
INSERTFRONT //We do not need to much detail here
assert LENGTH_OF_LIST == 1; //== means equals
return; //Exit the function here
}
int oLength = LENGTH_OF_LIST;
assert position >= 0 AND position <= LENGTH_OF_LIST;
INSERT_MIDDLE_LAST //Insert at the rest of the list
assert LENGTH_OF_LIST == oLength +1; // If adding succeeded the new length must be 1 greater than the old one
}

You can see some line start with “assert”. This are developer’s magic little helpers.

A function in mathematics and informatics has 3 conditions:

  1. Precondition –> How should the input should look like
  2. Post-condition –> How should the output / result of the function should look like
  3. Invariance–> What should be valid at the beginning and the end

Invariance

What should be at the beginning and at the end?  The length must be >=0.

Precondition

The inserted element must not be NULL and the length of the list must be positive (So this includes the invariance as well)

Post-Condition

If the list is empty –> Length is 1 (this includes the invariance)
If the list is not empty the new length must be by one greater than the old length. (this includes the invariance as well)

So, did you get the need? You can assure yourself that the input and output of a function (and if you want steps inside) are correct. So you cannot get any unexpected result, if assertions are enabled. Assertions are disabled by default, because they slow down a bit, but in LibreOffice Daily build from tinderbox 39  (downloadable @ SI-GUI atm) assertions are enabled.

So finally, an example (I only realized they were enabled because of this message:44alpha

 

So at line 1291 of winlayout.cxx an assertion failed (while testing bug # 77248) That’s a starting point for devs. The error might be near there ;) So yes, it makes sence to have assertions enabled and more to write them. If you write down how the output and the input should look like, everyone knows. You are turning implicit to explicit knowledge. And you will save hours to search for the place, where the error did occur. So please, and this is not limited to LibreOffice, have assertions enabled during testing!

And if you see such a dialog and remember the steps you did to come there, check if such a bug exists and comment with the exact version, or create a new bug. The exact version is needed, because this is the only way, that devs know on which version of the file they can find the failing assertion.

New UI for ServerInstall GUI (again…) + other news

We had this before, but still I had ideas how to simplify things more, and that’s why I did minor changes to the UI (okay… Changed size of the main form + added one button + changed size of 2 areas (Shortcut and bootstrap.ini)

As always I am interested in your opinion and feedback :D

Here are the screenshots:

So and now some other news I am really happy about:

  • The rework of the help seems to be finished soon (Thanks to Ken Biondi)
  • I am at the LibO conference in Milan :D
    • As I am too late to send in my proposal I really hope to get a “lightning talk” slot –> Talk about SI-GUI

That’S it for today

Bisecting LibreOffice (64-Bit Linux needed)

Hi,

Today is the time to announce the biggest tutorial I have made for LibreOffice yet.

Up to today It has never been so easy to get the daily-bisect repo with LATEST and OLDEST tags. So why do not check it out now! Do you not have Linux? You may try to create a virtual machine running Ubuntu. (Tested with 13.10) Should be working with other 64-Bit Linux as well.

Waiting to hear your reactions ;)

SI-GUI stats (First time public)

Some time ago I started collecting stats about the usage of SI-GUI. Many of you took part (opt-in) and now I want to tell show you the numbers I see. I wrote a small (<16KB) C# program, which allows aggregating the data and produces this very HTML files. All of the files I publish can be found here. If you want to jump to the one I published at time of writing this, feel free to use this link.

Some things I wondered about:

  • Most people use SI-GUI in the default language (which should be the language of your OS), which is good :)
  • A lot of people use the program in Russia and Japan, but no localizations are available for the language spoken in the country….
  • Is there anything to do from my side to help you performing the parallel install (Going from 30 -> 26 -> 24) Only 80% of the parallel installs are finished
  • Maybe (and I hope that) submitting “Save bootstrap” does not work. From Open to Save this filer (which is highly recommended for testing purpose) is from 29 [More than the last step….) ->9 ONLY 31% of the installations are changed that way!!

Any questions?? Please comment!

Server Installation GUI 4.1

Hi,

It’s time to announce the latest release. Due to one major change you will lose all your settings (The settings file will be stored in a different place). With this version we start to collect data about the usage of the program. This is opt-in, so no need to worry. @All: Thanks for your help translating, which is very important for the usability.

As always, a screenshot of the current version:

Server Install GUI 4.1.0
Server Install GUI 4.1.0

Download: qa.libreoffice.org/si-gui

LibreOffice SI-GUI Release 4.0.3.5

For everyone, who thinks, that this release is a minor one (4.0.3.4 -> 4.0.3.5) is definitely wrong. I am very excited to announce this new version, because of a few things:

  • All languages are updated (Some languages were behind with the last releases)
  • All the l10n  work has been done within 24h – Congrats :)
  • Very much user feedback has been built-in
  • A shiny new UI is in
  • A lot of ( really, you can hardly imagine how much work it was in fact….)

Special thanks to Pedro Lino for all the suggestions, which finally made the UI looking  the way it is now and for all the bugs he submitted so quickly.

Please have a look at the new UI :

Screenshot of version 4.0.3.5
Screenshot of version 4.0.3.5

So, please try it now :)

http://reisi007.bplaced.com/program/setup.exe

Changelog

LibreOffice Server Install GUI new UI – Follow up 2

Hi,

Today was a really productive day, so that I want to share English screenshot of the latest version. (I made a gallery, so that you are able to compare it with the old UI and a side by side screenshot is right after the break :) Any suggestions?

Continue reading