Size Matters

Posted on the 12/01/2010 at 11:34 PM

As with most things in life, there are two opposing schools of thought when it comes to software. When it comes to the size of things you can either go big or small. Is your app going to have a large scope or small scope? Is it going to target the general market or a particular niche?

When I started work on Code Collector Pro 1.4 over the weekend I was confronted by the issue of whether to go big or small on two key points: the size of updates I release and the size of the classes I write. These are key decisions that affect all the software we write, so it is worth deliberating over them. Now these aren't questions I've only just asked, they are ones I've looked at continuously and am only just starting to set myself on.


Release sizes

There are two extremes to software release size. At the large end of the scale are products like Adobe Creative Suite, Microsoft Office and Apple's iWork and iLife suites. They have a release roughly every 1-3 years and they feature large updates to several applications. At the smaller end of the scale are products like WebKit or Adium, where small releases are made every day in the form of nightly builds.

Most Mac devs go for the middle ground of this, releasing several medium sized updates a year, though what constitutes a "medium sized" update varies widely. I've been striving to reach the smaller end of the scale with little success until now. The combination of full time education limiting coding time, and a lack of discipline when building releases has led to a series of sporadic releases that are quite large.



With Code Collector Pro 1.4 there was a long list of features building up. There hasn't been a release for 14 months and the featured planned involved would take a good 3-4 months to complete. The release eventually included a UI overhaul, new sharing features, syncing and a re-written syntax highlighting engine.

So I opted to break it up into smaller releases. The UI overhaul is a collection of many small changes and some under the hood changes and nicely separates into a different release. Sharing improvements and syncing were the two major features I wanted for 1.4, so these would fit nicely into a second release. And the syntax highlighting improvements would also fit nicely into a small release. As such the large 1.4 now became much smaller versions 1.4, 1.5 and 1.6.

The current plan is to work on 1.5 straight after releasing 1.4. But why not then combine them? Well there are 3 main reasons not to:


Class Size

For those of you who aren't programmers a brief explanation. A class is a unit of code. It contains data and actions upon that data. While not always true, generally a class = a separate file of code. As with release sizes you can either have a few large classes or lot of small classes. Cocoa provides ways to help you divide your code up. Code relating to windows goes into Window Controller classes, code relating to any documents goes into your Document class.

Prior to OS X 10.5 there was a missing piece of the puzzle though. While you could easily split up your application into windows, it was harder to split up these windows into individual views. Then in 10.5 Apple introduced NSViewController, which made this task easy. This means you can split your UI up into even small classes, which leads to easier to maintain code and more reusable code.

As an example, these are the window and view controllers that make up a typical screen in Minim:



As you can see, this one screen has 4 main components. The window, which contains a sidebar and an info panel, the latter of which contains the current tab. Each of these is coded in a separate file. This means that if I need to edit something to do with the sidebar I open the sidebar view controller's file. It also makes things more re-usable. There is a file that contains the file manager view controller class. This same class is used for songs, podcasts, albums and shows.

Now Minim is build with Leopard in mind. Code Collector Pro however is very much a Tiger era application in its design. This is what Code Collector Pro's main window looks like from a class point of view:



There is one class that manages the window, the sidebar, the snippets list and the code view. It even controls the inspector panel. At 2420 lines long it is the second biggest class in any M Cubed app, beaten only by the class that talks to Lighthouse in Lighthouse Keeper. That over 3 times the size of the biggest class in Minim.

Now while a large class isn't necessarily a bad thing, a large class that does lots of different things is. If I want to edit something to do with the sidebar in CCP I've got to search through 2400 lines of code to find what lines are relevant, compared to Minim where I open a file where all the lines are relevant.

I'm currently working through the process of breaking up this monolithic class into much smaller, more manageable chunks. I've already managed to split it into 7 classes, I may be able to divide those even further. Ultimately though, this will add nothing new to the application. It will work exactly the same as it did before. What it does do is make it easier to add new stuff in the future.


It's How You Use It

So does size matter? Well as the title of the post suggests, it does. But what is a good size depends on many things. To quote Albert Einstein, "Everything should be made as simple as possible, but not one bit simpler". You should strive to make things as small as you can, but not unnecessarily. While I can break one large class up quite easily, another may not break up. It may be the case that it is already as small as it needs to be.

