April 15, 2010

My Gas Company Rant

Here is what I just emailed to Dominion Gas Company...

A couple of months ago, I received a strange automated call from a source that claimed to be your gas company. I was sure that this call was a prank because the voice was saying some very harassing things to me that went something like this... "avoid a painful situation" and "contact us or we will have to turn off your gas". I thought the message was funny at first because I knew that I pay my bills on time. It must be a scam or something.

After thinking about it, I figured I should contact Dominion directly to inform them of what had happened. The lady on the phone was nice, but I was perplexed when she told me that the automated call had indeed been initiated by Dominion. She went on to say that they have been unable to contact me for some time and that this call was a sort of last resort before shutting off my gas because they needed to send someone out to read my meter. For the record Dominion made absolutely no effort to contact me no matter what the computer system says. To prove my point, Google "Brandon Joyce". You should see at least three results on the first page that give you my Cell Phone, Email, Mailing address, LinkedIn Account, Facebook Account, Twitter Handle, and my personal blog. The point is that I'm extremely easy to get in touch with. I have no reason to avoid having my meter checked, and you have no reason to harass me.

So, after somehow taking my thoughts away from how silly this situation was, I setup a time and date for a meter reading with the nice lady on the phone. I just gave her the earliest date that I could so I could put this behind me. (March 27th 8am w/ 4 hour window)

After all of this, the meter man doesn't show up. I don't know who to blame, but I know that somewhere along the way, there's some people in charge that weren't burdened with an over-abundance of schooling.

Please help me to settle this situation by having a meter man get his ass out here and look at the stupid meter, or just leave me the hell alone and take my money every month like a good monopoly.

February 5, 2010

String From Resource in .Net

I just wanted to post this snippet of code because it keeps coming in handy for me. Essentially, this simple function will return a string from any embedded resource in your assembly. So, for example, you may want to include an html or xml document in your project, and be able to read it into a string. Add the file to your project, set the build action to 'Embedded Resource' and use this function to read that file into a string that you can use anywhere you like. Have fun!

P.S. I like to use Reflector to make sure I have the resource name correct. Sometimes the namespaces are a little unexpected.


Imports System.IO

Imports System.Reflection

 

Public Class StringFromResource

    Public Shared Function GetString(ByVal resourceName As String) As String

        If resourceName.Length > 0 Then

            Dim stream As Stream = Assembly.GetAssembly(GetType(StringFromResource)).GetManifestResourceStream(resourceName)

            If Not stream Is Nothing Then

                Using resourceStreamReader As New StreamReader(stream, System.Text.Encoding.UTF8)

                    Return resourceStreamReader.ReadToEnd()

                End Using

            Else

                Return ""

            End If

        Else

            Return ""

        End If

    End Function

End Class

December 6, 2009

Next Year's Programming Language

I've bought into the "Learn a New Language Every Year" rule. So, this year I spent a lot of time digging into Ruby. Now, I'm starting to wonder what I should learn next year. I have a few ideas, but I'm wondering if anyone has suggestions. Here are the major languages that are out because I already know them...

C#
VB
Javascript
Ruby

So far, I'm considering two options...

1. Python - I know it's probably similar in a lot of ways to Ruby, but I would really like to try building an app on Google's app engine.

2. Any functional language - I don't have any pure functional languages on my resume yet unless you count SQL. I would go for F#, but I think I might learn more from diving into a more traditional functional language. I'm thinking maybe Haskell or Erlang.

So, I'm open to suggestions. Let me know!

October 19, 2009

Rails Passenger with Symlink in Document Root

This is an update to my post on setting up rails on a GoDaddy Virtual Dedicated CentOS server.

If you are using a symlink in your document root to direct Apache to your rails public directory, updating to Passenger 2.2.5 will stop your application from working. The fix is simple. Simply add this line in your Apache config...

PassengerResolveSymlinksInDocumentRoot on

It is documented here: PassengerResolveSymlinksInDocumentRoot

After updating this in my config the site works like a charm! Good Luck!

About Me

My Photo
Brandon Joyce
Canton, OH, United States
Phone: (330) 828-6373
View my complete profile