Where did George, the master programmer, go?

  • Thread starter Thread starter DEvens
  • Start date Start date
AI Thread Summary
The discussion revolves around the implications of coding complexity and the use of advanced programming features. It begins with a story about a coder named George, whose intricate coding style led to his departure from a job, suggesting that excessive complexity can result in being pushed out or promoted. Participants reflect on the tendency of some programmers to overcomplicate their code, making it difficult to maintain and understand, which can frustrate teams. The conversation draws parallels between coding practices and other fields, such as martial arts, emphasizing that unnecessary complexity can hinder performance and recovery.There are anecdotes about the challenges of maintaining overly clever code, with some contributors sharing their experiences of rewriting complex code for simplicity and maintainability. The discussion also touches on the humor found in programming culture, referencing "Real Programmer" jokes and the pitfalls of adhering to overly rigid coding standards. Ultimately, the consensus is that while creativity in coding is valuable, clarity and maintainability should take precedence to ensure effective collaboration and long-term project success.
DEvens
Homework Helper
Education Advisor
Gold Member
Messages
1,204
Reaction score
464
TL;DR Summary
A story about a new-guy coder who is sorry he didn't get to meet his predecessor
Someplace I read this story. But I can't recall where. Anybody?

This guy, Fred, starts a new coding job. And he is working industriously and enjoying himself. But he keeps seeing the name of the coder whose code he is maintaining. And that guy is not in the office. So he asks his co-workers about the missing guy. Oh, that's George. He does not work here any more. George was amazing. He made it a point to use every single feature of the programming language in every single program he wrote. He was amazing in his knowledge of the fine details and nuanced rules of the inner workings of the language. But... He does not work here anymore. Fred was very sorry to have missed the chance to meet this guy.

The implication of the story is, if you try to use every feature of a programming language, even if you do it correctly with full detailed knowledge, chances are that pretty soon you won't work there any more. Does anybody remember this story?
 
Technology news on Phys.org
I think it means he moved on to Google.

When folks go out of their way to use arcane features of a programming language over using the simpler and easier to maintain features then the team will eventually push him/her out or get them promoted to a new job.

It reminds me of a judoka I once knew who would throw someone but in mid toss would switch up the move and drop them a different way from the standard throw.

His explanation was he didn't want the opponent to know how they would be thrown and so recover from it. I believed it for a while until I realized that you are making things needlessly complicated and slower than normal meaning the opponent would likely recover faster.

Over the years, I've run across folks who make things needlessly complicated in their code and have had to rewrite portions of it to make it more maintainable. In one case, I would have liked to meet the programmer because many of his java constructs were truly inspired while quite clever created roadblocks in extending his code for things he didn't originally intend and that where "keep it simple stupid" (KISS) comes in.

CAVEAT: I'm sure programmers after me are thinking my code was needlessly complicated. Basically we write our code like a beautiful sand mandala and shortly thereafter a slight wind will blow it away.

The nice thing about someone changing your code is that now you don't have a duty to maintain it and that can be the nicest feeling of all.

One last tidbit 1982 Real Programmer humor:

https://web.mit.edu/humor/Computers/real.programmers

and of course no post would be complete without:

https://thedailywtf.com/
 
Last edited:
  • Like
Likes cobalt124, FactChecker and Ibix
Stack Exchange has an interesting discussion on Programmers writing overly complicated code:

https://softwareengineering.stackex...-sometimes-intentionally-over-complicate-code

which got me to thinking that grad students do this too. As an undergrad, they still retain a passable English vocabulary but once in grad school, they change and everything they say sounds way more complicated than it should be.
 
  • Like
Likes Keith_McClary
jedishrfu said:
I think it means he moved on to Google.
Hahaha!
When folks go out of their way to use arcane features of a programming language over using the simpler and easier to maintain features then the team will eventually push him/her out or get them promoted to a new job.
I find that to be true also for people who use features that are new. I was constantly annoyed by people who turned a simple program into something that was defining a new language. If they were developing a major language like the next Java, I could tolerate it, but a single-use, simple program should not require one to learn an entire new set of operations, functions, and keywords.
It reminds me of a judoka I once knew who would throw someone but in mid toss would switch up the move and drop them a different way from the standard throw.
And one should not treat other programmers as opponents who you need to surprise.
 
  • Like
Likes Klystron and Vanadium 50
jedishrfu said:
tidbit
On purpose, right ? . 😜
.
 
FactChecker said:
And one should not treat other programmers as opponents who you need to surprise.

Comment 1: Who says? Have you never heard of job security?
Comment 2: Syntax error. Whom.

When I see code like that, I am reminded of Spinal Tap's "There's a fine line between clever and stupid".
 
  • Like
Likes Klystron, FactChecker and jedishrfu
Vanadium 50 said:
Comment 2: Syntax error. Whom.
Knock knock!
Who's there?
To.
To who?
No, it's "to whom".
 
  • Like
  • Haha
Likes jtbell, Klystron, FactChecker and 2 others
For whom the bell nulls!
 
  • Haha
