Sponsored by Dragon Age: Origins
Can't get enough Dragon Age: Origins? Play the flash game. view!
DragonAgeJourneys.com - Play the free companion flash game to Dragon Age: Origins.
318 Comments
- julesx, on 06/14/2009, -28/+397nerds.
- JonnyIsElectric, on 06/14/2009, -17/+376is this like playboy for you guys?
- MacGyver2210, on 06/14/2009, -4/+336CMP01 Error: Object 'girlfriend' is an undeclared identifier. Not found.
- inactive, on 06/14/2009, -9/+300if(dishes_are_dirty)
call_girlfriend();
else
call_pizzaPlace(); - tdmeth, on 06/14/2009, -1/+153Welcome to Digg.
- legendxx, on 06/14/2009, -1/+132Stories like this made digg. Now all you people who joined recently are mocking it.. very sad. Believe it or not digg started out with a very technical-oriented user-base.
/get off my lawn. - BrokenVisage, on 06/14/2009, -9/+124or in msaleem's case: fuction reddit_submission(steal)
- BattleScars, on 06/14/2009, -3/+89"Please put dirty dishes into the dishwasher and empty it when it is finished. Thank you."
- JonnyIsElectric, on 06/14/2009, -10/+86... but i dont know any women that can read this stuff
- xero69, on 06/14/2009, -6/+78while(!woman.dead)
{
kitchen.insertwoman();
} - MacGyver2210, on 06/14/2009, -2/+74It's funny because it's true. 4x Programming students in one apartment = fun coding notes. Like the one I did the other day for my roomy who refuses to flush the toilet in our shared bathroom. So not cool.
- inactive, on 06/14/2009, -2/+69...
}
catch (GirlFriendUndefinedException ex)
{
// fml
} - Myztry, on 06/14/2009, -2/+64DirectX teacher? That's a class?
- jamend, on 06/14/2009, -2/+64In rewriting it in Java, you neglected to fix the bug...
Your code and the original don't allow a dirty dish to be inserted unless the dishwasher is completely empty, there would never be more than one dirty dish in the dishwasher because you empty it every time before inserting, and, assuming that the dishwasher's capacity is greater than one, it would never be started.
function kichen_maintenance() {
if (dishwasher_clean) empty_dishwasher();
if (have_dirty_dish) insert_dirty_dish();
if (dishwashwer_full) start_dishwasher();
} - enkideridu, on 06/14/2009, -17/+74I hate pseudo code
- wesw02, on 06/14/2009, -0/+53No body seems to check for an overflow. What if:
(dirtyDishes.size() > dishwasher.maxCapacity())
You need a loop :) - inactive, on 06/14/2009, -2/+51ok how about this:
if(has_girlfriend)
{
if(dishes_are_dirty)
call_girlfriend();
else
call_pizzaPlace();
}
else
{
go_to_moms_house();
} - EthylAdded, on 06/14/2009, -2/+46Original critique is correct starting with "Can you spot the bug ...". Once you insert a dirty dish, dishwasher_clean will become false while disherwasher_full remains false. Since this function was meant to convey the essential essence of dishwasher maintenance, following it will result it only one dirty dish in a non-running dishwasher with loads of dirty dishes piled around it. The response is just asinine.
- evilesttoast, on 06/14/2009, -1/+44What do you mean by 'girlfriend'?
- MacGyver2210, on 06/14/2009, -4/+44Sure, Java is fine if you want it to run horribly slow on common platforms and eat up all their memory. They'll be forgetting where they left their keys everytime they fill the dishwasher. It should go more like:
void kitchen_maintainence(DirtyDish* _dish)
{
if (DishWasher->GetFull() && !DishWasher->GetClean())
{
DishWasher->Add(_dish);
}
if (DishWasher->Clean() && _dish)
{
DishWasher->Unload();
kitchen_maintainence(_dish);
}
if (!DishWasher->Clean() && DishWasher->Full() && _dish)
{
DishWasher->ForceToFit(_dish);
DishWasher->Start();
}
}
Nothing tops good object-oriented recursive code. - bobbax, on 06/14/2009, -0/+38I can't believe with all these "intelligent" programmers nobody's figured out how to add detergent yet!
These damn dishes will never get clean... - Sylphid15, on 06/14/2009, -0/+38I just came back from reddit. Believe me it is NOT pretty out there.
- MokaPot, on 06/14/2009, -4/+37I don't see why you have to call him ***** before he actually tries to insert the dirty dish.
public void kitchenMaintenance() throws DishwasherFullException {
try{
if(dishwasherClean){
emptyDishwasher();
}
insertDirtyDish();
if (dishwasherFull) startDishwasher();
}catch(DishwasherFullException e){
System.out.println("Get the clean dishes out first, *****");
throw e;
}
} - awtripp, on 06/14/2009, -0/+32Well, yeah, it always looks easy in the abstract. Now try applying that.
- kanojo1969, on 06/14/2009, -2/+34while(!dishWasher.full)
{
dishWasher.insertDish();
}
this is the bit in the middle that makes it work, otherwise it will get stalled as per the comment. and amazingly the dude in the first comment doesn't fix it either, what a dufus. - waaan, on 06/14/2009, -0/+31lol at DirectX class, sorry time to go back to my Firefox class
- scuba7183, on 06/14/2009, -0/+31seriously, this is why I love digg
- Jektal, on 06/14/2009, -2/+32pseudo-code version:
dishwasher full and clean? empty it.
dishwasher full and dirty? start it.
otherwise insert dish - alpha88, on 06/14/2009, -0/+29Fun fact: People who spell "half" as "have" aren't graduates!
- inactive, on 06/14/2009, -0/+28since when does the creation of a function require accepting arguement or returning something?
Whoever is teaching you has a flawed idea of what a function is. - SSUK, on 06/14/2009, -2/+30... Yeah, I'll go there:
DirectXXX - rossisdead, on 06/14/2009, -0/+27If ToiletStream.EndOfStream Then
ToiletStream.Flush
If Roommates.Contains(Female) Then ToiletStream.Close()
End If - spvn, on 06/14/2009, -10/+37C++ ftw.
- inactive, on 06/14/2009, -1/+27Don't be silly Myztry, it's a series of libraries.
- Ragzouken, on 06/14/2009, -0/+26Here you do not prevent inserting a dirty dish into a full dishwasher.
- mrgprime, on 06/14/2009, -1/+27C++ doesn't use the "function" keyword. This looks like JavaScript.
- iFrix, on 06/14/2009, -1/+25I thought it was funny...
- fuzzynyanko, on 06/14/2009, -0/+24Someone down the line has got to do the coding on Playboy.com
- balixtron, on 06/14/2009, -1/+25Bad, bad code.
- MacGyver2210, on 06/14/2009, -3/+27It's clearly a c-based language, and not pseudocode.
PG101.RevisitNowKThxBai(); - MrTea, on 06/14/2009, -3/+24but it's not C++
- dazparkour, on 06/14/2009, -0/+20digg.post(reddit.getStories())
- gaph2000, on 06/14/2009, -1/+21if(woman.dead)
{
new_woman();
} - bonarez, on 06/14/2009, -2/+22you guys really should sanatize the input, I mean there is a clear buffer overflow in this dishwasher
- MacGyver2210, on 06/14/2009, -6/+25My DirectX teacher is a girl, there's girls in our year for Comp Sci, don't know why it's hard for you to find them.
- Komgol, on 06/14/2009, -0/+19reddit_submission() is a function and steal is a variable? Your coding is ***** up, sir.
- ranon78, on 06/14/2009, -0/+18public class HotBabes extends Babes {
}
is more corect. - tdmeth, on 06/14/2009, -1/+19ALL of us guys need to get laid.
- tattokris, on 06/14/2009, -0/+16I like Python.
import maid -
Show 51 - 100 of 330 discussions




What is Digg?
The Digg Toolbar for Firefox lets you Digg, submit content, and keep track of Digg even when you're not on the Digg site. Download the official