Poster | Thread |
thinkchip
| |
Funny programming oddity Posted on 2-Feb-2020 15:25:11
| | [ #1 ] |
|
|
|
Super Member |
Joined: 26-Mar-2004 Posts: 1183
From: Salt Lake City, Utah, USA | | |
|
| I'm doing some programming on a Civ-like game. This is just something funny that happened. When running the program it failed to initialize a class and the pointer was uninitialized. It would be garbage. When I displayed the pointer, the eight-character number looked like this: 0xdeadbeef. I swear it spelled out "dead beef". It was sort of creepy, like a message from the other side. What's the chances of a random hex number spelling that out? Last edited by thinkchip on 02-Feb-2020 at 03:33 PM.
_________________ X5000 / microA1(OS4.1 FE U2) / CodeBench / Imagine / Blender Lightwave 2019 / Microsoft Visual C++ |
|
Status: Offline |
|
|
MEGA_RJ_MICAL
| |
Re: Funny programming oddity Posted on 2-Feb-2020 15:32:43
| | [ #2 ] |
|
|
|
Super Member |
Joined: 13-Dec-2019 Posts: 1200
From: AMIGAWORLD.NET WAS ORIGINALLY FOUNDED BY DAVID DOYLE | | |
|
| |
Status: Offline |
|
|
Derfs
| |
Re: Funny programming oddity Posted on 2-Feb-2020 17:44:51
| | [ #3 ] |
|
|
|
Cult Member |
Joined: 8-Mar-2003 Posts: 787
From: me To: you | | |
|
| |
Status: Offline |
|
|
OneTimer1
| |
Re: Funny programming oddity Posted on 2-Feb-2020 17:53:53
| | [ #4 ] |
|
|
|
Cult Member |
Joined: 3-Aug-2015 Posts: 962
From: Unknown | | |
|
| @thinkchip
Quote:
thinkchip wrote:
the eight-character number looked like this: 0xdeadbeef. I swear it spelled out "dead beef". ...
|
System programmers often filled unused memory with some kind of marker.
If the memory was untouched it would contain this marker, with this trick they could identify memory access to regions that where used accidentally without an MMU.
see also: https://en.wikipedia.org/wiki/Hexspeak
|
|
Status: Online! |
|
|
kas1e
| |
Re: Funny programming oddity Posted on 2-Feb-2020 18:05:24
| | [ #5 ] |
|
|
|
Elite Member |
Joined: 11-Jan-2004 Posts: 3549
From: Russia | | |
|
| |
Status: Offline |
|
|
TiredofLife
| |
Re: Funny programming oddity Posted on 2-Feb-2020 23:54:57
| | [ #6 ] |
|
|
|
Super Member |
Joined: 6-Jul-2005 Posts: 1702
From: Here | | |
|
| @thinkchip
It's not random, it's a message from beyond telling you that you should drop an old grudge.
Cheers _________________ If your nose runs and your feet smell, you're upside down. |
|
Status: Offline |
|
|
ggw
| |
Re: Funny programming oddity Posted on 3-Feb-2020 2:29:57
| | [ #7 ] |
|
|
|
Super Member |
Joined: 24-May-2003 Posts: 1106
From: Austin, TX | | |
|
| @thinkchip
That was the biggest laugh I had all day! I've been a professional programmer since1968 starting in assembly language and since then just about every thing you could imagine and THAT ... I had never run into.
Thanks! _________________ ..effects of civilization upon...nature, the growing gap between what education was supposed to accomplish and what it consisted of, the national debt and...high taxes, the problem of the excess cost of medical care -- Philip Wylie, 1951 |
|
Status: Offline |
|
|
MEGA_RJ_MICAL
| |
Re: Funny programming oddity Posted on 3-Feb-2020 4:06:57
| | [ #8 ] |
|
|
|
Super Member |
Joined: 13-Dec-2019 Posts: 1200
From: AMIGAWORLD.NET WAS ORIGINALLY FOUNDED BY DAVID DOYLE | | |
|
| @ggw
Quote:
ggw wrote: @thinkchip
That was the biggest laugh I had all day! I've been a professional programmer since1968 starting in assembly language and since then just about every thing you could imagine and THAT ... I had never run into.
Thanks! |
That is very surprising, friend ggw!
Borland compilers had DEADBEEF all over the place. Watcom C++ had BAADF00D. Microsoft Visual Basic DOS (yes VB Dos nonetheless) had DEADDEAD.
There used to be a nice article here http://www.thefullwiki.org/0xDEADBEEF but it's currently unreachable. The website is probably maintained by AEON or Hyperion.
VVVVVVVVVVVVOOOOOOOOOOOOOOOOOOOOOOOORRRRRRRRRRRRRRRR
MEGA_RJ_MICAL Software Architect Extraordinaire, Custodian of Amigaworld.net, International Secret AgentLast edited by MEGA_RJ_MICAL on 03-Feb-2020 at 04:07 AM.
_________________ I HAVE ABS OF STEEL -- CAN YOU SEE ME? CAN YOU HEAR ME? OK FOR WORK |
|
Status: Offline |
|
|
Hypex
| |
Re: Funny programming oddity Posted on 3-Feb-2020 12:54:54
| | [ #9 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11180
From: Greensborough, Australia | | |
|
| @MEGA_RJ_MICAL
Quote:
What's also amusing is this attempt at Amiga humour on site.
Guru Meditation:
XID: 1359558325Last edited by Hypex on 03-Feb-2020 at 12:55 PM.
|
|
Status: Offline |
|
|
nbache
| |
Re: Funny programming oddity Posted on 3-Feb-2020 22:07:42
| | [ #10 ] |
|
|
|
Super Member |
Joined: 8-Apr-2003 Posts: 1034
From: Copenhagen, Denmark | | |
|
| @Hypex
You can "blame" that one on Poul Henning Kamp, the programmer behind the Varnish web cache/HTTP accelerator.
He has a soft spot for Amiga and in general computer history.
Best regards,
Niels
|
|
Status: Offline |
|
|
Hypex
| |
Re: Funny programming oddity Posted on 4-Feb-2020 15:19:53
| | [ #11 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11180
From: Greensborough, Australia | | |
|
| @nbache
Nice one. Like the "polish" on that. |
|
Status: Offline |
|
|