Get-FlickrPhotos

January 14th, 2008 by Daniele Muscetta

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

Welcome www.powershell.it!

January 4th, 2008 by Daniele Muscetta

I just read from Jeffrey Snover about this newly born Italian PowerShell community site.

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… :-)

Simply Works

December 27th, 2007 by Daniele Muscetta

Simply Works

Simply Works, uploaded by Daniele Muscetta on Flickr.

I don't know about other people, but I do get a lot to think when the end of the year approaches: all that I've done, what I have not yet done, what I would like to do, and so on…

And it is a period when memories surface.

I found the two old CD-ROMs you can see in the picture. And those are memories.
missioncritical software was the company that invented a lot of stuff that became Microsoft's products: for example ADMT and Operations Manager.

The black CD contains SeNTry, the "enterprise event manager", what later became Operations Manager.
On the back of the CD, the company motto at the time: "software that works simply and simply works".
So true. I might digress on this concept, but I won't do that right now.

I have already explained in my other blog what I do for work. Well, that was a couple of years ago anyway. Several things have changed, and we are moving towards offering services that are more measurable and professional. So, since it happens that in a certain job you need to be an "expert" and "specialize" in order to be "seen" or "noticed".
You know I don't really believe in specialization. I have written it all over the place. But you need to make other people happy as well and let them believe what they want, so when you "specialize" they are happier. No, really, it might make a difference in your carrer :-)

In this regard, I did also mention my "meeting again" with Operations Manager.
That's where Operations manager helped me: it let me "specialize" in systems and applications management… a field where you need to know a bit of everything anyway: infrastructure, security, logging, scripting, databases, and so on… :-)
This way, everyone wins.

Don't misunderstand me, this does not mean I want to know everything. One cannot possibly know everything, and the more I learn the more I believe I know nothing at all, to be honest. I don't know everything, so please don't ask me everything – I work with mainframes :-)
While that can be a great excuse to avoid neighbours and relatives annoyances with their PCs though, on the serious side I still believe that any intelligent individual cannot be locked into doing a narrow thing and know only that one bit just because it is common thought that you have to act that way.

If I would stop where I have to stop I would be the standard "IT Pro". I would be fine, sure, but I would get bored soon. I would not learn anything. But I don't feel I am the standard "IT Pro". In fact, funnily enough, on some other blogs out there I have been referenced as a "Dev" (find it on your own, look at their blogrolls :-) ). But I am not a Dev either then… I don't write code for work. I would love to, but I rarely actually do, other than some scripts. Anyway, I tend to escape the definition of the usual "expert" on something… mostly because I want to escape it. I don't see myself represented by those generalization.

As Phil puts it, when asked "Are software developers – engineers or artists?":

"[...] Don’t take this as a copout, but a little of both. I see it more as craftsmanship. Engineering relies on a lot of science. Much of it is demonstrably empirical and constrained by the laws of physics. Software is less constrained by physics as it is by the limits of the mind. [...]"

Craftmanship. Not science.
And stop calling me an "engineer". I am not an engineer. I was even crap in math, in school!

Anyway, what does this all mean? In practical terms, it means that in the end, wether I want it or not, I do get considered an "expert" on MOM and OpsMgr… and that I will mostly work on those products for the next year too. But that is not bad, because, as I said, working on that product means working on many more things too. Also, I can point to different audiences: those believing in "experts" and those going beyond schemes. It also means that I will have to continue teaching a couple of scripting classes (both VBScript and PowerShell) that nobody else seems to be willing to do (because they are all *expert* in something narrow), and that I will still be hacking together my other stuff (my facebook apps, my wordpress theme and plugins, my server, etc) and even continue to have strong opinions in those other fields that I find interesting and where I am not considered an *expert* ;-)

Well, I suppose I've been ranting enough for today…and for this year :-)
I really want to wish everybody again a great beginning of 2008!!! What are you going to be busy with, in 2008 ?

Merry XMas

December 22nd, 2007 by Daniele Muscetta

This post is to write down some thoughts before Christmas, along the lines of what I have written yesterday in an email to a lot of colleagues (and I definitely forgotten some of them because there are too many great people I've worked with… so if you are one of the forgotten ones and you are reading this: I'm sorry!).

The last few months have been very busy with work. As much as I enjoyed them anyway, and learned a lot in the process and from the people I worked with, I now really want to enjoy these few coming days of Christmas holidays and RELAX and spend some quality time with my family and friends.

So I wish the same for all of you: that you may spend a Merry, relaxing Christmas, and have a great start for a grand, brilliant new year!

 

As a side note, having been very busy I have blogged a lot less. Blogging implies that I already have a sort-of-well-formed thought, that should span a few lines or paragraphs, otherwise I don't find it worth it. That does not mean I don't have small ideas or other things I like to share when I come up with them. That is why I am using microblogging and Social Networking a lot lately, so I remind you that even if this blog's builtin feed only includes the REAL FEW blog posts, then I also have another (very "chatty") feed that you can use to "follow me" and that one includes all of the following combined feeds: my status messages from Facebook, my Twitter messages, my pictures on Flickr, the stuff I read somewhere else and then share on Facebook, the places I visit and mark on 43Places and the goals I achieve, want to achieve, or I simply talk about on 43Things, as well as the REAL posts on this blog. It is my implementation of what has been called a "lifestream" by other bloggers.

Role Playing | Technology

November 10th, 2007 by Daniele Muscetta

Role Playing | Technology

Role Playing | Technology, uploaded by Daniele Muscetta on Flickr.

I had not been playing Role Playing Games anymore for nearly 15 years. My wife recently thought that Joshua would be big enough to try, so I am trying to introduce him to the world of RPGs. This, as you can imagine, after all of that time, took back memories, ideas, and also made me think of how much the technology changed this all.

I am not at all referring to VIDEO or ONLINE games, even those that are marketed as being RPGs: most of them are not "real" RPGs anyway, they merely borrow some rules. I am saying that technology changed the way people ORGANIZE and prepare their role playing gaming experience (=the one played with real RPGs where you have to ACT a character), and how they interact with each other, and how the "knowledge" spreads.

When I was playing RPG a lot, in the 80's and early 90's, everything was paper-based, no Internet and technology in sight. For example, we photocopied a lot of stuff back then, as opposed to today when I just downloaded and printed a character sheet. But it was not just printed material that was being photocopied: in those years I remember myself handwriting my own extended set of rules, manuals, scenarios, description of places (I even kept and found back some of those!). Everything was handwritten: text, drawings, maps. A lot of work, very hard to mantain. But passion was driving me (and my friends at that time too). That has also been a big enabler in how I taught myself to read and write english: by translating handbooks that nobody had translated in italian. But I digress.

We use to go to a couple of highly specialized shops that were able to import and resell one or two copies of some rare handbooks of a strange game that would otherwise not sell at all. Sometimes even the specialized shops did not manage to get the originals of some of those rare books. Therefore, some of the expansions were sold as photocopies.
Some other times there had been some guy somewhere who did have one copy bought in the US and he took the effort to make an UNofficial translation and TYPEWRITE it in italian. Photocopies of this "product" was all that was circulating.

I am not talking or caring of copyright or "pirate" issues here. We were not "avoiding" the original stuff: if anybody would have told us that the stuff we wanted was actually available in its original format, we would have bought it. But it just wasn't available at all, and we wanted it. This kind of material was really close to impossible to get, with high costs, and all that us busy kids wanted was books with descriptions of imaginary fantasy worlds to place our characters in, and improvise and narrate our stories and saga's…

Also, all in paper format, what was circulating was a certain number of fanzines, also photocopies of an original, wonderful, "master copy" that someone had made with a typewriter and sticking pictures with glue on the paper. Desktop publishing was not that common nor easy yet. But the layout is not really what interested me, it was the CONTENT that was hard to spread.

