Author Topic: Perfectly cromulent code ;)  (Read 2152 times)

0 Members and 1 Guest are viewing this topic.

Offline TbayBoyTopic starter

  • Contributor
  • Posts: 16
  • Country: ca
Perfectly cromulent code ;)
« on: July 08, 2026, 02:51:50 pm »
This should pass review ;)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
2 antennas got married... the ceremony was lousy but the
reception was excellent...
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 6464
  • Country: nz
Re: Perfectly cromulent code ;)
« Reply #1 on: July 08, 2026, 04:15:42 pm »
Uhhh .. shouldn't setting up those triggers be in init code, not the handler? Is it even the handler? It's not declared as such. Is it called from the actual handler?

I see no evidence of "sets system flags for the state machine".

Also bounce bounce bounce ... bounce your boooton.

 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17840
  • Country: fr
Re: Perfectly cromulent code ;)
« Reply #2 on: July 08, 2026, 04:40:48 pm »
This should pass review because there are comments?  :=\

We indeed don't know why the code:
- Disables the interrupt upon entry and re-enables it at the end (most MCUs I've ever seen can't retrigger the *same* interrupt while being serviced anyway). Might be an odd MCU, or useless code.
- Indeed setting up the interrupt on change inside the handler doesn't seem to make sense either, unless it's maybe set up differently before the handler is called, but at least one of the edge would be enabled anyway, so it's useless to configure both in the handler.
- Doesn't do anything useful except clear the interrupt flags. (Looks like the only thing actually useful there.) We can assume that's an interrupt handler as it does clear the interrupt flags in there. But maybe it's not.

I wonder where the OP got that piece of code from. Could be fun to know. Might be fully made up to have a laugh. Or maybe code from a coworker. :-DD
 

Offline uer166

  • Super Contributor
  • ***
  • Posts: 1283
  • Country: us
Re: Perfectly cromulent code ;)
« Reply #3 on: July 08, 2026, 06:10:48 pm »
Love that the comments are all some form of
bool flag = true: // sets flag to true

With 0 useful info
 

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 3370
  • Country: be
    • Freelance Hardware Engineer
Re: Perfectly cromulent code ;)
« Reply #4 on: July 08, 2026, 06:15:16 pm »
I don't code. Butt my guess as to why the OP was triggered is much easier..
 
The following users thanked this post: TbayBoy, 5U4GB

Online westfw

  • Super Contributor
  • ***
  • Posts: 4669
  • Country: us
Re: Perfectly cromulent code ;)
« Reply #5 on: July 09, 2026, 07:06:28 pm »
Quote
Love that the comments are all ... 0 useful info

I disagree.  The comments describe the actual function of the incomprehensible register/bit names ...
(assuming that they're accurate!)
 
The following users thanked this post: TbayBoy, tooki, newbrain, SiliconWizard

Offline Perkele

  • Regular Contributor
  • *
  • Posts: 78
  • Country: ie
Re: Perfectly cromulent code ;)
« Reply #6 on: July 09, 2026, 08:35:12 pm »
One of benefits working at small companies is that you still can get away with internal project name acronyms like A.R.S.E or F.A.T.
It would be worth explaining to sales that joining those two otherwise completely unrelated projects would leave a humongous imprint on the market.
 
The following users thanked this post: TbayBoy

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3671
  • Country: gb
Re: Perfectly cromulent code ;)
« Reply #7 on: July 10, 2026, 09:22:24 pm »
I don't code. Butt my guess as to why the OP was triggered is much easier..

Hey, no kink shaming   ;D
 
The following users thanked this post: TbayBoy

Offline sparkydonkey

  • Regular Contributor
  • *
  • Posts: 60
  • Country: ca
Re: Perfectly cromulent code ;)
« Reply #8 on: July 10, 2026, 11:23:04 pm »
perkele its not the same kind of subject but you might be amused by the fact that apple actually had the codename LAW for one of their early powermacs before

take a guess what LAW was actually an acronym for?
Lawyers Are Wimps.
don't believe that? well sorry but its true history!!
 

Offline 5U4GB

  • Super Contributor
  • ***
  • Posts: 1783
  • Country: au
Re: Perfectly cromulent code ;)
« Reply #9 on: July 11, 2026, 07:14:06 am »
One of benefits working at small companies is that you still can get away with internal project name acronyms like A.R.S.E or F.A.T.

Not just small companies. I once had an ICL engineer explain with glee how their mainframe microcode would take a F.A.R.T. in the B.O.G. or something similar.
 

Offline 0xdeadbeef

  • Super Contributor
  • ***
  • Posts: 1912
  • Country: de
Re: Perfectly cromulent code ;)
« Reply #10 on: July 11, 2026, 07:32:53 am »
Letting the use of bitfields which was considered totally bad style when I was still developing low level embedded software, I especially like the term "buttpress".
It's like the zenith of using a stupid abbreviation with a somewhat saucy connotation. Exactly what you need in professional software development.
Trying is the first step towards failure - Homer J. Simpson
 
The following users thanked this post: TbayBoy

Offline 5U4GB

  • Super Contributor
  • ***
  • Posts: 1783
  • Country: au
Re: Perfectly cromulent code ;)
« Reply #11 on: July 11, 2026, 08:52:39 am »
It's like the zenith of using a stupid abbreviation with a somewhat saucy connotation. Exactly what you need in professional software development.

It wasn't just software development. Said ICL person had a coworker who kept a tape of recorded flatulence in a desk drawer. if someone called that he didn't want to talk to he'd drop the phone handset in the drawer, press play on the tape recorder, and close the drawer.

This was professional stuff, those guys were thorough.
 

Offline dave j

  • Regular Contributor
  • *
  • Posts: 173
  • Country: gb
Re: Perfectly cromulent code ;)
« Reply #12 on: July 11, 2026, 09:44:03 am »
perkele its not the same kind of subject but you might be amused by the fact that apple actually had the codename LAW for one of their early powermacs before

take a guess what LAW was actually an acronym for?
Lawyers Are Wimps.
don't believe that? well sorry but its true history!!
That reminded me of them using BHA (for butt-head astronomer) as a code name after Carl Sagan objected to them using his name as a code name. It turns out LAW and BHA are related.
I'm not David L Jones. Apparently I actually do have to point this out.
 

Offline BradC

  • Super Contributor
  • ***
  • Posts: 2524
  • Country: au
Re: Perfectly cromulent code ;)
« Reply #13 on: July 11, 2026, 12:21:31 pm »
Said ICL person had a coworker who kept a tape of recorded flatulence in a desk drawer. if someone called that he didn't want to talk to he'd drop the phone handset in the drawer, press play on the tape recorder, and close the drawer.

Back when answering machines were new and we didn't have caller-id I kept a dictaphone with the recording of a flushing toilet on it. If I got someones machine and I was pretty sure they were just screening calls I'd just play that. I'd like to say I've grown up, but it's probably only caller id and digital voice compression that prevents me from still doing it. The sound of running water makes almost any voice compression algorithm trip over itself and results in completely unrecognisable noise.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->