Wednesday, July 29, 2009
Tuesday, July 28, 2009
For instance, I was helping her with her programming course homework. My husband (teaching the course) had introduced arrays and For-Next loops. She insisted that she didn't need much help and then proceeded to feel lost just looking at the code she was supposed to modify (and the pressure of doing homework or you can't go to your play date helped set her on edge as well).
The existing program consisted of two balls bouncing around in a box. When we had done that program, I fortuitously appended all of the associated variables with 1 and 2. The program set up the starting condition for each ball (the initialization), drew the balls in the box, then checked the ball's position and reversed the direction if it was outside of the box, and then moved it to it's new position.
So the initialization set the first position, the size, the color, and the speed of the ball. Hanover, getting complicated, wanted everything random. There were random starting positions, random speeds, random colors, and random sizes. Here is what her Phrogram code looked like for two balls [General note: I wrote this on a different computer and didn't have the program for reference--the commands are approximate and may not be correct. The idea is there. When I correct with a copy of the code, I'll record the update]:
//Assign a radius to the drawn circle, a random number between 10 and 30.
//Assign a color for the circle, a random number between 10 and 130.
//First X position is a random number between (1+ballradius1) and (640-ballradius1). The rectangular screen is 640 pixels long in the X direction. The radius is added to the position so that it's the EDGE of the ball that is at the edge of the screen.
//First Y position is a random number between (1+ballradius1) and (480-ballradius1). The rectangular screen is 480 pixels high in the Y direction. The radius is added to the position so that it's the EDGE of the ball that is at the edge of the screen.
//The speed in the X direction is assigned. The speed is defined by how much the ball will move in X in one iteration. It was decided to use a random number between 1 and 5.
//The speed in the Y direction is assigned. The speed is defined by how much the ball will move in Y in one iteration. It was decided to use a random number between 1 and 5.
And then each of those commands was repeated for the second ball, replacing the 1 at the end with variables that end in 2.
The most recent assignment was to increase the number of balls in the box to 40. The first thing I did was to remind Hanover of arrays (it had been two weeks since the last class). That for every variable I can put a  after it and it would be the same as writing x1, just now it's x. x2 could become x. It could go on to x, x, x, and x, x, x. And each one of those names would refer to that particular ball's x position. I reviewed that instead of using numbers in the brackets we can use i (for increment) She was determined to use a different letter and picked m for many. So when we have m=1 it's the same as x[m]=x=x1. And then m can be set equal to 2 to get x[m]=x=x2. We can keep adding 1 to m until it goes all the way from 1 to 40.
Here's an example of using m and incrementing it to set our conditions for all of the 40 balls.
...and so on. It is really obvious that we are doing the exact same instruction for each m. This is a computer! It's designed to do things automatically. "Was there an instruction that you learned that changes a number until you get to a certain number?" That was enough to get her to remember the For loop. A For loop (for those unfamiliar with programming) will count with a variable from defined number (in this case 1) to a second defined number (40) by 1 (programmers know this is a simplification) and when it gets to the Next command, it knows to go back to the 'For' and move the variable to the next number. With all of the code written above for 4 balls, we can now address 40 balls with the section of code below:
For m=1 to 40
Much shorter. It's even shorter when you look at the change for the whole initialization.
Here's the original code (from above, only without comments this time) for only 2 balls.
Here is the same code using arrays and the For-Next loop.
For m=1 to 40
Now this only sets up the starting information for each ball: radius, color, starting position, and speed. The next section would draw each ball. There are some commands missing, so this would not necessarily run after copying it into Phrogram. I did not include instructions for opening the drawing window.
For m=1 to 40
Pen(False) //Turns drawing off (so it doesn't draw a line when you move it)
MoveTo(x[m],y[m]) //Moves the 'pen' to the center of the circle.
Pen(True) //Turns the drawing back on.
Color(col[m]) //Sets the pen to the color of that ball.
Circle(ballradius[m]*2) //Draws a circle of the right radius for that ball.
That will draw all 40 circles on the screen. The next section of code makes the ball bounce off the walls by changing directions and moves the ball to its next position.
For m=1 to 40
xspeed[m]=-xspeed[m] //If the position of the edge of the ball is outside of right side of the box, then reverse the travel in the X direction.
If x[m]<1+ballradius[m]> //If the position of the edge of the ball is outside of the left side of the box, then reverse the travel in the X direction.
yspeed[m]=-yspeed[m] //If the position of the edge of the ball is below the bottom of the box, then reverse the travel in the Y direction. Yes, Y is more positive the lower you go. Don't ask me.
yspeed[m]=-yspeed[m] //If the position of the edge of the ball is above the top of the box, then reverse the travel in the Y direction.
x[m]=x[m]+xspeed[m] //Make the next drawn position move by the speed in that direction.
Of course we need to draw the balls and change their positions over and over and over again in order to animate the balls and see them bouncing. Each of the preceeding For-Next loops were included in a While loop (which continues to do something while conditions stay the same) until the space bar is pressed. So it runs through both For-Next loops (drawing the balls, checking if they are outside of the box and reversing direction if so, and moving them) forever--or until someone presses the space bar.
Saturday, July 25, 2009
Thursday, July 23, 2009
I am sure you are going to get a lot of e-mails telling you to not worry. I disagree however. Being an introvert (I don't know if you're introverted or actually anxious about social situation) myself, I see that it is very difficult for my daughter to not have a lot of friends (a lot meaning around 5 or so). She dislikes homeschooling because of it. While we have homeschooled for three years, I cannot blow off her desire for friends like some other parents would recommend or trust that it will 'just happen'. We are homeschooling now because I want to assure that she has a strong academic foundation and I have not felt that sending her to school at this point (even if she wants it like mad) would be best for her.
It is wonderful that you understand your personality and are thinking about this in advance. I can offer some advice.
Go to groups. It doesn't matter if it's a weekly group or monthly. I hate dragging the kids out (I also have a young one and it's a lot of work to take the 18 month old out with the others) but I recognize that I NEED to do it for the kids. Go to park days.
Be prepared to drive distances (you'll hardly ever find things within 10 minutes of your home) but if you're willing to drive 1/2 an hour (my personal limit) or 45 minutes (I know parents who do up to an hour), you'll find the number of people your daughter (and you) can befriend will increase dramatically.
Go to classes or groups even if you're not sure that they will be interesting. This is actually a rule I DON'T follow--I do not like to spend a lot of time out of the house just to get out of the house. Since I'm homeschooling for academic reasons, I need seat time for the kids. But it is probably worth while to find one or two that you can live with even if they aren't exactly what you'd prefer for your daughter.
Be flexible! Friendships DON'T happen in clubs or classes or any structured activity. They happen during down time. If kids are staying after a class to play, then stay! Be prepared to stay after every event. If it looks like your daughter is getting along with someone or talks to someone, then even if the kids aren't staying, then be prepared to offer invites. If the class was before lunch, then ask if they'd like to go to a local McDonald's (hopefully that has a playscape). You can even just make a general announcement that you're heading to a nearby park to play for a while and hope to see others there.
You can join town activities, but the same rule holds for town activities. It's really hard to make friends when kids only see each other at structured activity. The structured activities should be seen as conduits through which to meet people for scheduling play dates, not the actual place where your daughter will make friends.
Hardest for me: get people's phone numbers and call them! I get phone numbers but rarely ever follow through on playdates. This is a detriment to my children and thus makes me unhappy, so I personally really need to work on this.
Not all homeschoolers are going to be good playmates for your child. Some homeschooled children really do have social issues--I've seen kids hit and behave inappropriately. Just because people are homeschooling doesn't mean they're parenting well or that their children are well-adjusted. Also, not all personalities mesh well, so not every decent kid you meet will be a good fit for yours. Going to a group where kids have been homeschooling together for a while can lead to your daughter getting the cold shoulder even if she is willing to put herself out there. Failure happens! It's disappointing, but she will get over it if she has other opportunities for success.
If you are having a hard time meeting people or finding a class/club that fits your schedule--START one! It could be a play group, a book club, a craft club, a sports club, a park day, a girls' club (that's what I did). Hosting something in your house involves a great deal of work--organizing the activities, having lots of kids over--usually leads to messes, having parents over means the house has to be clean (very hard for me though it does have a bonus that my house is cleaner than it would be), providing snacks, having strange kids using your bathroom (lids up, misses, pee on the seat), but you can allow kids to stay and play for as long as you like and you know that people who are willing to travel to your house are generally close enough for play dates. People you meet at places that are far away from your home could be an hour or more away.
The activities you read about in groups and the ones posted on-line are probably 1/2 to 1/4 of the activities going on for homeschoolers. Many homeschoolers organize activities and run classes or meetings without ever needing to invite the general population--they fill the classes through people they know personally. The ONLY way to find out about these opportunities is to go to the park days, clubs, and advertised classes and meet people. Expand your network!
It might seem daunting, but I hope those ideas help you right from the start. I had to learn them slowly over the last few years.
Monday, July 06, 2009
Food fads and superstitions unhappily still delude too many people--and spawn too many cure-everything best sellers--even in these enlightened times. In fact, it is perhaps because these times are enlightened that food faddism is possible. Through most of man's history, his food consisted of whatever could be produced in the vicinity, of which there usually was no very much. It was eat what there was to eat or starve; no one could afford to be choosy, and without choosiness there can be no food faddism.
Modern transportation has made it possible to ship food form any part of the earth to any other, particularly since the use of large-scale refrigeration has arisen. This reduced the threat of famine, which, before modern times, was invariably local, with neighbouring provinces loaded with food that could not be transported to the famine area.
Home storage of a variety of foods became possible as early man learned to preserve foods by drying, salting, increasing the sugar content, fermenting, and so on. It became possible to preserve food in states closer to the original when methods of storing cooked food in vacuum were developed. (The cooking kills micro-organisms and the vacuum prevents others from growing and reproducing.) Vacuum storage was first made practical by a French chef, Francois Appert, who developed the technique in response to a prize offered by Napoleon I for a way of preserving food for his armies. Appert made use of glass jars, but nowadays tin-lined steel cans (inappropriately call 'tin cans' or just 'tins') are used for the purpose. Since the Second World War, fresh-frozen food has become popular and the growing number of home freezers has further increased the general availability and variety of fresh foods. Each broadening of food availability has increased the practicality of food faddism.
All this is not to say that a shrewd choice of food may not be useful. There are certain cases in which specific food will definitely cure a particular disease. In every instance, these are 'deficiency diseases', diseases produced by the lack in the diet of some substance essential to the body's chemical machinery. These arise almost invariably when a person is deprived of a normal, balanced diet--one containing a wide variety of foods.
We are wonderfully insulated from cold snaps and droughts when it comes to agriculture. I think it is important to consider the impact of reverting to non-modern techniques in our food supply.