Google Chrome (browser, not OS, yet ;-)) for Mac
Google Chrome for Mac has arrived (albeit in Beta form).
I’m delighted to be using Chrome again … but unfortunately it does seem to have some issues re resource usage when it comes to streaming music
Sometimes – though not always – after listening to streaming musing on lastfm for half an hour or so I find the mac goes sluggish, to the point of noticeable delays between pressing keys and seeing the text appear. Sure enough, Activity Monitor shows something is amiss: a Google Chrome Helper is taking >100% CPU and >600 MB of memory; closing the lastfm window returns everything to normal levels and the machine is responsive again.

Oh dear. A Google Chrome helper gone awry.
Moving from Windows to Mac: Culture shock, ignorance, or Is OS X Actually Overrated?
I’ve recently made the leap across the divide and having never really touched a Mac before, splashed out £1600 on a MacBook Pro. Seeing Vista Aero for the first time had caused me to snap somewhere deep inside (oh the waste of opportunity!) and I vowed then the next machine I bought would be a Mac. About a year later, with my Tosh sounding like a 1960’s hoover I stumped up the cash to make my desertion a reality (despite Windows 7 coming out in the interim with rave reviews).
So, I am now a blissed out and smug Mac user, raving about OS X to anyone who will listen.
I wish.
In fact, it has not been the dreamlike nirvana I was hoping for .. in fact it’s been a mixed bag. In fact, as much as I hate to bring delight to my friends who told me not waste my money, at the moment I’d have to admit It Is Not Working Out All That Well.
Some possible causes for this:
- I am completely ignorant of OS X so, despite having 15 years experience of developing on and maintaining Windows boxes, and 5+ years on Unix a long time ago, I am bound to find aspects of a new-to-me OS bewildering. As much as I try to make allowances for that, it is bound to leave a bad taste in the mouth and make me a bit grumpy.
- I am a software developer using Flex Builder on a very big project, so although I can run from Windows, I cannot hide from the fact Eclipse (and specifically the FB plug-in) is a bit of a dog on all but small projects, and should just learn to make better use of my 3 minute downtimes.
- Moving to Mac is like going to see a film that everybody has been raving about for weeks; no matter how good it is, it is going to be a disappointment
- Moving to Mac is choosing to be part of a minority which has downsides (some apps are either not available, or flakey since a lower priority for the software co.) as well as upsides (dramatically fewer viruses, sense of coolness and belonging)
- OS X isn’t actually as good as it’s made out to be
I suspect it is a combination of all of the above (and others?), but here’s a list of thoughts and experiences from my journey so far.
Shocks re the OS itself (OS X, 10.6 Snow Leopard)
- There is no ‘Create new …’ on the context menu in a folder. Googling on this revealed that there is a free Mac utility NuFile – but that is not available for Snow Leopard (causing some users to refuse to upgrade for that reason alone … which says something about the value of that functionality, and thus the oversight of not building it in to the OS).
- Installing apps involves downloading a .dmg Disk Image file, which looks like a file but which is ‘ejected’ instead of deleted. This is fine now I know what it means but for a system that I’d thought was super simple to use, I found it a bit bewildering at first.
- .* files are invisible in Finder – and as a result you can’t replace a file via drag and drop. I find that pretty annoying – such files are relatively common (e.g. .actionScriptProperties, .project etc) and I want to be able to manage them like other files. It is possible to list the files in Finder – by changing the search criteria to specifically list whether files are visible or not – but it’s fiddly and it’s not possible to have the default view list everything in a sensible way.
- When ’svn update’ hangs in the terminal (reason TBC, but may be something dodgy in the repo, so not in itself an OS X issue), ctrl-C fails to kill the process (!). I can put it in the background via ctrl-Z, and could move it to the foreground and back again, but kill %1% wouldn’t kill it and ctrl-C doesn’t kill it. In fact closing the terminal window doesn’t kill it – despite warning that it will – so I have to do a force quit via the Activity Monitor … I was hoping I’d left that kind of thing behind with Task Manager!
- This morning – just as I was about to add ‘Reliable recovery from sleep’ to my list of Good Things About OS X, my machine failed to wake up properly. Specifically, the notification area in the top right was ‘beachballing’ (the Mac’s ‘too busy for words’ animated cursor) and Activity Monitor wouldn’t open to let me see what was going on. I restarted (with sadness in my heart) only to reach a blue screen and stay there (darker shade of blue, same sense of dread). In the end I had to do the ‘hold down power key of death’ routine … at which point it did restart pretty quickly and recovered where I was at. So, some positives in the end, but I’d rather have been able to write ‘Never fails to wake up’ below
- The ‘Applications’ folder – which is effectively an equivalent to the Start menu – doesn’t let you change the size of the icons. You can display it as a list, which is smaller, but they’ve missed a trick there – would be nice to have a 2-D layout of small icons (and being able to group them would be even better). Googling on this turned up lots of gripes on this – apparently it was nice in Leopard (which has further put pay to the belief I had that Apple always did sensible things).
- In my opinion, the Mac approach of having the application menu bar always appear at the top of the screen – which may be some way from the window(s) used by that app – doesn’t make as much sense as the Windows approach of having each window self-contained (i.e. the menu bar is attached to the window itself). I don’t like having to move my eye/mouse up past potentially half-a-monitor or more of unrelated windows etc. to get from the work area to a menu controlling that work area. In particular I also don’t like it that when I close all of the windows used by an app, it continues running. But maybe that’s just a question of adjustment on my part.
Software not available for OS X, or flakey on it
- TortoiseSVN is evidently the envy of the Mac world. Even the paid-for SVN clients on Mac are, by common consent, nowhere near as good. I’ve tried several, and I miss TortoiseSVN something rotten. Subclipse does work fine … but I really want something outside of the IDE since Subclipse
- a) requires I have a whole load of projects open, which has various repercussions and
- b) stops me doing much else in Eclipse while an update is grinding away, even when in background
- I miss Google Chrome! It should be coming out soon for OS X and I’m counting down the days, or would be if I had a firm date. I know Firefox is cooler for us Developers, and I hate to be a slave to a Might Be The Devil In Disguise gargantuan, but I just love Chrome, FireFox just seems clunky and ugly in comparison .. and Safari, though fast, has a problem with remembering passwords that’s a showstopper when using SAAS apps.
- MSN Messenger has a Mac version but I can’t for the life of me work out how to access the preferences on it. Must be me being dim somehow, but I’m not a complete ninkenpoop so I think there must be some kind of issue there. At the moment I’m getting bling notification noises throughout the day and can’t work out what’s causing them … I suspect it is someone coming online on MSN, but can’t find the preference to disable such notifications!
Eclipse/Flex Builder-specific issues
- Dragging and dropping multiple files into Flex Navigator only copies one file (!). That seems like a major to me. Cmd-C/Cmd-V copies multiple.
- Flex Builder 3 plug-in is not compatible with Eclipse Galileo on OS X (see earlier post). Hopefully will all come good with FlashBuilder.
- Overwriting a file (in Eclipse) does not show details re the sizes and modification times of the files involved – I find those really valuable in determining if I should overwrite or not, or in confirming to me that a file I was expecting to be updated by a build had been.
Good things
Of course with all this grumbling I should point out the positives too … and I’m sure this list will grow as I learn more.
- The MacBookPro machine itself is lovely. Looks great, mousepad is great, speakers are great, backlit keys mean I don’t need a nightlight on if working late, magnetic power plug is practical and feelgood, etc. etc. Even if this ends up primarily a Windows 7 box it won’t have been a complete waste of money … though er, some of it would have been.
- DOS vs *nix in the terminal? No competition, it’s nice to be home in that respect.
- The dock is clean and pretty.
- The four-finger-sweep-to-show-min-versions-of-all-windows is nice
- The ability to change desktop every X minutes and/or when waking up is nice. Maybe Windows has that and I just didn’t notice?
- Ok, I had to restart, but that was after a week of uptime … I don’t think Vista behaved that long between reboots, and I heard a first bad report of Windows 7 today, so maybe that’s not a silver bullet either.
So, that’s a dump of my thoughts/experiences so far. I’ll endeavour to add more as I go. Other thoughts/contributions more than welcome!
kdw.
Stopping the elevator music when netbook is in standby
We recently got a Samsung NC10 Netbook for my wife. It’s a big hit – but I was getting driven round the wall by the ‘music’ that kicked in 10 minutes after the lid was closed.
Googling about this turned up a similar compaint on a forum but with no-one replying with a solution. Eventually however I stumbled across the answer – the music is part of the default screen saver (’imagine digital freedom’ – though I’d say ‘imagine you are in an elevator’ would have been more appropriate) … so is disabled by changing screen saver to any of the other options (via Properties on the desktop).
hth
kdw
As a postscript, I tried to do the decent thing and post this Gem Of Knowledge as a response on the forum I mentioned – but it turns out that forum (Digital Spy Forums) wants £5.00 from me to register – on the basis I use a gmail account and they need to keep the bots out. That’s a shame because keenness to be a responsible netizen saw me through filling out a registration, but two pint’s worth of silver is a step too far. Thanks goodness for blogs and search engines.
AdvancedDataGridAccImpl issue
Today I added Kapit Inspect (http://lab.kapit.fr/display/kapinspect/Kap+Inspect) back in to my project to help me debug some strange goings on. The compiler then started complaining with:
- Definition mx.accessibility:AdvancedDataGridAccImpl could not be found.
- Access of undefined property AdvancedDataGridAccImpl in package mx.accessibility.
Explanation (yeah, like it was that easy): Kap Inspect uses AdvancedDataGridAccImpl, which is not included in the base Flex SDK download – it is in the additional data visualisation zip (available from http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk) which I hadn’t installed on the sdk on this new machine. Doh.
k.
Flex Builder 3 plugin, Eclipse, OS X
Trying to install Flex Builder 3 with Eclipse Galileo on OS X … no dice.
As reported at http://furiouspurpose.blogspot.com/2009/06/flex-builder-3-on-eclipse-35-gallileo.html, after downloading the Eclipse bundle for PHP developers I could install FB3 on Galileo. However,
- Compiler warnings then got displayed one at a time i.e. just displays first problem, had to fix and recompile to reveal the next one – not good for productivity
- When I tried to install the Java Development Kit (from Europa Discovery site) in order to install Ant, the installation failed, saying that only one of JDK or the PHP tools could be installed. I need Ant tools, so that’s a showstopper.
I’ve now gone back to Ganymede which works – though I can’t say I’m delighted with performance on my new MacBookPro
Waiting for Flash Player to connect to debugger …
I’ve just had a fun hour with the curse of the ‘Waiting for Flash Player to connect to debugger’.
I’m on OS X on my brand-spanking-new Macbook Pro, and Flash Builder suddenly stopping launching my app – in debug or plain launch – which was starting to take the shine off of what should have been a happy day.
There’s lots on this problem about the place – with quite a few different causes. In the end I solved my particular issue with something not mentioned in any of the posts I came across – my html-template folder needed to have the flex framework swf (framework_3.3.0.4852.swf – which was copied from frameworks/rsls under the SDK) in place.
Hope this helps someone else, kdw.
A better e4x example
Given some XML of the following form:
<documents> <document type="salesInv" url="assets/demoData/inv_acme_20090920.pdf"> <metaData type="date" value="20/09/09"/> <metaData type="coName" value="ACME Industrial"/> <metaData type="orderNo" value="1"/> </document> <document type="correspondence" url="assets/demoData/inv_acme_20090616pdf"> <metaData type="date" value="16/06/09"/> <metaData type="from" value="David Davidson"/> <metaData type="to" value="Andrew Andrewson"/> </document> <document type="salesInv" url="assets/demoData/inv_acme_20090820pdf"> <metaData type="date" value="20/08/09"/> <metaData type="coName" value="ACME Industrial"/> <metaData type="orderNo" value="2"/> </document> <document type="salesInv" url="assets/demoData/inv_acme_20090820pdf"> <metaData type="date" value="20/08/09"/> <metaData type="coName" value="Botheringtons"/> <metaData type="orderNo" value="3"/> </document> </documents>
… and using a ‘SearchCriterionVO’ of the following form:
public class SearchCriterionVO { public var fieldId:String; public var value:String; }
… a series of search criteria can be used to filter the XML via:
var filteredDocs:XMLList = documents; for each (var criterion:SearchCriterionVO in searchDetails.criteria) { if (criterion.value.length > 0) { filteredDocs = filteredDocs.(child('metaData').(@type==criterion.fieldId && @value==criterion.value).length() > 0); } }
e4x expression tool and examples
I like Flex, but being a big fan of XSLT and XPath, E4X drives me mad – to me the notation is clunky and counter intuitive (compared to XPath), though I do concede that may be because of what I learned first.
I don’t find myself using non-trivial E4X expressions quite often enough for it all to become second nature … so I find this online e4x expression tool very useful.
While I’m making a note-to-self on the subject of e4x, I have just (re)established, that if you want to find a list of nodes which have at least one non-empty descendent of a certain type, the expression is of the form:
a.b.c.(d.e.(text().length()>0).length() > 0)
I’m not seeing a lot of lists of e4x examples out there, so I’ll try to remember to add further e4x examples as comments to this post – and please feel free to do the same!
kdw
Programmatically getting DataGrid to sort
I’ve just had a merry time getting a DataGrid to sort by a particular column (and show the apt arrow in the header) when it first renders i.e. as if the user had clicked the header.
Googling on the subject suggested (http://blog.flexexamples.com/2008/02/28/displaying-the-sort-arrow-in-a-flex-datagrid-control-without-having-to-click-a-column/) that defining dataProvider.sort then calling dataProvider.refresh() would have the desired effect – however for me it didn’t work: the arrow got displayed, but did not sort the column properly – until the user actually clicked the header, at which point it all came good (and continued to re-sort when items were added).
In the end I had to use a rather literal solution to the problem i.e. simulate the user clicking the header by dispatching a DataGridEvent.HEADER_RELEASE event:
...
var eventOut:DataGridEvent = new DataGridEvent(DataGridEvent.HEADER_RELEASE, false, false, myColIndex);
myGrid.dispatchEvent(eventOut);
...Not ideal, but it worked – so posting here in case it helps anyone else.
kdw.
Excellent blog on the TDD test-code-refactor cycle
Just stumbled upon http://schuchert.wikispaces.com/Mockito.LoginServiceExample which, though I got there by googling on Mockito, is actually probably the best detailed example of the TDD test-code-refactor cycle I’ve seen – specifically describing a strategy for keeping the tests passing as smoothly as possible.