Showing posts with label Source code. Show all posts
Showing posts with label Source code. Show all posts
Wednesday, August 11, 2010
Moving to Visual C Express 2010
After using the great free Java IDE's Eclipse and Netbeans for a while, and also because I bought a nice new Core i5 laptop recently, I thought it might be worthwhile installing something more modern than my slightly antiquated Visual Studio 2005 on it. I love those new features like code completion and refactoring, the fact that you can just hover your mouse over variables in the code during debugging and it shows you what they are and all the other nice bells and whistles in the Java IDEs. Having also gotten used to not having to pay for a nice programming environment, I decided to install Visual C 2010 Express. Upgrading my old projects (such as CheckerBoard, Cake, book and endgame database generators, Connect 4 and my chess engine Muse) turned out to be quite a bit of a hassle - the upgrade wizard failed to convert about half of my projects, and I had to restart them from scratch, and had some more trouble because some libraries that used to be added automatically are not added any more, causing linker errors. I had another smallish disappointment when I noticed that there is practically no refactoring support in the express edition, and a bit a larger disappointment when I noticed that there is no 64-bit support either. While I do appreciate that M$ is giving away a free more or less modern IDE, I still would wish for more. So here's my question to the C programmers out there: is there anything else that you would recommend for the Windows platform - something that would also allow me to import my Visual Studio projects with as little trouble as possible?
Sunday, December 27, 2009
Checkers Tutor 1.02
In the 5 days since the publication of Checkers Tutor for Android, I fiddled around with it a bit. I added a feature to display all legal moves in the current position (it claims to be a tutor after all...), and I fixed some minor bugs: v1.02 now also displays properly in the landscape mode and the board numbers scale better (also on hi-res devices). Behind the scenes, I cleaned up the user interface code a bit to make it more readable, maintainable and less bug-prone. As usual with this cleaning business, it never actually ends. My board class has more than 700 lines of code, and after reading Robert C. Martin's nice book titled Clean Code, I must assume that that is too much, and besides I find a couple of the code smells he lists in my code...
These things aside, I'm afraid that my Checkers Tutor has missed the boat anyway - it got 228 downloads in its first 5 days, which means nearly none compared to Aart Bik's Checkers for Android, which apparently got over 250'000 downloads in one year (see Aart's blog for more information). This is the usual punishment for coming late to the party - I could have published Checkers Tutor in August, but somehow felt I should still add zillions of features to make it better than Aart's app - in the end I never added these features, and the early bird has caught the worm - the attention of the Android Market, where often-downloaded programs are more visible, and thus go in a positive feedback loop.
These things aside, I'm afraid that my Checkers Tutor has missed the boat anyway - it got 228 downloads in its first 5 days, which means nearly none compared to Aart Bik's Checkers for Android, which apparently got over 250'000 downloads in one year (see Aart's blog for more information). This is the usual punishment for coming late to the party - I could have published Checkers Tutor in August, but somehow felt I should still add zillions of features to make it better than Aart's app - in the end I never added these features, and the early bird has caught the worm - the attention of the Android Market, where often-downloaded programs are more visible, and thus go in a positive feedback loop.
Thursday, August 07, 2008
4 in a row source code
I just published the source code of my 4 in a row program on my four in a row page. While this doesn't appear to fit in a computer checkers blog, I think it does belong for two reasons: first, it is an example of how to write a high-performance game program. Second, this is the second part of my plan to publish some of my source code (CheckerBoard came in first). More to follow...
Tuesday, July 22, 2008
CheckerBoard source code release
My interest in computer checkers is waning - partly because the game is solved, partly because other interests are taking more of my time these days. I still sometimes get mail asking for new features in CheckerBoard, but I haven't done much lately. Since I don't think this will change anytime soon, I have made the source code of CheckerBoard (in version 1.651) public. This code can be used in any way you might see fit; I'm not going to bother with some kind of public license.
I am very much aware that the code is neither particularly good nor clean; CheckerBoard was - like perhaps most software - not really designed well, i.e. it started out as a simple program and then I kept on adding more and more things to it, and so the whole program structure isn't nice. Some of the source code is really old, written at a time when my programming skills were even less developed than they are now. And of course, I'm not a trained programmer who learned how to properly develop software. All of this will make the CheckerBoard source code rather hard to understand, but if you have a lot of patience and a decent working knowledge of standard C, then you can probably get to grips with it.
I am very much aware that the code is neither particularly good nor clean; CheckerBoard was - like perhaps most software - not really designed well, i.e. it started out as a simple program and then I kept on adding more and more things to it, and so the whole program structure isn't nice. Some of the source code is really old, written at a time when my programming skills were even less developed than they are now. And of course, I'm not a trained programmer who learned how to properly develop software. All of this will make the CheckerBoard source code rather hard to understand, but if you have a lot of patience and a decent working knowledge of standard C, then you can probably get to grips with it.
Sunday, May 08, 2005
The Big Ball of Mud
After writing that I didn't want CheckerBoard to become bloatware like so many other programs, I wondered whether there was a formal definition of bloatware. Wikipedia is a fantastic online encyclopedia, free for all to use (and to improve!) - and indeed there was a chapter on bloatware in Wikipedia. Reading through the article and following some links I can now improve on my old code posting: Wikipedia has a comprehensive list of bad programming practices, and I found a lot of things I was guilty of! The top problem of CheckerBoard is that it is a big ball of mud. Related problems are lava flow, procedural code, action at a distance and accumulate and fire. Read the articles and have a good laugh imagining me wading in my big ball of mud :-)
Wednesday, May 04, 2005
Old Code
When I added a few features to CheckerBoard a few days ago, I once again was confronted with my programming past. CheckerBoard is such an ugly program, it makes me want to throw it all away, and start over, or rewrite everything seriously. Unfortunately, that would take a lot of time so I never do it. I cleaned up a bit of code that was particularly awful, but there is still lots I would like to fix some time. What do you do with your old code?
Subscribe to:
Posts (Atom)