Omnimaga

General Discussion => Other Discussions => Humour and Jokes => Topic started by: TheBassetHound on May 23, 2013, 09:38:20 pm

Title: Making up code for you habits
Post by: TheBassetHound on May 23, 2013, 09:38:20 pm
When I'm outside wearing a jacket, I always put my hands in my pockets. I walked out of school today, and tried to put my hands in my pockets. Then I thought, 'Wait...
:If temp<45 and coat=1
:prgmHANDSINPOCKET
:Else
:prgmHANDSDOWN
Coat=0 and temp is over 50... So no hands.'
A: I need a life, and
B: Have you ever had times like this? Can you come up with a makeshift program for your habits? Please let me know I'm not the only one who does this...
Title: Re: Making up code for you habits
Post by: blue_bear_94 on May 23, 2013, 10:09:01 pm
Temp and coat would have to be T and C, respectively, unless you're running 68k Basic, in which case the program calls would be hipocket() and hdsdown(), respectively. Even with the 83+ variant, you'll need to shorten the programs to prgmHIPOCKET and prgmHDSDOWN.
Title: Re: Making up code for you habits
Post by: Hayleia on May 24, 2013, 01:10:16 am
When I'm outside wearing a jacket, I always put my hands in my pockets. I walked out of school today, and tried to put my hands in my pockets. Then I thought, 'Wait...
:If temp<45 and coat=1
:prgmHANDSINPOCKET
:Else
:prgmHANDSDOWN
Coat=0 and temp is over 50... So no hands.'
A: I need a life, and
B: Have you ever had times like this? Can you come up with a makeshift program for your habits? Please let me know I'm not the only one who does this...
You forgot to End your If.
/me runs
 :P
Title: Re: Making up code for you habits
Post by: Scipi on May 24, 2013, 01:27:04 am
def main():
   while(onComp):
      while(steamOpened):
         useSteam()

def useSteam():
   checkStore()
   game = chooseGame()
   play(game)

def checkStore():
   for game in catalogue:
      if game.onSale and game.getCost() <= $10:
         buy(game)
main()
Title: Re: Making up code for you habits
Post by: Juju on May 24, 2013, 01:30:38 am
When I get home...

door.unlock();
door.open();
if(!hairdressingsalon.open) door.lock();
schoolbag.get(laptop, plug);
plug.on(wall, laptop);
laptop.start();
laptop.exec("/usr/bin/google-chrome http://www.omnimaga.org/");
Title: Re: Making up code for you habits
Post by: ElementCoder on May 24, 2013, 02:16:16 am
def getHome():
    if !omnimaga:
        laptop.exec("firefox http://www.omnimaga.org")
    if feelingClever:
        laptop.exec("notepad++")
    else:
        laptop.exec("KSP")
getHome()
Title: Re: Making up code for you habits
Post by: Streetwalrus on May 24, 2013, 06:57:03 am
.COMPY
#Axiom(RUNPRGM)

If FEELCLEVER
CODE()
ElseIf FEELADV
TWEAKLINUX()
Else
OMNI()
End

Return

Lbl CODE
RunPrgm(gedit TheGAME.z80)
While 1
!If rand^5
OMNI()
End
End
Return

Lbl TWEAKLINUX
RunPrgm(linux)
MessStuffUp
Return

Lbl OMNI
RunPrgm(chrome http://www.omnimaga.org)
While 1
End

:P
Title: Re: Making up code for you habits
Post by: blue_bear_94 on May 24, 2013, 04:10:25 pm
gethome.c
Code: [Select]
int main(void) {
  if (doorIsLocked()) {
    if (haveKey())
      unlockDoor();
    else {
      if (havePhone())
        callParents();
      else exit(1);
      }
    }
  }
  openDoor();
  if (!parentsPresent()) {
    SESSION* s = turnOnComputer();
    if (!isOpen(s, "chrome"))
      openPrgm(s, "chrome");
    check(s, "chrome", "http://www.omnimaga.org);
    }
  else {
    greetParents();
  }
}
}
Title: Re: Making up code for you habits
Post by: epic7 on May 24, 2013, 04:55:56 pm
while(true)
     sleep();
Title: Re: Making up code for you habits
Post by: hellninjas on May 24, 2013, 05:05:41 pm
:"Bed"->Str1
:"Insomnia"->Str2
:"Me"->Str3
:DelVar Str2
:Str1+Str3

