memesearch
Overcomplicated Negative Check

Overcomplicated Negative Check

Download Find similar pictures
Text on the meme
static int IsNegative(float arg) { char*p = (char*) malloc(20); sprintf(p, "%f", arg); return p[0]=='-'; }
What it means

A graduate in a cap and gown reads a needlessly complicated C function that checks whether a floating-point number is negative by converting it to text and inspecting the first character. The joke is aimed at inefficient, overengineered programming solutions and is shared as a reaction to unnecessarily convoluted code. EN: A graduate in a cap and gown reads a needlessly complicated C function that checks whether a floating-point number is negative by converting it to text and inspecting the first character. The joke is aimed at inefficient, overengineered programming solutions and is shared as a reaction to unnecessarily convoluted code.

Objects
Tags
Source
Type
image
Size
694×732 · 34.3 KiB
Mood
sarcastic, absurd
Language
en
Added

Similar memes