In court, I work as a court clerk - an assistant judge, but sometimes I get attracted to participate in more complex and important events, such as, for example, creating the next software for internal use (I note right away - I do not have any technical education).
It happened a month ago, although rumors about this event have been around for a long time - one of the most important tasks accompanying the reconstruction of the building is the creation of an electronic distribution system for courtrooms, as well as writing a program to display information on the plasma and 7 monitors in front of each courtroom. meeting
Decided to organize the process as follows:
1. based on the results of the tender, a contracting organization was selected, which deals with network installation, equipment supply and configuration.
2. It was decided to write the software for internal use themselves, having a programmer in the staff - a system administrator and court secretary - a programmer, that is, me.
')
Today I would like to tell you about the hall distribution system and information output on the “scoreboard”. Our programmer was assigned to be responsible for the former, and me for the latter. This division of labor was deliberate, and I will say even more - justified, since for many years he had already had his own work that could speed up the process of creating a program, I also have great enthusiasm and high speed of execution inherent in young professionals. In addition, each of us had a clear field of activity and was personally responsible - each for his part.
Start
Following the meeting, our working group outlined the following action plan:
All necessary information about cases is stored in an automated information system (AIS), which is a server with a database of the ORACLE version 8 and a client program, in which, in fact, all information about the cases in question is recorded - case numbers, judges, parties dates, types of production and so on. The base has a rather complicated and complicated structure of links, and there is no documentation at all. The company that developed this great product in the distant 2000th year did not want to correct or supplement this version of the program with new functionality, but offered to create an absolutely new AIS, but I think I’ll have time to retire until this happy day comes for all the courts. it may simply die, so today it will not focus on this fact. Let me just say that this program is not very user friendly.
The date of the court session (deposition, suspension, etc.) is stored in the above-mentioned AIS, however, it is not provided for entering time, therefore, our programmer has long developed a small add-on to the database using tools provided by Microsoft Access, which was simply and uncomplicatedly called “Assigned,” to which the court secretaries every week, on Friday, recorded information about the time for consideration of the case. To solve the task set before us, without hesitation, we decided to slightly improve this DBMS - now all information entered into “Assigned” will not be stored in “Assigned” themselves, but directly in ORACLE, which will speed up access to this information of my programs “ scoreboard ”will simplify the collection of information we need from the database. The permanent problem with the expansion of the mdb file stored on a shared (network) drive was also solved.
The program output information. The contractor installs a computer to which 7 monitors and one plasma are connected. It so happened that this computer was a Dell workstation with two Nvidia Quadro NSV 420 graphics cards with Windows 7 64 bit preinstalled, in which the activation ended two days after delivery, but this is a completely different story.

As a development environment, I chose Delphi 7. The choice, by the way, is dictated by the need and is made so as to simplify making changes to the program source code by our programmer, if suddenly I decide to change my place of work.

"Managing the world of monitors and plasma"
Having not yet started writing any code, I outlined for myself the main features that a future program should have.
- client-server network management,
- a beautiful and at the same time practical interface that is in harmony with the interior of the building, understandable to visitors and court personnel.

The following information should be displayed on a plasma TV (“plasma”, as I called it myself), located in the hall: information about court hearings in all rooms, depending on time; current time and date; exchange rates that are automatically downloaded from the Internet from the site of the National Bank; the current and a few days ahead the weather - yes, this block caused the greatest furor, especially among the female half of the team, some even expressed their regret that now more often it would be necessary to go down to the first floor in order to find out the weather; a small section reflecting the schedule of reception of citizens by judges (here it was decided to withdraw only those judges who are receiving at the moment); info-block - arbitrary information is displayed here, mainly of propaganda nature.

Monitors hanging in front of the courtrooms are presented with more highly specialized information relating exclusively to the cases under consideration - time, case number, judge, claimant, respondent, essence of dispute / status.
As I said above, Borland Delphi 7 was chosen as the development environment with some additional components - ODAC, EhLib, VGScene.
Oracle Data Access Components were used to communicate with the database, EhLib is a set of components known for its grids, which has, I am not afraid of this word, unique capabilities, VGScene is a pleasing to the eye and feature-rich vector engine for creating interfaces.
The main program starts when the computer starts and spreads the molds on the designated monitors.
In addition, two programs were developed: the administrator part, which allows you to control the world of monitors over the network, and the program for adding news notes to the info block.
Difficulties we face
The organization involved in laying the network and installing the equipment for 2 weeks fed us "breakfasts" about the delivery of equipment - the goods were detained at customs, then they had them in stock. In the end, when they were pressured, they confessed that they could not set up 7 monitors using one computer. Well, considering that they offered us this scheme themselves. “Take it, set it up yourself,” we said, and did their part of the work.
Display information on multiple monitors. At first, our programmer expressed his thoughts on the implementation of this task, solutions sometimes reached the point of absurdity, for example, running several virtual machines. It is not entirely clear how this would help, but stopped at my (rather banal) version using Delphi:
if (monitorIndex.MonitorCount > 1) and (monitorIndex <= Screen.MonitorCount) then
begin
Left := Screen.Monitors[monitorIndex].Left;
Top := Screen.Monitors[monitorIndex].Top;
Height := Screen.Monitors[monitorIndex].Height;
Width := Screen.Monitors[monitorIndex].Width;
end;
The information block on the plasma, according to the management, should not only show the text, but also show it with various effects, and by these same effects are meant not only shadow and smooth sliding from bottom to top, but also “fading”, the appearance of the text diagonally, left, right, etc., in general, everything is like in Power Point. With difficulty, but they explained that such qualities are not needed by the information block and will distract visitors.
The complexity of the structure and size of the database. In compiling some SQL queries, one had to refer to a large amount of literature, and in some places to be creative. Very, very rarely, but still there are situations when more than one plaintiff / defendant participates in a case. "The multiplicity of the parties" brought a lot of trouble, but I overcame it in such a way (I will give the request text below, who can come in handy):
CREATE VIEW PLAINTIFF AS
select suit_id, max(LTRIM(sys_connect_by_path(name,'; '),'; ')) app
from (SELECT naznach.suit_id, app_resps.name, row_number() over (partition by naznach.suit_id order by app_resps.name) rn
from Naznach INNER JOIN App_resps ON naznach.suit_id = app_resps.suit_id
WHERE ((app_resps.TYPE=1) Or (app_resps.TYPE=4) Or (app_resps.TYPE=10) Or (app_resps.TYPE=14) Or (app_resps.TYPE=13)))
start with rn = 1
connect by prior rn = rn-1
and prior suit_id = suit_id
group by suit_id
order by suit_id
As a result of this query, a View is created containing the information about the claimants (title), as well as an identifier for communicating with other tables. If there are several plaintiffs in the case, they will be recorded through the symbol ";". Further processing takes place on the program side.
Total
Creating a bulletin board is a fairly simple task, but with its own difficulties that do not appear on time: whether it is an unfair contractor or a complete lack of documentation on working with AIS.
It is interesting how things are in other state organizations - are programmers or whole companies involved in creating such programs?