Sunday, August 24, 2014

Kefir Green Smoothie

Erick's Kefir Green Smoothie

After reading Donna Schwenk's recipe for a Kefir Green Smoothie, I was motivated to tailor it for my family. In particular, I needed to get rid of the banana. One of my little ones has a problem with bananas. So, after some experimenting and some suggestions from Selena, we've settled on this Kefir Green Smoothie recipe. It's not perfect, but it works for us.

The Recipe

Ingredients for Erick's Kefir Green Smoothie

  • One cup (8 oz) dairy kefir
  • 1/2 cup frozen fruit, heaping (and I mean REALLY heaping)
  • 1 tablespoon coconut cream, heaping
  • 1 tablespoon raw honey, heaping
  • 1 teaspoon chia seeds
  • a handful of spinach

Procedure

Put it all in a small blender. Blend until smooth. Enjoy immediately.

Variations

We like to vary the fruit. Strawberries are a bit hit, but they make the smoothing a bit brownish. We've found a mix of peaches, mangos, pineapple and strawberries that renders a nice light green color and tastes great. Blueberries are delicious, too, and the blue completely overwhelms the green from the spinach, so you get a nice blue smoothie that still has the green stuff in it. (That might be good for kids who are squeamish about green.

The green doesn't have to come from spinach. You could use any greens that you like.

You could try a different sweetener if you like. Grade B maple syrup might be nice. Or use stevia or rapadura. Whatever you like.

Make popsicles. The kids love 'em!

Creative Commons License
Erick's Kefir Green Smoothie by Erick G. Hagstrom is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Based on a work at http://erickhagstrom.blogspot.com/2014/08/kefir-green-smoothie.html.

Tuesday, January 14, 2014

Homemade Breakfast Sausage 3

Success!

Ok, so I thought this would take longer, but recipe #2 turned out to be a huge success. My wife claims that it's so good she wants to eat the kids' sausage! So, officially, we're done. We've found a good substitute for the chemical-laden stuff the stores sell as breakfast sausage.

That doesn't mean I won't tweak the recipe now and then, or try out other flavor profiles. But for the moment, this experiment is concluded successfully. Thanks for following along!

Monday, January 13, 2014

Homemade Breakfast Sausage 2

Homemade Breakfast Sausage

The Sausage Experiment, #2

This is the second post on my sausage experiment. If you read that post, you'll know that the first recipe turned out pretty good, but we all thought it could be improved. So for today, I tried just a little tweak. I added a small quantity of red pepper flakes to give it a little kick, and I used a slightly smaller clove of garlic.It's still going to be quite garlicky, though. But that's ok. We like garlic.

So, without further ado, here's today's recipe.

Second Recipe


1 pound fresh ground pork (from the supermarket)
1/4 tsp each of the following:
  • ground black pepper
  • basil
  • coriander
  • oregano
  • thyme
one large garlic clove, chopped
1/2 tsp kosher salt
1/8 tsp red pepper flakes

I just mixed it all up and let it sit in the fridge overnight, then pan fried as usual.

Family Reactions

 Stay tuned. We haven't tried it yet. I'll update this post when I get reactions.

Sunday, January 12, 2014

The Sausage Experiment

On Avoiding Nitrates and Nitrates While Still Enjoying Breakfast

My family and I have come to understand that animals are good for people to eat. We pretty much need 'em. Even the fat, though grain fed animals produce more fat than is strictly necessary. But grass fed is so expensive. So we do what we can.

