Tuesday, September 27, 2022

Early Modern Regiments

The Regiment consists of ten Companies—lettered as A for Colonel's Company, B for Lieutenant Colonel's Comlany, C for Major's Company, D for 1st Captain's Company, E for 2nd Captain's Company, F for 3rd Captain's Company, G for 4th Captain's Company, H for 5th Captain's Company, J for 6th Captain's Company, and K for 7th Captain's Company. The arrangement of the companies is as follows—Colonel in command of the right battalion aka 1st Battalion, right grand division of the 1st Battalion aka 1st Grand Division, right company of the 1st Grand Division known as the 1st Company; Lieutenant Colonel in command of the left battalion aka 2nd Battalion, right grand division of the 2nd Battalion aka 3rd Grand Division, right company of the 3rd Grand Division aka 5th Company; Major in command of the left grand division of the 1st Battalion aka 2nd Grand Division, the right company of the 2nd Grand Division aka 3rd Company; 1st Captain in command of the right flank company aka 9th Compang; 2nd Captain in command of the left flank company aka 10th Company; 3rd Captain in command of the left grand division of the 2nd Battalion aka 4th Grand Division, the right company of the 4th Grand Division aka 7th Company; 4th Captain in command of the left company of the 4th Grand Division aka 8th Company, 5th Captain in command of the left company of the 2nd Grand Division aka 4th Company; 6th Captain in command of the left company of the 3rd Grand Division aka 6th Company, and 7th Captain in command of the left company of the 1st Grand Division aka 2nd Company.

10 Company Regiment
Colonel = Triarius/Pilanus Centurio Prior
Lieutenant Colonel = Princeps Centurio Prior
Major = Rorarius Centurio Prior
1st Captain = Hastatus Centurio Prior
2nd Captain = Accensus Centurio Prior
3rd Captain = Triarius/Pilanus Centurio Posterior
4th Captain = Princeps Centurio Posterior
5th Captain = Rorarius Centurio Posterior
6th Captain = Hastatus Centurio Posterior
7th Captain = Accensus Centurio Posterior

In a Corps (Regiments with more than one Battalion), equalized Battalions are still called Battalions, equalized Squadrons are called Grand Divisions, equalized Companies or Troops are called Divisions, equalized Platoons are called Subdivisions, equalized Sections are still called Sections, and equalized Squads or Brigades are called Subsections. Squadrons were originally units of 6 infantry platoons during the pike and shot era, with 4 pike platoons in the middle and two shot platoon on the side, then a shift to two pike platoons in the middle and four shot platoon at the side, and finally 6 shot platoons with bayonets. The term Squadron comes from the square shape the Tercio makes with the pikes as a Spanish Square. Brigades are used by the French speaking countries to distinguish Squad from Squadron for unit types where Squadron is applicable.

The Ensign are as follows—the 1st Grand Division shall hold the National Colors, the 3rd Grand Division shall hold the State Colors, the 2nd and 4th Grand Divisions shall hold the Regimental Colors; 2nd, 4th, 6th, and 8th Companies shall hold their respective Grand Division Colors; 9th and 10th Company shall hold their Company Colors; 1st through 8th Company's Ensign Corporal shall hold their Company Colors. Note that there are 10 Ensigns, but only 8 Ensign Corporals.

Military Evolution—Power of Two Ranks

Units are built historically by two main styles—the Hellenics and the Romans. The Hellenic military mostly started with the simple power of two, because it is always possible to compare any two man.

The smallest unit has one man, and that is trivial. The next is two men, the prostate as senior in odd ranks, and an epistate as junior in even ranks.

The first formal unit is the enomotia (sword band), the smallest formal unit. An enomotia is a unit with 4 men or 5 men in Sparta (4 men for the other city states) in each age group conscripted. Most military would conscript only the youngest age group, so an enomotia is as little as 4 men (4 or 5 men for Sparta), but could be as many as 12 age groups for 48 men (48 or 60 men for Sparta). The enomotarch commands an enomotia.

The next smallest formal unit is the dimoiria (two bands) or hemilochion (half file). This unit formally translate to platoon or subdivision, and it is exactly two sword bands. The dimorites or hemilochites is a platoon commander. Note that many platoons only have 8 men, while the largest have 96 men. Sparta instead has pentekostys, units made of 4 enomotiai, with each enomotia made of 5 men from 8 age groups for 40 men, but limited to approximately 50 combatants (technically 48) from those 160 men.

