So What Have We Learned Today, Class?
Okay, I haven't progressed nearly as far as I had hoped in the textbook. Actually, I still haven't gotten past the GUI development in the 2nd chapter. This doesn't mean that I haven't been picking up what I can. Codefights has still been a great resource. Not knowing a lot of the functions has really been a hindrance. Not knowing many of the commonly known practices of developers has also slowed me down considerably. So, what have I learned?Visual Studio
When I first started as a software tester in March this year, I was using TFS (Team Foundation Server) web portal. For those who don't know what this is, it's a web-based portal to let you see what your team is working on.
Above is a generic screenshot of what's going on right now and things we're fixing. You can click on each task and see more specific details. This view is much easier to navigate to me, but I needed to learn how to integrate with Visual Studio more, and all this view represents is a pretty face on Visual Studio.
Behold the view that is Visual Studio. It has a lot of the same information, but it's organized very differently. You can run queries to search the databases for information (you can do this as well in the web portal). In this view, however, you can see what developers see. This is invaluable to me. I taught myself how to create some customized queries (at the top right) that let me see tasks that affect me more directly. That in itself was very educational.
In addition to this, I created some sample codes and even uploaded a few solutions to a GIT repository. Admittedly, it's going to take a while for me to understand all that GIT does.
Sample Code
I was trying to look up some help for a problem on the Codefights website, and I came across a sample solution of code. This code (shown below) is a very basic example of a program that does some simple math. This was perfect! This showed me everything I'd been missing out on. I'm certain there are countless ways to do this, and maybe even better ways, but this was my Rosetta Stone. It's a functioning program that already works. I can click in it, play around with some formulas, and modify all kinds of things. I believe I downloaded this directly from the Microsoft MSDN website here. Messing around with this solution, I'm seeing a lot more of the code functions, some basics, some syntax, and general information I was normally scrambling for.
Anyway, here's the code:
Public Class Form1
Private x As String 'This defines the string variable x
Private y As String
Private random_string As String
Private x_number As Integer 'This defines the integer variable x_number
Private y_number As Integer
Private random As Integer
Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.CheckedChanged
x = Me.textBox1.Text()
y = Me.TextBox2.Text
If x = "" Then 'This sees if x has no value
x = "0" 'This sets x to 0
End If
If y = "" Then 'This sees if x has no value
y = "0" 'This sets y to 0
End If
x_number = Convert.ToInt32(x) 'This converts the string x to a integer then stores it in x_number
y_number = Convert.ToInt32(y)
random = x_number + y_number 'This sets the integer variable random to the value of x_number plus y_number
random_string = Convert.ToString(random) 'This converts the integer random to the string random_string
Me.Label3.Text = random_string
End Sub
Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged
x = Me.TextBox1.Text()
y = Me.TextBox2.Text
If x = "" Then
x = "0"
End If
If y = "" Then
y = "0"
End If
x_number = Convert.ToInt32(x)
y_number = Convert.ToInt32(y)
random = x_number - y_number
random_string = Convert.ToString(random)
Me.Label3.Text = random_string
End Sub
Private Sub RadioButton4_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton4.CheckedChanged
x = Me.TextBox1.Text()
y = Me.TextBox2.Text
If x = "" Then
x = "0"
End If
If y = "" Then
y = "0"
End If
x_number = Convert.ToInt32(x)
y_number = Convert.ToInt32(y)
random = x_number * y_number
random_string = Convert.ToString(random)
Me.Label3.Text = random_string
End Sub
Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton3.CheckedChanged
x = Me.TextBox1.Text()
y = Me.TextBox2.Text
If x = "" Then
x = "0"
End If
If y = "" Then
y = "0"
End If
x_number = Convert.ToInt32(x)
y_number = Convert.ToInt32(y)
If y_number = 0 Then
random_string = "Divide by zero error"
Else
random = x_number / y_number
random_string = Convert.ToString(random)
End If
Me.Label3.Text = random_string
End Sub
Private Sub RadioButton6_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton6.CheckedChanged
x = Me.TextBox1.Text
y = Me.TextBox2.Text
If x = "" Then
x = "0"
End If
If y = "" Then
y = "0"
End If
x_number = Convert.ToInt32(x)
y_number = Convert.ToInt32(y)
If x_number = y_number Then 'This checks if the integer x_number is equal to the integer y_number
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.yes 'If it is the picture is set to a check
Else 'If they are not then the picture is set as an X
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.no
End If
End Sub
Private Sub RadioButton8_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton8.CheckedChanged
x = Me.TextBox1.Text
y = Me.TextBox2.Text
If x = "" Then
x = "0"
End If
If y = "" Then
y = "0"
End If
x_number = Convert.ToInt32(x)
y_number = Convert.ToInt32(y)
If x_number > y_number Then 'This checks if the integer x_number is equal to the integer y_number
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.yes 'If it is the picture is set to a check
Else 'If they are not then the picture is set as an X
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.no
End If
End Sub
Private Sub RadioButton7_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton7.CheckedChanged
x = Me.TextBox1.Text
y = Me.TextBox2.Text
If x = "" Then
x = "0"
End If
If y = "" Then
y = "0"
End If
x_number = Convert.ToInt32(x)
y_number = Convert.ToInt32(y)
If x_number < y_number Then 'This checks if the integer x_number is equal to the integer y_number
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.yes 'If it is the picture is set to a check
Else 'If they are not then the picture is set as an X
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.no
End If
End Sub
Private Sub RadioButton5_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton5.CheckedChanged
x = Me.TextBox1.Text
y = Me.TextBox2.Text
If x = "" Then
x = "0"
End If
If y = "" Then
y = "0"
End If
x_number = Convert.ToInt32(x)
y_number = Convert.ToInt32(y)
If x_number >= y_number Then 'This checks if the integer x_number is equal to the integer y_number
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.yes 'If it is the picture is set to a check
Else 'If they are not then the picture is set as an X
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.no
End If
End Sub
Private Sub RadioButton9_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton9.CheckedChanged
x = Me.TextBox1.Text
y = Me.TextBox2.Text
If x = "" Then
x = "0"
End If
If y = "" Then
y = "0"
End If
x_number = Convert.ToInt32(x)
y_number = Convert.ToInt32(y)
If x_number <= y_number Then 'This checks if the integer x_number is equal to the integer y_number
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.yes 'If it is the picture is set to a check
Else 'If they are not then the picture is set as an X
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.no
End If
End Sub
Private Sub RadioButton10_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton10.CheckedChanged
x = Me.TextBox1.Text
y = Me.TextBox2.Text
If x = "" Then
x = "0"
End If
If y = "" Then
y = "0"
End If
x_number = Convert.ToInt32(x)
y_number = Convert.ToInt32(y)
If x_number <> y_number Then 'This checks if the integer x_number is equal to the integer y_number
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.yes 'If it is the picture is set to a check
Else 'If they are not then the picture is set as an X
Me.PictureBox1.Image = Global.Example_of_math_variables_and_if_statements.My.Resources.no
End If
End Sub
End Class
MATH!
I had no idea so much math would be involved. Algebra. Advanced Algebra, even. At least that's what I've really been seeing on the Codefights website. To be honest, I don't quite understand half of the formulas I've been using; I'm just trying to get syntax and structure down more than anything.
The amount of math is staggering! One thing I did that really helped me was all of the work I did with Excel sheets prior to this. I can see ways to make formulas a little easier, but at the same time, I've got to get that structure out of my head to some extent. I tend to get confused.
Conclusion
All that being said, I'm a little disappointed in myself so far. I expected to be much further along in the textbook and have a better grasp of programming in general by now. Life, outside challenges, becoming a pilot; all things that are taking chunks of my time away. Prioritizing helps, but it doesn't manufacture blocks of time I can utilize - it all comes down to a choice. Do I want to watch TV or read? Do I want to read or work out? Do I want to work out or spend time studying for my pilot's class tomorrow? Do I want to study pilot stuff or programming stuff? Do I want to study programming or spend time with my wife and family? Really, it's a balancing act, and I go toward the one that needs the most attention. Right now, pilot's classes are temporary, and more immediate, so my energy is probably a 70% -30% in favor of pilot classes right now. No TV, no exercise, and a very understanding and supportive family.
Comments
Post a Comment