Jump to content

Represent your Life in Code

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
105 replies to this topic

#1
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Write your normal, every-day/week routine in code. Any language of your choice - it doesn't need to be strict and you don't need to write each function or declare your variables. I will start:

  int main() {
       while(Alive()) {
               Wake();
               CodeCall();

               // Drive to work and work
               Work();
               if (!busy) {
                          CodeCall();
                          TotalPenguin();
               }
               Lunch();

               // Time to leave
               Home(Truck());
               while (Home()) {
                        CodeCall(); TotalPenguin();
               }
              
              // Start over.....
             Sleep(Dream(), CodeCall());
      }

     // Has Dead
     return null;
}


#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
int main()
{
  while(alive())
  {
    Wake(6);
    Read("Bible",0.5);
    Read("http://townhall.com",1.0);
    if(Weekday<7)
    {
      Shower(); Dress();
      if(Weekday>1)
      {
        Drive("Work");
        Work(2.5);
        Eat("Lunch",1.0);
        Work(5.5);
        Drive("Home");
        Eat("Dinner",0.5);
        Read("http://forum.codecall.net");
      }
      else
      {
        Drive("Church");
        Worship(1.5);
        Drive("Home");
        Eat("Lunch",1.0);
        Read("http://forum.codecall.net");
        Eat("Dinner",0.5);
        Read("http://forum.codecall.net");
      }
    }
    else
    {
       Read("http://*.*");
    }
    Sleep(23);
  }
  SingPraisesToGod();
  Resurrect();
}

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
amrosama

amrosama

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 8,674 posts

int main()

{

  //total age

  double age= rand() % 100+ 70;

  age*=365;//converting to days

  //initializing my object from the human class(being born)

  human amr = new human(age,"programmer-stupid-nolife-metal-wierdo"); 

   while(true)

   {  

    age--;

    if(age==0)break;//im dead

     //chances of sudden death

     if((rand() %10+1)  ==10  ) break;

     if(day=="friday")continue;//sleeping all day


     amr.wake();

     amr.wear(new clothes("jeans","cc t-shirt"));

     transport(amr,college);

     amr.sleep(6);//sleeping for 6hrs at college

     if(amr.state!="wake")amr.wake();

     transport(amr,work);

     amr.work(6);

     int work_hrs=6;

    while(work.state!="finished")

           {    

           amr.work(2);

           work_hrs+=2;

           if(work_hrs>12)break;

           }

     transport(amr,home);

     amr.surf("codecall","email","other");

     amr.watch("tv");

     amr.do("programming","sudoku");

     amr.sleep(); 


   }

/*

*this part represents after death

* i have no idea what will happen here

* infact, no one knows for sure

*/

retun null;

}


yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
www.amrosama.com | the unholy methods of javascript

#4
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
There aren't any [c++] BBCode tags, but you can use the HIGHLIGHT ones if you wish.

int main()
{
  while(alive())
  {
    CodeCall.Login();
    for (int i = 0; i < 999999; i++)
    {
      CodeCall.Post(CodeCall.PostType.Spam);
      CodeCall.Rep(CodeCall.RepType.Minus, CodeCall.User.Jordan, "because I feel like it");
    }
  }

Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#5
Muted

Muted

    Learning Programmer

  • Members
  • PipPipPip
  • 86 posts
My life in C++:

int main()


     while (!Sleep) {

         EatFood();

         if (!Busy) { Hygiene.Shower(); Hygiene.BrushTeeth(); }

         Learn();

         if (Tired) { Sleep = true; }

     }


     return 0;

}

Pretty boring, but I enjoy every minute of it.
“You may be disappointed if you fail, but you are doomed if you don't try.”
- Beverly Sills

#6
Logan

Logan

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 226 posts
My life in VB(since I don't know c++ :P)
IDK if thats the correct way to use goto so I used something from a BASIC variant my teacher told me to look at. :P

Dim day As Int = dayof.week.numberform
Dim time As Int = clocktime()
  Private Sub Day_Load
DayStart:
If logan.dead = true then
goto heaven()
ElseIf logan.living = true then
If season.summer then
Sendkeys.Send("Yay, summer...")
Else
WeekEnd:
If day > 5 then
logan.wakeup
SendKeys.Send("OMG IT'Z TEH WEAKEND!")
logan.eat.breakfast = true
logan.im.msn and logan.im.skype
firefox.url("www.forum.codecall.net/lounge/")
logan.push.enterkey
logan.post
logan.eat.lunch = false  'he isn't hungry, he's too busy on codecall :P
logan.partitionmagic.work = false
logan.Emotion.Change(Emotion.EmotionType.Angry)
phonering()
logan.phone.answer
logan.lookat.clock
If time = 10:45
sleep()
ElseIf day < or = 5 then
WeekDay:
logan.wakeup
logan.checknews.school.closings
If logan.school.closed = True then
goto WeekEnd:
Else
logan.school.attend = true
logan.classes()
logan.ride.bus.home = true
If logan.home = true then
firefox.url("www.forum.codecall.net/lounge/")
logan.cc.giverep(findmember("amrosama"),40,"just because i want to♥")
logan.eat.dinner = true
logan.geton.computer = true
firefox.openlast.url = true
while (true) {
CodeCall.Reputation.Give(CodeCall.Users.Xav, CodeCall.Reputation.RepType.Minus, "Because he minus repped Jordan")
}
goto DayStart:
EndIf
EndSub
 

Edited by Logan, 30 January 2009 - 11:30 AM.


#7
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
I'm sorry Logan, but we need to reformat your life! :)
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#8
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
logan.codecall.spam.user.Xav.minusrep.reason("Because he minus repped Jordan")

Hmm - I think CodeCall would be the namespace here, as Logan would be inherited anyway. It would be far more likely to be something like this:

CodeCall.Reputation.Give(CodeCall.Users.Xav, CodeCall.Reputation.RepType.Minus, "Because he minus repped Jordan")

Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#9
Logan

Logan

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 226 posts
I like mine better!! I don't want my life to be reformatted. Unless I get to be stored on an online storage site. :) Then I will be in the internet.

#10
Guest_Jordan_*

Guest_Jordan_*
  • Guests
You might want to put that in a loop:

while (true) {
CodeCall.Reputation.Give(CodeCall.Users.Xav, CodeCall.Reputation.RepType.Minus, "Because he minus repped Jordan")
}


#11
Logan

Logan

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 226 posts
There, you all happy now?

#12
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
No.

logan.emotion.angryface

I don't know whether this is supposed to be a method called angryface() or just an object, but either way it should be more like this:

Emotion.Change(Emotion.EmotionType.Angry)

Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums