Archive for March, 2009

My first twitter and oAuth App : TweetXPander

So i am really excited about because as you can see from the heading , its my first twitter and oAuth application.

Back Story :

A few days ago a friend of mine FlintZA through up a challenge on twitter for anyone to come up with a web app that would scrape your twitter friend feed and retrieve any tweets that had a URL in it. Once you had filtered all the tweets the next part was to generate thumbnails for all of the url that the user had posted. Once all that was done the generated and scraped data needed to be outputted as a RSS feed.

The Project : TweetXPander

Since all the components in that i used to build the project are open source i decided to hook up a little tutorial about how i did everything and to share the code with you.

Components Used

Twitter Integration :  Twitteroo API , it should be noted that i had to hack this project to allow for oAuth as the downloadable version does not support it and the blog does not give any indication whether they intend to or not.

RSS Integration : I used the RSS.Net Lib , i have used this lib before which is the only reason i chose it , also no modifications were made to it.

Thumbnail Image Generation : Doing this manually via code was a process that turned out to be way to slow , in the end i opted to use ShrinkTheWeb who offer a brilliant service compared to what is available.

I am not going to go into detail here explaining how i did what i did as most of the code flows easily enough and you should not really get confused. If you do need help leave a comment here and i will gladly help.

General Flow :

  1. On Page load check if the user has been authenticated via twitter yet , if not then send him to the twitter auth page so that we can get access.
  2. Once he has access start the RSS generation process .

RSS Generation Flow :

  1. Create a RSS Chanel which we will use later , a RSS channel is what all RSS items are loaded into before they can be outputted to the user.
  2. Create a instance of the Twitteroo class (this is the oAuth version) and then get the current users friends time line details. This details are then stored in a Users List ( Custom Twitteroo Class).
  3. I then loop through the list of user tweets and check the Status message. If the message contains a http url I then do more processing on it.
  4. If the status does contain a URL i then extract the URL from the status. Once it is extracted i then check if it has been shrunk and if so i expand it.
  5. Once that is done i build a Message that will be added to the RSS item.
  6. Once the Message has been built it is then added to a RSS item which is added to the original channel we created in the start.
  7. After the loop has been completed the channel is finally added to a newly created RSS Feed.
  8. This feed is then outputted to the User Response.
  9. The user now sees a RSS feed as normal.

That is the basic flow and structure of what i did , i should note that it is quite simplified and i did not really go too deep and make classes for alot of things since this was just a proof of concept.

As always any comments and suggestions on how i can make it better is much appreciated.

Project Files

Demo

Thanks go out to Flint for the great idea and awesome name.

~stalkerh

Demystifying Tiny URL’s

Ok so one of the annoying things that i have noticed with twitter is that people tend to shrink their URL’s , this is a valid point because you are limited in what you can actually put into each of your status updates.
[...]

What do you use to track you mistakes/accomplishments ?

As a programmer one of the most important things that you can learn is to always learn from your mistakes and to also learn from other peoples mistakes so that you do not repeat them.

What i started doing a while back as you may have noticed ,is that anytime i learn something i blog it , so that in the future (as long as the DB doesn’t crash) i can always reference stuff in the past to see how i got things done. This is also a handy way for me to explain to other people how they should over come problems that i had in the past.

Of recent times i have started a bit of a new practice and that is using SO. The reason i love using  SO is because everything i do there is recorded so if i ever need a solution to something i worked on in the past its east enough to find and as with the blog its easy to point people to a question that i worked on instead of explaining the entire solution to them again.

The basic idea behind both of these ideas is to keep a record (you don’t have to keep a diary but if you want to i wont stop you) so that you can refer back to it in the future. It has also been shown that by writing (any form of recording really) down what you learn it becomes ingrained into your way of working.

So what do you use to track and record your mistakes or accomplishments ?

~stalkerh

Who would you work for ?

So recently this question has been posed to me quite a few times, but in a more generalized way. The question being would you prefer to work for a software development company or any other company that has a IT department as a software developer.

From the start to some people it might seem like a pretty easy question. For one i think it depends mostly on your end game , do you want to be the ultimate software developer or do you want to specialize in a certain business field. Also are you looking to build up experience or are you looking for the best payout.

