Tuesday, November 3, 2015

My First "Game"

Well, my C# book tells me I have learned enough for them to guide me through making my first game. I have done it, and it appears to be working! It is a typing game that progressively gets harder as you type the correct letters that appear on your screen. It is a really simple game, and uses some of the knowledge I learned in the first 4 chapters of the Headfirst C# book.

All of the steps are provided to you, so all you have to really do is follow directions. It took me about an hour to create the simple game, but I like to think about each step to help me remember what I did and why I did it. I will be honest, the game did not work flawlessly once I first debugged the game.

Perfect! I was given all the directions and the game doesn't work! After six correct key strokes I would get an out of range error. Either I missed a step or the book gave me incorrect directions (I would hope editors would find this before printing). Turns out I missed a step. Well, it wasn't a step, but a side window with a note telling me to set the difficultyProgressBar maximum to 701 while the default was only 100. I have a method in the game that after each key stroke would increase the difficulty. Well, after so many key strokes it tried to increase the difficulty above 100 and *bam* the game explodes on you.

Luckily, I was able to track down the error and fix the game relatively quick. After I fixed my error I went back to make sure the book told me to take this step. Right there on page 162 at the bottom right corner was the little box stating to remember to do this maximum update along with two other steps. I did the two other steps so I am not sure how I missed the maximum update.

I am glad I missed the update. It helped reinforce some practices that we do at work. That is, we should be testing our own code before shipping or checking in. Sure, the game worked but only for a few key strokes. It built just fine and I would have been able to ship the product. However, it would have come back and blown up in my face. "Look, Robert can code a game, but he doesn't know how to debug and fix errors before shipping."

Other pieces I noticed in the game:

  • The letters shown are all capital letters, but if you type a capital letter back it counts it as and error. I did not debug or fix this one. Maybe I will try that tomorrow morning.
  • I have linked to a zip file that has setup.exe included. Anyone can run the game and see what an awesome job of following directions I did. This will install into your computer and the program can be removed by uninstalling TypeGameChapter4


Next up in the book is a "lab" which gives me a goal, but does not give directions like the previous game. Let's see how it goes!

Get zip file for typing game here!

Thursday, October 22, 2015

Where does the time go?!?

Wow! A week sure comes...and goes. I missed my deadline a couple of times. Now, why did I miss the deadlines? I have a few thoughts on that.

First, I am taking time on my own to read and learn about C#. There are so many different ways to approach C# that I am finding it hard to really focus on one aspect of programming and C#. That is something I need to work on.

Second, I am not making progress as fast as I would expect myself to be making at this point. I am reading a book called "Head First C#" by Jennifer Greene and Andrew Stellman and it is helping, but I don't feel I am setting enough time aside to make a real dent in the book. I am barely getting to the end of the fourth part where I am finally making my first program. I started the book two months ago (that is a guesstimate).

Third, I have a list of topics to write here, but I don't feel like an expert, yet. I am one of those people that takes time to analyze and only speaks up when I know for certain I have the correct answer. That isn't always the best place to be in. Maybe I should write about those subjects, be wrong and then have someone leave me a note setting me straight. I would learn to fail and fail fast.

At any rate, is writing a blog about programming the right thing for me at this time in my life? 

Tuesday, September 29, 2015

I'm not as smart as I used to think I was

College is great. It gives those an opportunity that may not have otherwise been able to succeed in the world. I thought my opportunity to make money would be by getting a degree in finance. After all, I though the world revolved around money and the way to make money was in the financial world.

I was pretty good at finance. It came pretty easily to me and, if I am completely honest, I did not have to work very hard to get A's in my classes. Naturally, I found a job working for a large financial firm in the operations department. It was a good job right out of college and used the skills and knowledge I had acquired over the last four years (okay, let's be honest, I took five years).

Again, the work came easy to me. It never really challenged me at a level I would have liked from work. So, I made my own challenge. I was doing the same processes over and over every day and felt there had to be a better way to accomplish the same work without the manual processes done multiple times. I had always been a fan of Excel and started looking for a solution to my problems.

I found Visual Basic for Applications (VBA). It worked perfectly. It also added a challenge to my work, finding a way to automate the mundane work I was doing. This expanded to helping other teams do the same. I wrote many new applications to help in others daily work and learned a little about coding along the way.

Well, I got bored and wanted a bigger challenge. I left the financial world to take a shot at using SQL. Lucky for me (although I didn't think that at the time) the first job I got after leaving finance was at a terrible company. Management was bad the position I was in was not defined well and was not a position that seemed important from others around. I left after a short time to use more SQL at another financial firm.

My college years made me think I could do anything and all the roles I had been employed in did not challenge me to a point where I felt I couldn't do something. Well, after I got experience in SQL I wanted a larger challenge and got a job using C#.

Earth shattered! Well, not really, but I discovered that I wasn't as smart as I thought. I actually had to work at something and it doesn't come easily for me. Object oriented programming was a much harder challenge than even all my classes put together in school. Google has become my best friend. I spend a lot of time searching for my answers. I am no longer the top performer (I had reviews almost every year that showed my peers rated me this way at my first job).

A lot of learning to go.

Monday, September 21, 2015

Programmer Blog

Well, if you have ever read my blog before you know that for all of my prior posts, except one, I told you about my life or thoughts of the day. For a while I was using the blog as therapy after my head injury. Looking back at those posts I realize how much therapy I really needed back then (and maybe still today). The one blog that I used to show my programming prowess (or lack thereof) was to give the world an Excel time tracker I created. Okay, saying it is for the world is over stating those that actually read my blog at the time. Of all my posts, the Excel post was the most viewed post.

I am not saying that a spreadsheet was more important than the brain injury I sustained in Mexico and the work it took in order to get back to my normal self. Perhaps it shows that I got better at writing the content in my blog. It could also mean that I used words that were a better hit in Google and the blog was higher in the hit list for readers. Or, really it was that I figured out how to show the post on the fun social site Facebook.

At any rate, I discovered that a blog can be a good medium for getting information across, be it information about me or the coding adventure I was trying with VBA. I have done a number more coding projects since the Excel time sheet. In fact, I created the time sheet while working at a financial firm. My position had nothing related to programming. I just took it upon myself to teach myself VBA. Maybe I was lazy and was tired of doing the same processes over and over or maybe I had the mindset of creating more effective work flows. Either way, I started to learn coding.

Now I am in a position where I code part time. No longer do I use VBA to code. I spend a large amount using C# and any other language my work uses. This is very difficult, I don't have a programming background. The fact is that Google and I have become best friends.

In my searches in Google, I found a blog site that I found interesting. The blog is called Simple Programmer and  provided some great ideas about programming. The blogs don't necessarily tell one how to program but practices that could apply across any job (just change the idea a little bit). One of the blog posts is entitles "How NOT to Email Famous People." I don't even know how one finds famous peoples email addresses. I guess perhaps you just try every combination of their name and add @gmail.com. I am pretty sure everyone has a gmail address, unless of course you are stuck using your AOL email address from the early 90's.

John Sonmez (the blog author) provides a blogging course that will help you advance your career. That is why I am re-purposing my blog. I am not writing as much as perhaps I should, but I wanted to help solidify my learning of C# and the frameworks we use at work. I may not post anything earth shattering, but I hope that I am able to help someone that reads my posts and learn something myself. I am going to put my schedule out there...once a week. Now hold me to it. We will see

Wednesday, July 10, 2013

A Thought on the Theatre

Time: Early 1920's
Place: Palace Theatre in New York City  

A large crowd was gathering outside the Palace Theatre to see the hit play, Sally starring Marilyn Miller. Going to the theatre was not an everyday event, tickets ran at $3.50 a seat. The cost prohibited some of the working class from being able to attend such an event. It was a real treat to those that were able to attend.  

Some of the lucky patrons had the opportunity to attend dinner at a local restaurant before seeing the show. Everyone in attendance would treat the $3.50 seat as a special night. The men would pull out their three piece suits and the women would wear their tailored suits or flapper dress showing the night was not just any other and was special which required the best clothing they owned. They all looked like a million bucks and were ready to have a night at the theatre.

Time: 2013
Place: Capitol Theatre in Salt Lake City  

Sheila and I enjoy going to the theatre. We went to see Jersey Boys, a show which Sheila really enjoys and has seen two times before this showing. Going to the theatre is a treat, the tickets are slightly more expensive than the $3.50 of an a few years back. For that reason we like to make a date of going to a show. We feel the theatre is still a place where people should dress up. Sheila will wear a skirt and blouse and I will wear my suit (I do not own a three piece suit) or a shirt and tie. We don't wear our most expensive outfits, but still look pretty nice, especially Sheila. She is always beautiful.   

We usually go out to dinner prior to the play. When we go to a play at Capitol, Sheila enjoys going to the Olive Garden as it is just across the street from the theatre. I enjoy going to Olive Garden because you get a nice deal on parking by saying we are there to see the show. After dinner we take the short jaunt across the street to take our seats for the show.  

Times have changed since the theatre days of our grandparents. People don't dress up as much as would have been expected in earlier times. Perhaps it is the fact that the general public has more expendable income and feel the theatre is not as special as it once was. It is no longer a novelty and is common enough people to feel the theatre is not a special occasion. Why get dressed up if you are not going to a special occasion?   

This show we saw a very interesting gentleman. What was he wearing? He was wearing jeans, many people now wear jeans to the theater, a t-shirt, maybe it would have been more appropriate to wear at least a polo shirt, and on top of his head he was wearing a baseball cap.  

To me, and many others that still believe in etiquette, this is not something that should happen. Lisa Mirza Grotts, a proclaimed expert in proper etiquette, states that it is never appropriate to wear a hat indoors, even informal events. Why did this man then not take his cap off at the theater? I am not sure and I can't blame his age for not knowing etiquette. The man was probably in his early 60's so I would have expected he grew up in a time where actions, like wearing your cap to the theatre, was not acceptable. Maybe he grew up in a household with very strict parents that made him takes his hat off whenever he went in a building. If that were the case, I would expect that to carry into adulthood.  

Why do I care? Obviously, it is a free country and the theatres do not impose a dress code when coming to see a show. Maybe theatres should have a dress code. If a person were going to a business meeting they would dress up, probably a shirt and tie or, in some cases, a suit. I think theatre should be treated like a business meeting, after all the actors on stage do this for a living and performing is their business. Okay, maybe every theatre instance doesn't require you to dress up. For example, if you are going to a local theatre without professional actors you need not dress up or your kid's school play in the first grade. However, I still don't think you should ever wear a hat to the theatre. It doesn't matter if it is a school play, leaving your hat on, no matter how trendy you feel it is, does not follow proper etiquette and should not be done.  

1. Mirza Grotts, Lisa (February 22, 2012) Hat Etiquette, Huffington Post on the Web Retrieved July 10, 2013 www.huffingtonpost.com/lisa-mirza-grotts/hat-etiquette_b_1292589.html

Monday, March 4, 2013

Not a normal post...

Well, it has been a while since I posted a blog. I really haven't had much to talk about. Actually, I started a new job in January! I am now a Management Information Systems Analyst and am liking it so far. That means I automate processes and help other teams find inefficiencies then fix the inefficiencies. I have only been there for a month and a half and haven't been able to help many groups. However, the first project the team gave me has a lot of exposure. I better get it right since we know we are going to be audited when all is said and done.

Anyway, I was putting together reference document to easily find VBA code I have used over the years. I found some Excel code I use but never actually finished making it more user friendly. I spent a little bit of time on the code to fix some of the kinks and make the tool run. The tool is an Excel workbook that allows you to enter the hours you worked for any given day. If you have to keep track of the time spend on a specific project then this tool will be useless. However, if you just need to keep track of when you get in and when you leave work then this tool works. I don't have to keep track of projects I work on and actually don't have to keep track of hours. Salary is great, right? I just like to keep track of my hours worked even though it doesn't mean anything for my pay.

It is nothing spectacular but, who knows, you may find it useful. Click on the link below and enable macros if you want to use it.


Maybe an update on the new job after a few months and a few projects are in my pocket.

Saturday, December 22, 2012

The Dirty Thirty

Well, I have joined a new club! I joined the Dirty Thirty club. I remember thinking 30 was so old while I was growing up. Now I am grown up, well sort off, and 30 isn't looking so old anymore. I am lucky that the Mayans were wrong and the world did not end on my 30th birthday, however, if they had been correct I couldn't have spent the end of the world with better company.

My wife and I had discussed that I didn't want a real big event for my 30th. I didn't want to go to a public place and create a big scene. Making my friends and family come out to a big restaurant or to Boondock's for bumper cars is not something that I would have enjoyed (and probably a few or more of my friends and family wouldn't have enjoyed it that much). I also did not want people to bring presents if we were going to do something when the day came. Getting presents isn't the reason I would want a birthday party. The reason would be to get all my friends together in one place where we could talk instead of me saying, "Give me, give me, give me." The time with friends and family is present enough for me (sounds cheesy, but it is true).

Well, after we had that discussion at the beginning of November, Sheila started planning the big event. I had a feeling she was putting something together but I didn't know to what extent or how many people. We always do dinner with both Sheila's family and my family for birthdays. We discovered that when we tried to make dinner plans for my birthday that my family had a lot of conflicts. My dad probably wouldn't be back from work in time, my older sister was on call that night, my two little sisters were out of town. This would have been dinner with Sheila, Mom, and me. Not a bad dinner, but not the whole family. The day we that would work was December 23. Sounds good, Jorgensen dinner planned.

December rolled around and Sheila was involved in some questionable actions, getting angry when her phone beeped with a text and I brought the phone to her possibly seeing what the message said, sitting strange on the couch so I couldn't see her computer screen, and staying up later than me (this hardly ever happens) to name a few. I even tried to make plans on December 14th at one point and was shot down really quick even though we did not have an event on the calendar. As a side node, I think smart phones that are able to link my calendar to Sheila's calendar is great so we are always on the same page when making plans.

I will be honest, I like to save a few dollars and like to make a menu at the beginning of the week so we aren't scrambling to find something to make when we both get hungry for dinner or go out to dinner. However, I also like to treat my wife and don't often tell her no when she wants something. The night of December 14 Sheila came home and said she wanted to go out to dinner. This was strange especially since we had a great menu item for the night, chicken pot pie. This made me think even more that Sheila had planned something for my birthday. Ultimately, I said we could go where she wanted to eat and ended up going to Red Rock.

Sheila didn't wait for a host/hostess to seat us and started walking in like she knew where she was going. This sealed the deal, I now knew she had planned something. She did make plans. It was very small, only a few friends. She made a plan and followed my wishes to have some friends where we could talk and be heard. Restaurants are hard since you can't hear everyone and don't get the opportunity to talk with all the people. Well, turns out the surprise has only three other adults and two kids. Kind of small but at least I could hear all the conversations even with only 40% of the hearing in my right ear. Good plan Sheila! I thought this was the birthday surprise and didn't think she had anything else planned.

The beginning of the next week, Sheila came home and asked if we could go to dinner at the country club with her parents and sister on my actual birthday since my family dinner was going to be the 23rd. We hadn't planned anything, and we had already had dinner with a few friends, so I said that would be great, Sobieski dinner planned.

The whole week before my birthday Sheila came home and seemed really stressed. I couldn't understand why, Winter Break was coming up and she wouldn't have to work for two weeks and she always talks about how the week before a break is almost useless. I did what I could to help her, who knows how successful I was.

Well, along came December 21.We usually go to her parents house around 5:30 to visit before we go to dinner. Sheila had mention that the club was doing a dinner with Santa so it would be really busy and we wouldn't be going to until about 6:30. That was alright with me. I thought that we would then want to get there around 6:00 so we could visit before dinner with the new dinner time. Sheila started getting ready around 5:40. I thought, "That is ok, it usually only takes her about 15 minutes to get ready. We will leave about 5:55 and be to here parents house to still visit, no problems."

I watched an episode of "The Big Bang Theory" while I waited. The episode finished. I came upstairs and Sheila wasn't ready yet. She came out and asked me what pair of glasses, which sweater, which shoes to wear. I gave my opinion, she put them on, and asked again which ones. We had a five minute conversation on her new glasses and if she should wear them. I finally told her she bought them for a reason, to wear them and she should wear them. We spent probably another five minutes on the shoes she should wear. Why all the sudden did she need so much help getting ready? Usually she would ask me once and go with what she had initially thought. By the time she was ready to go we wouldn't have any time to sit and visit with her parents before we headed to the club.

She finished getting ready to leave around 6:15. I was right, all the visit time before dinner was now gone. Luckily traffic wasn't bad so we didn't have any more holdups. Sheila was texting her parents while we on our way. This is not uncommon so did not cause me to think something was happening that I didn't know about. I still believed we were going to dinner at the club with her family.

We pulled up to the street before her circle and I noticed a large number of cars along the street. Someone was having a Christmas party! I hoped the party was going great for them. Then there was one car in the driveway, her dad's. The car we usually pile into to drive to the club. We opened the door and as, usual, Mike said, "hello." We walked into the kitchen and, "SURPRISE." Sheila had planned two surprise 30th birthday parties. The first was a decoy to make me stop thinking about it and the second had many family and friends that, I felt very privileged, would be able to find some time during the holiday season to come spend with me.

I spent the night talking to great friends and family and had a wonderful night. I could not have been with better company if the world really had ended like the Mayans thought. Even without the end of the world I couldn't have spent it with better company. I had family members, all of which had told me they were busy on my birthday, and friends there to celebrate. There was food and much laughing. I was able to spend time with everyone that came and I could hear them! No long tables with me at one end and someone on the other that I wouldn't be about to carry on a conversation.

Some great friends were able to spend the night with me and some other great friends were not able to make it. December is a busy time and I understand if you weren't able to make it. I am also very grateful to all those that were able to come and spend the night with me turning into an old man.

Thank you (in no particular order):
Sheila Jorgensen
Allen and Shauna Jorgensen
Mike and Micki Sobieski
Scott and Trisha Rafferty
Stacy Sobieski
Joyce Dahlquist
Robyn Dahlquist
Erika Dahlquist
Josh and Chelsy Judd
Aaron and Stephanie Partridge (although at separate times)
Katie Partridge
Jake and Betsy Wilberg
Jerry and Tiffany Turner
Clifton Uckerman
Peter and Beth Jorgensen
Alex and Rachel Rowe
Woody Bartlett
Bruce Bakker
Jon Seiler
Tyson Kamp
Megan Lauer
Matt Rowell
Jackie Higley
Wayne

And to those who weren't able to come, I hope to see you soon! Happy Holidays!

(I am sure there are more pictures but I don't have anymore maybe I will get tagged in Facebook?)