Re: The worst piece of Mozilla code

2014-10-20 Thread Thomas Zimmermann
Hi, this mail made me laugh, because I can tell very similar stories with different examples. (Not sure if :) or :( ) On the positive side, I think we got a lot better since then by both, fixing broken designs and code, and also applying learned lessons to new sub-systems. Best regards Thomas A

Re: The worst piece of Mozilla code

2014-10-20 Thread Gabriele Svelto
On 17/10/2014 00:32, Nicholas Nethercote wrote: > Thanks for the replies so far! I deliberately left this question vague > to see what kind of responses people would give. But mostly I'm > interested in code whose awfulness impacts users in a serious way. > Ones where refactoring/rewriting efforts

Re: The worst piece of Mozilla code

2014-10-17 Thread Neil
Mike Hoye wrote: I mean, if you find somebody in their office today curled up in a ball, rocking back and forth and muttering "mork, mork, mork" over and over again, that person's having a bad flashback. Call for help, stay with them. Tell them we've got sqlite now and it's going to be OK. T

Re: The worst piece of Mozilla code

2014-10-17 Thread Neil
Nicholas Nethercote wrote: I was wondering what people think is the worst piece of code in the entire Mozilla codebase. I'll leave the exact meanings of "worst" and "piece of code" unspecified... When you get time, find someone to tell you about Morse code. (No, I don't mean Samuel.) -- War

Re: The worst piece of Mozilla code

2014-10-17 Thread Neil
Ehsan Akhgari wrote: Speaking about code that causes correctness bugs that actually affect our end users, the best example that I know is editor/. Not just correctness, but the unique way it use pointers to nsCOMPtr all over... -- Warning: May contain traces of nuts. ___

Re: The worst piece of Mozilla code

2014-10-17 Thread Seth Fowler
Thank you Bobby and Josh for all your work to improve ImageLib! I’m pushing hard on making it better still (with a lot of help from folks like Timothy Nikkel and Michael Wu). Hopefully next time we try to decide what the worst piece of Mozilla code is, ImageLib won’t be a candidate. =) - Seth

Re: The worst piece of Mozilla code

2014-10-17 Thread Bobby Holley
On Fri, Oct 17, 2014 at 1:03 AM, Josh Matthews wrote: > I'm not certain that the image/src/ code is as bad as you make out any > more. bholley certainly is no longer the expert there; I took over a bunch > of his work to clean it up a year or two ago, and Seth is the benevolent > dictator now and

Re: The worst piece of Mozilla code

2014-10-17 Thread Henri Sivonen
On Fri, Oct 17, 2014 at 1:32 AM, Nicholas Nethercote wrote: > On Thu, Oct 16, 2014 at 11:32 PM, Nicholas Nethercote > wrote: >> >> I was wondering what people think is the worst piece of code in the >> entire Mozilla codebase. I'll leave the exact meanings of "worst" and >> "piece of code" unspec

Re: The worst piece of Mozilla code

2014-10-16 Thread Ehsan Akhgari
a sub-system with frequent subtle correctness issues would be very bad. For that I'd tend to agree with ehsan editor/ and the selection bits in layout/. FWIW the selection code is much better these days. There are edge case bugs in it for sure, but I don't think it

Re: The worst piece of Mozilla code

2014-10-16 Thread Trevor Saunders
On Fri, Oct 17, 2014 at 09:32:20AM +1100, Nicholas Nethercote wrote: > On Thu, Oct 16, 2014 at 11:32 PM, Nicholas Nethercote > wrote: > > > > I was wondering what people think is the worst piece of code in the > > entire Mozilla codebase. I'll leave the exact meanings of "worst" and > > "piece of

Re: The worst piece of Mozilla code

