Programming

Random FB Msg leads to Profit!!!

So the other day I received a random Facebook message from someone asking about one of my Facebook applications. I made two applications back when applications for FB was still new. There was a competition, the applications had to use PayPal somehow. Well I made an application that was called BirthdayWishes. It’s basically just a box that goes onto your profile and when people visit your profile they can click a button and send you money via PayPal for your birthday. Very simple. We have moved WebHosts a few times since then and my application did not even work anymore(the link to the code was wrong).

Well he wanted the URL and not the code for BirthdayWishes thankfully. I was freaking out thinking OMG I told Kecia awhile back when switching webhosts that I no longer wanted the code. I was expecting to have to recode it throughout the week for the guy. But like I said luckily be just wanted the URL. Apparently with me getting into it from the beginning I got a very to the point URL that he really wanted. So this was kinda like having a real sought after web address, just for FB applications.

He sent me the money via PayPal, I transferred the application to him and he took me off as a developer. So now It’s a done deal. With the money I have bought a Droid, plan to pay off a credit card, save some and use some for me and Kecia’s dating anniversary. It’s our 5 year being together anniversary so we are wanting to do something good.

Chat Program almost finished

I have worked on this program in my spare time at work and finally got it finished except for some testing and fixing. I have not had alot of spare time at work in awhile so It’s taken longer than I had hoped to get this far. Since the last post about this program I have fixed the formatting in the text boxes, not the colons line up. I also fixed the issue with the list of users. If Client 1(eric) logged on it would show Eric in the UserList. When Homer logged on Eric’s client window would have Homer added to his userList, but Homer would only see himself. I was only sending out the username of the last user that logged in. The newest user needed a list of all users logged in. So I created an ArrayList on the server to keep track of the users. I send the users to the newest client in a comma delimited string made by looping though the arrayList. The Client then takes that string and puts it into the userList, sorted alphabetically of course.

Here’s a pic of the program. You can click on these pics to see larger images where you can actually read the words.

Server:

Client 1:

Client 2:

And here’s what the login screen looks like, It has not changed since the beginning

The first issue I found with my program is that the same use can login twice, so I will be check the username against the ArrayList of users on the server during the authentication process. Probably will be doing that after it validates the password for speed purposes.

Work, working out and coding

Today I got some work to do at work, I had to query the database to find out how many feet of fiber optic cable have been placed in certain cities. I also have to find out how many feet of fiber to the home cable has been placed up until Jan 2007.  Then I have this engineer call me while I’m working on those reports to tell me that my website is not working right. He says that the total feet of air core cable in Nebraska is wrong and wants to know how my website came up with that number. Lets see I have a database with exact footage of cable and you says its wrong because to you it seems wrong. That’s something else I will have to look into tomorrow.

As far as weight loss and working out, I have decided not to workout tonight, it’s way too cold out there and I don’t want to get sick. The lake has had ice chunks floating in it for the last few days and I think it’s been around 16 degrees in the mornings and maybe gets up to 34 during the day. Once the treadmill is fixed I can workout in the warmth of my home so that’s a plus. I currently weigh around 206lbs at 6′ tall which I guess is not too bad, but when I was in high school I weighed around 190lbs and was pretty fit so my goal is to get a little smaller than 190 since I assume I have lost some muscle mass since high school.  To get down to that size in high school I ran a mile in football practice and then lifted weights for 2 hours everyday. My diet consisted of a doughnut or Burger King for breakfast, school lunch, then skittles, snickers, and cokes for snacks as well as McDonalds for dinner.  Only if I could eat that kinda stuff now and still look like I did back then.

And sometime this week I hope to work on my Java program again. I make programs and use them as examples on how to make other programs so I am now making a chat program. I chose to make a chat program because it has the elements of writing and reading from a file, sending data across a network, GUI programming, multi-threading and using Array Lists. The server is command line(no graphics) and the client has a regular looking GUI like you’d expect on any chat program except it does not show a list of online users right now. You could send messages and login just fine with the program so I made a separate program to figure out how to do the login screen without disturbing the main program. Figured out the login screen copy and pasted the code into my chat program and now I can login but cannot send messages.  I’ll have to find time to figure this out sometime soon. If people quit calling and saying “These number don’t look right can you see why not”.