Victory Road  

Go Back   Victory Road > General > General Chat > Funny/Interesting Stuff
FAQ Community Today's Posts Search

Notices

 
 
Search this Thread
  #1  
Old September 28, 2008, 06:29:09 PM
SpaceMan++'s Avatar
SpaceMan++ SpaceMan++ is offline
Zoroark
 
Join Date: Aug 2008
Location: BC
Posts: 288
Default Lazy Programming

let's find and make lazy codes:
Code:
import java.*
import lazy.oop.clone.*
class LazyOOP
{
  void main()
  {
    Person clone = new Person(me);
    clone.doWork();
  }
}
Code:
#include <stdlib.h>
#include <stdio.h>
#include "bed.h"

#define i_am_lazy true
int main()
{
  printf("Im going to bed, I'm lazy.");
  goto bed;
  bed:
  bool I_am_sleeping;
  while (i_am_lazy)
  {
	  I_am_sleeping = true;
  }
  return 0; //never wake up
}
Code:
#include <stdlib.h>
#include <stdio.h>
#include "lazy.h"

#define write_code_for_me() (printf("i'm lazy"))
int main()
{
  write_code_for_me();
  return 0;
}
  #2  
Old September 28, 2008, 07:33:52 PM
Cat333Pokémon's Avatar
Cat333Pokémon Cat333Pokémon is offline
Administrator

 
Join Date: Nov 2006
Location: Nevada
Posts: 10,303
Default Re: Lazy Programming

The shortest of them all (Java, VB):
Code:
while (true){}
Code:
Do
Loop
*May cause infinite loop

Well, you can also have fun with this one (Java, VB):
Code:
public void stacker(){
stacker();}
Code:
Public Sub Stacker()
Call Stacker
End Sub
*May cause stack overflow
  #3  
Old September 28, 2008, 07:50:45 PM
SpaceMan++'s Avatar
SpaceMan++ SpaceMan++ is offline
Zoroark
 
Join Date: Aug 2008
Location: BC
Posts: 288
Default Re: Lazy Programming

It's like that:
Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package test;

/**
 *
 * @author jirachifan
 */
public class Main {

    /**
     * @param args the command line arguments
     */
	private static int n = 0;
    public static void main(String[] args) {
		String[] a = args;
		System.out.println(n++);
       main(a);
    }

}
I tired it, it looped 3600 times then it stopped
  #4  
Old September 29, 2008, 01:58:34 PM
Yoshi648's Avatar
Yoshi648 Yoshi648 is offline
Administrator

 
Join Date: Nov 2006
Location: Yoshi's Island
Posts: 3,147
Default Re: Lazy Programming

Infinite loops are fun
  #5  
Old September 29, 2008, 04:30:48 PM
AngrytigerP AngrytigerP is offline
Servine
 
Join Date: Sep 2008
Posts: 52
Default Re: Lazy Programming

On TI-BASIC:

Code:
:Lbl 1
:Clrhome
:Disp "INFINITE LOOP"
:Goto 1
 

Forum Jump


All times are GMT -8.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Victory Road ©2006 - 2024, Scott Cat333Pokémon Cheney
Theme by A'bom and Cat333Pokémon