Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-16 Thread Caligo
Have you ever placed a 9-volt battery on your tongue? It's not very pleasant, specially when someone asks you to do it and you don't know what's coming. On a serious note, the topic reminds me of an interesting book that I read; The Design of Everyday Things by Donald Norman, "is one of the class

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-12 Thread Kagamin
bearophile Wrote: > The "dynamic" C# keyword and other things in other new languages tells me > that we're going to languages that try to combine the advantages of both. As I understand, this feature is only to simplify interoperability with dynamic type systems like ActiveX, DOM and IronPython

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-11 Thread bearophile
Kagamin: > I rather meant the assertion that in languages with duck type system > unittesting eliminates to some degree the need for strong type system. I like both dynamically typed languages and statically typed ones, both have advantages and disadvantages. The "dynamic" C# keyword and other

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-11 Thread Kagamin
Andrej Mitrovic Wrote: > I still giggle at the "long long" name. Good thing there are no floats > floats and char chars. `long` is not a type, it's a modifier and - accidentally - a shortcut for `long int`. `long long` is a shortcut for `long long int`. `short` is a shortcut for `short int`. `si

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-11 Thread Kagamin
bearophile Wrote: > Kagamin: > > > What do you think about unittesting efficiency section? > > I always use unit testing, in Python I especially like doctests. But often > unit tests aren't enough, so I use Contracts too. I rather meant the assertion that in languages with duck type system un

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-11 Thread bearophile
Kagamin: > What do you think about unittesting efficiency section? I always use unit testing, in Python I especially like doctests. But often unit tests aren't enough, so I use Contracts too. Type system-based solutions too help, a quotation I've read elsewhere (written by a Haskell programmer)

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-11 Thread Kagamin
bearophile Wrote: > A better solution: > http://blog.moertel.com/articles/2006/10/18/a-type-based-solution-to-the-strings-problem > What do you think about unittesting efficiency section?

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-07 Thread Florian Weimer
* Nick Sabalausky: > Is there anything reddit doesn't auto-flag as junk? Perhaps content that is actually viewable and accessible?

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread Walter Bright
On 5/6/2011 3:50 PM, bearophile wrote: Walter: Interestingly, nobody saw all 5 bugs. A good C lint has caught three of them, C lint is not standard C. That's just the trouble with 3rd party tools. They: 1. are not part of the language 2. have wildly varying effectiveness and quality 3. ha

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread Andrej Mitrovic
I still giggle at the "long long" name. Good thing there are no floats floats and char chars.

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread bearophile
Walter: > Interestingly, nobody saw all 5 bugs. You show this as a bug: typedef long T; But did you meant to write this? typedef long long T; With this change the C lint finds this bug too. Bye, bearophile

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread bearophile
Walter: > Interestingly, nobody saw all 5 bugs. A good C lint has caught three of them, plus gives an extra suggestion: 8 for (i = 0; i <= dim; i++); diy.c 8 Warning 574: Signed-unsigned mix with relational diy.c 8 Info 737: Loss of sign in promotion from int to unsigned int diy.

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread Walter Bright
On 5/6/2011 1:46 PM, Brad Roberts wrote: That was the first error I caught.. since I've seen you use it as a common error and reason to use foreach() style loops before. Interestingly, nobody saw all 5 bugs.

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread Brad Roberts
On Fri, 6 May 2011, Walter Bright wrote: > On 5/6/2011 8:13 AM, Andrej Mitrovic wrote: > > Is that a typo on page 31? > > > > "<= should be =" > > > > maybe<= should be< > > > > I guess that further drives the point though. :) > > You're right. Good catch. That was the first error I caught..

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread Nick Sabalausky
"Andrei Alexandrescu" wrote in message news:iq0eqf$l03$1...@digitalmars.com... > On 5/5/11 10:18 PM, Andrei Alexandrescu wrote: >> On 5/5/11 9:04 PM, Walter Bright wrote: >>> The slides: http://www.slideshare.net/dcacm/patterns-of-human-error >>> >>> A review: >>> http://computopics.dcacm.org/201

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread Walter Bright
On 5/6/2011 8:13 AM, Andrej Mitrovic wrote: Is that a typo on page 31? "<= should be =" maybe<= should be< I guess that further drives the point though. :) You're right. Good catch.

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread bearophile
Andrej Mitrovic: > I guess that further drives the point though. :) Yup .I didn't see it. Bye, bearophile

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread Andrej Mitrovic
Is that a typo on page 31? "<= should be =" maybe <= should be < I guess that further drives the point though. :)

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread bearophile
Walter: > The slides: http://www.slideshare.net/dcacm/patterns-of-human-error Nice. Please put your PDFs everywhere but Slideshare. I'd love a simple link to just the PDF, thank you very much (Slideshare requires Flash, JavaScript, other things, and the flash viever doesn't allow me copy&paste

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread Andrei Alexandrescu
On 5/5/11 10:18 PM, Andrei Alexandrescu wrote: On 5/5/11 9:04 PM, Walter Bright wrote: The slides: http://www.slideshare.net/dcacm/patterns-of-human-error A review: http://computopics.dcacm.org/2011/05/04/review-dcacm-patterns-of-human-error-with-walter-bright/ Anyone want to reddit this?

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-06 Thread Lutger Blijdestijn
Nice slides, very simple and elegant. This reminds me of when I started with D. I found a lot of these 'details' unload quite some burden I had with C++ and made programming that much more enjoyable.

Re: Patterns of Human Error - my presentation at the DC ACM

2011-05-05 Thread Andrei Alexandrescu
On 5/5/11 9:04 PM, Walter Bright wrote: The slides: http://www.slideshare.net/dcacm/patterns-of-human-error A review: http://computopics.dcacm.org/2011/05/04/review-dcacm-patterns-of-human-error-with-walter-bright/ Anyone want to reddit this? http://www.reddit.com/r/programming/comments/h5eh

Patterns of Human Error - my presentation at the DC ACM

2011-05-05 Thread Walter Bright
The slides: http://www.slideshare.net/dcacm/patterns-of-human-error A review: http://computopics.dcacm.org/2011/05/04/review-dcacm-patterns-of-human-error-with-walter-bright/ Anyone want to reddit this?