While its almost always better to work for a Software development Company as they understand the needs of a developer and can usually provide most of the tools without much of a fuss. It sometimes makes better sense to work for a normal company that has a IT department if you don’t have much experience and want to learn how things are done. You will also find that most of the time normal companies are not able to judge developers very accurately and as such you can end up getting over paid or as in most cases underpaid.

The other service that development companies can provide that normal companies usually don’t is training. Any development company knows how to plan in advance for developer training so that they don’t fall behind in their respective fields. To them this makes good business sense since a better equipped developer is a more productive developer. On the other hand normal companies dont always see the need for this , to them its just a extra expense they can save on , because surely if you can program now they you should be able to program in the future as well. Some time you may get lucky in that the budget given to your department is so big that it would allow for training anyway, in this case the developer benefits a lot since they can choose what they want to study.

The obvious advantage to working for a normal company is that you get experience building applications for the field that they work in and you also gain a greater understanding into how the business works. Using this information you can start up your own company and develop applications that would benefit that specific sector.

As always it usually depends on where you see yourself in the future , do you want to have your own business or are you content working for a salary each month. Also if you prefer working for a salary ,do you work because you like it or because you heard its where the money is.

I personally love what i do and the earning of money is just there to pay of bills and not a carrot that i need to keep on chasing.

~stalkerh

Local Only Game Management

Hi all
I was just interested in what tools/applications do local only gamers use to keep in contact when gaming. Basically just like xbox live allows you to manage all your friends and see what games they are playing what do you as a local only gamer use. I know there are quite a few people on Steam and Xfire but the problem is that doesn’t really work well with local only (Unless you are using a dual connection setup).

I have a project that i am working on and don’t want to take if further if its not going to be of any use.

Thanks
~Stakerh

Whats been going on

Wow where to start , for a while now i have been working on way to many projects at one time and i think now is the time to start laying some of it out.

Hmmm i think the first project that i started on a while ago was a personal project called Deals SA (Trade Marked, Don’t go stealing my ideas). The basic idea of this project was to have a single point of notification for any deals that happen in South Africa , whether they be online deals of offline deals. This would save users the time of having to receive 100 mails about deals they don’t want from a site just because the one deal they wanted to be notified about is included in the list. Unfortunately i dropped the ball on this project and hopefully i can finish the project someday.

The second and slightly more successful (i.e. it actually got launched) project that i started on and one which i need to focus on alot more now is Podcasts SA. The idea of this project was to make as many internationally hosted podcasts available locally. Now this project started of as a torrent site and has now moved to direct downloads now since i noticed few to many people really knew what was going on with the torrents. I still have a ton of things i want to do with the site but for now i am just happy that it is up and running and that people are mostly using the site. It should be noted that the website is not called Podcasts SA , its actually called Podcity : The home of international podcasts in SA.

The last project that i am working on (for now at least) is project Freedom. This project will help local only BW users to download international files for free. I am not going to explain in detail how this is done , but i will just say that i have found a way for local only users to get international files for free. This is obviously dependant on a few things. The first being that you can only download http downloads and secondly you need to be a bit technically inclined to be able to run the setup required to use project Freedom. I may someday make it a lot easier for now you will need to know a bit about your home network and possibly setup a server or 2 on it that has Internet access. The reason that i am not yet releasing it is because i am scared that it is gona get seriously abused and with this abuse the ISP’s are going to notice and might block it in future.

So thats what i have been doing from the personal project side , on the gaming side i finally finished FEAR 2 as well as Fallout 3. Both of these are awesome game if you are looking to buy any of them. I was just disappointed with Fallout 3 in that after you are finished the main story the game is over , while this might not sound to bad it is for a RPG .I personally decided that i would leave most of the side quests till after i was done with the game only to find that i could not do so.

There are still quite a few other things that have been going on and as soon as i get more time i will go into detail about how each of my projects is going to work as well as a progress update on each of them.

As always please leave a comment if you feel you have something to say.

~stalker

Making the most of a release date

