People tell me why am I acting weird at times. But weird in what sense? Yes, it ain’t the weirdo kind of weird, but the unique kind of weird which makes me special. As a matter of fact, everyone of us is special. Just how one defines it though. Here’s a programmer poetry for your leisure read.
Just have to look at what I’ve been doing for the past 10 minutes, writing nonsense, but then to programmer newbies, this is the way to start learning some OOP (Object Oriented Programming) concepts for your future. Yes,
Programmer Poetry in Java
/* Hello this is me Daniel here
and I am going to write a program
on This day */public class Daniel {
private static String gender;
private String codeLanguage;
private String textName;public static void main(String[] args) {
doDaniel();
System.exit(0);}
public static void doDaniel() {
Daniel daniel = new Daniel();
/* This part of the code does the checkGender for Daniel */
checkGender();
/* Tries to print something which is set to a bean */
System.out.println(“Daniel is a “ + daniel.getGender() + ” obviously!”);/**
* Now you’ve seen it, it doesn’t really needs a direct assigned variable to
* get the value.
* This is one important part of OOP programming.
* The life of Daniel when he is too free
* 14th August 2008, written in less than 10 minutes
* https://danielctw.com
* Email me at contact@danielctw.com if face any issues
*
* Have created other variables for you to play, this program was tested
* and runs as it is. Copy paste the whole thing and start playing with codes
*
*//* Other codes not fully done yet */
}
public static void checkGender() {
setGender(“Male”);
}
public String getGender() {
return gender;
}public static void setGender(String gender) {
Daniel.gender = gender;
}public String getCodeLanguage() {
return codeLanguage;
}public void setCodeLanguage(String codeLanguage) {
this.codeLanguage = codeLanguage;
}public String getTextName() {
return textName;
}public void setTextName(String textName) {
this.textName = textName;
}}
I guessed by now I think people think I am crazy already writing this in the middle of the night at 2am. I think that makes me ME
LoL~ Suddenly go and write programming in the middle of the night? Why? Can’t sleep kahx? Poor u.. :console:
Damn, no enough coding at work kah?!
PP,
I think I am infected with codes….
louyea,
Hmm.. I dunno la… maybe too bored
Waaah bravo techidan *claps* I now I see kinda make sense 10% unblurrified i am with codes lol
Wow! So geeky… LoL
Very sorry to say i have given back most of my programming knowledge to all my dear lecturer… I’m still understand but if you asking me to write from stretch … It’s a Challenge!!!…
Does this work when u compile?
Hannah,
hmm.. at least it kinda make sense to you 😀
TZ,
haha.. geeky am I this week.
Yes, if you want to copy paste it, it will compile…
Can’t even compile wan.. got 9 errors leh.. 😛
It looks like the formatting of the the text when direct copy will come out the ” as ~.
So do a text replace of ~ with ” in your Daniel.java file. Thank you.
PP,
*sweats* hahaha
Cool. Writing codes, in OOP somemore, in the middle of the night.
Lol. is this an error?
”
Daniel daniel = new Daniel();
”
Write some polimorphism!
YoungBrat,
ahaha.. siao rite..
David,
Nope.. that’s creating an object of the class Daniel
ps: BO GO SHIP DA!!!! >>> to whom one? 😛
Replace with ” ady but still got 3 errors can.. The compiler says -> missing function header (old-style formal list?)! Go re-write! =P
but the structure is wrong~ lol
you should create a class Daniel with all the variables such as name, gender etc first then only proceed to the main class. =P
PP,
Eh??? Got such error one??
kenwooi,
ehh. variables already created way before the main function starts wor.. O.o
Haha.. you all like this kind of post is it??
YES! Got such error.. =P Although I’m not very good in programming, but ur this particular coding caught my attention, coz got errors!! Haha~ I love solving errors + debugging! 😉
I agree with kenwooi, ur structure of coding is wrong! 😛