The third formal unit is the synomotia (warband) or lochos (ambush), which is a troop, single company, or division. The lochagos is the company commander (file head), and a ouragos is the executive officer (file tail). The company could be as little as 16 men (12 during the byzantine) and as large as 240 men for non-Sparta city states. The Spartan lochos is made of 4 pentekostyes, so there are 200 combatants, and 640 men in all. The cavalry form is also called lochos.

The forth formal unit is the dilochia (two warbands), which is a squadron, double company, or grand division. The dilochagos command such a unit. There are as few as 32 men, and as many as 480 men. Sparta does not have dilochia.

The fifth formal unit is a tetralochia, tetrarchia, or mora (Spartan). This battalion is made of four files as its alternative name says. The commander is a tetrarch (quadruple captain) or polemarch (warlord). There are as few as 64 men to as many as 960 men. Polemarch was originally equal in rank to strategos. The cavalry form is called ile.

The sixth formal unit is the taxis (rank) or tagma (order). This regiment is made of two battalions. The commander is a taxiarch. There are as few as 128 men to as many as 1920 men. The cavalry form is called epilarchia.

The seventh unit is the ditaxis (two ranks). It is made of two taxeis as its name indicates. The ditaxiarch is commands this unit. There are as few as 256 men to as many as 3840 men. The cavalry form is called tarentinarchia.

The eighth unit is the syntaxiarchia (war rank) or syntagma (war order). There are as few as 512 men to as many as 7680 men. The cavalry form is called hipparchia.

The ninth unit is originally called apotome keratos (parts of wings) or phalangarchia (phalanx corps), but shrink to chilarchia. The minimum number of men is 1024, and the term chiliarchia fixes this number of men and all units to their minimum amount in the later period. The chiliarch lead these 1000 men brigades. Theoretically could be as large as 15360 men. The cavalry form is called epihipparchia.

The chiliarchia occured during the Byzantine empire, and the thousand man cohort. The fixed size units are clearly imitating Roman units. Chiliarchia/Chiliostia (1.000 men unit) copies the cohors. Pendakosiarchia (500 men unit) copies the ordo. There's a skip over the manipulus. Ekatondarchia (100 men unit) copies the centuria. Pentekostes/Pentekostia (50 men unit) copies the turma. There is a skip over viginturia. Dekas/Dekania/Dekarchia (10 men unit) copies the decuria. Pentas/ Pempas (5 men unit) copies the manus.

The tenth unit is originally called keras (wing) or diphalangia (two phalanx corps), but became merarchia. The merarch usually translate to division general. These units typically have at least 2048 men, with a theoretical max size of 30720 men. Commonly, a hypostrategos becomes the leader of a merarchia while the merarchia is a deputy. The cavalry form is called telos.

The eleventh unit is originally called tetraphalanhia (four phalanx corps) or phalanx, but becomes the new apotome keratos, or phalangarchia. This unit used to be commanded by a strategos. It ranges from 4096 men to 61440 men.

The twelfth unit is called keras or diphalangia. Its size is 8192 men.

The thirteenth unit is called tetraphalanhia or phalanx. This unit could only be command by a strategos. Its size is 16384 men.
-----
The Romans start with the manus (hand). Like fingers, there are 4 or 5 men in this unit. The leader is a decurio secundus.

The second unit is the decuria (unit of 10), a unit of 8 to 10 men. The leader is a decurio.

The third unit is the viginturia (unit of 20), a unit of 16 to 20 men. The leader is a decurio princeps.

The forth unit is the turma (unit of three tribes), a unit of 3 mêlée decuriae and 1 range decuria. The elite mêlée and range forms one viginturia, and the two remaining mêlée forms the other viginturia. The leader is an optio. During the kingdom ear and early republic, some units do not have range decuria as part of them, so the elite counts double as viginturia for the decuria.

The fifth unit is the centuria (unit of 100). A centuria is made of one turma during the kingdon era and early republic, two centuriae for the non-elite units during the mid republic and late republic, and two centuriae for all units after the Marian reforms. Additionally, a decuria of siege and a decuria of cavalry is attached to the unit. A centurio commands (captain) this unit.

The sixth unit is either a manipulus (hands) or a vexillum (banners). A manipulus is two centuriae with range combatants. A vexillum is two centuriae without range combatants. A centurio prior (field officer) commands this unit.

The seventh unit is an ordo (order). The order is a battalion level unit. The principes and rorarii centurio priores commands the antepilani (hastati and principes manipuli) and postpilani (accensi and rorarii vexilla) ordines respectively.

The eighth unit is the cohors. This unit is made of one triarii (aka pilani) manipulus/vexillum, one antepilani ordo, and one postpilani ordo.

The ninth unit is the vexillatio. This unit is made of two cohortes. One cohort is commanded by a Tribunus Angusticlavius, and the other cohirt is commanded by an Optio Tribuni Angusticlavii.

