Code as Art

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »

45 Replies - 2232 Views - Last Post: 22 February 2012 - 09:59 PM

#1 JohnPringle  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 37
  • Joined: 13-January 12

Code as Art

Posted 16 February 2012 - 02:56 AM

hello, I have a feeling that one of the moderators here is going to delete this, but I created this code back in November 2011 and felt that I would like to share it with other Java Coders because I know that they can appreciate it. Please mods, don't delete it. Deleting it would be like throwing the Mona Lisa in the trash.

/**
 *
 * @author John Pringle
 */

public class Revolution extends Thread {
    static boolean weExist = true;     //WE NEED THIS TO BE TRUE
    static boolean government = true;  //THIS IS IN QUESTION
    static boolean freedom = false;    //WE NEED THIS TO BE TRUE
    static boolean equality = false;   //WE NEED THIS TO BE TRUE
    static boolean injustice = true;   //WE NEED THIS TO BE FALSE
    
    public static void main(String[] args){
        while(weExist){                //WHILE WE EXIST
            if(government != freedom  //IF GOVERNMENT DOES NOT EQUAL FREEDOM
              || government !=  equality //OR IF GOVERNMENT DOES NOT EQUAL EQUALITY
              || government == injustice //OR IF GOVERNMENT EQUALS INJUSTICE
             ){                          //THEN
                new Revolution().start(); //START "THE METHOD" BELOW
            }else{                        //OTHERWISE
                System.err.println("REVOLUTION NOT NEEDED");
                System.exit(0);            //EXIT TO THE SYSTEM STATUS ZERO
            }
        }
    }
    
    @Override
    public void run(){ // "THE METHOD"
        while(freedom == false      //WHILE FREEDOM DOES NOT EXIST
              || equality == false  //OR EQUALITY DOES NOT EXIST
              || injustice == true //OR JUSTICE DOES NOT EXIST
              || weExist == true) { //OR WE ARE ALIVE
           boolean revolutionCodeComplete = false; //WE NEED YOUR HELP
           if(revolutionCodeComplete == true){    //TO MAKE THIS WORK
               System.out.println("STARTING PROCESS"); //HELP US?
           }else{                                   //OTHERWISE
              System.err.println("REVOLUTION FAILED"); //WE FAIL
              //System.exit(0);        //EXIT TO THE SYSTEM STATUS ZERO
              /**IMPORTANT remove "//" at start of above line(38) to activate 
              //the line of code otherwise your system will crash. */
              //Sorry but you shouldn't run code without checking it :P/> 
           }
        }
        
        //BUT WE NEED THE REVOLUTION TO SUCCEED
        System.out.println("REVOLUTION COMPLETE");
        System.exit(1); //EXIT TO THE SYSTEM STATUS ONE :)/>
    }
}



Enjoy life :)

Is This A Good Question/Topic? 0
  • +

Replies To: Code as Art

#2 Ghlavac  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 519
  • Joined: 14-January 09

Re: Code as Art

Posted 16 February 2012 - 03:09 AM

Are you a troll or just someone with a seriously inflated sense of what is considered 'art'?
Was This Post Helpful? 0
  • +
  • -

#3 JohnPringle  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 37
  • Joined: 13-January 12

Re: Code as Art

Posted 16 February 2012 - 03:11 AM

I am not a troll, but I have a question for you, are you someone who underestimates what can be considered as art?
Was This Post Helpful? 0
  • +
  • -

#4 Karel-Lodewijk  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 449
  • View blog
  • Posts: 849
  • Joined: 17-March 11

Re: Code as Art

Posted 16 February 2012 - 03:23 AM

*
POPULAR

Ok, I'll bite :)

Your code looks fine to me but it can be greatly simplified.

First of all a person can not be free and equal at the same time. If I am free, I'm free to become better than you. Some people can't be free and just at the same time. If they are free they can make the choice to be unjust. And third if everyone is absolutely free, there is no government, so government can never equal freedom.

