I mostly use Textmate to write Java and produce LaTeX documents and as a resutly most of my wishes revolve around this but this is my WISHLIST, things I’d love to have but ultimately wouldn’t be too disappointed if they never appeared. After all I still love Textmate as it is!

Fullscreen mode
The actual editing area centred on the screen and the rest of the screen blacked out ala Pages fullscreen mode.

Code completion
Sure snippets remove some of the need for code completion but it would still be nice to have suggestions sometimes, even an extension of the current autocomplete so that the suggestions it has are displayed to me in a tool tip would be nice.

Better handling of large files
I often use Textmate to open those random log files you find on servers and occasionally to open up a binary to see if I can glean any information from it. When I do this I find myself sat wondering if I should have gone for a fresh cup of tea or not.

Local revision history
Something I first saw in eTextEditor and was instantly jealous of and something I’d really like to see included in Textmate 2 but I know its very pie in the sky…

The way I see this working would be to keep a revision list of the document that is being edited on every save of that individual document. This would mean on each and every save a new revision is created and stored in some type of backend database. This would then keep track of all those little changes to the document and at the same time gives a way back if you decide you don’t want to keep it. Then as an extension of this it should be possible to explicitly create a revision with a commit message so that milestone can be keep. Naturally this would need some kind of funky user interface to be able to navigate though all this information that would constantly be building up. The use of the automatic creation of a revision on a save it would lack commit messages so an interface like Time Machine would provide a good way of visualising the revision information.

Its no secret that I’m a HUGE fan of Textmate for pretty every task that involves Java, latex or any of the more obscure languages that I’m required to try and understand as part of my degree course. At the start of university I had someone ask me why I used Textmate over BlueJ/Eclipse when I was writing code – my answer?

It’s simple and it gets the job done.

Of course even though I love the current version I still want a new shiny copy of Textmate2 and if Allan’s other blog is anything to go by it should be pretty damned awesome.

When including images in a LaTeX document its best to have them as PDF’s – this way they keep any vectorness they have about them and will appear sharp no matter what size you have them. A PNG will be rasterised and look blurry.

I know there will be people out there who totally disagree with me on this but sometimes proper source control is overkill.

Recently I’ve been working on a lot of small projects and with the addition of another computer to my ever increasing collection and I’ve increasing found that working between the laptop at uni and the desktop at home has been hard.

Keeping a track of all the changes and additions I’ve made, when I’m using proper source control I’ve got to remember to check in code from either machine when I’ve made these changes. This often means that if I’ve forgotten to commit my changes and the version I’m working with isn’t the latest what is the point in working on it at all?

The main problem I have with the proper source control approach is that I have to do a full commit with a commit message, this is great when I’ve got a new feature working or when I’ve fixed that Heisenbug, it gives me a point in time where I can go back and have a proper working copy of my code – this is awesome because I know that everything committed will be of a certain quality. But having to commit every time I swap machines means that this all goes out of the window, it’ll get a quick “Latest version” message and sometimes if I know something is broken it’ll have “x is broken” but at most that is what’ll have.

So where is the middle ground here? I wanted something that wasn’t manual, copying and pasting a folder around, which could be easily forgotten when moving machines and offers no protection from me being an idiot and copying an old version over a newer version. Obviously I think the proper source control path is overkill and eventually dilutes the usefulness of it so I found a better way to keep my source on ALL my computers up to date and available anywhere.

That solution is Dropbox and for me its easily the best solution for keeping things synced across computers. I keep a symbolic link of my work folder and it sorts the rest for me. Really its that easy. Sign up, install, sign in, create symbolic link and you’ve got all your work across all your computers.

Version control obviously has its place and is a wonderful tool that I push on all my uni friends as a great tool to use, and I use it myself to make sure I have another offsite backup and a set of steps (and working versions) of my work. But from now on Dropbox will save me time and headaches.

As I’m sure lots of you have heard there have been rumours of VLC for OSX being deprecated because of the lack of active developers for it. On hearing this and both having recently learnt Objective-C and being quite a hardcore user of VLC (I use it to play fullscreen videos on my second monitor while working) I felt that I might be able to jump in and help out. I know I won’t make any groundbreaking changes but it would be nice to give back something to a product that gives to me.

So I trundled off to the VLC main page to try and get some more information about what is the current state of the project and how I could get involved with the OSX side of things. While looking around the sight I seemed to almost stumble upon this github project. Huzzah! you might be thinking but still no contact information of who to talk to about the project, where I can get more information on it or even what needs doing next! After a quick glance over the codebase, a quick run of Clang static analyser and I’ve found and very quickly patched a potential memory leak – obviously I’d like to get some more information so that I can start actually contributing to the project though, well that is if I end up having enough time between my 101 other projects…

Although thats an awfully complex title to say fast 10 times its also my solution to a problem that I’ve been having with SQLite databases on the iPhone.

While developing both TEC and Tagger (yes thats my highly unimaginative name for my dissertation app) I keep running into threading issues with the SQLite database I use to store all the data. This is partly because of my use of many threads to keep the UI fast and useable. Because of these many threads there is occasionally a collision between the normal getting the details of the local area from a MAC address and the adding of a new location or a background database update. This is a problem that could be solved in a few ways – first checking that we aren’t running a database update when we request location details or, my preferred option, a queue.

The good thing is in Objective-C there is a built in queue class that can either process things sequentially or in parallel based on the free resources of the computer. In this sense it’s actually possible to think of it as a higher level abstraction of the Grand Central Dispatch found in Snow Leopard but the real beauty of this class is that its available on the iPhone. This means that I can now add all the queries I want to perform to a queue and then when the previous one has finished it’ll automatically start on the next one. Bliss.

Well this is all well and good but to do this you need to make the SQL query into a task that is completed and this is the bit that isn’t so easy. With an insert method that requires no feedback it really is as simple as creating a NSInvocationOperation object with the insert query and data then adding that to the queue but what if you actually want to get data back out? Turns out that you should be able to grab the result of an NSInvocationOperation when it has finished processing but if I’ve called this from another thread it quickly becomes problematic. So to solve this new problem I turned to properties and good old NSNotifications.

Simply put I place the data pulled from the database in a property in the DatabaseManager instance (its a singleton so its always the same…) then send out an NSNotification which is picked up by the class that is expecting it, in this case the Tags class and then it copies from the DatabaseManager property to a local variable. Its not the most elegant way of solving this but it works and after all that’s all that ultimately matters!

As I mention on the about page I’m currently developing things for the iPhone and at the moment I’ve got 2 projects on the go that make use of the iPhone SDK. One is my dissertation which is making use of the iPhone platform to demonstrate my research (location based information using tag vector location techniques) and a more personal application for keeping archery scores during both practice and competitions, the point of the scoring app is to make it easier for people to record their scores because I see a lot of archers mess up the scoring of arrows, the totals for the ends and the running totals, especially beginners who lack experience of scoring.

My current workflow and the tools that I use in this (Xcode, AnalysisTool and Versions) make developing things for the platform a little bit easier and dare I say a little fun. The only stumbling block I occasionally run into when I’m sleepy and lacking caffeine is the lack of managed memory on the iPhone platform. Personally I find the lack of managed memory as a bit of a mixed blessing, a blessing because I’ve found it makes me think a lot more about how I’m actually using variables in my code, what needs doing with them and when I can get rid of them and a curse because when I’m sleepy (and lacking a cup of tea) this is because I revert to my Java ways and start failing to use all the memory management rules and just let the variables sit in memory never to be used again. This of course isn’t helped by the fact I’m still using Java on pretty much a day to day basis to complete uni assignments and so I’m switching constantly between having the memory managed for me and having to manage the memory myself.

This switching between memory-managed and non memory-managed environments is why I use AnalysisTool in my workflow, it would be nice to be able to use built-in version of Clang static analyser but for some reason I can’t fathom it doesn’t seem to work on iPhone projects. The use of AnalysisTool also helps save time when I’m looking for leaks, instead of going though my code with a toothpick and finding all these leaks myself I can run the tool and it’ll find the ones I’ve missed. I can then use the information it gives back to me to reinforce my knowledge and fix that leak.

There are many little lovely things that I’m starting to love about objective-c, properties, message passing, every classing needing an interface (although it does get in the way when prototyping) and named parameters to name but a few. The other great thing is all the “free stuff” that you get when developing for the iPhone. The best example of this is having a tableview. This is pre-made just extend the UITableViewController class and override the methods you want to use. If you want to make a custom cell for that table again, extend the “free” one and change what you want.