Espresso IconI’ve been very busy of late so haven’t much time outside of work or family life to post but here’s a very quick update a lot of people are going to be happy to see – I’ve just sparked up Espresso and it would appear that the MacRabbit guys are back on the case and have just dropped Espresso version 1.0.6, the official release notes for which state:

  • Improved launch time with many Sugars installed
  • Improved compatibility with Mac OS X 10.6 Snow Leopard
  • Improved text encoding detection
  • Improved performance when dragging remote files to Finder
  • Improved FTP compatibility with some types of servers (Microsoft FTP)
  • Added FTP active/passive support under Advanced server settings (auto-detects by default)
  • Fixed missing files opening an empty window on launch
  • Other small fixes and improvements

I’ve not had time to try the new version yet asides from opening it and it definitely launches faster. The big news in this release (asides from the fact that Lénaïc is back on the case!) is that Snow Leopard compatibility is sorted – handy since we’re inevitably all going to rush out and install it tomorrow no matter how many bugs it has and how many of our apps actually work with it :)

It's been a while since we've seen this message

It's been a while since we've seen this message

Now all we need is Pixelmator 1.5 to drop tomorrow!


Espresso IconAnother quick post: MacRabbit have released Espresso version 1.0.5, the official releases notes for which state:

  • Added Go To Line tool (command-L)
  • Fixed likely causes for crashes on startup
  • Fixed a possible scenario where remotely created files could become empty when saving
  • Improved Publishing compatibility
  • Other small improvements

A “Go To Line” tool isn’t the most exciting of tools – it jumps to a line of text in a file – but it has been implemented with unusual visual flair beyond the typical Cocoa/Carbon Mac dialog box favouring a slick custom panel with Core Animation effects to pop in and swoosh out (to use the Keynote transition terms).

Espresso's Go To Line Dialog

Espresso's Go To Line Dialog

There are two ways to look at this: on one hand, it’s the kind of visual polish that adds to the user experience Mac owners have come to expect. Playing devil’s advocate, there are other feature omissions that may have benefited from some effort such as project-wide search and CSSEdit integration. My personal view is somewhere in the middle as I do like the tact that MacRabbit are seemingly taking where we’ll get features when they feel they are truly ready to be released in a way that suits the application (Pixelmator-style) but there are some features (like go to line) that I don’t think should have been missing from a 1.0 release. If Espresso was still labelled a beta I think it would be hard to find fault with the product. Hit COMMAND + L to bring up the Go To Line window.

One of the “other small improvements” that’s worth documenting is MacRabbit have fixed the Preview menu, one of my original usability gripes with the program. In fixing the menu option, the keyboard shortcut is also fixed so again, for new users, the first impression will of a much more complete product. The keyboard shortcut to access the preview is now ALT + COMMAND + P.

On a personal note, my custom entity shortcuts made it into the 1.0.5 release with Ian’s latest TEA for Espresso Sugar :)

There are no Sugar API changes to report in this release unfortunately but the guys working on Sugars are still churning out some fantastic new features nonetheless.


I blogged about the indispensable features Ian Beck’s TEA for Espresso brings to Espresso last week which elevate it above the simple (but very good looking) text editor it initially appears to be.  TEA is very easy to extend to run shell scripts and insert custom snippets for example and I was planning to add a custom markup formatter but in playing about with TEA, I’ve tried a few simpler additions that make working with HTML, XML and XSL that bit quicker.

The Espresso tab insertion mechanism for snippets is great for dropping in “complex” blocks of code triggered by a snippet name but when it comes to inserting a single character (or character entity) a keyboard shortcut seems more practical, after all typing amp then pressing tab twice involves the same number of keys as just typing &.

Two characters I find myself using often enough that I miss the old Homesite/Eclipse style shortcuts for the XML-friendly equivalents are & and the non-breaking space, & and  . When it comes to XSL work, the angle brackets can be simplified too to a single key combo. To that end, I’ve added the following shortcuts to my Espresso installation:

Shortcut Output Description
Ctrl Shift Space   Non-Breaking Space
Ctrl Shift 7 & Ampersand
Ctrl Shift , < Left Angle Bracket
Ctrl Shift . > Right Angle Bracket

[I'd be keen to see the non-breaking space and ampersand added to the core TEA platform (to Espresso as a whole) to bring it in line with many other editors so I'll drop Ian a note and see what he thinks :)]

Adding the Shortcuts Above – The Easy Way

To add these shortcuts to your Espresso, download a copy of my Actions.xml file which I’ve shared from Box.net (happy to try another sharing service if people can recommend a better alternative). I’ve shared the file in one of two formats to hopefully circumvent firewall issues:

Download as XML file (2.1kB)

Download as ZIP file (551b)

Either save it into your ~/Library/Application Support/Espresso/TEA/TextActions folder or if you have already created and customised this file, simply open it and merge in the shortcuts you need. Once you drop the Actions.xml file into that folder, choose the Actions > TEA >Toggle Custom User Actions menu item and restart Espresso twice for it to pick up the new options.

The instructions on Ian’s site make creating custom extensions a walk in the park and to save some time, I’m sharing the XML file I used to add the entity shortcuts above to anyone who is interested. I won’t repeat Ian’s instructions here but I will explain why I’ve used the tags and values I’ve chosen.

Using the New Shortcuts

Obviously the HTML/XML-friendly entities can be added to your code by using the shortcut key combinations in the table above, but they also appear in the Espresso menu too.

I’ve chosen to add my new shortcuts into the Actions > Format menu so it’s usable both for HTML and XML and follows the same convention used by other TEA shortcuts so the tag below reflects that.

In each case, the action title and undo_name values are the same, again following the general TEA convention. The menu items appear to be ordered alphabetically by the action ID value so for specific orders, you might like to rename the IDs with numbers after the InsertText value but that’s a personal decision. I’m happy with the default order and the key shortcut is the prize here, not the menu option. Your menu will look something like the one shown below depending on which version of Espresso you are using (1.0.4 shown) and which other Sugars you have installed:

Custom shortcuts added to the Espresso Actions menu

Custom shortcuts added to the Espresso Actions menu

Now, if you press CTRL + SHIFT + SPACE, you should have a non-breaking space appear instantly at your caret location. Similarly, instead of typing & for which you’d have to press SHIFT + 7 anyway, press CTRL at the same time and should get & for 1 keystroke instead of 5. It’s not going to save hours of coding time but it’s one more convenience until we get project-wide searching :)

This is probably the simplest type of extension you can make to Espresso via TEA and if you favour keyboard shortcuts over tab snippets (both perfectly valid) then there is no reason why you couldn’t add as many different shortcuts as needed.


Espresso IconOne of the top searches in my blog of late has been “espresso keyboard shortcuts” so I thought it would be a good idea to detail the ones I’ve been using over the past few days to make using it that bit more productive.

A developer called Ian Beck wrote a set of AppleScripts for Coda called “TEA for Coda” where “TEA” stood for “Textmate Emulation Applescripts”. The scripts essentially added the features Ian missed most from Textmate into Coda and, as Coda evolved, ultimately helped him move to it full time. When Espresso was in pre-1.0 development, Ian re-implemented his scripts as an Espresso Sugar and they make it so much more convenient. The kind of convenience that, if they were documented in some official help or a FAQ, would make the first impression that much better, or sweeter to use the obvious pun. Hopefully this will do for the help in the meantime then :)

Type Less. Do More.

Element expansion shortcut – instead of typing all the characters in <div id=”pageContainer” class=”wide secure”></div>, you can just type div.wide.secure#pageContainer then hit CONTROL+comma. TEA for Espresso fits the ID in and each class separated by a period is added into the class attribute. If the tag needs a closing tag, TEA adds it otherwise it self-closes the tag, i.e.

p.intro
[CTRL+,]
<p class="intro"></p>

div.wide.secure#pageContainer
[CTRL+,]
<div id="pageContainer" class="wide secure"></div>

Text formatting – a couple of simple shortcuts lend WYSIWYG style formatting controls – select some text and press COMMAND+b or COMMAND+i to apply bold or italics respectively to the selection. To drop in an HTML line break, hit CONTROL+enter. Unfortunately this doesn’t actually trigger a newline in the code but it’s still quicker than typing <br /> then return :)

Escaping ampersands – if working with copied and pasted text from an external source, selecting the new text and press OPTION+SHIFT+7 automatically escapes the invalid characters such as turning & into &amp;.

Wrap selection in tag – one of the most useful shortcuts by far: select whatever you need to wrap then hit CONTROL+SHIFT+W and by default a paragraph tag wraps your selection. The caret is automatically focused inside the opening tag and if type a new tag name, div for example, the p is changed to a div. I think the TEA for Coda version required a popup to enter the tag name – if so, this one feels a bit slicker.

Download Espresso from MacRabbit

[Select the text then hit CTRL+SHIFT+W]
<p>Download Espresso from MacRabbit</p>

[Type div without clicking the mouse or the cursor keys]
<div>Download Espresso from MacRabbit</div>

Wrap selected lines in tag – this is arguably the most useful tag when marking up pasted content: select whatever you need to wrap then hit CONTROL+COMMAND+SHIFT+W and by default list item tags wrap each line in your selection. The caret is automatically focused inside the opening tag and if type a new tag name, p for example, the li is changed to a p so it provides a nigh-on instant way to wrap all of the pasted text in valid paragraph tags or instantly generate a list. Brilliant.

List item 1
List item 2
List item 3

[Select the text then hit CTRL+COMMAND+SHIFT+W]
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>

[Type p without clicking the mouse or the cursor keys]
<p>List item 1</p>
<p>List item 2</p>
<p>List item 3</p>

Converting text to a link – another excellent shortcut when working with pasted content, select some text then hit CONTROL+SHIFT+L and it wraps the selection in an a tag with empty href and title attributes. However, if you have the URL you want to go to in your copy/paste buffer when you invoke the shortcut, that is pasted into the href attribute which is pretty handy. For example:

Download Espresso from MacRabbit

[Select the word "MacRabbit" then hit CTRL+SHIFT+L]
Download Espresso from <a href="href://" title="">MacRabbit</a>

If you were to copy the MacRabbit URL from your browser into your copy/paste clipboard, then repeat the steps above, you’d get:

Download Espresso from MacRabbit

[Select the word "MacRabbit" then hit CTRL+SHIFT+L]
Download Espresso from <a href="http://www.macrabbit.com/espresso/" title="">MacRabbit</a>

Nested newlines – when working with nested tags such as table rows and cells or list items, the “Indent New Line” command which is triggered by CONTROL+SHIFT+RETURN drops the caret down a line and takes a tab in. I generally just hit return then tab but it’s an option there if you need prefer it.


Espresso IconJust a quick post here: less than a day or two since Espresso 1.03 was released, MacRabbit have released version 1.04, the official releases notes for which state:

  • Fixes potential file corruption when using remote editing via SFTP
  • Quick Filter shortcut now always brings the search field into view
  • Other small fixes

Some or all of those “other small fixes” are listed in the software update box for Espresso and include:

  • Espresso 1.0.3 improves publishing stability and compatibility
  • Improves the shift indentation commands
  • Enables CodeSense for CSS values and adds other small improvements
  • PHP support now also features syntax checking and a documentation tool

The publishing fixes generally seem to relate to issues where files were zeroed out when uploaded which is clearly a welcome fix.

The indentation commands have been been extended in the past couple of versions with several new menu options for converting spaces to tabs and vice versa (with the number of spaces per tab configurable) and a menu option to trim white space from lines. If MacRabbit add markup auto-formatting as per Textmate/HTMLTidy, they’ve pretty much put together the full package for HTML markup formatting. The new options do help somewhat but it really needs HTMLTidy-style cleaning when working with some rough code brought in from a third party.

While Espresso definitely felt rushed out the door, the pace with which MacRabbit are bringing out updates adding new features and fixes must be commended. Now, if only they’d get cracking on SVN/SCC integration, source formatting and project-wide find and replace:)


Further to my previous review of Espresso 1.0, I’ve been using it for about a week now and, limitations and flaws aside I still like it. I’ve tried going back to Eclipse or Textmate to write plain HTML and I just can’t! Neither have the utterly flawless, silky smooth code completion that Espresso has and while Eclipse is fully featured, it’s not the most responsive or streamlined application (unless working on Java in which case it’s unrivalled).

Over the past week, I’ve come to live with Espresso’s limitations but only because I picked it up with the Macheist bundle – if I had to buy it at full price, there wouldn’t be enough there yet for me to pay $80 and I’ve walked away from the trial somewhat disappointed. I’m working on an HTML-based rapid protoype job just now and the combination of Espresso for markup and scripting with CSSEdit for styling is very slick.

I’ve come to realise there are a few features I really miss over and above the omissions I mentioned in my previous posting. Until these features are added or fixed then I’ll find it hard to pick up a batch of licenses for my team who will keep using Eclipse in blissful ignorance!

In no particular order then, the wishlist:

  • The find and replace looks fantastic but it appears to only apply to the entire document – it needs to be able operate on selections to have the functionality to match its looks.
  • Speaking of find/replace, it needs to work outwards too and operate over a project or sub-tree of the project to allow common changes to made globally. HomeSite had this feature down to a tee a decade ago and Textmate and Eclipse implement it just as well. It would seem to put some value in the projects feature too.
  • Fix the preview – it wasn’t clear at all that I could click the preview button on the editor window then drag that preview from the sidebar into its own window and the preview menu just needs to work period.
  • Bring Xray back to preview and let us click in Xray to jump directly to the relevant layout element in the code view.
  • Better CSS editing functionality which can come in one of two forms: either bring the functionality in Espresso up to that offered by CSSEdit (ignoring the visual CSS inspectors) or have tighter integration between the two apps such that Espresso launches CSSEdit to edit style sheets, in the same vein as the way Photoshop and ImageReady worked together prior to CS4.
  • Source formatting is a surprising omission and one that Textmate and Eclipse definitely benefit from, especially when opening an external or legacy HTML document. Realtime automated indentation of nested elements as typed would be nice too but not essential.
  • Source control integration. I don’t want to just say “Coda has it” because it’s only added SVN integration fairly recently and Eclipse has had it for some time, but I think Espresso needs this to be taken seriously in a team workplace.

I think at the point the above omissions are addressed, Espresso would be a markup editor with very little going against it. In addition to that list, I have a few features I’d love to see added which are far from essential but they’d be nice!

  • Dragging a file – be it an HTML, CFM, PNG, CSS etc – from the project file tree into the current editor window should include a link to that file relative to the current document. Again, another feature to make that project concept do some work :)
  • Conversely, command clicking on a relative path in the document being edited should open that file for editing if the file exists or perhaps prompt to create the file if it doesn’t?
  • Snippets should be definable in terms of start content and end content so they can be wrapped around selections of text: handy for wrapping unformatted text for example, with styled list items or form field markup with minimal effort.
  • Code completion for CSS class names with appropriate ID-based filtering, element name based filtering and all non-element specific classes available too, ordered in the class list in that way. I’m not saying that would be easy to implement but it would awesome.
  • Template/document fragments would be a nice addition for managing common elements such as headers, footers, z-clauses, navigation widgets etc. This would a project wide repository of code fragments that upon changing the fragment would (on user confirmation, naturally) update that fragment as it appeared throughout the project. This is essentially taking the project-level find and replace and ramping it up.
  • Dangerously close to DreamWeaver territory here but it would be awesome if I could fix typos in the preview in a WYSIWYG style without having to go to the code view, find the typo, then back to the preview. I don’t necessarily think we want full layout controls but simple text edits within the code-created block level elements such as headers, paragraphs and lists would be great. If Xray comes to Espresso this becomes less of an issue of course.

Now, if some of those features get into Espresso after the “critical” features above have been added, I think Espresso could be the definitive Mac web development tool. To draw a parallel between Espresso and another app the Mac world went nuts for, I’ve been a Pixelmator user since the day it was released, buying it well before its Macheist appearance and while it isn’t a patch on Photoshop when applied to web site work (barely useful at all except for the simplest of images), it has evolved steadily since 1.0 into a fantastic app. Version 1.5 intends to add “save for web” functionality and if they bring layer sets to the table, could make it a genuine alternative to Photoshop for web work. Hopefully Espresso will follow a similarly impressive roadmap and we’ll see it becoming truly peerless in its field.


Over the past few months, I’ve undergone something of an attitude change to gaming. I’ve owned most consoles since the SNES and have made a point of playing the flagship games on each one, often to the detriment of many of those same showcase games. Given the close release dates some of these games had, it wasn’t uncommon for one game to get a week or two’s worth of play only for another AAA title to drop and the previous game be shelved.

The number of games to suffer from this Pokemon-style “gotta catch ‘em all” approach defies counting but a few of the key titles in their include pretty much every Zelda, Metroid Prime 2, Resident Evil 4, Ico, GTA Vice City, GTA San Andreas… These days, most of my gaming is 360-based and I think I can count on 2 hands the number of games I’ve finished in the last few years. I remember wrapping PGR3 and 4, Burnout Paradise, Bioshock, Crackdown, Fallout 3, Gears of War 1 & 2, Assassin’s Creed, Mass Effect, and on PS3, MGS4, Uncharted and Resistance. There’s about 20 games (2 hands and 2 feet then) in over 3-4 years despite Xbox.com saying I’ve played 65 games. Xbox.com doesn’t know about the other games I’ve received as gifts which are still sealed such as Far Cry 2 and Red Alert 3. Meanwhile, the PS3 is languishing with LittleBigPlanet and Dead Space, both excellent, both less than 50% completed. Mario Galaxy? Not started.

So, what’s the new mindset? Well, I’ve actually started to complete my games and if I’m not planning to finish a game, I won’t buy it. My game time isn’t what it used to be what with being a father, a husband and a lead developer and I’m only expecting to lose more over the years so I’m planning to start “cherishing” my game time and that means picking the right games and putting the effort in.

There’s also an appreciation of money wasted on barely touched games. A number of the games were picked up in  sales but the majority must have cost at least £35-40. A few of them in a month equates to a tangible salary percentage.

The added bonus to this more time-efficient, cost-effective gaming mantra is that I’m actually enjoying games more. Rather than being driven to start the next game, I’m looking forward to reaching the end of the current game. The first game to benefit from this attitude was Fallout 3. I probably put less than 20 hours into Oblivion and it’s on my all-too-long list of “I’ll go back to that” games but Fallout must have burned around 80 hours since Boxing Day. Since I bought it for £25, that’s value for money.

There’s an added incentive these days of course though, namely Xbox/Live achievements. I’ve never been obsessed by my “gamerscore”. I’m pleased with it running over 20,000 points but that’s about 40% of the total number of points the games I own could yield and there are plenty of games I don’t own that just bleed points if I chose that path. Have I become a so-called “score whore” then? No, the driver isn’t the numeric point value but the task behind unlocking those points.

Whether it’s scouring the Fallout game world for over 100 “locations” in the knowledge that I’m exploring every nook and cranny; or picking up the Burnout Elite license to unlock the fastest, strongest cars to leave my friends in the dust; or maxing out my Crackdown agent’s attributes so I can jump up the side a skyscraper: these particular achievements took literally dozens of hours to unlock so the value wasn’t the points but the fun had in earning these perks, getting the value of out the game, and actually seeing the fruits of the developers’ labours.

There’s a certain satisfaction in knowing that, in some cases, the number of gamers with a certain achievement can be very low giving certain bragging rights in the right circles. I remember reading a statistic from Bizarre Creations about the number of gamers who “completed” PGR3 when they were designing the PGR4 achievements:

Here’s a little stat for you platinum players to brag about – how many people completed PGR3 on platinum? 20%?….. 15%?…..5%? Answer = 0.76%

So remember when you think the Platinums in PGR3 were too easy, you’re well within the top 1% of PGR players! Even if you’re a mere gold player, only 2.95% of players completed PGR3 on gold!

I found myself in the gold bracket with about 60% of the platinum wins and that was a proper gaming achievement. Not only had I put the hours in and completed the game, I’d done so in a way that few other players had. I’d raced every track, won every challenge and probably picked up most of the cars along the way. In short, I paid my money and realised the value for that money.

Before starting a new 360 game, I’ll scan the list of achievements: the “story” achievements are a given – unimaginative and a guaranteed “reward” just for playing – but when the developer’s put the time into creative achievements then they are the ones I’ll go for because they mean “seeing all the sights”, so to speak.

By applying those same ideals to all of my games – proper completion, value for money, and I suppose a degree of pride – I’ve really enjoyed gaming again. Fallout was a blast and now I’ve gone back to finish GTA IV. It bored me at the time with repetition and there were plenty of other distractions but now I’m getting into the story, loving the humour and looking forward to the conclusion. After that, it’s Far Cry 2.

Ironically, I’m starting to put the effort in to finish these massive games as “casual gaming” is picking up pace, largely thanks to the Wii and its innovative controls and with publishers pushing smaller titles onto Xbox and PS3 to cash in on the trend. The publishers maintain that “core gamers” will always be tended too though so I’m not too concerned, but I am it seems bucking the trend!




Follow

Get every new post delivered to your Inbox.