The tenth unit is the legio. This unit is made of three to six vexillationes. In addition, the cavalries group together to form turmae, and the artillery grouped together to form centuriae. The commander consists of Legatus Legionis, Tribunus Lrgionis, or Praefectus Legionis. The second in command is a Tribunus Laticlavius. A third in command as a Praefectus Castrorum. An Optio Tribuni Laticlavii is renamed to Magister Peditum.

The eleventh unit is the exercitus. It is made of two legiones, and two socii alae. Each socius ala is made nearly identical to a Roman Legion, but made on social ally citizens. This unit provides Equites Centuriones and Equites Optiones to the cavalry. An Equites Centurio Exercitatus holds greater authority than a Tribunus Angusticlavius. The Tribunus Celerum holds greater authority than the Tribunus Laticlavius. An Optio Tribuni Celeres gets renamed to Magister Equitum. A celerum (swift) is a unit of two or three equites centuriae. The Tribunus Celerum and Optio Tribuni Celeres controls part of a celerum. An exercitus would have six to ten celeres.
-----

Monday, March 7, 2022

Head Height Ratio

A new born infant is 3 heads tall.
At 3 months old, ratio is 3 1/12 heads tall.
At 6 months old, ratio is 3 1/6 heads tall
At 9 months old, ratio is 3 1/4 heads tall.
At 12 months old, ratio is 3 1/3 heads tall.
At 15 months old, ratio is 3 5/12 heads tall.
At 18 months old, ratio is 3 1/2 heads tall.
At 21 months old, ratio is 3 7/12 heads tall.
At 24 months old, ratio is 3 2/3 heads tall.
At 27 months old, ratio is 3 3/4 heads tall.
At 30 months old, ratio is 3 5/6 heads tall.
At 33 months old, ratio is 3 11/12 heads tall.
At 3 years old, ratio is 4 heads tall, classify as toddler.
At 3.25 years old, ratio is 4 1/12 heads tall.
At 3.5 years old, ratio is 4 1/6 heads tall.
At 3.75 years old, ratio is 4 1/4 heads tall.
At 4 years old, ratio is 4 1/3 heads tall.
At 4.25 years old, ratio is 4 5/12 heads tall.
At 4.5 years old, ratio is 4 1/2 heads tall.
At 4.75 years old, ratio is 4 7/12 heads tall.
At 5 years old, ratio is 4 2/3 heads tall.
At 5.25 years old, ratio is 4 3/4 heads tall.
At 5.5 years old, ratio is 4 5/6 heads tall.
At 5.75 years old, ratio is 4 11/12 heads tall.
At 6 years old, ratio is 5 heads tall, classify as child.
At 6.5 years old, ratio is 5 1/12 heads tall.
At 7 years old, ratio is 5 1/6 heads tall.
At 7.5 years old, ratio is 5 1/4 heads tall.
At 8 years old, ratio is 5 1/3 heads tall.
At 8.5 years old, ratio is 5 5/12 heads tall.
At 9 years old, ratio is 5 1/2 heads tall.
At 9.5 years old, ratio is 5 7/12 heads tall.
At 10 years old, ratio is 5 2/3 heads tall.
At 10.5 years old, ratio is 5 3/4 heads tall.
At 11 years old, ratio is 5 5/6 heads tall.
At 11.5 years old, ratio is 5 11/12 heads tall.
At 12 years old, ratio is 6 heads tall, classify as young adult.
At 13 years old, ratio is 6 1/12 heads tall.
At 14 years old, ratio is 6 1/6 heads tall.
At 15 years old, ratio is 6 1/4 heads tall.
At 16 years old, ratio is 6 1/3 heads tall.
At 17 years old, ratio is 6 5/12 heads tall.
At 18 years old, ratio is 6 1/2 heads tall.
At 19 years old, ratio is 6 7/12 heads tall.
At 20 years old, ratio is 6 2/3 heads tall.
At 21 years old, ratio is 6 3/4 heads tall.
At 22 years old, ratio is 6 5/6 heads tall.
At 23 years old, ratio is 6 11/12 heads tall.
At 24 years old, ratio is 7 heads tall, classify as full adult.
At 25 years old, ratio is 7 1/12 heads tall.
At 26 years old, ratio is 7 1/6 heads tall.
At 27 years old, ratio is 7 1/4 heads tall.
At 28 years old, ratio is 7 1/3 heads tall.
At 29 years old, ratio is 7 5/12 heads tall.
At 30 years old, ratio is 7 1/2 heads tall.
At 31 years old, ratio is 7 7/12 heads tall.
At 32 years old, ratio is 7 2/3 heads tall.
At 33 years old, ratio is 7 3/4 heads tall.
At 34 years old, ratio is 7 5/6 heads tall.
At 35 years old, ratio is 7 11/12 heads tall.
At 36 years old, ratio is 8 heads tall, classify as mature adult.

