Tuesday, June 15, 2010

Domain Specific Short URLs

This is an expansion of what I initially posted as a comment on Ed Bott's blog post Be careful what you click! The perils of URL shorteners.

I think we’ll start seeing moderately longer urls that actually give some info about what they are linking to.

The next trend is towards sites using their own domain specific short urls.

When my mother-in-law forwards me news stories from USA Today, the links are in the form http://usat.me?38738442 (If I was USA Today, I would make that even shorter by using letters.)

As Ed points out, ZDNet does have their own short doman name -- zd.net. YouTube has youtu.be, but I haven’t seen anyone actually use it. These new domain specific short urls are fighting an uphill battle because they depend on the person sharing the link to know about them and use them. General url shortening services like bit.ly or is.gd are easier to use because they work for any link.

I created a url shortening system that only works for Bible references at dbible.com. Instead of a randomly generated url, you can see the scripture reference in the link (as in dbible.com/Jn3:16). So even if someone doesn't click the link, they'll know the verse (or verses or chapter) that you're referring to. The other benefit of this system is that you don't need to visit dbible.com or use an API to compose these short urls. Just append the reference to "dbible.com/" and post your link.

Sunday, May 23, 2010

Why I do what I do

I've wanted to write about this for a while, but this tweet and the responses convinced me that I should do it now.



I first taught myself how to write BASIC on a Texas Instruments TI 99/4A when I was in 5th grade. All I wanted to do was make video games. (Gaming is the gateway drug to programming for many young people, but that’s a different story.) I had always liked making things and even had a box of junk that I called my "Invention Box."

During junior high and high school I was sure I was supposed to be a missionary and travel to other countries to preach the Gospel. The only other computer programming experience I got in those years was a high school class on the Apple IIe. Everyone who had ever taken that class got an A and we played video games 90% of the time.

During my freshman year of college, as a missions major, some friends talked me into joining Amway. Now Amway (later renamed Quixtar, and now back to Amway) is a great company and I learned a lot in my 12 years as a Distributor (currently called an Independent Business Owner), but I never made any money. I truly believed that the business would work for anyone who followed the 7 (later 8, then 9) CORE steps. I spent a lot of money attending seminars and conferences and buying tapes and CDs hoping to get motivated to go "show the plan". The results that were promised sounded great: Ten to fifteen hours a week of work to make millions of dollars a year and retire on a beach within 5 years! Freedom! So, after 2 years of college, I dropped out. Who needs a degree when you’re going to be a millionaire in a few years, right? However, the problem was that it was a distraction. It was me trying to be something that I'm not.

A year later, I decided to go back to school because a friend of mine raved about how much fun he was having. I picked Computer Science as a major thinking back to my experience in fifth grade, but had no intention of making programming a career. It was during those classes that I realized that I had a special ability for writing code. I loved the mainframe assembly language class, but everyone else really struggled with it. This was something that I was really good at!

Obviously, I didn't have to listen to any motivational talks to write code. I actually enjoyed it so much that I spent one holiday weekend learning QuickBASIC just for the fun of it and came up with a program that moved various colored squares around the screen bouncing off each other. I stayed up late (or even all night) writing code! My childhood "Invention Box" had morphed into a PC. This is what I was born to do!

Unfortunately I spent the next 10 years treating programming as something that I was just doing temporarily until my millions came in. I was a good programmer and people paid me well for my skills. As for being a Distributor, I wasn't good at it and I wasn't making any money. The choice finally became clear: If I was ever going to make millions, I had a much better shot as a software developer than I did anywhere else!

Part of the turning point for me was getting married. I had to get practical and focus on the thing that was making money and was getting results instead of continuing to strive for something that wasn't working.

So now that I was finally ready to make a career of computer programming I decided to become the best programmer I could be. I joined a user group, started listening to podcasts and am now speaking at user groups and code camps.

I like who I am now. I'm not constantly beating myself up for not prospecting random people I meet. I enjoy meeting people for who they are instead of analyzing why they'd want to join my business.

I don't think it's a random coincidence that I was born at this time and have these skills. I can now clearly see that this is what God created me to do and I can't imagine doing anything else. I often wonder what I would have done if I had been born back in the 19th century, and to be honest, I really have no idea.

We get our English word "talent" meaning "gift or skill" from the story Jesus told about a man that left some money with 3 of his servants. A "talent" was a Roman unit of mass used as a monetary value similar to the way "pound" is used in the UK. The moral of the story is that if you take what you are given and invest it and make it grow you will be rewarded, but if you bury it in the back yard you will be punished. My focus now is to invest the programming talent I was given and make it grow and produce as much as I can.

It's not hard to know what one is supposed to do in life. Just take a look at what you're good at and how that can be used to improve people's lives. Invest what you've been given and become the best at it you can be. My rabbi, Daniel Lapin, says that profit is God's way of rewarding you for taking care of His other children.

Sunday, May 16, 2010