Just something I wish I could do :P
Title: Re: Making up code for you habits
Post by: Spenceboy98 on May 24, 2013, 05:19:42 pm
Code: [Select]
while(teenager) {
    if(athome){
        if(withcompany){
            beLazy();
            getOnComputer();
        } else {
            beLazy();
            getOnComputer();
        }
    } else if(atschool) {
        school();
    } else if(atstore && withmom) {
        askForCandy();
    } else {
        doNothing();
    }
}
Title: Re: Making up code for you habits
Post by: TheBassetHound on May 24, 2013, 09:42:26 pm
while(true)
     sleep();
My sentiments exactly.

Oh and another one:
:If inRoom=1and iPod=1
:iPod->dock
:End
:Else
:prgmWALKBACK
:End
:If Dock=1 and Sister=0
:putOn Pandora
:End
:If Sister=1
:prgmGTFO
:End
:Else
:End
:If Pandora=BrunoMars-Treasure
:prgmSING

And these aren't meant to be perfect, just FYI.
Title: Re: Making up code for you habits
Post by: Joshuasm32 on May 25, 2013, 10:30:20 am
lol, i was about to optimize and fix...
Title: Re: Making up code for you habits
Post by: TheBassetHound on June 05, 2013, 10:13:36 pm
I am pretty bad at programming, but I'm taking a class this summer to fix that. I like people on Omni (and Ponies too [There, sorunome {and Streetwalker}]), you're all nice.

:If BOBSAYZHAI
:GetVocal- : "Hello"
:If BOBSAYZPIE
:GetVocal-?: "What flavor"
:If BOBSAYZPIEFLAVOR
:Happy->Mood

Yay I like random :D ("I baked you a pie." "Oh boy! What flavor?" "Pie flavor.")
So... yeah
Title: Re: Making up code for you habits
Post by: Streetwalrus on June 05, 2013, 10:33:54 pm
(and Ponies too [There, sorunome])
You forgot me. D:
Title: Re: Making up code for you habits
Post by: leafy on June 05, 2013, 11:32:59 pm
While (nojob):
    sleep(20)
Title: Re: Making up code for you habits
Post by: JamesV on June 06, 2013, 12:17:47 am
Code: [Select]
if (bored && hasSpareTime) {
  makeYetAnotherAlienBreed();
}
else {
  daydreamAboutAnotherAlienBreed();
}
Title: Re: Making up code for you habits
Post by: aeTIos on June 06, 2013, 12:24:45 am
If freetime== true then
  WorkAllDay ()
end

It's making me crazy.
Title: Re: Making up code for you habits
Post by: shmibs on June 06, 2013, 02:05:07 am
Code: [Select]
/*
 * life.c
 *
 * Copyright 2013 shmibs <[email protected]>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 *
 *
 */


#include <stdio.h>

typedef struct show {
video episodes[26];
video extras[4];
} show;

typedef enum p_type {
AXE,
C,
PERL,
BASH,
ASM,
DESKTOP_CONFIGS,
FIXING_ARCH_AFTER_HAVING_BROKEN_IT_YET_AGAIN
} p_type;

typedef struct project {
p_type type;
int difficulty;
} p_type;

typedef struct chan {
member member_list[40]; /* i never talk in channels with more than 40 people. they're too hectic */
topic current_topic;
} chan;

typedef struct amusement_node {
show current_anime;
video current_film;
book current_book;
album current_album;
chan current_channel;
project current_project;
amusement_node* next;
} amusement_node;

int main(int argc, char **argv) {
int depressed, busy=FALSE, day=0, age=0;
amusement_node* head=NULL, temp;

while(TRUE) {
while(schoolwork_check()) {
do_schoolwork();
depressed=TRUE;
busy=TRUE;
}

if(head != NULL) {
process_amusement(head);
if(!(rand()%3)) {
depressed=FALSE;
} else {
depressed=TRUE;
}
temp=head->next;
free(head);
head=temp;
busy=TRUE;
}

if(!busy)
depressed=TRUE;

day++;

if(!(day%365)) {
age++;
}

if(!(rand%( (100-age)*2000)))
break;
}

return 0;
}
Title: Re: Making up code for you habits
Post by: ben_g on June 06, 2013, 01:38:55 pm
Code: [Select]
public static void getUp(){
    UnderwearDrawer.takeRandom().wear();
    body.arm.pushAway(blanket);
    body.performMotion(Motion.stand_up);
    body.legs.walkTo(closet.getLocation());
    body.arm.interact(closet.door,Action.open);
    tshirtStack.takeTopOne().wear();
    sweaterStack.takeTopOne().wear();
    pants.takeRandom();
    body.arm.interact(closet.door,Action.close);
    body.legs.walkTo(room.door.getLocation());
    body.arm.interact(room.door,Action.open);
    body.legs.walkTo(stairs.getLocation());
    body.performMotion(Motion.walkDownStairs);
}