Friday, December 16, 2005
Matts Mind
Matts Mind
I'm posting much more to that blog for the forseeable future but if I want to write any software-related posts it'll be done here.
Google Music Search...and maybe an iTunes killer?
There are also some pretty significant rumours that Google are going to release some sort of iTunes Store competitor. Dave's regularly on the mark and he's far from the only one spouting that kind of story (just do a Google search!)
I'm all for competition in this space! I love my iPod but the online music options are underwhelming.
Thursday, December 15, 2005
C++/CLI now an International Standard!
I like C /CLI but don't see it being used a great deal. Simply because it's more (!) complex than C (seeing as it's essentially a superset). However, for those times where you really need to interface transparently to a C or C++ library and/or performance is a significant issue then it'll find a home.
The Microsoft team did a great job fleshing out this spec - there's a lot of complexity in integrating the .NET aspects yet it feels quite natural to C++ developers.
Thank goodness we've seen the last of Managed C++. ;)
Wednesday, November 16, 2005
Google Earth placemark test
As a test, here's the apartment I'll be staying at. If you've got Google Earth installed you should just be able to click on the link and press OK.
Monday, November 14, 2005
Google Analytics
This service is free (as long as you have five million hits or less per day - or are an active AdWords customer) and easy to use. I've incorporated it into Sublime Software to see what it's like. I'll keep ya'll posted. :)
ArsTechnica has a good overview of the service.
Friday, November 11, 2005
Shopping for webcams
I wanted to order three webcams so I can communicate with my family and Melissa while I'm overseas. I didn't have a clue which models were good or bad so I jumped into Google and tried to find reviews. Surprisingly (well, to me) it was really hard to find a site that did good webcam reviews - I found that the best resource was doing a search for "webcams" in Amazon and taking a look at the customer reviews. A terrific use of what Scoble likes to term “slave generated content”. ;)
Anyway, once I'd isolated the models that were generally well-liked (and fitted my price and feature requirements) I used the trusty Static Ice search engine to find the best local prices.
If you're an Aussie looking for PC hardware Static Ice is a great resource. Just type in product keywords and SI will return you the list of online vendors that advertise that product - sorted in (lowest first) price order. [1] [2]
Static Ice listed Centre.net.au as having the best price for the webcam I'd settled on. So I placed an order with them. Unfortunately, shortly after, I received an email stating that they were unable to source stock for my item until late November and to confirm if that was OK. It wasn't (remember I'm leaving on the 23rd!) so I called them up and asked if I had any other options. The girl I spoke to on the phone was fantastically helpful. She looked up other products that were similarly specced, priced and in stock and was patient and cheerful with me. It was a shame that, in the end, they didn't have anything that I wanted and I asked if it was possible for me to cancel the order. "Of course, no problems at all sir."
This is service that I want. I'll come back to Centre.net.au. And I recommend others try it out.
Back to Static Ice looking for vendor #2. Infinity Computer Group. Their website advertised the product I was after but this time I rang to check that they had it in stock and could ship it within the next week. Unfortunately the service here wasn't great. After repeatedly being put on hold I was informed that the store that I'd rang (Brunswick) didn't have any in stock. I could try calling one of their other stores if I wished. Oh, and by the way, the store price is different (quite significantly!) to the website price. No thanks. Any vendor that has a web presence needs to have a centralized system and have the same price at their store and website.
Can't recommend Infinity.
As it turns out, third time lucky. City Software advertised my product on their (pick of the bunch) website at a reasonable price. I called them to check availability and expected shipping times and I spoke to a very helpful person who listened attentively and told me what I needed to hear ("yes we have that in stock, yes it'll be on your doorstep in time"). He was professional and friendly and, after a brief chat, offerred to waive the shipping fee!
Excellent, highly recommended. Assuming I get my webcams next week of course! :)
[1] Remember that you can narrow the Static Ice results to products by vendors only from your state by using the "state" syntax, much like Google's "site:" feature. For example, I searched for "logitech quickcam stx state:vic".
[2] If you're a Firefox user you need to set up a smart keyword search for Static Ice. I tweaked the default location to "http://www.staticice.com.au/cgi-bin/search.cgi?q=%s state:vic" so that my searches are always Victoria only. Now I just type "si webcams" into my location bar in Firefox, press enter and voila! I get a price-sorted list of webcams available online around Victoria.
Monday, October 31, 2005
Holiday - and enjoy the cup!
And I'm scared to think how many blog postings I'll have waiting for me when I jump online again.
Have fun at - or watching - the Melbourne Cup folks!
VS2005 issues
The changes are all covered in detail in the MSDN document "Breaking Changes in the Visual C++ 2005 Compiler" but I'll try and give some real examples that we faced.
Pointer-to-members now require qualified name and &
The compiler is much stricter about the types of function pointers. The error C3867 is generated with the following code:The resolution is to qualify the function pointers and pass the addressof the function in. e.g.CAThing()
: m_MyObserver(this, MyCallback)
CAThing()
: m_MyObserver(this, &CAThing::MyCallback)
const_cast can't down cast / Previously implicit string
casts are no longer allowed
This code does not compile (error C2440)BSTR bstrMessage = SysAllocString(T2OLE(const_castThis was replaced with the following (the BSTR could be deallocated after use):(MyThing.ErrorMessage.c_str())));
CComBSTR bstrMessage(MyThing.ErrorMessage.c_str());This code will also give the same error:
OLECHAR* pStringBuffer;
USHORT* pString = pStringBuffer;
COM/C++ Attributes with enumeration values should not be enclosed in quotes.
This code:coclass,Should be rewritten without the quotes as:
threading("free"),
event_source("com"),
aggregatable("never"),
coclass,The first time that the quotes get compiled gives warning C4581. This implies that the double quotes (") need to be replaced with single quotes ('). However, if you do this you then get error C3455. This error will say that "none of the attribute constructors matched the arguments".
threading(free),
event_source(com),
aggregatable(never),
Public attributes are stricter
The error MIDL2072 will be emitted for this code:typedef [public] enum EEventIdTypeThe solution is to place the public attribute earlier:
{
E_DEFAULT_EVENT_ID,
E_DEBUG_EVENT_ID,
} EEventIdType;
[public] typedef enum EEventIdType
The scope of variables in control constructs is limited to
the construct
In this code:for (int i = 0; i*max ;++i)
The scope of i is limited to the for loop. (The * is meant to be a less than operator but I'll be damned if I can get blogger to cooperate!)
Method declarations must explicitly indicate return types
This code gives the error C4430:virtual CheckChar(UINT maskChar, UINT nChar, int endPos);The return type must be explicitly defined. e.g.
virtual int CheckChar(UINT maskChar, UINT nChar, int endPos);
Private types are not accesible outside of the class they
are declared in
This code gives the error C2248:class cdxCSizingPropSheet : public CPropertySheetIn this example, the struct StandardControls needs to be available at the global scope for psheetCtrls.
{
private:
struct StandardControls
{
...
};
};
...
static struct cdxCSizingPropSheet::StandardControls psheetCtrls[] =
...
Deprecated methods
For security, many methods/functions that can cause buffer overruns have been deprecated. The recommended action is:- replace the deprecated methods, or
- define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES as 1 so the compiler will use a template overload to replace the deprecated method with another. N.B. security template overloads are not available for everything. Alternatively,
- define _CRT_SECURE_NO_DEPRECATE or the warning pragma to not display this warning.
OK, that's it for now. We had a few more but I've had it with trying to lay out code in Blogger. Does anyone know any good blogging software to write code? It's damn hard from within the Blogger editor. I'm thinking of moving to my own system hosted at home for this reason alone (actually there are a few more!). If I was to move to my own system which can you recommend that do a good job of handling code?
Anyway, I hope that was useful to you - and a huge thanks to Ben who wrote most of this in our Wiki at work. The good work was his, the errors mine. :)
Friday, October 28, 2005
VS2005 and .NET is shipping!
Kudo's to Geoff for watching so attentively. You may not have gotten the scoop buddy but you were the first person I saw that made the announcement. :)
Personally, our company will be making the switch (from VS2003) quite quickly, and I can't wait.
Beware though folks, if you're compiling C++ code you may have a fair chunk of work migrating. The compiler is significantly more strict and we've found many errors (and warnings) that have to be rectified. As a positive, remember that your code will be cleaner when you're finished!
Wednesday, October 26, 2005
Heading OS for awhile
It's a pretty big change. For the past few years I've been a full-time software engineer, beavering away developing features for our product line. This new role is totally about support. It's unlikely that I'll write any code except perhaps for some automation scripts. That'll take some getting used to as I really enjoy writing code.
However, helping customers understand and solve problems with our products is a new challenge that I welcome. I've always believed that to be a really good software engineer you need to thoroughly understand your customers needs so this experience will be invaluable from that point of view.
And I'm really looking forward to spending time soaking in the California culture (alas not much of the sun - I'll be there through winter!) and seeing some of the sights.
The only really tough bit is that my amazing girlfriend Melissa won't be able to come with me. She'll be (hopefully) joining me for a month in the middle of the trip - which will be fantastic! - but we've hardly spent more than a couple of days apart, let alone months. Ugh, that's going to suck.
Baby, if you're reading this, I'm going to miss you like crazy.
Thank goodness for webcams, broadband connections and video chat. ;)
Anyway, I just wanted to give y'all a heads up to let you know that I won't be in the country for much longer. I'll also be starting up another blog to document my adventures over there - I'll post a link to it when I get around to creating it.
Thursday, October 20, 2005
Three links of potential goodness
ShinyFeet is a site that advertises unlimited email and file storage. It's also got some sort of photo gallery feature. Don't yet know what the catch is (probably advertising).
YouSendIt is a cool site that allows you to send a file (up to a gig!) to someone. Here's how it works. Type in a recipient's email address. Upload a file. The file is stored temporarily (for about a week I think) on the YouSendIt server and a link to the file is sent to the recipient. Again, not sure of the gotcha (advertising again?) but it's a pretty nifty idea.
Inquisitor is a(nother) search engine but has AJAX goodness and searches as you type. Pretty sweet. It gathers it's results from Google.
Tuesday, October 04, 2005
Other blogs
Matts iPod News is a blog all about iPods and iPod accessories.
Wireless Cranium is my friend Jiggy's blog. Jiggy is a music buff and really knows his stuff - probably because he owns a pooload of CD's and spends all his spare time absorbed in the world of music. ;) I occasionally write in the blog since I also love listening to sweet, sweet music...
Photo Impression, as mentioned recently, will contain photography news and information as well as links to photos that Jarek (aka J-Man) or I like. It's only early days for this blog but we'll see where it goes...
Then there's this blog which I'm still, even after over a year, trying to figure out what to really do with. I'd like to write more articles on software development but damn they take some serious time that I just haven't had lately. Mostly it's just become a dumping ground for stuff I want to say, which is fine but probably terrible to read! Anyway, I'll try and sprinkle a few software-related posts in amongst the drivel. I hope you get something, even if it's only a tiny something, out of reading this blog!
Monday, October 03, 2005
Lens fixed, a 'new' camera and a new blog
The wonderful folks at the Camera Clinic (no web site unfortunately) on Easey St in Collingwood did a fantastic job with the lens. Not only that but it was just a pleasure dealing with them - they kept me well informed, were sympathetic, spelt out my options and gave me a reasonable price. If you've got a problem with your camera gear I can highly recommend them.
Here's some (hastily taken) shots of my new and improved baby:
Note the general roundness. ;) I heart that lens. :)
The other bit of photograpy-related news is that I bought a 'new' camera. It's an old-school Yashica medium format TLR camera from the early 60's. No photos since I left it at work (maybe tomorrow!) but there is a shot of it in the eBay listing that I won.
I've been fascinated by all sorts of photographic equipment and I've wanted to play with a medium format cameras for years. I haven't run any film through this Yashica yet but, assuming it works properly (it makes all the right sounds though the shutter is a little suspect), I'm intrigued that this relic can produce better images than the most expensive, top-of-the-line digital SLR.
Maybe next up will be a large-format view camera, who knows!?
Finally, I'm going to try and minimise the photography-related posts to this blog from now on. I've set up a new blog, Photo Impression, solely for photography related news. My friend Jarek and I are keen hobbyist photographers and we'll endeavour to post links to photos we like and share any photography-related information. So if you're interested in cameras, lenses and striving to capture the perfect photo take a squiz or subscribe.
Geek Dinner this Friday
Check out the details at Tejas' Blog.
My camera and I are going to make every effort to be there!
Thursday, September 15, 2005
Google Blog Search
Google Blog Search
And an ego search reports a link to this blog - and damn fast too! Kudos Google.
Tuesday, September 13, 2005
Doppler and NPR feeds
Hopefully this'll help someone else!
eBay Buys Skype for $4.1 Billion - Web News News - Designtechnica
But it's still big news. :)
eBay Buys Skype for $4.1 Billion
Saturday, September 03, 2005
Seeing what Katrina has wrought
If you can please donate to the relevant relief funds (and check whether your company can help out - ours matches employee donations).
The Google Earth community has extended Google Earth so that you can visualize what's going on - it helps put things in perspective. Seeing what Katrina has wrought.
Dave Winer is, as always, covering the issue well and posting useful links as is Scoble.
All the best to those folk living in Katrina's wake.
Monday, August 29, 2005
August 26th Geek Dinner Mugshots
It was a pretty short & sweet affair but it was great meeting all you folks! Let's try and make it regular guys. :)
Thanks again to Tejas for organising. :)
Dave Glover
Parvesh Tanwar
Cameron Reilly
Daryl Cook
Tejas Patel
Robin Froosh
Michael Specht
Justin Marshall
Nirav Patel
Chris Bell
Simon Heap
Monday, August 22, 2005
Melbourne Geek Dinner
I'll be there with my camera (still without my blessed 80-200mm) at least for a while. Feel free to say g'day to the guy holding the Nikon. His name will be Matt. :) [1]
I will have to leave early-ish as I try to go to Salsa dance classes (at Viva Cabaret on Smith st) at 9:00 Fridays. If anyone wants to come along Salsa-ing let me know! :)
Looking forward to meeting some more of you... :)
[1] Unless there's another guy holding a Nikon. In which case their name may not be Matt. Though it might be - it's a pretty common name. Regardless, I'm sure you can say hi to him too. :)
Friday, August 12, 2005
Freerunning
Just an awesome clip I saw recently that I want to remember:
Putfile - Upload Video and Upload Images
Thursday, August 11, 2005
Synergy is the schizzle
Engadget recently had a nice how-to.
Great piece of software. :)
There's also the commercial (though it is only US$30!) alternative MaxiVista that takes things even further - allowing you to use an old PC and monitor as a secondary display. It comes recommended by way of Scott Hanselman's 2005 Ultimate Developer and Power Users Tool List.
Wednesday, August 10, 2005
Matt ♥’s...
Bloglines
A web-based blog aggregator.
Matts list of blogs
A list of the blogs I'm subscribed to. There may or may not be something there that you'll enjoy...
Sauce Reader
A client-side blog aggregator.
Blogger
A web-based blog-authoring tool. Owned by Google.
MSN Spaces
Another web-based authoring tool by Microsoft. Has great integration with MSN Messenger.
Technorati
A search engine that only indexes blogs.
PubSub
Another blog search engine.
Doppler
A podcast aggregator.
Matt's list of podcasts
My list of podcasts, to get you started!
Google Maps
Web-based mapping application. Satellite & road data, with local search.
Microsoft Virtual Earth
As above, but from MS.
Google Earth
A client-side map application. Like Google Maps but with a richer interface.
NASA's World Wind
Similar product to Google Earth but open source and uses freely available satellite imagery. No road data.
Microsoft Mappoint
Renamed to Streets & Trips. Rich mapping application. Not free.
Copernic
Desktop search application. Just install it already!
Windows Desktop Search
A solid alternative to Copernic. [BTW Yahoo, Google and many others have other desktop search offerings, these two are just my favourites]
Firefox
Improve your web browsing experience!
Firefox Extensions
One of the many websites that host Firefox extensions.
Matts Firefox Extensions
My list of extensions.
Picasa
Great photo management software, owned by Google.
Nvu
Cross platform, open source web authoring system.
StrokeIt
Mouse gestures for any Windows application.
ToDoList
A simple todo list manager. Allows hierarchical tasks among a plethora of other features.
Firefox extensions
Adblock 0.5.2.039
Bloglines Toolkit 1.5.6
BlogThis 0.3
Bookmarks Synchronizer 1.0.1
BugMeNot 0.6.2
Copernic Desktop Search Toolbar 1.1
Duplicate Tab 0.5.1
Ebay Negs! 0.6
FirefoxView 0.31.1
IE View 1.2.4
Image Zoom 0.1.7.1
lget 0.1
ListZilla 0.5.1
miniT (drag+indicator) 0.5
PDF Download 0.5
Print It! 0.3.6
Resizeable Textarea 0.1a
Scribe 0.21
SessionSaver 0.2 0.2.1.028
Sort Extensions 1.1
SpellBound 0.7.3
SwitchProxy Tool 1.3.2
Tab Clicking Options 0.5.2
Tabbrowser Preferences 1.2.7.1
TinyUrl Creator 1.0
undoclosetab 20041125.5
Web Developer 0.9.3
xMirror 0.2
For some reason Flashblock doesn't appear in this list (which is generated by the extension ListZilla).
And I've recently been impressed with TabMix - if I was to start installing extensions from scratch I would use that tab manager extension which would replace a handful of those above.
Monday, August 08, 2005
Friday, August 05, 2005
Wednesday, July 27, 2005
Google's portal gets RSS
What's more, it's got the funkiest javascript to handle the panel movement. :)
It seems all I'm doing lately is discussing Google!
Tuesday, July 26, 2005
Mapping wars heat up
It's not quite as complete as Google Maps yet but give 'em time. MS have been in this space for a long time (have you heard of TerraServer?) and they'll no doubt improve quickly. And they're actually ahead in some areas - much of their data is very impressive, in some cases providing closer satellite shots that Google Maps.
Oh, and it would be an oversight not to mention that Virtual Earth also has a set of developer API's. Incidentally, that website was created none other than our own Dr Neil.
Speaking of Google Maps, they recently made a nice tweak: there is a new 'hybrid' view that overlays the road and satellite images. Both Virtual Earth and Google Earth had similar features.
Competition is good! Now if either of those products only had good Australian data...
Thursday, July 21, 2005
The joys of photography...and the pain of a hard-learnt lesson
I've always enjoyed shooting photos but in the past couple of years I've begun getting more serious about it. My Dad has a Nikon F801 (N8008 for you US folk out there), a beautiful old 35mm camera, as well as a couple of cheap lenses - a 24-80mm f/3.5-5.6 and a 70-300 f/4.5-5.6. I used it as my own - and loved it - until I decided to take the plunge and go down the digital path. There are many reasons to "go digital" but for me, the way it accellerates your learning and allows greater experimentation was the clincher.
So a year or two ago I purchased a Nikon D100 and the Nikon 24-85mm f/3.5-4.5 lens from a work colleague (thanks Marian!). Great starting kit! Took it everywhere - hiking around Wilsons Prom, sailing, skiing, everywhere. It was robust, reliable and took great photos (a little soft but every camera has it's character).
Then of course I had to buy the Nikon 50mm f/1.8 (yes, I very nearly bought the 1.4 but couldn't justify the cost for the benefit!). Great lens, so flexible, particularly at night where the wide aperture comes into its own. And they're cheap! (I bought mine from B&H which I can highly recommend. Keep in mind that you will be taxed 10% duty when it goes through customs though.) Love that lens, it's just fantastic except for one failing - ensure there are no bright lights in the scene when it's wide open as it suffers from strong ghosting.
Much to my delight, Mum and Dad chipped in and bought me a Manfroto tripod for Christmas and so my kit started to fill out.
However, I was lacking a telephoto. After reading seemingly hundreds of websites I decided that it was time to really get serious so I decided I wanted the Nikon 80-200 f/2.8 (yep, the #4 in that review). I couldn't justify the extra $$$ for the AF-S or the drool-worthy Nikon 70-210 f/2.8 AF-S VR but the 80-200 AFD is, by all accounts, a ripper. Fast, fast focussing, solid and sharp as a tack, this is the kind of lens that defined Nikon and helps make photography a joy. I decided that the only way to buy it here in Australia (where camera gear is horrendously expensive) was via eBay. After many lost auctions I finally won one from a reliable seller than I trusted, even though he was a Texan. ;) When it arrived I was ecstatic, the lens was in great condition and lived up to all the expectations.
That was a month or so ago. During that month I ran out and took many shots with 'my new baby'. All was good.
Last weekend I was shooting a friends soccer game for some sports photography practice. It was windy, overcast and a bit wet - generally terrible conditions. But I was happy, my camera and lens were performing well and I managed to shoot some good shots despite the poor light and weather. Then I made a fatal mistake. Not having eaten all day (I'd gone out shooting photos near Albert Park in the morning) I decided to get some food at the caf at half time. I left the camera on the tripod maybe five metres away from the shop so it was in plain sight and left the kit alone. I turned to pay for my hotdog only to hear the gut-wrenching sound of glass breaking. The camera and lens were lying on the ground, surrounded with glass.
After the chill shot up my spine I ran to pick it up. God it looked bad. However I was fortunate - the only glass that had broken was from my Hoya UV filter. The rim of the front housing was damaged, cracked, but when I'd cleaned out the glass I'd found that I could still focus using the lens and there were no obviously tight spots or nasty sounds. Although there were some minor nicks in the front element the lens seemed optically sound.
But I still felt like vomiting. Literally.
Anyway, there's a lesson here kids - don't, under any circumstances, ever leave your camera sitting alone on top of a tripod. I'm still not sure how it fell over (either a huge gust of wind or perhaps I just simply didn't set the legs out properly? *sigh* I don't know.) but just don't take the chance. Take it off and sit it in your bag.
The sad part is that I knew that. And 99% of the time I would have just instinctively put my baby back in her bag. But for some reason, this time, I didn't. And I paid for it [1].
The lens is currently still functioning well - albeit with the "limit" switch engaged. That switch prevents the lens from close-focussing so it doesn't unnecessarily search if it hunts for focus but in this case it's on to prevent the front elements from extending into the cracked housing. Ick. I feel ill again. But I won't ever hear of anyone poo-pooing Nikon build quality - it's a miracle that the lens still works, hell I shot the rest of the soccer match!
Don't let my disaster story discourage you though - photography is a wonderful pastime, if you enjoy it then get out there and shoot photos! Just remember to look after your gear...
Update: Sorry the original post didn't have photos, I was in a rush to get on my holiday to Daylesford! Here's some hastily-taken shots: <*sob*>
[1] Speaking of paying, I'll be taking it in for repair - hopefully they'll be able to replace the front housing for a reasonable cost.
Monday, July 04, 2005
Boys weekend away
Rather than tell all the stories ("What happens in Portarligton..." ;) ) I just wanted to say I had a great time - it's always going to be fun going away with good company.
Speaking of company here's a list of the lads:
Me
Jeremy ("Jiggy")
Anthony ("Sprocket")
Toshal
Jarek ("J-Man")
Shobhit
Mark ("Screws")
John ("Chisel")
Mick
Stu ("Mallet")
Thanks guys, it was fun. :)
Don't ask about the nicknames - it's a long story! (One of you original tools ought to blog about the tale...)
Congrats to Stu for cleaning up in game one of the almighty poker tournament and Jiggy, Sprocket and Mick for sharing the spoils after the seven-hour marathon of game two.
Oh, and a shout-out (that will probably never be heard!) to the über-sweet Becky from Bendigo for agreeing to appear in a couple of sunset photos. Thanks!
Update: Photos are now online.
* OK, it was eight - Stu and Mick joined us on Saturday.
Google Maps API
Announcement
Google Maps API
Fantastic. :)
Thursday, June 30, 2005
Google Earth
Obviously, Google executives read my recent post revealing my lurve for satellite imagery because they have just release the wicked-cool Google Earth. For free. Freakin' awesome.
Holy crap this thing is sweet. It's like World Wind on 'roids.
What are you still reading for? If you drool over looking at the world as much as I do then get downloading (10 odd meg - but you'll need a fat-ish internet pipe to grab the satellite images on the fly).
Here's the announcement on the Google Blog.
And here's a bunch of interesting places to see with your new favourite gawking tool.
Update: The good folks at Google have now published documentation on KML, the file format used by Google Earth.
Tuesday, June 28, 2005
RIAA/MPAA vs the People. 1 - 0.
OK, so the problem I have with this ruling - in my understanding - is that it provides a precedent for the software developers of specific P2P systems to be responsible for how people use their software. What the? It's akin to stating that the designers of email can be sued for allowing people to send illegal files to each other.
I do have problems with some of the P2P systems - apparently they were trying to "foster infringement" of copyright and that's not on. But the legal precendent that this sets, if it applies to all P2P developers, is concerning.
For what it's worth I believe that any technology should be allowed to be developed. Without restriction. Only how it's used should be of interest to the courts.
Anyway, smarter people than I are writing about this hot potato - here are some links!
Popular Science: Supreme Court Strikes a Blow against P2P Sharing
BBC: File-sharing suffers major defeat
SCOTUSblog: Grokster, StreamCast Lose
Robert Scoble: Major bad news for P2P software
Davenetics: Dowloads No Longer on the DL
Corante: Notes on RIAA and MPAA Press Conference
The actual ruling [pdf]
I dare say that Bram Cohen (creator of BitTorrent) may be a little nervous today...
Monday, June 27, 2005
Google To Launch Online Video Playback
Google To Launch Online Video Playback
Interesting! Particularly since they are going to use an open source alternative to Microsoft's Media player. MS are likely to be upset.
Update: Rumours are true!
Beever's pavement art
Julian Beever
Just incredible! Gotta wonder how he comes up with them - the computer geek in me is figuring out how to write software to generate them...but maybe the guy is just talented! ;)
Satellite support for Australia in Google Maps
Here's lookin' at you Australia, using Google Maps
Local search is still poor and coverage patchy (no high detail images east of the Telstra dome in Melbourne and the Sydney Harbour bridge and Opera house are also low-res only though the city is pretty well covered) but it's a start. Keep up the good work Google!
Monday, June 20, 2005
The Ultimate Developer and Power Users Tool List
Scott Hanselman's 2005 Ultimate Developer and Power Users Tool List
Google set to compete with PayPal
Google Plans Online Payment Service
Competition in this niche is critical - PayPal are really the only players here and their charges, while on the surface reasonable, are not trivial and soon add up. Competition can only be good for us consumers.
I really wonder if banks know what's going on here. Like the recording industries (music & movie) technology has advanced to the point where the old mainstay institutions are being threatened. And they don't seem to be aware of it.
Sunday, June 19, 2005
BadFruit
If you can't wait that long then check out BadApple. It's a plugin for iTunes that does what 4.9 promises right now. Looks nice but I haven't used it - caveat empor! Oh, BTW it's Windows-only.
Personally, I'll continue to use Doppler. It's not perfect but it does the job.
Friday, June 17, 2005
Scott Rosenberg wants a left-handed camera
Is it really that hard to adjust? ;) I'm pretty confident I could happily shoot left-handed without too much trouble...
As for his comments on trackpoint devices - hell no, can't agree, I think they suck. I have both a trackpoint and trackpad on my laptop and, while competent with both, I find the 'nubbin' just too imprecise. Same argument for a trackball (thumbs just aren't dextrous enough). YMMV.
Marc Pesce: Piracy is Good?
It's amazing that the movie & television industry, let alone the music industry, is so unaware that they are going to have to drastically change...or become irrelevant.
Thursday, June 16, 2005
Google to make an iTunes clone?
Melbourne Blogger catch-up
Personally I felt like shit. I've just been floored with some sort of 'flu and couldn't talk much - it physically hurt. Sorry guys if I was out of it! In particular I wanted to talk with Cam a little more about the business model he and Mick have developed for The Podcast Network (maybe that link will bump you guys up the technorati rank?) but it was difficult so I thought I'd get my thoughts out in blog form while they're fresh!
So, my problem with the business model - or any involving podcasts - is that I'm not sure that there's significant money in it as a publisher. The whole point of podcasts, the huge advantage of this 'new medium', is that it's so cheap to publish. In theory anyone can do it with minimal cash and effort.
Actually, I'm going to interrupt myself with an important side discussion; right now it actually takes a great deal of effort to create a podcast. The tools are poor - it's not easy to produce a high-quality, effectively compressed audio recording. Nor is it trivial to create and update RSS feeds with enclosures. It's not rocket science but, especially for non-techy people, it's far from easy.
Further, as Cam and Mick found out, it can cost a lot of dosh if your podcast becomes even moderately successful due to high bandwidth fees.
However, both of these issues (ease of creating and cost of bandwidth) will eventually go away. Tools will get better and distribution methods (like using bittorrent) will improve. I firmly believe that within a reasonable time frame (something like a year or two?) it will be easy and cheap enough for my Mum to create and publish a podcast if she so desired.
So, moving on...One of Cam's three pillars of goodness ;) that TPN provides is that it ensures a high quality of show. Listeners will be more inclined to listen to a 'cast from TPN than somewhere else because it's on TPN. A fair point. But perhaps that assumption doesn't hold in a blog-rich world. Personally, I listen to podcasts based on what other bloggers tell me. If there's a really good quality podcast then I'll find out about it from the blogs I read. News travels very fast these days and if someone is producing something - anything - of high quality (or low quality!) you hear about it damn quick. Maybe publishers, and advertising, are a lot less important than they used to be.
I'm not completely sold on that last paragraph myself but thought it might be worthwhile saying it anyways... :)
A couple of other links to stuff we talked about:
Gretchens blog (the drama began on June 1st)
Robot hand (so cool!)
Thanks to Phil for the use of the centre (loved the fire!) and to Cam for organising.
[I see Cam has already blogged about the night!]
Update: A couple of photos are online.
Sunday, May 15, 2005
Generic Programming in C++ part 3a: Palindromes
If you've been to an interview where you've been asked to write some C++ code, there's a fair chance that you'll have come across the "isPalidrome" problem.
It goes something like this: A palidrome is a group of letters that is the same written backwards or forwards. The challenge is to write a function that tests whether a given string is a palindrome.
A typical solution may look something like this:
bool isPalindrome(const std::string &str)
{
std::string::const_reverse_iterator itEnd = str.rbegin()++;
for (std::string::const_iterator itStart = str.begin(); itStart < itEnd.base(); ++itStart, ++itEnd)
{
if (*itStart != *itEnd)
{
return false;
}
} return true;
}
(Actually, if you're in an interview you may have forgotten to start at before the one-past-end iterator and you may not have used a reverse iterator or perhaps forgot the call to base when comparing iterators and reverse iterators. Those kind of things you can be forgiven!)
That solution works fine. Use two iterators, one pointing to the first and one to the last characters (which, as mentioned above is one before that returned by end). Compare the characters and move the iterators toward the middle of the string. If any comparison fails, the string is not a palindrome. Finish when the start iterator is past the end (note that this takes into consideration both finishing conditions ie when there is an even or an odd number of characters in the string).
[There are other algorithms but we’ll stick with this one for now.]
We can do better. Why not write it generically? It may not be obvious to you, but std::string is a container. We can apply this same algorithm for any other container. Consider writing reusable functions generically – especially after ‘getting them right’ non-generically.
template <typename RaIterator>
bool
isPalindrome(RaIterator begin, RaIterator end)
{
for (--end; begin < end; ++begin, --end)
{
if (*begin != *end)
{
return false;
}
}
return true;
}
Something has changed; we’re assuming that two random access iterators have been passed in. We need random access iterators because of the less than operator, which is only provided on these kind of iterators. And you’ll not that we’ve used a bidirectional operation – the decrement operator – instead of using a reverse iterator. That’s to avoid weird syntax – asking the user to supply two different kinds of iterators is unusual (and prone to error!) and you won’t see that done in any standard algorithm.
Usage is slightly different, now we have to pass in stringname.begin() and stringname.end() instead of just stringname. But again that’s consistent with the Way Of The Standard. (It also has an advantage - we can operate on slices of a container.)
So how is this better? Well, if we have a vector of characters we can use this function. Or if we have a vector of longs. Or a deque of longs. Or an array of longs. We could even have a vector of strings that form a sentence and use this function to determine if the sentence is a palindrome!
You get the picture. Generic is better.
Unfortunately if we have a list or set of chacters we can’t use this function – you’ll get an ugly compilation error. Why? Because lists only provide bidirectional iterators. And bidirectional iterators don’t give us that lovely less than operator. So any container that provides anything less than random access iterators will not compile. Bugger! I wonder if we can get around that limitation…
Tune in to part b where I improve our isPalindrome function further, so we can use it with lists!
[I’ll admit that thinking at this level of abstraction is difficult in an interview situation but when you start thinking generically you’ll find that it won’t be too much of a stretch. Disclaimer: In the last interview I sat I wrote the first example…]
Thursday, May 12, 2005
Spicks & Specks
Last night a friend (Heya Age! When are you going to start your own blog?) and I went and watched the recording of two episodes of the ABC’s music trivia show Spicks and Specks.
Gotta say, we both had a great time (though two episodes was bordering on too long) and I can recommend anyone go see it. You’ll have to grab the phone number (I can’t remember it and they don’t have it on the website, sheesh!) at the end of the show to register interest for tickets, which are free. Filming is at ABC studios in Elsternwick.
Adam Hills was a terrific host that earned a great deal of respect from us just because he was so honest, approachable, funny and real.
Myf and Alan were also damn funny – I lost it when Alan broke his chair! You’ll see what I mean in six weeks or so… The guests were also great – I don’t want to name them and spoil the surprise but one half of Lano & Woodley was on and in fine form!
Adam and the team really indulge the crowd, playing up on heaps of gags that will never make it to air. Thanks everyone at the ABC for a terrific show.
Anyways, if you don’t watch the show it’s great fun and is on Wednesday nights at 8:30. Enjoy!
Generic programming in C++ part 2b: A better example with CComSafeArray and standard containers
In the last post I asked the question "How do you normally copy containers". Let’s explore that.
A typical way would be to use the standard algorithm copy. (Note that there are many ways to copy containers, some are even more efficient, but this one suits the purposes of my explanation)
std::list<long> listOfLongs;
// Fill list here
std::vector<long> vectorOfLongs;
std::copy(listOfLongs.begin(), listOfLongs.end(), std::back_inserter(vectorOfLongs));
copy takes a range and an output iterator. The range is iterated over and each element is copied to the output iterator – after each copy the output iterator is incremented. It’s expected that the ‘thing’ that the ouptut iterator points to can hold all of the elements in the range.
For a vector (or, in fact, any automatically-sized container) this often isn’t what you want. Instead, you often want elements to be added to the container. But how should the algorithm add elements to a container? In fact how can an algorithm add elements to a container when, I’m sure you remember, algorithms don’t know anything about containers! Algorithms only know how to use iterators.
This may not be crystal clear yet so I’m going to make a point of it. Algorithms only know about iterators. They know nothing about containers. This is intentional and A Good Thing. Why? Because by enforcing that limitation algorithms can work for any container you provide – assuming you also provide iterators for that container (and that the iterators meet the requirements of the algorithm).
Now, we were trying to figure out how an algorithm can add elements to a container. The C++ way to do that is via an inserter which, in standardese, is a form of iterator adaptor. An inserter provides an iterator interface for a container. The algorithm ‘sees’ an iterator. But when the algorithm tries to assign to that iterator, the inserter kicks in and does something different. That ‘something different’ depends on what inserter you’re using but ultimately it (usually) adds an element to the container. It also does nothing when the iterator is incremented. If you think about that for a second that’s exactly what we were trying to do.
So how does the inserter know how to add elements to the container? Doesn’t that mean that it needs to know about the specific container type? No. Well, kind of. Inserters are templated on the container type. If we look at the example above, we’re using back_inserter. That particular inserter requires that the supplied container has a push_back method. Conveniently, vector does. Had the inserter been front_inserter, which requires push_front, compilation would have failed because vectors can’t insert elements at the front (efficiently).
So what does all this have to do with CComSafeArray? CComSafeArray is (almost) a container and we’re going to write an inserter to allow us to use them in algorithms when an output iterator is required. That means that we’ll be able to use the standard copy algorithm to copy elements from any container to a CComSafeArray.
template <typename Container>
class add_iterator : public std::iterator<std::output_iterator_tag, void, void, void, void>
{
protected:
Container& container;
public:
explicit add_iterator(Container & c) : container(c) {}
template <typename ValueType>
add_iterator<Container>&
operator=(const ValueType& value)
{
container.Add(value);
return *this;
}
add_iterator<Container>& operator*()
{
return *this;
}
add_iterator<Container>& operator++()
{
return *this;
}
add_iterator<Container>& operator++(int)
{
return *this;
}
};
template <typename Container>
inline add_iterator<Container> add_inserter(Container& c)
{
return add_iterator<Container>(c);
}
OK, so what’s going on here? An inserter has two parts. There is a class that is the iterator and does all the grunt work. There’s also a templated convenience function that creates and returns an instance of the iterator. That’s a fairly common idiom in the standard (see make_pair) and permits nicer syntax by taking advantage of the fact that templated functions can infer types. We mentioned back_inserter and front_inserter before, these are actually convenience functions that create an instance of the iterator classes back_insert_iterator and front_insert_iterator respectively. Without those convenience functions the syntax would be less appealing and more prone to error. For example, the code above would look like this:
std::copy(listOfLongs.begin(), listOfLongs.end(), std::back_insert_iterator<vector<long> >(vectorOfLongs));
So that explains the add_inserter function. Digging deeper, the add_iterator is actually pretty straightforward. It publically inherits from iterator which is a standard library class that defines a number of useful typedefs that all iterators are required to define. It’s just a convenience class saving you from defining a few things yourself. Assigning does what we described above, that is, it just calls Add (which must exist) on the container (you’ll notice that Add is the method that CComSafeArray provides to append elements). Incrementing (and dereferencing) are no-ops.
I glossed over the fact that assignment operator is a templated function. This usually isn’t necessary because containers are meant to expose the type that they contain. If you dig into any of the standard library provided iterators you’ll find that the type that the assignment operator takes is known. Normally we could have defined the assignment operator like so:
add_iterator<Container>&
operator=(const Container::value_type& value)
{
container.Add(value);
return *this;
}
Containers are meant to provide a definition for value_type.
Unfortunately, CComSafeArray doesn’t (hence the reason it’s almost a container) so we have to make the assignment operator a function template. No big problem, it just means that if you try to assign the wrong type via the inserter then your error message may be fairly cryptic – something like: “cannot convert type X to CComSafeArray<T>.Add() where T is Y”.
You may also have picked up that this inserter isn’t actually tied to CComSafeArrays. If you have any other containers that use an Add method to add elements then this inserter will work just as well for them.
And that’s it! We’ve harnessed one of the great strengths of the STL design – extensibility – and created an inserter, a form of iterator adaptor, to a container-like class so that we can make use of existing standard algorithms. Sweet!
Stay tuned for Part 3 where we give the age-old interview question “isPalindrome” a generic workover!
Friday, May 06, 2005
Generic programming in C++ part 2a: A better example with CComSafeArray and standard containers
Shortly after posting the original entry I thought of a better way to create a CComSafeArray with standard containers. Fifteen minutes later - much less time than it took to write the blog post! - I had working code.
Because I want to get some sleep now I'll have to post the code later. In the meantime I want you to think about it!
OK, you want a hint? How do you normally copy containers - say from a list to a vector?
In part 2b I'll show you how to write very similar code that works for CComSafeArrays.
Thursday, May 05, 2005
Happy Birthday Dave
Tuesday, May 03, 2005
Generic programming in C++: An example with CComSafeArray and standard containers
For those of you developing in C++ with COM you’ll be familiar with the all-too-common SAFEARRAY. You’re probably also familiar with CComSafeArray which is a useful class to wrap up the rather raw SAFEARRAY and aid in memory management.
This blog entry isn’t meant as a primer for SAFEARRAY and CComSafeArray usage, there are plenty of good sites for that.
What I would like to talk about is using generic programming for day-to-day tasks.
What is generic programming? Good question, tough to answer. In C++, generic programming is writing code that works for many types by coding solutions based on concepts. A concept defines what the supplied abstract datatype are required to provide in order to get the job done.
Confusing? Initially it may well be. How about we look at a real (albeit trivial) example:
template <typename T>
T
max (T a, T b)
{
return (b < a) ? a : b;
}
In the code above, max is a function that takes in two items (of the same type) and returns the largest of the two. The above code can be used for any T provided it supports the less-than operator. [In standard-library lingo T (the abstract datatype) must satisfy the concept of “Less Than Comparable”.]
This code is maximally reusable and, as such, is A Good Thing. It’s an example of generic programming because, in and of itself, max doesn’t know about T and thus works generically for any type (that supports the less-than operator). We can write max once and it’ll work for all types. Beautiful.
In my experience, occasions to create generic code like max occur more frequently than most developers realize. I believe it’s because it takes awhile to become accustomed to “seeing” generic solutions. For example, consider if our generic version of max didn’t exist but we needed a function to compare two integers. It would be all too easy to write:
int
max (int a, int b)
{
return (b < a) ? a : b;
}
Then, when we have longs to compare, or floats, we could copy and paste the code and change “int” to “long” or “float”. Avoid such code! Duplicating code is evil and should be avoided. If you notice yourself copy and pasting code regularly it may be an indicator that you could benefit from generic coding techniques.
Here’s a real world example I came across the other day at work.
We use SAFEARRAYS and CComSafeArrays often. We also need to manipulate them in various ways so we often covert them to standard containers as they have a wide variety of algorithms that we can employ. Usually we have to convert them back (to pass back over a COM API). Someone had noticed this and written a conversion function:
// Remember to delete the returned pointer
SAFEARRAY *
CreateSafeArrayFromVector(std::vector<long> vec)
{
CComSafeArray<long> sa;
for (std::vector<long>::iterator it = vec.begin(); it != vec.end(); ++it)
{
sa.Add(*it);
}
return sa.Detach();
}
In fact there were a whole bevy of these conversion functions. CreateSafeArrayFromVector that worked for floats. For doubles. On unsigned longs. We also had to work with std::lists so CreateSafeArrayFromList was born, duplicating all the vector functionality. Remember that much of the code is practically identical, we’re just adding things to a safe array! What a mess.
A single generic function could (and has) replaced it all:
template <typename FwdIterator>
CComSafeArray<typename std::iterator_traits<FwdIterator>::value_type>
CreateCComSafeArray(FwdIterator first, FwdIterator last)
{
CComSafeArray<typename std::iterator_traits<FwdIterator>::value_type> sa;
while (first != last)
{
sa.Add(*first++);
}
return sa;
}
Much cleaner! How is it used?
std::vector<T> handles;
//...
CComSafeArray saHandles = CreateCComSafeArray(handles.begin(), handles.end());
You’ll notice a few changes. I chose to use CComSafeArrays because there’s no obvious reason not to. It increases type safety and decreases the chance of memory leaks. You’ll see that we pass in iterators to the function now. That allows abstraction from the specific container type. If you’re familiar with using the standard library you’ll notice that this is a fundamental tenet in algorithms – all of them do the same thing. There’s an important point here, if you’re passing containers in your function declarations you’re not programming generically. Instead, create a templated function and expect iterators to be passed in. Tricky to grasp at first but so clean when you bend your brain around it (repeat after me, “algorithms operate on iterators!”).
You’ll also see something about iterator_traits. What the? Without going in to too much detail (again, it’ll have to be another article), iterator_traits is supplied by the standard library to provide compile-time information about the supplied iterator. std::iterator_traits<T>::value_type resolves to the type that T points to. [There’s a whole bunch of things that iterator_traits provides.]
I’ve called the type “FwdIterator” because I require the iterator to support the post increment operator – the concept of “Forward Iterator” defines this requirement.
But don’t get too wrapped up in the lingo. Read the code like this:
“Give me two iterators pointing to the start and end of a range”
“Create a CComSafeArray containing the same type of objects as the iterators point to”
“Add elements to the CComSafeArray from the iterators and return the CComSafeArray when done”
If you can grasp the high level ideas then the syntax comes relatively easy.
In the future I’ll talk about the pair function, FillFromCComSafeArray. See if you can write it yourself!
Relevant links:
SGI’s standard library documentation
Sunday, May 01, 2005
Gallery: FAQ Item C.22
Every so often I upgrade it or perform some sort of maintenance on it. And everytime I have to search for a particular link that tells me how to configure the software so that I can view it from inside my LAN and from the Internet. I want to preserve the linkso I don't lose it again!
It's item C.22 of the FAQ.
I do recommend the software though ngallery and coppermine look quite good too.
What do you use to host your photos (and BTW I'm not interested in any online facility, flickr is great and all but I want to host them on my own PC thanks very much)? :)
Tuesday, April 26, 2005
Code Camp OZ - I want details dammit!
Anyway, now I want to know how it went. First reports seem like it was great but I want details! Are slides going to be made available? What was your favourite presentations and why? And, especially for me, what details were there about C++/CLI? Is anyone else using it?
A big shout out to Thomas Williams for the offer of a lift up there. Sorry I had to bail Thomas, hopefully there'll be another Code Camp and I'll be able to take you up on your generous offer! :)
I just noticed that I was down as the "C++/CLI co-ordinator"...I didn't even realise! Sorry Mitch if I agreed to that and didn't let you know I wasn't able to attend early enough to find a replacement.
Friday, April 08, 2005
Podcasts
The Dawn and Drew Show [rss]
Engadget [rss]
Adam Curry's Daily Source Code [rss]
.NET Rocks! [rss]
Triple J's Hack [rss]
TPN: G'Day World [rss]
TPN: The MS Developer Show [rss]
TPN: The Tech Conference Show [rss]
TPN: Matt, Freak and the Fatboy [rss]
Reel Reviews Radio [rss]
Dave Winer's Morning Coffee Notes [rss]
Battlestar Galactica [rss]
I try to listen to more but just don't have the time. As it is I'm finding that I'm getting progressively further behind. Today I was listening to some podcasts from early March!
When I have another spare few minutes I'll also put links to the actual feeds.
Enjoy George! :)
[Update: Well, I've updated the list! I listen to a few more these days...and I added the rss links. Enjoy Tom!]
Wednesday, March 16, 2005
Monday, March 14, 2005
Cirque du Soleil: Quidam
I've been sitting here trying to summarize what a Cirque du Soleil show is all about and it isn't easy. The show is a unique blend of artsy theatre, astounding athletical stunts, breathtaking live music, stunning costumes and pure comedic routines all rolled into one entertaining extravaganza. They've been touring for many years, beginning in their home country of Canada in 1984, and have gone from strength to strength to the point where they're now playing many shows simultaneously worldwide.
Thankfully, beginning this month, they started touring Melbourne.
I've been juggling (purely as a hobby!) for a few years now and was kicking myself that I missed Saltimbanco, Cirque du Soleil's first show here, in 1999. I was amazed when I saw the show on video (thanks Luke!) and vowed that I wouldn't miss another when they next toured. Unfortunately, a series of events prevented me from seeing Alegria in 2001 so you can imagine how keen I was when I heard that Quidam was touring.
Very keen! It didn't disappoint, it was fantastic!! I'm not going to review the whole show but here are some of my personal highlights:
The diablo girls. Holy crap. How they can spin those little tops with such precision and poise is beyond me. I've used a diablo a few times and it's taken me hours to figure out the simplest tricks. Watching the four girls deftly spin, toss and catch the diablos was amazing.
Skipping ropes. Simple concept right? Everyone's used a skipping rope! If you're around my age you probably did the "Jump rope for heart" program in primary school. In Quidam however, their motto must be "Jump rope gone crazy". People skip while they're skipping inside a 'double dutch'. Be blown away when the soloist (Norihisa Taguchi) skips on his bum.
Contortion in silk. The Cirque folk like dangling props from their specially-made roof. One of my favourites was where they dropped two gorgeous strips of red silk and had their acrobat (Isabelle Vaudelle) dance her way up and down them. Different in tone to the rest of the acts, this was quite emotional, serious and breathtakingly beautiful.
Banquine. Not sure how that exactly translates but here's a guess: "people throwing". See men and women fly through the air at dizzying heights as their colleague's throw them with ease! Check out the woman that is absolutely hurtled around. Hold your breath at the end where they attempt to make a vertical four-man tower.
Two of the funniest acts employed more tradition methods - improvised clowning around. Get some people out of the audience, have a vague plot; just add mischief. Haven't laughed so hard in ages!
Probably my favourite act was Vis Versa, or Statues. A man and a woman link their bodies in a slow-moving dance of incredible strength and balance. Unbelievable.
Although these are but a selection, the entire show was fantastic. Every second was enjoyable. The live music perfectly complemented each act, the lighting was sublime as were the dazzling costumes. Everything just reeked of professionalism and was just a delight to see. Highly, highly recommended.
For those out there that haven't yet purchased tickets, go do yourself a favour! The tickets are reasonably expensive (around the $100 mark) but what the show lacks in affordability it makes up for in kick-ass-ability.
Can't wait for the next show! (Or maybe I'll see it again...)