Latest posts.

[Food] Roasted Zucchini stuffed with Garlic Chicken Salsa

[Introduction]

This post is in response to a messenger conversation with my friend Maggy. She suggested that I make stuffed zucchini for her if I expected her to come over. This is the result of that idea. Took me about two hours to come up with the recipe in my head. Here is the ingredient list.

Just an FYI, Wordpress is not agreeing with me tonite, and so I cannot upload the files directly. I have added them manually to a directory here on my server. This is the link: http://www.redsatori.com/images/blogging1/index.html

  • 1 chicken breast (approx. ½ pound)
  • 1 Roma tomato
  • ¼ white onion
  • 2 zucchini
  • 2 cloves garlic
  • 10-15 fresh basil leaves
  • extra virgin olive oil
  • red wine vinegar
  • salt
  • freshly ground black pepper
  • lemon juice
  • a dash of white wine (I used Chenin Blanc)

This recipe is done in stages. Each stage does a few things in order to make everything go smoothly.

[Stage 1]

First thing we need to do is preheat the oven to 350 degrees. Next, chop up the garlic. I chopped mine into 1/8 inch cubes, or thereabouts. You don’t want it to be too finely chopped, but also not too large where a piece will be overwhelming. Create a small foil boat, and put a little bit of olive oil in it. Add the garlic and spread it around in the oil. Sprinkle a dash of salt and pepper over it, and throw it in the oven for 5 minutes. When the 5 minutes is up, make sure you turn off the oven, but let the garlic sit in there.


While that cooks, dice the tomato and onion to about ¼ inch dice. Then chop up the basil as finely as you can.


Throw it all in a bowl and then add about 2 tablespoons of olive oil and 1 tablespoon of red wine vinegar. Mix it up until everything is covered in oil and vinegar.

[Stage 2]

The next stage is preparing the chicken and zucchini. Dice the chicken up into ¼ inch pieces. If you find it difficult to do, put your chicken into the freezer for a few minutes to firm it up.


First, put the roasted garlic into your salsa mixture.

Put 1 cup of water and 2 tablespoons of olive oil in a large pan and bring to a boil. Then, add the diced chicken and turn the temperature to medium high. Cook until the water evaporates. Add 2 tablespoons of white wine or so and let that cook off. Add the cooked chicken to your salsa mix and throw it in the freezer when it is finished cooking.

While the chicken is cooking, prepare the zucchini. Preheat the oven to 400 degrees. Cut the zucchini down the middle. Mix 2 tablespoons of olive oil and a teaspoon or so of lemon juice. Brush it onto each of the open faces of the zucchini. Sprinkle the open faces with salt and freshly ground black pepper. Cook in the oven about 15 minutes, or until the zucchini starts to brown on the edges and loses some firmness.

[Finale]

When the zucchini is done roasting, plate it and spoon some of the chicken salsa into the center. Eat and enjoy.

Anatomy of a C++ Function

[Anatomy of a C++ Function]

In C++, functions are required to make your code scalable, extensible and easy to maintain. in this post, we will be discussing the anatomy of a function. 

Functions contain three main parts: Prototype, Header, and Definition. Each of these is important in their own right, and together they create usable code that your applications can use during execution.

[Prototypes]

Function prototypes have a specific structure. They require the following parts:

 

  • Return type
  • Name
  • Parameter list

 

The return type is the type of data being returned from the function, either void or int or something else entirely. The name of the function is the name that will be used to differentiate it from other functions in the program and the parameter list is a series of variable types which will be passed to the function at run-time. Here is what a function prototype looks like:

<return type> functionName(<parameter list>);

We can make a simple function as a demonstration:

int double(int);

As you can see, the function prototype we just created contains a return type, a name and a parameter list (in this case a single parameter.)

[Headers]

Function headers are nearly identical to prototypes, with a couple of exceptions. One of the main differences is that you need to qualifiy the parameter list. What this means is that you have to give a variable name for each variable in the list. Additionally, for class-specific functions, you need to also include the scope operator. Also, since the header comes directly above the function definition, you will not be ending the line with a semicolon, but rather with braces. Here is the anatomy of a function header:

<return type> <class name>::functionName(int myVariable, int myOtherVariable)

{

}

Again, it is nearly identical to the function prototype, but has a bit more information in it. Here is what our function header should look like for our double function:

