How I Created my own Twitter App with Visual Basic

Over the past few weeks, I have spent countless hours programming (and testing and reprogramming and testing and reprogramming, etc.) a Twitter app I created in Visual Basic.  It was the most fun project I could think of for a Visual Basic class I’m taking at UNLV.  In the end, the programming wasn’t so difficult.  It just took me a long time to find something that worked.  After many Google searches, I couldn’t find a straight-forward walkthrough, so hopefully this blog post will be helpful to some lost soul out there (maybe for another school project).  Below is a screen shot of my app.

Twitter App Created with Visual Basic

The only action my form does with Twitter is post an update when the “to Twitter” checkbox is checked.  The other buttons read, write, edit and delete tweets in a Microsoft Access database. First, I created the form above, including the labels, text boxes, and buttons.  I won’t go into the code behind each one of them, but the code for the label with the number of characters remaining was particularly fun to write.  I made its actions similar to what is on Twitter’s webpage.  When the number of characters in the status text box (rtbStatus) goes over 140, the text turns red and the “tweet” button is disabled.  The code is:

Private Sub rtbStatus_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtbStatus.TextChanged lblTweetLength.Text = 140 – rtbStatus.TextLength If lblTweetLength.Text < 0 Then lblTweetLength.ForeColor = Color.Red End If If rtbStatus.TextLength = 0 Or rtbStatus.TextLength > 140 Then btnTweetToDatabase.Enabled = False Else btnTweetToDatabase.Enabled = True End If End Sub

Next, I went to the Twitter Developers webpage and registered my application (funny, I never thought I’d be a Twitter developer).  After filling out a form describing my app, I received a consumer key, consumer secret, access token, and access token secret.  These are needed to authorize your application to access your Twitter account. Then, I went to the TwitterVB webpage, which is an open source project with a .NET library that allows desktop and web applications to communicate with Twitter.  I downloaded the TwitterVB zip file.  The zip file contains many different files, but the only one I used was TwitterVB.dll.  In Visual Basic, I added the dll file as a reference. I included the namespace in my code file with the following:

Imports TwitterVB2

I then added the following code that I found from the TwitterVB webpage to the code that executes when the “tweet” button is clicked and the “to Twitter” checkbox is checked.  I replaced the consumer key, consumer secret, access token, and access token secret in the code with what I had received from the Twitter Developers webpage when I registered my application.

Dim TextToTweet As String TextToTweet=rtbStatus.Text Dim tw As New TwitterVB2.TwitterAPI tw.AuthenticateWith(“consumerkey”,“consumersecret”,“oauthtoken”,“tokensecret”) tw.Update(TextToTweet)

Then, I tested my app.

Testing my Twitter App

After I clicked the “tweet” button, I opened my Twitter timeline in my web browser and saw that my tweet successfully posted to Twitter!  It even shows that it posted via DustinVB, which is what I named my app when I registered it with Twitter.

My Test Tweet in a Web Browser

After I turn this project in to be graded, it will collect dust in my virtual bookshelf.  I don’t plan to use it again.  There are so many good Twitter programs out there that can do so much more than mine can. Still, I feel happy that I figured it out and can now call myself a Twitter developer (even though I’m a novice, at best).

Tweets on the Big Screen at the Growth and Profitability Summit

A few months ago in a blog post, I tried to answer the question, “why would a CPA want to use Twitter?” After attending Accounting Today’s Growth & Profitability Summit, I have another reason for a CPA to use Twitter.  Twitter is awesome at conferences! By adding the hashtag #GroPro (short for Growth & Profitability) to my tweets, I shared useful quotes with others at the conference.  I also added a column to my Tweetdeck Droid app using a search for #GroPro and was able to follow what other people were tweeting at the conference. In a conference setting, Twitter provides opportunities to share useful information and connect with others.  I was able to meet several people (in person) that I had followed on Twitter during the conference.  Twitter just breaks the ice.  I wasn’t disappointed – all of the people I met were just as cool as their tweets! Tweets with the hashtag #GroPro were displayed on a big TV screen in the hall just outside of the conference rooms.  I took a short video of it that you can see below.  It even includes one of my tweets (I’m blushing)!  You can recreate the tweets and visual effects on your computer by going to http://visibletweets.com/.

Highlights from the Zappos Office Tour

Throughout my life, I’ve had opportunities to tour the headquarters of several large companies, but what I experienced today at Zappos was very unique. First, I have to thank Jody Padar and Jason Blumer, two awesome CPAs, for setting up the tour for me and 30-or-so other CPAs and accountants interested in learning about the Zappos culture. Zappos has established ten core values from which it develops its culture.  The third core value, create fun and a little wierdness, revealed itself immediately as we begain walking around the office.  The Zappos culture promotes individual creativity and self-expression, as evidenced by cubicles that were better decorated than any I had ever seen and a stairway where employees have written on the walls!   The picture to the right shows the “blogging bus” built around a set of cubicles which provides inspiration to the blogging team (and since I sometimes need inspiration, maybe I should try that)! At the end of the tour, Zappos gave us a “culture book” which contains, for the most part, the thoughts and feelings of Zappos’ employees.  The book provides evidence of the employees’ high morale and happiness they find in working for the company.  Some even wrote that they go to work smiling every day, and from what I observed in our tour today, I believe it.

Ten Things I Learned from WordCamp Las Vegas 2010

Last Saturday, I attended WordCamp Las Vegas.  WordCamp is a conference that focuses on the popular blogging platform WordPress, which I used to create this blog.  Most of those who attended were full-time web designers and programmers.  I was probably most likely definitely the only accountant there.  I admit that some of the material presented in the conference was a little over my head, especially when they got into PHP code.  My PHP coding skills are a level or two above copy and paste. 
John Lynn speaking at WordCamp.

John Lynn speaking at WordCamp.

Still, I thoroughly enjoyed WordCamp and learned tons of new things (well, ten things at least). 
  1. Passion and motivation are the keys to blogging, according to my friend and client John Lynn.  If anyone has that passion and motivation, it’s him, having written about 6,000 blog posts in the past 5 years.  This year, John quit his full-time job and earns enough advertising revenue from his blogs to support his family.  John’s most recent entrepreneurial project is a website to help raise money for sports teams and non-profit organizations.  You can see John’s PowerPoint presentation on his website to learn about how he became a full-time blogger.  Check out the plug he gave me on slide 8 (thanks, John).
  2. WordCamp brings in a tech-savvy crowd.  It seemed like everyone had a laptop, iPad and iPhone.  It was a good thing I bought a Droid X last month because it helped me to blend in a little bit.
  3. Creating a good podcast is a lot more difficult than having a microphone and recording an MP3 file.  Scott Whitney from Podworx gave an entertaining and enlightening presentation showing how they incorporate music and eliminate the uh’s and um’s when recording podcasts.
  4. The M&M peanut butter brownies at the Palace Station buffet were pretty tasty!
  5. I didn’t take any notes on paper.  I used Twitter to jot down great quotes and to have a record of stuff I want to look into later.  On top of that, I shared those tweets using the hashtag #wclv with the rest of the attendees, and one of them expressed her appreciation for it!
  6. Twitter provided me with opportunities to meet people in person that I had read tweets from during the conference (i.e. “hey, you’re @techguy”)!  Did I mention I need to change my cryptic Twitter name?  Nobody came to me and said, “hey @whe97007!”
  7. For security reasons, don’t use the default username “admin” to log into your WordPress admin page.  FYI hackers, my new username is “Dustin.”
  8. I need to try out WordPress’ photo editor instead of using Photoshop every time to touch up photos.  It can do more than I previously thought.
  9. WordPress is a very powerful blogging platform and the possibilities of what you can do with it are almost endless.  A couple of the conference sessions were mind-boggling.
  10. I’m planning to come back again next year.

Learning on the Go with Podcasts

