• Stars
    star
    2,316
  • Rank 19,877 (Top 0.4 %)
  • Language
    C
  • Created about 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Nonsense Collection of Disgusting Codes

CreepyCodeCollection

A Nonsense Collection of Disgusting Codes

Here we are talking about creepiest of the most creepy codes. Programs, behave so strange, that they will twist your brain. Snippets, so small, that you won’t believe their functionality. And codes, so cryptic, that even the top coders will think of going back to the college.

Note: Never try this type of code in a real life software project; readability and maintainability should be the main concern there.

Intro

See this cute little code ()-

(1x$a)!~/^1?$|^(11+?)\1+$/

In Perl, this regular expression checks if a number is prime.

Following code will produce day of the week for a given date ()-

((y-=m<3)+y/4-y/100+y/400+" bed=pen+mad."[m]+d)%7

Consider this Java code ()-

int i = (byte) + (char) - (int) + (long) - 1;

What will be the value of i? Will the code even compile? Weird! Huh?

The program is a Ruby Quine called qlobe (). Isn't the the output amazing?

Qlobe

This is one of my favourites- The Animated 3d Doughnut (). Taste how delicious it is!

Animated 3d Doughnut

Paste this in your browser's url-

data:text/html,<body%20style=margin:0><canvas%20id=q%20/><script>var%20q=document.getElementById('q'),s=window.screen,w=q.width=s.width,h=q.height=s.height,p=Array(256).join(1).split(''),c=q.getContext('2d'),m=Math;setInterval(function(){c.fillStyle='rgba(0,0,0,0.05)';c.fillRect(0,0,w,h);c.fillStyle='rgba(0,255,0,1)';p=p.map(function(v,i){r=m.random();c.fillText(String.fromCharCode(m.floor(2720+r*33)),i*10,v);v+=10;%20return%20v>768+r*1e4?0:v})},33)</script>

And see the magic yourself ()!

Most of the programs here are hell hard to understand. The details-url provided with the codes contain useful description. Follow the Creepy Rank for getting a structured view of all the programs.

Creepy Rank

Sorted by difficulty level-

Level- 1: Genin

Code Intro
pyjava.java Java code written like python. Finds factorial of big numbers.
backward.java Weird flipped code compiles- "backward!".
one_line_swap.c Strange one-liners that swaps value of two variables.
without_main.c C code without main.
hello_world.java Magically outputs "hello world" in the console.
obfuscated.java Prints "Hi!" in the console, looks like a big meaningless comment though.
strange.c A strange code with more strange output.

Level- 2: Chunin

Code Intro
bitwise_arithmetic.c Performs addition and multiplication using only bit operation.
prefix2postfix.c Converts prefix notation to postfix.
sapin.c Prints a dynamic christmas tree.
crazy_jvm.java Seems like the JVM has gone mad, printing random integers.
confusion.java It is surprising enough, that the code compiles & prints 1.
not_so_random.java Will (randomly!) print- 1 1 1 1 1 1 1 1 1 1.
bangladesh.c Prints the map of Bangladesh.
signature_prime.c Keeps printing prime number (theoretically) forever.
day_of_week.c Computes day of the week for given date.
polyglot_so404.py.pl.rb.c.bf Prints 404 in python, perl, ruby, c and brainfu*k.
polyglot_quine.c.py.pl.rb A quine that runs in c, python, perl & ruby.

Level- 3: Jonin

Code Intro
compound_eye.rb Displays animated pattern.
best_short_program.c Reads a spelt number and writes a corresponding decimal number.
check_prime.pl Checks if a number is prime using regular expression!
quine_signature.c Shortest C code that prints itself.
clock_in1line.c Prints current time in text-art.
japh.pl Prints "just another perl hacker".
matrix_effect.html Displays a matrix-like screen.
pi_signature.c Calculates the first 15000 digits of PI.

Level- 4: Kage

Code Intro
mandelbrot_imager.py Creates an image of Mandelbrot (may take 20m to run!).
shortest_tetris.html Very short and simplified variant of the classic tetris game.
qlobe.rb Prints the globe. And it can also be turned by puting command-line argument.
animated_3d_doughnut.c Shows a 3d animated doughnut with ASCII art.
mandelbrot_flythrough.pl Rotates, zooms in & out, and scrolls randomly to examine regions of the Mandelbrot.

Rogue

