Fog Creek Software
Discussion Board

Andrew Tridgell on his latest Samba rewrite

Another rewrite-from-scratch story.  :-)

developerWorks talks to Andrew Tridgell about his work at IBM, the state of Samba 3.0, and his thoughts on the smbd rewrite.

Andrew Tridgell:

    "I was constantly running across limitations in the core structure of Samba. In order to ship products on a three- or four-month type time scale, we really just had to have workarounds for those core limitations, and it meant we had to have some poor compromises, particularly in the area of NT Access Control Lists [ACLs] and lack of support for things like file streams, or some compromises in the area of user and group management. They were just pragmatic compromises, because we didn't have the luxury to really say, "Well, let's rewrite all of Samba."

    "I've spent probably a month or so on the core rewrite so far. It doesn't compile yet. It's a long way from compiling. I'm hoping that by the time the Samba XP conference comes around in Germany, that these core changes will, in fact, be compiling and I'll be able to start getting other developers to look at them."

Thursday, April 17, 2003

Thursday, April 17, 2003

Am I the only one that compiles all the time? Does anyone else here build/compile in increments? I understand that an application like smbd is very complex but am I wrong is assuming that an application should be built in increments instead of building it all up front then entering debugging hell once you're "finished"?

Thursday, April 17, 2003

Gee, I wish I had the time to follow this one. I hope as news comes out (good, or bad), you can post some new update info.

One of the other issues of a re-write is how large is the project is. If the project is only going to take a week, then a re-write is not really a huge deal…is it?

Now, I would guess that Samba is a fair bit of work, and especially to figure out all of the MS security stuff.

I did not think that the current samba needs a re-write. It is also not clear how much of the previous code is being used.

This should be most interesting to watch. If this fails, we sure are going to see a lot of “told you so’s” from here.

Perhaps someone should email him a link to Joels “don’t do this” article?
I am betting that unless some base functionally is reached, this project will fail.

Albert D. Kallal
Edmonton, Alberta Canada

Albert D. Kallal
Thursday, April 17, 2003

I'm with you there.  I never really have code in a state where it can't compile -- it might compile against empty stub code that does nothing, but it will compile. 

Different strokes and all that, I guess.

George McBay
Thursday, April 17, 2003

I think of all the open source products more time is spent on configuring samba than any other.  I admire what they are doing, but so far, I don't see the benefits.  Plus consider that CIFS is and will be a moving, not entirely documented target from now until the end of time.

Every week I watch the people on various linux lists struggle.  If they added up the time they spend configuring samba, they'd probably be as well off with buying cals.

Thursday, April 17, 2003

I can't understand how or why he would code for over a month without compiling. Even if you are writing a huge new program from scratch, shouldn't you at least start with a "hello world" main() function that compiles correctly?

If people are flailing so much, trying to configure Samba, perhaps there is an opportunity for someone else to start a competing project or Samba fork. I remember there was a "Samba: TNG" fork a couple years ago. I think Samba: TNG added NT domain support and was partially merged back into the main Samba code.

Thursday, April 17, 2003

Notice that he's working for a research lab now. They're basically paying him to play with whatever he wants. The goal is NOT to produce a product here, it's to experiment and see what the results are.

So, this is really a whole different kind of "rewrite". Also, this isn't like Netscape. The previous version of Samba is still out there, and anyone can grab it and use it.

Chris Tavares
Thursday, April 17, 2003

I'm in total agreement with some of the previous posters. I compile my code three times a day (on days when I actually write code, which (at my current job) isn't often).

I can't fathom how someone would let their code remain uncompilable for longer than a few days. You may as well be writing your code on post-it notes.

Benji Smith
Thursday, April 17, 2003

It does strike me as kind of odd that being able to compile a project is seen as a milestone rather than a base camp.

I do have a milestone in projects which use a compiler, especially if its C/C++ and that's to compile without warnings with the strictest set of flags appropriate.  Compiling some piece of code and watching  conversion warnings fly past and being reassured by the coder that 'oh they don't matter' gives me the heeby jeebies.

Simon Lucy
Friday, April 18, 2003

It says that he is doing a "rewrite" but in fact it sounds like he is "refactoring." A lot of guys I know, when they have to port something to a new architecture, just take the old source code and try to compile it. Then they keep tweaking the code until it compiles. I'm guessing this is what he is doing; the notion of typing code in for months without compiling it is just too bizarre.

Friday, April 18, 2003

Yeah, seriously -- I can not imagine trying to code for more than a few hours (or perhaps a day or so, depending on how much you need to stub out) without compiling.

I'm such an awful typer most of the time, that I HAVE To compile at least once every few hours or I'll have a hell of a time tracking down all my syntax errors / figure out what variable that was supposed to be / etc.

Steven C.
Friday, April 18, 2003

I've configured Samba a bunch of times and I'm always surprised how difficult it is.  Much as it hurts my Linux-luvin' side, what it needs is a good, intuitive GUI (ouch). 

The defaults seem screwy too, but I'm using it strangely.

Friday, April 18, 2003

Well, I think the lesson is not to bet your future on a rewrite working out.

Rewrites are a huge risk.  They can lead to huge rewards, but are very likely to not yield any benefit whatsoever.

If you have the extra resources, then a rewrite can be a good investment.  Even in if the rewrite project fails, some of the experiments will make their way back into the main trunk.

Richard Ponton
Friday, April 18, 2003

*  Recent Topics

*  Fog Creek Home