So if we take all this into account, then while we exist either freedom or equality must be false. So a revolution can never succeed (you will never break out of the while loop). Further more since the only free government is no government and since no government will lead to inequality and injustice, there will always be a need for revolution. So you can rewrite the code like this:

public class Revolution extends Thread {
    static boolean weExist = true;     //WE NEED THIS TO BE TRUE

    public static void main(String[] args){
        while(weExist){ //WHILE WE EXIST
            System.err.println("REVOLUTION FAILED"); //WE FAIL
        }
        System.err.println("REVOLUTION NOT NEEDED");
        System.exit(0); //return success
    }
}



Much cleaner, or is that too cynical :)

Anyway this should probably be moved to the lounge forum.

This post has been edited by Karel-Lodewijk: 16 February 2012 - 03:25 AM

Was This Post Helpful? 12
  • +
  • -

#5 blackcompe  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1152
  • View blog
  • Posts: 2,530
  • Joined: 05-May 05

Re: Code as Art

Posted 16 February 2012 - 03:46 AM

*Moved to lounge*

This post has been edited by blackcompe: 16 February 2012 - 03:46 AM

Was This Post Helpful? 0
  • +
  • -

#6 baavgai  Icon User is online

  • Dreaming Coder
  • member icon

Reputation: 5805
  • View blog
  • Posts: 12,644
  • Joined: 16-October 07

Re: Code as Art

Posted 16 February 2012 - 05:42 AM

View PostKarel-Lodewijk, on 16 February 2012 - 06:23 AM, said:

First of all a person can not be free and equal at the same time.


Excellent!

However, you're assuming equality is an expression of state or value. Equality can be an expression of property, as in are these objects equal, using only type as a criteria.

Also, you assume "we" refers to an individual, when it's more likely to be the abstraction of "everyone", which makes more sense in context.

There is an underlying assumption that government is directly responsible for freedom and it's lack. Or that having a government that supports the nebulous "equality" will somehow influence the "freedom" or "we." It is an absurdist perspective, because any "government" must also consist of "we" to exist at all. If "we" exists separate from "government" then an inherent inequality has been imposed on the system and it can never possibly resolve to equal... :P
Was This Post Helpful? 3
  • +
  • -

#7 JohnPringle  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 37
  • Joined: 13-January 12

Re: Code as Art

Posted 16 February 2012 - 06:27 AM

By "equality" I was using the definition that equality is the opportunity to achieve the same. However, we live in a society where some are restricted and don't have the same opportunities open to them. I did understand however that we would never break out of the while loop and therefore came to the conclusion that revolution would always be needed.
Was This Post Helpful? 0
  • +
  • -

#8 WolfCoder  Icon User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 783
  • View blog
  • Posts: 7,610
  • Joined: 05-May 05

Re: Code as Art

Posted 16 February 2012 - 09:53 AM

inb4 LISP as art
Was This Post Helpful? 1
  • +
  • -

#9 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2957
  • View blog
  • Posts: 10,182
  • Joined: 08-August 08

Re: Code as Art

Posted 16 February 2012 - 09:53 AM

We also live in a society where some people (who are not citizens) are not only unrestricted but given great power.

Government's job is not to provide all freedoms to all people. It's job is to reasonably restrict freedoms so that one group does not have unfair and unreasonable advantages over others.

Revolution becomes necessary when a group (ie, Wall Street) gains too much power to manipulate the government so that the government is no longer doing its job.
Was This Post Helpful? 2
  • +
  • -

#10 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7649
  • View blog
  • Posts: 12,905
  • Joined: 19-March 11

Re: Code as Art

Posted 16 February 2012 - 10:34 AM

Quote

It's job is to reasonably restrict freedoms so that one group does not have unfair and unreasonable advantages over others.



uh-oh, you're in for it now. I hear the libertarians arming up...

