Tag Archives: Programmer tools

Finding good tools to make greater tools

Programming is usually something fun, but there is two types of situation that always made me mad:

  • Spending too much time finding a stupid syntax error because the compiler gives me a very weird error message and pointing to the wrong place in the code.
  • Having to hack my way out to trace a bug because the debugger doesn’t give me the information I need (or worse, gives me a false answer).

Mostly, as programmers, we want to spend our time creating, and not fighting against our tools.c3wifeinternalerror1

My husband was using XCode until recently. Having only mac at home, this was the obvious choice. But as the codebase continue to grow, he was getting more and more of those two things. Then the search for an alternative started. Codewarrior doesn’t support mac anymore. Anyway we already made an overdose of it in the past, back when we were mac game programmers! Then came Eclipse, he’s testing it now. Will he stick to it? Will he go back to XCode? Will something new arise? Or will he simply buy a PC and go back to Visual Studio and it’s comfortable Visual Assist. Eclipse debugger seems to be a little better, probably because it uses GDB/MI instead of directly parsing GDB’s output (more info). I expect support for C++ to grow very slowly for XCode, Apple’s attention being focused on C and Objective-C (a very similar fate to OpenGL because games weren’t a priority for Apple until recently).

No matter how good the tools are, the root of the problem is in the language grammar. The more hacks there is in your parser, the more difficult it will be to give clear error messages or debug correctly. Leaving retro-compatibility behind open the door to a design that would minimize those problems. In order to do that, my husband always keeps in the KISS motto in mind. A nice lean grammar implemented in a simple yet elegant way shall have lots of good influence in the future. This is a big part of why he didn’t go for YARD; sure he loves templates, but sometimes they are just too much for the needs.

Clear error messages and precise debugging tools are part of the big dream. It won’t prevent us from making stupid mistakes, but will sure save time when we do.

Dreaming of a community

I briefly talked about a programming environment and community in my last two posts. Those are the core elements of what would make C3 lift off. A perfect language is nothing if nobody is fluent with it, or worse, if nobody ever hear about it. In the past, major languages have been pushed up front by major companies or a dedicated community, usually a combination of both. As we cannot force the first one to appear, we want to work on the second, convincing you to add your voice, but also your workmanship to this grand project.c3wifecommunity1

The big picture would be to have a very nice way to create, compile and manage your code. But the real innovation lie in the way my husband want you to share and find code between each other. What I liked from Java, when I started working with it, was this pleasant selection of classes and functionalities, basic stuff surely, but stuff I didn’t have to rewrite. I could concentrate of the specificities of my project. After a while, I found things that could be improved, I created generic code that could have been shared. As a university student I would have gladly shared my code for free. But the thing is: even if there are ways to do this, they are awkward to use, and chances are that even if there are people searching for what you did, nobody will actually stumble on it.

Now that I’m in “the real world”, I see some basic needs not been satisfied and everyone doing the same solution on their side. Company want their people to create functionalities in their software, stuff that they can write on the box or their website to sell more, not to write once again a set of basic containers, ordering algorithm and so on. Some will use STL, but for many, it won’t fill the exact requirement, and will prefer to rewrite everything. For some more specific things, they won’t even bother to look if it already exist, because even if they found something claiming to be what they want, they could never be sure of its stability.

I just wrote a lot about the problems, but what about the solution? All start with a nice comfortable interface for the basic needs, with the source control fully integrated into the coding interface. When starting with C3, a new personal branch is created for you so you can have fun and create your application in your own sandbox. You already benefit from the backup service from the source control without making more efforts. If you need a library, you can start searching with a powerful search engine, if your need is shared you will find something close to them, and import it into your branch and customize it if necessary. If your need is less casual, you will want to implement it. Using a promoting system, you will be able to tag your library as in progress and keep it to your personal space or spread the word identifying your library as ready to be released to the word. Beyond a certain point, the community becomes responsible to rate the code base and mark the buggy ones from the achieved ones.

For companies, the formula change a little. Should they choose not to divulge their code, they could buy a server that would serve as a proxy as well. You could even choose to sell support for your library, which would increase its rating.

Many aspect of this, like the rating system, the interface, or the integration with the source control, are worth to be talked in details and will make object of many posts to come. In the near future, I want to concentrate on the language itself because it needs to be a lot more complete in order to implement this system. What bigger test would it be for the language than to implement its own programming environment!