So not to long ago i wrote  a rant about how there was no SDK for the omnia (managed or unmanaged)  and i can finally breathe a sigh of relief as they have now released a SDK for the phone that will target specific features of the phone and not just the generic Windows Mobile Features. I am not going to credit anyone specifically since i received the news from a few people , but if you did send me a notification thank you very much.

Now that they have released the SDK a interesting question comes to mind , is there still any buzz left around the phone and if not can they now use this to increase the buzz that has died down by announcing that developers can easily create applications for there mobile devices.

If it does not get the attention of the normal dev community it has to get the attention of the Homebrew community that would have been using all sorts of weird hacks up until this point. So while they still do get some notice i think it is sorely wasted.

If they (Samsung) had released the SDK as soon as or even before the the phone was released , i am pretty sure we would have had quite a few custom applications that make use of the phones advanced features. Also any developer would now have had many more months of extra experience in using their SDK. A good example of how a this should have worked is by taking a look at the iPhone SDK and the amount of applications and games that have now been released. The quality of these applications have been steadily increasing as time moves on. It should be mentioned that a lot of this success has also been attributed to apples iPhone app store.

What surprised me the most though (besides it being so late) is the fact that it still does not have widget creation. Seeing as how they love to advertise this feature , it would have really helped to be able to create your own custom widgets. Again this feature early on in the life cycle would have surely brought in more attention to the product as well.

Here’s to hoping that they advance the SDK and add more features to it. As without that things are going to get really tough to maintain.I say this purely because the only way to use the current API that they provide is through C++.Their solution to using the API from managed code is to make dllimports :( .Frankly to me this is not the way a API should be implemented. I guess i cant complain since it works anyway and there might be some reason to

Since i don’t have a contact inside Samsung i don’t really know why they released so late, but i am sure that they had good reason to do so.

As always let me know what you think and if you have some inside information please do let me know.

~stalkerh

The Ultimate Local Only Project

So while that is a huge title to live up to the idea i am about to propose is just as huge.

I can say from personal experience that one of the biggest annoyances with local only internet has got to be gaming. Ok well not really gaming but rather the entire aspect of gaming locally. This begins at the getting a game then playing the game and then updating the game with patches.

Now for the most part this entire process has almost perfected itself overtime and over different platforms. A very good example for the PC market is Steam. Since its launch a lot of people doubted if it could survive in the long run, but now many years after its launch the true colors are showing.

Steam works via the download distribution method i.e. What ever you buy is downloaded to your PC and not shipped to you in any physical form. Also all updates to a game can be done automatically through steam as well. So steam now becomes a central location for buying ,updating and playing games. But the huge flaw in this whole system (at least for us South Africans) is the fact that it depends on having a decent DSL connection and enough bandwidth to download everything you need.

Now as you can imagine you are going to need a ton of bandwidth to download and entire game. Since buying international cap is too expensive the other alternative is to go local.By this i mean setting up a local distribution server. Now while i understand that IS is supposed to cache the Steam content i was not able to get this working and it seems to work on a and off depending if the content has been cached. No this is not what is need , what is needed is a dedicated system that you can depend on to get your content locally .Frankly i am not sure why it has not yet been done because Telkom has been trying to promote the use of local only bandwidth as well as their local gaming.do.co.za , what better a way to promote than to create a service that only your customers can use. I know for sure that i would definitely change to them if that ever happened.

Now the final distribution system that SA is missing and it has been a much contested issue in the past is Xbox Live. When i mean available in SA i mean that i can use local only bandwidth to connect and i can use my region as SA not some international region that i have no interest in supporting. If this service ever came to SA i doubt i would ever by international bandwidth again. First of all these days i spend more time on my Xbox then on my PC secondly i feel the entire experience on live is a whole lot more complete with movie ,TV series and games being available for download , this will help to keep more users connected locally and enhance the brand even further (Its stronger here than it is in some other countries that do have live).

In closing i can for the most part understand why a lot of these company’s do not want to host their services in SA. Somme of these reasons lie in that we don’t have the infrastructure to support their tech , the cost to implement and maintain in SA compared to any where else in the world is significantly higher. Also SA has a much higher security risk of the actual hardware being stolen.

So as always let me know what you think and would you invest in making a better local only  experience for everyone because i know i would.

~stalkerh
FireStats icon Powered by FireStats