<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d5160689\x26blogName\x3dThree+Letter+Acronyms+(TLA)\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dSILVER\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://tla.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://tla.blogspot.com/\x26vt\x3d-8755022925038927658', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe", messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER, messageHandlers: { 'blogger-ping': function() {} } }); } }); </script>

Three Letter Acronyms (TLA)

Sunday, January 27, 2008

Today's TLA is ACS

Art or Computer Science

I wrote this because I have had writers block with this blog. I don't know if I want to continue writing TLAs or just write on my 365-light-life-love blog. I wrote code to express some of my logic that's been going on in my life. I don't know if this is a new form of art, because this is a working program with working logic, but there are ideas here that are far more interesting than the code itself. I don't know if people will get it. Let me know if you do. This is not some silly esoteric Google or Facebook interview question. I just want to know whether you would consider this poetry or logic. Dang writing this makes me feel like debugging a freaking e-Harmony or Match.com algorithm. And those sites capitalize on the craving of people to have a romantic relationship. I don't know, parts of me says it is just simple CS, but the artist in me thinks there is something that needs to be fleshed out. So for the 2 people who read my blog, let me know what you think.

public class RomanticRelationship {

private Person male = new Person();
private Person female = new Person();

public boolean willThisWork(){

boolean retBool = false;


if(male.getPleasure() == female.getPleasure()){
retBool= true;
}


return retBool;
}


public void initializeIrrationalHumans(){

male.setHappy(new Double(Math.rint(Math.random())).intValue());
male.setPleasure(new Double(Math.rint(Math.random())).intValue());

female.setHappy(new Double(Math.rint(Math.random())).intValue());
female.setPleasure(new Double(Math.rint(Math.random())).intValue());
}




public static void main(String [] args){

RomanticRelationship aRomanticRelationship = new RomanticRelationship();
aRomanticRelationship.initializeIrrationalHumans();
boolean ans = aRomanticRelationship.willThisWork();
System.out.println("Will this romantic relationship work?"+ans);


}



}

class Person {
private int pleasure=0;
private int happy=0;

Person(){

}

public void setPleasure(int aPleasureMetric){
pleasure = happy + aPleasureMetric;
}

public int getPleasure(){
return pleasure;
}

public void setHappy(int aHappyMetric){
happy = aHappyMetric;
}

public int getHappy(){
return happy;
}
}

1 Comments:

  • hahaa... this is genius. I think it is geekPoetry or something as such... I definately lean more on the side of poetry... Very logical poetry. If only life were this simple.

    Philip

    By Blogger Philip, at 11:11 AM  

Post a Comment

<< Home