Friday, March 27, 2009

Home Sick But More Productive?

Why is it that when I stay home sick from work I tend to get more done than I do on weekends? It's not a mental health day. I'm legitimately sick. Stuffy nose, sore throat, super tired, etc. So far today I have:

Started a load of dishes
Addressed a bunch of cards I wrote during the week and meant to send out
--Walked those cards to the mailbox
Installed the charged battery into the motorcycle
--Once installed I tired to start it. No love.
--Found the cable I mistakenly unplugged while installing the battery and fixed it
--Started the motorcycle and let it run for 25 minutes
Fixed the sprinklers so it runs three times a week for 3 minutes a day. I like the number 3.
Checked in at work and responded to a few emails
Fixed the link from the family blog to this site.
Added some more links to this site to other sites I like

Ok, it's not much. But it feels like a lot.

Next I'm thinking of starting a family blog for my side of the family. The In Law site is cool. I'd like an Out Law site.

Thursday, March 26, 2009

Vocabulary Word: Schadenfreude

Schadenfreude is pleasure derived from the misfortunes of others. The word referring to this emotion has been borrowed from German by the English language and is sometimes also used as a loanword by other languages.

Philosopher and sociologist Theodor Adorno defined schadenfreude as “largely unanticipated delight in the suffering of another which is cognized as trivial and/or appropriate.”

From Wikipedia

Wednesday, March 25, 2009

Books Suggested To Me

This is my list of books recommended to me. I thought this might be a good place to store them:

1) The Shelter of Each Other - Mary Pipher
2) Taking Charge of Your Fertility - Toni Weschler
3) Called Out of Darkness - Anne Rice (Autobiography of her return to Catholicism)

PCHS

Their sponser message is given every morning at 7:10, after traffic. Today was a new one.

Pragmatic legal solutions that are fiscally responsible.

Monday, March 23, 2009

Odd Morning Conversations

Mr. Container is reading "Dummies Guide to Freemasons". It's actually pretty interesting. We were talking this morning about the Freemasons allowing Lords into the organization back in the day, like the 1700's, in England. There are only 3 levels, but some of them added more and more levels, like the conspiracy-tastic 33rd or 31st level. Something like that. We starting talking about how the Lords were probably not the ones to start this as they already had weird ceremonies and levels, like the 4th Duke of Burkinshire and Barron of Paddingtonbearvilleinshire. Too many Dukes, Barons, Marquesses, Earls and Viscounts. (Thank you Wikipedia for those titles.)

Mr. Container busts out with, "When you wear the crown of Aqualonia upon a troubled brow it might be nice to lay those troubles aside from time to time.... But I don't think Conan would ever join the Masons."

I love my Geek.

Sunday, March 22, 2009

Psalm 40:2 (New International Version)

2 He lifted me out of the slimy pit,
out of the mud and mire;
he set my feet on a rock
and gave me a firm place to stand.

Thursday, March 19, 2009

Homographic Homophonic Autantonyms

If you can't see it all, click on the picture. It should show the full image. Taken from: http://www.qwantz.com/





Monday, March 16, 2009

I wonder if this is true

The verb “cleave” is the only English word with two synonyms that are antonyms of each other: adhere and separate.

Found on the Gifted Typist

PCHS

Diversity and long-term team-oriented relationships from Punchopio today.

Sunday, March 15, 2009

Sunday Adventures

Today brought another adventure.

We drank coffee at the shop again. They're very busy on Sundays. We sat out front this time. It was nice, but just a bit cold.

I did more programming, learning loops for the first time. Exciting!

Yesterday I wanted to ride our motorcycle. It's been a while, I've been trying to get over the fear and back into the "I love it!" feeling. The bike won't start. Our neighbor and I agreed that it sounded like the battery. I looked up instructions online on how to jump start a bike. Turns out it's the same as jumping a car. If you're jumping from a car battery, you don't start the car. It will ruin the bike's ignition system because the car battery is more powerful.Today I got out our jumper cables, figure out how to expose the battery on the bike and hooked it up. No love. So I went down to Escondido Motorsports and bought a battery charger. I spent the next 30 minutes following the instructions in the manual on how to remove the battery. I think I've conquered a bit of my fear of electricity. Progress!

The battery is now charging in the "mud room"/laundry room.Every weekend I also try to do a little house work. Yesterday I figured out how to change the code on the garage door pad outside. It wasn't nearly as difficult as I thought. I just needed to find the make and model and Google it.

The internet is amazing. You can find anything from how to jump a motorcycle to how to change your garage door passcode.