int double(int x)
{

It is pretty easy to move from prototype to header with very few modifications. You must declare the variable names for the variables you are passing to the function and you must make sure you have braces surrouding the actual definition section of the function.

[Definitions]

Now that you have a prototype and a header, we need to implement the function. Function implementation occurs in the definition of the function:
<return type> <class name>::functionName(int myVariable, int myOtherVariable)
{

// function definition here

}

For our example function, we would have something like this:
int double(int x)

{

return x * 2;

As you can see, the function is pretty simple. In this function we are simply returning an integer that is doubled. The return statement has to return a value that is consistent with the header and prototype return values. If we had instead tried:

int double(int x)

{

return “Hello World”;

}

Our code would have given us an error since converting from a string to an integer is pretty much impossible.

[Conclusion]

In this post, we discussed the three main parts of a function: Prototype, Header, and Definition. The prototype is placed at or near the top of the page and tells the compiler what to expect out of the function in terms of return type and parameter list. The header expands upon the prototype and declares required variables and sets the required scope. This usually comes later in the sourcefile and always directly precedes the definition. The definition is the implementation of the function. If the function is to return a value, the function must contain a return statement.

CIS170C – Spring A Session

If you would like to have a study group, or private tutoring for this course, please comment on this post with some information:

  • What you are looking for
  • Your name
  • Your instructor
  • An email address to contact you
I will reply as quickly as I can.  Just an FYI, my time this session will be limited due to my current courseload, so I will have to do a first-come, first-served policy for right now.
~Jim

Study Group – CIS170C

I will be holding another study group this Saturday at 2pm CST. 

 

Same rules apply, if you’d like to attend, please get me your email address. I will use my list of previous attendees to send emails to everyone for this week’s study group. If you do not wish to attend, please contact me and let me know to take you off of the list.

 

~Jim

 

P.S. I will get more information posted in this thread as to what we will be covering this week.

CIS170C Study Group

Hello Everyone:

I will be hosting a study group on Saturday Afternoon at 2pm CST. It should last between 1 and 2 hours. If you would like to attend, please leave me a comment here with your email address in it. It will not be approved, so you do not have to worry about other people getting access to your email.

 

We will be covering the following topics:

  • Classes
  • Constructors and methods
  • Overloading
  • Instantiation of classes
  • Calling class methods. 

Each of these topics is important in object-oriented programming. You really will need a complete grasp of the ideas behind the code in order to be a good programmer. 

I hope to see a number of people at this study group. If you have any questions for me prior to Saturday, please feel free to email me at redsatori+school@gmail.com.

~Jim

Busy, busy

I have, unfortunately, been extremely busy of late. We had a lot of overtime this last week. Additionally, my honors creative writing class is starting to kick my ass. 

 

I will be posting some of my writing here to my blog as time permits. Additionally, I have to get some of my tutorials up here as well. I am hoping to at least get some things done prior to my birthday. We shall see. May not happen if we get more overtime, at least not right away.

Marley and Me {Movie Review}

This Christmas Day, I went to see a movie called Marley and Me. It features Owen Wilson and Jennifer Aniston. It is about a dog. It is about life. It was at times funny, and at times heart-wrenching. All-in-all a good movie to see. If you get the chance to, I definitely suggest seeing it in the theater. I felt it was worth the money to see it on the big screen (which is something I haven’t really been able to say for the last few movies I have gone to.)

It starts off on a very humorous tangent, and ends on a more personal level. The entire movie will have you thinking about the choices you make in your own life, for better or for worse. I think it helps to open your eyes to what you have going on around you a little bit more.

If you are looking for a feel-good movie, this one is for you. I give it a thumbs up rating.

Finally

Well, I finished moving to Oshkosh this weekend. I will hopefully have a bit more time to post now, as I am much closer to work, and thus able to get home far quicker.

I am shooting to have one tutorial completed per week, although I don’t know how well that is going to work come next session, as I am taking Honors Creative Writing and am expecting a pretty large workload there.

~Jim

[XNA] Live Lecture on Thursday

[Live Lecture]

It’s that time again folks! Lectures about programming featuring me. This Thursday, 11/13/2008, I will be having a live lecture at 7pm CST. If you’d like to participate, please contact me either here, or via email at admin@redsatori.com. I will need your email address in order to send the DimDim link to you. I start promptly at 7pm CST, although I will be there a bit earlier than that.

Additionally, please check this post again for additions to the session. I will include some assets for you to use in your own follow-along projects, or you can use them elsewhere. They most likely won’t be anything special as I am not a graphic artist, just a programmer.

If you plan on participating, please be aware that I tend to go through the content of the session pretty quickly. I don’t do this on purpose, but have a tendency to be doing about 500 things at any given time. Also, please make sure you have a working copy of Visual Studio and also XNA. You can use VS 2005 with XNA 2.0 or you can use VS 2008 with XNA 3.0 CTP (I use the latter), and they should work fairly similarly. I will double check some of my code in XNA 2.0 once I get a chance to get my desktop back up and running.

[VSDD]

This very simple design document contains the information about the project we will be working with during the live session.

Name: Bomb Guys

Objective: Objective is to not allow any bomb guys to reach your base.

Gameplay: Mouse controls the aiming reticule. Left mouse button fires.

Other things to work on: Text Rendering Engine, Particle Engine, Animation Engine (for bomb guys)

[Conclusion]

Thanks for wanting to be a part of this process. Again, if you’d like to join the session either email me at the address listed above or post it in the comments section here. Please make sure you let me know if you are  a DeVry student or a random passerby.

Thanks,

~Jim

XNA Tutorials

Sorry about the delay in getting tutorials posted here on my blog. I am hoping to get back into posting new content in the next week or so. I will be unavailable the week of November 18th, as Mines of Moria is being released that day and I really want to take a look at the new content.

That being said, I will be making a tutorial on creating 2D game utilities in the upcoming month or so. It will be a side-scrolling based engine that I will be creating which will allow multi-part animations and a basic scripting language for this type of game. Additionally, I will be posting tutorials on a simple particle engine, a cursor engine, and a couple of other graphical engines that may be of use to some of you. At the very least, you can see how the code works in order to develop your own strategies.

Stay tuned for more information.

~Jim

P.S. I am also hoping to get a video podcast on here about some of what I am going to be doing as well. I don’t know how long that is going to take, but hopefully not too long.