Rate Thread
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting D in class
#1
Soo I thought this may give you all a chuckle, especially the programming savvy though I moved the technical details to the end.

So our professor was being a braniack and demonstrating how his code example was super efficient.

*He is actually a genius*

In short he used a pattern called decorator, it acts similarly to an LinkedList.



So he drew a diagram on the board of about 8 objects and abbreviated the getData() as "getD" and used psuedocode for explaining purposes.

and was like
"OK class, we will start out here at the outermost object and we will work our way to the center. So the first thing we will do is getD."

*some snickering occurring behind me*

"then we will move further in and getD"

*I get it at this point and try and hide a smile*

"So, Alex what will we do here?"

*"getD, sir"*

"thats right we getD"

*at this point my friend jonathan behind me cracks up, trying not to burst out laughing he triest to wrap his face in his arms, this causes me to nearly loose it*

and through the next approximatly 5 objects the teacher pauses and repeats and "here again we getD"

*im almost in tears and the rest of the class is trying their best to maintain composure, every time the teacher says getD its like a slap in the face!*

It crosses my mind, in one class period we got more d than a group of gay guys doing a gay pubcrawl at a pride parade.

ugh it hurt soo bad, then my desk was freaking shakeing because johnathan was physically vibrating trying to prevent a outburst of laughing. The teacher had his back to us and I started to slip outa the room but I realized we had 2 objects left to getD, so I started drawing random crap on my paper and doing math in my head trying to distract myself.

AAANNYY way just thought you guys may get a smile outa our cs class getting soo much d Wink

//**********************************************boreing details
Each class inherits from an abstract item class then each class stores the next class in sequence as a field. IE
Item item; //much like Node node;
double value;


One thing they also share is a getData() method.
so when one class does this
public double getData(){
return this.item.getData()+this.value;}

all items effectively walk a list that delegates responsibility onto the next object
its super efficient because imagine a store with 10,000 items.
the cashier can scan something say (pencil) that value passes into a switch or something until pencil is found and retuns a numerical value based on cost.

if you purchase items p, and the store has some ammount of items i then the time complexity is O(p*i)
doing what the professor did is simply O(p) //much much less!
simply makeing an abstract class with default methods and fields each item in the store can inherit the item class and even though each item has its own class the code is really short since your useing extends.
//*****************************************end boreing details
Reply

#2
It seems that getting D occurs a lot in the code... Tongue
"I’m not expecting to grow flowers in a desert, but I can live and breathe and see the sun in wintertime"
Check out my stuff!
Reply

#3
[MENTION=19807]SilverBullet[/MENTION] I think I would have run out of classroom leaving everything behind! You clearly have better laughter control than I do.
Reply

#4
We needed to show an indication of activity during the startup of our program as we were loading semi-static data into collections so that it would process faster during lookups and calculations. The industry calls this a "throb"

It is called oThrobbingMember in our code. The uber conservative christian coworker who is on the project had an issue with it. Didn't change the name, since we dont change code lightly...
Reply

#5
oh, I also added code to write out a small text file where we had unhandled errors.

File extension .ERR, but the method is called writepoo() because literally the program is taking a dump at the moment. (guy also had an issue with that.)
Reply

#6
kindy64 Wrote:We needed to show an indication of activity during the startup of our program as we were loading semi-static data into collections so that it would process faster during lookups and calculations. The industry calls this a "throb"

It is called oThrobbingMember in our code. The uber conservative christian coworker who is on the project had an issue with it. Didn't change the name, since we dont change code lightly...

ROFLMAO
That could definitely go south quick xD.
So bob, when you called oThrobbingMember did it put out? xD
Reply

#7
SilverBullet Wrote:ROFLMAO
That could definitely go south quick xD.
So bob, when you called oThrobbingMember did it put out? xD

Buffer Overflow?
"I’m not expecting to grow flowers in a desert, but I can live and breathe and see the sun in wintertime"
Check out my stuff!
Reply

#8
Gbitz... you got Double Ded *IN PUBLIC* ?! :eek:
.
Reply

#9
[MENTION=12150]Sil[/MENTION]ver Bullet, perhaps your class should figure out a way to direct your prof's attention to UrbanDictionary.com with certain entries noted.
I bid NO Trump!
Reply

#10
Yeah something like that happened in my class back in the day when I was in highschool, but it was a spanish slang so if I translated it english it will loose it's funny.
Reply



Related Threads…
Thread Author Replies Views Last Post
  Class reunion LONDONER 1 732 10-20-2020, 01:57 AM
Last Post: Bhp91126
  Class reunion LONDONER 0 633 06-22-2014, 08:04 AM
Last Post: LONDONER
  Writing class LONDONER 1 636 07-16-2013, 11:03 PM
Last Post: Dan1980
  I think one of the forums would make a good class... RoydonLeeJ 0 1,106 03-30-2008, 04:14 PM
Last Post: RoydonLeeJ

Forum Jump:


Recently Browsing
2 Guest(s)

© 2002-2024 GaySpeak.com