.

MenuLevelCoins SpentCooking TimeTotal RevenueTotal Profitcoins/hourcafe pointscafe points/hour

.

Atomic Buffalo Wings213653 hours960595198.3368 (21, 46, 1)22.67

.

Bacon Cheeseburger1305 minutes52222647 (3, 3, 1)84

.

Buttermilk Pancakes2526545 minutes40013518031 (9, 21, 1)41.33

.

Caramel Apples1052 hours30019597.535 (12, 22, 1)17.5

.

Chicken Gyro and Fries236010 minutes8828167.714 (3, 10, 1)83.8

.

Chicken Pot Pie3335152 days111007585158.02307 (66, 240, 1)6.4

.

Chips and Guacamole1253 minutes36112204 (3, 0, 1)80

.

Crackling Peking Duck1391518 hours36002686149.17166 (15, 150, 1)9.2

.

Delicious Chocolate Cake521315:14 hours47503435245.36273 (72, 200, 1)19.5

.

Fiery Fish Tacos397402 hours123049024550 (15, 34, 1)25

.

French Onion Soup1904 hours615425106.2561 (12, 48, 1)15.25

.

Gingerbread House5155 days1400013485112.3751063 (12, 1050, 1)8.85

.

Grand Tandoori Chicken50201524 hours60003985166405 (64, 340, 1)16.88

.

Herbed Halibut1771524 hours45003785157.71225 (23, 203, 1)9.38

.

Homestyle Pot Roast18152 days5750393582279 (60, 218, 1)5.8

.

Impossible Quiche47501548 hours1520010185212.19352 (75, 276, 1)7.33

.

Jammin' Jelly Donuts5520 minutes1206519515 (6, 8, 1)45

.

Jumbo Shrimp Cocktail78030 minutes1486813621 (3, 17, 1)42

.

King Crab Bisque2713151 day66855370223.75252 (54, 197, 1)10.5

.

Kung Pao Stir Fry316154 hours1600985246.2575 (21, 53, 1)18.75

.

Lavish Lamb Curry5615158 hours33001785223.125200 (54, 145, 1)25

.

Macaroni and Cheese2652 hours510245122.2541 (15, 25, 1)20.5

.

Overstuffed Peppers35131512 hours43002985248.75206 (45, 160, 1)17.16

.

Powdered French Toast4315520 minutes2226720122 (3, 18, 1)66

.

Pumpkin Pie21512 hours106084570.476 (15, 60, 1)6.33

.

Savory Stuffed Turkey970022 hours36002885131.36216 (15, 200, 1)9.81

.

Shu Mai Dumplings9656 hours23201355225.83156 (60, 95, 1) 26

.

Smoked Salmon Latkes20152 hours2400385192.563 (27, 35, 1)31.5

.

Spaghetti and Meatballs114658 hours1375910113.75100 (24, 75, 1)12.5

.

Spitfire Roasted Chicken6151 day32002585107.7210 (15, 194, 1)8.75

.

Super Chunk Fruit Salad5015 minutes1005020014 (3, 10, 1)56

.

Sweet Seasonal Ham51512 hours24001885157.08102 (21, 80, 1)8.5

.

Tikka Masala Kabobs52301 hour36013013022(6, 15, 1)22

.

Tony's Classic Pizza154155 hours130088517768 (21, 46, 1)13.6

.

Tostada de Carne Asada299158 hours24001485185.625123 (42, 80, 1)15.375

.

Triple Berry Cheesecake41512 hours16501235102.9140 (15, 124, 1)11.67

.

Vampire Staked Steak (Halloween only)3151 day2010169570.6113 (15, 97, 1)4.71

.

Voodoo Chicken Salad1971512 hours26751960163.33168 (36, 131, 1)14

.



Links to this post
This code will always throw ConcurrentModificationException:

for (Person person: group) {
group.remove(person);
}


Because:
You cannot remove an object from a collection while iterating through it.

To solve this problem, use the clear() method to remove all objects of a collection.


Links to this post
I don't agree with "single exit point" and so did I practically never apply it.

Glad to find an entry on this website:
http://stackoverflow.com/questions/1701686/why-should-methods-have-a-single-entry-and-exit-points

It said that:
This advice is outdated and bad for code pratice because it will lead to temporary variable which is hard to maintain.

To me, temporary variables smell bad a lot rather that multiple exit points.


public void uglyAndWrong(final int hamsandwich) {
int answer;
if (hamsandwich % 2 == 0) {
answer
= 27;
} else {
answer
= 13;
}
return answer;
}