Likes Klystron
At a mainframe software house at which I worked in the '80s, some of the coders liked to use their own macros. The bosses (at that place the bosses could code) objected, citing standardization. Eventually the functional benefits of the individually-prepared macros were subsumed, as well as was ipso facto proven to be practicable, into the macros that had been deemed to merit inclusion in the in-house common library, and everyone was no more unhappy than was to-each tolerable (no-one quit over the matter). One programmer quipped (not originally) that one of the nice things about standards is that there are so many of them to choose from.
 
  • Like
Likes jedishrfu
  • #10
All of the direct product code I am producing now must follow MISRA standards. These are fairly restrictive. For example, there is no automatic casting allowed. It must be explicit and you can't cast the result of an expression. So you end up creating a lot of "extra" lines of code.

Was George really using the "volatile" keyword in every project he worked on? Obviously, someone who is aching to use all of the programming features all the time or to use his most recently discovered arcane technique anywhere he can is not coding to requirements.

I have seen the C++ template used for creating bizarrely cryptic and effectively unmaintainable code. But from my experience, you won't commonly create more reliable software by restricting what language features are allowed.

Here's an example of an unusual coding technique:
Code:
  char cLowHexDigit = "0123456789ABCDEF"[n&0xF];
Perhaps you have never seen that construction before. But it's certainly maintainable. I would expect most programmers who have not already run into to that to react with "Oh, you can do that?".

It is especially important for novice programmers to work with other programmers - even if those others are also novices. And part of the reason is that each programmer in a group will discover techniques on their own and share them with the group during design sessions, code reviews, and casual technical discussions. It is part of becoming fully fluent in a language.
 
  • Like
Likes FactChecker
  • #11
.Scott said:
Here's an example of an unusual coding technique:
Code:
  char cLowHexDigit = "0123456789ABCDEF"[n&0xF];
Perhaps you have never seen that construction before. But it's certainly maintainable. I would expect most programmers who have not already run into to that to react with "Oh, you can do that?".
Even more unusual is this example:
C:
int val;
int arr[] = { 1, 2, 3, 4 };
val = 3[arr];
When this code executes, val will be set to 4. I don't recommend doing this, however.
 
  • Like
Likes jedishrfu
  • #12
jedishrfu said:
The nice thing about someone changing your code is that now you don't have a duty to maintain it and that can be the nicest feeling of all.

I contributed a resource-assignment algorithm to a larger project that for awhile nobody could understand. It was developed and maintained in Matlab, with some C coding underneath for speed, and it had a lot of Matlab trickery. I could barely understand parts of it myself. In my defense, it was originally an R & D project that got repurposed for wider applicability. I was the only intended user. (There's a lesson in there somewhere).

But that setup created huge maintenance issues aside from the difficulty of other programmers to understand what I was doing. (It is not easy as it turns out to support a project based on Matlab Runtime. There are all kinds of incompatibility issues between releases).

Anyway, I recoded it in the language being used for the rest of the project, C#, and along the way commented and cleaned up the algorithm. My proudest moments where when the other programmers were able to find bugs I'd missed, and make improvements in the algorithm as well. By the time I left that job that monster had truly been handed on to the next generation of developers.

jedishrfu said:
One last tidbit 1982 Real Programmer humor:

https://web.mit.edu/humor/Computers/real.programmers

and of course no post would be complete without:

https://thedailywtf.com/

From the Real Programmer document:
Real Programmers can write five-page-long DO loops without getting confused.

This essay seems dated because it is FORTRAN based, but a lot of it is still relevant.

The software engineering leads on the C# project mentioned above hated using "breaks" for early exit from loops. I adhered to the required style, but I never quite saw how the result, introducing nested loops that were 20-deep, was an improvement in readability. There were indeed loops that spanned five pages.
 
  • #13
Mark44 said:
Even more unusual is this example:
C:
int val;
int arr[] = { 1, 2, 3, 4 };
val = 3[arr];
When this code executes, val will be set to 4. I don't recommend doing this, however.

I've not seen this one before and had to try it myself. Looks like a kind of pointer symmetry ie
C:
val = arr[3];    // arr[3] --> *arr + *3 --> *arr + 3

val = 3[arr];    // 3[arr] --> *3 + *arr --> 3 + *arr
 
  • #14
jedishrfu said:
I've not seen this one before and had to try it myself. Looks like a kind of pointer symmetry ie
C:
val = arr[3];    // arr[3] --> *arr + *3 --> *arr + 3

val = 3[arr];    // 3[arr] --> *3 + *arr --> 3 + *arr
It relies on the fact that pointer addition is commutative.

BTW, your comments aren't valid C. *3 isn't valid, since the operand of * must be a pointer.
Also, *arr + 3 would result in 3 plus the value of the element at index 0, not the element at index 3.

arr is the address of the first element of the array.
arr + 3 is the address of the element at index 3 in the array, as would also be 3 + arr.
*(arr + 3) or *(3 + arr) both represent the value at the address of the index 3 element.
So arr[3] == *(arr + 3) == *(3 + arr) == 3[arr]

In C/C++ it's valid to add an integral value to a pointer, but the result of the addition is "scaled by the type of object pointed to." IOW, adding 1 to a pointer could result in an address 1 byte higher in memory, 2 bytes higher, 4 bytes higher, and so on, depending on the base type of the pointer.
 
  • Like
Likes sysprog
  • #15
Yes i know that star 3 wasnt valid i struggled with how to label the memory of location of 3 vs 3 itself and decided on that notation.
 
Back
Top