Tales from outer turnip head...

Tales from outer turnip head...

Sunday, March 5, 2017

Trying new things

Search "Trying New Things" online and you will be assaulted by memes and quotes and self-help pages imploring you to get out of your comfort zone, encouraging you to be prepared to make mistakes, or reminding you that you cannot grow if you do not push yourself into risks...

[Random non-sequitur  I wanted to write above that there is "no derth of memes quotes, etc." online. Spellcheck suggested that derth is not a word so I looked it up and panicked when Wiktionary informed me that derth is obsolete. I though, "How can such a great word like derth be obsolete? What is wrong with language today that a word so good in the first part of the 20th century becomes obsolete by the beginning of the 21st?" Well, it turns out I panicked too quickly and didn't process that the spelling of derth is obsolete and that dearth is alive and good. Note: I have also managed to use either spelling six times in this non-sequitur (which itself has been used twice now). So now that I have allowed my non-focus and love of dearth(!) and non-sequitur to distract and rack up ten uses of some great words, let's return to "trying new things"...
A person who never made a mistake never tried anything new. --Albert Einstein
[Just curious, do ellipses (that are used stylistically like Emily Dickinson) get to hang out after quotation marks, or do I have to place them inside? I really hate placing punctuation inside quotes in some instances and yet concede that punctuation outside of them looks silly. "Just sayin'"...]...

So, I've been trying new things. It might fall under "mid-life-crisis," (I am not sure), but it seems like a good time to be trying new things. And I make mistakes. I like to know how things work, and have always taken things apart to see the guts, but I have never been all that good getting them back together properly... hmmmmm....

When I was young I had a pretty nice stereo that my parents had bought me. It was a Technics. I had a receiver, dual tape deck to dub copies of copies of copies until they lost all definition, a belt driven turn table, system timer, and two Acoustic Research speakers. It was a sweet set up. Years later I upgraded my receiver to a Denon which I still have, abandoned my cassette tapes, and sold my turn table in a moment of teen desperation for fifty bucks (never knowing that the world would return to vinyl with such appropriate gusto). I spent whole afternoons making mix tapes and listening to vinyl, and learned to love music, all kinds of music...

We also lived in a big house with steam heat and polyester shag rugs on the third floor. It is a stone house built around the same time derth was losing its appeal as the correct spelling of dearth. We used to lift our bed sheets over our heads and with slipper pajama feet bicycle kick to make shooting star like sparks in our makeshift tents. I am not sure what factors contributed to a more dramatic phenomenon, but we found that stocking feet and a lot of shuffling about on the carpet created a tremendous amount of static electricity in the right weather conditions. My older brother and I would scoot around building up charges and shock the the crap out of each other, delighting in the pop noise that accompanied the minor sting. Shocks to the nose sucked; arms and back were not satisfying enough; the neck was just right!

[I know, I know. I'm wandering all over the place mentioning trying new things, thumbing my nose at proper spelling and punctuation, arriving at my mid-forties, taking things apart, reminiscing about old stereo systems, and smiling at shock wars... all, as if my readers might enjoy non-sequiturs, or as if I want to show how much I understand how writing on coffee and thinking about ADHD might feel. But they all connect. I promise.]...

So one day after my older brother had gone off to college I was alone on the third floor, bored and listening to Pink Floyd's Dark Side of the Moon for the bajillionth time. (I am not sure where my younger brother was. He had had moved up to the 3rd floor into my old room, and I moved down the hall to my older brother's room, but on this day I am not sure where he was.)  I shuffled about looking for something to engage me and wanted to turn up the volume during the song Breathe (Why these details come to me now, I am not sure; I worry I am making them up, but truly believe this is how things happened. Story truth?) Well, nonetheless, when I touched the receiver there was an amazingly glorious "crack" noise accompanied by one of the most painful static electricity shocks I have ever received. The stereo went dead, the notes of Breathe stopped, and there was the smell. A bad smell of electronics fried. A worry that I had broken my expensive gift through neglect kept me from immediately telling my father. I felt a pit in my stomach as I processed a realization my lifeline to music in my room was severed. What a terrible moment...

So I dismantled by stereo. Screw by screw and unfastened plastic clips, face plates and sliders, transformers and 1980s style electronic boards... and there was the telltale browned stain on the green board with discolored diodes and resistors all around. Cooked. I loved taking the thing apart. I loved to wonder what part did what thing to make the stuff work that worked to make music play. I also realized that I could not put it back together again without a lot of knowledge and study. I never learned how though...

So fast forward to 2017. I am better educated, and perhaps a little wiser. And I have learned a few new tricks, mostly about what I do not know. But I do have capability. I have potential...
The principle goal of education in the schools should be creating men and women who are capable of doing new things, not simply repeating what other generations have done. --Jean Piaget
And I have a new rule. If something arises in my life that can be done now, and it does not hurt me or others, I have to try to do it. No more "somedays" or "what ifs." (For example: I always wanted to know how engines work and have wanted to ride motorcycles, so I am rebuilding a bike and hope to be riding with the spring thaw.) In addition, I have (for years) wanted to know how to code, and so with some prodding from my younger brother, decided to enroll in a dual-enrollment high school/local college Java1 course. 18 high-school students and me. What a hoot! And I am having fun. I just took my first college exam since graduate school finished in 1998. (And I did very well.) It was not a big risk I took, but I was nervous nonetheless, and invested time and money when both are short. But I did it...

Here is a little bit of my recent success in trying new things. The hope is that you ignore reading the code (it doesn't do much), but think, "Hey, that's cool, Peter is trying new things. Good for him." I also hope if you have read this far you perceived the fear that arrives sometimes as we stab into the dark of things unknown, and at the same time might think, "Hey, I can do that too."

"I hope that in this year to come, you make mistakes. Because if you are making mistakes, then you are making new things, trying new things, learning, living, pushing yourself, changing yourself, changing your world. You're doing things you've never done before, and more importantly, you're doing something." --Neil Gaiman    

/**
 *
 * @author peterniemeyer * @version 170208 (Date)
 *
 * A program to delineate the increments of change to be given back.
 *
 * NOTE: although the program asks for change in all bill increments,
 * there is never a reason why someone paying would get a $100 bill back,
 * so i am not going to program for that possibility.
 *
 */
import java.text.DecimalFormat;
import java.util.Scanner;
public class PeterChangeMaker {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
double changeget; {
System.out.println("Hi, my function is to help you return the proper amount of change to your customer."); System.out.println("How much money does your cash register indicate needs to be given back as change?");changeget = keyboard.nextDouble();

// Testing to see if the change being given in reasonable for cash offered.
String money = "#,###,##0.00"// Pulled this code from my "SystemBuilder" Project
DecimalFormat df = new DecimalFormat(money);
while (changeget>=100.00) {
System.out.println("Human error: There is no reason you should be giving more change than the largest increment bill, $100. Check what you entered into the register."); System.out.println("How much money does the register say needs to be given back as change?"); changeget = keyboard.nextDouble();
}
while (changeget<100.00) {
System.out.println("So to confirm, the change will be: $" + changeget); break;} System.out.println("");
changeget = changeget * 100; // Converting Money to number of cents.
int change = (int) changeget; int m50; // Declaring types of change.
int m20;
int m10;
int m5;
int m1; // I am choosing to not use 2 dollar bills and 1/2 dollar coins as they are not included in standard change drawers in retail.
int mquarter; int mdime; int mnickel; int mpenny; m50 = change / 5000;
change = change % 5000;
m20 = change / 2000;
change = change % 2000;
m10 = change / 1000;
change = change % 1000;
m5 = change / 500;
change = change % 500;
m1 = change / 100;
change = change % 100;
mquarter = change / 25; change = change % 25;
mdime = change / 10; change = change % 10;
mnickel = change / 5; // Although mathematically this is unnecessary, mnickle was not initialized so a math operation was necessary. It also keeps the pattern clean.
change = change % 5;
mpenny = change / 1; change = change % 1;
System.out.println("Use the list below to give the customer the proper change in the most efficiant way:"); System.out.println("");
System.out.println("CURRENCY:\tNumber:\tAMOUNT\tROLLING TOTAL:"); System.out.println("Fifties ($50):\t  " + m50 + "\t$" + df.format(m50 * 50.00) + "\t    $"df.format(m50 * 50.00));
System.out.println("Twenties ($20):\t  " + m20 + "\t$" + df.format(m20 * 20.00) + "\t    $"df.format(m50 * 50.00 + m20 * 20.00));
System.out.println("Tens ($10):\t  " + m10 + "\t$" + df.format(m10 * 10.00) + "\t    $"df.format(m50 * 50.00 + m20 * 20.00 + m10 * 10.00));
System.out.println("Fives ($5):\t  " + m5 + "\t$" + df.format(m5 * 5.00) + "\t    $"df.format(m50 * 50.00 + m20 * 20.00 + m10 * 10.00 + m5 * 5.00));
System.out.println("Ones ($1):\t  " + m1 + "\t$" + df.format(m1 * 1.00) + "\t    $"df.format(m50 * 50.00 + m20 * 20.00 + m10 * 10.00 + m5 * 5.00 + m1 * 1.00));
System.out.println("Quarters ($.25):  " + mquarter + "\t$" + df.format(mquarter * .25) + "\t    $"df.format(m50 * 50.00 + m20 * 20.00 + m10 * 10.00 + m5 * 5.00 + m1 * 1.00 + mquarter * .25));
System.out.println("Dimes ($.10):\t  " + mdime + "\t$" + df.format(mdime * .10) + "\t    $"df.format(m50 * 50.00 + m20 * 20.00 + m10 * 10.00 + m5 * 5.00 + m1 * 1.00 + mquarter * .25 + mdime * .10));
System.out.println("Nickels ($.05):\t  " + mnickel + "\t$" + df.format(mnickel * .05) + "\t    $"df.format(m50 * 50.00 + m20 * 20.00 + m10 * 10.00 + m5 * 5.00 + m1 * 1.00 + mquarter * .25 + mdime * .10 + mnickel * .05));
System.out.println("Pennies($.01):\t  " + mpenny + "\t$" + df.format(mpenny * .01) + "\t    $" + df.format(mpenny * .01 + m50 * 50.00 + m20 * 20.00 + m10 * 10.00 + m5 * 5.00 + m1 * 1.00 + mquarter * .25 + mdime * .10 + mnickel * .05));
keyboard.close();

}
}
}


No comments:

Post a Comment