2014-10-16 Thread Ehsan Akhgari
On 2014-10-16, 6:33 PM, Nicholas Nethercote wrote: On Fri, Oct 17, 2014 at 8:55 AM, Andreas Gal wrote: I would like to nominate image/src/* and in particular its class hierarchy which completely doesn’t make any sense what so ever. imgRequest, imgIRequest, we got it all. Does this cause co

Re: The worst piece of Mozilla code

2014-10-16 Thread Andreas Gal
I am glad to hear there is so much activity happening there. Kind of makes my point though: that code needed it :) Andreas On Oct 16, 2014, at 8:03 PM, Josh Matthews wrote: > I'm not certain that the image/src/ code is as bad as you make out any more. > bholley certainly is no longer the exp

Re: The worst piece of Mozilla code

2014-10-16 Thread Josh Matthews
I'm not certain that the image/src/ code is as bad as you make out any more. bholley certainly is no longer the expert there; I took over a bunch of his work to clean it up a year or two ago, and Seth is the benevolent dictator now and has done some good cleanup work on it as well. Cheers, Jos

Re: The worst piece of Mozilla code

2014-10-16 Thread L. David Baron
On Thursday 2014-10-16 19:45 -0300, Andreas Gal wrote: > The code is really bizarre, needlessly complex and impossible to understand > and maintain. We could use a lot of improvements in this area to better > decide what images to load when and how and when to retain or purge them. Seth has been

Re: The worst piece of Mozilla code

2014-10-16 Thread Andreas Gal
The code is really bizarre, needlessly complex and impossible to understand and maintain. We could use a lot of improvements in this area to better decide what images to load when and how and when to retain or purge them. There is a lot of state machinery and multi-threading at work. I wouldn’t

Re: The worst piece of Mozilla code

2014-10-16 Thread Nicholas Nethercote
On Fri, Oct 17, 2014 at 8:55 AM, Andreas Gal wrote: > > I would like to nominate image/src/* and in particular its class hierarchy > which completely doesn’t make any sense what so ever. imgRequest, > imgIRequest, we got it all. Does this cause correctness problems, or is it just hard to read a

Re: The worst piece of Mozilla code

2014-10-16 Thread Nicholas Nethercote
On Thu, Oct 16, 2014 at 11:32 PM, Nicholas Nethercote wrote: > > I was wondering what people think is the worst piece of code in the > entire Mozilla codebase. I'll leave the exact meanings of "worst" and > "piece of code" unspecified... Thanks for the replies so far! I deliberately left this que

Re: The worst piece of Mozilla code

2014-10-16 Thread L. David Baron
On Thursday 2014-10-16 05:32 -0700, Nicholas Nethercote wrote: > I was wondering what people think is the worst piece of code in the > entire Mozilla codebase. I'll leave the exact meanings of "worst" and > "piece of code" unspecified... I'd probably pick the table and row height computation code

Re: The worst piece of Mozilla code

2014-10-16 Thread Andreas Gal
I would like to nominate image/src/* and in particular its class hierarchy which completely doesn’t make any sense what so ever. imgRequest, imgIRequest, we got it all. Andreas On Oct 16, 2014, at 6:44 PM, Randell Jesup wrote: >> On Fri, Oct 17, 2014 at 1:32 AM, Nicholas Nethercote >> wrote:

Re: The worst piece of Mozilla code

2014-10-16 Thread Randell Jesup
>On Fri, Oct 17, 2014 at 1:32 AM, Nicholas Nethercote > wrote: > >> I was wondering what people think is the worst piece of code in the >> entire Mozilla codebase. I'll leave the exact meanings of "worst" and >> "piece of code" unspecified... >> > >Probably not the worst, but always deserves a ment

Re: The worst piece of Mozilla code

2014-10-16 Thread Martin Thomson
roc said: > Probably not the worst, but always deserves a mention: > http://dxr.mozilla.org/mozilla-central/source/layout/xul/nsSprocketLayout.cpp#632 That's relatively short. This is 800 lines, complete with several layers of goto: http://dxr.mozilla.org/mozilla-central/source/security/nss/lib/

Re: The worst piece of Mozilla code

2014-10-16 Thread Justin Dolske
On 10/16/14 5:32 AM, Nicholas Nethercote wrote: I was wondering what people think is the worst piece of code in the entire Mozilla codebase. I'll leave the exact meanings of "worst" and "piece of code" unspecified... It's gone now, but I always held a special hate for nsIDialogParamBlock. htt

Re: The worst piece of Mozilla code

2014-10-16 Thread Marcio Galli
only code? Long time ago I found a PSD file in the Netscape source. About 1MB with a few layers. m On Thu, Oct 16, 2014 at 4:52 PM, Robert O'Callahan wrote: > On Fri, Oct 17, 2014 at 1:32 AM, Nicholas Nethercote > wrote: > >> I was wondering what people think is the worst piece of code in the >>

Re: The worst piece of Mozilla code

2014-10-16 Thread Robert O'Callahan
On Fri, Oct 17, 2014 at 1:32 AM, Nicholas Nethercote wrote: > I was wondering what people think is the worst piece of code in the > entire Mozilla codebase. I'll leave the exact meanings of "worst" and > "piece of code" unspecified... > Probably not the worst, but always deserves a mention: http

Re: The worst piece of Mozilla code

2014-10-16 Thread Andy Wingo
On Thu 16 Oct 2014 15:24, Joshua Cranmer 🐧 writes: > . C > code masquerading as C++ that use XPCOM classes directly. Manual memory > allocation up the wazoo. Cleans temporary files on error but not > success. Hahaha Creat

Re: The worst piece of Mozilla code

2014-10-16 Thread Joshua Cranmer 🐧
On 10/16/2014 7:32 AM, Nicholas Nethercote wrote: Hi, I was wondering what people think is the worst piece of code in the entire Mozilla codebase. I'll leave the exact meanings of "worst" and "piece of code" unspecified...

Re: The worst piece of Mozilla code

2014-10-16 Thread Nicolas B. Pierron
On 10/16/2014 03:08 PM, Nicolas B. Pierron wrote:> On 10/16/2014 02:32 PM, Nicholas Nethercote wrote: >> I was wondering what people think is the worst piece of code in the >> entire Mozilla codebase. I'll leave the exact meanings of "worst" and >> "piece of code" unspecified... > > Simple, any f

Re: The worst piece of Mozilla code

2014-10-16 Thread Mike Hoye
On 2014-10-16 8:32 AM, Nicholas Nethercote wrote: Hi, I was wondering what people think is the worst piece of code in the entire Mozilla codebase. I'll leave the exact meanings of "worst" and "piece of code" unspecified... Currently or ever? I mean, if you find somebody in their office today c

Re: The worst piece of Mozilla code

2014-10-16 Thread Nicolas B. Pierron
On 10/16/2014 02:32 PM, Nicholas Nethercote wrote: I was wondering what people think is the worst piece of code in the entire Mozilla codebase. I'll leave the exact meanings of "worst" and "piece of code" unspecified... Simple, any file named configure.in in the code base, because deprecated t

Re: The worst piece of Mozilla code

2014-10-16 Thread Andy Wingo
On Thu 16 Oct 2014 14:32, Nicholas Nethercote writes: > I was wondering what people think is the worst piece of code in the > entire Mozilla codebase. I'll leave the exact meanings of "worst" and > "piece of code" unspecified... The LegacyCompExprTransplanter. https://hg.mozilla.org/integration

The worst piece of Mozilla code

2014-10-16 Thread Nicholas Nethercote
Hi, I was wondering what people think is the worst piece of code in the entire Mozilla codebase. I'll leave the exact meanings of "worst" and "piece of code" unspecified... Thanks. Nick ___ dev-platform mailing list dev-platform@lists.mozilla.org https