Minim Development Diary: Week 3

Posted on the 08/09/2007 at 02:56 AM

This week has been quite the opposite of last week, very few problems and lots of progress. Unfortunately next week might not be quite as productive as I’ll likely be without a decent internet connection and I’m planning on getting some bugs fixed in Code Collector. But that’s the future what about the past?

File Management

As with many things, file management is very easy to do, but very hard to do right. Minim now fully supports the drag and drop of files onto and from the files window. It also reads in file data from various file types including GarageBand 08 and SimpleChord files. I haven’t re-implemented some stuff like the contextual menu but that’s fairly simple stuff that I can do when I get round the polishing the app, the aim at the moment is to get the bulk of the work done and then go back and do the little things.

That said, there is one little thing I did that required me to contact Apple’s developer technical support for the first time. When you drag something onto a table it draws a black line on the drop area. There are 3 possible places for the black line to be drawn: round the table, round an item in the table or above/below an item in the table. Now when you drop an item on an empty table you get the black line round the table, but when you have items in the table you only get two options, drop on an item or below an item. “Fair enough,” you may say but neither of those work for my purposes…

When you drop a file onto a song in Minim there is no concept of order beyond what reordering the table view allows. You can’t put an item above or below another item and you definitely can’t drop a file on another file because that would just be stupid. So the only real option is an outline round the table, unfortunately I couldn’t figure out how to do this and was thinking I might have to re-code a bunch of stuff in the table view to make it work. You may think that stuff like this is just a case of me being anal, but let’s be frank here, the Mac wouldn’t be like it is if developers weren’t anal about the little things.

Luckily, thanks to Apple DTS I found out there is a very simple way to do this (I suggest any developers out there take note in case they need this). There is a method on NSTableView called -setDropRow:dropOperation: which you can call when you are validating a drop. If you pass in -1 as the drop row you get a nice outline round your table. <borat>Nice!</borat>

Search for the song inside your library..

That heading is to be sung to the tune of Search For the Hero by M People. I did have a different bit written for this (I tend to draft these posts in the morning) but today’s events have caused me to change it. I was hoping to have search working today, but unfortunately there’s a rather large problem… it won’t work. I wrote a lot of code that does lots of cool stuff for the search and when I come to test it I go “oh bugger”. Turns out there’s no easy way to filter songs by their collaborators and files…

... well I say there’s no easy way. There’s no easy way to do it that I particularly want to do. See the problem is I have an array (a group) of songs and a song has an array of files. Turns out cocoa isn’t very good at searching arrays in arrays. So what is the solution? Well it’s kind of a hack but it should work but the plan is that whenever you make a change to a collaborator or a file in a song, it will update a metadata string stored in the song, which can then be easily searched by Cocoa. Unfortunately this means making sure it tracks every change, which is what caused some of the problems in searching in previous versions.

The Search Bar - opening soon

Rule one of writing something fairly complicated: use Google to see if someone has already done it for you. I started writing a search bar myself (similar to that in iTunes 5, Mail or the Finder). Turns out someone had already written an rather excellent one. Thanks to Andreas Mayer for AMButtonBar, you have saved me several hours of work. The search bar in Minim is coming along but isn’t yet fully functional (mostly due to searching not yet being fully functional). Another day or so and the searching should work like a charm.

Progress report

So back in August when I first outlined this project I said the following, “I’m hoping to have the bulk of [Minim 1.2] done by mid september at the latest.” Mid September would be the 15th of September which would be a week on Saturday. So will I reach my aim of having the bulk of the update done by then? I believe I will, even with the issues I’m likely to have next week.

The two main areas I wanted to focus on were file management and searching, the majority of the improvements planned for these are done, or will be done by the end of this weekend. That leaves integration with SimpleChord and creating a song from a GarageBand file. These are comparatively minor additions and shouldn’t take more than a day or two to add.

Of course having the bulk of the features implemented doesn’t mean it will be near to release. When I have the bulk of features implemented I usually create an alpha version, which I give to a select few people to get feedback. It may then be another 1-2 weeks before I get a beta version out to testers and then it may be another 2 weeks or so before I say I’m not doing anything more and this will be the final release. For those who don’t know software terminology an alpha release is one that isn’t feature complete ie it’s still under active development, and a beta release is one that is feature complete but buggy. In reality when you get to beta releases you should only be fixing bugs and doing minor usability improvements, you’ve made your table now you have to smooth it and varnish it.

So does this mean I’m giving a release date? Sort of.. I never like strict deadlines, they don’t allow for flexibility. I prefer to draw a line on a list and say that everything below that line will be done in a later version. I’m aiming for a late October release but of course anything can happen, Minim 1.0 was originally meant to be released early October but got pushed back to late November, these things happen. We’ll be able to get a better picture of how long it will take for Minim 1.2 to be finished in a few weeks when I’m moving towards the beta.



Comments (0)




Minim Development Diary: Week 2

Posted on the 01/09/2007 at 02:28 AM

This week has been quite a slow and frustrating week. The weekend was spent updating a few things on the website and updating Code Collector. The plan was to get all that up on Tuesday, unfortunately a problem with my internet connection meant that it was impossible to get the stuff online reliably. So Wednesday was spent sorting out Code Collector but I managed to get started on Minim again Wednesday afternoon, though half the week had already gone.

Unfortunately these things happen in any profession and all you can do is make the best use of the time you have remaining. So in that time I’ve been working on getting the file management further along. Groups are now working and data is being imported from various files including GarageBand 08 files. The final job is drag and drop which I’ve started to implement but isn’t finished yet. With any luck this will be finished by the end of the weekend.

The future or now?

I was required to make a choice yesterday about the structure of the file management system under the hood. All files had some shared metadata (the name, date, etc.) and then the various file specific metadata. So my first thought was to put all the common stuff in a single entity and then have another entity that contains the various other file attributes (for those who don’t know about databases, an entity is a group of objects, for example Songs or Files).

When I got round to planning what data to show for each group I realise that many of the custom bits of file info are used in multiple groups and there weren’t all that many different bit of info. Now it’s all too easy for developers to think ahead and design something that they don’t need now but may be easier in the future. This is almost always a bad thing. It overcomplicates things today and your needs may change in the future so what you designed may not work as well. It’s far better to think about now than to think about several months from now, especially as the development tools today allow you to make changes fairly quickly.

Unfortunately that’s all for this week, it’s been rather uneventful. Hopefully technical problems won’t get in the way next week and I’ll have something more interesting to talk about, and hopefully some screenshots.



Comments (0)




Code Collector Pro 1.0.1

Posted on the 29/08/2007 at 07:35 PM

Code Collector Pro 1.0.1 and Code Collector 1.1.1 are now available for your viewing pleasure. I’ve managed to improve the speed of the syntax highlighting. It’s almost twice as fast now which is a huge improvement. I’ve also corrected some rather big errors when colouring comments that slowed things down. If you find any bugs remember to send them to support@mcubedsw.com and we’ll try to get them fixed as soon as we can



Comments (0)




Minim Development Diary: Week 1

Posted on the 25/08/2007 at 04:37 AM

Well, the first week of Minim development is drawing to a close so it’s time for the first of the development diaries. For those who aren’t familiar with why I’m doing it you can read the idea here:

Development Experiment

Finding a point of attack

Like any project, the hardest part is finding where to start. It’s easy coming up with a vision for an update and to see exactly how it should work. Unfortunately, seeing what a user will see is not helpful in seeing what a developer needs to do. I decided to tackle the file management update first, but finding where to start is like finding a weakness in the Death Star: it’s hard to find and hard to hit but when you hit it the whole thing explodes.

As this is essentially a complete re-write of the feature I had two options: replace it bit by bit, always being close to having something that could be releasable, or taking out all traces of the feature and starting from scratch. As I have no real need to release Minim part way through development and because I often prefer a blank canvas to painting over my previous work, I gave my source a rather violent introduction to the delete key. Under an hour later I had Minim compiling with no traces of file management, barring the now blank Files tab.

Ok, so I’ve managed to get past the outer defences of the Death Star, now to find the point of entry. Unfortunately at stages like this of a project I end up procrastinating to a rather large extent and doing practically anything I can do, barring work on this problem. Eventually I get round to forcing myself to do something and everything starts to snow ball after that. Luckily I managed to hit the exhaust port of this problem yesterday.

Data, data everywhere

So I’ve started writing the data migration so I can get the file management features working with files already in the system. Adding new files is just a small step after that. Regular users may not appreciate the true extent of a data migration. It is by no means a simple mundane task as the small window that appears for a few seconds when you install a new version would have you believe. Not only do I have to worry about properly updating a database from version 1.1 to 1.2, which involves reading in files from 1.1 and copying them all to 1.2, I also need to deal with those upgrading from 1.0 to 1.2. And as time goes on you need to focus more and more on these sorts of changes which will get more and more complex as time goes on. An unfortunate but necessary bit of code that requires a lot of testing.

One thing that working on the migration does, however, is bring the data layer into sharp focus. This is a great opportunity for asking the age all question: “What the hell was I smoking when I wrote this?”. One feature of the Audio files tab is the selected audio file. This is the file from which Minim takes the time of the song, and is also for some future features we have planned. In order to select a file as the main audio file you clicked on a radio button next to the file. What this did was to loop through all files, disabling them, and then selecting the file you just clicked on. Looking at this now, it was a completely idiotic way of doing things. Why not have a drop down list in the song info panel that lets you choose the primary audio file? It makes things much simpler both from my perspective and the user’s perspective.

The next hurdle

So what is next? Well the next job is getting files to display. Then I can get on to customising the importer for different file types. This will allow you to, say, see the tempo of a GarageBand file, but also the running time of a movie. Unfortunately, it always sounds easy when you think about it like that, but you often find some annoying little problem that messes up your development process.

So that’s all I have for this week, it’s not much and I’ve waffled quite a bit (it’s a talent of mine) but hopefully it’s given you a bit of an insight into how I develop software and the issues I have. Have a good weekend, and look out for Code Collector Pro 1.0.1 by early next week.



Comments (1)




Page 24 of 27 pages « First  <  22 23 24 25 26 >  Last »



Copyright © 2006-2012 M Cubed Software