Code Intro
octaglot.cob.pas.f77.c.ps.sh.pl.com A polyglot, prints "hello polyglots" in 8 languages.
esoteric_polyglot.mal.bf.ws.asdf.123.spoon.excon A polyglot written in 7 esoteric languages.
palindrome_polyglot_quine.cs.java The code is palindromic, compiles in C# and Java, prints itself.
quine_relay.rb An uroboros program with 100 programming languages.

All the programs here have been tested (by me). TutorialsPoint-CodingGround or repl.it has online code editors and compilers, which can be used to run these programs. Many programs here have been collected from q/a and discussion sites, like- StackOverflow, Quora, Programming Puzzles & Code Golf, & Hacker News.

If you liked this project, then you may also love CuteVirusCollection.

Not Satisfied Yet!

More Repositories

1

DownGit

Create GitHub Resource Download Link
JavaScript
1,530
star
2

TrojanCockroach

A Stealthy Trojan Spyware
C++
801
star
3

StupidKeylogger

A Terrific Keystroke Recorder
C++
437
star
4

CuteVirusCollection

A Collection of Cute But Deadly Viruses
HTML
404
star
5

BengaliDictionary

A Large Collection of Bengali Words & Translations (বাংলা-শব্দ-bengali-shobdo-bengal-word-list-bangla-translation-spell-check-checker-dictionary-translator-dataset-data-set-english-to-bd-bn-en-e2b-sobdo)
Java
163
star
6

AlgorithmImplementations

Implementation of Elementary Algorithms (infix-prefix-postfix-evaluation-to-longest-common-increasing-sub-sequence-activity-selection-balance-kd-binary-heap-binomial-tree-breath-depth-first-search-max-flow-shortest-path-topological-sort-calculus-derivative-integration-forward-interpolation-simpson-rule-intersecting-area-non-linear-equation-jacobis-gauss-seidal-bisection-false-position-newton-raphson-fixed-point-secant-cigarette-smokers-genetic-huffman-a-a*-star-binary-knuth-morris-pratt-kmp-quick-thread-priority-based-premitive-shortest-job-non-primitive-arithmetic-expression-data-structures-list-node-implementation-one-two-way-linked-stack-string-graph-numerical-methods-equation-solving-solve-process-problem-search-sort-prime-ugly-friend-perfect-fibonacci-factorial-factor-number)
C++
70
star
7

GenderRecognizer

Plain Face Detector & Gender Recognizer
Java
59
star
8

SkinDetector

Detects Human Skin From Image (color-region-segmentation-photo-detection-extraction-detect)
Java
26
star
9

DarkLight

Webpage in Night Mode
JavaScript
23
star
10

AlphabetRecognizer

Simple Optical Character Recognizer (english-ocr-image-to-text-recognition-sample-trainig-alphabet-photo-data-database-dataset)
Java
17
star
11

ProgrammerTransformation

The Insipid Journey of Homo Programmer (naive-novice-beginner-super-god-transformation-evolution-improvement-programmer-coder-software-engineer)
C++
10
star
12

BrailleToTextTranslator

Translate Braille Writing to Plain Text
DataWeave
9
star
13

UltimateCalculator

Basic Scientific Calculator (math-calculation-equation-unit-converter-unitconverter-advanced-mathematics-math-number)
Java
9
star
14

ResultAnalysisTool

A Complete Package for Processing OMR Answer Sheet
Java
9
star
15

GRExercise

Free GRE Practice Environment (awa-analytical-essay-writing-ets-issue-argument-pool-calculator-gre-exercise)
JavaScript
9
star
16

Egami

A Light Weight Image Processing Library (java-pattern-recognition-package-tool)
Java
7
star
17

FileSqueezer

Simple File Compressor & Extractor (huffman-algorithm-compression-zip)
C++
7
star
18

Intellectron

An Infant Library of Artificial Neural Network (multilayer-deep-convolutional-machine-learning)
Java
7
star
19

HighlightedTextDetector

Extracts highlighted text from the image of a page
Python
6
star
20

MinhasKamal.github.io

Minhas Kamal: Academic Portfolio (about-blog-work-contact-cv-resume-details)
HTML
5
star
21

TicTacToe

Naive AI Enabled Tic-Tac-Toe Game (noughts-and-crosses-Xs-Os-paper-pencil)
Java
4
star
22

CoolConsoleGames

A Collection of Wonderful Console Games (the-game-of-life-three-3-stones-tic-tac-toe-tictactoe-criss-cross-snake-rush-peeble-dropping-connect-four-4)
C
4
star
23

PicPuzzle

Naive AI Aided Sliding Puzzle Game (picture-image-block-tile-maze-riddle)
Java
3
star