Skip to content

zakarialaoui10/only-for-psychopathic-programmers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 

Repository files navigation

programming-for-psychopaths

hello_world_in_matlab

Millions of engineers and scientists use MATLAB in various fields, in industry and academia, including deep learning and machine learning, signal processing and communications, image and video processing, control systems, test and measurement, computational finance, and computational biology but no one of them can print hello world in this language .
Don't worry, Now you can print hello world using MATLAB

disp("Hello world")  

oop_in_no_oop_languages

Oop it's just a paradigm ...

Object = Struct + Methodes

Oop_in_C_Lang

#include <stdio.h>
struct point{
  int x;
  int y;
};
struct circle{
  float radius;
  struct point center;
} ; 
void pointConstructor(struct point *P,int x,int y)
{
    P->x=x;
    P->y=y;
}
void circleConstructor(struct circle *C,float r,struct point p)
{
    C->radius=r;
    C->center=p;
}
int main() {
    struct point p;
    pointConstructor(&p,11,12);   
    struct circle c;
    circleConstructor(&c,3,p);
    printf("Circle radius is %.2f, center is at (%d, %d)", c.radius, c.center.x, c.center.y);
    return 0;
}

Oop_in_Go_Lang

indexing

data Language index element
1
2
3
4
Javascript 1 2
Python 2
Java 2
C 2
C++ 2
Matlab 1

loop

level 0

for(i=0;i<10;i++)console.log(i)

level 1

i=0;
while(i<10){
console.log(i)
i++;
}

level 2

i=0;
for(;;){
if(i==10)break;
console.log(i)
i++
}