Podcast or podcasting icon
Image via Wikipedia
Suppose you spend an hour commuting every day over 250 working days in a year.  If all you listen to in the car is music, what do you have to show for it after the year is over? One of my friends asked me that question many years ago when I was considering taking a job that would require a daily commute that was longer than I was used to.  I had always thought that a long commute was a bad thing because it wastes a lot of time and money spent on gas.  My friend had a different perspective.  He told me that he enjoyed every minute of his long commute because he listened to books on tape, mostly on self-improvement and religious topics. To make a long story short, I decided not to take that job but his advice had been firmly ingrained in my mind.  I began filling my MP3 player with whatever free podcasts I could find on the Internet and listened to them in the car. I regularly listen to the podcasts in the list below for the latest information relevant to my profession:
  1. CPA Technology Advisor Intersection Live Podcasts.  My favorite podcast series covers the intersection of technology and public accounting.
  2. CPA Spotlight by the Maryland Association of CPAs.
  3. Stratford University Tech Talk Radio. I discovered this in a Google search a couple of years ago and have been listening ever since for technology news and computer care tips.
  4. Feed the Pig Podcasts. In these podcasts, frequently asked questions about personal finance are answered by CPAs.
  5. Tax Policy Podcast by the Tax Foundation.  This podcast series discusses all types of taxes (including income, sales and property taxes) at the federal, state and local levels.
Twitter follower Chris Farmand suggested that I try out Google Listen, an Android app for streaming podcasts.  I installed it and found very few podcasts when I searched for CPA, accounting, QuickBooks and tax.  There may be opportunities for CPAs who are interested in becoming podcasters. Just to change things up once in a while, I also listen to podcasts about other topics such as health, history, politics and science.  I try to avoid the burnout of information overload, so I don’t always listen to podcasts.  Sometimes, after long days at work, music helps me wind down more than anything else. Listening to more podcasts and less music in my commute has been beneficial for me, so I highly recommend it (unless that podcast about Code Section 199 makes you a drowsy driver). I’m always looking for new podcasts, so if you have any to share with me, please leave a comment.
Enhanced by Zemanta

Cash Counting Program I Created with Visual Basic

Twenty, forty, sixty, eighty, one hundred, twenty, forty, sixty, eighty, two hundred, twenty, forty, sixty, eighty … aarrgh!  Where was I? In my previous post, I blogged about all the fun I am having in a Visual Basic class that I am taking at UNLV.  My most recent project is a simple cash and coin counting program.  I will use it for a position I hold in an organization in which I help count cash.  Hopefully, this program will ease the occasional pain and frustration I feel when counting stacks of twenty dollar bills. The user enters the amount of each type of coin and currency.  The program performs the calculations for each type and returns the total amount of coin and currency as seen in the screen shot below. Cash Counting Program
Enhanced by Zemanta

Tax Estimate Calculator Created with Visual Basic – Just for Fun

This fall, I am taking a Visual Basic class at UNLV as one of the electives for my Masters Degree in Accounting.  Projects for the class require application of the concepts learned, but allow for creativity because each student can create whatever design or function for the program he or she desires. My latest project in this class is a form that estimates an amount of tax based on income, itemized deductions and dependents.  It then returns a message to the user in a text box explaining how much tax, if any, is owed.  I know the tax code is much more complicated, but for this project, I used a flat 35% tax rate and $3,000 exemption per dependent.  The project required simple calculations, using IF statements, and returning a message to the user, so there was no need to go into unnecessary detail. The first step I took was to create the form, text boxes, and button to run the code.  I then wrote the code so that when the “estimate my tax” button is clicked, it calculates the tax, enters the amounts in the text boxes, and returns a message as shown below: The code to generate the generate the message in the text box is:
If Tax > 0 Then Message = Name & “, get out your checkbook.  You owe “ & Tax & “.  “ Else Message = Name & “, you don’t owe any tax.  “ End If
The project works, but it’s a little boring, isn’t it?  I decided to have a little bit of fun with the project by adding an additional IF statement:
If Income > 250000 Then Message = Message & “Wow!  You’re making more than $250,000.  You’d better hope Congress extends all of the Bush tax cuts!  “ End If
When the amount of income entered is greater than $250,000, the message becomes: I added another IF statement for the number of dependents:
If Dependents > 10 Then Message = Message & “By the way, you’re not counting your pets as dependents … are you?” End If
When the number of dependents is more than ten, the message becomes: This isn’t a useful program since the tax calculation is inaccurate, but I demonstrated the ability to use IF statements and gave my professor a few laughs while he was grading it (hopefully the laughs were worth a few points)!
Enhanced by Zemanta

A Refund from my Overfunded Escrow Account

