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;
}
Represent your Life in Code
Started by
Guest_Jordan_*
, Jan 28 2009 07:40 AM
105 replies to this topic
#1
Guest_Jordan_*
Posted 28 January 2009 - 07:40 AM
Guest_Jordan_*
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:
|
|
|
#2
Posted 28 January 2009 - 08:31 AM
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();
}
#3
Posted 28 January 2009 - 10:04 AM
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
Posted 28 January 2009 - 10:10 AM
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");
}
}
#5
Posted 29 January 2009 - 10:39 AM
My life in C++:
Pretty boring, but I enjoy every minute of it.
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
- Beverly Sills
#6
Posted 30 January 2009 - 09:16 AM
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
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.
[SIGPIC]http://forum.codecal...line=1232840697[/SIGPIC]
#7
Posted 30 January 2009 - 10:43 AM
I'm sorry Logan, but we need to reformat your life! :)
#8
Posted 30 January 2009 - 10:57 AM
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")
#9
Posted 30 January 2009 - 11:01 AM
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.
[SIGPIC]http://forum.codecal...line=1232840697[/SIGPIC]
#10
Guest_Jordan_*
Posted 30 January 2009 - 11:02 AM
Guest_Jordan_*
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
Posted 30 January 2009 - 11:03 AM
#12
Posted 30 January 2009 - 11:08 AM
No.
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:
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)


Sign In
Create Account

Back to top