Rock on Internet!

Saturday, March 14, 2009

I'm super proud of this

My most complex application so far. I'm proud of this. It's taken several revisions, many after I submitting it for grading... :)

This application calculates a grand total of sales based on the following:
A) User input of quantity sold of each of 3 software packages
B) Input is checked to verify positive number and not text and display the appropriate error message.
C) Each package has a different cost (3 costs)
D) Discounts taken based on quantity sold (5 discount levels)
E) Individual package sales and grand total sales is displayed
F) Check box option to only show the grand total
G) Buttons to clear the values and exit the application

Once I figure out loops this week, the program will probably shrink. In a few weeks I'll learn arrays which should shrink it even more.




Public Class frmSoftwareSalesv2

Private Sub btnCalculate_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs _
) Handles btnCalculate.Click

'Declare constants for discounts
Dim constLEVEL0_DISC_RATE As Decimal = 0D 'Qty 1-9 discount
Dim constLEVEL1_DISC_RATE As Decimal = 0.2D 'Qty 10-19 discount
Dim constLEVEL2_DISC_RATE As Decimal = 0.3D 'Qty 20-49 discount
Dim constLEVEL3_DISC_RATE As Decimal = 0.4D 'Qty 50-99 discount
Dim constLEVEL4_DISC_RATE As Decimal = 0.5D 'Qty +100 discount

'Declare discount ranges
Dim constRANGE_0_START As Integer = 0
Dim constRANGE_0_END As Integer = 9
Dim constRANGE_1_START As Integer = 10
Dim constRANGE_1_END As Integer = 19
Dim constRANGE_2_START As Integer = 20
Dim constRANGE_2_END As Integer = 49
Dim constRANGE_3_START As Integer = 50
Dim constRANGE_3_END As Integer = 99
Dim constRANGE_4_START As Integer = 100

'Declare constants for error messages
Dim constERROR_WHOLE_NUMBER_A As String = "Quantity of Package A Sold must be a whole number"
Dim constERROR_WHOLE_NUMBER_B As String = "Quantity of Package B Sold must be a whole number"
Dim constERROR_WHOLE_NUMBER_C As String = "Quantity of Package C Sold must be a whole number"

Dim contERROR_NEGATIVE_NUMBER As String = "Negative numbers are not allowed."

'Declare constants for total text
Dim constLABEL1 As String = "Package A: "
Dim constLABEL2 As String = "Package B: "
Dim constLABEL3 As String = "Package C: "
Dim constLABEL4 As String = "Grand Total: "

'Declare constants for retail cost
Dim constRETAIL_COST_PKG_A As Decimal = 99D 'Cost of Pkg A
Dim constRETAIL_COST_PKG_B As Decimal = 199D 'Cost of Pkg B
Dim constRETAIL_COST_PKG_C As Decimal = 299D 'Cost of Pkg C

'Declare Variables
Dim intASold As Integer 'Qty A packages sold
Dim intAGrossSales As Decimal 'Pkg A gross sales
Dim intADiscount As Decimal 'Pkg A discount
Dim intANetSales As Decimal 'Pkg A gross less discount

Dim intBSold As Integer 'Qty B packages sold
Dim intBGrossSales As Decimal 'Pkg B gross sales
Dim intBDiscount As Decimal 'Pkg B discount
Dim intBNetSales As Decimal 'Pkg B gross less discount

Dim intCSold As Integer 'Qty C packages sold
Dim intCGrossSales As Decimal 'Pkg C gross sales
Dim intCDiscount As Decimal 'Pkg C discount
Dim intCNetSales As Decimal 'Pkg C gross less discount

Dim intGrandTotal As Decimal 'Grand Total


'Check Package A Sold for integer
Try
intASold = CInt(Me.txtQtyASold.Text)
Catch ex As Exception
MessageBox.Show(constERROR_WHOLE_NUMBER_A, _
Me.Text)

With Me.txtQtyASold
.SelectAll()
.Focus()
End With

Exit Sub
End Try

'Check Package A Sold for negative numbers
If intASold < intbsold =" CInt(Me.txtQtyBSold.Text)" intcsold =" CInt(Me.txtQtyCSold.Text)" intagrosssales =" intASold" intbgrosssales =" intBSold" intcgrosssales =" intCSold" intadiscount =" intAGrossSales" intadiscount =" intAGrossSales" intadiscount =" intAGrossSales" intadiscount =" intAGrossSales">= constRANGE_4_START
intADiscount = intAGrossSales * constLEVEL4_DISC_RATE
End Select

