Allan Rasmussen's home page


This is the general source code notes page for the tools / applications / games that I, Allan Rasmussen, have made.

It contains my personal recommendations for source code writing and some general notes on the source code in the projects that can be found on the List of projects page.
The guidelines / recommendations are based on 30+ years of coding experience writing about 300.000 lines of code (in total) in 30+ programming languages.
The description below is mainly meant for Java, but it will probably also be a good advice for other programming languages as well.

This is not the truth, it is just my humble personal opinion, and you are entitled to disagree, because we (most of us at least) live in a free world.

I don't spell very well in my native language and English isn't my native language, so this page and the home page in general will contain spell mistakes. So readers be warned.

For those that are licensed impaired see the License below.

The source code is written with readability, maintainability and the Only Once Rule in mind (See below for details). I also tend to code flat (See below for a definition).

By readability I mean:
By maintainability I mean:

By the Only Once Rule I mean:
By coding flat I mean: Example: (From the RegularExpressionDebugger class in the Regular Expression Debugger project)
    private boolean groupsContainsANonNumber(String[] groups, boolean emptyStringIsNonNumber) {
        for (String group : groups) {
            if (group == null) {
                continue;
            }
            
            if (group.length() == 0) {
                if (emptyStringIsNonNumber) {
                    return true;
                }
                
                continue;
            } 
            if (!StringUtil.isStringADouble(group)) {
                return true;
            }
        }
        
        return false;
    }
I would NOT code it like this:
    private boolean groupsContainsANonNumber(String[] groups, boolean emptyStringIsNonNumber) {
        for (String group : groups) {
            if (group != null && ((group.length() == 0 && emptyStringIsNonNumber) || (group.length() > 0 && !StringUtil.isStringADouble(group)))) {
                return true;
            }
        }
        
        return false;
    }


Source code details

All the source code are (If not otherwise stated by the project):

Versioning strategy

All the source code are versioned using the following versioning strategy and naming:
        <major>.<minor>.<release>[.<beta>]
Major changes when the project is rewritten. Typically caused by a change of programming language.
Minor changes when the project has been revised, a large refactoring has been completed or the API has been translated into a different language.
Release changes when the project has been released for others to use.
Beta changes when the project is build internally. This number is not included in official releases. It is only included in beta versions.
All the projects have a build number that is increased on each build, but this number is not included in the version number. It might be displayed as "Build: <build number>" after the version number.

Example:
VersionBuild numberDescription
1.0.01Initial version, not released, not public
1.0.0.12First build, not released, not public
1.0.0.23Second build, not released, not public
1.0.14First public release
1.0.1.15First build after first public release, not released, not public
1.0.1.26Second build after first public release, not released, not public
1.0.27Second public release


Technology list

TechnologyUsed in project
Java GenericsAlmost all the projects on the List of projects page.
Java serializationFor a API wrapper of Java serialization see the arcommon.persistens.SerializableUtil class in the AR Common project.
For a XML serialization implementation see the XmlSerializer and XmlDeserializer classes in the arcommon.xml package in the AR Common project.
This XML serialization is used in all the projects on the List of projects page that have settings (See the arcommon.persistens.SettingsUtil class in the AR Common project for details).
Java bytecode injectionSee the GUI Finder project for use.
The actual bytecode injection is done by the Javassist-3.21.0-GA-(Modified) project (Not created by me).
Java agentSee the GUI Finder project.
Java ReflectionSee the arcommon.ReflectionUtil class in the AR Common project.
See the SWS and the EJB-container-simulator (Not public) project on the Other projects page.
Java AnnotationsSee the SWS and the EJB-container-simulator (Not public) project on the Other projects page.
Java Dynamic Proxy ClassesSee the SWS and the EJB-container-simulator (Not public) project on the Other projects page.
Java Dynamic Class LoadingUsed for plug-in loading in the File Tool and Sim Plan Client projects.
Java Native Interface (JNI)See the Arduino Emulator project for use.
Observer patternSee the File Tool project.
Command patternSee the GUIOpdateringsJDialog class and all the subclasses of the AbstractOpdaterOperation class in the File Tool project.
Model–view–controller (MVC) patternSee the File Tool and Family Tree projects.
Complicated math / algorithmSee the familytree.layout.FamilyTreeLayoutManager class in the Family Tree project.
See the udregn_string function (and the helper functions udregn_del_string and udregn_signed_long_omstter_string) in the M_UDRE_V.C source file in the TC Edit (Not public) project on the Other projects page.
See especially the combinator.parser.ExpressionParser class in the Combinator project and that project in general.
Animation / graphical renderingSee the familytree.gui.FamilyTreeJComponent class in the Family Tree project for a paintComponent() override.
See the simplan.client.gui.SimPlanMapJComponent class in the Sim Plan project for a paintComponent() override.
See the diskusageviewer.RadarGraph class in the Disk Usage Viewer project for a paintComponent() override.
See the guifinder.GUIFinderGlassPane class in the GUI Finder project for a JRootPane.setGlassPane().
See the regularexpressiondebugger.RegularExpressionDebuggerGlassPane class in the Regular Expression Debugger project for a JRootPane.setGlassPane().
See the arduinoemulator.runner.gui.ArduinoEmulatorRunnerGlassPane class in the Arduino Emulator project for a JRootPane.setGlassPane().
See the zoomtool.ZoomToolGlassPane class in the Zoom Tool project for a JRootPane.setGlassPane().
See the Animator (Not public) project (and its predecessors D3, V3D and 3D) on the Other projects page.


License

This software / home page / source code, these applications / tools / games and others IT elements comes with no warranty, guarantee, support, help, information, documentation or security.
View, use, download, installation, uninstallation, compiling, development is completely at your own risk.
I or any other can not be held responsible for any direct or indirect physical, psychological, mental, financial, economic, commercial, reputation, family, social, socio-economic, lack of sleep, frustration, things broken in frustration or data loss or any other harm that this software might have direct or indirect (This includes but is not limitted to bugs) caused.
This software / source code must not be used for any direct or indirect financial or commercial gains. It may only be used for non-commercial use (Unless other agreement has been made with me).
This software must not be used to harm other people.
This license always follows the software (or parts of it) regardless of how the software is copied, modified, sent, packaged, distributed or transmitted (Unless other agreement has been made with me).
Some parts of the source code may be subject to other licenses. See the source code for details.


Last Updated: 2025-11-18 19:22

Copyright Allan Rasmussen©