Saturday, December 11, 2021

Compilation Mode

I remember having a program that works fine in Release Mode, but when I change to Debug Mode, the program crash. The Debug Mode requires adding debug stop points in specific locations for it to work. Thus, I just say no to Debug Mode and return to Print Debugging.

There's more problem to Debug Mode. (1) it always zero initialize data, so it cannot catch uninitialized bugs. (2) Loops are limited to 100 iterations if it has no side effect, so programmers may write unnecessary side effects until a compiler could solve the halting problem. (3) Assertions cannot fail.

Monday, December 6, 2021

When to Use Hungarian Notation

If the language has strong, static, and implicit type, then use System Hungarian Notation. If the language has strong, static, and implicit aggregate type but explicit primitive type, then use Application Hungarian Notation.

Strong vs Weak Types
Strong Types cannot be implicitly typecast to another. Weak Types have implicit typecast under type promotion rules.

Static vs Dynamic Types
Staric Types cannot change in runtime. Dynamic Types can change during runtime.

Implicit vs Explicit Types
Implicit Types are inferred by the compiler or interpreter. Explicit Tyles requires the programmer to input a keyword before or after the declaration of the variable varying by language syntax.

Thursday, December 2, 2021

Concurrency, Parallelism, and Synchronous

Concurrency is the placement of tasks onto a priority queue and have the operating system resolve the tasks. The virtually at the same time is not at the same time, as tasks are resolved sequentially (consecutively) in a single threaded single core processor. Virtually means the perceived time slice is larger than the actual time slice. If measuring tasks in 150 ms interval, 10 tasks of 15 ms could complete and they are perceived to be simultaneous. Average speed and instantaneous speed are different especially those who understand speeding tickets. Of course, average population density and instantaneous population density are different, but people fail to understand their differences.

Parallelism is the ability to resolve multiple tasks at the same time by having multiple threaded processors. Asynchronous tasks could run without issues, but synchronous tasks must wait for their dependency to finish before they could start. The critical path is the thread that has the full chain of synchronous tasks, and other threads will be flooded with asynchronous tasks to improve performance.

Synchronous refers to the dependency of one task on another, while asynchronous means there are no dependency. Synchronous tasks needs to be thread safe because racing conditions affect their results. Asynchronous tasks does not need to be thread safe because they are orthogonal to racing condition.

Sunday, November 28, 2021

Hexadecimal

All computer scientists should know this fact: the term hexadecimal was invented because a group of computer scientists cannot distinguish an augend (or pluend meaning plus' left operand) from a multiplier.

  • The pluend form of six is se- in Latin.

  • The multiplier form of six is sexa- in Latin.

  • The addend form of ten is -deci- in Latin.

  • The multiplicand of ten is -gesi- in Latin.

  • Sexadecimal requires a multiplier and an addend. Sedecimal is the correct term, and sexagesimal is base-60.

Size Limit of Source Codes

Using a monospace font on a one inch margin letter size paper, a 12 point font has 78 columns and 54 lines, and a 10 point font has 93 columns (truncate from 93.6) and 63 lines (truncate from 63.8). Thus, the soft limit is that a single source file has 78 columns and 54 lines (the 54th is blank); and the hard limit is 93 columns and 63 lines (the 63rd is blank). For places where physically printing codes for code reviews, the limits makes sense.

Remember that a source code should only contain a single function unless they are allocator and deallocator pair; known as constructor and destructor respectively in object oriented programming. The source file should named as ./src/LibraryName/FunctionName.c, and the object archive library should be named ./lib/LibraryName.lib or ./bin/LibraryName.dll for statically and dynamically linked libraries respectively. Headers shall be named ./include/LibraryName.h as an interface to the object class defined in the library. The Hungarian Notation of libLibraryName.a and libLibraryName.so.VersionNumber makes it so GNU. VersionNumber is necessary because they cannot understand SOLID principles.

Single Responsibility Principle means there is one and only one concrete class and that is the LibraryName.dll file.
Open Close Principle means that the interface is closed so the only change possible is by inheritance.
Liskov Substitution Principle means you should not have DLL-HELL.
Interface Segregation Principle means that the class hierarchy have many client-specific interface to a single class.
Dependency Inversion Principle means that Entities depends on Systems not Components. This means that object oriented programming is always Entity Component System.

Thursday, January 9, 2020