How to Speak Like a Geek
Lets look at a second snippet of code:
if(X >= Y) {
Z = X;
}
else {
Z = Y;
}
This snippet of code takes two numbers and returns the maximum of those two numbers. If we pronounce this snippet of code, we get something like, “If X is greater than or equal to Y, Z equals X, else Z equals Y”. The code is simple, but the pronunciation is verbose and confusing.
There are three problems with this trivial piece of code. First, the pronunciation of the assignment operator and the comparison operator are the same which is confusing. Second, In order to determine whether “Z equals X” is a comparison or an assignment, you need to evaluate the context of the statement. There is no explicit marker between the two parts when you pronounce the code. Third, the pronunciation of the conditional clause is needlessly confusing and verbose.
Lets see how we can do better.
Back in the olden days of Pascal, “=:” was the assignment operator and “=” as the equality operator. That is all well and good, but how should we pronounce ‘=:’? Pronounce the assignment operator as ‘becomes’ and the equality operator as ‘equals‘. The word ‘becomes’ embodies change, motion, and dynamic action. It is very clear that an action is taking place. If we change the pronunciation of assignment, it becomes more clear that we are in the body of the if statement. With that small change, we would say “If X is greater than or equal to Y, Z becomes X, else Z becomes Y”.
That is better, but there is no clear delineation between the test and the body of the if statement. To clearly mark the end of the test and the beginning of the body of a conditional statement, say ‘then‘. So, we would say, “If X is greater than or equal to Y, then Z becomes X, else Z becomes Y”. Closer, but that doesn’t really flow properly. Pronounce ‘else‘ as ‘otherwise‘. “If X is greater than or equal to Y, then Z becomes X, otherwise Z becomes Y”.
Lastly, and perhaps most importantly, we need to clean up the comparison clause.
When you were taught multiplication in elementary school, your teacher might have taught you that 3 X 4 was the sum of three groups of four, but that isn’t how you evaluate multiplication in real life. That was useful in teaching the concept, but doesn’t do much for facilitating its use. Similarly, you were taught three comparison operators: less than, equals, or greater than, and then you were taught these could be combined into other operators so ‘>=’ meant greater than or equal to and ‘<=’ meant less than or equal to and maybe even ‘!=’ meant not equal to. These terms were used to help you understand the concept, but they don’t lend themselves to reasoning with them. These terms are unwieldy when using them for reasonsing. Make all comparison operators their own first class operators.
- >= means ‘at least’
- <= means ‘at most’
- != means ‘differs from’
- > means ‘greater than’
- < means ‘less than’
- = means ‘equals’
This might seem like a minor detail, however in complex expressions, it makes a significant difference. If we use our new rule in the pronunciation of our code snippet we have “If X is at least Y, then Z becomes X, otherwise Z becomes Y.”
Lets compare our original version:
“If X is greater than or equal to Y, Z equals X, else Z equals Y.”
with our final version:
“If X is at least Y, then Z becomes X, otherwise Z becomes Y.”
November 13, 2011
Posted in: Programming
No Comments
I am a Morningstar Farms Fan
I am not really into vegetarian ersatz food. Somehow, i find it degrading to vegetables that they have to pretend to be meat. When properly treated, i think veggies are pretty damn tasty and don’t need to play second string to a big old hunk of beast. With that being said, I have to admit i do like the Morningstar Farms brand of products. They have a wide range of faux meat products. I like them because they offer the same taste and flavor profile as meat, but they tend to feel lighter yet substantial. Tonight, i tried their chick’n nuggets for the first time.
Morningstar Farms chick’n nuggets were a lot better than i thought they would be. The texture is firm and with meaty fibers like real chicken. If i hadn’t have known that they were veggie based and had no meat, then i don’t think i would have been able to tell the difference. I am not sure if that speaks highly of these chick’n nuggets or more to the low quality of ‘real’ chicken nuggets. Cheap chicken nuggets use mechanically separated chicken which is pretty damn nasty stuff and is literally only one step away from dog food. seriously. Anyway, i would recommend these nuggets highly if you are into vegetarian food which pretends to be meat. They taste pretty darn good and surprisingly close to chicken.
I also really dig their veggie sausage patties. They deliver a good meaty consistency and some good sausage flavor. Plus, you can pop one in the microwave for a minute, and they are good to go.
I like to use them to make homemade sausage egg McMuffins for breakfast sometimes. They are super quick and easy, cheaper than McDonalds, and a little bit healthier too. They only take as much time to make as a piece of toast. Start by putting your english muffin in the toaster. Next, put one sausage patty on a plate and nuke for one minute. Set aside. Here is the secret to cooking the egg. Take a 4 oz small gladware container and spray with PAM or whatever non-stick spray you like (Yes, the container DOES make a difference). Make sure that you hold the container over the sink when you spray it with non-stick spray. What the hell is the matter with you? Crack an egg into the container and poke the yoke with a fork. Stir just a little bit to break up the yoke. This is the tricky part. Microwave the egg for about 35-45 seconds. If you nuke it too much, the water in the yolk near the bottom and around the edges turns to steam. The steam tries to escape by tossing the egg all over the inside of your microwave. If you nuke it not enough, then the white won’t get set. Usually, i like to nuke it for 35 seconds and then stop to allow some of the steam to subside, then nuke it for 10-15 more seconds until it is fully set. The non-stick spray will allow the egg to slip right out of the container with no problems. Once the english muffin pops, place it on a paper towel flip the egg over onto the english muffin, add the sausage patty and top with a Kraft single slice of cheese. If you’re going to eat on the run, here is a tip. Fold each corner of the cheese to the center of the slice (center of the sandwich) so that the tips of the cheese are touching. This essentially gives you a double layer of cheese, but it is smaller in surface area. This will prevent the cheese from melting and getting too messy. Use the paper towel to hold your sandwich and use it as a napkin later.
This is a great breakfast because it is a substantial meal and it is faster and cheaper than hitting a McDonalds. The only clean up is the plate you used to nuke the sausage patty, a fork, and the gladware container. All of that stuff you can pop right in the dishwasher. Sometimes egg can be hard to wash in the dishwasher so don’t forget to rinse your dishes.
August 28, 2010
Posted in: Uncategorized
No Comments
More Humor That I Like
I remember flying back from Europe and the in-flight movie was Groundhog Day which is pretty surreal when you’re on a plane for several hours drifting in and out of consciousness as you try to catch some sleep.
I generally don’t like it when people write boring blog articles that just link to other people’s content, but i am going to make an exception in this case because i really like this movie. First of all, Bill Murray is a comedy genius. I bet you can’t name one movie that he is in that isn’t great (except that one with the elephant). Second, this is just a great movie. For those of you who don’t know, Bill’s character, Phil, keeps reliving the same day over and over again. Everyday, when he wakes up, it is Groundhog day. On the surface, it is pretty funny, but really, it is just terrifying if you think about it.
Ironically, this fellow saw the movie on a plane as well. Be sure to read Ebert’s re-review, an article that made it to digg, and another article to find out what the director thinks.
July 21, 2010
Posted in: Uncategorized
No Comments
Impressions of Straight Razor Shaving Part II
With a single NS pass I can now get a socially acceptable, irritation free, shave which is very comfortable. I would say it is a directional BBS shave. Even XTG is fairly smooth. I would rate it a DFS. Each shave takes about the same amount of time as a DE shave, but i am only doing one pass. Touch up is the most time consuming part. The quality is about on par with my DE shaves.
My stropping has progressed and seems to be working pretty well. This week i used the chromium oxide pasted side of my strop to touch up my blade. It was beginning to pull a little bit. 10 laps on the paste, washed the blade, 60 laps on the leather and the blade was much sharper and ready to go again. I haven’t nicked my strop in a while so i am thinking about buying a new, better quality one.
I am not sure if i want to start working on my WE pass, or just jump right into the SN pass which has caused my a lot of irritation in the past. I think i will start on the SN pass and just see what happens.
I don’t regret buying my straight razor at all. I think it has been a very positive experience overall. I have begun to look for a second, vintage, razor, but not very seriously. My DE razors have been in a state of semi retirement for the last few months, although i will admit I have used them to touch up my face if i notice a spot i missed after i cleaned my straight razor.
April 22, 2010
Posted in: Wetshaving
No Comments
My Favorite Humor
I was watching John Oliver’s New York Stand-up last week and saw Marc Maron who reminded me of the late, great, George Carlin when he was ranting about how the future belonged to China. I was awestruck at one part of his set. Here it is as best as i could transcribe it.
Now, obviously, the future is Chinese economically. I think some of you know that. Most of our national debt is to China. They own this country on paper. Theoretically, they could just close us down.
I believe that we are all really just outsourced Chinese labor and our job is to eat and buy things at a lower price, but rationalizing it, because lets be honest, this is a consumer based economy in America, that is, all we manufacture here is need and appetite. We are the world’s mouth. They make things in other countries and they’re like, “Send it to America. They’ll eat it.” They’re actually thinking about changing the slogan of the United States from “America: Land of the free, home of the brave” to “America: All you can eat”.
This got some pretty big laughs and some applause which is amazing considering the implications of what he is saying. It is pretty funny to metaphorically because it has some truth to it, but it has sinister undertones. What are the long term prospects for a country which is based in consumerism and need? What happens to a country when innovation and entrepreneurship are diminished? Are we living in the decline of the United States? In my opinion, these are some pretty scary questions.
My favorite comedy is the kind of comedy that disarms you and off balances you in such a way that it is funny and profound/sad at the same time. It is hard to articulate which is why i have had this post in draft status for about two months.
Another example of this, perhaps my favorite, is when Stephen Colbert did a skit about Wikiality where the premise was that reality is whatever the wiki (Wikipedia) said it is. It was really funny, but pretty terrifying at the same time.
Living as a middle class white dude in the middle of suburbia in North Dakota, there are two worlds. There is the world of first hand experience and the second world which is created and exists inside mass media. We are exposed to the second world through books, magazines, internet, etc. I can use the internet to view street corners in any large city in the world using google maps (except Buenos Aires for some reason). Is that real? Just like Plato’s allegory of the cave, we only get to see shadows of reality which have been selected, groomed, and prepared for us. The thing that is scary is that people put the same level of belief both of these worlds. While this has been the case for decades with traditional mass media, the internet brings it to a new level. Given the dynamic and revisionary nature of the Internet, that implies that substantial portion of people’s reality is dynamic and revisionary. We are talking some real Orwellian stuff here.
Rehashing these ideas could fill books, but somehow Colbert was able to abstract the essence of this conundrum into a skit on a late night show which lasted only a few minutes and it was hilarious. There is a simple and elegant beauty in that which i really appreciate.
If anyone has any other examples of this, please leave a comment.
March 30, 2010
Posted in: Uncategorized
No Comments

