Three Types of People to Fire Immediately - <AUTHOR> http://www.businessweek.com/printer/management/three-types-of-people-to-fire-immediately-11082011.html

<comment><USER3> """I wanted a happy culture. So I fired all the unhappy people."""

Very good for morale, there. Maybe companies could put some sort of electrocution-collar onto employees, and the moment they exhibit any sort of behavior that may or may not hinder the company, regardless of their life situation (they _do_ have lives outside of work, but...should they?!?), they could simply be exterminated.

Discard those useless people, living their emotional human lives. Moneymoneymoney.

(a good boss will be able deal and work with all the behaviors listed in the article.)

<comment><USER4> "Beatings will continue until morale improves."

<comment><USER3> Bender: Wow, your kid is great. How hard you say you had to hit him? Lady: Fairly hard.

</comment></comment></comment><comment><USER5> Extremely polar article. Not every project goes up in smoke because someone thought they were doing it wrong. In fact, quite a few go up in smoke because nobody listened to the nay-sayers.

You need experience to know the difference between a naysayer, and someone who's spotted an upcoming train wreck. You also have to know that there _is_ a difference, and that it's hard to spot.

<comment><USER4> The difference is whether it is based in reality, and it is hard because it can be hard to stay in touch with reality when your ego is invested.

So much nicer when you just fire everyone who doesn't stroke your ego.

</comment></comment><comment><USER6> Firing those sort of people certainly seems to be the best way of ending up with an organisation full of yes men.

Unlike the article author, I think getting rid of the people that incessantly moan about rigid company policies, bluntly tell management their strategy sucks and god forbid actually claim to know things about their market is the perfect recipe for failing to spot the next Netflix/Google/telephone because nobody wanted to upset morale by raising it at the company's Praise Our Strategy session.

</comment><comment><USER7> If you fire the "nonbelievers", you punish those who speak truth to power. This is a recipe for managerial pet projects that end up unprofitable because any insufficiently enthusiastic employee input was punished.

That whole section reads like it was written by a cult leader or a "The Secret" author.

</comment><comment><USER8> _"Can you believe what they want us to do now? And of course we have no time to do it. I don't get paid enough for this. The boss is clueless."_

I hear this around the bullpen a lot lately. I don't think we have a group of victims whining around and complaining all day. These are competent senior engineers that want to do the best work possible given our resources and schedules.

Problem is, they're constantly interrupted by management asking for a sales demo for this customer, or a feature change for that customer. It's the lack of clarity and direction and project management that is frustrating the employees. And who owns _that_ issue?

</comment><comment><USER9> This is good advice, but it's dangerous for leaders who aren't themselves deep experts on their issues that divide their people. It hinges pretty strongly on a boss being the most discerning person at the table.

As all of the comments point out:

For 'victims', 'nonbelievers' and 'knowitalls', read 'defenders of the unpopular', 'visionaries' and 'pragmatists.'

How do you know which is which?

Easy: the boss should be a technical expert, as well as the most demanding user of the product. Such a boss will know when technical decisions are being made rationally and when they are being made for political reasons -- and thus evaluate whether a complaint comes from someone who sees themselves as a victim, or someone who sees something beneficial getting axed.

Such a boss will be able to recognize an earnest and appropriate expression of a compelling, competing vision, and differentiate it from a lack of buy-in. Why? Because he knows the technologies in question, and because he knows that "buy-in" always risks turning into a mindless "lock-in", and so it's useful to have contrarians on your team.

But, hey -- I'm preaching to the choir on HN. And I'd say there is some evidence that leadership is increasingly technical and expert in companies that are winning.

These kinds of decisions are always hard.

For non-technical people, making decisions about technical people, I have a suspicion that they'd do as well throwing darts at a board for all but the most blatant cases of personality misfit.

I've been in situations where the person who created the most value for his company was all three of those things: 'victim', 'non-believer' and 'knowitall'. All they cared about was the product, and it turns out that's the thing you want them to care about.

</comment><comment><USER10> The three types of people to hire:

1) People who never think anything is wrong. 2) People who will believe anything. 3) People who don't care about facts.

... success!

</comment><comment><USER11> Sometimes these attitudes start cropping up in large numbers because you're a shitty boss, so I guess watch out for that too.

<comment><USER3> Yeah, in my limited experience, that's always been the case.

</comment></comment><comment><USER12> These definitely sound like attitudes you'd want to watch out for and combat, but I'd be really hesitant to treat them as grounds for dismissal.

</comment><comment><USER13> I would not criticize the authors of the article on the basis that they are most likely to fail. They want to make "a more innovative company" not a successful or even profitable company. Making people do things they don't know how to do is the making innovation by definition (i.e. discovering something new, even on the personal level). For example if you give chef's job to a programmer and programmer's job to a chef both will have to innovate to make the most trivial stuff. If your investors and or customers are happy with the innovation by itself and don't mind programmer's food and chef's code - <USER2> yourself out I say.

Even better idea - fire everyone who is working now because they might have some clue what is that you are doing. Get some fresh people off the street without telling them anything, take innovation to the max (note to HR: hiring this way you might end up wit hiring somebody who actually knows how to do the job so you need to do background checks to ensure that the new hire has no previous knowledge of his or her future responsibilities).

</comment><comment><USER14> "In our experience, we've found the link between believing and succeeding incredibly powerful and real."

The_Secret.txt

</comment><comment><USER15> Wow. I read the article before and comments, and boy am I happy at the general sentiment. I too agree that this is an over-simplification of a much more complex dynamic, which in any case would be more alarming in terms of crappy management, than bad employees. Such a polarized view on firing people could only come from a ruthless self-centered suit.

</comment><comment><USER16> I'm all for this-I got rid of negatives in my professional world and productivity went up tremendously. Teams work better when there isnt a toxic person holding everyone down.

Not only are those people on that list negative, but they suck other people into their black holes.

Now to get rid of these people in our personal lives, is much harder....

</comment><comment><USER17> This article, like most business articles, is just too full of generalizations and the trivially obvious to be of any value.</comment>


Hand off marketing of a side business to free up time for other ventures? - <AUTHOR>

I sell a niche product to help guitarists prevent finger pain. I've built and launched the site myself, its entirely automated, and I've been getting by running an Adwords campaign which just about cancels out any profits.<p>I know the business is capable of doing better, but I have moved on to building other projects and don't really want to spend the time marketing this site. Is there any way to reliably hand off the marketing of the site to another party, or is this a scenario where it will really only do better if I invest more of my time personally in it? <comment><USER2> I'm going to direct you to patio11's excellent article about hiring SEO specialists... suspect many of the same issues would apply here.

[http://www.kalzumeus.com/2008/01/28/why-you-shouldnt-pay- any...](http://www.kalzumeus.com/2008/01/28/why-you-shouldnt-pay-any-seo-you- can-afford/)</comment>


Moths Outwit Bats by Jamming Sonar - <AUTHOR> http://www.npr.org/templates/story/story.php?storyId=106693909

<comment><USER2> This is interesting but not surprising.

If nature is "clever" enough to evolve radar then radar jamming wouldnt be far behind.

Indeed a human parody is in order here (stolen from a brit comedian). In 1909 Louis Bleriot became the first man to fly from France to the UK across the English channel. In the same year the first serious anti-aircraft gun was created.

Some artistic license there but it highlights the point :)

Nature is the best hacker of all.

