Category Archives: Friendlier

Delivering the One-Man Project

In a recent email conversation I touched on the ability, or more often inability, of a one-man software project to deliver regular controlled packets of code.  Or to put it another way the the ability for many one-man software projects to deliver very little or nothing at all despite setting out with the best intentions and a following wind.  At the heart of the problem lies the following rather messy aphorism:

You don’t get concencus in a one-person software project.

Concencus by definition is a group activity.  A one-person project or software product can have concencus but this is only arrived at by interaction with others, usually your users, and if you don’t have a delivered product or a project then you don’t have users.  Concencus is vital to give you the confidence to deliver what you’ve been developing.

So the question turns to how can we form a concencus on project decisions when there is no code to attract users?  What we’re seeing increasingly is the use of crowd funding to drive software development.  Crowd funding is proving to be very useful for software developers and not just from a financial point of view.  More importantly crowd funding can help drive direction, delivery and scope and also help test the choppy waters of marketing by trying out ideas on an interested and motivated audience.  This works better for established companies or old-timers than it does from unproven individuals with new ideas simply because old-timers already have a track record and an audience.  So let’s back up a bit further.

A Kickstarter project commits you to a direction – a product usually – and an intention.  You scope is inherently limited by the promises you make, the videos you release, the decisions you’ve already made when you’re coming up with your Kickstart concept.  It’s all about selling a promise.

A one-person (software) project is usually driven to scratch a particular itch, and its scope may not necessarily include getting to a point where you can sell something.  You might want to make an open-source framework, you might want to come up with a vaccine, who knows?  What you do know if that you as a one-person team have limited time to accomplish this and you want to make incremental progress.

How can you deliver progress?  Well, I’m going to tell you what I do.  I do it by giving myself more than one thing to do in my spare time.  Instead of deciding to deliver one project, I will deliver three or four or five projects simultaneously.  Each will have its own technology associated with it that is slightly different, each will offer something slightly different that allows me to enjoy working on it for a different reason.  It’s me after all that I’m pleasing here.  I’m also out to help others and provide something they might like and find useful but I’m doing this, for me.

The premise may sound slightly insane – why should you make your life more complicated when you want to focus all your spare time on doing one project really well?  In the next few weeks I’ll take you through how I do this and what techniques I use to keep myself interested and focussed.  Above all I want to show you that you don’t need to despair when you look at the calendar and realise that the code is still not out.

Another Rabbit Hole

The last few days have involved all sorts of user interface ridiculousness.  WPF, .NET, Java, Swing and Eclipse and then back to .NET and then on to C++ and then back to .NET again.  It’s nice getting on top, underneath, beyond, behind and inside of things sometimes and then it’s also nice to hear something like this announcement and just think – Ok perhaps this is where I should be going now.  Stop running around like a headless Christmas Chicken.

MonoGame is doing what Unity and GameMaker Studio and and Xamarin and all those other platforms are doing – they’re allowing you to target multiple systems (iOS, Android, WP7, XBox etc) with one codebase utilising a clever framework.  What MonoGame does differently though is that it builds on something that is already there and established (i.e. XNA) and it targets all those platforms from pretty much the same codebase (they say) and it’s open source and it intends to stay that way.  The others are going to charge you money to do this – a lot of money.   The paid-for ones have fancier tools but they all essentially do the same thing.

So I now have something new to look at.  After a year of XNA fiddling with Friendlier and having made progress with Android and OpenGL development I feel I can have an objective look at something like MonoGame without feeling that I’m taking the easy way out.  I’m already writing a framework, I should understand their framework.  And this might be a good opportunity for a little decluttering of the projects that have built up over the last year…

Keeping Busy

Sometimes your first thought is your best one. Well this was definitely the case last week as I continued to struggle with getting the Syntax Highlighter working in an elegant fashion with the main GUI thread. In the end – threading was the solution. I perform some quick and dirty highlighting in the main thread which immediately updates the screen and then I also kick off a background job to highlight the rest of the file which is off screen. This works well and works seamlessly allowing on screen edits to pop up immediately and also meaning that paging up and down through the file gives a consistent look to the highlighting with no additonal calculation required. This backgrounding mechanism for syntax highlighting will also lend well to API lookups when we get to that.

I’m overdue for some new videos and of course as soon as I start thinking about putting together a demo I find all sorts of interesting issues and problems. So we’ll see what happens this week. We’re edging through summer and I’m no nearer to either getting the Rosegarden for Windows build finalised or adding the Kinect support back in to Friendlier – I’ve not even had time to play with the last Kinect for Windows SDK released in June. Time flies and I want both of those things sorted before September and before I have to start thinking about Windows 8 and tablet support.

Updating Text Highlights

Currently I’m wrestling with the best way of handling syntax updating whilst typing.   At the moment the slow, obvious and safe way to do this is just to recalculate everything highlighting-wise when you’re typing.  However for large files this starts to take a noticeable amount of time – this can mean that typing can become really slow and disjointed.

There are a couple of approaches we can take here to work around this issue.  Firstly we can attempt to only update the highlights for the text that relate to this change.  Therefore if a character is deleted on a line then all the highlights after that point on the same line need to move down one character too.  If a line is deleted then all the highlights need to move up one line to stay in alignment.  This can be quick but there are tricky edge cases – what happens to the highlight when you delete the middle of a keyword?   What happens when you remove a comment end marker?  There are many multi-line issues that could make this approach fiddly and difficult to get right.

Second approach could be to farm out the highlighting to a separate thread – get it done in the background and only overlay correct highlighting when it’s been completely recalculated.  In the interim you could ‘guess’ what should happen with reasonable accuracy without having to be as exact as above.

Thirdly you could buffer the input somewhat so that all input is captured but the commands fire and the updates happen asynchronously after that.  This could also be a model that might work well with an Intellisense a-like API generating model.  That will take the most amount of work but it should hopefully leave us in a state where the design is flexible enough for us to add API browsing as part of our development experience.

Let’s go for it

So I still have some bugs to squash – but I want you all to have a look at what we’ve got so far so today we’re releasing the Friendlier Beta.  It’s fully functioning until the end of July so please download it and give it a whirl and let us know what you think.

In the last couple of weeks I sat down and sketched out a roadmap to see where we are and where we’re going.

At the moment things we know about Friendlier are:

  • Beautiful 3D user interface
  • Touch-like navigation (moving between windows, zooming)
  • Full screen/windowed modes
  • Syntax highlighting (C++)
  • Multi-level undo/redo
  • Stunning visual compare (you have to try it)
  • Build integration (Standard Out and Standard Error capture)
  • File management
  • Project and file level statistics
  • Single Friendlier project file architecture

Planned features for Friendlier (Q4 2012):

  • Multiple Friendlier project files
  • Improved C++/Qt support and syntax highlighting
  • Project import functionality (Makefiles, directories, Project files)
  • Improved java build and syntax highlighting
  • Autocomplete for Qt/C++ and Java
  • Source control integration (Subversion, Mercurial histories/compare integration)
  • Microsoft Kinect integration and speech support for navigation and build tasks

 Features beyond that:

  • Debugger integration
  • Multi-user project level paradigm including gamification of coding
  • Browser and notification integration
  • Graphical filesystem management
  • Windows 8/touch integration

The further features are dependent on where the next six months take us.   So far Friendlier has been in development for just over six months and we have a good platform for moving us forward.  Now we’re sending the challenge out to potential users to download it, give it a go and tell us what they think.  By offering the ability to pre-purchase Friendlier 1.0 we will also give early adopters the opportunity to shape the near term future of the product.  We call this futureware – it’s here, it works already but we want you to tell us where to take it.

Feature Complete

The amount of actual merging of Rosegarden for Windows that has gone on in the last couple of weeks has been minimal as I’ve been implementing the final features for Friendlier 1.0 Beta.  And jazzing up the website and thinking about how I’m going to sell this thing.  You’ll find out more soon but suffice to say Friendlier will not only be pleasing on the eye, but also pleasing on the pocket.  You’ll also get some great benefits for being an early adopter.  More details to follow soon on pricing and availability but I’m pleased to say that Friendlier is now feature complete for V1.0.

In the meantime I’m thinking more seriously about Git following this article from El Reg.  Version control integration is going to be a core part of Friendlier and it seems there will be no avoiding Git and GitHub going forwards.  I’m looking forward to putting those features towards V2.0.

Merging Rosegarden

Ok, so it’s time to merge the trunk revisions of Rosegarden onto the mingw branch that I’ve created which  makes the Rosegarden for Windows build available.  This process is done of course in Windows and traditionally I’ve used the excellent QtCreator alongside Tortoise SVN to handle the source control side of things.  Aside from that and a little perl to ease the cogs a little it’s all done just like that.

This time though I’m making life a little bit more complicated.  I’m using Codename Friendlier to do the editing and to run the builds.  I’m using this merge exercise as a test bed for my other software – so see if it’s possible and fun to work in the new environment for this ‘Light’ IDE.  I probably could have started this exercise a month ago but instead I fell down a  rabbit hole with indenting and text highlighting and to be honest this has made me feel a lot better about using Friendlier.  None of the features are finished yet but it’s quite competent at allowing me to edit and build stuff.  Or so I will find out in the next few days..

How we do Indenting

One of the more interesting things about writing an IDE from scratch because you end up at points where you can see how other people did things and making perhaps the same decisions as them, perhaps different ones.  For example I’m just looking at indentation and bracketing in the text editor for Friendlier.

When you type in a closing brace in C++ or Java for example I would expect the formatting to work out that we’ve stepped down a level of indentation and adjust the text accordingly.  Hence you are expecting to see a closing brace and then you can write it out with a command which might look a bit like this:

insertTextCommand(fileBuffer, someText, positionOfTheText)

 And when the someText happens to be ‘}’ what can we do?  Well we can change insertTextCommand to do something clever with the FileBuffer at the position of the text – or we can write another command that will do the formatting of the closing brace afterwards.  Of course it’s useful to have a reformatting command anyway so shall we just have a generic command for reformatting a file?  Probably not as formatting is target language specific (what may be a closing brace in one language isn’t the same as one in another) so perhaps we need a generic command which can be specialised per language we’re going to support somehow?

In Friendlier we already have a generic SyntaxManager class and specialise this to (for example) CppSyntaxManager.  This handles text indentation, keyword highlighting, text completion and other functions already.  We can pass this into our reformat command and it can work out what kind of text we’re reformatting:

reformatTextCommand(fileBuffer, syntaxManager, startPosition, endPosition)

So I can then run this command right after the insertTextCommand and it will reformat the text for me and best of all I leave my working insertTextCommand unsullied.  Additionally if I don’t like the formatting that’s been automatically applied I can undo just that one command.  Oddly enough this is exactly how Visual Studio appears to work too.  I wonder if they code this in a similar way?