The same goes for releases. I can split up what was going to be CCP 1.4 into 3 different versions quite easily, they logically split up. However, Minim 2.0 couldn't have been split up. It was a large project, but it couldn't have been made any smaller. Everything has its size, the job of anyone creating something, be it a piece of code, a product or a business, is to find the right size.



Comments (3)




Minim 2.0

Posted on the 07/01/2010 at 06:36 AM

After 6 months of work, 20,000 lines of code, and countless amounts of blood, sweat and tears we are happy to announce that Minim 2.0 is finally available. It has been a lot of work and involved learning quite a lot but I feel it has been worth it when you see the finished product.

It now requires Mac OS X 10.5.8 or higher to run (previously it only required 10.4 or higher) and now costs €25 (around $36). You can find out more about it at minimapp.com




From 1.0 to 2.0

Minim 1.0 was released over 3 years ago in November 2006. Since then it received just 2 updates, version 1.1 and 1.2. It suffered right from the start from my inexperience, not only at coding, but at creating a product that can sell. Since then I've released 2 successful products and become a much better developer.

So when it came to working on Minim 2.0, it made sense to treat it as an entirely new product. I used the experienced I'd gained over the past 3 years and re-designed and re-coded it from the ground up. I added some new features that weren't in 1.x and took several features out that weren't particularly useful. I made sure to justify everything that went into the app, rather than just saying "Well that would be cool" as I did with 1.x.

It is also the first app I've worked on that had designers heavily working on it. This has been an interesting experience, as it involved doing a lot more custom UI elements than any other app. It also meant the release schedule wasn't just in my hands as well.



The result is what is quite easily the best application I have created to date. It is a sign of things to come from future versions of Code Collector Pro and Lighthouse Keeper, as I'll be able to give them the attention of a full time developer.


Accessibility

Last year I made a pledge about accessibility, that I was unfortunately unable to fulfil. Lighthouse Keeper and Code Collector Pro are 90% accessible but not the 100% I was aiming for. But Minim represents an important step in the direction of making all M Cubed's applications fully accessible. It has been extensively tested and features several unique features that mean it provides as good an experience to disabled users as to fully abled users.

The lessons I have learned from making Minim 2.0 fully accessible will be invaluable to making Code Collector Pro and Lighthouse Keeper reach that goal as well. I'm hoping that by the summer I will finally be able to say that all of M Cubed's apps are fully accessible.


Open Source

Over the next week I will be releasing various open source components, as well as improvements to existing ones. All of this code comes straight from Minim. I will also be sharing a lot of the lessons I've learnt while developing Minim, so keep an eye on the blog as I get into the nitty gritty of the redesign, responder chain hacking and a detailed look at the drawing code behind the recording view.



Comments (0)




M_Cubed_age++

Posted on the 25/11/2009 at 07:17 PM

Well, it's exactly 1 year since the last time I posted the M Cubed birthday retrospective, so I guess that means I need to do another one today. The past year has been quite an eventful one, at least behind the scenes.


Finishing University

The bulk of the last year was taken up with finishing my degree. This is the primary reason that you haven't seen much activity from M Cubed the past 12 months. Exams, assignments and my dissertation all took up the majority of the free time I had.

Unfortunately both getting a degree and running a software company require a lot of mental input and it's hard to do both at once. Effectively M Cubed was shut down for several months while I focused on my degree.

In mid June I had my last exam, all my assignments and my dissertation were handed in and I was finally free of full time education. In July I went back to pick up my degree at my graduation ceremony and now I the £20,000 piece of paper that says I am a Computer Science BSc. So with all of that out of the way I could finally focus all my energy on M Cubed.


Going full time

Last year I said that I hoped to be working full time from M Cubed. This year I can say that I am now a full time indie developer. Granted this is helped in part by the fact that I've been able to move back home with my parents and that I'm able to keep my expenses down. Many people wouldn't be able to live off what I'm earning, but it is enough for me to dedicate all my energy to it.

The biggest benefit of going full time has actually been having free time. Previously I would fill my free time with M Cubed work, but when combined with school/university work this would lead to me getting burnt out pretty quickly. Being able to focus most of my attention on M Cubed, I can now use my free time for things that are actually relaxing. I'm no longer having to stay up until 2am coding, I can get offline at 10pm and spend the rest of the night relaxing. I can't emphasises enough how much doing this has increased my productivity.


2 > 1

Going full time wasn't the only major thing that happened with M Cubed this year. As was announced in July, M Cubed's employee list doubled. Fabio joined to help with design and coding. The result is the website design you see now, plus many graphic improvements to our applications that you don't see yet. In fact you'll see the first fruits of our labour next week when we release Minim 2.0


Minim 2.0

Minim 2.0 is going to be the first release from M Cubed since I went full time. Minim has long suffered from a lack of focus and development time. The last release was 18 months ago and only fixed 1 small bug. The last major release was over 2 years ago.

Version 2.0 changes all of that. It has been completely re-designed and re-coded from the ground up. It is practically an entirely new application, the name and the core purpose of the software being the only things shared with 1.x. Whereas Minim 1.x was only the second real application I had written, Minim 2.0 builds on 5 years of experience, meaning I can say with confidence that it will be the best application we've ever shipped.

It really is a shining example of what the changes this year hold for the future. Every release I've done in the past has been limited by the amount of time I've had and has had me as the primary designer. Minim 2.0 has had several people working on the design and we've been able to put a lot of time and effort into polishing it. Whereas before the question was, "how can this feature be added in the shorted amount of time?", the question is now, "how can we best implement this feature?"


Accessibility

The other thing that Minim 2.0 will showcase is accessibility. Earlier this year I made a pledge: "By the end of 2009, every application I produce will be fully accessible". Unfortunately I won't be able to fulfil that pledge by the end of 2009. However, the next major version of each application will fulfil the pledge of making every application I produce fully accessible.

Minim 2.0 does fulfil that pledge by being the first M Cubed app to be fully accessible. We've put a lot of effort into achieving this and we hope it will help in providing a first class experience for disabled users.

Code Collector Pro is mostly accessible but needs the most work and this will be fixed in version 1.4 which we hope to have out early next year. Lighthouse Keeper only has some minor accessibility issues but these will be fixed in version 1.2.

To further highlight our emphasis on accessibility, we are setting up a new email address where you can contact us about any accessibility related issues with our software. If you have any questions about our the accessibility of any of our products then send us an email at accessibility@mcubedsw.com


The year ahead

Well the next year will see a lot more activity from us. As I've already pointed out, our next 3 releases will be Minim 2.0, Code Collector 1.4 and Lighthouse Keeper 1.2. We also have plans for a major revamp of codecollector.net, which has been feeling a bit neglected. We'll also be looking into dipping our toes into the pool of iPhone development. And to top all of this off we have a number of open source projects we will be working on. All in all, the next year will probably be the most productive one in M Cubed's history. Hopefully the post a year from now will tell you about all these great projects as M Cubed celebrates a half-decade of existence.



Comments (2)




Web vs Desktop & Mobile: The pointless war

Posted on the 23/11/2009 at 11:42 PM

Oh boy. I've been really trying to restrain myself from writing this blog post. It feels like I write one like it once a year. It is the age-old (at least in internet years) argument that the web is better than the desktop or the desktop is better than the web.

Now in my usual post on this topic I pull the web idealists from their pedestals and inform them the web will never replace the desktop, and smack desktop idealists around the head and tell them they can't expect their apps to live on an island any more. The conclusion is always the same: the real power is in the internet, the web and the desktop are just two different ways of providing an interface to it, each with pros and cons.

However, what made me crack and write this post is another post by one of the aforementioned web idealists. So this post will instead be rebutting his post with a vengeance. The author is Peter-Paul Koch and the post can be found here: http://www.quirksmode.org/blog/archives/2009/11/apple_is_not_ev.html


Stupidity

So any post where the title calls a group of developers 'stupid' obviously is going to be full of bias and errors, so let's go through them.

It also supports JavaScript geolocation, which is (I hope) only the first step towards true device APIs that will give JavaScript developers access to phone functionality such as the camera, text messaging, the address book, and more. I’m assuming Apple is working on all that because it’s the next logical step.