At one stage, the thing improved slightly: I finally managed to convince my parents that I was allowed to get a modem, so I started using it to connect to various BBS. A couple of those BBS of the time were related to RPGs or had a related discussion area. I was interested in technology and in knowing how it was doing its magic, but most of all I was also pretty excited at the possibilities I saw for the technology as an enabler in connecting people. Just like I am now.
I have met some good friends on BBS's at that time. I'm still in contact with some of them, I've lost some other ones, like it happens in life anyway. But the possibility was showing quite clearly: those BBS were mostly text-based, with high connection costs (in italy were you pay every call, also local ones, per minute)… even in those circumstances they were managing to aggregate some people and were used as vehicles to spread the knowledge.
In Italy, thought, they were mostly local. International calls were prohibitively expensive. Of course we did hear of what happened to similar BBS in the US.

In fact, after pencil and paper, through a typewriter, the revolution started there: being able to type stuff on a computer and pass your file over to someone else made it easier for it to spread. But again, I am not talking about copyrighted material. I am mostly talking about self-produced material. I still remember I had troubles with digitalizing maps because I did not own a scanner… on some of the BBS people were sharing their works, and you could find good adventures and extra stuff on them. I also got to publish somewhere a couple of those I had written, and they even made it on a fanzine first, and then on a real magazine.

At one stage, though, I really got distracted. I probably thought I was "big enough", or I got too interested in the "serious" computing business, or I was too busy with other stuff. Probably a combination of many factors. So I sort of abandoned playing for a long time.

Now, looking back at that world, more than a decade later, I can see how it all changed: you go to the Internet, use any search engine and find dozen if not hundred of sites with forums, people playing online using Live Messenger, people sharing their adventures or their stories of the adventures they have played, other sites that collect all of the covers and information about all the booklets and manuals ever existed for any possible version of any game. Even the vendors are giving out stuff to play for free.

PCs and the Internet DID change the world, if anyone was still doubting. And yes, Role Playing Games and computing ARE related interests.

The world changed, yet it stayed the same: you still play those games with people, with the help of your imagination. It's the resources that are now at your fingertips.

Using Live ID to authenticate to WordPress

November 2nd, 2007 by Daniele Muscetta

Yesterday I've been hacking a bit with the Windows Live ID SDK and I wrote a very small and simple plugin for WordPress that enables you to login in to WordPress with your passport Live ID.
I had read in various places that such a plugin would be welcome… I looked around and found none yet (if anyone has instead already written something like this and I missed it I will happily waste the simple stuff I did for something more advanced/well written… just let me know :-) ).
I took a look at a similar experiment, and eventually even found that there is some conceptually similar plugin written to work with OpenID. The wordpress openid plugin is much more complex and much more advanced than what I did, tough. It will let you log in with just ANY OpenID user, it will automatically create a user for you on that wordpress installation and associate it with your ID, even just for the purpose of commenting, etc.

But in my blog I don't require or need people to actually log in to do anything. I actually like anonymous/free comment. A CAPTCHA takes care of spammers and I am fine with it so far. Probably for a big site with a lot of users it might make sense, but for my blog so far it doesn't. But there's one thing for which this is instead useful: I have always been worried, when logging in through HTTP (thus, without SSL) to my blog from networks I don't manage or completely trust, that my password could be sniffed over the wire and stolen. Live ID solves my problem by letting Microsoft validate my identity: I have associated my Live ID to the blog's main user account(=myself), the one writing this post. So the plugin in its current form is used as a replacement of the login form (the standard wp-login.php wordpress form CAN still be used if you like, of course, you just don't HAVE to. Also the use of xmlrpc will still require local user/pwd combination.). Anyway, this new form will authenticate you thorugh Live ID and then check if your Live ID is associated to any local user. If it is, it will log you on to wordpress with that account. Otherwise it will inform you that you are successfully logged on to passport Live, but unfortunately there is no corresponding local account for you, and that it would need to be set up. Setting it up is as difficult as adding a line to the database… probably adding a form or a property page would be nice, but in my case I just did it with a query:

INSERT INTO `wordpress`.`wp-usermeta` (
`umeta_id` ,
`user_id` ,
`meta_key` ,
`meta_value`
)
VALUES (
NULL , '1', 'LiveID', 'f11fa1d3e82c68776f94a3a5c459b70b'
);

which adds an extra "property" for the first user (admin) called 'LiveID' which contains your Live ID (the one above is not my real one, in case you were wondering). When you are authenticated by LiveID and you get back this value, the plugin checks in this table which WordPress userid in the database has been associated with this Live ID and – if it finds one – it authenticates you as that user. Of course you should not have duplicates.

