Really Busy

I’ve been really busy lately, hence posting is a bit light. I plan to pickup soon. I’ve been working on many things.

On a side note, switching programming languages (Visual Basic .NET, JavaScript, HTML, CSS, PHP, Perl) all in one day can be very confusing at times. I’ve been finding myself mixing up syntax quite a bit in the past few days. Yuck. For those wondering, Visual Basic is by far my least favorite.

Woke up this morning

Woke up this morning, went to my Enterprise Computing class (an amusingly basic programming class I was encouraged to take because it’s VisualBasic .NET), to do this silly problem where using a loop calculate how long it would take to pay for payment making wage per hour:

Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
        ‘ Declarations
        Dim payment, wage, totalWage, hours As Single
 
        ‘ Get input
        payment = Val(txtPayment.Text)
        wage = Val(txtWage.Text)
 
        ‘ Do the magic
        hours = 0
        totalWage = 0
        Do While (totalWage < payment)
            totalWage += wage
            hours += 1
        Loop
 
        ‘ Print the result
        lblResult.Text = hours
    End Sub

Yea, I feel really good. And yes, that’s supposed to be a loop. 😀 Well worth getting out of bed ;-). Got a good laugh out of coming to class to see that as the lab.