tag:blogger.com,1999:blog-77880522024-03-14T02:38:33.849+11:00Sublime SoftwareIt's all just ones & zeros! Musings by an Australian C++ developer...Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.comBlogger131125tag:blogger.com,1999:blog-7788052.post-10570475021006340812009-11-03T12:11:00.001+11:002009-11-03T12:11:27.101+11:00Boost Spirit 2.1<p>I'm <em>very</em> impressed by what Joel, Hartmut and the rest of the folks have done with the 2.1 release of Spirit.  The syntax has been improved, the code is much neater and more powerful – bravo guys!  </p> <p>If you use C++ and have a need for a parser do yourself a favour and check out Spirit.</p> <p>Spirit 2.1 will be in Boost 1.41.0, which is due for release <em>any time now</em> (it's currently in beta).  Until then you can read the <a href="http://svn.boost.org/svn/boost/trunk/libs/spirit/doc/html/index.html">pre-release documentation</a>.</p> Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com1tag:blogger.com,1999:blog-7788052.post-62194935684748759182009-07-08T07:04:00.001+10:002009-07-08T07:04:21.042+10:00CppDepend<p>Geektastic!  The company that develops <a href="http://www.ndepend.com/">NDepend</a>, the sensational source code analysis tool for .NET, has just released a C++ counterpart.  I intend to spend a great deal of time analysing our code with <a href="http://www.cppdepend.com/Default.aspx">CppDepend</a>.  Available for free as a beta.  </p> <p>[Via <a href="http://www.gregcons.com/KateBlog/PermaLink.aspx?guid=8b759c73-8e14-4405-a48b-20b1f89d5d70">Kate Gregory</a>.]</p> Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-66381453509840152022009-05-23T09:00:00.001+10:002009-05-23T09:00:54.291+10:00VMWare Server 2 Remote Console and Synergy<p>I've got <a href="http://www.vmware.com/products/server/">VMWare Server 2</a> install on one of my machines here and I was trying to use the Remote Console (which installs as a Firefox extension) to connect to a Windows XP VM I was creating.  But no dice.  The keyboard and mouse inputs were not being redirected to the VM.</p> <p>After trying a bunch of things I stumbled on turning <a href="http://code.google.com/p/synergy-plus/">Synergy</a> off.  Voila, the mouse and keyboard works as expected.</p> <p>[Incidentally my recommendation is to use the <a href="http://code.google.com/p/synergy-plus/">Synergy+</a> client; the original Synergy client appears to be pretty much abandonware and the Synergy+ folks are doing a great job at fixing bugs.]</p> <p>So there's my tip of the day:  If you find your keyboard and mouse not working as expected with VMWare Server 2's Remote Client take a took in your system tray.  If Synergy is running turn it off and see if Remote Client responds.  Worked for me!</p> Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-42686940827436468502009-04-13T21:45:00.002+10:002009-04-13T21:50:22.850+10:00Code Snippets for C++ in VS2005<p>Visual Studio 2005 introduced the concepts of <em>code snippets</em>. Handy little chunks of commonly-used code that are easily inserted to your own with some Intellisense magic. Hit a keypress, choose the snippet, fill in any fields and voila.</p> <p>C# and VB users were spoilt; MS supplied a bunch of snippets to do many common tasks. Iterating over containers, creating regions, defining classes…many common tasks were snippetified. Further, there were <em>many more</em> online.</p> <p>Alas, C++ users were left in the dark with <em>no snippet support at all</em>.</p> <p>Thankfully the release of the "<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=CD7C6E48-E41B-48E3-881E-A0E6E97F9534&displaylang=en">Microsoft Visual Studio 2005 IDE Enhancements</a>" addressed that issue (also known as the VS2005 "Powertoys"). After installation you get – among a few other questionably useful tools - C++ snippet support in VS2005. There are only two problems. 1) If you're using Vista you get a bizarre error <sup><a href="http://www.blogger.com/post-edit.g?blogID=7788052&postID=4268694082743646850#FirstFootnote">1</a></sup> when you try to run the installer. 2) You don't get any C++ snippets installed. Instead Microsoft makes the <em>C# snippets</em> available in C++. Thanks guys. Anyway, let's address those problems.</p> <p>1) The issue here is that Vista requires administrator privileges to install this package. Had the install package been an exe we'd have been fine; shift-right click and select "Run as Administrator". Alas it's an MSI so we'll have to find another way. The simplest, as <a href="http://blogs.msdn.com/ukvsts/archive/2007/01/11/installing-the-tfs-power-toys-on-vista.aspx">described by the MS UK Dev Team</a>, is to fire up a command shell, running it as admin (open the start menu, type 'cmd' then shift + right-click the cmd.exe icon), change to the directory where you downloaded the PowerToy installer then execute the command:</p> <blockquote> <pre>msiexec /i "VSSDK_PowerToys.msi"</pre></blockquote><p>Then follow the GUI installer as normal. Oh, you'll need to exit from all VS2005 instances.</p><p>[You may notice – well, I did – that Visual Studio will have a bit of a conniption fit when you restart. It appears that it's setting itself up for the first time again. Not sure why. Thankfully all my keybindings etc remained intact and there were no noticeable problems but YMMV.]</p><p>2) Once everything is installed correctly you should find that the "Tools->Code Snippets Manager" should now have "Visual C++" listed as a language. Good sign. However by looking through the supplied list of snippets you'll find they're all actually <em>C# snippets</em>. You'll want to write your own C++ snippets. To do that you'll need a snippet editor since writing the XML by hand is tedious (far from impossible but annoying).</p><p>Of the bunch of tools I found that edited snippets only <a href="http://snippy.codeplex.com/">Snippy</a> supported <em>C++ snippets</em>. Snippy works fine but doesn't seem to have a binary distribution so you'll need to download and build it (a VS2005 solution file is supplied). After you run it create your own snippets and save them somewhere (like "Users\YourName\Documents\Visual Studio 2005\Code Snippets\Visual C++\YourSnippets"). You can then add those snippets to VS2005 using the Snippet Manager.</p><p>I haven't discussed the format of a snippet, it's pretty easy to figure it out from <a href="http://msdn.microsoft.com/en-us/library/ms379562.aspx">Microsoft's documentation</a>. But <a href="http://matt-trentini-web.s3.amazonaws.com/code/snippet/header.snippet">here's one</a> to get you started. If people ask nicely I'll try and post more.</p><p>And that's it! Now you should be ready to create your own wicked-cool C++ snippets. Let me know if you have any rippers!</p><hr /><p><a name="footnote1">1</a>: The error is something like: "Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor." I love how the error makes it so clear that administrator privileges are required.</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com5tag:blogger.com,1999:blog-7788052.post-84271569124398628652008-04-23T23:42:00.001+10:002008-04-23T23:42:25.804+10:00Code Camp '08<p>Once again I'm going to miss <a href="http://www.codecampoz.com/">Code Camp</a>.  Too many other things going on (holiday to book, birthday party x 2, BBQ Friday, gathering to go to Sunday) to justify heading away for three days to geek out.  In other words my girlfriend will be <em>über cheesed</em> if I go.  ;)</p> <p>Have fun if you're going!  Wish I was there too.</p> <p>PS I've got a plan for next time.  I'll present on some topic - that'll be way easier to sell to my <a href="http://en.wikipedia.org/wiki/Significant_other">SO</a> than if I'm just tagging along...</p> Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-16331371112469667352008-04-11T18:04:00.001+10:002008-04-11T18:04:30.396+10:00Building Boost 1.35<p>I'm a big fan of the <a href="http://www.boost.org">boost</a> library for C++ development.  They're incredibly well designed and implemented, generally cross-platform, and quite well documented.  In short, they're awesome.</p> <p>However, I regularly have issues building them (on Windows with the VS2005 compiler).  Thankfully I'm not alone.  <a href="http://heifner.blogspot.com/2008/03/building-boost-1350.html">Kevin Heifner</a> ran into the same problems I did when trying to build the recently released 1.35 and documented a work-around.  Thanks Kevin!  It worked a treat.</p> <p>The summary is that the <a href="http://www.boost-consulting.com/">Boost Consulting</a> group, who usually put together a nice <a href="http://www.boost-consulting.com/products/free">installer</a>, haven't yet published one for 1.35.  Further, following the instructions on the <a href="http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html">Getting Started</a> page that describe how to build boost led me astray.  With hindsight I think the major problem was that the "stage" directory mentioned in the example needs to be created before the build commences.  Anyway, Kevin provides an alternative set of command line options for bjam:</p> <blockquote> <p><font face="cou">cd "C:\Program Files\boost\boost_1_35_0"</font></p> <p><font face="cou">bjam --toolset=msvc --build-type=complete --prefix="c:\program files\boost\boost_1_35_0" install</font></p> </blockquote> <p>Then just configure your projects <em>Additional Library Directories</em> to include "C:\Program Files\boost\boost_1_35_0\lib".</p> Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com2tag:blogger.com,1999:blog-7788052.post-37887702381132977902008-04-04T17:59:00.000+11:002008-04-04T18:02:00.398+11:00Wireshark matures; v1 is released<p><a href="http://www.wireshark.org">Wireshark</a>, formerly called Ethereal, has <a href="http://www.wireshark.org/news/20080331.html">made it to the 1.0 milestone</a>. Congrats to Gerald Combs and the team. Wireshark is an amazingly useful application that helps analyse network traffic.</p><br /><p>As a software engineer it's an invaluable part of my toolkit and I'm very grateful for the many folks who work on this wonderful open-source (GPL) application.</p><br /><br />Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-47015158523834473302008-04-04T17:28:00.002+11:002008-04-04T17:30:42.865+11:00Internet Sharing: Mac to Windows<p>Sharing an Internet connection from your Mac is trivially easy:</p><ul><li>Open <span style="font-style: italic;">System Preferences</span></li> <li>Choose <span style="font-style: italic;">Sharing</span></li> <li>Tick the <span style="font-style: italic;">Internet Sharing</span> checkbox</li></ul><p>Typically I share out my wired <span style="font-style: italic;">Ethernet</span> connection over wireless (<span style="font-style: italic;">Airport</span> in Mac parlance).</p><p><a href="http://matt.trentini.googlepages.com/InternetSharingMac.png"><img src="http://matt.trentini.googlepages.com/InternetSharingMac.png" alt="InternetSharingMac.png" height="326" width="389" /></a></p><p>You'll need to configure the <span style="font-style: italic;">Network Name</span> (the SSID) and the encryption settings. Unfortunately WPA is not yet supported so your best bet is 128 bit WEP. You'll also need to choose a 13-character password if you want Windows computers to share your network (if you're network only has Mac's then feel free to choose any length password).</p><p><a href="http://matt.trentini.googlepages.com/InternetSharingMacDetails.png"><img src="http://matt.trentini.googlepages.com/InternetSharingMacDetails.png" alt="InternetSharingMacDetails.png" height="171" width="283" /></a></p><p>Connecting any Mac to this network is trivial. Simply turn on AirPort, browse to the network and enter the password.</p><p>Unfortunately, from a Windows PC it isn't quite so obvious - you can't just auto-detect the network and enter the password. You'll need to perform the following steps:</p><ul><li>Open Control Panel, Network Connections and click on Wireless Connections</li> <li>Add a new wifi network</li> <li>Enter the Network Name that you created on the Mac - it must match <span style="font-style: italic;">exactly</span></li> <li>Set the Network Authentication to <span style="font-style: italic;">Shared</span></li> <li>Set the Data Encryption to <span style="font-style: italic;">WEP</span></li> <li>Uncheck "The Key is Provided Automatically" and enter the 13-character password that you chose earlier</li></ul><p>You should now find that the Windows PC can connect to the network.</p><p>If you're using a wifi manager other than the standard Windows functionality then you may need to experiment on the various settings. One manager I had to configure wouldn't work until I chose <span style="font-style: italic;">Enterprise</span> as a network type.</p><p>I'll try and get some Windows screenshots soon (my VM doesn't have a wireless connection).</p><p>Hope that helps someone!</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com5tag:blogger.com,1999:blog-7788052.post-89647967246285398232008-04-01T09:19:00.000+11:002008-04-01T09:20:25.013+11:00Google Docs goes offline<p>Google Docs has just <a href="http://googleblog.blogspot.com/2008/03/offline-access-to-google-docs.html">gained the ability to go offline</a>. This makes the simply office suite significantly more useful as you no longer need to be tethered to an Internet connection while editing your documents. Naturally they've used <a href="http://gears.google.com/">Google Gears</a> to implement this. Mental note: Get up to speed on Gears!</p><p>My Google Docs doesn't yet reflect the feature but I presume it's rolling out through all the Google servers as we speak...</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com2tag:blogger.com,1999:blog-7788052.post-33941231915678091212007-12-07T18:16:00.001+11:002007-12-07T18:16:46.461+11:00Google Chart API<p>Google have just <a href="http://google-code-updates.blogspot.com/2007/12/embed-charts-in-webpages-with-one-of.html">announced</a> their <a href="http://code.google.com/apis/chart/">Chart API</a>. This is freakin' awesome! Anyone can now embed charts into their web pages (yes, even your blogs!) by whacking in a well-constructed url.</p> <p>Here's a quick chart I whipped up that shows average maximum temperature for each month:</p> <p><img src="http://chart.apis.google.com/chart?chs=400x250&cht=lc&chd=t:97.037,100.000,80.741,53.333,26.667,4.444,0.000,10.370,25.926,45.185,64.444,84.444&chxt=x,y&chxr=1,12,28&chxl=0:|Jan|Feb|Mar|Apr|May|June|Jul|Aug|Sep|Oct|Nov|Dec&chf=c,lg,90,FF5A5A,1,bbbbff,0|bg,s,EFEFEF"> </p> <p>Nice, eh?</p> Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-32052445296019035262007-11-16T17:38:00.001+11:002007-11-16T17:38:40.637+11:00Don't share intermediate directories<p>OK, I've been bitten by this issue twice.</p> <p>Take care when setting the intermediate directory (Project->Properties->Configuration Properties->General->Intermediate Directory) for Visual C++ projects.</p> <p>If you have multiple projects that use the same intermediate directory you are likely to run into problems. </p> <p>Specifically, if you're using a multi-core machine to build projects that share an intermediate directory and those projects happen to build in parallel the second project will fail when it tries to delete the files in the intermediate directory.</p> <p>One way to ensure this never happens is to set the intermediate directory to <em>$(ProjectName)_$(ConfigurationName).</em></p> <p>This is particularly nasty because if you create two vcproj's in the same directory this will happen with the default parameters.</p> Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-69500469193301874532007-08-20T11:49:00.000+10:002007-08-20T14:19:34.463+10:00My code's compiling...<p>The biggest problems with Moore's law and the power of PC's these days is that compilation time is constantly <em>decreasing</em>.</p><br /><p><a href="http://xkcd.com/">xkcd</a> knows what I'm talking about...</p><br /><p><a href="http://xkcd.com/303/"><img style="margin: 5px;" alt="" src="http://imgs.xkcd.com/comics/compiling.png" /></a></p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-49305835733457492152007-08-09T10:43:00.000+10:002007-08-20T11:52:50.151+10:00Mac Mini upgrade...finally!<p>Amongst the fanfare of the Apple iMac range overhaul I didn't initially catch that the <a href="http://www.macrumors.com/2007/08/07/apple-quietly-updates-mac-minis/">Mac Mini has also been upgraded</a>! I've been waiting for this for a long time so I can use one as a front end for my MythTV system.</p><br /><p>Not only have the processors and RAM been upgraded (Core 2 Duo 1.83 or 2.0 GHz, 1Gig RAM) but the price has come down too.</p><br /><p>Now is the <a href="http://buyersguide.macrumors.com/#Mac_mini">right time to buy</a>.</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-1999236857795907142007-08-07T01:19:00.000+10:002007-08-07T01:32:21.502+10:00Firefly (aka mt-daapd)Firefly is a wonderful implementation of a DAAP server. What is <a href="http://en.wikipedia.org/wiki/Digital_Audio_Access_Protocol">DAAP</a> I hear you ask? It's an audio streaming protocol introduced by Apple to allow you to stream music from one PC to another over a network. In simpler terms it lets you host all your music on your server and play them through iTunes (or some other apps).<br /><p>Unfortunately, the version of Firefly in the Ubuntu repositories is a little old and stopped working for me when I recently upgraded my iTunes. Upgrading it wasn't as easy as normal in Ubuntu so I thought I'd list the steps I took:</p><ul><li>Uninstall the old version<br /> <ul><li><span style="font-family:Courier;">sudo apt-get remove mt-daapd</span></li> </ul> </li> <li>Delete configuration files and the database as they appear to be incompatible (YMMV).<br /> <ul><li><span style="font-family:Courier;">sudo rm /var/cache/mt-daapd/songs.db</span></li> <li><span style="font-family:Courier;">sudo rm /etc/mt-daapd.conf</span></li> </ul> </li> <li>Download a <a href="http://nightlies.mt-daapd.org/">recent build</a><br /> <ul><li><span style="font-family:Courier;">wget http://nightlies.mt-daapd.org/dl.php?FILE=mt-daapd_0.9-svn-1586_feisty_i386.deb</span></li> </ul> </li> <li>Install package<br /> <ul><li><span style="font-family:Courier;">dpkg -i </span><span style="font-family:Courier;">mt-daapd_0.9-svn-1586_feisty_i386.deb</span></li> </ul> </li></ul><p>Now reconfigure Firefly. There's probably a much better workaround than deleting the config files and the database but Firefly is so easy to set up that it's not worth figuring it out!</p><p>Thankfully, I can now, once again, play my music through iTunes from my Ubuntu server.</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-77310479437752732242007-08-07T01:13:00.000+10:002007-08-07T01:14:22.391+10:00Mac Defect: Samba mountingI've found a workaround to what appears to be a bug in the OSX Finder. When you mount a network drive (over samba) sometimes the drive appears, then promptly disappears. Attempting to mount the drive again results in the error "Volume already mounted". Dang.<br /><br />The workaround is to "Go to Folder" (Shift-Apple-G) and enter "/Volumes". You should find your network drive there.Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-49631114137550529972007-08-07T00:46:00.000+10:002007-08-07T01:14:47.217+10:00Chicken of the VNC - Slow connecting to Ubuntu<a href="http://sourceforge.net/projects/cotvnc/">Chicken of the VNC</a> is undoubtably one of the coolest-named apps around. And, in most situations, it's the best VNC client on the Mac. But it has some serious issues when connecting to my Ubuntu (Feisty Fawn) server - it's slow to the point that it's unusable. <br /><br />Twiddling with the various options doesn't make a difference. No idea what's causing the issue; if anyone can enlighten me I'd appreciate it!<br /><br />In the meantime I use the venerable <a href="http://homepage.mac.com/kedoin/VNC/VNCViewer/">VNCViewer</a>. It hasn't been updated in <em>years</em> but it connects to my server just fine (although it does drive CPU usage high).Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com4tag:blogger.com,1999:blog-7788052.post-85985695458580398292007-07-30T00:57:00.000+10:002007-07-30T00:58:23.616+10:00dm_mirror and LVM's pvmove<p>To allow <a href="http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)">LVM</a>'s <a href="http://linux.die.net/man/8/pvmove">pvmove</a> command to work you need support for dm_mirror in the kernal. Simply enter the following at a terminal:</p><br /><blockquote><br /> <p><span style="font-family:Courier">modprobe dm_mirror</span></p><br /></blockquote><br /><p>The error I received when I <em>didn't</em> have that module loaded was:</p><br /><blockquote><br /> <p><span style="font-family:Courier">mirror: Required device-mapper target(s) not detected in your kernel</span></p><br /></blockquote><br /><p>If you use LVM regularly you may want to add support for this at startup; there are a few ways you can do this but I choose to add to the modules list at /etc/modules. (Just use vim and add "dm_mirror" to the end of the file.) I'm on Ubuntu (Feisty Fawn) so YMMV.</p><br /><p>BTW, for conveniance, there's no difference between "-" and "_" in module names. dm_mirror and dm-mirror are interchangeable.</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com1tag:blogger.com,1999:blog-7788052.post-3650965351151134702007-05-13T23:54:00.000+10:002007-05-13T23:57:24.870+10:00Ubuntu and MythTV notes<p>I've been wanting a particular server PC for <a href="http://trentini.wordpress.com/2006/12/29/mythtvoh-and-moving-out/">a long time now</a>; a PC that I could use to record TV, be the main storage area for all of my data (especially music and photos), remotely trigger downloads and perform backups from. Installation of this PC is well underway but I wanted to post about a couple of stumbling blocks I had in case others were having them (or unless I had to go through it again!).</p><p>Background: The two major software choices I've made were to use <a href="http://www.ubuntu.com/">Ubuntu</a> for the OS and <a href="http://www.mythtv.org/">MythTV</a> for the TV recording. I've been <em>very</em> happy with both decisions; <em>highly recommended</em>.</p><p>The vast majority of users will find Ubuntu amazingly simple to install. I had a couple of slightly unusual requirements however...</p><p>I wanted to use a filesystem called <a href="http://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29">LVM</a>. The main benefit for me with LVM is that you can add extra storage space whenever you want. LVM abstracts the logical mapping of mount points from the physical hard disks and partitions. An example: Today I may have a mountpoint at /var/mydata and it may be mapped to a partition on my current 320 Gig HD. Tomorrow I could drop another 500 Gig HD in and add some (all if liked) of it to /var/mydata.</p><p>In the Windows world this would be like having a 320 Gig drive appearing as C:/ then adding another 500 Gig drive to it. [I've been told Vista has some support for this kind of thing - can anyone confirm?]</p><p>It's a <em>very</em> useful feature (and Unix OS's have had it since '98) particularly for a server where my storage needs are going to be ever-increasing. </p><p>Unfortunately there is a <a href="https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/96802">problem</a> with LVM under Feisty Fawn, the latest version of Ubuntu. LVM, as installed when using apt-get, seems to be located in the wrong place. Thankfully John has <a href="http://blog.sontek.net/archive/2007/03/26/LVM2-Package-Broken-in-Ubuntu-Feisty.aspx">written up a simple work-around</a>. It may also be related to <a href="https://bugs.launchpad.net/ubuntu/+source/devmapper/+bug/106696">another defect</a> with the libdevmapper package. Either way it's easy to fix with those two references.</p><p>Installing MythTV is remarkably easy under Ubuntu, just follow <a href="https://help.ubuntu.com/community/MythTV_Feisty_Backend_Desktop">this guide</a>. Unfortunately my capture card (a Leadtek WinFast 1000 - basically a bog-standard DVB card) didn't work straight-up. It wasn't being properly detected in the MythTVconfiguration. Turns out that for some reason I was missing a couple of required kernal modules. Again, <a href="http://ubuntuforums.org/showthread.php?t=417758&page=3">hitting the Internet</a> quickly gave me a pointer in the right direction. <em>dvb_core</em> and <em>cx88_dvb</em> were the culprits; adding them with the following commands:<br /> </p><blockquote style="font-family: courier new;"><p>sudo modprobe dvb_core<br />sudo modprobe cx88_dvb</p></blockquote><p>solved the issue. Of course, resetting the PC would mean that these modules would be missing next boot so I also had to add them to <em>/etc/modules</em>.</p><p>They were the biggest stumbling blocks (though installing <a href="http://svn.whuffy.com/index.fcgi/wiki">shepherd</a> - a <em>wonderful</em> EPG for Aussies - took some trial-and-error!). I've now got a stable system that I can record TV (remotely if I like using MythWeb) easily. I've still yet to shift all of my data to the box nor are backups happening yet, but it's just a matter of time.</p><p>Check out Ubuntu and MythTV, I've had a good experience with both of them!</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com1tag:blogger.com,1999:blog-7788052.post-74490299916285121972007-04-18T07:31:00.000+10:002007-04-18T07:45:03.170+10:00Google to release online Powerpoint competitorGoogle <a href="http://googleblog.blogspot.com/2007/04/were-expecting.html">just announced</a> that presentation software will be added to their online <a href="http://docs.google.com/">Docs and Spreadsheets</a> package "this summer". So it won't be long before they have all of the major building blocks that defined Microsoft's Office package - available from a web interface.<br /><br />The really exciting part of this news for me though was that the software was acquired from a company called <a href="http://www.tonicsystems.com/">Tonic Systems</a>. Tonic is "based in San Francisco and <span style="font-weight: bold;">Melbourne, Australia</span>"! <br />As a keen software dev in Melbourne I'm shocked and disappointed that I hadn't even heard about these guys...someone needed to throw me a frickin' bone here... ;)<br /><br />[Although Tonic's webpage has been replaced by a Google announcement you may still be able to get at the old page - ironically - by using <a href="http://72.14.253.104/search?q=cache:ruIpk41nxjkJ:www.tonicsystems.com/+tonic+systems&hl=en&ct=clnk&cd=1&gl=au&client=firefox-a">Google Cache</a>.]<br /><br />I'm really looking forward to using this application!Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com1tag:blogger.com,1999:blog-7788052.post-85934661087428524672007-03-01T10:21:00.001+11:002007-03-01T10:21:54.119+11:00Hotspotr - Community WiFi Cafe Hotspots<p><a href="http://hotspotr.com/wifi">Hotspotr</a> is a sweet <a href="http://en.wikipedia.org/wiki/Mashup_(web_application_hybrid)">mashup</a> that displays cafe's with wireless using Google Maps. It's community driven, so go enter more for <a href="http://hotspotr.com/wifi/map?ll=-37.814251%2C144.963169&name=Search%3A+melbourne%2C+australia&map_zoom=12">Melbourne</a>!</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-82948045591713751982007-02-16T00:48:00.001+11:002007-02-16T00:48:09.630+11:00Switched to Google Reader<p>About three weeks ago I migrated from <a href="http://bloglines.com">Bloglines</a> to <a href="http://www.google.com/reader">Google Reader</a>. I'd checked out Google's offering some time ago but found it lacking, particularly given that I was such a Bloglines devotee having used it for <em>years</em>. </p> <p>Turns out that the more recent version of Google Reader is <em>fantastic!</em> So much so that I've made the complete switch. Apart from now being as stable and up-to-date as Bloglines, Reader has a much better (and prettier) interface and has a killer feature up it's sleeve; <em>your unread blog posts are protected from aggregator and/or browser crashes</em>.</p> <p>Here is the scenario: You go away for a day (or three) and come back to read your blogs. You put aside and hour (or three) and start to delve into the 900 new posts that have accumulated. It's at this point that Bloglines blows. If you choose the regular option and read all of your new posts ("A") then Bloglines tries to download <em>them all</em> into your browser - all at once. </p> <p>More often than not something goes wrong and the download doesn't complete. Occasionally the browser presents problems (huge memory consumption, high CPU usuage or, sometimes, a crash) as it tries to render the humungous page of posts. So, with large numbers of new posts, there's a very real chance you're going to lose them all. They disappear into the darkest depths of the blogosphere. You see, Bloglines marks them as read <em>once the download begins</em>. Anything goes wrong, kiss new posts bye-bye.</p> <p>Google Reader is smarter. Instead of downloading them all at once it fetches 20 at a time with AJAXy goodness. When you approach the bottom it grabs the next 20. When each entry is highlighted (when it has focus, or as you thump on the "j" key) it is marked as read. Simple. Slick. And not even a browser crash will cost you more than 20 unread posts. Very slick.</p> <p>Google Reader isn't perfect and Bloglines is still a great web app but for now I'm a very happy Google Reader fan.</p> <p>Now, if you're not using a blog aggregator then get on to it! <em>Everyone</em> will be soon, simply because it's the best way to absorb information that is of relevance to you. I can recommend Google Reader.</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com2tag:blogger.com,1999:blog-7788052.post-1170725546942680442007-02-06T12:32:00.000+11:002007-02-06T12:32:27.010+11:00Google Maps down under<p>Sweet, Google has just <a href="http://googleblog.blogspot.com/2007/02/google-maps-down-under.html">announced extended support</a> for the Google Maps Australia site. You can now perform business searches and get driving directions.</p> <p>Now, if they could just add the Google Maps road information to Google Earth...</p> <p>[BTW, until they do, you can use <a href="http://www.gearthblog.com/blog/archives/2007/02/google_street_maps_o.html">this tip</a> as a workaround; it will download the correct 'tile' from Google Maps and semi-transparently overlay it in Google Earth.]</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-1170638458792063832007-02-05T12:20:00.000+11:002007-02-05T12:20:59.273+11:00make_pair is your friend<p>One common newbie code smell I've seen a lot of recently is the unnecessary definition of a typedef for a pair of items:</p> <blockquote> <p><font face="Courier New">typedef std::pair <Type1, Type2> myPairForMap;</font></p> <p><font face="Courier New">typedef std::map <Type1, Type2> myMapType;</font></p> <p><font face="Courier New">...</font></p> <p><font face="Courier New">myMapType m_Map;</font></p></blockquote> <p>The idea is that you can do this:</p> <blockquote> <p><font face="Courier New">m_Map.insert( myPairForMap(foo, bar) );</font></p></blockquote> <p>What many people seem to not understand is that there is a more elegant way - use std::make_pair:</p> <blockquote> <p><font face="Courier New">m_Map.insert( std::make_pair(foo, bar) );</font></p></blockquote> <p>make_pair is a templated function that returns a pair of items. It's a simple function so I'll repeat it here in its entirety:</p> <blockquote> <p><font face="Courier New">template <class T1, class T2></font></p> <p><font face="Courier New">pair<T1, T2> make_pair(const T1& x, const T2& y) {</font></p> <p><font face="Courier New"> return pair<T1, T2>(x, y);</font></p> <p><font face="Courier New">}</font></p></blockquote> <p>See? It detects what types you're passing in and returns a pair containing the items. No need to define the pair typedef.</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com2tag:blogger.com,1999:blog-7788052.post-1164585657959401942006-11-27T11:00:00.000+11:002006-11-27T11:00:58.056+11:00To the spammers...<p>Could you prats please stop spamming this blog? I <em>will</em> delete your comments quickly so it's a fruitless exercise. I don't want to have to use moderated comments but if this keeps up I will be forced to.</p> <p>I do use Bloggers captcha facility and yet still some spam comments are getting through. Are actual people creating these comments or have the automated spam systems become more sophisticated?</p> <p>I don't expect this post will help at all but venting relieves stress. :)</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com0tag:blogger.com,1999:blog-7788052.post-1161569440993901712006-10-23T12:10:00.000+10:002006-10-23T12:10:41.043+10:00DLL not found exception<p>I've been working on a C++ project recently that involved creating a DLL. Although I had unit tests to pummel the objects that were used inside the DLL I wanted an easy way to test the DLL itself through its interface. I chose to create a C# Winforms app that used the DLL using interop.</p> <p>Really easy to do:</p> <blockquote> <p><font face="Courier">[DllImport("YourDll.dll")]<br>public static extern int MyFoo(string bar);</font></p></blockquote> <p>There's heaps of documentation out there for this kind of stuff. Suffice to say that the .NET framework goes to great lengths to make this happen as easily as possible.</p> <p>One gotcha that I ran into though was that initially the JIT compiler threw an exception - a <em>DllNotFoundException</em>. I checked to ensure that the DLL and EXE were in the same directory, I used dumpbin to ensure that the DLL was correctly exporting the expected symbols etc...couldn't figure out what was wrong. </p> <p>Turns out that <em>my DLL had a dependency on another DLL</em> that wasn't in the path. Unfortunately the exception doesn't give you any further useful information so watch out for this problem.</p>Matthttp://www.blogger.com/profile/04031430589111581249noreply@blogger.com5