</comment><comment><USER3> Steve Blank writes about his learning of this phenonemon while working on electronic warfare systems in this post: [http://steveblank.com/2009/03/23/if- i-told-you-i%E2%80%99d-h...](http://steveblank.com/2009/03/23/if-i-told- you-i%E2%80%99d-have-to-kill-you-the-story-behind-the-secret-history-of- silicon-valley/)</comment>


Show HN: ShakyDraw – Hand-drawn block diagrams from plain text - <AUTHOR> http://shakydraw.com/ <comment><USER2> If you're on macOS, definitely check out Monodraw [1] as a quick and easy way to create such diagrams (then copy + paste into ShakyDraw). Just remember to set your document alphabet to ASCII and you're good to go (from the inspector).

Full disclosure: I'm the developer of Monodraw. If you have any questions, happy to answer here.

[1] [https://monodraw.helftone.com](https://monodraw.helftone.com)

<comment><USER3> It's pretty lame to promote your product on someone else's thread. Just saying.

<comment><USER4> It's called marketing a relevant product to a relevant crowd. Just saying.

</comment></comment></comment><comment><USER5> I want the opposite. Draw a block diagram on paper, scan it, and get a super swank omnigraffle-style diagram from it (or a top-notch ASCII art diagram).

<comment><USER6> I use the DrawExpress app for exactly that. It's brilliant.

[http://www.drawexpress.com/](http://www.drawexpress.com/)

<comment><USER7> Fantastic idea. I'd love a web-based version I could use on the laptop.

</comment></comment></comment><comment> dan-compton Great! The easy problem is solved. Now let's do the reverse so that I can hand-draw ditaa diagrams.

<comment><USER8> That's exactly what I was going to say - the "hand drawn" diagram on the right is better looking, but the left hand is far more accessible and arguably have more utility.

That said, this is a really cool demo.

</comment></comment><comment><USER9> In a perfect world, everything is generated from ASCII diagram sources: [https://github.com/sigvef/sigvehtml](https://github.com/sigvef/sigvehtml) .

</comment><comment><USER10> If you like this, try SvgBobRus[0], which also converts plain-text diagrams into graphics (and has a larger vocabulary). There's also Spongedown[1], which makes it possible to embed these diagrams in your Markdown files and render the whole thing to HTML + SVG.

[0] [https://github.com/ivanceras/svgbobrus](https://github.com/ivanceras/svgbobrus) [1] [https://github.com/ivanceras/spongedown](https://github.com/ivanceras/spongedown)

</comment><comment> King-Aaron Well executed solution to a problem I don't understand as one that needs solving?

</comment><comment><USER11> And where is stated mraleph codebase to go from ascii to an image? I'd like a command line tool to convert locally, or this open sourced so I can host a local version.

<comment><USER12> You may be interested in this recent HN discussion on converting ASCII drawings to SVG: [https://news.ycombinator.com/item?id=14422777](https://news.ycombinator.com/item?id=14422777)

</comment></comment><comment><USER13> Aw. I wrote something last year to translate old documents with plain text boxes and arrows to Unicode line drawing characters. This was a small part of another project. It's here:

[https://github.com/John- Nagle/pasv/blob/master/src/Util/picf...](https://github.com/John- Nagle/pasv/blob/master/src/Util/picfix.py)

</comment><comment><USER14> Chracters all appear as tofu on iOS safari.

<comment><USER15> That's because your browser is too narrow to display the text, so it's wrapping.

</comment></comment><comment><USER16> In Edge I'm getting the following error which means no diagram gets rendered:

        SCRIPT5007: Unable to get property 'ready' of undefined or null reference
        bundle.min.js (1,5413)

<comment><AUTHOR> Oops! Will take a look into it and fix this right away.

</comment></comment><comment><USER17> We need ShakyDraw + Asciiflow to be 1 instrument

</comment><comment><USER3> Damn useful and easy to create flow diagrams.

<comment><USER18> You might also check out Plant UML - they have a much simpler language to type.

[http://plantuml.com/activity-diagram-legacy](http://plantuml.com/activity- diagram-legacy)

</comment></comment><comment><USER19> Very useful and would be more useful in form of an API that could be used with Markdown text.

</comment><comment><USER20> I wish there was a feature to double click a phrase and auto draw the ASCII box around it.

<comment><USER21> If it had that, somebody would wish you could draw arrows, move and resize boxes by dragging, etc. Then you've got a full blown ASCII drawing program. They already exist as a few people have mentioned in this thread. So you can use them for what they're good at and copy/paste their output into ShakeyDraw.

</comment></comment><comment><USER22> hmm. isnt this like more difficult than actually drawing it?

<comment><USER23> I thought that at first - but what if you want a digital copy; what's the plainest, whitest thing you can find to draw on, and do you have a scanner?

Obviously a lot of the time if you're going to the deliberate trouble of creating a digital image, you'd probably prefer it didn't look hand drawn... but I can imagine seeing it in repo readmes; that sort of thing. Actually that's quite appealing - because you could source control the ASCII too.

</comment></comment><comment><USER24> this page has to be bookmarked. well done

</comment><comment><USER25> [http://www.asciidraw.com/#Draw](http://www.asciidraw.com/#Draw)

^This is what I use to generate the boxes and other useful shapes & then put that into shakydraw.

<comment><USER26> How are you copy/pasting?

Edit: never mind. Got it. Brilliant.</comment></comment>


Unpythonic Python - <AUTHOR> http://skien.cc/blog/2014/04/09/unpythonic-python/ <comment><USER2> When you write too much Haskell, your Python code starts to look like this:

        print('\n'.join(
            'FizzBuzz' if x%5==0 and x%3==0
            else 'Fizz' if x%3==0
            else 'Buzz' if x%5==0
            else str(x)
            for x in range(1, 101)))

I would really like to have a "let" expression in Python to avoid having to write a new function with a def statement when you could get away with a simple lambda or generator expression.

<comment><USER3> And when you write C carefully, the C code looks like this (thanks seanjensengrey and rhth54656 for ideas):

        int i; static char* a[] = { "%d\n", "Fizz\n", "Buzz\n", "FizzBuzz\n" };
        for ( i = 1; i < 101; i++ )
            printf( a[ (i%5==0)*2 + (i%3==0) ], i );

The loosely similar Python:

       for i in range( 1, 101 ):
            print( [ i,'Fizz','Buzz','FizzBuzz' ][ (i%5==0)*2 + (i%3==0) ] )

<comment><USER3> And my Visual C 6 compiles the above C to this x86 asm with a single conditional jump, just for the loop:

        mov	edi, DWORD PTR __imp__printf
        mov	esi, 1
       L1:
        mov	eax, esi
        cdq
        mov	ecx, 5
        idiv	ecx
        mov	eax, esi
        mov	ebx, 3
        push	esi
        mov	ecx, edx
        neg	ecx
        sbb	ecx, ecx
        cdq
        idiv	ebx
        inc	ecx
        neg	edx
        sbb	edx, edx
        inc	edx
        lea	edx, DWORD PTR [edx+ecx*2]
        mov	eax, DWORD PTR arr[edx*4]
        push	eax
        call	edi
        add	esp, 8
        inc	esi
        cmp	esi, 101
        jl	SHORT L1

The magic is in the neg sbb combination: The neg changes reg to two's complement but also sets or clears the CF if the argument was != 0 then sbb reg,reg effectively moves CF to the reg avoiding conditional jump for != 0.

</comment></comment></comment><comment><USER4> A highly Pythonic, Easier to Ask Forgiveness than Permission[1] version:

        FIZZ=3
        BUZZ=5
        cache = {}

        for i in range(FIZZ-1, FIZZ*BUZZ, FIZZ):
            cache[i] = 'Fizz'

        for i in range(BUZZ-1, FIZZ*BUZZ, BUZZ):
            try:
                cache[i] += 'Buzz'
            except KeyError:
                cache[i] = 'Buzz'

        for i in range(100):
            try:
                print cache[i%(FIZZ*BUZZ)]
            except KeyError:
                print i+1

[1] [https://docs.python.org/2/glossary.html#term- eafp](https://docs.python.org/2/glossary.html#term-eafp)

A generator version:

        from itertools import izip, islice

        def fizzes():
            i=0
            while True:
                yield '' if i%3 else 'Fizz'
                i += 1

        def buzzes():
            i=0
            while True:
                yield '' if i%5 else 'Buzz'
                i += 1

        def numbers():
            i=0
            while True:
                yield str(i+1) if i%3 and i%5 else ''
                i += 1

        print "\n".join("".join(parts) for parts in islice(izip(fizzes(), buzzes(), numbers()), 100))

<comment><USER5> Or better yet, don't even bother asking for forgiveness or permission:

        from collections import defaultdict
        FIZZ=3
        BUZZ=5
        cache = defaultdict(str)

        for i in xrange(FIZZ-1, FIZZ*BUZZ, FIZZ):
            cache[i] = 'Fizz'

        for i in xrange(BUZZ-1, FIZZ*BUZZ, BUZZ):
            cache[i] += 'Buzz'

        for i in xrange(100):
            print cache.get(i%(FIZZ*BUZZ), i+1)

But I'm rather partial to the generator versions you and others posted.

</comment></comment><comment><USER6> One of the solutions in the comments I found quite pythonic and concise. Somehow people have it in their heads that "Pythonic" means long-winded. And yes, you have to read the code and think for a second to understand it, but that's no crime.

      [(not x % 3) * 'Fizz' + (not x % 5) * 'Buzz' or x for x in range(1, 101)]

<comment><USER7> Things taking longer to read and understand is perhaps the central crime of unmaintainable code, no matter how concise otherwise.

<comment><USER8> I think this code is easier to read than the more verbose 12-line version given in the article. It takes longer to read per line, but less time total.

<comment><USER9> It's not just more complexity per line, it's also a higher level of complexity, using language-specific features that people who aren't fluent in python wouldn't be familiar with (multiplying a string by a boolean)

<comment><USER10> By that logic, no one should write anything in idiomatic French because anyone who isn't fluent in French wouldn't be able to read it.

<comment><USER11> I was curious about that. Is multiplying a string by a boolean idiomatic Python? I don't write nearly enough Python to know, but it strikes me that this might be more like writing French using lots of obscure words.

<comment><USER6> This starts to get into "what is idiomatic python?" which changes as the language evolves. For example, before Python had an official ternary form, this was a common idiom:

        account.status = ["paid", "unpaid"][amount_due > 0]

This does the same thing as the FizzBuzz example, coercing a bool to int. Here the int is used as an index into the list of the two strings.

Personally, I found this handy and liked it a lot. Others didn't and now there is this, which isn't bad:

       account.status = "unpaid" if amount_due > 0 else "paid"

Maybe it's less like using obscure French and more like speaking in a slightly different dialect, or in a different region with different cultural references.

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> The actual Java implementation: [https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...](https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition)

A non-programmer's solution to "Fizz Buzz" [https://news.ycombinator.com/item?id=4853509](https://news.ycombinator.com/item?id=4853509)

FizzBuzz Still Works [http://www.globalnerdy.com/2012/11/15/fizzbuzz-still- works/](http://www.globalnerdy.com/2012/11/15/fizzbuzz-still-works/)

FizzBuzz with CSS [http://dabblet.com/gist/2628265](http://dabblet.com/gist/2628265)

</comment><comment><USER13> [https://gist.github.com/seanjensengrey/d053e7fa709e0699e291](https://gist.github.com/seanjensengrey/d053e7fa709e0699e291)

If free version.

        t = {}
        t[0,0] = lambda x: x
        t[1,0] = lambda x: "Fizz"
        t[0,1] = lambda x: "Buzz"
        t[1,1] = lambda x: "FizzBuzz"

        def tests(x):
            return (x % 3 == 0, x % 5 == 0)

        for x in range(1,101):
            print t[tests(x)](x)

<comment><USER3> Good idea. Enhancing:

If, lambda, logical operators except == and string concatenation free version (Python 3)

        for x in range( 1, 101 ):
            print( [ x,'Buzz','Fizz','FizzBuzz' ][ (x%3==0)*2 + (x%5==0) ] )

<comment><USER3> And also C based on the same idea as my Python (but this has to ? for 0s):

        int i;
        char* a[] = { 0, "Buzz", "Fizz", "FizzBuzz" };
        char* f[] = { "%s\n", "%d\n" };
        for ( i = 1; i < 101; i++ ) {
            char* s = a[ (i%3==0)*2 + (i%5==0) ];
            printf( f[!s], s ? s : i );
        }

<comment><USER14> Don't ruin that version with an if statement.

Use this and avoid it( and the second array as well ):

      char * a[] = { "%d\n" , "Fizz\n" , "Buzz\n" , "FizzBuzz\n" } ;

<comment><USER3> Brilliant, thanks! The C version is now:

        int i; char* a[] = { "%d\n", "Fizz\n", "Buzz\n", "FizzBuzz\n" };
        for ( i = 1; i < 101; i++ )
            printf( a[ (i%5==0)*2 + (i%3==0) ], i );

</comment></comment></comment></comment></comment><comment><USER15> Reminds me of "Evolution of a Python Programmer" [https://gist.github.com/fmeyer/289467](https://gist.github.com/fmeyer/289467) ... seems like I've perhaps seen other versions of this?

<comment><USER12> The Evolution of a Haskell Programmer

[http://www.willamette.edu/~fruehr/haskell/evolution.html](http://www.willamette.edu/~fruehr/haskell/evolution.html)

</comment></comment><comment><USER16> This was what one of our Java coworkers wrote a while back: [https://gist.github.com/1337/8155054](https://gist.github.com/1337/8155054)

<comment><USER17> I don't think you need to even explicity say he's used to Java.

Wow... I've never felt the need to the use the factory technique.

<comment><USER18> I use factories a lot when using Django... But, of course, in Python they are functions that return a class, not classes.

Interfaces instead are completely unpythonic. Or, maybe I should call them antipythonic?

</comment></comment></comment><comment><USER19> Playing code golf with Python, this is the shortest I could get:

[https://gist.github.com/tghw/3702360](https://gist.github.com/tghw/3702360)

Definitely a little unpythonic.

<comment><USER20> Something annoying about python is that the word "lambda" is so long for what are supposed to be one-off functions.

You have

      f=lambda x,y=1,a='Fizz',b='Buzz': ...

But it's actually shorter to say

      def f(x,y=1,a='Fizz',b='Buzz'): ...

I much prefer Haskell's

      \x -> x

Style lambdas.

<comment><USER21> I generally don't particularly like giving punctuation meaning that, well, isn't punctuating. The bottleneck when writing code is almost never keypresses.

I think CoffeeScript gets it probably the most right of languages I've worked with, in that the choice of punctuation makes intuitive sense... "Hey! It's an Arrow. It goes from here to here".

FWIW, I don't like the word "lambda" either... Naming things with one letter are generally a bad idea that we'd do better to divest ourselves of, but there is a bit of legacy to deal with. Either way, they make a field (and statistics is a major offender here, with p-values and t-tests and whatnot), terribly inaccessible.

<comment><USER20> The reasoning behind using '\' for lambda in Haskell was because it sort of looks like a lambda character ( λ vs \ ) if you squint hard enough.

<comment><USER22> That's just horrible. I don't know what more to say about it than that. How did anyone think this would be a good idea on balance?

<comment><USER20> Mmm I suppose it's really just preference. I love that syntax. But I guess there's no arguing about taste.

<comment><USER22> Well, it's typing-friendly but not (re)learning-friendly. I guess it depends how you weigh those concerns.

<comment><USER18> It's also very reading friendly.

I normally forgive languages being hard to learn if the bring enough utility.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER23> Nobody ever seems to go for the general solution:

words = ( (3, 'Fizz'), (5, 'Buzz') )

def fizzbuzz(num): for value, word in words: if i % value == 0: yield word

for i in range(1, 101): print ''.join(fizzbuzz(i)) or i

<comment><USER24> It works even though it should be:

        words = ((3, 'Fizz'), (5, 'Buzz'))

        def fizzbuzz(num):
            for value, word in words:
                if num % value == 0:
                    yield word

        for i in range(1, 101):
            print ''.join(fizzbuzz(i)) or i

<comment><USER25> I think a list comprehension reads better than a generator (and works the same) in this case:

      def fizzbuzz(num):
          return (word for value, word in words if num % value == 0)

And even dropping the fizzbuzz function altogether reads quite nicely IMHO, though it starts to look a bit golfed:

      words = ((3, 'Fizz'), (5, 'Buzz'))

      for i in range(1, 101):
          print ''.join(s for n, s in words if i % n == 0) or i

</comment></comment></comment><comment><USER22> Java doesn't have to be written like that you know. Idiomatic code is overrated in my opinion. Make it readable and correct, fuck the rest.

</comment><comment><USER26> A reminder that Python generator functions let you use multiple yields.

        from __future__ import print_function

        def fizzbuzzify(integers):
            for i in integers:
                if i % 15 == 0:
                    yield 'Fizbuzz'
                elif i % 3 == 0:
                    yield 'Fizz'
                elif i % 5 == 0:
                    yield 'Buzz'
                else:
                    yield str(i)

        print(', '.join(fizzbuzzify(range(1, 101))))

        for i in fizzbuzzify(range(1, 101)):
            print(i)

</comment><comment><USER27> My short yet readable Python version:

        for i in range(1,101):
            if not i % 15: print 'FizzBuzz'
            elif not i % 5: print 'Buzz'
            elif not i % 3: print 'Fizz'
            else: print i

The same in Bash:

        for i in {1..100}
        do
            let "$i % 15" || { echo "FizzBuzz"; continue; }
            let "$i % 5" || { echo "Buzz"; continue; }
            let "$i % 3" || { echo "Fizz"; continue; }
            echo $i
        done

</comment><comment><USER28> Here's one in Hy (a homoiconic frontend to Python... it really is just Python™):

       (require hy.contrib.anaphoric)

       (ap-each (range 1 101)
        (print (cond [(= (% it 15) 0) "Fizzbuzz"]
                     [(= (% it 5) 0) "Buzz"]
                     [(= (% it 3) 0) "Fizz"]
                     [True it])))

Reads pretty good too, doesn't it?

[http://docs.hylang.org/en/latest/](http://docs.hylang.org/en/latest/)

</comment><comment><USER29>
        #include <stdlib.h>
        #include <stdio.h>
        #include <sys/types.h>
        #include <sys/mman.h>
        #include <sys/stat.h>
        #include <fcntl.h>

        static char c[9];

        int p(int i)
        {
            putchar(c[i++]);
            putchar(c[i++]);
            putchar(c[i+(7-i)]);
            putchar(c[i+(8-i)]);
            return 0;
        }

        int f(int i, int x) {
            i -= x;
            if(!i) { return p(x); }
            if(i<0) return i+x;
            return x + (f(i,x)  ?: - x);
        }

        int d(int a, int b)
        {
            return a-b?d(--a,b)+1:0;
        }

        void x(int i)
        {
            if(f(i,3)&f(i,5))printf("%d",i);
            printf("\n");
        }

        int i( int c, int target, void (*fn)(int i) )
        {
            return d(target+1,c)?({ fn(c); i(++c,target,fn); }):0;
        }

        int main( int argc, char **argv )
        {
            int fd=open(argv[0], O_RDONLY);
            char *m=mmap(NULL,20000,PROT_READ,MAP_PRIVATE,fd,0);
            c[3] = (char)(0x20|m[3]);
            c[4] = m[342];
            c[5] = m[343];
            c[6] = m[351];
            c[8] = c[7] = (char)(((0x38|m[1])<<1)&~0x80);
            i(1,atoi(argv[1]),&x);
            return 0;
        }

<comment><USER30> This'd be more fun if it didn't segfault

        printf(n%15 ? n%3 ? n%5 ? "%d\n" : "Buzz\n" : "Fizz\n" : "FizzBuzz\n", n);

<comment><USER29> Probably segfaults with the shitty ELF hackery :(

</comment></comment></comment><comment><USER31> Since we are talking about crazy python fizzbuzz, allow me to share a creating I have had sitting around for a while:

        def fbg(s,r):print("\n".join(map(lambda x:str(x[1])if x[0]==''else x[0],zip(("".join(a for a,b in s if n%b==0)for n in range(1,r+1)),range(1,r+1)))))
        fbg((('Fizz',3),('Buzz',5)),100)

Cause, you know, fizzbuzz one-liners need to work for the generic case.

</comment><comment><USER32> This problem is like Project Euler #1. You don't strictly need to divide. I prefer to skip along the array and put in the new values.

      n,f,b= 100,3,5
      a = [str(i) for i in range(1,n+1)]
      for i in range(n/f):
          a[(i+1)*(f)-1] = 'Fizz'
      for i in range(n/b):
          a[(i+1)*(b)-1] = 'Buzz'
      for i in range(n/(f*b)):
          a[(i+1)*(f*b)-1] = 'FizzBuzz'

</comment><comment><USER33> [https://web.archive.org/web/20130511210903/http://dave.fayr....](https://web.archive.org/web/20130511210903/http://dave.fayr.am/posts/2012-10-4-finding- fizzbuzz.html)

write the haskell solution in python, I already ported it to Rust:

[https://bitbucket.org/iopq/fizzbuzz-in- rust](https://bitbucket.org/iopq/fizzbuzz-in-rust)

</comment><comment><USER34> Doesn't even touch on my personal pet peeve, people who don't use list and dict literals. I assume they're former Java programmers who got ahold of enough python knowledge to be dangerous. e.g:

      x = dict()
      x['a'] = 'string'
      x['b'] = list()
      x['b'].append('foo')
      x['b'].append('bar')

<comment><USER35> You can say

        x = dict(a = 'string', b = list(('foo', 'bar')))

</comment></comment><comment><USER36> The value in FizzBuzz is the iteration process.

What's the first step? Well, you probably make a stream of numbers. And then a set of if blocks to test and return strings. Why not keep going?

What happens if you want more fizz buzz strings? Does the giant if-or statement seem a little unwieldy? Okay, pull the rules out and see if that's better. Is it easier to test now that it's a function and not a little stateful object? Do you want your fizzbuzz function to concatenate the strings or use explicit replacement? Can you make a switch for that? And so on.

That stuff only scratches the surface. I'm sure there's some brain burning fizz-buzz interviewers out there. It really puts you on the spot to deal with a stateful program.

One thing that seems really weird to me is this: given the first set of rules, why does almost everyone write the program that is the least extensible? Is it the way the question is phrased or scar tissue from imperative programming?

<comment><USER37> YAGNI.

</comment></comment><comment><USER38> Since we're all sharing our fizzbuzzes, here's mine (from my blog [http://seriously.dontusethiscode.com/2013/04/29/bad- intervie...](http://seriously.dontusethiscode.com/2013/04/29/bad-interview- answers.html))

Note that this solution is generalised for any divisors and generates an infinite sequence.

        from itertools import chain, combinations, count
        from operator import mul, add
        fizzbuzz = lambda terms: (lambda terms: ({x%d:w for d,w in terms}.get(0,str(x)) for x in count(1)))(tuple((lambda (d,w):(reduce(mul,d),reduce(add,w)))(zip(*x)) for x in chain.from_iterable(combinations(sorted(terms.iteritems()),s) for s in xrange(1,len(terms)+1))))

        terms = {3:'fizz', 5:'buzz', 7:'baz'}

        from itertools import islice
        print list(islice(fizzbuzz(terms),None,25))

<comment><USER33> Much better, you didn't have to do manage 15, 35, 21, 105, etc.

</comment></comment><comment><USER39> I'm not a Java developer, but it seems that the "Javacious Python" example isn't very Javacious.

it looks like the author was trying really-really-really hard to prove a point, thus turned a single function into an OOP architecture.

I know that Java is known for bloat, but that's a bit too much of an exageration

</comment><comment><USER40> Neat! I'd be interested in seeing pythonic solutions written in other languages (to the extent that those languages may allow 'Pythonic' style), too. I find it fascinating to see how certain languages will, for one reason or another, trend towards certain design patterns and styles.

<comment><USER41> Actually, most Python I write (influence from reading experienced programmers) tends to the last one, although it's semi-jokingly:

        def fizzbuzz(n):
            return 'FizzBuzz' if n % 3 == 0 and n % 5 == 0 else None

        def fizz(n):
            return 'Fizz' if n % 3 == 0 else None

        def buzz(n):
            return 'Buzz' if n % 5 == 0 else None

        def fizz_andor_maybenot_buzz(n):
            print fizzbuzz(n) or fizz(n) or buzz(n) or str(n)

        map(fizz_andor_maybenot_buzz, xrange(1, 101))

It's pleasing to use HFOs in Python, as long as you don't abuse lambdas. Also, some functional types like `defaultdict` can be used to describe code/business logic with datastructures rather than a bunch of if's, keeping things tidy.

<comment><USER20> I use defaultdict all the time. Very often when describing graphs.

      g = defaultdict(dict)

Allows you to do

      g[node1][node2] = edge_weight

without checking if node1 exists, and if not, saying g[node1] = {}

Also a neat trick (of dubious use) is:

      def auto_tree(): return defaultdict(auto_tree)

Gives you infinitely nested defaultdicts.

<comment><USER41> defaultdict is really multipurpose, quick trees is only one of the neat tricks. I like the following definition :)

        >>> Tree = lambda: defaultdict(Tree)

</comment></comment></comment></comment><comment><USER42> Two more variants. The first is precomputed without code-based initialization:

      fizzbuzz = ['FizzBuzz', None, None, 'Fizz', None, 'Buzz', 'Fizz', None,
                  None, 'Fizz', 'Buzz', None, 'Fizz', None, None]
      for x in xrange(1, 101):
        print fizzbuzz[x % 15] or x

The second is unique in that there are no conditionals at all. (Not efficient, especially for large numbers)

      fizzbuzz = ['FizzBuzz', 1, 1, 'Fizz    ', 1, 'Buzz    ', 'Fizz    ',
                  1, 1, 'Fizz    ', 'Buzz    ', 1, 'Fizz    ', 1, 1]
      for x in xrange(1, 101):
        print str(fizzbuzz[x % 15] * x)[:8]

</comment><comment><USER43> My for-real-not-humor implementation:

        def fizzbuzz(i, n):
            while i <= n:
                yield i%15 and (i%5 and (i%3 and i or 'fizz') or 'buzz') or 'fizzbuzz'
                i += 1

        for x in fizzbuzz(1, 100):
            print x

<comment><USER44> Tight, but I'd still use multiple yields, all the conditions in the one liner may be difficult to read.

</comment></comment><comment><USER45> There's something minor that's always bothered me about the usual description of FizzBuzz:

> If the number is divisible by 3, print Fizz instead of the number. If it's > divisible by 5, print Buzz. If it's divisible by both 3 and 5, print > FizzBuzz.

In a strict interpretation, the first two sentences could be seen as incorrect. If a number is divisible by 3, you cannot just print 'Fizz' and move on. You also have to check if it's divisible by 5.

<comment><USER46> This is why the description is good.

Sure, it tests whether you can write a set of statements a computer can understand.

But it also tests whether you can understand the intent behind a set of statements a human would make, without going on a diatribe about how the definition is not good enough.

After all, if English was a formal strict language where only one right way existed to express something, we wouldn't need programmers, would we?

<comment><USER47> > After all, if English was a formal strict language where only one right way > existed to express something, we wouldn't need programmers, would we?

If you just solved the fact that one meaning can have many expressions, we'd still need programmers (and, more relevantly, system analysts) just as much.

The relevant problem is that English isn't a formal strict language _where a particular expression can only have one meaning_ (and, more importantly, that, people don't use it that way even when it superficially seems to be.)

That is, the problem that requires specialized work to develop unambiguous requirements for the implementation of (among other things) information systems isn't that English maps (many expressions) -> (one meaning), but that it maps (one expression) -> (many meanings).

</comment></comment></comment><comment><USER48> We used to have ADA-TRAN code at work. Fortran code migrated to Ada. It was awful, but it worked so we left it.

It been commented the Perl I write, it written like C programmer.

</comment><comment><USER49> JS version for funsies. I didn't like the idea of specifically checking for simultaneous mod3 and mod5, so I made this.

      for (i=1; i<101; i++) {
      	var result = "";
      	if(i%3 == 0)
      		result += "Fizz";
      	if(i%5 == 0)
      		result += "Buzz";
      	if(result.length == 0)
      		result = i;
      	document.write(result+"<br>");
      }

<comment><USER50> Ugly version: for(i=1;i<101;i++)console.log((i%3?"":"fizz")+(i%5?"":"buzz")||i)

</comment></comment><comment><USER51> C#

Enumerable.Range(1, 100).ToList().ForEach(a =>{if (a%5 == 0 && a%3 == 0){Console.WriteLine("FizzBuzz");}else if (a%3 == 0){Console.WriteLine("Fizz");}else if (a%5 == 0){Console.WriteLine("Buzz");}else{Console.WriteLine(a);}});

</comment><comment><USER52> The superfluous semicolons on line endings in the C example gave me a chuckle.

<comment><USER53> He forgot one on the "i += 1" (which would be i++ in a for loop but Python doesn't have that operator).

But that whole line is weird, because I think the C example should use a "for" loop, not increment the main counter at the top of a while loop, even if it has to use "for i in range(1, 101)" like in pythonic python. A C programmer like me (who loves python too) would immediately think "for (i = 1; i <= 100; i++)" for that (although counting from 1 is strange, it's what the problem asks for).

<comment><USER54> This is what I originally had but I felt that the Python `while` was actually a bit more true to the way a C for loop is constructed (and `range` seems a very not C thing to do.) It's not perfect!

</comment></comment></comment><comment><USER55>
        [print(("Fizz" * (n % 3 == 0) + "Buzz" * (n % 5 == 0) + str(n) * (0<(n % 3 * n % 5)))) for n in list(range(1,101))]

side effects don't matter right?

</comment><comment><USER56> i loved this; studying multiple implementations of the same recipe, even if most are not intended to be "exemplary" but rather cautionary, is a great way to learn.

This reminds me of a similar effort called "evolution of a python programmer" and published in this gist:

[https://gist.github.com/ghoseb/25049](https://gist.github.com/ghoseb/25049)

something like 30 different implementations of factorial; my favorites are the 'expert programmer' and the "web designer"

</comment><comment><USER57> for i in range(1, 101): print (i if i%3 else "Fizz") if i%5 else "Buzz" if i%15 else "FizzBuzz"

[edit: proper place [https://news.ycombinator.com/item?id=7564988](https://news.ycombinator.com/item?id=7564988)]

</comment><comment><USER58> +1 for the pythonic version -1 for the weird rest

this assures me that python is the right language for me :)

</comment><comment><USER59> Programming language accents.

</comment><comment><USER60> Not enough factories in the java-ic python...

</comment><comment><USER46> There's no honest attempt to explain the philosophy behind every language with real-world examples in Python. It's just childish jokes.

It's the equivalent of saying "Ze fish in le river" is "Frenchish English". Ha ha, stupid French people, right?

It's easy to make fun of programming languages like this, but what does that teach us? Aside from to mock what is different than what we use right now?

<comment><USER54> While I wrote this with tongue in cheek, I also aimed to illuminate the power of Python's flexibility along with the inherent danger therein. I do admit the Javacious example was over the top though ;)</comment></comment>


Ask HN: What does is the function of systemd? - <AUTHOR>

Seems topical.<p>I don't know half the terminology in the wikipedia article, and, in light of recent events, it seems worthwhile to know. <comment><USER2> Systemd is an implementation of an init system, with some extras too.

Init systems are traditionally the first thing that is executed when the kernel boots and passes control to userspace. They're responsible for starting all the services that are configured/enabled.

In addition to this "basic" functionality systemd has extras which allow it to handle dependencies, start services on-demand, and handle logging, etc.

Beyond that you'd be best reading the documentation on the systemd site - I've never used it, but the basics don't seem too hard to understand.</comment>


Artificial Intelligence Committee – Hearing in the UK Parliament on Impact of AI - <AUTHOR> http://parliamentlive.tv/Event/Index/073717ca-484b-4015-bd10-f847cea3f249 <comment><USER2> Thanks for posting this, saved me a job. Maybe I'll post it again, or after the next one to see if it gets any more reaction.

I'm currently at 16:04:06 and the lords have just started to really interrogate about the progress towards General AI. So far I'm liking their tone.</comment>


Show HN: Statistical tool for analyzing a Git repository - <AUTHOR> https://github.com/arzzen/git-quick-stats/ <comment><USER2> I made a tool myself [0] with slightly different tools. It answers two questions: Who are the relevant coders and what parts of the code are the hotspots?

Here is an example run on sqlite:

        Top Committers (of 28 authors):
        D. Richard Hipp      13359 commits during 19 years until 2019-09-17
        Dan Kennedy          5813 commits during 17 years until 2019-09-16
         together these authors have 80+% of the commits (19172/20987)

        Files with most commits:
        1143 commits: src/sqlite.h.in      during 19 years until 2019-09-16
        1331 commits: src/where.c          during 19 years until 2019-09-03
        1360 commits: src/btree.c          during 18 years until 2019-08-24
        1650 commits: src/vdbe.c           during 19 years until 2019-09-16
        1893 commits: src/sqliteInt.h      during 19 years until 2019-09-14

        Files with most authors:
        11 authors: src/main.c
        11 authors: src/sqliteInt.h
        12 authors: configure.ac
        12 authors: src/shell.c
        15 authors: Makefile.in

        By file extension:
        .test: 1333 files
           .c: 379 files
         together these make up 80+% of the files (1712/2138)

[0] [https://github.com/qznc/dot/blob/master/bin/git- overview](https://github.com/qznc/dot/blob/master/bin/git-overview)

</comment><comment><USER3> Pull Panda [0] is another tool we've been using that is offered as a SaaS and is now free since it was acquired by Github this year. It tells you average PR review time, average PR diff size, who is most requested for review, review- comment ratio, etc. I can't believe it's taken Github so long to make progress on dashboards like this for engineering managers, but looking forward to the time Pull Panda is fully integrated.

[0] [https://pullreminders.com](https://pullreminders.com)

</comment><comment><USER4> Was hoping to find an opensource alternative to codescene [0]. A tool using Predictive Analytics to find hidden risks and social patterns in your code, all from your git repo (and some manual mapping of teams). Unfortunately not the case.

Codescene was built on top of an opensource tool by the way. But the UI is nice to have.

[0] [https://codescene.io/](https://codescene.io/)

<comment><USER5> CodeScene isn't built on the open source tool. CodeScene's engine is implemented from scratch in order to deal with large-scale codebases. The basic metrics are the same, but CodeScene adds plenty of information and pattern detection on top of them. If you're interested, the story of CodeScene is written down here: [https://empear.com/blog/happy- birthday-3-years/](https://empear.com/blog/happy-birthday-3-years/)

</comment></comment><comment><USER6> I love this project because ir brings up a big issue. There is a treasure trove of information buried in git that isn't easily accessible or useable, even for developers it is hard to make use of this data easily.... That's why I and friend came up with Ship Scoop[0] which is in beta testing now. For anyone interested in testing it out and a forever free account hit me up. The idea is to leverage information that is already being created to do more for you. [0] [https://www.shipscoop.com/](https://www.shipscoop.com/)

<comment><USER7> Is this for teams that don't use a project management tool like JIRA?

</comment></comment><comment><USER8> I love that it's bash and not Go or Rust. Great stuff!

I must admit, I was playing around building something similar while learning Rust, just for the fun of it. Now I probably won't finish that:)

</comment><comment><USER9> I wrote [https://github.com/hbt/git-forks- analysis](https://github.com/hbt/git-forks-analysis) to analyze a git repo and its forks.

I modified existing tools to scan all branches.

The most interesting tool is [https://github.com/src-d/gitbase](https://github.com/src-d/gitbase) which turns your git repo into a database you can query. This is more effective than parsing git log output.

I keep a list of similar tools here [https://github.com/hbt/git-forks- analysis#other-git-data-min...](https://github.com/hbt/git-forks- analysis#other-git-data-mining-tools-worth-a-mention)

Happy to add yours

</comment><comment><USER10> This and [https://pydriller.readthedocs.io](https://pydriller.readthedocs.io) have been very useful in extracting useful project metrics embedded in Git.</comment>


Congress Shouldn't Turn the Copyright Office into a Copyright Court - <AUTHOR> https://www.eff.org/deeplinks/2017/11/creating-copyright-court-copyright-office-wrong-move <comment><USER2> The only bit that _really_ stood out to me here is the issue of timely registration, but it's hard for me to see how exactly this will play out.

</comment><comment><USER3> My major issue with this discussion from the EFF is it is totally silent on who benefits vs who does not. As a small business content creator, I do want a faster and stronger copyright system that will STOP people from stealing content, especially images. With some of the notions in the law such as providing evidence that the infringer purposely removed water marks, etc.. is EXACTLY what we need going forward.

> "Unfortunately, the Copyright Office has a history of putting copyright > holders' interests ahead of other important legal rights and policy > concerns. We fear that any small claims process the Copyright Office > conducts will tend to follow that pattern."

Most of it is based on claims that the copyright court is "awful" at copyright decisions, yet at the same time the article is devoid of making specific citations - and is clearly a FUD piece in my opinion.

<comment><USER4> As a casual observer the entrenched expectation of copyright is wholly incompatible with today's means of information flow and can only result in further erosion of privacy in and around all digital communications.

The entire premise of a limited monopoly was, previously, fairly easy to police, all things considered.

Realistically, expectation or desire for a full copy stop is a fools errand and further attempts at this along with the simultaneous desires for harsher penalties will hurt the many much more than any rights holder could ever be helped.

A digital age copyright solution is being prevented because of unrealistic or outdated expectations that are being wedged into a reality that has, effectively, aged out.

In my opinion the trifecta of threats that are at the root of the impending Internet Dark Ages consists of large media rights holders, ISPs and the sub- constitutional security state.

The only sliver of light that I can spy includes a catalog that is on par with our digital age. If the expectation is that any and all works can maintain their own copyright gates, or, worse, that the government can man it for them, is harmful, childish and doomed. The CASE Act appears to be more fear-based garbage law that will continue to aggravate the already untenable state of copyright and the expectations of protections. .. treating symptoms with poison.</comment></comment>


The Science and Pseudoscience of Global Warming - <AUTHOR> http://www.uwgb.edu/dutchs/PSEUDOSC/GlobWarm.HTM

<comment><USER2> I think the bottom line about global warming is that we are deathly afraid of dynamics we don't understand. Our civilization is predicated on a very narrow set of conditions and we don't have the resources to handle major perturbations of those conditions.

<comment><USER3> It's not a question of how well our civilization can withstand significant changes just what level of disruption we are willing to withstand without doing something.

Taken to the extream to make a point, a 100 foot increase in sea level over 20 years would distroy an a silly amount of weath. However, a single 1 inch increase in sea level over 20 years would be hard to notice. It's not a question of 1 inch as ~0.1% of that increase = 0.1% of the dammage, rather it's a question of how much it costs to deal with the problem vs. starting over in a new area.

PS: Most of the time an inch is meaningless, but a dam that can take 10 feel might not take 10.08 feet. So, it's better to think of it as an increase in the number of local problems vs. a meaningless threat or some large scale doom. Granted, as you scale the increase more areas have larger problems.

</comment></comment><comment><USER4> Damn, that lost 10 minutes of my life. Not that I don't agree with the article, but I was really reading to get to the part which discusses the concequences of global warming, as suggested in the introduction. But there isn't one.

Anyways, it's worth clicking around, he writes some pretty interesting things.

</comment><comment><USER5> Fundamentally there's one problem that plagues global warming research, and that's that we're grasping at a system so huge and complex that we have absolutely no understanding of it. Sure people believe they understand the system, but spend a month in England and watch how weather forecasts pan out.

I don't see how, when some of the biggest computer systems are being used to predict weather systems and we get it wrong, how scientists expect us to believe their computer models that follow less variables and use lots less processing power.

All evidence so far says global warming is real, however I can't help but feel all the computer models they use are complete bunk. It strikes me as fraud, it's a computer program and everyone here knows you can get a computer program to do whatever you want. I see it as highly susceptible of bias, which makes it very hard to ever believe their predictions.

There's a lot of real science used in global warming research, like using ancient sediments and ice cores to extrapolate how much CO2 was in the atmosphere _n_ centuries ago. However, then we get pseudoscience with computer models of systems infinitely more complex than anything we've ever dealt with; it's akin to comparing a stick figure and a full anatomical diagram of a human down to every capillary for modelling the human body. We're at the stick figure when it comes to the global environment and we're trying to predict somethings effect like we have the whole picture.

<comment><USER6> You clearly did not read the article you're critiquing, because he spends screens and screens of text discussing exactly the difference between climate and weather.

In short, climate is predicting that a candle will make the room warmer. Weather is predicting the exact swirls and eddies of the flame.

Further, your objections to computer modeling are incorrect. Of course you can get a computer program to say whatever you want, but you can't make a computer _model_ say whatever you want. Computer models are a subset of computer programs constrained to attempt to model reality according to some set of assumptions. You can make equations say whatever you want too, but that doesn't make Maxwell's laws incorrect.

<comment><USER7> I read the screems and screens of text trying to disconnect climate and weather: that's where I gave up. I had had enough of the cutesy anecodotes and attacking straw men with straw men.

It's a nice anecdotal attempt to disconnect climate and weather. but it falls very flat. Candle flame eddies, swirling winds? What bunkum. Weather is what you get? So what we get in 50 years, as predicted by climate forecasts, won't be weather?

The reason people argue that climate predictions are weak because of the inability of massive amounts of computing power and continually revised models still fail to predict short term temperature and conditions. This is with a lot of known inputs. And yet, we are all supposed to believe the outputs of a 100 year climate prediction, when the amount of assumed/fudged/unknown variables is simply immense? This is the core reason people (including myself) place no credence whatsoever in climate modelling. I'm happy to change my mind when someone can prove they know all or enough of the inputs to make the model highly accurate. What would be the effect of another 10 hurricanes per year? What about a reversal or diversion of the Gulf stream? How about a permanent el nina in the Pacific? None of these are black swans and yet they would all negate current climactic predictions.

</comment></comment></comment><comment><USER8> Freemand Dyson has another objection to climate modelling: it does not take into account the way climate interacts with biomass. Simple calculations show that even small changes in global biomass absorb huge amounts of atmospheric CO2.

[http://www.nytimes.com/2009/03/29/magazine/29Dyson-t.html?_r...](http://www.nytimes.com/2009/03/29/magazine/29Dyson-t.html?_r=1&pagewanted=all)

<comment><USER9> So, planting trees or preventing massive deforestation would be a good idea. :D

</comment></comment><comment><USER10> I'm quite willing to believe that greenhouse gases warm the atmosphere, but I've always wondered how large the effect is compared to the other things that change the climate. Since the earth has been both hotter and colder than it is now, before we even existed, it seems possible that the increase of CO2 from people might not be all that big of a factor. Does anyone have any information along these lines?

<comment><USER11> Why aren't you curing cancer right now?

If we must take everything in order of most important to least important, then doing anything that doesn't affect this most important thing is a colossal waste of time.

If we are affecting the temperature of the planet in a way that will make it uninhabitable to us, it behooves us to do anything and everything we can to make our impact less. Whether or not it is the biggest contribution to the problem. Plus, solving the smaller problem may give us insights to the larger problem.

</comment></comment><comment><USER12> I have a simple question, in the spirit of "What evidence would it take to prove your beliefs wrong?": How many years of dropping temperatures does it take before global warming is no longer an acceptable hypothesis?

<comment><USER6> Well, never. It's always an acceptable hypothesis, because maybe you haven't considered all the evidence yet. What if CO2 causes global warming exactly as scientists predict, but the Sun is going out?

However, if your question is, would several years of falling temperatures make it more likely that global warming due to CO2 doesn't exist, then here is the answer:

It depends. There are several other major factors in play determining the temperature of the planet beyond CO2. For example, if average sunlight received dropped for 10 years in a row, a rise in CO2 might not be sufficient to counteract that. However, if you didn't find anything else in play, it would be strong evidence that CO2 does not cause warming, at least not on the time scale you're looking at.

This would be an very surprising result though, since we _know_ that CO2 is a "greenhouse gas" - it traps heat. If higher concentrations of CO2 in the atmosphere did not cause increases in temperature, it would be weird and shocking.

<comment><USER12> Models that predicted a monotonic rise in temperature due to mankind's influence can not be used to extract mankind's putative signal when it turns out that they were wrong.

It's important not to let global warming hysteria color your view of the science. There's a radical difference between "mankind is the dominant force of global climate change and mankind is causing catastrophic global warming that we must avoid at all costs" and "mankind is adding a small delta below the noise level of natural climate", and the range of things in between. If it does turn out that the sun is getting dimmer and that turns out to have a major effect on climate (and I have seen climate scientists flat-out deny this is true), then it bounds the effect man can be having and moves us closer to the second statement.

Every year that is colder instead of warmer bounds the warming effect we can be having. Frankly it's already pretty small.

<comment><USER6> That's not true. You could have an arbitrary number of years that were colder in a row, with rising CO2 levels, and still have a world where CO2 causes a temperature rise. It would simply require a countervailing force that's stronger.

The noise level is irrelevant; I'm not sure why you would bring it up. If there are naturally forces that fluctuate up and down in a random walk, and CO2 is a much smaller but consistently up force, inevitably we'll wind up with increasing temperatures over time. You could argue there are larger climatic signals ( _not_ noise) that we should be concerned about, but what you actually said is simply wrong.

</comment></comment></comment></comment><comment><USER7> you lost me at correlation == causation</comment>


DuckDuckGo as my primary search engine for the past 7 months - <AUTHOR> http://www.cloudknow.com/2010/04/duckduckgo-as-my-primary-search-engine/

<comment><USER2> I've been using it for a week, I like it.

Health food features: (features that are generally good for you but which you don't notice specifically at each use)

      - Access via https, if you want.
      - Logs deleted quickly
      - Less data about you collected by Google.

Note: For Firefox, if you want to put the https version of DDG in your search box list, use the Add to Firefox link on the DDG page, rather than "Add Duck Duck Go" in Firefox's search box dropdown.

Immediately tasty features:

      - Clean results page.
      - Clean results page URL.
        - (Some Linux distros dirty it up in Firefox.)
      - If not many results, there's a link to the equivalent Google search.
        - This is so polite and helpful it's classy.
      - !Bang notation for alternate search engines.

The !Bang notation is enough by itself to use DDG as your default search box entry. I have alternate search engines in my Firefox search box, but I don't use them much because even "alt-downarrow ..." is just inconvenient enough to dissuade me from using it; then you have to switch it back. "!w" at the front of your query to signal a Wikipedia search is a pleasure.

<https://duckduckgo.com/bang.html>

Well done.

<comment><USER3> _features that are generally good for you_

 _\- Less data about you collected by Google._

How pretentious of you.

Edit:

      1 : characterized by pretension: as
        a : making usually unjustified or excessive claims (as of value or standing)
        b : expressive of affected, unwarranted, or exaggerated importance, worth, or stature

<comment><USER2> I disagree with "pretentious," but you are correct that not everyone sees Google data collection as potential trouble.

I do see it as potential trouble, not because they're Google but because they're in the data collection and correlation business and they're the elephant in the room. Many other people feel the same, although probably not the majority of people. For me and people like me, data minimization features are welcome.

Employers and government are inappropriately nosing into social network data. Insurance companies are denying medical coverage solely on the basis of statements made online, i.e. without benefit of actual medical examination; that's the equivalent of "I heard ...," and it's being used in life/death relevant cases, merely to find a way to deny cost and coverage, _regardless_ of medical issues.

My approach to online data is:

\- Data transferred to anyone, online or off, is potentially misued and should be minimized. If I don't need you to have it, I see no reason to give it to you, and so I'll make it hard for you to get.

\- Online data is easier to misuse, on purpose or by mistake.

\- The more of your data that's online, the harder it is to keep track of.

\- The more of your data that's online, the easier it is to correlate with itself and other data. You're already part of a huge gmail correlation network, even if you don't use gmail. Connecting that to your search makes it much more valuable to google, and unfortunately much more potentially dangerous to you.

\- Data correlation can create new data which can itself be misused.

\- The privacy policy of today is null and void once a company is acquired, goes bankrupt or just decides to change the policy. Be sure to watch that privacy policy page! Every day!

There are many ways to think about your data online. Some of us are cautious about it. For people like that, any easy way to reduce your footprint is welcome. Duck Duck Go, besides being a welcome footprint shrinker, is overall just awesomely well done.

</comment></comment></comment><comment><USER4> The only thing I missed after switching to DDG was the auto-suggest feature, so I added it on myself: <http://nfriedly.com/stuff/duckduckgoogle/>

</comment><comment><USER5> I've been using DDG since the new privacy policy. There are two points I frequently bump into:

1\. DDG has a spellchecker, but not a good one. For example, DDG correctly guesses "hcker news", but unlike Google it fails to correct e.g. "hooker news".

2\. DDG is relatively good on general queries (like unique names), but not on specific ones (like phrases). Recent example: searching for "r6rs vote" on Google gives ratification votes as the first link, DDG can't find that link at all.

So while I'm not too dissatisfied, I'm not too impressed either.

<comment><USER6> On 1, I was planning to backfill with Bing. In fact, I'll move that to the top of the list and do this weekend. Side note: Bing doesn't catch "hooker news" either; and should they?

On 2, I actually have that link but have something in place to only show one per domain. Perhaps I should choose the more specific one be default. Also will change!

I hope in time, it will impress you :). Please keep sending me feedback so I can improve!

<comment><USER6> UPDATE: 1 is done. 2 turned out to be a bug, which is now fixed, i.e. [http://duckduckgo.com/?q=r6rs+vote&v=](http://duckduckgo.com/?q=r6rs+vote&v=). Thx again for pointing it out!

<comment><USER5> What about kelvin hobles?

<comment><USER6> Unfortunately, as you pointed out, Bing doesn't get that either, so the back- fill doesn't help in this case. However, I did note it for future improvement.

</comment></comment></comment></comment></comment><comment><USER7> A few qualms I have after attempting to use it as my default for a while:

\- the layout and font of the results page really bugs me. Century Gothic and Trebuchet are a lot harder to read than Helvetica/Arial, and it just looks goofy for something I need to read quickly and dispassionately about 100 times per day. I really suggest something more utilitarian, e.g., Verdana of HN/reddit would be much better.

\- The infinite scroll seems like a good idea in theory, but in reality the growing length of the page makes it harder for me to sense the rank of the current link I'm looking at or where I am on the page. Both Google and Bing tried this kind of display, and abandoned it after a while... Could you at least number your result links?

\- To add to that, your headings like "In abbreviations and acronyms", "Other Uses" and "Web links" that divide your infinite list are very small, the same color as other text, and easy to miss. The sections that narrow my search look almost identical to the actual web links. This makes me do some disruptive context checking to discern whether I am going to another web page or searching for something else on DuckDuckGo. Note how your and Google's "Did you mean:" statement is _bright red_ , you should apply the same elevated importance to your disambiguation sections.

\- I can't search for an address and immediately see a map of the location.

\- You don't suggest image results for things that people almost certainly want images for, e.g., animals, celebrities, or landmarks. I then have to switch to another search engine for that which is an extra step.

Overall, I like what you're doing, I just feel like you need to make some serious improvements to match with the UX of Google or Bing! I can't knock your results or your privacy policy; both those things have seemed to be pretty good so far.

</comment><comment><USER8> The main things I have noticed after using it for a couple of weeks:

\- Unlike with Bing, I didn't switch back to google after a couple of days

\- The results often include more relevant pages covering the same topic, whereas google seems to try to return the one best page about a topic. If you are researching something rather than looking for something, Duck Duck Go is better.

The second thing is what has so far kept me at DDG.

One feature request: Please allow "!g" to work at the end of the query and not just at the front.

<comment><USER6> Thx for the feedback. Will do on !g at the end.

</comment></comment><comment><USER9> I have been using DDG as my primary search engine at home for several months and I've been happy with it. The !commands are of little utility to me, since my browser supports search keywords and I use them extensively. There's a couple areas I can think of that I wish it would improve:

1\. Its ability to intelligently bubble up semantic information is very impressive but not as broad as google's, I think. For instance, it is _very_ good at providing an info box saying 'So and so is a rock band from the UK', but what Google can do that DDG doesn't is provide several related youtube videos at the top of the search, because they've proven to be particularly relevant.

2\. It doesn't have any way to quickly put the current search terms through image search. It feels very natural in google to click 'images' if I want to learn more about a topic, and I don't have that option in DDG.

3\. Its arithmetic and conversions (I believe it uses Wolfram Alpha) are not nearly as reliable as google's. Google is almost scarily good at figuring out when I'm asking it do some math, or to perform a conversion.

<comment><USER6> On 1, I hope to improve that for verticals like music soon. I'm doing movies right now actually.

On 2, there is !i, but you say keywords don't mean much to you. Would it help to have a link to GImages on the right sidebar? Others have requested that as well.

On 3, math definitely needs a revision. Conversion syntax has improved recently. In any case, if you send me specific examples that don't work, I'd be happy to make them work.

<comment><USER9> 2) Yes, definitely. 3) I'll start keeping track of what does and doesn't work.

</comment></comment></comment><comment><USER10> I've been using DDG as my primary search engine for the past three weeks. The author here doesn't discuss the downsides, and I haven't found very many either.

Occasionally (say, when searching for specific error messages and things) I still find Google to be better, but for most things I prefer DDG, and I'll be sticking with it for the forseeable future.

</comment><comment><USER11> A data point for you:

DuckDuckGo doesn't return anything to me because my browser is sufficiently old that the clever results presentation doesn't work. Bing and Google both work fine, degrading gracefully.

This isn't a complaint, I know my system (on which I do this sort of stuff) is old, but it is what it is, and DuckDuckGo doesn't work on it.

<comment><USER6> What system? It does still require JS, but it should work on IE6.

<comment><USER11> Konqueror 3.0.3 on KDE 3.0.3 on SuSE 8.1

Well, you did ask, and I did warn you it was old ...

<comment><USER12> And why would you want to use those? Ancient hardware? But if so, is there a reason why you should use ancient hardware?

<comment><USER11> Yes, ancient hardware. Some people don't have a choice as to their hardware.

</comment></comment></comment></comment></comment><comment><USER13> When trying out a new search engine, who here searches for their blog name to determine the "quality" of the engine? It highly ranks both of my blogs, whereas cuil did not.

<comment><USER14> Yep, I think bloggers have a good internal barometer of what blog posts / resources should be highlighted by the search engine. Duck Duck Go does a pretty good job.

</comment></comment><comment><USER15> I am thinking of trying DuckDuckGo for serious use, but I have still never seen it mentioned outside of HN.

It may not be fully rational, but think it is a method many of us use: When you hear about something from two completely independent sources, then it is probably worth checking out.

<comment><USER6> It was on TC the other day. Does that count? Or how about this: <http://www.gabrielweinberg.com/blog/cnn.pdf>

</comment></comment><comment><USER16> Nice job, Gabriel. I plan to start using DDG. I also am enjoying your work in progress on gaining traction. Many thanks for undertaking it.

<comment><USER6> Thanks! For those of you who don't know what he's referring to wrt to traction: <http://tractionbook.com/>

</comment></comment><comment><USER17> I used it (on home puter) for a long time, many months. But I found myself too often doing google searches after ddg one's to find what I wanted. I gave up using it.

<comment><USER6> It is a continually improving experience, so if that was a while ago, it may be worth another shot. If not, sorry to hear that--but I'd appreciate knowing what types of searches weren't working for you, or better yet the actual searches. You can click 'Give Feedback' on any page (bottom right corner).

<comment><USER18> Not sure if it is a bug or feature, but searching my domain with and without "www" produced different results. I expected actual website to be the first in both cases.

[http://duckduckgo.com/?q=news.az&v=](http://duckduckgo.com/?q=news.az&v=) [http://duckduckgo.com/?q=www.news.az&v=](http://duckduckgo.com/?q=www.news.az&v=)

</comment></comment></comment><comment><USER19> when i search for HN it displays it at 8th place after some irrelevant punk band and an obscure town in Montenegro.

When i search for my name (as i always do to test search engines) it doesn't show my linkedIn profile with 500+ connections at all. Even Bing learned to find it.

Summary: Not usable (yet).

<comment><USER6> Thanks. HN gets a disambiguation page. Arguably, Hacker News should be higher. In fact, it's on my list to re-visit the ordering by popularity. It does a bit of this now, but of course could be improved.

What's your name? I should actually be promoting LinkedIn pages, so this may be a bug. I'd love to check it out.

<comment><USER3> Not only does it not show my LinkedIn profile, but doesn't show: My Google, Blogger, Tumblr, Stack Overflow, or Facebook profiles.

Google does all those except Twitter and Tumbler (Stack Overflow is on the second page, sadly).

Search: "Kurtis Rainbolt-Greene"

I'm certainly not an important person but this is a very specific search.

Edit: HA! It actually shows one of my LinkedIn "friends" 30 listings down. Awesome.

<comment><USER6> Weird bug. Your LinkedIn should be first now.

</comment></comment></comment></comment><comment><USER20> Sounds good, but one thing I'd like to know is if the author of that article has any affiliations with DDG.

<comment><AUTHOR> none. I wrote it since I really like DuckDuckGo.

<comment><USER20> Thank you. In this day and age, I think we should all be a bit skeptical of glowing reviews.

Thanks for taking the time to post this.

<comment><AUTHOR> no worries :-)

</comment></comment></comment></comment><comment><USER21> This is great, happy to see some valid competition in this space. I'll be giving it a try off and on. So far in my initial tests it's been pretty good.

</comment><comment><USER22> Unfortunately it doesn't work nearly as well as Google for some foreign language queries.

<comment><USER23> That's been my experience as well. Also, searching for information on a very specific phrase (e.g. an error or an API method) doesn't yield best results for me.

That's why I was happy to discover !g , as it allows me to google when I need to, but still use DDG in the searchbox.

</comment></comment><comment><USER24> What happens when DDG gets more popular? Google or Yahoo (or whatever APIs they depend on) could pull the plug, and then what?

Interestingly, DDG (as it is) could never replace its "competitors."

<comment><USER25> If you read about the DDG architecture (posted extensively in DDG threads here, and also on the blog page), you'll see that there is no one plug that could be metaphorically pulled.

</comment></comment><comment><USER26> I tried it and on first day basically what would take 1-2 google queries (simple) turned into 5+ DDG + not found what I needed.

I love the idea, features, privacy, but it really does not work for me. Maybe I need some usage tips??

Edit: I'm goona try out this !bang stuff

<comment><USER6> Thx. I'd appreciate you sending me specific queries that didn't work for you. Feel free to email me any time.

<comment><USER26> Ill spend time trying it out again. Ill submit on feedback and problematic queries that prevent me from doing my job or makibg my life harder. I like the direct involvement from you about this.

</comment></comment></comment><comment><USER27> is there a catch? I feel like i genuninely do not find the things i find in google.

wonder if its just the way I'm used to knowing how to search. is seldom dont find exactly what i'm looking for google. seems like it would be more a waste of time to change my workflow... hmm....

<comment><USER6> There is something to a change in workflow. I always say give it at least a week to get used to the changes. Perhaps you've already done that though. In any case, there is no "catch" so-to-speak, but I'd love to know what you are not finding. Please email me anytime.</comment></comment>


Nobody is going to steal your startup idea - <AUTHOR> https://medium.com/swlh/nobody-is-going-to-steal-your-startup-idea-23b6fc639854 <comment><USER2> Nobody knows what everybody is going to do. Just sayin'.</comment>