|
Post by DISTURBED on Oct 27, 2010 1:21:10 GMT
[Poem]Roses are #FF0000 Violets are #0000FF All my base, are belong to you. [/Poem]
|
|
|
Post by Qwerty on Oct 27, 2010 3:24:19 GMT
Aww, so cute. We should put that up on Valentine's Day.
|
|
|
Post by ~Memzak~ on Oct 27, 2010 11:15:12 GMT
Hehehe... I lol'd... if only more people would understand..
Although #0000FF and #FF0000 are quite bright for flowers... XD
|
|
|
Post by DISTURBED on Oct 28, 2010 22:21:39 GMT
Meh. Virtual flowerz are bright colorz. If you put that up on valentine's i would feel good
|
|
|
Post by ~Memzak~ on Oct 29, 2010 7:57:28 GMT
I would too.
If only my girlfriend would understand this type of humor. If she did I'd actually attempt to send her a card like that and she'd love me for it. XD But if I did now, she'd be like WTF?! o.O
|
|
|
Post by DISTURBED on Oct 29, 2010 22:34:57 GMT
Haha. epic nerds
|
|
|
Post by clockwork on Oct 30, 2010 2:44:38 GMT
Love it!
|
|
|
Post by ~Memzak~ on Oct 30, 2010 17:02:26 GMT
We should try and somehow nerdify Shakespeare. It would be pretty fun if we did that...
|
|
|
Post by DISTURBED on Nov 1, 2010 22:45:04 GMT
Taking nerdyness to the next level there memzak XD
|
|
|
Post by Rabidbadger on Nov 2, 2010 21:33:44 GMT
Hmm... Nerdified Orwellianism!
|
|
|
Post by ~Memzak~ on Nov 3, 2010 9:56:41 GMT
Romeo, Romeo, Wherefore art thou Romeo.
Now lets see if I've improved at java at all over the last night.
String rm = ("Romeo"); System.out,println(rm+", "+rm); if ( Romeo == Montague) { System.out,println("Wherefore art thou "+rm+"?"); } else { System.out,println("It is not possible for "+rm+"to be anything other than a Montague y'fool!"); }
How's that for Java/Nerd-i-fied? (We are doing Romeo and Juliet in class which is why I suggested nerdifying shakespeare)
EDIT: Now that I read over it, it sounds no where near as good and simple as the first poem of this thread. :C I'll try my luck at another one later.
|
|
|
Post by disabled on Nov 3, 2010 11:17:48 GMT
Now lets see if I've improved at java at all over the last night. I don't know how good you were earlier, but this line is complete fail. - Both variables are undefined
- If you meant them to be Strings, why write Romeo again and not rm?
- Strings don't compare with "==", you need to do str1.equals(str2)
Like this: if ( rm.equals("Montague") { *edit* Oh and of course "System.out,println" won't work either, both separators have to be dots. And you forgot the Java "Class" mumbo jumbo. But I thought that was left out on purpose.
|
|
|
Post by Fringe Pioneer on Nov 3, 2010 11:28:37 GMT
public class MonkeysOnTypewriters {
public String rm = new String("Romeo");
public static void main(String arguments[]) {
System.out.println(rm + ", " + rm);
if(rm.equalsIgnoreCase("Montague")) { /* This condition will not execute, rebel scum! */ System.out.println("Wherefore art thou, " + rm + "?"); } else { /* This condition will always execute. */ System.out.println("It is not possible for " + rm + " to be anything other than a Montague, y'fool!"); }
}
}
Something tells me that the Montague and Romeo comparisons would have made more sense if a user-made Actor object were to be made with firstName and surName as attributes, and then the surName attribute (a String) were to be compared with the "Montague" string. I'm pretty sure, based off my "correct" class, that he didn't meant to compare two strings.
Also, for the laughs, you could have used "isInstanceOf" instead of "=="...
|
|
|
Post by ~Memzak~ on Nov 3, 2010 14:46:12 GMT
Now lets see if I've improved at java at all over the last night. I don't know how good you were earlier, but this line is complete fail. Agreed. It was terrible. And I didn't know anything earlier aside from... well nothing really. I was assuming they were defined earlier. Yes, I forgot to change the Romeo to rm, I was excited about adding variables as I just learnt about them. XD Yes, I suppose it makes sense for == to only work for numbers. I've never made a string comparison before. I thought it would work similar. Ohgod. Now that was by far the stupidest mistake I made in the whole thing. I just wrote it once and copied and pasted it so I wouldn't have to type it out. Yes I left out all the java class mumbo jumbo on purpose. I thought it would make the poem too long. (even though it fails as a poem) Yea, equals wouldn't work because they'd never be equal. Else will always run. Yes, I should have rather used something about class and properties, but I don't know how. XD I'm tried to learn too much at once and not understanding as I am learning. So far all I have been doing is copying and pasting and monkey see monkey do. Some modifications to but no real understanding. Argh, I'm thinking about giving up learning Java. For the third time this year. I'll just put it off until next year where I'll actually take IT as a subject and I'll have to learn it or fail. D: Dammit, my Java poem failed epically. EDIT: I even failed on my quote tags the first time around. I think all my programming skills are fail now.
|
|
|
Post by Artifact123 on Nov 3, 2010 16:51:38 GMT
[Poem]Roses are #FF0000 Violets are #0000FF All my base, are belong to you. [/Poem] Oh, that's really awesome.
|
|
|
Post by ~Memzak~ on Nov 3, 2010 17:40:54 GMT
Agreed.
If only the great poet would write another one? As I clearly have failed, he should be able to make another masterpiece combining awesome and awesome to make PURE awesome. (with some romance on the side)
|
|
|
Post by Fringe Pioneer on Nov 3, 2010 18:58:10 GMT
Considering that leaving out the class "stuff" was intentional on your part, you didn't really fail that much. The only problem was not initializing your variables (which I thought you also did intentionally for the sake of "cleaning" the poem) and making a comparison that would have turned out differently than you expected. Also, == can be used to compare more than just numbers; HOWEVER, it compares two objects to see if they refer to the same object. For example, //Class declaration stuff here
String jedan = new String("abcdefghijklmnopqrstuvwxyz"); String dva = jedan; String tri = new String("abcdefghijklmnopqrstuvwxyz");
static void main(String arguments[]) { System.out.println(jedan == dva); System.out.println(jedan == tri); System.out.println(jedan.equals(tri)); }
//End brace for class goes here
True False True
The reason for the first response is that you use ==, so you are testing to see if two primitives have equivalent value or if two aliases refer to the same object. Since you are using objects (String is an object, not a primitive), the second condition is what holds. You instantiated an object from a newly created String and named it "jedan" (Serbian for "one" in the nominative masculine form, if you're curious), and then you instantiated another object named "dva" from the same object as earlier. They are two different names that refer to the same object, so the == test holds true and the println method of the System class prints "True." When you created "tri," you instantiated it from a new String object that just happened to have the same permutation of characters as your first object, but since you didn't create it from your first object, it isn't your first object; ergo, the == returns false and the println method prints "False." Normally, using the .equals method of the Object (topmost) class and any of its children will result in the same thing as using the == comparison; however, those who made the language already overwrote the method within the String class to redefine what that method does. In so doing, whenever you use the .equals method on String objects, the method will use the definition from the String class and not from the parent Object class. In the String class, the .equals method was defined to see if two String objects had the same permutation of characters. Since the jedan object and the tri object have the same permutation of characters, the .equals method returns true and the println method prints "True."
|
|
|
Post by disabled on Nov 3, 2010 21:41:26 GMT
pointing out the obvious, "one" is undefined and you probably meant "jedan"
|
|
|
Post by ganondorfchampin on Nov 3, 2010 22:00:20 GMT
It is impossible to nerdify Shakespeare; it is already nerdy.
|
|
|
Post by Fringe Pioneer on Nov 3, 2010 22:03:19 GMT
That's what I get for incorporating two human languages in a computer language. Thank you...
|
|
|
Post by DISTURBED on Nov 3, 2010 22:17:45 GMT
You want a new one?
|
|
|
Post by ~Memzak~ on Nov 4, 2010 5:13:09 GMT
Nothing escapes disabled. I think if I ever get around to making anything useful with programming, I'll send it to disabled for a test. Nothing can get past him...
Are you sure?
As you said in your above post, they both mean one.... (not in the program but in real life.
Yes please, ilykemudkipz...
|
|
|
Post by DISTURBED on Nov 5, 2010 0:42:12 GMT
ick. i don't like this. ill just find one.
"Like two foci of an elliptical Your eyes entice me Cause my cardiac muscles To palpitate As I estimate the distance Between us
I’ve arrived At the conclusion That you’re sitting Approximately 5 feet and 23 centimeters Away from me 7 and one half millimeters closer Than yesterday
As you sit there And I calculate your potential energy I find myself wishing That I could change Y= mx + b Into y = Unext2me You are my complementary angle
I long to whisper That Newton’s laws Were created just for you Of course that’s not true But logic doesn’t matter anymore Because my feelings for you are growing exponentially
Like radiation, you penetrate through my skin You watched my veins branch like fractals While I reached for the pencil that you dropped You listened to the logarithm my heart produced At a near inaudible frequency As I returned the pencil To it’s rightful owner
Like absolute zero All molecules within me halted In that moment Your centripetal force sent me spinning And though they say opposites attract You didn’t even utter a thank you
It figures Seeing as the probability of you noticing me Is exactly .41 in 10,731 But I long To cosine my name on a love note Addressed to you
You are the Pascal behind my triangle And you can count on the fact
that I’ll calc-u-later"
-gogetenks8
|
|
|
Post by disabled on Nov 5, 2010 2:04:08 GMT
For those with (or on their way to) a math degree, I recommend the Klein Four, especially "finite simple group":
|
|
|
Post by ~Memzak~ on Nov 5, 2010 7:04:35 GMT
Nice poem. A LOT of nerdyness in there...
I laughed, sorta...
|
|