It's always struck me as a peculiar fetish among some otherwise reasonable people that the world should be organized to provide them with maximum "freedom" but they never actually spend any time thinking about what it would mean to get what they say they want. I think Hobbes had some words to say about life in the state of nature - "solitary, nasty, brutish, and short" is how he described it. (oddly, this also describes most libertarians I've met)
Was This Post Helpful? 1
  • +
  • -

#11 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7649
  • View blog
  • Posts: 12,905
  • Joined: 19-March 11

Re: Code as Art

Posted 16 February 2012 - 10:41 AM

View Postblackcompe, on 16 February 2012 - 05:46 AM, said:

*Moved to lounge*



Wouldn't this have been better in the nightmare.in.code section?

I mean, this just dumps you into a while loop and soaks up cycles, accomplishing nothing. Reminds me of most organizing meetings I've been to.
Was This Post Helpful? 1
  • +
  • -

#12 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1924
  • View blog
  • Posts: 3,462
  • Joined: 13-January 08

Re: Code as Art

Posted 16 February 2012 - 11:04 AM

Someone is willfully confusing "libertarian" with "anarchist".

Back to the subject though, code as art...meh. If you say so. And that's an entirely valid response because art is defined as such by each person and their appreciation/reaction to it. Personally, I don't see art in the code itself. I can discern cleverness, an interesting and previously unconsidered way to think or other such "hey, that's neat" appreciations to an effort...but those don't necessarily = art.

You wrote some code you're proud of. You think it's art. Congrats, I guess.
Was This Post Helpful? 1
  • +
  • -

#13 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9096
  • View blog
  • Posts: 34,162
  • Joined: 12-June 08

Re: Code as Art

Posted 16 February 2012 - 11:14 AM

Wow... and I thought my morning meeting was just occupying space for self aggrandizing flatus bags. Bwahahaha..

You get a gold star on your participation sheet today! Four more and you get to draw out of the prize drawer! :D

A few things I take note off...

Quote

I would like to share it with other Java Coders because I know that they can appreciate it.

Why *only* java developers? Are those silly PHP tie spinners or furry toothed Closure wads too dense? Perhaps it's some social commentary on language of choice to a sense of self in relation to freedom?

Quote

Please mods, don't delete it. Deleting it would be like throwing the Mona Lisa in the trash.

This.. this is so stunning I had to put on my shades to continue!

Code wise the rigidity of this structure is the greatest downfall. Well that and the west coast code styles and brace placements. Ugh. What I don't get is where's the brink in the code? All I see is if the government operates in less than a perfect utopia it's all revolution this and molotov cocktail that. Can a brother get a list of things that would be acceptable before I start gearing up?

Also I see a severe lack of change in your code. This essentially says "here's the facts - they can never change". Revolution is a wasted activity since change can never be affected. That and your revolution is doomed to failure out of the gate.

If anything this is a grim view of reality with no hope for change, evolution, or bettering ourselves. Hell at this point I say give me five minutes to ice up my cooler of High Life, park it next to my lawn chair on the room, and let loose the nuclear hounds of the apocalypse.

Shit maaaan.. you just smurfed my good mood for the day.
Was This Post Helpful? 1
  • +
  • -

#14 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7649
  • View blog
  • Posts: 12,905
  • Joined: 19-March 11

Re: Code as Art

Posted 16 February 2012 - 11:19 AM

View PostCraig328, on 16 February 2012 - 01:04 PM, said:

Someone is willfully confusing "libertarian" with "anarchist".


Sorry, you're right. They wear different t-shirts. My mistake.
Was This Post Helpful? 1
  • +
  • -

#15 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 6018
  • View blog
  • Posts: 10,444
  • Joined: 28-September 07

Re: Code as Art

Posted 16 February 2012 - 01:52 PM

My personal philosophy is if it says "Please mods don't delete this" it should swiftly and immediately be deleted.

This is probably why they took away my mod badge.

























Spoiler

Was This Post Helpful? 2
  • +
  • -

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »