Thursday, March 19, 2015

Getin' into Git Hub

Well it's been a while since my first post. A lot has been going on in my life since so I'll give a brief personal update. I have been on a job hunt the past few months and will be starting at Aflac tomorrow selling insurance, not quite ready for a tech job but I'll be there soon. My oldest dog passed away, he had liver cancer. We buried him in the back yard. I've decided to post on a weekly basis. It will either be Wednesday or Thursday nights.

Image of the calculator I'm writing in C#
This is what it looks like so far.
I've written my first WinForms app. It is a basic calculator and I added trig functions. I'm planning to continue working on it until it is a full scientific calculator. My sister who is a math teacher has helped out a bit and I'm expecting her to help more. When I tested the trig functions I was getting different results than on my phone calculator. I called my sister and we worked on it for a while before she asked if I was using degrees or radians. I felt so stupid as my phone was set to default on degrees and C# was defaulting to radians. I have plans to add a button to allow a change. Currently I'm working on getting the Key Press Events to allow only numbers and then I'll add functional keys like (+, -, *, /).  Here's the code I've been working on to restrict the keys allowed but it only works the first time. After I press a function button all keyboard input is blocked and the error message doesn't show.

private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
    if (!System.Text.RegularExpressions.Regex.IsMatch(e.KeyChar.ToString(), "\\d+"))
    {
        MessageBox.Show("Enter Only Numbers", "Not a Number", MessageBoxButtons.OK,                     MessageBoxIcon.Error);
        e.Handled = true;
    }

}

Last week I started learning SQL via Code Club through the Code Newbie website. We are using Zed Shaw's book Learn SQL the Hard Way. He has us using SQLite to learn but as we have found out SQLite is not always the same as SQL. Some of the questions we've looked up on StackOverflow have not matched in syntax. I've started a list of the differences and sill post it once we finish this course. It will not be an exhaustive list as I'm sure someone has already created one, just the differences that we've encountered and the solutions we found or figured out. I originally set up the group session for myself and a friend to learn together. Last week she wasn't able to make it but we had two other people join. These sessions have been enjoyable as we are learning at the group's pace and taking time to research questions as they come up.

Tonight I created a GitHub account. I also uploaded my calculator, even though it isn't complete I want my friends to be able to see my progress and help out. Much easier to let them have my code to see and give advice than try to explain it over the phone or chat. As I create more projects I will be adding them to the account. I would like to participate in the Game Off challenge though I doubt my abilities are at a level to make any significant changes to any of the games.