vs:

public void comelyAndHip(final int hamsandwich) {
if (hamsandwich % 2 == 0) {
return 27;
}
return 13;
}



How about multiple entry point ?

Look at this code:

public void doSomething(MyObject person, boolean beNice) {
if (beNice) {
//code to do something nice
} else {
//code to do something not nice
}
}

vs:

public void doSomethingNice(MyObject person) {
//code to do something nice
}


public void doSomethingNotNice(MyObject person) {
//code to do something not nice
}


Which one do you prefer ?
I prefer the first one coz it would reduce code duplications because most of the time, code to "do something nice" will just be different in a little way with "do something not nice".


Links to this post
Quoted from one of Jakarta Globe's article:
In polite Indonesian language, these are recommendations. In more direct language, these recommendations should be implemented.
This sentences remind me about Malcolm Gladwell's newest book "Outliers" about how airplane accidents happened because of miscommunication between the pilot and the copilot when they came from 2 different countries. And it make sense to me because I see that kind of thing happened at our office a lot, which has expatriates as managers.

So, according to Indonesian polite language, recommendations or suggestions mean that it should be implemented. But according to west people, recommendations mean recommendations.

Because I was born here, shame on me I do that a lot. So we sort of understand what people "mean" when they "say" something different. And whether they actually want something or not, when they say they don't want it.

You see??? It's so complicated, maybe east people [we] should fix their [our] way of communicating things by using words only without too much feeling inside.


Links to this post
To try this input box, copy paste the code below and save as test.html and then open it with a browser, or use the "Try Me" section on the right side bar of this blog.

<html>
<script type="text/javascript">

function format(fieldName) {
decSeparator = '.';
thousandSeparator = ',';
field = document.getElementById(fieldName);
caret = getCaretPos(field);
newValue = '';
oldValue = '';
sign = '';
decimal = decSeparator + '00';
for (i = 0; i < field.value.length; i++) {
if (field.value.charAt(i) == '-') {
sign = '-';
} else if (field.value.charAt(i) == decSeparator) {
decimal = decSeparator;
for (j = i+1; j < i+3; j++) {
if (field.value.charAt(j).match('[0-9]') != null) {
decimal += field.value.substr(j, 1);
}
}
break;
} else if (field.value.charAt(i).match('[0-9]') != null) {
oldValue += field.value.charAt(i);
} else if (field.value.charAt(i) == thousandSeparator) {
caret--;
}
}

for (i = 0; i < oldValue.length; i++) {
newValue += oldValue.charAt(i);
if ((i != oldValue.length - 1) && ((oldValue.length - i) % 3 == 1)) {
newValue += thousandSeparator;
caret++;
}
}
if (newValue != '') {
field.value = sign + newValue + decimal;
}
setCaretPos(field, caret);
}

function insertAtCaret(obj, text) {
if(document.selection) {
obj.focus();
var orig = obj.value.replace(/\r\n/g, "\n");
var range = document.selection.createRange();

if(range.parentElement() != obj) {
return false;
}

range.text = text;

var actual = tmp = obj.value.replace(/\r\n/g, "\n");

for(var diff = 0; diff < orig.length; diff++) {
if(orig.charAt(diff) != actual.charAt(diff)) break;
}

for(var index = 0, start = 0;
tmp.match(text)
&& (tmp = tmp.replace(text, ""))
&& index <= diff;
index = start + text.length
) {
start = actual.indexOf(text, index);
}
} else if(obj.selectionStart) {
var start = obj.selectionStart;
var end = obj.selectionEnd;

obj.value = obj.value.substr(0, start)
+ text
+ obj.value.substr(end, obj.value.length);
}

if(start != null) {
setCaretTo(obj, start + text.length);
} else {
obj.value += text;
}
}

function setCaretPos (obj, pos)
{
if (obj.selectionStart) {
obj.focus();
obj.setSelectionRange(pos, pos);
} else if (document.selection) {
var range = obj.createTextRange();
range.move("character", pos);
range.select();
}

}

function getCaretPos(obj) {
if (typeof obj.selectionStart != 'undefined')
return obj.selectionStart;
else if (document.selection)
return Math.abs(document.selection.createRange().moveStart('character', -1000000));
}
</script>

Try Me!!!!
<br/>
<input name="tryMe" id="tryMe" type="text" value="" onkeyup="format('tryMe');" onfocus="format('tryMe')" />
</html>


Links to this post