My code is mostly based on the SDK PHP Sample, with some modification to integrate it in WordPress as a plugin. Of course I removed the file that is used as "user database" and used wordpress DB instead.

There's a ton of things that could be improved. I just did not put any more effort and time in it. As you might know if you read this blog, I am not a full time developer. Actually I shouldn't write code at all for work and I am mainly considered an "infrastructure" guy. Anyway, I would like to code more and even if I am not supposed to, I always try to find stimulating situations that require a bit of integration, thinking out of the box, some scripting, etc…

[updated: november 3rd 2007] You can download the sample plugin "AS-IS" here: liveauth.zip . This has only been tested and only works with WordPress 2.3.x serie (but should also work with earlier versions – not tested)

[updated: march 30th 2008] WordPress 2.5 has changed the way the authentication cookie is generated, therefore here is an updated version of the plugin that works with the new secure cookies: liveauth02.zip
I should really invest some more time in this and clear up the code. I should also make an interface to make the configuration easier, and maybe make a version that works on both 2.3 and 2.5 branches. I am not sure when I will have time for that, though…

[updated: april 20th 2008] I have released version 0.3c of the plugin which now finally includes a simple configuration page, and should work on both WordPress 2.3 (and older) and on the 2.5 brach. Please visit the new Windows Live ID Authentication WordPress Plugin Page.

Disclaimer:
The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my own personal opinion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
THIS WORK IS NOT ENDORSED AND NOT EVEN CHECKED, AUTHORIZED, SCRUTINIZED NOR APPROVED BY MY EMPLOYER, AND IT ONLY REPRESENT SOMETHING WHICH I'VE DONE IN MY FREE TIME. NO GUARANTEE WHATSOEVER IS GIVEN ON THIS. THE AUTHOR SHALL NOT BE MADE RESPONSIBLE FOR ANY DAMAGE YOU MIGHT INCUR WHEN USING THIS PROGRAM.

Microsoft in the Open

October 18th, 2007 by Daniele Muscetta

Two of Microsoft’s Shared Source licenses have been approved by the OSI. Read more on port25! (yes, I did read this yesterday, but I was teaching and then travelling so I did not make it to blog).

Praktica!

October 5th, 2007 by Daniele Muscetta

Praktica!

Praktica!, uploaded by Daniele Muscetta on Flickr.

My backward walks in technology.
The old Pentax still makes nice pictures, but it is gradually falling apart. So I found this one for a very low price. During the weekend I am determined to test it, let's see how it behaves…

Facebook implemented a user.setStatus API!

October 1st, 2007 by Daniele Muscetta

Finally, you CAN change your Facebook status programmatically in a way that is supported!

Some months ago Christian discovered a hack to change your Facebook status. Some other people also used it and extended it. I also ported it to C# and made a winform using its unofficial method.
Suddenly after, Facebook asked us to take down the code, as it violated their terms of service.

It has taken a while, some struggles, but now they finally recognized the need for federated status, and implemented a user.setStatus API.

Twitter is the first to pick it up, so now you can update twitter and have your status propagate in Facebook!

Well done, guys!

When I'll have some time I might think of rewriting my app using the SUPPORTED method, maybe finally writing that Live Messenger plugin… it would be nice :-)
When I'll have time…

Ubuntu on Virtual PC 2007

September 26th, 2007 by Daniele Muscetta

Ubuntu on Virtual PC 2007

Ubuntu on Virtual PC 2007, uploaded by Daniele Muscetta on Flickr.

This was a VMWare "virtual appliance" with Ubuntu that I was using for testing. As I mostly use Virtual PC or Virtual Server, I found it annoying having to switch to VMWare player to use that specific machine, and I could not be asked to install a new one. So I converted the .VMDK to .VHD format (the other way around than it is described on this article ).

After that, I had to change GRUB's configuration to inform it that the SCSI disk (/dev/sda1) was all of a sudden become an IDE one (/dev/hda1), and then I also had to reconfigure X.

After that it runs like a charme!!!