This whole project thread has been filled how not to engineer software.
Application code specifically avoiding libraries, Not Invented Here,
random design with moving target specifications or no specifications,
ad hoc testing with a dose of 20+ Year old unresolved office battles,
interpersonal rivalry and off topic rants.
As several have stated not the environment that we are used to.
Yes, but it's important to be prepared to program in some of the many
environments which real programmers often end up having to work in.
To be fair, I've never had a coworker in the same class as Nilges. Not
even particularly close. But I have had to work with arbitrary or
bad specifications, specifications which change repeatedly during
implementation, old office battles, and vehement opposition to things which
were Not Invented Here.
At one point, I was asked to develop a linked list implementation. The
proposed design looked like this:
struct list_node {
struct list_node *next;
void *data;
};
struct list {
struct list_node *head;
struct list_node *tail;
};
The specification was much as you'd expect. Except for one TINY detail.
Which was that the formal specification was that
(struct list *) (x->tail->next) == x
whenever tail was not null.
That is to say, if the list contained any members, the "next" pointer for
the last member of the list was a pointer (suitably converted) to the list
object.
So iteration would look roughly like:
for (l = x->head; l->next != x; l = l->next) {
/* ... */
}
It took a day or so of effort for me to round up enough senior developers
to all sit on the guy and tell him that:
1. He was wrong.
2. He was micro-managing, which is presumptively wrong.
before we were allowed to use a more conventional design.
Having had to deal with things like a database in which the formal schema
description begins with "all fields are VARCHAR for simplicity", I found the
Nilges String Replace Challenge to be a surprisingly good approximation of
what programming work is often like in the real world.
(Disclaimer: All the above memories are faded with age. My current
environment is pretty good about this kind of stuff. I have no clue about
the office politics, as our management put a great deal of time and effort
into ensuring that they are Not Our Problem.)
-s