Showing posts with label pizza. Show all posts
Showing posts with label pizza. Show all posts

Sunday, March 03, 2019

Exercises for Programmers: 57 Challenges to Develop Your Coding Skills - Chapter 3, Pizza Slices, Version 2

The second version of the pizza exercise was about changing the formula.  It was only a bit of math.  I was confused because my Math. functions weren't working right.  But it had nothing to do with Math.  It was all about my lack of a return keyword and some bad parens.  I've become better at sussing those out - fewer initial assumptions on my part.

JSFiddle: https://jsfiddle.net/NodToNothing/pz3Lhu2m/

The math is a bit more difficult to work out mentally than the other pizza exercise.  I almost had to write it down to make sure it was right.  I didn't do the part with use "piece" or "pieces" depending on 0, 1, many.  That seems like busywork.


The Vue.js code:

 

Saturday, March 02, 2019

Exercises for Programmers: 57 Challenges to Develop Your Coding Skills - Chapter 3, Pizza Slices

Exercise 8: Pizza Party

I think my default is now Vue - I'm getting lazy.  I have the numeric validation figured out and the hooks, so it's just easy to cut and paste and modify.  Or fork and set as base and modify, if you're fiddling.  The big rule in this exercise...no partial pieces of pizza.

There's a part b to ask how many pieces each person wants and then calculate full pizzas.  That's primarily different math, but I"m going to do it anyway.



Sunday, August 14, 2011

Long Weekend

Had a nice long weekend.  Mostly relaxing, except for my wife being ill most of the last two days.  She and I went to Rise of the Planet of the Apes on Friday after I got back from extracorporeal therapy at the Red Cross.  As she said, "I felt bad for the apes."  I think you were supposed to be a bit conflicted, so a good movie.  Afterwards, we went over to the MIA to see Eryn show off her art projects from the last week.  There was quite a collection of impressionist works, from her own canvas, to a diorama, and half a dozen works based on impressionist techniques.  I particularly liked her bridge, and I'll try to get a copy out here for the grandparents.

Sunday, Eryn and her mother went to The Help while I got in some bicycling and cooking.  I went a little wild with the chocolate chip cookies and put a golden Oreo, a spring Oreo, and a Girl Scout Thin Mint into one of each.  Damn big cookies.

And today, Eryn and I left my wife to be sick on the couch, and we went up to Ming's place to ride the Gateway Trail.  Eryn managed to bike 15 miles.  Before we took off, I took us to Gateway Cycle and bought her a wireless odometer.  I think having the odometer to look at so she knew how far away the goals I was setting were was a big help.  Kyle and Ming (and family) all went to Randy's Pizza to use our Living Social certificates before they expired, which was a nice dinner.  One thing I learned while heading up there to meet them was that putting the bikes on the back of the convertible doesn't work so well.  With the top down, the wind is hitting them from the front and they shake and wobble alarmingly.  Not to mention the rack is a bit of a pain on the Mustang, although perhaps that's just not quite getting it on there right.  I moved my bike in closer to the car on the way home (with one of Ming's socks over the pedal to protect the car) so that I wasn't getting a lever effect, but that left Eryn's bike even more by itself in the open, and it was bouncing all over the place.  I'm going to have to investigate if there's a better way to strap your bikes down for vehicles with a retracted top.

Sunday, July 12, 2009

Four Acquisitions

I own some new things! Item one, Ming finally picked up our Randy's Pizza Challenge t-shirts that proclaim, "I can't believe I ALMOST ate the Whole Thing!" I can now show off that I'm a loser because a.) I took a huge pizza challenge and b.) because I couldn't complete it.


Ming brought me some coffee from Malaysia. Notice the word "mixture"? It scared me. I was worried it might be full of secondary civet food or something. But I looked up the words for the additives and they translated as margarine and sugar, and that seems safe enough. This morning I brewed up the first batch and it tasted pretty much like Folger's or Maxwell House, but a little bit better. Probably because of the margarine and sugar.


Also from Ming. Durian candy. I haven't been brave enough to try one yet. But here's a fun vignette.

Eryn: "Dad, do you have candy?"
Me: "Yes, honey. I do. Here!"
Eryn, pops it in mouth: "I don't know what this is. What is this? ... Oh. This is BAD."
Me: "At least it wasn't ranch dressing."


The bicycle chain snake my wife bought me at the Mall of America while She Says and hubby were in town for JACL and to visit us. Ssssss..... I think Eryn calls him "Wormy". Very cool use of old bicycle bits.

Monday, December 08, 2008

Pizza!

I'd like to preface this post with a statement that is probably evil in nature. Kyle. Ming. If I don't come out from under the knife tomorrow, it was the pizza that killed me.

Ming, Kyle, Ming's brother-in-law Chris (subbing for a very sick Dan'l) and I took the 30"/30 minute pizza challenge at Randy's Pizza yesterday. 30" or 30 minutes - I don't think extending either liminal would have done us a lot of good. But like the 18 year olds we're not, we gave it a try.

Here, Randy's demonstrates that the pizza in question is pretty much the size of a trailer. Those aren't the current gas prices in Minnesota, by the way, that's just an out of business gas station that Ming is going to turn into a scrapbooking store.


The pizza is bigger than your average pizza worker. We'd have possibly had better luck trying to eat the person who delivered it.


She lays out the rules. Right after this I sprinkled Parmesan on my side, just to be an idiot, and separated quite a bit of the pizza to get it to cool off.


Greasy fingers. Can you believe a group of four finished one of these in under 15 minutes once? Under 15 minutes. That's insane.


Mouths full. You can tell we're already wearing out. Chris (next to me, left) replaced our anchor, and he lived up to the challenge. He clearly finished more pizza than the rest of us.


Me, realizing that a slight allergy to tomatoes can be a problem when eating the equivalent of a 14" pizza and 10-20% extra. I was getting very warm. I like how this picture shows that my bald spot is starting to sneak down the side of my head.


When the money comes out, you know it's all over. No free pizza for us. But they did give us our drinks for free, which was very nice.


This is how far we got. You can make your own assumptions about who ate their share and who didn't.


Live pizza blogging, courtesy of Pooteewheet:


A little more: