Word for Mac 2011: Chapter and section headings

by smctainsh on 23/09/2012

As of this month, a large amount of my time has been spent writing my final thesis for my Honours year. It currently weighs in at some 13,000 words, so it isn’t your standard essay for an assignment at Uni!

While attempting to set up a numbering scheme in my document, I can across an oddity in Word for Mac 2011. It turns out that, if you want something like this:

1. Approach

1.1 Initial work

1.1.1 Another title

The first title must use the Heading 1 style, the second the Heading 2 style, and the third the Heading 3 style, if you want to avoid complete and utter headaches. Especially if you want to use these chapter and section numbers in your figure or table captions.

Also, to set up chapter and section numbers, go here:

And if you want to change the styles at any time, you may find you can’t right click on a style to modify it. Somehow that helpful feature slipped through the cracks in the Mac version of Office. You can, however, right-click on the top most heading style (e.g. Heading 1) and choose Modify. Then click Format in the bottom left of the window that appears, and then Paragraph. You’ll then see this, which allows you to accomplish the modifications you desire.

No Comments

Collaborative editing in GWT web apps

by smctainsh on 1/09/2012

With just under 2 months left of my year-long Honours project, I have approached the final part of it – the implementation of collaborative editing. The very interesting part of all of this was learning how to create a collaborative editing environment in my GWT web app.

As a result, I stumbled upon operational transformations, the same tech used in Google Docs. How it essentially works is that a journal is kept, with entries holding insertions and deletions in document text. This journal can then be replayed to reproduce the user’s edits on another document (such as another connected client’s work).

The magic of it is the transformation part, where the insertion or deletion index is displaced when a prior edit is made. This ensures everything is kept in sync, and works pretty darn well.

The Wikipedia write-up is pretty useful too.

No Comments

GWT client-side reflection – it is possible!

by smctainsh on 26/07/2012

As part of my Honours project at The University of Waikato, I have been working with GWT (since February this year) to port an existing Java application to the web browser. One of the problems I’ve encountered lately is that the code uses a hefty amount of reflection to launch agents and actions, the names of which are not necessarily known at runtime.

After trying out two existing projects – gwt-rtti and gwt-ent – I almost lost hope in being able to use reflection on the client side. I assumed the concept of it was simple – replace calls to common methods such as Class.forName, Class<T>.getMethods, and the like at compile time, and have your library act as a proxy, servicing these calls using pre-processed class information, built up at compile time. Luckily, one developer was thinking the same – and I found the, pretty much hidden, library gwt-preprocessor.

This library is the most complete reflection solution I’ve seen for GWT. It hasn’t failed me on any calls to fetch methods, constructors or class definitions at runtime. The only issue that comes with it is that sometimes its preprocessor is a bit weak, and will misinterpret trivial conditionals such as:

if(item.exists() && !item.getColor().equals(Color.ORANGE) && item.isNeat())

When that happens, it simply trips up, and refuses to pre-process the class in question. The latest release, v0.5, provides much better pre-processing debug output (thank goodness), so it is easy to identify where the lines of code are that are confusing it. Previously, it wouldn’t even indicate the code that was causing the problem, or the line concerned.

In fact, v0.5 only came out a few hours ago (as at the time of writing) – very fast. It’s a very active project. What makes me sad is that only 6 people (myself included) have starred this project on Google Code. Furthermore, I know how these projects can end up – I have had to terminate a number of personal projects in the past (WebCipher, Time Sheet and Tasks as they were named) because I simply didn’t have enough support to keep them going. It just wasn’t worth my time. I’ve personally emailed the developer to say thank you, because this library is so absolutely amazing that it deserves every bit of recognition it gets.

For your information: the problems with the other two libraries

The main problems I had with gwt-ent were:

  • You have to use a proxy to fetch class and method information (TypeOracle), which meant a large amount of refactoring on an already enormous code base;
  • It has terrible support for many operations – you can’t call a constructor with any arguments using newInstance() – it just isn’t there;
  • It tripped up on almost all of the reflection code I threw at it.
  • It hasn’t been updated in more than a year.

The main problems I had with gwt-rtti were:

  • It’s just far too limited. It couldn’t handle almost all of the tasks I threw at it; that could perhaps be forgiven if the project was being maintained, but it hasn’t been updated in over a year.

Hopefully this is useful to those of you working with GWT and particularly with reflection – gwt-preprocessor is the best option available at this time, and it is damn impressive.

No Comments

WP7 – Binding to a parent element’s data context

by smctainsh on 23/07/2012

I recently obtained a cheap Windows 7 Phone (thanks to The Warehouse), and have entered the world of Windows Phone development – and it’s great! While there are some similarities between Silverlight’s version of WPF and the Windows Phone 7 version of WPF, there are some crucial differences, including one that I found to be quite frustrating.

If you are inside a Data or Item Template, and want to access the binding context of the template’s parent, there is a special way to accomplish this using Windows Phone 7. By comparison, there would be many different solutions if this were Silverlight development.

For Windows Phone 7, give the parent element a name using its Name or x:Name property (whichever applies) and create the binding this way:

{Binding DataContext.TheProperty, ElementName=ParentElementName}

It’s that simple – although it took a while for me to find this solution. Hopefully this saves someone else the trouble I encountered!

No Comments

Office 2013 Preview

by smctainsh on 17/07/2012

First off, congratulations are in order for Microsoft’s agressive Metro-fication strategy that has been seen as of late. They are finally aiming for consistency across their product lines, and I am very pleased to see it.

Today, Microsoft released a preview version of Office 2013, complete with the Metro UI which complements their recent offerings, including Windows 8. I decided to give it a go today, and as soon as I hit the installer, I hit an annoying usability problem, which was multiplied 10 fold because I was particularly frustrated at the time.

Look at the ‘Accept’ button in the screenshot above – it looks disabled, doesn’t it? Well, it isn’t. In fact, you need to click on it to get anywhere in the installation process. This is a case of design trumping usability – although it’s forgivable since it is a preview release, although such an elementary mistake to make that it’s stupid!

Next, check out this little gem:

The question is posed as to how I want my Office to look – well, I want it to look like Office! The style names subtly change the pattern at the bottom of the window, which took me a while to notice. And what’s more, the extent of the style isn’t communicated to me – it’s such an unnecessary personalisation step that they should have just gotten rid of it altogether.

Now onto the applications themselves. A few things that stood out:

Across Office applications, we have the delightful ribbon. Clicking on a tab on that ribbon brings up a page of options below the tab. Someone at Microsoft decided it would be a good idea to have the tab instead open up a full screen page of options across the entire document, much like Office 2010. This doesn’t work! It affects recognition versus recall, making it harder to determine why you went to the menu in the first place – and it’s completely illogical. Especially since you hit the back arrow to return, instead of clicking on the tab to hide the menu again. Colour isn’t enough to differentiate here!

There’s the back button, in the top left – at least they go that right.

One more quibble – in Excel:

Clicking on another cell in an Excel workbook now transitions, via an animation, to that cell. This is both a good and a bad thing – it helps you remember where you came from, but it is also unnecessary, meaning it take a fraction of a second longer to get to the cell. The majority of Excel users, I’m sure, don’t really need this animation.

And that’s my initial view of the Office 2013 preview. Feels good to get that off my chest.

No Comments

One More Thing Conference delights and inspires

by smctainsh on 29/05/2012

On Thursday 24th May, I set off to the land of Oz – Melbourne to be exact – for the One More Thing Conference. Excited about the prospect of rubbing shoulders with some of the top iOS developers, I set off on my Emirates flight, the sun setting as I ventured through the departure gate at Auckland Airport. Upon arrival in Melbourne, I was very impressed with the conference, and the city itself.

Kicking things off on Friday 25th May were the mini-conferences. Three hours each, the first was on design, and the second on code. Many very useful lessons were imparted – from the importance of interface design being considered an art, and the use of skeuomorphism in iPhone apps, to the general lessons of creating a compelling user experience. From the code point of view, it was refreshing to see that they didn’t just jump straight into code. It was more of an insightful journey into the consideration of an application as one complete unit (likened very aptly to Apple’s Unibody designs, transitioning from their iBooks); dealing with effective releases of your apps, such as when it’s suitable to issue a point release; and even a talk reinforcing those immortal lyrics – “I get knocked down, but I get up again” – from a fellow New Zealander. All of this was hosted in a cosy environment, in a beautiful building in the Melbourne suburb of Carlton. Although it was hard to find (I ended up about 20 minutes late, thanks to some elusive street signs!), the experience was completely worth it – and the talent surrounding me was awe-inspiring.

Saturday saw the main conference, with a significant number of talented speakers. Hosted at the Melbourne Convention Centre (a beautiful building might I add), the main event also included a game developed by Sensis, an Australian company offering an API for access to Yellow and White Pages listings – a great ground for building some compelling apps. Answer 20 questions in the fastest time, with a 3 second bonus if you got the Sensis promo question right. I managed to get a pretty good time – just over 20 seconds – but the star of the show (1st place) used some ‘computer assistance’ to win, which turned out to be the aim of the game! Still, coming 3rd wasn’t so bad – I got to take home an external hard drive, and I’m pretty sure I got the best human score!

The dislike of Android was very clear at the conference – the fact that iOS sales made up a considerable portion of their income, while Android and WP7 hardly registered, made it clear that iOS is a booming business – even if Android apparently has the greatest consumer market share. Interestingly, even at Christmas time Android sales didn’t pick up, and according to the speakers, there are only a few great apps even on iOS – so there is still heaps of potential.

The inspirational messages issued by the speakers were truly great – ranging from stories of coming up from nowhere, to stories of obstacles that stopped the release of a great app, these people are truly amazing. Talks also included mention of coming half way around the world to follow your dreams, the potential for outsourcing work, the importance of trusting your fellow team, the big opportunities that can happen for us, and the transition from web to Objective-C – which can be a bit of a pain (I can relate!). One of the most amazing points about the conference was that some of the developers learnt iOS development when they had no programming experience whatsoever – their drive is amazing!

To give you an idea of scale, speakers included the developers of Tapatalk, Doodle Jump, Flipboard, Camera+, Ship/Plane Finder, Pano, Air Sharing, Trainyard, Calvetica and more – talk about big names!

And thanks to One More Thing for the great gifts – a sketchpad with an iPhone wireframe on it, ready for drawing, and an awesome lanyard, which will serve as a happy momento of the amazing time spent in Melbourne. The conference was an absolute blast, and I recommend anyone with an interest in iOS development or design to go along next year – from the sounds of things, they’re all go for 2013, and it’ll only be their 3rd year in the conference game!

No Comments

Don’t use Chrome with GWT’s development mode!

by smctainsh on 22/05/2012

As weird as that title sounds (given Google’s association with Chrome), do not use Chrome for your GWT testing needs. Instead, use Firefox or Internet Explorer with the appropriate GWT plugin – you’ll find your project will run much faster.

According to this Stack Overflow response, Chrome’s multi-process architecture works against it.

No Comments

XKCD: Our review-centered society

by smctainsh on 19/05/2012

Love this one!

No Comments

An awesome experiment with CSS3 and 3D

by smctainsh on 19/05/2012

Just saw this fantastic article over at Smashing Magazine – Beercamp: An Experiment with CSS 3D.

Some truly impressive stuff! I love seeing new and exciting developments with HTML5 and CSS3, and this is amazing! Great to see some fantastic new work coming through on the CSS3 front.

No Comments

What’s wrong with Windows 8

by smctainsh on 19/05/2012

This post has been a long time coming – and it felt right after finally setting up my personal blog again.

Windows 8 represents quite a drastic leap forward in terms of interaction. Not only does it take cues from Microsoft’s Windows Phone 7 mobile operating system, but it also brings them to a place where they aren’t wanted – the realm of the casual desktop user.

So, what’s wrong with Windows 8?

Well, several things.

It doesn’t honour fine-grained control

Firstly, the ‘start screen’ above just doesn’t work on a desktop with a fine-grained mouse. A user, sitting with a keyboard and mouse, is afforded precise control – why do they need such enlarged targets? This is quite simply a waste of screen real estate. Think of what else you could fit in there? For example, the now historic start menu used to contain numerous options, in a far smaller space, yet it has been pulled from our sights.

Usability heuristics aren’t considered

Secondly, this ‘start screen’ replaces the start menu. But why? This start screen violates one of Nielsen’s usability heuristics – “recognition rather than recall”. This heuristic emphasises that a user need not guess what they were doing as they move through subsequent menus and dialogs. A case in point was the old start menu. When you opened it, you could still see what was behind it. The almighty desktop acts as a visual reminder for what it was that you were doing previously. With the start screen, you can easily forget what you were doing – especially with colourful tiles in great numbers.

Another heuristic that is violated is “consistency and standards”. The entire design, which is seen as mashup between the Metro UI design guidelines and whatever Windows used to be (the traditional desktop metaphor), is a total disgrace to this heuristic. Then again, Microsoft never did well with consistency in Windows – something Apple has had under control for a long time now. What is so wrong with the new Metro interface is not the idea – which is fantastic, because we need to move on from some of the more tired metaphors we have today – but the execution. Microsoft tries to transplant a new user experience on top of an existing one, which is a terrible idea – the traditional desktop is left as a complete afterthought. It’s not so much that they only use the desktop when it’s needed (such as to run an older application, which is a good idea), but the fact that they mutilated the traditional desktop in the process, creating some abhorrent hybrid interface. Why not keep the traditional start menu, and Aero; that way, you’d keep existing users happy.

It’s facing an identity crisis

There should be two user experiences – one for tablets, and one for traditional desktop computers. Desktop computers should still see the Windows we’ve become accustomed to. It’s familiar and, although it needs a change, the way things are moving towards more portable computers is the first place to look. However, Microsoft are forcing desktop users to endure the desktop and tablet interface in their entirety. The latter just doesn’t make sense in this case. Create two different people, not another case of Dr. Jekkyl and Mr Hyde.

It takes longer to do the same thing

How do you shut down your computer with Windows 8? Well, firstly you move your mouse to the right edge of the screen (which can be really frustrating), then go to Settings, then to Power, then to Shut Down. And how was this done in Windows 7? You clicked on the Start Menu, and if you had it set up, hit the Shut Down button – at the worst, you had to hover over the arrow to the right of the power button, and click Shut Down. So, we’ve gone to 4 mouse movements (in a less than logical order) from a far simpler 2. How does this compute?

So that’s the way I see Windows 8. Personally, it’s an upgrade I won’t be making, except for if I buy an ARM tablet – in which case, it’ll be a great choice.

No Comments