'Find discount for Package B
Select Case intBSold
Case constRANGE_0_START To constRANGE_0_END
intBDiscount = intBGrossSales * constLEVEL0_DISC_RATE
Case constRANGE_1_START To constRANGE_1_END
intBDiscount = intBGrossSales * constLEVEL1_DISC_RATE
Case constRANGE_2_START To constRANGE_2_END
intBDiscount = intBGrossSales * constLEVEL2_DISC_RATE
Case constRANGE_3_START To constRANGE_3_END
intBDiscount = intBGrossSales * constLEVEL3_DISC_RATE
Case Is >= constRANGE_4_START
intBDiscount = intBGrossSales * constLEVEL4_DISC_RATE
End Select

'Find discount for Package C
Select Case intCSold
Case constRANGE_0_START To constRANGE_0_END
intCDiscount = intCGrossSales * constLEVEL0_DISC_RATE
Case constRANGE_1_START To constRANGE_1_END
intCDiscount = intCGrossSales * constLEVEL1_DISC_RATE
Case constRANGE_2_START To constRANGE_2_END
intCDiscount = intCGrossSales * constLEVEL2_DISC_RATE
Case constRANGE_3_START To constRANGE_3_END
intCDiscount = intCGrossSales * constLEVEL3_DISC_RATE
Case Is >= constRANGE_4_START
intCDiscount = intCGrossSales * constLEVEL4_DISC_RATE
End Select

'Calculate Net Sales
intANetSales = intAGrossSales - intADiscount
intBNetSales = intBGrossSales - intBDiscount
intCNetSales = intCGrossSales - intCDiscount

'Calculate the Grand Total
intGrandTotal = intANetSales + intBNetSales + intCNetSales

'Display the Results
If chkGrandOnly.Checked = True Then
lblSalesResults.Text = constLABEL4 _
& intGrandTotal.ToString("c")

ElseIf chkGrandOnly.Checked = False Then
lblSalesResults.Text = constLABEL1 & intANetSales.ToString("c") _
& ControlChars.NewLine _
& constLABEL2 & intBNetSales.ToString("c") _
& ControlChars.NewLine _
& constLABEL3 & intCNetSales.ToString("c") _
& ControlChars.NewLine _
& constLABEL4 & intGrandTotal.ToString("c")

End If

End Sub

Private Sub btnClear_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs _
) Handles btnClear.Click

'Clear the form, reset the check box, set focus to Package A.
txtQtyASold.Clear()
txtQtyBSold.Clear()
txtQtyCSold.Clear()
lblSalesResults.Text = String.Empty
chkGrandOnly.Checked = False
txtQtyASold.Focus()

End Sub

Private Sub btnExit_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs _
) Handles btnExit.Click

'Exit the application by closing the form.
Me.Close()

End Sub

End Class

One of my favorite comics

Weekend Adventure

This weekend we're trying something new. Since moving to Escondido we've switched coffee joints. We'll sometimes go to our old drive through coffee joint in Rancho Bernardo, but more often we'll make our own or we'll go to Safari Coffee. Today we're camped out by the window playing on the internet and I'm working a bit on my programming homework. They recognize us here. We're trying this "social" thing. It's interesting.

Being social has never been a strong point for us. If we have kids, I don't want them to inherit this tendency from us, so I want to break the habit now. We'll see how it goes.

Maybe working on the computer sends the wrong signal, but "Progress Not Perfection."

Friday, March 13, 2009

Thursday's PCHS

I missed today's ad, but yesterday is was a repeat of their Economic Cycles pitch at 07:10am.

Wednesday, March 11, 2009

Today's Procopio Specialty

Mr. Container caught today's specialty and sent it to me:

Today's Procopio specialty:

- being around since 1945
- fostering long-standing relationships with their clients through a team-based approac

Monday, March 9, 2009

What Procopio Believes In

According to today's commercial, Procopio believes that a diverse workforce at all levels leads to more innovation.

Friday, March 6, 2009

What did they learn this week?

A regular sponsor of our local NPR/public radio station is the law firm of Procopio, Cory, Hargreaves & Savitch (http://procopio.com). I think it's wonderful that they still sponser the station. Their sponser "commercial" changes regularly, unlike the one fo the Bill & Melinda Gates Foundation, or other sponsers. It almost seems that the lawyers at this San Diego firm go out and study something new each week. "Now we can say we specialize in this!" Everything from real estate law to intellectual property issues, and more. I've been meaning to track it. So now I will.

What did they learn this week?

They now can "guide through economic cycles".