Tuesday, November 3, 2009

Inland Empire .NET User Group

Three months ago I moved from Temecula, California to Wylie, Texas, which is in the Dallas area. I took some time recently to write down my thoughts reflecting on my time as a member of the Inland Empire .NET User Group.

Joining the Inland Empire .NET User Group was probably the best career decision I've ever made. The exposure I got each month to new techniques and technologies pushed me ahead by leaps and bounds. I remember several times heading up to a meeting (it was about an hour drive) thinking that I probably wouldn't have much use for what was being discussed that evening. Then after being inspired at the meeting, I would drive home thinking of all the ways that I could benefit from what I just learned.

Stephen Rose's talk about virtualization is probably the best example of that. I had just rebuilt my machine and that afternoon had carried another machine up to my desk with the intention of installing some software that I didn't want on my main development machine. Now I do 100% of my development on virtual machines. Using base images with Office and Visual Studio installed means I very rarely need to re-install those tools and I haven't installed (or reinstalled) XP or Vista on a new machine in months! I just grab the virtual machine that is closest to what I need next and copy and paste it to a new vm.

The other talk that was very inspiring was Matt Penner's discussion of keeping the passion in what you do. After that talk I asked him what podcasts he listens to and then I subscribed to Hanselminutes and .NET Rocks! Between those podcasts (and a few more that I've added since then) and the user group meetings I can almost feel my brain expanding!

The first meeting I attended was the Most Valuable Member (MVM) award event for 2007-2008. I love the challenge of a competition, so I decided that night that I would go for it. Getting the MVM points was a huge motivator that prompted me to get on the calendar and give a talk myself. Presenting to the group was very fun and I got a ton of great feedback from members of the group. After that I gave basically the same talk at the SoCal CodeCamp in San Diego, but refined it a bit. One of the user group members (I've forgotten his name) was at my CodeCamp talk and told me that I made good improvements on it. I think every user group should do a MVM award program!

The last meeting I attended before moving to Texas was the MVM award event for 2008-2009 where I was recognized as the 2nd Runner Up winner! I was blown away by how much stuff was part of the prize package. I still haven’t installed all the software I won and haven’t even ordered all the free books of my choice from the 3 different publishers!

I am very thankful for all the hard work James Johnson does in putting together and coordinating the user group. It has had a huge impact on me as a developer and was a great way to gain exposure to the larger developer community.

I have attended a few other user groups and none of them even come close to the quantity and quality of the sponsor provided giveaways each month -- let alone the MVM prizes! I know that is due to James' diligence in contacting those sponsors and telling them what a great group of developers there is in the Inland Empire.

I miss the friends I made there and I hope that the next time I'm in Southern California it can be around the 2nd Tuesday of the month so I can go back and visit the group.

Thursday, August 20, 2009

Twitter URL shortening by convention

To date all the fuss over the various URL shortening services has been about how to get the shortest URL after "http://", but what about shortening that part? We could apply some convention over configuration and declare that a single / was sufficient to decorate a link in a tweet. This would work exactly the same way that # for hash tag links and @ for username links work currently. Instead of http://bit.ly/xxxx or http://tinyurl.com/xxxx, lets just all start using /bit.ly/xxxx and /tinyurl.com/xxxx!

Once a few of the major Twitter apps start recognizing this convention, it will really work great!

Wednesday, March 11, 2009

Bug in VB.NET LINQ to XML

Here is the simple code to reproduce the bug I found in VB.NET LINQ to XML using Visual Studio 2008.


Public Class Class1

Private MyValue As String
Public Property SomeXMLValue() As String
Get
Return <test>
<child><%= MyValue %></child>
</test>.ToString
End Get
Set(ByVal value As String)
Dim ValueXElem = XElement.Parse(value)
Dim XQuery = From child In ValueXElem...<child> _
Select child.Value

' Code that uses XQuery here

End Set
End Property

End Class


I'm expecting the type of XQuery to be inferred as IEnumerable(Of String)
The Value property of child on line 13 has a blue squiggly and the compiler gives the following error:
Range variable 'Value' hides a variable in an enclosing block or a range variable previously defined in the query expression.
In order to get this to compile I must rename the variable on line 10 to something other than 'value'.

Update 3/17: The Visual Studio Team updated my bug report as Resolved (By Design). They suggested changing line 13 to "Select someOtherName = child.Value". Has to do with the "range variable" named Value, which is created by the query. Apparently there are a few bits of the internals of LINQ queries that I don't really get yet. I think this falls into the category of things I can still use even thought I don't fully understand how they work behind the scenes.

Monday, January 26, 2009

I write code

Several years ago I had a t-shirt with this text:

I am a programor
I am a programmor
I'm a progamer
I write code

To this day I have to look up the proper spelling of the word programmer. Now I see that dictionary.com says that programer is an acceptable spelling. I wonder if that's from all of us who couldn't remember to spell it with 2 m's.