Assorted international currency notes.
Image via Wikipedia
As I wrote in an earlier post, I use QuickBooks to organize my household finances.  Like every good accountant, I am detail oriented and keep meticulous records.  I keep every receipt, reconcile each of my accounts monthly, and split the expense categorization of grocery bills between food, cleaning and baby products (OK, just kidding on the last one). One transaction that I do split out every month is my mortgage payment.  My mortgage payments are made up of three parts: loan principal, interest, and escrow.  In case you don’t know what an escrow account is, it’s a cash account that the lender holds and maintains to pay property taxes and hazard insurance. To keep track of my escrow account balance, I created an account in QuickBooks for it under other current assets.  When taxes and insurance payments are made by the bank, I enter those in QuickBooks as expenses out of the escrow account.  I frequently tie out my escrow account balance in QuickBooks to the loan statements. Lenders usually do an escrow analysis every year to adjust the amount of the escrow payment so the balance in the account is sufficient to cover the expenses.  Usually, the amount of the mortgage payment goes up as tax and insurance rates increase.  However, in my case, I significantly decreased my insurance payments (a good subject for another blog post) and my property tax payments have also decreased due to the crash of the Las Vegas real estate market. Recently, I noticed that my escrow account had a large balance despite barely having made payments for taxes and insurance.  I sent the following e-mail to the bank:
I think our escrow account is overfunded. I’d like to request an analysis and receive a refund of any overfunded amount.
The next morning, I was delighted to receive the following e-mail from the bank:
Per your request, we have analyzed your escrow account based on the current escrow balance. Your new mortgage payment is $X effective September 01, 2010. Also, an overage amount of $X has been mailed to your mailing address.
Sometimes having organized financial records pays off.  I’ve got the check to prove it.
Enhanced by Zemanta

My LinkedIn Connection Dilemma

This is icon for social networking website. Th...

Image via Wikipedia

I have a little debate going on in my head about who should be included in my LinkedIn network. LinkedIn seems to suggest that connections should represent a “real-world” network and be limited to trusted friends and colleagues.  I have discovered, though, that some people are looking to connect to everybody.  Some even go so far as to have LION (LinkedIn Open Networker) or “I accept all invites” in their headlines. I have received several invitations to connect from people I don’t know with the standard message ,”I’d like to add you to my professional network on LinkedIn.”  I haven’t accepted them.  Are these people really interested in connecting with me?  If they are, why don’t they call me to introduce themselves, invite me out to lunch, or at least send me a personalized message? I think that most LIONs are just seeking as many connections as possible without the intent of getting to know them.  What is their motivation?  I can think of a few advantages of being an open networker:
  • On the surface, they appear to be really popular – most have 500+ connections.
  • Their news feed (status updates, blog posts, etc.) is broadcast to a large number of people.
  • They are more likely to rank higher in search results as a 1st, 2nd, or 3rd level connection.
Those advantages may sound great, but are they really beneficial?  I doubt it.  Their LinkedIn networks are made up of a bunch of useless connections. I am not an open networker on LinkedIn, but  I am open to networking and meeting new people.  I just don’t think that extending an invitation to connect on LinkedIn should be the first step in the process. Then again, sometimes I wonder if I am missing out on potential business opportunities by not connecting to everyone on LinkedIn.  The little devil on my left shoulder makes a tempting argument, but I’m siding with the little angel on my right shoulder.
Enhanced by Zemanta

My Plot to Take Over Google Searches for my Name

Many villains in TV shows and movies have evil plans to take over the world.  I have a much more attainable goal: take over the first page of Google when my name is searched for! *insert maniacal laughter here*

Google me!

I thought it would be a good idea to “take over” Google when I read this blog post in the Harvard Business Review: Forget the business card – just Google me.  I love the business card in that blog post (which just shows a Google search box with the person’s name). A side benefit of this blog – although I didn’t create it solely for this purpose – is people being able to find me through my blog when searching for me on the Internet.  I recently Googled my name and found my blog in the first position among the search results (see below).  I used a few simple search engine optomization strategies to accomplish this.  My domain name includes my first and last name, my name is in the title tag of the blog, and the “about me” page is written in third person (even though it would have been more natural to write it in first person).

Google Results for Dustin Wheeler

Another strategy I recently began to implement is commenting on other people’s blogs.  The main reason why I comment on blogs is to add value to them, but search engine optimization is a side benefit.  The Google indexing robot finds my name and a link to my blog in each comment. Now that I have a presence for my name in Google searches, I can finally think about getting one of those fancy Google business cards … and ponder another devious plan.