All in all, even being still under heavy development, what Miguel de Icaza has achieved (with moonlight, just like with mono) is amazing.
A while ago, talking to some friends, I was mentioning how cool it was that Flickr provides APIs, so that you can always get your data out of it, if you want to. There are several downloader applications that I found on the Internet, but I have not yet chosen one that I completey like among the few that I’ve tried. So, inspired by Kosso’s PHP script for enumerating your photos on Flickr, I thought I’d port it to Powershell and make my own version of it. Just for the fun of it. My Powershell script does not do everything that Kosso’s one does: I don’t build a web page showing description and comments. I suppose this is because the original script was made with PHP, which you usually run on a web server and outputting as HTML is the standard thing you would do in PHP. I just concentrated on the “download” thing, since mine it is a console script. You can think of mine as a “full backup” script. Full… well, at least of all your photos, if not of all the metadata. It should be trivial to extend anyway, also considering Powershell XML type accelerator really makes it extremely easy to parse the output of a REST API such as Flickr’s (I would say even easier and more readable that PHP’simplexml). There is a ton of things that could be extended/improved in the script… including supporting proxy servers, accepting more parameters for things that are now hardcoded… and with a million other things. Even this way, though, I think that the script can be useful to show a number of techniques in Powershell. Or just to download your photos 🙂 So you can download the script from here: Get-FlickrPhotos.ps1
I just created an account for myself on the site… as you know I like PowerShell, so even if I usually prefer writing stuff in english, I will try to hang out there and see how can I contribute to it.
After all, I am italian… 🙂
I am amazed and excited to read that Microsoft has decided to release the source code of the .Net libraries.
Scott Guthrie writes:
“[…] One of the things my team has been working to enable has been the ability for .NET developers to download and browse the source code of the .NET Framework libraries, and to easily enable debugging support in them. […] VS 2008 will include support to automatically retrieve the appropriate .NET Framework source files on demand from Microsoft. This means that the source code for the ASP.NET GridView and BaseDataBoundControl classes above do not have to already be installed on the machine before we started the debugger. Instead, when we use F11 to step into their implementation VS can automatically download the source files from Microsoft and open it within the IDE. […]”
WOW. This is so cool, and a further step in the right direction.
Thanks to Alessandro for having picked this up, as I read it on his blog, and I thought it was an information worth spreading!!!
Facebook mobile is not working from mobile operators not in the US, I suppose.
I can’t even log on to m.facebook.com with my WIndows Mobile SmartPhone.
I can’t send status updates through SMS.
I can’t even send them by mail, or I get the following back:
So, now, I am updating Twitter.
Twitter can be updated with an SMS even from Europe. Or it can be updated with a bot running GTalk. Very easy, can do it from everywhere.
I then wrote a small command line application (based on the same “hack” as the one described before) that runs every five minutes from the scheduler on my server and keeps the two in sync.
I wrote it in C# as a Console application because that’s usually what I do when I want it to run it both on my windows machines and/or on my Linux server (with MONO). I already used this approach in the past and I found it to be successful. As long as you keep the application simple enough and check out the documentation for the implemented classes on mono, it runs without modification both on windows on the “real” .Net framework and on Mono on Linux. i just copy the executable and I am ready to go.
Not this time, though.
I am hitting what seems to be a bug in mono. I might be able to find a workaround, but I haven’t had the time to dig in the issue yet.
I posted some info about this on this forum.
I know this is a very common issue.
I keep finding way too many software that claim to interact with Web 2.0 sites or services, and connect here or there…. still forgetting one basic simple rule, that is: letting people use a proxy.
Most programmers for some reasons just assume that since they are directly connected to the internet, everybody is. Which isn’t always the case. Most companies have proxies and will only let you out to port 80 – by using their proxy.
…which in turn is one of the reasons why most applications now “talk” and tunnel whatever application protocol on top of HTTP… still a lot of softwares simply “forget” or don’t care proving a simple checkbox “use proxy”, which will translate in two or three extra lines of code… three lines which I personally usually include in my projects, when I am not even a *developer*!! (but that might explain why I *think* of it… I come from a security and networking background :-))
I thought of writing this post after having read this post by Saqib Ullah.
Anyway. I keep finding this thing over and over again. Both in simple, hobbyist, sample and/or in complex, big, expensive enterprise software. Last time I got pissed off about a piece of code missing this feature was some days ago when testing http://www.codeplex.com/FacebookToolkit. The previous time was during Windows Vista beta-testing (I had found a similar issue in beta2, and had it fixed for RC1.)
Actually, I am being polite saying it is “missing a feature”. To be honest I think missing this “feature” would have to be considered a bug: every piece of software using HTTP *should* include the possibility to pass thorugh proxy (also, don’t forget about AUTHENTICATED proxies), or the purpose of using HTTP in the first place is defeated!!
Developers!!! You have to remember people ARE behind proxies !!!!!
This is a Screenshot of the small application I first described in my previous blog post.
It is a simple Windows Form that lets you change your status on Facebook without having to browse to the site. It does not rely on Facebook’s API (as they won’t let you change your status, at least to date) but is really uses a hack on the Facebook mobile pages. It is based on PHP code posted by Christian Flickinger, ported to C# (.Net 2.0) by me.
When you pull down the form you get to see the settings:
Those can be stored in an XML file, that gets loaded automatically every time the program starts.
Beware that password ARE displayed and stored in clear text.
The idea so far is that you run it on your PC and you just keep it resized so it does not show the “dangerous” bits.
You can keep it minimized on the tray in windows, pop it up when you need to update your status, write your new status and click “change” – it will freeze for a couple of seconds while updates your status, since it uses synchronous calls – then you can minimize it again.
UPDATED – September 1st 2007: I have been asked by Facebook to pull down the source code from the Net, as it violates their terms of service (I had not realized that). Apologies to all.
What I had in mind was a simple program that would run on my PC, maybe minimized in the system tray, that would let me update my status in a click, thorugh the day, without having to log on to the website. Most of the day I am busy working, and I don’t really have time to go surf and check Facebook… but I like the possibility for people to hear how I am doing. Changing the status would keep them up to date, and would keep my profile current.
As I figured out afterwards, their API does not yet let you change your status yet.
There are other people asking for this possibility… but then I went further searching on the Internet, and I found this blog: http://www.nexdot.net/blog/2007/04/20/updating-facebook-status-using-php/.
I just hacked together a small WinForm written in C# that reimplements this idea.
I indeed would like to thank Christian for the idea, and my friend and colleague Pierluigi for his precious help with the regular expressions 🙂
At the moment it has terrible things such as hardcoded passwords in it, but as soon as I will have time to polish the code a bit, I will post it.
One more thing I would like to do with it is turning it from a standalone application into a Live Messenger Add-In, so that it synchronizes my messenger status with the one of Facebook. When I will have time for that.
I read on the IronPython Mailing List about this cool integration with Visual Studio Shell! Also, further in the same thread, you can find out that the current CTP of ASP.NET (ASP.NET Futures) also includes ironPython integration. Look at this:
I have been busy trying to write a new frontend for this blog that uses .Net. I already blogged about it here. In the last couple of weeks I have been adding stuff – permalinks using mod_rewrite, I finally show the comments properly, I have added categories and category archives (as in http://www.muscetta.net/dotnet/tag/coding). There is even an RSS Feed.
The layout is still crap, but I sort of like it being so light weight, so that is not on my priority list so far. Moreover, I am a crap designer.
Before that, tough, I still have to add important functionalities like the possibility to POST comments (which needs a new CAPTCHA, etc, so it will take me a while), and I am having issues with text encoding (it does not show the accented characters properly, yet).
But I am having fun doing it.
[Edit of December 2009 – I killed the above experiment. I had fun doing it, but there is not time for all, it needs a lot of work to keep it running/update it with every wordpress update, and mod_mono is wasting too many resources on the server.]