Apr
13

StumbleUpon - My “algorithm” to deal with friends limit

I like StumbleUpon. My website gets many visits from there. But as many ( blahblahtech and traffikd ) I have an issue with the friends limit.
Said briefly you can be fan of at most 200 people. After that you get a warning and you cannot add more fans. You cannot even reciprocate a fan of yours. So you are in a kind of deadlock.
I devise this sort of algorithm to deal with such a situation:

  • Become fan of a friend
  • if he reciprocates fine
  • if he doesn’t, persuade him to unfriend inactive people he is fan of
  • if he doesn’t reply for a while unfriend him, because he is not active or does not share any interest with you

In Actionscript :)

var limit:int = 2; // weeks

for each (stumbler:People in peopleYouAreFanOf) {
	if (!stumbler.reciprocates() ||
            !stumbler.persuaded() ||
            stumbler.getRepliesWithin(limit) == 0)
        {
		stumbler.unfriend();
	}
	else {
		you.sayThanks(stumbler);
		you.interactWith(stumbler);
	}
}

Apr
04

Posty - Star Pownce notes

Tags: posty, pownce

stars.png 

auto-explicative screenshot. Check Posty out!

Apr
03

Parsing xml in Flex - The case of tag names with a dash

I am a fan of json. I use it extensively but sometimes I am forced to use xml. A pretty well know way to parse xml in Flex and Adobe air is the following:

var xml:XML = new XML(“<data><tag>content</tag></data>”);

 

private function parse():void {

    for each (var t:XML in xml.children()) {

trace(“tag name: “+t.name()+” tag content “+t.text())

    }

}

Sometimes you are not the one who establishes tag names, e.g. xml comes from a webservice and you have to use it as it is. In developing Posty I had to parse xml coming from a microblogging service, Tumblr. An sample xml returned by tumblr is the following.

<post id="30451729" ...>	
  <regular-body>Text of my post…</regular-body>
</post>

Notice there is a dash in some tag name. To render data you parse the xml and extract relevant data. Adopting the same approach explained above, to retrieve the content of a tag you’d write:

for each (var x:XML in xml.posts.post) {

    trace(“my regular body is “+ x.regular-body);

}

You will not be able to run this code. The compiler will say: access of undefined property body. What! I can’t parse xml with dashed tag names? No you can’t. More evidence from here[link]. The solution is to exploit a different syntax, which allows to access data in a dashed-name tag:

for each (var x:XML in xml.posts.post) {

    trace(“my regular body is “+ x.child(“regular-body”));

}

The compiler will be happy and your xml will be parsed successfully.

Mar
29

Posty - Beta2

Update: Final version available here.
A new release of Posty is available, with support to four networks: twitter, jaiku, pownce and tumblr. A quick recap of the features:

  • write a message a post it to each service with one click
  • browse personal and public notes
  • reply to twitter and pownce notes
  • full browsing of tumblog, with rendering of audio, video, conversation, etc.

Download Posty.
Posty main screen
A screenshot of the main interface.

postytwitter.png
A screenshot of the twitter interface.
To run Posty you need the Adobe Air installer.
For any comment, suggestion, curiosity or feedback: posty AT spreadingfunkyness.com.

Mar
26

Hi. I am iTunes. I am busy. Pant Pant.

Tags: itunes

Hi, I am iTunes. I feel like … puff puff … pant pant. I am busy. No, it’s not the spring. I am really busy. What I do?

  • Play songs
  • Synch with ipods/iphones/apple tvs
  • Get covers/titles from the internet
  • Manage podcasts (what an effort!)
  • Sell songs
  • Rent movies
  • Play streaming radio
  • Soon I will sell iPhone apps

Darn! Stevie. Nobody helps me. Can’t you devise a new software to do some of my duties?

    Mar
    22

    Stumble with Safari (the easy way)

    I started using stumbleupon. I like it! But I also like Safari. As you might know there is no Safari bar (just for firefox and the other well spread browser). I often have the need to stumble a url, to simply state that it is my favorite. So I created a bookmarklet. I added a new bookmark in my bookmark bar, whose link is:

    javascript:location.href=’http://www.stumbleupon.com/submit?url=’+encodeURIComponent(location.href)

    Any time I click the button I submit the url to my favorites. Nice uh?
    stumblebutton.png

    Mar
    20

    Adobe Air already on iphone (sort of)

    I started developing in Flash, doing websites. I then moved to Flash mobile (before the introduction of flite) and developed a mobile guide for a research project. When Flex was presented I didn’t dive into it, because I was busy with other projects and languages. When Adobe Air (introduced as Apollo) was released I started experimenting again. When I heard of the iphone I thought: “This is the platform of the future!”. But I felt disappointed when Steve confessed he didn’t like Flash on the iphone. Now I am simply thinking:

    • isn’t iphone running Safari? Yes
    • isn’t Safari based on webkit? Yes
    • aren’t Adobe Air application partly running on webkit? Yes, if developed in javascript/html.

    So? I think it is not far the moment that ad Adobe Air application will run on the iPhone.

    Mar
    19

    Flash Player on iPhone

    Tags: flash, iphone

    What a great news! Looks like Adobe is already implementing a flash player for the iphone. I was having a look at the iPhone sdk and was fascinated by its features. But this is a good news. Steve was lamenting there is a gap between the Flash player and its lite version. Let’s hope the gap will be filled soon! I was tempted to port Posty to the iphone. Maybe I don’t need to to that and I can focus on new features.  
    Update: check here and here.

    Mar
    19

    Save Xp

    Tags: winxp

    It was not particularly efficient. I had many arguments with “him”. I remember, when the sp2 was introduced, I had to change a lot of code and configurations. I remember:

    • updates notifications during presentations,
    • blue screens of death,
    • peripherals not recognized,
    • installations (so long because I had the first version of the cd, with no service pack included).

    But it was the last Windows used before moving to Macosx. Between my Parallels images, apart from linux ones, the one named xp.hdd is my favourite. So, for a sort of affective reason, let me ask you to save xp.

    Mar
    18

    Posty - Beta1

    Update: new version of posty here

    Are you a microblogger? Wanna quickly post on your social places? Posty is for you! To update a social network, three steps are usually needed:

    • Login
    • Write message
    • Click post

    After a while, the update of your profile can get boring, because of repeated actions.With Posty you write a message once, choose the services to update, and click post. That’s all!

     

    Posty Screenshot

     

    At the moment posty supports posting to Twitter, Jaiku and Pownce. Give it a try.Quick instructions. Posty is an Adobe air application. It runs on MacOsx and Windows (Xp/Vista). To run Posty you need to download Adobe Air installer.

    top