Tuesday, October 20, 2009

MaraDNS thoughts

I was having a private conversation on the internet with someone who has helped MaraDNS a lot over the years. I told them the following when I mentioned MaraDNS’ future:

I do plan on finishing up MaraDNS 2.0, which should have full ipv6 support, better recursive resolving, and then I plan on finishing up that Python script that converts BIND zone files in to MaraDNS “csv2” zone files. The csv2 zone files already have support for pretty much anything you would see in a BIND zone file; it’s just a matter of finishing up the Python script.

I don’t know when I’ll go back to working on that code, however. Other things are more important. Namely: I need to become really familiar with OO programming to stay competitive in today’s job market. I don’t plan on spending the rest of my life working in an exotic Latin country babysitting Windows computers earning only pennies on the dollar.

Poking around with Google, in addition to finding a lot of really positive things said on Slashdot about MaraDNS (thank you everyone for your kind words), I found a couple of Slashdot comments asking for full IPv6 support; one of the comments asks for BIND zone file support.

MaraDNS right now has full authoritative-only IPv6 support; zone files have native support for AAAA records and, if MaraDNS is compiled without recursion enabled, MaraDNS can bind to and listen on IPv6 sockets. Deadwood, which will some day become MaraDNS’ recursive resolver, has full IPv6 support today for non-recursive DNS queries, and I fully plan on adding full IPv6 recursive support.

I also have been working on and off for years adding BIND zone file support to MaraDNS. I have made a lot of revisions to MaraDNS’ “csv2” zone format to make it easier to convert BIND zones to MaraDNS zone files; I have a Python script that converts BIND zone files to MaraDNS zone files, but the script is incomplete and there’s a lot of corner cases it doesn’t cover. One of my goals is to finish up that script, minimize the corner cases and give MaraDNS good BIND zone file support.

“Plan” being the operative word here. I really need to update my software development skills for the 21st century, and that means mastering OO programming. My beautiful girlfriend has become my beautiful fiancée—I need to do what it takes to get a job making a living wage like I was making during the dot-com boom again. And, sorry, but making people on Slashdot happy doesn’t pay the bills.

Monday, October 19, 2009

Final Schoolbook opening research for 2009