We especially enjoy our morning bacon and sausage, though I am a bit concerned about all of the nitrogen compounds present in those delicious morsels. We tried uncured bacon, but then I read or heard (don't remember where, so no source at the moment) that bacon processed in celery juice--rather than chemical nitrates and nitrites--actually contains three orders of magnitude more of those chemicals than regular bacon. Seems there's a chemical reaction between celery juice and salt that produces nitrates and/or nitrites. Makes sense. They had to come from somewhere originally. Cured meats have been made with nitrogen salts for centuries.

So how to avoid those nitrogen salts entirely? I've decided to experiment with making my own pork breakfast sausage, uncured and unceleried. So it's not really sausage in the traditional preserved meat sense. But I hope it'll taste something like sausage and help us enjoy our morning piggies without added chemicals. And in the interest of science--and to help me remember what I did last time--I'll be recording my recipes and family reactions right here.

First Recipe


1 pound fresh ground pork (from the supermarket)
1/4 tsp each of the following:
  • ground black pepper
  • basil
  • coriander
  • oregano
  • thyme
one very large garlic clove, chopped
1/2 tsp kosher salt

I just mixed it all up and let it sit in the fridge overnight, then pan fried as usual.

Family Reactions

LOTS of garlic. Could cut back a bit.
Seems to lack zip otherwise. Maybe some red pepper flakes or cayenne?

My personal feeling is that I could add more of the herbs, too.

Wait, no sage?

That's right, no sage. My wife is breastfeeding. Sage reduces milk production. Don't want to feed the eaters and starve the drinker.

Thursday, August 15, 2013

Return Type Covariance, The Forgotten Form of Polymorphism

Hey, that's a real catchy title, isn't it? This post is inspired by a programmer who I know and respect who always likes to ask in interviews, "What is polymorphism?" Good question, conceptually simple, but full of the kinds of details that can really separate thems that know sumpin' from thems that don't. (Sorry, I think living in the South has gotten to me.)

First, the basic definition: polymorphism is the idea that there's more than one way to satisfy a contract. Say I have a class called Animal, another called Dog and a third called Cat. Dog and Cat both extend Animal, to use the Java terminology. Without going into the details, anywhere any code expects an Animal, you can supply a Dog, a Cat, or any other object that extends Animal. We say that Dog and Cat are substitutable for Animal because anywhere you need an Animal you can substitute a Dog or a Cat. There's a lot more to be said about that, and maybe I will at some point, but for now I'm moving on to return type covariance.

If Dog and Cat are both derived from Animal, then they could be said colloquially to be more specific than Animal. The set of all Dogs is a subset of Animals. Dog and Cat are partitions of Animal. Dog and Cat are subtypes of Animal, and Animal is a supertype of Dog and Cat. Computer scientists would say that Dog and Cat are both narrower than Animal.
All of those statements express the same concept.

Here's some code for reference:

public class Animal
{
   public String speak()
   {
      return "Basic animal noise";
   }
}

public class Dog extends Animal
{
   @Override
   public String speak()
   {
      return "Woof";
   }
}

public class Cat extends Animal
{
   @Override
   public String speak()
   {
      return "Meow";
   }
}

Do you see that there's a method named speak() defined in Animal that's redefined in both Cat and Dog? And the @Override annotation that precedes those redefinitions? Yeah, yeah, standard textbook polymorphism. But have you ever done this?

public class Animal
{
...
   public Animal getSelf()
   {
      return this;
   }
}

public class Dog
{
...
   @Override
   public Dog getSelf()
   {
      return this;
   }
}

public class Cat
{
...
   @Override
   public Cat getSelf()
   {
      return this;
   }
}

Even though Animal defines the return type of getSelf() as Animal, Dog and Cat have successfully redefined that (as evidenced by the @Override annotation) to return instances of their own narrower type. That's legal Java, and it's pretty useful at times. They have redefined a method using a return type that's narrower than that returned by the method declaration that they're overriding. Catch that? Narrower return type? That's what "return type covariance" is.

Why is that ok? It's because the original method definition promised an Animal, and that's exactly what you're getting from all three. Dog is an Animal. Cat is an Animal. So it's ok if they declare the fact that you can expect a narrower form of Animal, right?

So the next time someone asks you what polymorphism is, don't just spout off the usual pablum about redefining methods in subtypes and such. Mention return type covariance. They'll be impressed.

Happy coding!

Sunday, July 15, 2012

Learning Functional Programming with Scala

It seems to me that it's time that I looked into functional programming, and Scala seems to be a really good entry point. Why?

  1. It's open source, so there's little financial cost of entry.
  2. It's built on the Java Virtual Machine (JVM), so whatever I write will be runtime compatible with anything I do or have done in Java.
  3. There's an Eclipse Plugin for that, so I get to use my favorite development environment.
  4. It seems to be maturing. Scala is actively maintained, has a good user community, and people are writing helpful things about it. (I hope eventually to be one of the latter.)

So here's what I'm going to do...

  • I'm going to get a Scala environment installed on my machine.
  • I'm going to start fooling around with tutorials and such.
  • I'm going to write something that I can share with the world. It'll run wherever Java runs (that I am able to test), meaning that at minimum I want it to be able to run on my desktop, on the web (including as a Facebook app) and on my Android.

If you've ever thought about following this blog, or following me on Facebook or Twitter, now would be a good time.

Busy family person disclaimer: I don't know how consistently I'll be able to pursue this. This is strictly a time-available kind of thing. Why? Little people are competing for my time, and they win. But they sleep more than I do, so I think I have a fighting chance to get a post or two out once in a while.

Monday, November 29, 2010

AMP-lify Your Career with a Master's Degree in Systems Engineering from UVa!

I am a graduate of this program and am very happy to say so. I recommend it to anyone interested in an excellent education in Systems Engineering.

The University of Virginia Accelerated Master's Program in Systems Engineering (AMP) is designed for working professionals eager to enhance their skills and advance their careers. Students from the Mid-Atlantic region travel to Charlottesville for classes all day every other Friday and Saturday with a week in residence at the beginning and end of the program. Two weeks in residence plus 20 Fri./Sat. weekends leads to a master's degree in just one year (May - April) from one of the top universities in the country.

You are cordially invited to an AMP Open House on Saturday, December 4, from 9 am - 1 pm, at the Darden Graduate School of Business in Charlottesville.

Attending an Open House is a great way to learn more about the Accelerated Master's Degree in Systems Engineering. You will meet the academic director and other faculty members, hear highlights of the program and AMP-V, our new options for veterans, participate in a mini-class, talk with current students during breaks, lunch, and at a panel discussion, and tour the Darden School and lodgings. There will also be a short session about education loans that can help make the program accessible to all. The Open House starts with a continental breakfast meet-and-greet and concludes with lunch in the Abbott Center Dining Room (both complimentary). You are welcome to bring your spouse or significant other. Invite friends and colleagues to come explore the program with you.

Register to attend via a short online form at http://www.surveymonkey.com/s/Q3HBYNJ, from the sign up link on the AMP web site, www.sys.virginia.edu/accelerated, or by emailing accmp@virginia.edu. We hope to see you there!

Monday, June 14, 2010

KitchenAid Contest

I just found out about a contest that has me really excited. Win a KitchenAid Mixer! I was just looking at those things over the weekend. Just about sprang for it, but we decided to sleep on it. And now, if all goes well, I'll get one free! (Or perhaps you'll get the free one. Either way I'm going to get one soon.)

So here's the deal: just go to http://savingdinner.com/contest/ and follow the directions. Simple!

Happy mixing!

Monday, October 20, 2008

Twitter Returns to the Past

My favorite web comic, xkcd, has another take on the Twitter question.

Be sure to read the tooltip. (That means put your mouse anywhere over the comic and leave it there for a moment. An additional message will appear. Read it quickly.)

Tuesday, October 14, 2008

Twitter Revisited

In my last post I asked the eternal question, "What about Twitter?" And I was not exactly overwhelmed with responses. (Update: as of my latest read, 20 October 2008, exactly two people have responded, though they each have more than one comment.) No one in my little circle seemed to care very much. Except "EB". (BTW, if you're reading this and you are ok with me using your name, just let me know and I'll edit.) EB is a prolific blogger and has noticed that the bloggers to whom she looks up all seem to use Twitter, so she shared my curiousity. We made a deal. We'd both sign up for Twitter, follow each other, and see what happened.

Remember Christmas morning when you were a kid? I don't know about your experience, but for me Christmas morning was great. A bunch of new stuff to play with, all of it bright and shiny and new. I played with everything, all at once. By afternoon I had settled down into playing with one thing at a time, but still wanted to give everything its due.

But after a couple days, maybe a week or a month or two--memory fades with time, and it's been a while--the novelty wore off and my new Christmas presents somehow became just toys. I still played with them. Some of them. But they weren't really special anymore, they were just there.

Twitter is like that, only smaller and not as much fun. EB and I enjoyed twittering at each other for the first hour or two. The rest of that day and the day after we half-heartedly updated our respective statuses because, hey, we made a deal. We were in this together, experimenting. Then I went away for a weekend, didn't want to be bothered by Twitter, and when I got back EB and I both agreed that we'd had enough.

So there's the answer: Twitter isn't all that. It's not even part of that. For us, it completely lacked even the faintest whisper of that. And that, as they say, is that.

Until just now when I read yet another blog post from a friend. Turns out he uses Twitter as part of a convoluted chain of technologies that allow him to post text messages from his cellphone to his Facebook page (not just his status, but right to the wall) and to the homepage of his public website. And, in the process, he also gets his blog posts to his Facebook page and his public website. Cool stuff.

So ok, Twitter has its uses. If you want to turn SMS text messages into an RSS feed so you can pipe it somewhere, great, use Twitter. And if you're an uber-blogger or other cyber-celebrity whose groupies want to know where you are and what you're doing at all times, great, use Twitter. But for me, yawn. I wish the Twitter people well, I just wish them well without me.

Saturday, September 6, 2008

What about Twitter?

I've been playing with Facebook's mobile features recently. I particularly like the ability to update my status by texting from my cell phone. And that got me thinking...

What about Twitter? I mean, that's kind of what Twitter is all about, right? And I've always kind of been, well, appalled is too strong, but mildly repulsed by the whole concept of updating my status whenever I turn around. But it's kind of fun, too, in a really narcissistic kind of way. So I was wondering...

Do any of my friends use Twitter? Would anyone care if I'm driving to work, or sitting in a bar listening to Junk Science (great band, btw), or whatever? So tell me...

What about Twitter?

P.S. In case you don't know wtf I'm talking about: http://twitter.com/

Sunday, April 15, 2007

Materials

and Why Software Developers Need to Think About Them

It's recently occurred to me that materials are important. The things with which we work can influence not only the things that we produce, but also the way we think about the work itself.

Take the classic engineering example, building a bridge. Big bridges are harder to design and build than little ones. I built little bridges when I was a kid. I used popsicle sticks, twigs, mud, whatever. I probably built a bridge or two with my brother's erector set. Maybe used some TinkerToys. But that doesn't make me a Civil Engineer.

When I was a little bit older I went to Boy Scout camp and saw some pretty impressive rope bridges, more complicated and well-constructed than I could have made them. But that didn't make their makers Civil Engineers.

A Civil Engineer, or at least one who builds bridges, is expected to understand the proper use of materials to make a bridge that will hold the weight that it needs to hold, with a sound foundation, able to withstand adverse weather conditions, etc. I'm sure the list goes on and on, but I'm not a Civil Engineer. I think I mentioned that. I'm just a software guy who's musing about materials.

So the point, with respect to bridges, is simply this: no one would expect a kid--who knows how to nail a few boards to a couple fallen logs so he and his friends can cross a creek--to be able to construct something like the Golden Gate. Among all the other problems with that idea, it is obvious that the materials are different. One must learn how to use materials suitable for the task in order to build well.

Now for the software tie-in: we don't use materials. Or rather, our materials are all soft. There's no obvious distinction between the C++ that we write in our freshman programming class and the C++ that we use to build life-critical systems. It's all just code, right? Except it isn't. There's a huge difference between code acceptable for a classroom and code reliable enough to trust with human lives (usually OTHER humans' lives at that). That could be one reason why we don't understand why many developers who did well in school just don't know that their next project, the big project, is fundamentally different from anything else they've ever seen or done. And that could be one reason why management doesn't seem to understand that they can't just tell us when they want it, what it should do, how big the team will be, what tools we will use, and all the quality constraints within which we must operate. If a Civil Engineer says you can't build the Golden Gate with TinkerToys and ropes, people listen. But code is code, right?

We--software people--complain that we don't get the same professional respect that Engineers get. But then we deliver stuff that doesn't work, or doesn't work well enough, and it's late, and it cost too much, and we knew this would happen but we just went ahead with the project and let it happen. Real engineers don't do that. They have licenses to protect. They have reputations. They have standards. And they know the difference between play and work. We don't.

What's the answer? I don't know right now. Just musing. Had to get something down on electrons before the thought disappeared from my head. If you have some suggestions for how we can drive home to ourselves and our posterity the difference between toy code and real code, well, be sure to let me know.

--Erick