That is a very poor assumption for one very important reason. Most people don't want to have their address book read in and text messages sent (at their expense) to all their contacts asking them to visit a website, after they themself visited that website. There's a very good reason websites don't get access to system APIs and this is it.

Safari’s support of appcache makes it possible to store the Web app’s core files on the iPhone itself, so that it only has to download the data. Thus mobile connection problems can be avoided.

But then you need a cache of the data stored locally and the ability to modify the data locally, meaning your web app needs to be run locally. What we have there is a mobile app built with web technology.

Best of all, if you want to update a Web app, you just put the updates on your Web server. There’s no need to wait for Apple’s broken approval process. iPhone developers are stupid because they’re wilfully ignoring all this.

This may be veering off slightly, but 90% of the issues with the App Store process are due to the length of time. If you got a response within 24 hours of submission and you could get a speedy response when you appeal then most of the issues would go away. So yes a web app fixes that by allowing you to update on your server.

However, you then have to pay for that server. Many web developers forget two key things about desktop/mobile development:

1. Scalability isn't an issue as you gain more processing power with each user, on the web you reduce the processing power each users gets with each new user.
2. You aren't having to also pay for the computer the application will run on, nor the resources it will use.

These two facts lead to one highly important factor for a lot of desktop/mobile developers: your expenses are lower.

Now this isn't saying that you should therefore never make a web app. Web apps are needed in many cases, but they aren't the be all and end all.


More Stupidity

Still, the graphically simple games such as sudoku and chess, the interactive shopping lists, the dictionaries and bible citation apps, the beer appreciation apps, the firmware Yahoo weather app, and most importantly all social network clients could have been written as a Web app without any loss of quality whatsoever. (Most have fairly little quality to lose in any case.)

This I have to strongly disagree with. If the web provided an equal user experience to the desktop then why do desktop clients exist? Why do people buy Lighthouse Keeper when they could use Lighthouse? Why am I writing this in MarsEdit instead of my blog's admin panel? Why are most of the tweets I see proclaiming "the end of the desktop/mobile" posted from desktop/mobile Twitter clients and not the web UI? The fact is that the web is a LONG way off matching the user experience that can be delivered on the desktop/mobile

In addition to avoiding the App Store and its insane policies, such Web apps would (mostly) work in any modern browser, whether desktop or mobile, and users of other phones or even of old-fashioned desktop computers could have used them, too.

Oh dear. The issue with this argument is that you have to build to the lowest common denominator. Sure you can have your site gracefully scale back. This blog you're reading will have a drop shadow around it and rounded corners. Of course in other browsers in may not have these. The issue is that Peter wants to have it both ways, but he can't.

You can't on the one hand laud the advanced features of Webkit in Safari (Webkit in other browsers can vary widely) while on the other hand say that your apps will work in any browser. People talk about the web as being the platform, but really the platform are the rendering engines such as Webkit (Safari, Chrome, WebOS), Gecko (Firefox, Camino) and Trident (IE), and they all just happen to support the same languages for some stuff (which is no different to Windows, OS X and Linux all supporting C).

Developers like their stuff to reach as many people as possible, right? That makes sense from both a business and an ego perspective, right? Then why do iPhone developers jump through burning hoops as nasty as the App Store approval process just to make sure that their stuff can only be used on one single platform instead of many?

That depends. Can I offer the best user experience while supporting these multiple platforms? Building a general web app that will run well in any browser is much like building a desktop app using Java, it often leads to an inferior user experience as you can't provide a consistent feature set and use advanced features of each OS it runs on. Personally I'd rather develop for one platform and build a kick ass application than develop for a wide audience on multiple platforms and build a mediocre application.


The Web

The plan failed. Jobs Himself ordered His developers to create Web applications with Web standards, but a deafening silence ensued. Then He hurriedly thought up the App Store. Too hurriedly, as it now turns out.

It's far-fetched to believe that Apple only thought up the App Store after they saw the reaction to the announcement of making web apps for the iPhone. The amount of time to build the APIs, the developer tools, the infrastructure, work out the marketing and the legal issues probably means they'd been planning this since before the first iPhone was released.

The "build web apps" announcement felt more like a stop gap measure. More a case of "stop hounding us about developing for the iPhone, if you really MUST develop for it right now then we've added a few small things to make it easier to build a web app for it".

I remember the ecstatic reaction to the announcement, because it was the very first time a major industry leader mentioned Web standards in a major presentation.

Oddly, I remember the reaction being more along the lines of "WTF?", but this goes to show the different reaction of the two communities.

Besides, Apple does not reach out to Web developers at all, and Web developers respond by not bothering with Apple beyond making sure their Web sites work in Safari.

So the fact that Webkit is probably the most open part of Apple means nothing?

I believe that Apple is working towards its own heavily CSS-centric Web OS, certainly for mobile, possibly also for the desktop, and that this evolution has been slowed down by the energy devoted to the App Store as well as the complete lack of outreach.

And I believe that they're also working on an iPony and odd as it may seem, I think that the iPony is more likely. The reason is that desktop tech has many advantages over web tech, the primary one being that it is much richer in both APIs and toolsets.


Arrogance

The fundamental problem on the iPhone is not Apple’s App Store approval policies, but the iPhone developers’ arrogant disdain for Web technologies. That’s nothing new. Most X developers (for any non-Web value of X) live in mortal fear of the browser as a development platform.

What we see here is what Peter and many other web idealists believe: that web technology is the best tool for every job. The fact is that it isn't. The only people who live in mortal fear of the browser are those who get caught up in the idea that web technology is somehow the holy grail of software development.

After ten years I am fucking tired of the “Web development is not real programming” bullshit that the arrogant bastards in “real programming” are spouting because they’re too frightened to learn something new. Fuck those condescending, ignorant, self-important, stupid, blind, fearful pricks. Fuck them real hard. Where it hurts.

As someone who has done both web and desktop development, I can see where the "web development is not real programming" idea comes from. The APIs and tools for writing, debugging and testing web technologies are a long way behind the tools for desktops. Those technologies that have the most advanced tools are ones that many web idealists deplore, such as Silverlight and Flash. It is very much real programming, it is just programming with a relatively young set of tools and APIs.

As for the arrogance that Peter talks about, any amount of arrogance on the part of desktop developers over web technologies is matched by the arrogance of web developers over desktop technologies. For every "web dev isn't real programming" quip there is a "the desktop is dead" remark. It's an eternal pissing match over who has the best lego set, completely missing the point that you can usually build something much better using the best pieces of both lego sets.


The myth

The poor, oppressed iPhone developer suffering under Apple’s heavy App Store hand is a myth invented by these developers themselves because they’re too fearful to look beyond their “native” fetish. The Web is patiently waiting in the wings like a spurned bride, quietly promising to solve all of their problems for them if they’d only look at her.

If the web really was some magical beast that would produce money from nowhere, cure cancer and give everyone a blowjob then that might be the case. But the thing is that web brings with it a whole new set of problems and doesn't really fix the most important one, which is how to build the best application possible. The web is a screwdriver to the desktop's hammer. They're both tools and if you're building a great house you'll need both.


The last heading

OK so the rebuttal is done. But it is worth reiterating for both sides of the argument: I don't believe the desktop or the web is the one true platform. The one true platform is the internet. The future isn't web apps or desktop apps or mobile apps, but all 3 that can work together. Web apps are best for when you're away from your normal computer and just need to check up on something. Desktop and mobile apps are best for providing a rich user experience and raw speed.

Everyone agrees that most of the processing needs to take place on the client, this is why most of the new web technology seems to focus on getting web apps "off" the web. This is simply going the other direction to desktop apps, where they are getting connected to the internet.

It is best to use each platform to their advantages. This is why I have Code Collector Pro, which focuses on organisation and using code snippets, as a desktop app but I have codecollector.net, which focuses on sharing, as a website. It wouldn't work anywhere near as well the other way around because they would both be playing the weaknesses, not the strengths of their platforms.

And this is why it is a pointless war. Neither side will win because the major strength of one side is the fundamental weakness of the other. They aren't at odds with one another, they complement one another perfectly. And when the idealists on both sides of the spectrum wake up to this we'll be able to stop the bickering and start making some great apps. And I'll be able to get through a full year without the urge to write another one of these bloody blog posts on the topic!



Comments (1)




Page 5 of 28 pages « First  <  3 4 5 6 7 >  Last »



Copyright © 2006-2014 M Cubed Software