OK, last night I finished up my opening research for Schoolbook. I’ve been spending the last two weeks researching Schoolbook chess and similar chess variants, and discovered the following:
  • White has about a 7% advantage in Schoolbook
  • Of all six Capablanca chess setups in the form RXNBXKBNXR, the Aberg setup, RANBQKBNMR is the most balanced; white only has a 3% advantage in this setup
  • Black can minimize white’s advantage by replying to 1. e4 with 1. e4 d5 2. exd5 Nb6; 1. f4 is handled with 1. f4 c5; and 1. c4 is handled with 1. c4 Mh6(!)
  • I’ve found over 100 pretty mates (mating positions where one side think they are ahead, then the other side finds a mating combination
For people who want to see the research determining that the Aberg setup is the most balanced, or want to see those pretty mates, they are here:
http://www.samiam.org/schoolbook
For people who are wondering what I’m talking about, some helpful links:OK, I’m done with chess variants for 2009. Next: Get proficient at C++ and object-oriented programming, so I can update my job skills.

Thursday, October 15, 2009

Du for Windows and other tidbits

While MSYS offers the majority of the classic UNIX command line to Windows, one utility it does not have is du, which lets me see how much space a given directory takes up, and which files are hogging up hard disk space.

I have been using Cygwin to run “du”, but starting up a full *NIX environment (complete with X) to run that one command MSYS neglected to include is a little excessive.

While MSYS doesn’t have du, Microsoft has a free download of du for Windows. Its output is not quite the same output as the classic *NIX du, but it’s good enough for my purposes.

Another option I haven’t looked in to is the GNU coreutils for Windows, whose du output should be more UNIX-like.


In the early 1990s, people began to realize that floppy disks did not have enough space to store anything besides text documents and small images, so work began on making an affordable removable media with more space than a floppy disk.

One of the more successful attempts to do this was the Iomega Zip drive. Zip drives were quite common in the 1995-1999 timeframe, depending on your definition of “common”. They were common in the sense your average geek would have a zip drive, but not common in the sense that, when you bought a computer, it was a given it would have a zip drive. Zip drives were successful because you didn’t need a special connector to use them; you could attach it to the parallel port almost all PCs had in that time frame (or the SCSI Zip drive if you had a Macintosh or, in my case, used Linux before the Paraport driver was made). They were used a lot until compact disc recordables got affordable (hit the $1 per blank disk price point) around 1999 or 2000.

I used Zip drives and Zip disks for storing data offline from 1996 until early 2001, when my buddy Leo started letting me burn CDs on his CD burner.

There were competitors, such as the SyQuest EZ 135 Drive, the LS-120, and higher priced higher capacity options like the Jaz drive, the Orb Drive, the SparQ drive, among others. I actually got an Orb Drive and a few 2.2 gig cartridges for backing up the server we had at work back in the dot-com days.

Iomega still makes high-capacity removable drives and media. Their current technology is something called an REV drive, which uses 120 gigabyte cartridges (about $60 per cartridge). There’s another removable media technology called “RDX” with media up to 500 gigs in size (for $300). With this type of technology, you’re paying for convenience; a terabyte-size notebook hard disk is $127 at Pricewatch right now and a 100-pack of DVD-R (not +R, since -R stores seven more megabytes) media is around $25 at Meritline right now (you can store 500 gigs in 107 discs).

These days I use DVD-Rs to store data; my burner doesn’t support dial-layer blanks, so I just burn single-layer 4.7 gig disks for backups and what not.


My chess variant research continues. I have been doing a lot of computer simulations of various openings in my “Schoolbook” arrangement of the Capablanca pieces. White starts with a 7% advantage, so I’ve been looking for openings where Black can minimize that advantage. 1. e4 d5 2. exd5 Nb6 looks to equalize things for black, 1. f4 c5 appears to give black a strong advantage, and I’ve been spending over a week looking for Black’s best reply to 1. c4; right now 1. c4 Mh6 looks to be Black’s best reply, but I need to do more research on this.

Chess variants are one of those things where it’s trivial to “invent” a variant but difficult to research how to play the variant in question. There’s a reason a lot of strong chess players resist any attempt to change the rules of chess; people have spent centuries in to finding the best moves in chess, and any change, even one as simple as rearranging the pieces in the opening, throws out a lot of that study.

Sunday, October 11, 2009

MaraDNS in the press

Yesterday, I worked on some research seeing what the press says about MaraDNS. The press has a said a lot of good things about MaraDNS. Here are some examples of books, articles, and papers which discuss MaraDNS:MaraDNS is used by a number of ISPs to serve thousands of domains. MaraDNS is used by Boeing. MaraDNS is ready to be used by your business or enterprise.


I have uploaded a new version of MaraDNS today. In addition to adding the above material showing third parties praising MaraDNS to the MaraDNS advocacy page, I have also changed the next version number of MaraDNS to be MaraDNS 1.4.01. The release can be downloaded here

The MaraDNS 1.4 series will be an actively maintain series of releases that continues to use the older recursive code for people who need both an authoritative and recursive DNS server on the same IP. The only changes to this branch will be security and critical bug fixes. I will release this around the same time I release MaraDNS 2.0.

Saturday, October 10, 2009

Clarification about MaraDNS roadmap

Since some anonymous freetard responded to my last blog entry by trying to put some BS on the MaraDNS Wikipedia entry, let me clarify my roadmap:
  • I have no plans to quit working on MaraDNS. “Quit working” implies I will no longer fix bugs or answer email on the list. This is false.
  • My current plan is to continue to fix bugs after the 2.0 release of MaraDNS. I plan on continuing to fix bugs in 2.0 and the upcoming 1.4 release of MaraDNS for the foreseeable future.
  • I will continue to monitor the mailing list and answer questions I deem appropriate to answer.
  • I will still provide for-pay private email support for MaraDNS
  • I will still add features to MaraDNS that people are willing to sponsor
Now, let me give you guys a rant about freetards. A freetard is someone who expects something for nothing. They feel they have an entitled right to download pirated software and media, and that companies who try to protect their intellectual property are somehow in the wrong (or that intellectual property should not exist). They feel they are entitled to free private email MaraDNS support (I get about one idiot like this a month) even though I make it clear I don’t provide this kind of support. They feel I should spend my free time writing MaraDNS “for fun and for free” and try to put untrue negative statements about MaraDNS on the Wikipedia if I don’t give them something they think they are entitled to.

One of the biggest hassles developing MaraDNS is the number of freetards out there. People who don’t lift a finger to help make MaraDNS a better server, but expect me to waste time answering their email asking for the same feature 10 other freetards have already asked for. People whose net contribution to MaraDNS has been to annoy me.

About a month ago, I had an interesting discussion on Slashdot about user’s expectations for open-source software. The conclusion: Many users of open-source software expect to be treated like customers, but are unwilling to pay a single dime for open-source software.

Bottom line: If you want to be treated like a customer of MaraDNS, you first must become a customer of MaraDNS. If you make a modest donation to MaraDNS, I will be happy to answer your email; the charge, for the record, is US $50 per private email support incident, more if I need to add a feature to MaraDNS to resolve your concern.

If you want to be a freetard and send me a private email, I’ll spend about 10 seconds scanning your email to make sure you didn’t make a donation, then send you the “Show me the money” form reply. Yes, this includes bug reports. Yes, this includes feature requests. Yes, this includes whatever discussion you want to have with me about MaraDNS in private email. All of this belongs on the list, not in my personal mailbox—unless you include a check in your email.

Friday, October 2, 2009

An open source developer grows up

A lot of open-source forums are full of naive and innocent people. People who honestly believe that software can be developed and media can be made by nothing more than people working for fun and for free in their free time. Indeed, people point to Linux and say "Look! This great software project made for fun and for free!"

That's not how software development works. Linux? It's very disorganized; there is no central authority to standardize on things like the Desktop interface to use, the ABI for drivers, and what not. This results in Linux being a mess: A hodge-podge of driver ABIs (sound is so bas that it's nay-to-unusable in Linux), desktop GUI interfaces (Qt, GTK, FLTK, Xaw, TCL/TK, Motif and its Lesstif clone, to name just a very few), programs at various stages of development, etc. The only thing Linux can seem to agree on at all is POSIX, which is so old and quaint, the only networking protocol it talks about is UUCP [1].

Linux makes a very good server OS for someone who knows what they are doing, but it is not and never will be an end-user desktop.

For example, the Linux sound system. What happened was that the main developer for Linux's sound system one day grew up and realized that the work needed to make open-source software compared to the reward he was getting was just not worth it. So he tried to make it commercial; other Linux kernel developers wanted to keep everything open source, so they threw out all of his work (never mind that his system was the standard system for doing sound with Linux for years) and reimplemented it, more poorly. Linux's sound is a mess to this very day, with dozens of half-baked audio systems in place, none of which works as good as the original system.

OK, let me go back to why this happened: The main developer grew up. He realized that open source software development for fun and for free is plain simply not worth it. He left the project. No other Linux developer was able to make the same quality of code he did.

Another example: Xconq, which I talked about in this blog posting. Summary: The principal author, after nearly two decades of work on the project on and off, finally lost interest in the project and development just came to a halt without any formal announcement. Many open source projects die like this; the developer loses interest, but never puts closure on the project. Instead of giving the project a proper burial, the project becomes a zombie, dead but pretending to be alive.

Another example: FVWM. Rob Nation realized one day that it was a far more productive use of his time to be with his wife and kids than to work on open-source software, so he stopped FVWM development. He handed over maintenance to other people who, IMHO, did not do as good of a job as Rob Nation developing the software; while FVWM2 has more features than FVWM1, the code is more unstable and more bloated. Indeed, I still use the last release of Rob Nation's FVWM1 today when I'm using Linux. FVWM1 ended with proper closure; FVWM2's development has slowed down but still appears to be actively development (albeit at a glacial pace); the last stable release was done in 2006, but a beta release was done as recently as last month.

Another example: People's Tactics. The developer made a free beer "grogger" wargame for Windows that simulates the old 1970s and 1980s wargames groggers played with hex maps and a zillion tiles on the maps (Squad Leader and other games from Avalon Hill, SPI, Axis & Allies which didn't use hexes but was probably the most popular wargame of this type, etc.) He realized that he should be paid for his work (software development, support, etc.), so removed the website for his older free game, and replaced it with a website for his for-pay Advanced Tactics game.

And, yes, I'm coming to the realization I need to put closure on MaraDNS. This means my next release of MaraDNS (MaraDNS 2.0) will be my last release of MaraDNS. MaraDNS 2.0 will have real Windows service support for the recursive code, in addition to a rewritten thread-free recursive core. I've done about two thirds of this work on and off for two years; I made a lot of progress in late 2007, and even more progress in the first two thirds of 2009, but come September I hit a roadblock when I hit the point of starting to implement full recursion. I have made some progress chipping away at that roadblock, but it's slow progress.

I also hit a point where I realized it is more fun to do things like research Chess variants that no one plays (openings, best opening setup, midgame strategy, etc.) than to finish up my DNS server. Indeed, I feel this software is holding me back; it's written in C (which is next-to-useless on a resume unless you also have C++ or Objective C; come to think of it, with all the companies outsourcing development to India, C development in any form might be useless at this point) in a day and age when the buzzwords people look for on resumes are things like "Java", ".net framework", "PHP", and "SharePoint".

I have been spending my time working on MaraDNS instead of getting my resume out there (it's pretty discouraging in this economy, but I shouldn't give up) or updating my skills. I have been spending my time working on MaraDNS instead of doing what it takes to reach my goals: To have a job making a living wage so I can support myself and my girl comfortably in the US (ideally somewhere where it is sunny like California, my home).

So, yeah, what I'm saying is that I'm taking a break from MaraDNS. I have every plan to finish up the Deadwood code and come out with MaraDNS 2.0. But it isn't going to be the end of 2009. Maybe I'll start work on MaraDNS again next week; maybe I'll just let it rest until 2010 sometime, just as I stopped Deadwood development for most of 2008 and only started development up again in early 2009.

Do I want to finish up Deadwood and release MaraDNS 2.0? Yes. Am I going to do it anytime soon? Probably not. I'm having fun downloading and trying out various turn-based strategy video games; I would rather do that right now (or research Chess variants) than develop a program which has only made a very little amount of money for the amount of work I've put in to the code.

I'm growing up and realize that there are more important things than making programs for fun and for free. Yes, I do want to finish up Deadwood mainly to put closure on the project, but I don't think I'll do any MaraDNS development besides basic bug fixes after MaraDNS 2.0 comes out.

- Sam

[1] UUCP: You don't want to know. I remember when an ISP I worked for dropped UUCP support; UUCP was a nightmare to configure and we simply no longer had anyone who could configure our UUCP servers. The *only* thing UUCP can be used for is email and Usenet.

Thursday, October 1, 2009

Capablanca opening setup research

I have done some research about which Capablanca arrangement of the pieces is most ideal.

In the 2000s, we have had many discussions on the Chess Variants server about what makes for the best Capablanca setup. It has been asserted, for example, that all of the pawns need to be defended in the opening setup, and that any opening setup with undefended pawns gives White a sizable advantage.

What I have done is research a subset of Capablanca setups to see if this is true. Since there are some 126,000 setups where the Queen is to the left of the King and the bishops are on opposite colors with the Capablanca pieces, I have reduced the number of setups to six thusly:
  • The rooks must be in the corners. The king must be in the F file. This is to accommodate the software I used for my testing, which only allows castling if these conditions are met.
  • The knights must be in the C and H files, and the bishops must be in in the D and G files. The thinking is this: Since the knights are weaker in Capablanca setups on a 10x8 board than they are in FIDE chess, placing the knights relatively near the center makes them more relevant in the opening and midgame. The bishops are placed near the center just like they are placed in FIDE chess; this is done so that natural pawn development moves (e4, f4) do not hamper the development of the bishops.
  • The Archbishop (Knight + Bishop), Marshall (Rook + Bishop), and Queen may be placed anywhere in the three remaining files.
Here are the six possible resulting setups:
  • RMNBAKBNQR (I call this arrangement “Notetaker’s Chess”; all pawns are defended in the opening array)
  • RQNBAKBNQR (“Schoolbook Chess”; again, all pawns are defended)
  • RANBMKBNQR (I call this arrangement “Narcotic Chess”; the B pawn is undefended in the opening array)
  • RQNBMKBNAR (I call this arrangement “Opiate Chess”; the D and I pawns are undefended in the opening array and White can threaten mate on the first move with Md3)
  • RANBQKBNMR (“Aberg Chess”; the B pawns are undefended)
  • RMNBQKBNAR (“Carrera Chess”; the original 10x8 setup from the 1600s; the B pawns are undefended)
I ran at least 1,000 games for all of these setups. Only games that ended in a Checkmate or a draw were counted; I made sure to have Joker80 play enough games until each of these setups had 1,000 complete games. Here is the win/loss/draw ratio for White with all of these setups:

SetupWinsLossesDrawsGames played
ranbqkbnmr46%43%12%1010
rmnbqkbnar47%42%12%1017
ranbmkbnqr49%41%10%1002
rqnbakbnmr48%40%13%1006
rqnbmkbnar50%38%11%1004
rmnbakbnqr53%37%10%1011
Numbers may not add up to 100% because of rounding

Since we played 1,000 games with each variant, the scores may be off by as much as 2% or so.

In conclusion, we can see that whether or not all pawns are defended is not a relevant factor in White having more of an advantage. The setup with the lowest White advantage (ranbqkbnmr, White advantage 3%) has one undefended pawn in the opening array for each side, and the setup with the highest White advantage (rmnbakbnqr, White advantage 16%) has all pawns defended in the opening array.

ranbqkbnmr appears to be the most balanced setup (3% White advantage); this is followed by rmnbqkbnar (5% White advantage). ranbmkbnqr and rqnbakbnmr both have an 8% White advantage; ranbmkbnqr has fewer draws, however. Both rqnbmkbnar and rmnbakbnqr give White a considerable advantage (12% and 16%, respectively); I am not surprised rqnbmkbnar has a considerable White advantage, since the D pawn near the King is unprotected, and since White can threaten mate on the first move with Md3. However, it is a mystery why White has such an advantage with the rmnbakbnqr, since all pawns are defended in this setup. It would appear undefended flank pawns don’t give White any significant advantage.

For people interested in this research, I have made a 4-megabyte archive with all of the games played in the course of this research here:
http://www.samiam.org/schoolbook/
I would like to thank H.G. Muller for modifying Winboard and creating Joker80; this software made this research reasonably straightforward to perform.

Edit: Corrected number of undefended pawns in Carrera and Abera opening setups.