Be wary of functions which take several parameters of the same type - <AUTHOR> https://dave.cheney.net/2019/09/24/be-wary-of-functions-which-take-several-parameters-of-the-same-type <comment><USER3> KW's:

      CopyFile(from: 'foo', to: 'bar')

or JS:

      CopyFile({from: 'foo', to: 'bar'})

or as types:

      CopyFile(Source('foo'), Dest('bar'))

or as fluent:

      Copy.from('foo').to('bar')

<comment><USER4> or as Objective C:

        [[NSFileManager defaultManager] copyItemAtPath:src toPath:target error:&error];

Inspired by smalltalk, of course. ObjC's verbosity is legendary, and I'm not its hugest fan, but there's a key innovation here that I _am_ a huge fan of: the language forces _other people_ to name their arguments, in much the same way that python forces _other people_ to indent their code, even if they would otherwise default to making a hot mess of things.

<comment><USER5> That verbosity isn't even a big deal as you write once, but read many times.

One of the first things about Swift that I fell in love with was the difference between things like DrawRect(10, 20, 30, 40) in languages like C#, and DrawRect(at: origin, width: 30, height: 40) in Swift.

<comment><USER6> Named function parameters are nice, but you can accomplish something similar with only two more characters in some languages:

          DrawRect({at: origin, width: 30, height: 40})
      vs. DrawRect(at: origin, width: 30, height: 40)

I can understand why this is considered a nice-to-have. The verbosity didn't really change.

<comment><USER7> Two more characters and one more allocation per each LoC.

<comment><USER8> Most of us are just writing crud apps anyway so one more allocation is extremely affordable

<comment><USER9> Maybe but this highly dynamic programming style is why Macs have always been so much slower than Windows on equivalent hardware.

<comment><USER5> Where did that come from? Apart from games that were obviously optimized for Windows first then ported to macOS, has that claim been measured? Because macOS has always certainly FELT faster than Windows.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> IntelliJ labels the parameter at the call site with its parameter name, if its value isn't a local variable that already has that name. On your display it looks like CopyFile(from: "foo", to: "bar"), with the from and to labels in an unobtrusive font, but in the source file it's just CopyFile("foo", "bar").

<comment><USER11> You don't want it unlabeled in the source code though - a code reviewer will totally miss a swapping of parameters. It's best when fully supported and explicit in the language.

<comment><USER12> Yup! It's nice and all that IntelliJ ghosts the parameter names in there, but that does nothing for external review, static analysis, etc.

</comment></comment></comment><comment><USER13> A language with keyword arguments helps against this. Crystal has a great compromise IMO where you can call the same arguments positionally and as keywords based on the argument name.

<comment><USER14> The problem with keywords is the compiler can know nothing of intent with them - consider:

      CopyFile(from: loaded_file, to: report_file)

Now, somewhere else off in the code someone does something like:

      // loaded_file is now the report - so no worries.
      loaded_file = report_file

And the compiler then happily propagates that. At no time does it throw an error saying something which would be quite informative such as "Cannot assign report_file (type: outputFile) to loaded_file (type: sourceFile).

Which is really what we want to have happen because - at the very least it forces the developer to go inspect the usage sites to figure out if what they're doing makes sense.

<comment><USER15> > At no time does it throw an error saying something which would be quite > informative such as "Cannot assign report_file (type: outputFile) to > loaded_file (type: sourceFile).

Java has InputStream/OutputStream. C++ has istream/ostream. If you use a statically typed language that doesn't have this distinction, blame that specific language's library design. This is orthogonal to keywords.

<comment><USER14> Is it? Until you open the file as a stream, the data to do so is kicking around your code as a string type with compiler checks on usage. You're making my point: a compile time check is much more helpful.

<comment><USER15> From your example it looked to me like the types in question were "file" types. You're right that "file _name_ " types are not checked by these languages.

</comment></comment></comment></comment></comment><comment><USER16> When it's impossible to avoid ambiguity in the parameters, you can just chose a function name that makes the ordering explicit:

        copy_from_to(file from, file to)

<comment><USER17> I like this more than being forced to name parameters since that would be too verbose in many applications. But there is a danger that the label of a type becomes less generic.

Vector3(...)

VectorXYZ(...)

The second variant could be weird depending on application.

Still, I see some people argue that positional arguments should be forbidden in newer languages but I would disagree and my main argument would indeed be laziness.

</comment></comment><comment><USER18> The solution (to me anyway) requires BOTH that parameters must be named, as well as cultivating a culture of creating types aggressively (and, together with that, a language that makes it easy to do this, to avoid the onus of making types leading API developers to make the wrong choice).

Instead of doing:

        downloadFile(String url, String filePath)

which runs into the ordering issue raising in the article, if it was:

        downloadFile(Url from, FilePath to)

you no longer have the issue.

But, having some way to name the parameters, which can take _many_ forms works just as well. It would help a lot if the language can enforce that you must do this:

named params:

        downloadFile(from = "https://something/foo.txt", to = "/some/path")

objC style where the function name is split up:

        downloadFileFrom: "https://something/foo.txt" to: "/some/path";

same as above, but with fluent-style intermediates:

        download().from("https://something/foo.txt").to("/some/path");

pass an object (Javascript):

        downloadFile({from: "https://something/foo.txt", to: "/some/path");

these all work just as well. And nevertheless, this:

        download(server, file)

is cleaner than all of the previous attempts, and allows passing these concepts around helper methods and the like. So, _IF_ it makes sense to change the types of the arguments so that you no longer have the same type for different arguments, it seems preferable to me.

However, in the case of CopyFile, to take that to its logical conclusion, you'd have a separate type to represent a 'from file' and a 'to file', but that seems too much of a stretch: The notion of a file fundamentally doesn't have a 'direction' concept built into it; that makes sense only for a copy or move API. Making separate types to represent the tuple of [direction, filepath] seems like a hacky way to introduce named parameters.

So, have both.

</comment><comment><USER19> There was a post here not long ago, by jerf iirc, called something like 'tiny types in go.' At the time I disagreed with the premise, but I think it would be a cleaner solution here. By aliasing two string types with obvious names, it forces you to convert at calltime. Assuming you name source and dest as types(ie type source string), you end up with a command like copy(source(sourcefile), dest(destfile)). It's cleaner and has less abstraction than what's in the article.

<comment><USER20> There are also techniques like type tags and refinement types in some programming languages, which serve a similar effect. It's really useful for marking data as validated or as earmarked for a given purpose as it flows through layers of a system.

</comment></comment><comment><USER21> a way to avoid this in python that i quite like is to _require_ keyword arguments:

      def foo(*, x, y):
          pass

      # you must do this
      foo(x=5, y=6)

      # you cannot do this
      foo(5,6)

      # and therefore you also may not
      foo(6,5)

This is a little autocratic but the other nice thing is that if you're finding it really painful to use it means you should probably refactor anyway.

<comment><USER22> I prefer to let the IDE do this.

Developing C# in rider if you call `foo(a,b)` then it'll display as `foo(from: a, to: b)` in the IDE.

<comment><USER23> All Jetbrains IDE do this (AFAIK). One can even configure the cases when these are displayed (ie. only show the hints when there is an ambiguity)

</comment></comment></comment><comment><USER24> Many languages have some concept of "keyword arguments".

(Those that don't will need to pass in named tuples, or structs, or similar data structures.)

</comment><comment><USER25> IMHO this concept is better solved by using semantics, such as types, keyword parameters, interfaces, traits, etc:

        copy(source: ReadOnlyFile, destination: WriteOnlyFile)

These all help make the code more semantic, more testable, and more securable.

These can also improve more kinds of programming, such as a function that truly needs multiple parameters of the same type (e.g. iterators that are not commutative) or a function that benefits from security aspects (e.g. read-only data).

</comment><comment><USER26> Here's a variation of the example which I like a bit better:

      type CopyFile string

      func (src CopyFile) To(dest string) error {
           // copy file here
      }

      func main() {
           CopyFile("presentation.md").To("/tmp/backup")
      }

<comment><USER27> The problem is, even though it reads smoothly, the names are no longer accurate. The smoothness comes from reading "CopyFile" as a verb (semantically), but "CopyFile" is actually a noun (syntactically).

        Source("presentation.md").CopyTo("/tmp/backup")

while scoring slightly fewer slickness points, wins overall imo because it remains accurate.

</comment></comment><comment><USER28> If we're going to use types to handle this then I'm a fan of the Go method of Writer and Reader. That way, even if you have a method named copy, you cannot really mix the two up. Writer restricts the operations; same as Reader. Having method names imply direction or argument order is gonna be tricky once you add a couple people to your project.

<comment><USER29> That breaks down when both src and dst implement io.ReadWriter. os.File for example.

I had an adventure upgrading versions of the .NET Core Rabbit library: one of the (boolean) parameters of the Consume function _used to be_ "noAck", but it got changed to "autoAck" (with inverted behavior). Even though the change was well documented, I would have preferred that to be a breaking change at compile time...

</comment></comment><comment><USER30> A nice thing about "everything is an object" languages is that a.isGreaterThan(b) seems less ambigous than isGreaterThan(a,b). There are natural langauges that are Verb-Subject-Object. It seems less common in natural language to have neither argument be an "agent". Is the copula in the natural language doing the work of the dot?

<comment><USER31> That doesn't scale past two arguments.

<comment><USER32> You can use fluent interfaces to get past two args:

        myObject.doThing(a).toAthing(b)

Though that requires a good amount of boilerplate on the part of the library author.

<comment><USER30> Mary.give(apple).to(John)

Mary.give(John, apple)

</comment></comment></comment></comment><comment><USER33> The solution provided by OP is what I try to avoid at all costs. It's the beginning of spaghetti code.

<comment><USER34> I agree, and I am not still sure if he is serious.

</comment></comment><comment><USER35> I used to feel guilty for how much I use Google, developer.mozilla.org and Stack Overflow, but after a series of languages and a herd of APIs, it's a blur to remember which order is correct for which library, and how they deal with inputs that are empty or undefined.

It's safer to look it up, peruse the complaints about how it does weird shit with negative numbers or empty string, and then write my code standing on those shoulders.

I spend enough time stepping through other people's code even when I do this stuff. It's really not that interesting and certainly not fun.

<comment><USER36> Amen to that. And it goes double when you're hopping around different parts of a multidisciplinary project and probably only using a given language or framework once or twice a year for a couple of weeks. These days I find myself looking things up just on principle, even when I'm reeeasonably sure I remember how they work. It just saves time in the long run.

<comment><USER35> I had a project with three implementations of merge (including lodash) and they all worked differently. After I fixed a handful of other people's bugs due to using one and expecting the behavior of another, I felt a lot less guilty.

</comment></comment></comment><comment><USER20> There was an experimental language I can't remember where arguments were only named by their type by default, rather than having identifiers. This implicitly discourages having multiple parameters of the same type. After I fully processed the idea, I came to like it quite a bit.

</comment><comment><USER37> To be honest, I prefer the simple form. It's immediately obvious what it does, and the cognitive load when working with it is slightly lower. That justifies the extra second or so you need to view the function signature and make sure your arguments are in the right order. "Clever" solutions to anticipated problems that haven't happened yet frequently end up being tech debt down the line.

</comment><comment><USER38> While it's not a perfect example or solution, this illustrate a fairly common issue with modern code. He also mentions too many parameters. Other commonly frown upon constructs include unclear names (java "filter" or "compareTo" easily come to mind), boolean parameters (One should use named enums instead). Some add to the list out parameters (passing a to-be-modified list as a parameter), functions returning their modified input parameter, even though they certainly have their usefulness (like being able to handle memory management outside of the callee). I'd personally like to add String parameters to the list, but modern language make such restrictions often too cumbersome.

I the given example, I'd love to see a language with optional named parameters. For the function copy(String fromFileName, String toFileName), instead of calling copy (file!, file2), one would have the possibility of calling copy(from:file1, to:file2)

<comment><USER39> Your last point is something that I really like about the Swift language. All parameters have names that are mandatory when calling the function, so in Swift you would be required to call copyFile(from: file1, to: file2). [0]

0: [https://docs.swift.org/swift- book/LanguageGuide/Functions.ht...](https://docs.swift.org/swift- book/LanguageGuide/Functions.html#ID166)

</comment></comment><comment><USER40> In C++ one could use strong types (template phantom types with anonymous tags) to distinguish between source and destination.

I use this technic to disambiguate all kind of types (source/destination gpu/cpu pointers for instance) and correctly dispatch everything at compile time.

The compiler becomes your best friend then. :)

<comment><USER41> That's a nice idea. Also, while I love C++, I'm really frustrated that there are no native named arguments :(

However, after your comment, I decided to spend a few minutes on the topic, and came up with these links:

[https://www.fluentcpp.com/2016/12/08/strong-types-for- strong...](https://www.fluentcpp.com/2016/12/08/strong-types-for-strong- interfaces/)

[https://www.fluentcpp.com/2018/12/14/named-arguments- cpp/](https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/)

I am now looking forward to refactor some of our code base to make use of this. Awesome and thanks for the nudge!

</comment></comment><comment><USER42> IMO this is totally solved with named parameters. Nobody's gonna mess up CopyFile(from:a, to:b). Nobody.

</comment><comment><USER43> I love Golang but I often get "copy" wrong because it's the opposite of UNIX: copy(dst, src) -- what?!

[https://golang.org/pkg/builtin/#copy](https://golang.org/pkg/builtin/#copy)

<comment><USER44> [https://www.geeksforgeeks.org/memcpy-in- cc/](https://www.geeksforgeeks.org/memcpy-in-cc/)

</comment></comment><comment><USER45> With Polymorphic Identifiers:

       file:bar := file:foo.

Let functions compute return values, use assignment if you want to move data.

References:

[https://dl.acm.org/citation.cfm?id=2508169](https://dl.acm.org/citation.cfm?id=2508169)

[https://www.hpi.uni- potsdam.de/hirschfeld/publications/media...](https://www.hpi.uni- potsdam.de/hirschfeld/publications/media/WeiherHirschfeld_2013_PolymorphicIdentifiersUniformResourceAccessInObjectiveSmalltalk_AcmDL.pdf)

</comment><comment><USER46> Most of these have conventions. For copy, move, etc the convention is from target, to destination. And an IDE will show you the parameter names. If you still get it wrong, there is also no guarantee that you would assign the correct type either. eg. mixing up foo and bar in {from: foo, to: bar} or foo:From, bar:To Also if there is any speculation you should always read the source code of the function you are calling, or read the documentation, and try the function in a REPL to see how it behaves. There is a line where over- verbosity will have the opposite effect eg. making the code harder/slower to comprehend. So keep it clean and simple. If people get it wrong a lot, make the function figure out the parameters so that it doesn't matter what order you pass them in. And have the function throw a friendly human readable error if you get the arguments wrong! JavaScript example:

        function copy(from, to, overwrite, cb) {
            if(typeof overwrite == "function" && cb == undefined) {
                cb = overwrite;
                overwrite = false;
            }
            if(from == undefined) throw new Error('First argument "from" not specified!');
            if(to == undefined) throw new Error('Second argument "to" not specified!');
            if(!exist(from)) throw new Error("from=" + from + " does not exist!");
            if(exist(to) && !overwrite) throw new Error("to=" + to + " already exist!");
            ...
        }

<comment> friend-monoid * Not all users have IDEs with all that much help (vim, emacs users come to mind), and not all platforms have this ability (consider for example writing serverless functions in an online IDE), and sometimes you do code reviews from an online platform or from your phone, and sometimes you just kinda pull up a piece of code in notepad, and I think you should be able to tell that the code is obviously correct in all of those cases.

* In C, the convention is "move(destination, source)". See memcpy, snprintf, strftime, others, but not all functions follow this convention. PHP is known for having lots of functions in standard library with differing conventions.

* It's easier to tell that "move(from=X, to=Y)" is correct than "move(X, Y)" though?

* I agree with the over-verbosity, but your last point that "annotating your arguments makes your code over-verbose and harder/slower to comprehend; instead, put all these guards and magic in the definition of the function" \- isn't that also making your code harder/slower to comprehend, but this time you're putting the mindwork in understanding the function instead?

<comment><USER46> An IDE is sometimes used as band-aid for bad design. I use an IDE for convenience, but try to make my code not depend on it. It's said that the time it takes to type the code is a very small part of software development. Yet programmers are lazy and would write the short-hand if one is available. I think it's best to learn one language, and one code-base well - if you want to be productive. (or maybe become bored) There is a trend in software, that things get dumbed down, and locked down. It shouldn't take 15 years to become productive, but if you aim for one month or less, you would have to sacrifice a lot.

</comment></comment></comment><comment><USER47> I'm not a fan of the CopyFile solution suggested.

Often one parameter is distinguished by whether it could be an array. The Unix cat utility takes multiple sources to a single destination, so analogously:

      bool cat_files_to_file(string dst, vector<string> srcs)

and it'll be obvious in the call site what's going on:

      cat_files_to_file("/tmp/backup", {"presentation.md"});

and your function can also concatenate files.

</comment><comment><USER48> ErrorProne has a nice safeguard against this if you're writing Java code: [https://github.com/google/error- prone/blob/master/docs/bugpa...](https://github.com/google/error- prone/blob/master/docs/bugpattern/ParameterName.md)

It detects if your function signature is

> foo(first, second)

and you call it with

> foo(second, first)

that is, it actually checks for variable names that are mismatched, with comments like

> foo(/* first= * / second, /* second= * / first)

as an escape hatch.

</comment><comment><USER27> There's a lot of hate in the Go community for languages like Haskell, and a lot of pride in Go for "keeping it simple" and "staying out of your way."

Yet if you watch Go conference videos or read Go blogs, you'll see quite a few idioms like this one, which boil down to just wanting to use real types for things, instead of layering semantic meaning onto strings or ints or nils, and keeping that meaning in your head (or in the docs).

</comment><comment><USER49> Does anyone else feel this is... ridiculous? In that "at some point, you do have to start paying attention to the code you're writing" way?

<comment><USER50> I feel the same way sometimes too. One thing to consider though is that when the overall complexity of a project increases these little things do add up.

</comment></comment><comment><USER51> In some cases this can be fixed by introducing a new type, especially if the language makes it nice to support as a literal. This confers additional benefits in terms of type-checking.

For example, changing an ambiguous foo(float x, float y) into foo(distance x, weight y) .

</comment><comment><USER52> My suggestion of a better solution would be better tools. For instance, when viewing or editing the code, a call to CopyFile should appear something like

       CopyFile([from] 'presentation.md', [to] '/home/presenter')

with the "[from]" and "[to]" parts not being actual tokens that are part of the source file, but annotations that appear to assist the developer. They would appear as little badges, non-editable or selectable, with distinctions in their display to make it clear they are UI elements rather than part of the source code.

</comment><comment><USER53> > Can you suggest a better solution?

Yeah. Mind your docs.

Languages and APIs designed like this and get you crippled tools that simply do not allow you to express about half the shit you're gonna need to do. That generates another layer of indirection, abstractions, and workarounds to break through the "we think for you" for when what "they thought for you" wasn't what you was actually thunking.

There's a place for languages that don't allow you to shoot yourself in the foot or other member of your choice, I'm sure. I don't want to go there.

<comment><USER54> The idea is to use the type system to help you check your work. If programmers were anywhere near diligent about minding the docs, static typing would be far less useful than it is. Always assume the programmer hasn't had their coffee and is prone to making mistakes, and design your system to catch them as early as possible.

</comment></comment><comment><USER55> This is really the number one reason I'd like to use F# more. Single case unions and units of measure are really slick, and while you can do the same thing in C#, the legwork is pretty high.

<comment><USER56> In my language-ext library it's pretty trivial:

        class Hours : NewType<Hours, double> {
            public Hours(double x) : base(x) {}
        }

It gives you:

* Equality operators, Equals, and IEquatable

* Ordering operators, CompareTo, and IComparable

* GetHashCode, ToString

* Map, Select, Bind, SelectMany, Fold, ForAll, Exists, Iter

* Explict conversion operator to convert from the NewType to the internal wrapped type

* Serialisation

* Hours.New(x) constructor function (often useful when used with other methods that take first-class functions).

It's even possible with the more complex variants to provide predicates that will run on construction to constrain the values going in.

There's also NumType for integer numeric types like int, long, etc. and FloatType for floating-point numeric types like float, double, etc. They give additional functionality by default.

Also, units of measure [4]:

       Length x = 10*inches;

       Area y = x * x;

       Time t = 10*sec;

[1] NewType - [https://github.com/louthy/language- ext/tree/master/LanguageE...](https://github.com/louthy/language- ext/tree/master/LanguageExt.Core/DataTypes/NewType)

[2] NumType - [https://github.com/louthy/language- ext/tree/master/LanguageE...](https://github.com/louthy/language- ext/tree/master/LanguageExt.Core/DataTypes/NumType)

[3] FloatType - [https://github.com/louthy/language- ext/tree/master/LanguageE...](https://github.com/louthy/language- ext/tree/master/LanguageExt.Core/DataTypes/FloatType)

[4] Units of Measure - [https://github.com/louthy/language- ext/tree/master/LanguageE...](https://github.com/louthy/language- ext/tree/master/LanguageExt.Core/DataTypes/UnitsOfMeasure)

<comment><USER3> Of course F# has units-of-measure built-in

<comment><USER56> Erm, no it doesn't. It has the ability to define units of measure, but the language doesn't have UoM built-in. There are UoM in FSharp.Core [1], so it's the same as including it from a library.

Obviously F#'s first class support for UoM is better than my implementation, but for all intents and purposes the behaviour is the same.

[1] [https://github.com/fsharp/fsharp/blob/master/src/fsharp/FSha...](https://github.com/fsharp/fsharp/blob/master/src/fsharp/FSharp.Core/SI.fs)

<comment><USER57> Most people would consider 'distributed with F#' as being equivalent to 'built in to F#'. Actually it's even cooler that the SI units are in the standard library rather than baked into the language.

</comment></comment></comment></comment></comment><comment><USER58> Using key-value pairs? (Julia) `copy(src=>dest)` The advantage of that notation in this case is that expresses an explicit non-conmutability of the arguments.

</comment><comment><USER59> The Unix/Linux command line is unfortunate like this; the cp/mv/ln commands would be better off with the destination specified specially. For instance gnu cp allows the syntax

       cp -t <dir> <source...>

Which is good because it makes it similar to most other commands.

It would be unfortunate to mandate it though; it would be unfortunate for an `option` to be mandatory.

<comment><USER60> It also allows you to use xargs to pipe a list of files in.

</comment></comment><comment><USER61> > You can't tell without consulting the documentation.

Referring to the documentation is what you should be doing the first time you use a function, right? Most IDEs now have handy tool-tips to display parameter details.

I use named parameters when available, but it's no big deal to pass parameters to a function. This is why we write tests.

</comment><comment><USER62> Destructured object parameters make this easy in TypeScript (and JS):

      async function copyFile({
        source,
        dest,
      }: {source:string, dest:string}): Promise<void> {
        // ...
      }

      await copyFile({source: 'presentation.md', dest: '/tmp/backup'});

<comment><USER57> There's no need to destructure the parameters.

</comment></comment><comment><USER63> Someone should introduce a language feature - maybe a decorator - <USER2> arguments have to be called by name.

      @mustnameparams
      copy(str from, str to)

      copy(from = "blah", to = "hrg")
      > works

      copy("blah", "hrg")
      > throws error

<comment><USER64> you mean something like def pythonDoesThis(self, *, from='':AnyStr, to='':AnyStr)->AnyStr:

</comment></comment><comment><USER65> Positional arguments just shouldn't exist. Why they persist in newer languages like Go is a mystery.

<comment><USER32> It's due to how language and entropy work; basically people naturally tend to abbreviate frequently used terms.

Some languages have banned positional arguments, like Obj C, but these do get a reputation for being verbose. And verbosity, past a point, hinders readability.

My inclination is that for unary and binary functions, positional arguments should be sugar for the keyword arguments, and anything beyond that must be keywords.

An alternative rule could be you're allowed to designate one positional argument.

Keep in mind, also, that I'll bet there's code in keyword-only languages that just uses single letters for all the keywords. Some people just won't or can't write readable code.

<comment><USER65> Unary, yes. Binary, no.

</comment></comment></comment><comment><USER66> This. It extends to command line tools too. I can _never_ remember what the order is for `ln -s`.

<comment><USER67> I remember the order for ln -s because the third argument is optional. If you omit the third argument the command will create a symbolic link in the current directory with the same filename as the original.

<comment><USER68> I remember this usage the exact same way :)

</comment></comment></comment><comment><USER69>
      Window XCreateWindow(Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int class, Visual *visual, unsigned long valuemask, XSetWindowAttributes *attributes);

</comment><comment><USER70> I would be wary of functions that take several parameters regardless if they are of the same type -- at that point you're already going to have to look into the documentation.

</comment><comment><USER71> This is one example of why working in a higher-level language, if you can for a given task, makes life easier.

C#:

PrintOrderDetails(orderNum: 31, productName: "Red Mug", sellerName: "Gift Shop");

<comment><USER72> Your junior colleague would still do PrintOrderDetails(1234, "SomeSeller", "SomeProduct");

And the compiler wouldn't notice.

You could uused a Roslyn analyzer that gives a warning "methods with consecutive args of the same type should use named params" I guess. Or a warning could be made at the declaring site "Don't declare methods with consecutive args of the same type".

</comment></comment><comment><USER73> Or just use keyword arguments in Python. I am debugging someone else's code today and it make it so much easier when you have named keyword arguments - which he doesn't.

:(

</comment><comment><USER74> I constantly tag primitives in scala. It is boilerplatey even with shapeless, but worth it. Tagging classes might be a bit too much though

</comment><comment><USER75> in kotlin, named parameters are a good defense against this.

They help in many cases. Mixing named and default parameters in a method, modifying an API without breaking its usage, etc.

It is slightly more verbose, but I tend to use them a lot. Basically everywhere unless the params are obvious (max(a;b) is a good example)

<comment><USER76> > Basically everywhere unless the params are obvious (max(a;b) is a good > example)

This isn't so much "obvious" as "irrelevant"; the arguments to max are all exactly equivalent -- their order can't affect the result.

<comment><USER76> Expanding on the point a little further, it would be normal from certain mathematical perspectives to see max as a unary function, mapping an unordered (multi)set to the set's maximum element. With one argument, order can't matter because only one order is possible.

</comment></comment></comment><comment><USER77> that's one of the reason why I like languages that allow you to write this:

        thing(dest=a, src=b

</comment><comment><USER78> TLDR: Be wary of noncommutative algebras!

In particular, if you have a noncommutative operator, do not denote it with a symbol that is symmetric along its vertical axis.

<comment><USER79> In math, you have: matrix multiplication, vector cross product, ... So where does this idea originate?

<comment><USER20> In linear algebra, you typically use juxtaposition to represent multiplication, rather than explicitly with a symbol. For some reason, this actually seems to capture noncommutativity better than a symmetric symbol.

Another example would be string concatenation, which people often debate the merits of using a + to represent.

</comment></comment></comment><comment><USER80> Something about architecture astronauts comes to mind...

</comment><comment><USER81> For me Intellisense pretty much solves this problem

</comment><comment><USER82> I don't get why this got upvoted.

<comment><USER83> [https://en.wikipedia.org/wiki/Bikeshedding](https://en.wikipedia.org/wiki/Bikeshedding)

<comment><USER82> Hah! I did not know that term. At least I learned something related to the post and its comment section! :)

</comment></comment></comment><comment><USER84> For a second, based on the domain, I wondered if Dick Cheney had re-invented himself as a developer.</comment>


Atlas – a platform for charts and data - <AUTHOR> https://www.theatlas.com/ <comment><USER2> Our team at Graphiq has been working on a similar tool for publishers and consumers to quickly find visualizations. One differentiator from Atlas is that many of our charts are dynamically generated on the fly based on the search query–for example, "usa vs india gdp", "population of the country with the tallest building", "obama vs clinton approval rating". You can try it out here: [https://www.graphiq.com/search](https://www.graphiq.com/search)

<comment><USER3> Graphiq has a much better search algorithm, or at least you've covered the primary use cases well.

Although, I'm curious, what is Graphiq's business model?

<comment><USER2> We provide visualizations to journalists and publishers for free and then monetize readers on our site through display advertising. Additionally, we have offerings for developers and companies who want to utilize our knowledge graph in different ways.

</comment></comment></comment><comment><USER4> What an odd front page. "Type to search", with no indication of what to search _for_. I typed in 4 searches, got "No results found" for all of them. Strange.

<comment><USER5> I typed "Mexico" and got a series of charts back.

Seems like it's more like tag search.

<comment><USER6> I typed "search".

[https://www.theatlas.com/search/search](https://www.theatlas.com/search/search)

<comment><USER7> I typed "Virtual Reality" and got back "Media depictions of Latinos don't match reality" [https://www.theatlas.com/charts/V1RJtzYA](https://www.theatlas.com/charts/V1RJtzYA)

Can anybody ELI5 what this site's supposed to be doing?

<comment><USER6> Maybe it's searching in a very small search space.

</comment></comment></comment></comment></comment><comment><USER8> This is not a thing like Wolfram Alpha. It appears to be a searchable index of charts/data from Quartz (QZ.com) and partners (like sponsor GE). Note that T&C in registration goes to QZ.com ([http://qz.com/about/terms- conditions/](http://qz.com/about/terms-conditions/)) .

<comment><USER9> Thanks for that, Wolfram Alpha was the first comparison I thought of. Gapminder was the second.

[http://www.gapminder.org/world](http://www.gapminder.org/world)

</comment></comment><comment> d--b Can someone who upvoted comment on what this is supposed to do? I searched `car sales in Europe` and the first chart I got is `new startups valued at 1bn or more`

<comment><USER10> I searched "tsla" and "tsla price" (and again "aapl" and "aapl price"). The first gave me more or less what I was after, the second returned results about cocaine and mdma prices per gram. As others have mentioned, absolutely miserable search, truly a groping about in the dark.

They might as well have clickable paths for you to follow based on categories and such. I would have had a lot more fun exploring their content in this way. Instead I'll probably never use this again.

</comment></comment><comment><USER11> Other things called Atlas:

HashiCorp's Enterprise Suite - [https://www.hashicorp.com/#products](https://www.hashicorp.com/#products)

Stripe's startup tools - [https://stripe.com/atlas](https://stripe.com/atlas)

Netflix's Telemetry Platform - [http://techblog.netflix.com/2014/12/introducing-atlas- netfli...](http://techblog.netflix.com/2014/12/introducing-atlas-netflixs- primary.html)

O'Reilly's learning environment - [http://chimera.labs.oreilly.com/](http://chimera.labs.oreilly.com/)

Boston Dynamics's Robot - [http://www.bostondynamics.com/robot_Atlas.html](http://www.bostondynamics.com/robot_Atlas.html) [https://www.youtube.com/watch?v=rVlhMGQgDkY](https://www.youtube.com/watch?v=rVlhMGQgDkY)

Did I miss any?

<comment> d--b A very large person, long ago, tasked to carry the world or something

<comment><USER12> Tasked to carry the sky actually.

</comment></comment></comment><comment><USER13> The design is nice enough, but the UX is awful, and pretty much for only one reason: search.

It seems to be a site listing charts, stats, data. Scrolling down or using the "Explore" nav item top-left works fine for browsing.

Search seems to be a secondary feature that is a simple keyword search on site content (the kind of site search that's usually subtle and off to one side), as opposed to a deliberately designed and targeted search on specific content facets. For some odd reason some designer has thought this should be front and centre despite being not a very good way to find anything specific. Adding the following CSS rule would massively improve the site:

      .hero .search-container { display: none; }

Otherwise, it seems nicely put together

</comment><comment><USER14> Forgive me, but why has this story received so many upvotes? As others have mentioned, the front page provides no example of what to search for, and once I finally got a few results, they were less than interesting. Maybe I'm just not the target audience? Is there actually a need for this?

</comment><comment><USER15> Fantastic, a searchable collection of graphs that take specialists from the media can misinterpret.

</comment><comment><USER16> What are the terms on these? Is the idea that someone could use these as citation in a presentation or paper?

And not sure given the page what I should be searching for? I only guessed businesses, because Quartz, but the search for Apple offered odd results.

</comment><comment><USER17> No tutorial for first time visitors is kind of a fail. When a search fails, there should be a message stating something like "why don't you try searching for X".

</comment><comment><USER18> I wonder how lucrative the partnership with GE is / will be.

As a user interested in the future of digital economic models, I would love it if this sort arrangement makes the service viable...

The sponsorships is cleanly integrated and both entities' purposes seem to overlap (i.e., the ads are native...i.e., GE is showing charts like the rest of the site, not banner ads).

<comment><USER19> I took this whole thing as a glorified GE analytics ad.

<comment><USER20> Probably related somewhat to the lukewarm general tech industry reception to Predix.

</comment></comment></comment><comment><USER21> While this is nifty idea, the execution is a bit off. More troubling is the shocking misrepresentation of much of the data.

Take the Diamond Cutters graph [1] where the Y-axis includes US, Namibia and "East Asia". Did "diamond cutters per capita per country" not show the the intended conclusion? This trend persists through many of the graphs i've clicked on.

1\. [https://www.theatlas.com/charts/EJJSh2f6e](https://www.theatlas.com/charts/EJJSh2f6e)

</comment><comment><USER22> Is this a library? Or some kind of data service? How does this compare to [http://www.highcharts.com/](http://www.highcharts.com/) ?

<comment><USER23> It's a collection of statistics represented in chart format. It's not javascript charting framework like highcharts or d3. It's more about browsing and sharing statistics.

</comment></comment><comment><USER24> Tried to register but got a cryptic "Unable to register using that email address and username". Tried several combinations with no luck. I think it is in some sort of closed beta.

Being able to quickly generate a good looking chart that intelligently picks ranges, min, max, etc. and share it with a public URL seems nifty. Are there other similar services that have a pain-free way of doing this sans google sheets?

</comment><comment><USER25> Why is this interesting, when the charts all lack clear data sources?

Numbers without context are meaningless.

</comment><comment><USER26> US birth rate gives about 10 completely unrelated charts.

[https://www.theatlas.com/search/us%20birth%20rate](https://www.theatlas.com/search/us%20birth%20rate)

</comment><comment><USER27> This isn't new either, was shared a year ago: [https://news.ycombinator.com/item?id=9763980](https://news.ycombinator.com/item?id=9763980)

</comment><comment><USER28> If you try to register and get this error about invalid username and password, then try disabling your ad blocker (it worked for me that way).

</comment><comment><USER29> I searched for [oranges] and got a mix of fruit juice and prison inmate statistics. What kind of fuzzy matching is going on here?

<comment><USER30> My bet is that it matched the show "Orange is the new Black", seems just like its searching by tags.

</comment></comment><comment><USER31> I'm heartened to see a distinct lack of 'donut' charts, the scourge of the infographic world.

</comment><comment><USER32> Do you have support for logarithmic charts?

Some of those top examples would benefit greatly from a logarithmic Y-axis.

</comment><comment><USER33> Not really a "platform". It's just charts and graphs from QZ.

</comment><comment><USER34> Good idea, but search isn't great

</comment><comment><USER35> sorry if i dont understand here but is this basically gist for charts ?

</comment><comment><USER36> searching for `usa gdp` showed charts for everything other than usa gdp</comment>


Tetris Challenge - <AUTHOR> http://tetrisapp.appspot.com/static/howto.html <comment><AUTHOR> A buddy -- Craig -- of mine ported Tetris to X while at MIT.

Another buddy -- Randy -- wrote Tetrimatic, which intercepted the X events to figure out the board state and was, effectively, a robot that played Tetris.

For a while Tetrimatic was tearing up the high scores board.

If I remember right, Craig kept himself off the board, because in play testing, he'd gotten very, very good. And it didn't seem fair. He compiled a hacked version for himself that played at the highest level, but doubled the speed. It was crazy watching him play.

What I don't remember was if Craig decided to top the Tetrimatic robot on the high scores board.

Now I'm missing college...

</comment><comment><USER2> Years ago you could play Tetris (though I think it was called Shapetris for copyright reasons) for money at WorldWinner.com, whose GUI was in Flash or Shockwave or whatever. I was really, really good at Tetris. Though I'm out of practice now, I probably had at least half of Gladwell's 10k hours of practice under my belt.

So, on World Winner I would get sick scores in the giant multiplayer tournaments there and still have like 1/10th of the score of the leader. I'm nearly certain they were bots. I remember seeing world champion scores back in the day on Ninetendo, and they weren't even double my high scores, so 10x would seem to be humanly impossible. The scoring system was a little different, but not that much.

Worse yet than the blatant botting, they had a ranking system that always forced you to play against people of similar skill to yours, so even in the head to head matches I'd quickly find myself playing against people (or bots) who had at least my skill level. That plus the 20% rake insured that even being in the top 0.1% of Tetris players wouldn't make you profitable, even if there weren't bots, which there almost certainly were.

<comment><USER3> This isn't really a big deal, but I just want to point out your reference to copyright because this has been an increasingly frustrating topic for me; most people don't know the difference between copyright, trademark, and patent, and don't fully understand how these intellectual property rights apply to the game Tetris.

Changing the name has nothing to do with copyright. The protection of a logo or name falls under trademark rights.

Copyright protects "original works of authorship including literary, dramatic, musical, artistic and other intellectual works like computer software" from being reproduced, distributed, and sold(USPTO). But, copyright does not protect game mechanics or rules.

A Patent does for a limited time protect a game concept/idea, but Tetris game concept lies in the public domain.

So, anyone can legally make and sell a Tetris/Tetromino/falling block game.

I am starting a blog series ([http://desiree47.wordpress.com/2008/11/19/tetris-and- intelle...](http://desiree47.wordpress.com/2008/11/19/tetris-and-intellectual- property-rights-patent/)) covering IP, the Tetris Company, and iPhone Tetromino games. I have only covered patent law, but the rest is soon to come.

<comment><USER4> Interesting blog article. I can't wait to see the next post.

The concept of Tetris is pretty simple; many of guys here might have written some variation of it (I myself wrote one in Z80 assembler back in college to show my crude hand-made PC could be of some use :-) The "modern" Tetris has been evolved since then, though. I didn't realize that until I had a project with the official Tetris game. There are various rules that affect gameplay in subtle ways (have you heard of SuperRotation?). It is possible that somebody who is very good at the "good old" Tetris will not be good at the modern Tetris. I assume that's why the Tetris Company wants to define "The Tetris" to make sure people who play do play the same game. On what legal basis they do that, I don't know and that's why I'm curious where you'll go.

<comment><USER3> I will definitely get to your questions in my blog.

You're right. There are many novel and exciting ways to play tetromino games including network, combo, 4D, special block game play and much more. The concept is ever-evolving. But this is not solely due to the ingenuity of gaming companies to which the Tetris company grants use of their trademark.

Have you heard of TetriNET? Its a tetromino game that incorporates network game play and special blocks. It was released in 1997 and was the first tetromino game of its kind. Since then it has had many problems with the Tetris Company which has tried to shut it down. Interestingly though, in 1999, a new version of Tetris was released featuring "magical blocks" and two player game mode (The Magical Tetris Challenge).

Look all around and you will find new creative ways to play Tetromino games. Its not just "The official Tetris game" that has evolved. In fact, the official versions are usually the last ones to make modifications.

</comment></comment></comment></comment><comment><USER5> So what's the story behind this site? Has anyone tried it yet?

Partially answering my own question:

<http://www.gossamer-threads.com/lists/python/python/696912>

</comment><comment><USER6> Could prove tricky. After all, Tetris is NP-complete: <http://arxiv.org/abs/cs.CC/0210020>

(kind of an interesting proof -- they reduce it to the problem of partitioning multisets of numbers into groups of equal sums)

</comment><comment><USER7> The 5 second limit on request time has defeated me: <http://superjoesoftware.com/misc/tetrisbuster.cgi> <http://pastebin.com/d347e754c>

</comment><comment><USER8> There was a similar challenge in the Ruby world recently for the game Battleship: <http://sparring.rubyforge.org/battleship/index.html></comment>


How to Acquire a Domain Name (That Someone Already Owns) - <AUTHOR> http://blog.domai.nr/post/17910329952/buy-a-domain-that-someone-else-owns <comment><USER2> In my opinion this is a huge problem on the internet. I am all for freedom to own domains, but it's coming to the point where more often or not the domain name I search for has no content up and is just conveniently being parked. For me, I guess the fact that the domain is parked tells me the owner is looking for a pay day from it, rather than to create their own content rich site. Big companies can force the little guy to submit to them and give them a domain, but little guys can't do anything to little or big guys to get a domain. It's a pretty messed up system.

I sold a domain once for $5,000(us) to the biggest equipment manufacturer in the world. I wanted more, their proposal was to buy it for $3,000(us). I was happy enough with the $5,000 after they told me they were going to sue and take it from me...

<comment><USER3> The domain system desperately needs reform. It's unconscionable that one can simply park domains wholesale and wait for the bids to roll in. It's a huge problem that people wanting to create value are held to ransom by parasites, and there is little chance other than to pay through the nose.

<comment><USER4> while I agree that it sucks, that would be really hard to change.

if parking pages were to become illegal, it wouldn't take long for parking providers to turn in to "blog hosters" or whatever.

I see empty storefronts in prime areas of SF all the time... I guess the owner's just looking for a big pay day.

sucks, but i don't think there's anything you can do.

<comment><USER5> "I see empty storefronts in prime areas of SF all the time... I guess the owner's just looking for a big pay day."

Have you ever worked or owned commercial real estate? (I have).

They are looking for many things including what they feel is the right stable tenant that can pay the rent, keep the property in good condition, and has a good chance of staying in business.

Would you accept the first job offer from someone who offered you a job? If you were out of a job for 1 year would you take a job that you felt was beneath what your capabilities was?

Commercial real estate owners evaluate the market and what they can get for the property and many other factors.

You are being simplistic if you reduce this to "just looking for a big payday".

</comment></comment></comment></comment><comment><USER5> The title is "How to Acquire a Domain Name (That Someone Already Owns)"

But the article essentially deals only with how to contact the owner.

It doesn't deal at all with strategy or research required to acquire a domain name at a fair price.

Acquiring a domain name is much more than contacting the owner. It's how you contact the owner and what you say and even how you say it. And who you appear to be and a host of other factors. It's what your initial offer is (and while some will say don't make the first offer that is not always correct) and even how long it takes you to reply to a counter or how that is handled.

There is much to the strategy (on both buy and sell side).

And even if you are using an intermediary to make offers on your behalf you will have to use a strategy with them as well.

<comment><USER6> That was the purpose of linking to the Fred Wilson blog post comment. It covers almost everything you just mentioned. This post is an outline for others to handily reference.

</comment></comment><comment><USER7> I've acquired 2 or 3 registered domains in my life, so not that much experience. However, I get the feeling that people dare to ask more money when they have time to think about it, ie. acquiring via email. When I acquired my first domain, I didn't email, but simply called the person up. Worked like a charm!

</comment><comment><USER8> Quick pitch: I've been building a new domain search tool called Lean Domain Search [1] that makes it really, really easy to find great available .com domain names. You type in a word and it pairs it with 1,400 other words and instantly shows you which are available (and I'm adding 100 results per week). The number of _available_ search results is now almost at 700.

Unless you are dead-set on having a specific name, there's no reason you should have to pay more than the $12 registration fee to pick up a decent domain name for your next site.

I'd even go so far as to say that as word of Lean Domain Search spreads (it's less than 5 weeks old), it will have a major impact on the premium domain name market for this very reason. There's this perceived scarcity of good domain names that simply doesn't exist. You just need a tool like LDS to show you.

[1] <http://www.leandomainsearch.com>

<comment><USER9> I used LDS recently when picking out a domain. It was good, but the results often felt a SEO-like (e.g. "bestof<x>"). I found I was doing a lot of manual work separating the wheat from the chaff.

I ended up creating a text file of base words, prefixes and suffixes (built partially from LDS suggestions) which I fed through another site that combined them into domains I could query in batches of 225.

I felt this was something your site could have easily automated by letting me flag prefixes/suffixes I liked and allowing me to suggest multiple base words.

</comment></comment><comment><USER10> A simple solution for the vast majority of domain squatting: just charge a "property tax" of $100/year per domain. That's not an outrageous amount for a real user, but it makes the "buy a zillion domains and park them until the Big One comes along" business model no longer mathematically sound.

<comment><USER11> Who gets to collect the tax?

<comment><USER10> Any organization that's sufficiently large they don't care about the small incremental income. That is, anybody who's not a domain registrar.

I'm not a U.S. citizen, but the U.S. federal government would fit the bill just fine, and would be the obvious (though inevitably controversial) group to do it for .com, .net, and .org, ie. the problematic ones.

</comment></comment></comment><comment><USER12> What about domains that are not business specific, but personal? For example, there is a squatter who registered a huge number of firstnamelastname.com -- one of which is my real name. He's been reregistering it for the past 8 years.

I created a fake email several years ago and made up some cover story about how I was looking to create an online persona to blog with and listed 5-6 domains of these domains. The squatter wanted 10k for my firstnamelastname.com when I offered less than he wanted (like 1k) for one of the domains I really didn't want, he just said no and stopped responding. I even cited a post where he paid $80 for the domain...

I've been afraid to interact with the guy using my real name and the domain I actually want because I don't want to show any interest in the domain in hopes he just lets it expire.

((The guy has also had several domains seized by ICANN))

</comment><comment><USER13> One option that was left out is to wait for it to drop and buy it then. You can use a service to try to catch it when it drops but you then enter into a bidding match, or you can just wait for it to be completely released. Obviously more risky and maybe not worth the risk but I've done it recently.

The domain I wanted was 4-5 weeks away from expiring, so I read a bit on the services to catch it when it drops and some sounded a bit fishy (some claim they put fake bids to pump the price up…). So I took a chance and waited the whole expiration process and was lucky enough to get it for just the price of a domain.

Granted, it wasn't one of these unique four-letter domains so there was a decent chance there'd be little interest, and I would have survived without it (I had bought a good back-up name), but it's still an option for the cheap and patient…

<comment><USER14> The issue comes down to economics.

Parked domains are an investment, and I suspect this is the kind of business that is only profitable on the long tail - you only flip some exceedingly small percentage of your total inventory on a given year, but you can't tell ahead of time which ones are going to be the winners.

So… unless these are all manually managed (which I find unlikely, doesn't GoDaddy have a whole panel dedicated to parking?) I find this scenario to be extremely unlikely.

Someone who has actually parked domains can probably shed some more light on the business model involved.

<comment><USER5> "Someone who has actually parked domains can probably shed some more light on the business model involved."

...you answered your question perfectly:

"I suspect this is the kind of business that is only profitable on the long tail - you only flip some exceedingly small percentage of your total inventory on a given year, but you can't tell ahead of time which ones are going to be the winners."

Exactly.

That said much of this also has to do with who owns the name, whether they need the money (what you are offering) and a host of other factors to numerous to mention.

As a general rule though I would rather be making an offer to buy a name off someone who owns a vast inventory of names than someone who owns only a few. Why? Because they know that if they pass up your offer they might wait another 7 years to sell that name. So essentially you just have to clear a certain point based on their experience and the names is yours.

Unless of course that person who owns only a few names needs money in which case (well you get my point) I'd rather have that person be the seller.

From my experience I've seen all sorts of things happen. I just helped a startup get a great name for a few hundred dollars that was worth much more simply because the owner didn't even google to see that they obviously would need the name.

</comment></comment></comment><comment><USER15> Direct link to the comment on the avc.com post mentioned in this post:

[http://www.avc.com/a_vc/2011/04/finding-and-buying-a- domain-...](http://www.avc.com/a_vc/2011/04/finding-and-buying-a-domain- name.html#dsq-comment-body-193649096)

<comment><USER16> That comment is perfect. I'm a developer that loves buying domain names that strike a chord. I'll get to that idea one day! I get approached a few times a year and the author touched on a lot of feeling a seller goes through when being approached via email. I've ignored a few requests because I can tell the prospective buyer is not serious. I'd be much more likely to "think" about a serious offer in an initial email.

</comment></comment><comment><USER17> Domain owners behind WHOIS privacy are not necessarily unreachable. The privacy service has to offer some way of contacting those domain owners by proxy, so you may just have to fill out a web form behind a CAPTCHA to get your message across.

I did this for a domain a few weeks ago that was using OpenSRS' WHOIS privacy (via <http://contactprivacy.com>) and while it took 2 weeks for the owner to get back to me, he responded by putting the domain up on Sedo so I could make an offer on it.

</comment><comment><USER18> When I want to buy a domain, I use Who.Is to find the owner and send a certified FAIR value through Escrow.Com

Unfortunately, when people contact me to obtain a domain I have, I get very lowball offers - to which I do not respond.

I also offer people to use my domains for Free as part of my project OpenDomain, but most people insist that they must own the domain. I guess they do not get that we are "Open Source for domains".

<comment><USER19> Open source for domains means nothing to me, what are you to domains? I have no way of linking open source in my mind to the concept of domains.

I tried to look what OpenDomain was so I search and I find some business solutions .com which I assume isn't your project so I look and I find your twitter[1] (I'm assuming) which has the same slogan you used, so I go to the website and what do I find? Just some default filler content for whatever template your purchased.

Owning the domain for a project or a company is key as that is a great part of their identity that they have to build up (especially for online applications). Maybe if your project "OpenDomain" gets some backing and is alive for many years and actually says what it does then maybe people won't have to own their domains but as of now your complaint of people not getting it is moot.

[1]: <http://twitter.com/#!/opendomain>

</comment></comment><comment><USER20> This is comment can sit at the bottom of the page or wherever. This page is full of misinformation and spam. Ignore all of it.

</comment><comment><USER21> Has anyone had any experience acquiring a name that's being squatted on? Our nonprofit has the .org for a domain; a squatter has the .com. We'd like to get it from them so we don't have confused users.

Should we write them first? Have our lawyer write nicely? Sternly? Or just skip this and go straight to UDRP?

</comment><comment><USER22> I got a voicemail last week from an LA area number. It was a cute-sounding girl saying, "Hi, my name is Kayla, I'm taking a marketing class, and for one of my projects I wanted to use your domain xxx dot yyy, so I was wondering if you would sell it to me. Ok, please call me back!"

Not suspicious at all!

<comment><USER17> That instantly reminded me of <https://www.youtube.com/watch?v=xW8j3x3GzxY>

</comment></comment><comment><USER23> To "get a feel for the domain name aftermarket's trends" -> check out <http://www.dnsaleprice.com/SalePrice.aspx>

</comment><comment><USER24> Related: Great comment in an avc post- [http://www.avc.com/a_vc/2011/04/finding-and-buying-a- domain-...](http://www.avc.com/a_vc/2011/04/finding-and-buying-a-domain- name.html#comment-193649096)

I'll repost the good part here, since it isn't attributed anyway:

The Art Of Negotiating A Domain Name Purchase

I see so much bad advice about how to approach someone to buy their domain... "contact them and say I see you're not using xxxxx.com, I have a little project I'd like to use it for... would you be willing to let it go?" etc. etc. etc. HORRIBLE ADVICE.

People that are sitting on domain names don't keep paying the registration fees every year for fun, even if they aren't using the name. They know it has value. So don't insult their intelligence making them think they should do you a favor by letting you have their unused domain.

Many Domain Owners Think They're Sitting On A Lottery Ticket

Many domain owners think that one day someone is going to come along and give them millions for their .Com no matter what it is. The fact is, domains are only worth what someone is ready to hand you a check for. (A tip to all you wannabe speculators.) I've seen many GREAT domains never get sold, so always keep that in mind. Anyway, because domain owners have this thinking, they are very reluctant to NAME A PRICE. So forcing them to start by naming a price isn't something they want to do, because they're hoping YOU offer some ridiculously high price that they will then counter to go much higher.

Because of this, you MUST start out on first contact with an offer (more on this in a second). The approach of "would you be willing to sell xxxxx.com? If so, how much?" isn't going to cut it; one of the main reasons is that domain owners of decent domains get TONS of emails all the time asking them that, and when they've replied in the past with a price or try to start negotiations so many people are only willing to pay $100 or some insulting price.

So what do most domain owners do? IGNORE YOU. That's right. So if you've ever contacted a domain owner after looking them up with a Whois search and they didn't reply, it's not because they didn't your email (which makes you think that follow-up fax or phone call will do the trick; HINT: it won't.) It's because they think you're like everyone else that thinks they can buy the domain for $100 or so.

Here's how you get their attention and get the ball rolling...

Rule #1: You must start out by making an offer in your initial email.

Rule #2: This offer must be high enough to get their attention and make them at least THINK.

NOTE: Rule #2's amount will depend on how great the domain is.

The two magic price points I have found that work the best (they depend on how valuable the domain is) is either $1,000 or $2,500.

If it's a great domain then $5K-$10K is usually the starting point. These amounts are enough to get anyone's attention. I've bought many $100K+ value domains for $15K-$20K by starting with a $5K or $7K offer.

By starting with at least something that gets their attention they will take you seriously. This is the first step or you have no chance to make a deal.

In most cases for decent 2 words domains, the $1K to $2.5K opener works best.

* TIP: Always know your seller if possible. Do a Whois on who owns the domain, visit the domain in their email address or do some Google searches, etc. You'll often find a struggling Web designer is sitting on a great domain. $1,000 cash to that person is a lot of money. So this also goes into the process of deciding what to open the offer with.

The key here is not to insult someone with a lowball offer, but offer enough to make them know you're a serious buyer.

So here's a sample initial contact email to send... (and I'll explain the rest of the language I use)...

Subject Line: Whatever.com ($2,500?)

Hi,

I see you are the owner of Whatever.com. I'm in the process of trying to find a domain name for a client I am building a web site for and think your name could be a good fit. I am contacting different domain owners as we have it in the budget to buy a cool name and Whatever.com is on the list we came up with.

Would you be interested in selling it for $2,500?

Let me know and I can have the funds wired to you next day or PayPal'd to you. Just let me know your PayPal address.

Thanks for your time.

-YOUR NAME \</comment><comment></comment><comment></comment><comment></comment><comment>-

Let's breakdown why I used that language...

1\. You've positioned yourself as not the future 'owner' of the domain. You're just managing a budget for a project. This helps because as they will usually counter with a higher amount, you'll play the "sorry, I just don't have it in the budget to go that high" to work towards a price you want. You'll also be able to play the "let me see if the client can approve a budget increase to accommodate that price" etc. etc. This also allows you to play Good Cop, Bad Cop in a way. You're just someone trying to get the deal done to do your job (build the site). You're also presenting yourself as someone LESS EMOTIONALLY INVESTED IN THE NAME -- which will potentially keep the price down. (Trust me, it works very well.)

2\. You mention that you're contacting several domain owners (i.e. making multiple offers). You're playing up SCARCITY, one of the most powerful emotions when it comes to sales. For all this person knows they could reply and say "okay, I'll sell it" but you may come back and say, "sorry someone replied to our email first and now we have a domain."

3\. By closing with the "we'll pay you right away" it makes the offer more REAL. Many of these domain owners get offers that people back out of and have no intention to actually pay. And you're also ASSUMING THE SALE by saying, "what's your PayPal address?" :-)

Again, all of these things are very, very powerful and I have tweaked this initial contact email over the years.

ADDITIONAL TIPS

Let's say you initially offer $2,500 on a great name and the owner counters with, "I couldn't sell it for that, I've had higher offers. I would never sell it for anything less than $10K."

FIrst, you must IGNORE anything they say. You'll get the "I've turned down higher offers" response a lot. In the example response about $10K above, unless you would love to have it for $10K, just reply with something like this... "While I do think your name is possibly worth $10K to someone, we just don't have the budget for that much, sorry. I could probably get something more like $5K-$7K approved, but even that's pushing it. Anyway, thanks for your time."

That's it. Cut them off. Trust me, they'll come back to you 90% of the time. Sometimes you just have to be a little PATIENT and you'll save a fortune. Remember to always play up the SCARCITY. "That's just too much for our budget... looks like we'll just go with an alternative name that we've been negotiating for a lot less, even though we preferred your name. Thanks for your time and at least trying to work something out." That's NOT what they want to read from you. ;-)

There are THOUSANDS of amazing domain deals out there waiting to happen. I, personally, buy domains all the time this way. In fact, this is probably a good time to negotiate some deals as many people need the cash more than in recent years.

FINAL TIP: It's not uncommon to settle on a final price that is 30% of what their original asking price was. Keep that in mind as a general rule of thumb. I've had many deals for great names where someone "really wanted $60,000" and we closed the sale around $20K.

<comment><USER20> They give a course on negotiation to people being promoted to upper management in the multinational I work for. The first rule is that if you quote first, you lose, because you are setting your worst case.

I strongly suspect all of what is written in your comment is aimed at boosting the market for domain names, because you own lots. There are so many good domain names available (<http://blog.nametoolkit.com/domain-names-taken>), that the only reason you would buy one in the secondary market is because you are already trading under that name in real life.

What famous site do we know of that bought its domain in the secondary market?

<comment><USER25> > They give a course on negotiation to people being promoted to upper > management in the multinational I work for. The first rule is that if you > quote first, you lose, because you are setting your worst case.

See <http://www.diplom.org/Zine/F1997R/Windsor/lawdip.html> for a contrasting opinion. Lawyers like to go first in all negotiations. They call it "Controlling the Document".

</comment></comment></comment><comment><USER26> If you want to buy a domain somebody owns, just get the email address from the WHOIS and send them a quick note, 'are you interested in selling this domain?'. Response rate from this is > 80%. Payment always via Escrow.com (PayPal does not provide protection for domains) and you're set.

As to the discussion of whether domain parking should be allowed, think of it like real estate. Those who own vast tracts of land may develop it, they may sell it or they may just sit on it for the rest of their life and pass it to their heirs. Premium domains are exactly the same.</comment>


Feed some real fish via this web app - <AUTHOR> https://www.aquard.io/

<comment><USER3> TheNextWeb damn near killed my browser, and it's just an ad-laden article about the fish-food thing instead of the fish-food thing itself, which can be found at [https://www.aquard.io/](https://www.aquard.io/)

I'm not at all certain the fish are real either.

<comment><USER4> "I'm not at all certain the fish are real either."

This is 2014. Assuming a decent level of development skills, it is not like this is _so amazing_ that it just _has_ to be faked. Hooking up webcams to the internet and hooking up a few web buttons to some real equipment via an Arduino is so easy I can't help but think it's actually easier to set this up for real than convincingly fake it in front of an Internet audience!

Seriously, folks, turn the cynicism knob down a bit. And I'm a cynic myself.

<comment><USER5> It seems not just easier to really do it, but tremendously easier. If it's fake, that's probably more impressive!

<comment><USER6> Eh, I dunno, you could just put the feeder on a timer and not have to deal with scaling issues of allowing thousands of people to manage one feeding apparatus.

<comment><USER5> The control being faked is plenty plausible. The _fish_ being faked is what I was responding to.

<comment><USER7> Hello there, I am Thomas, one of the guys involved in the development of aquard.io. The fish are real and the feeding is FCFS (first came - <USER2> served) based. We designed the logic based on an estimate of ~50 concurent users. So it does not work well (for interactions) when massive users are online. 300 Users to One Physical Object :/. Feel free to ask me anything related to the project and from the side of the team thanks for enjoying it!

<comment><USER5> It's a cool project! Don't take the above to mean I think the control part _is_ faked.

<comment><USER7> As i told before, the control part is not faked. We have a dedicated PC communicating with an Arduino UNO via a Serial port (USB). PC gets (web) requests forwards it to Arduino and then it controls the airpump and the feeder.

<comment><USER5> Yeah, I said I _don 't_ believe it was faked.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> Nice! I recently thought of doing something similar, where you can shoot different kinds of real guns over the web and observe the effects over a webcam. Payment per shot would be in Dogecoin, naturally.

<comment><USER9> You are coming almost 10 years to late for that idea:

[http://www.washingtonpost.com/wp- dyn/content/article/2005/05...](http://www.washingtonpost.com/wp- dyn/content/article/2005/05/07/AR2005050701270.html)

<comment><USER10> Maybe they were 10 years too early?

Maybe there's room for two?

Maybe negative feedback just isn't the right thing to provide.

<comment><USER11> Maybe it's not an original idea, and if someone wants to try it again, they could learn from studying the last time its been tried. Maybe? Maybe?

</comment></comment></comment></comment><comment><USER12> I am not trying to be dismissive, but I don't see how this "Solves the problem of remembering to feed the fish". If it is entirely automated, it can just as easily be automated and the fish be fed automatically. I do understand the aesthetic value of this, but I believe that that is the only value proposition that this setup has. Am I missing something over here?

<comment><USER13> Yes, you're missing netting fake Internet points to show off your visually stunning but ultimately pointless web application.

</comment></comment><comment><USER14> Many many years ago my brother found a site where you could operate real claw crane games remotely.

These:

[http://en.wikipedia.org/wiki/Claw_crane](http://en.wikipedia.org/wiki/Claw_crane)

They had a bunch in like a warehouse and you'd control the claw to see if you could get the toys. Once and a while you'd see someone slightly off camera walking around the warehouse throwing the toys back in. My brother and I got good at those games from that site. They also had an address where you could send in toys to be put in the games. I remember there was a roll of toilet paper in one of the games, and sometimes other weird things too but I don't recall anything else specifically.

Way better than feeding fish.

</comment><comment><USER15> I wonder if this is real. It'd be easy to run this system for a few days recording enough video data to be able to just play it back to people without them noticing. It also solves nicely the scaling problem (if you and 1000 other users connect to the real aquarium at the same time, what are the chances that _you_ 're going to feed the fish today?) and any potential availability/maintenance issues (you can just flush the fish down the drain and call it a day; no one will be any the wiser, and you save money on fish food).

</comment><comment><USER16> And here's the proof: [https://www.aquard.io/img/ss1.png](https://www.aquard.io/img/ss1.png) Enjoy www.Aquard.io everybody!

</comment><comment><USER17> Great, now I'm hungry again.

</comment><comment><USER18> Seriously, please don't waste your time this way. If you are really bored, create something lasting by editing Wikipedia or OpenStreetMap instead.

<comment><USER19> It's unfortunate that you feel every second of your day need be used to be productive. It's also unfortunate that you feel the need to manipulate others through condescension in order to feel superior. If someone wants to feed some real fish, virtual fish, or simply play a game when bored to blow off some steam, then more power to them. How I choose to spend my time is both none of your concern, and entirely up to me.

<comment><USER20> > It's also unfortunate that you feel the need to manipulate others through > condescension in order to feel superior.

Chill out, he said please.

</comment></comment></comment><comment><USER21> Damn it HN! I am going to have to wait for this to hit page 3 before the queue gets small enough again.

<comment><USER21> It has calmed down slightly. I got to release bubbles just now!

</comment></comment><comment><USER16> Hi everyone! I am Marios, one of the developers of www.aquard.io and just wanted to let you know that the fish are live and broadcasted real-time. And because seeing is believing in 5' stay tuned for a live message for your eyes only! :)

</comment><comment><USER22> Aren't they going to die of overfeeding? Oh well, first world fish problems.

</comment><comment><USER23> One of LifeSize's internal video streams you could use for testing their video conferencing product was a fishtank, it was pretty cool. Couldn't feed the fish though.

</comment><comment><USER24> The messages on the right are really annoying. Too fast to actually read them and no visible way to stop them.

</comment><comment><USER25> The article inspired a spin-off idea in my head: "online crocodile feeding". No machines are involved, instead a fearless human is hired to dangle those raw, bloody wildebeest steaks in front of their noses.</comment>


Ask HN: API or service to connect, read and publish to major social networks? - <AUTHOR> I'm about to embark on a project to create a social media management portal for a client. It requires integrations with about 15 most popular social networks. And for each of them, we would need OAuth support, being able to read comments, posts and messages, being able to respond to posts, comments and messages, and publish posts.
I would really really like to avoid maintaining these APIs myself and was hoping there'd be a reliable third-party service that I could use.
Here're some of the networks we're looking to connect to:
- [ ] LinkedIn - [ ] Reddit - [ ] Google+ - [ ] Twitter - [ ] Facebook - [ ] Pinterest - [ ] Tumblr - [ ] Instagram - [ ] YouTube - [ ] FourSquare
Does anyone know of an API or service we could use here? <comment><USER2> Is that similar to buffer.com or [https://hootsuite.com/plans](https://hootsuite.com/plans) (35 platforms)?

<comment><AUTHOR> Yes, kind of. But it's to be used within a single company.</comment></comment>


People really don't like unselfish colleagues - <AUTHOR> http://www.sciencedaily.com/releases/2010/08/100823101110.htm

<comment><USER3> Gah. Where do we even begin with this article's problems?

1\. The studies were done with college students (a very unrepresentative, and relatively immature group), in a non-organization (basically they were linked only by a possible monetary reward at the end) and with some very trivial incentive in play. If this has "implications for business work groups, volunteer organizations, non-profit projects, military units, and environmental efforts", please let us know how those implications are arrived at!

2\. The description of the experiment is unclear and self-contradictory: "...pools of points that they could keep or give up for an immediate reward of meal service vouchers. Participants were also told that giving up points would improve the group's chance of receiving a monetary reward." So if you "give up" points you _both_ get free meals _and_ you improve the group's welfare?! That doesn't make any sense.

3\. What's the deal with the rules - what rules were the "do-gooders" breaking? They're only mentioned in passing but they seem essential for the meaning of the experiment.

<comment><USER4> Regarding point 1), it's even worse than that. College students live in an environment where "do-gooder" behavior objectively harms them.

If I slack off and you study hard, the professor is comparing my 40/100 to your 85/100. This results in me getting a lower letter grade.

<comment><USER5> To be honest, I never understood this letter grading system used in the US (and maybe elsewhere)... and if you already have scores (like 40/100 vs 85/100), why even bother with another system?

<comment><USER4> A = 1 standard dev above the mean. B = mean. C = 1 std dev below the mean, but still performed remotely adequately. D = "If your major is theater and the class is math, I won't stop you from graduating."

<comment><USER6> Traditionally (and as is still the case at some schools, according to a friend of mine now at Georgia Tech), the scale was:

A = Exceptionally above the mean. B = 1 stdev above the mean. C = mean. D = 1 stdev below the mean. F = More than 1 stdev below the mean.

At most schools, however, grade inflation has changed the scale upwards to what you said.

<comment><USER7> Interestingly, in many of my middle- and high-school classes, grades were not based on standard deviations from the mean of actual class performance; they were a fixed scale: 90% or better was an "A", 80 - 89% was a B, 70 - 79% was a "C", etc. So you really could have the entire class be "better than average" (by the more usual method of computing a "C" grade) if the teacher made an assignment too easy.

My son's school still does this, though they've slid the scale up a bit, you need a 93% or better now to get an "A", and they've added a safety net: if you turn in any kind of reasonable attempt at all work assigned you will not get lower than a D- in the class.

<comment><USER6> There's no requirement that you curve the scores to any real distribution after the fact--you can design your tests with the intention that the average student gets 70-79% of the questions correct and students in other quintiles get higher or lower scores, or with the intention that the average student gets 80-89% of the questions correct, or with some other mix of intentions and related test scores. With some experience and fiddling I bet you could get a grading system like you describe which fell along a standard distribution.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> _Parks and Stone found that unselfish colleagues come to be resented because they "raise the bar" for what is expected of everyone. As a result, workers feel the new standard will make everyone else look bad_

Please. People don't like others who raise the bar. This is not news. The same thing can be said about co-workers that work harder. Sure others don't like them because during the performance review they will be compared to them.

<comment><USER9> I think the interesting thing about technical work is that the real productivity gains are not in working harder, but in using better methods. If your co-worker is way more effective at a technical job, you can usually learn from her and become more effective yourself, without working much or any harder...

I think this is an important distinction... if my co-worker raises the bar by working harder, then yeah, I'm expected to work harder. but if my co-worker brings more effective methods? suddenly I become very interested in learning from this co-worker.

<comment><USER10> I agree with you, but I am also hesitant to say that we are in the majority of people. When someone does something more efficiently I am all ears just like you. I don't think that the majority of people distinguish hard worker and more efficient worker though so the two get lumped into the category of "makes me look bad."

<comment><USER9> A tech company with the "Don't make us look bad" attitude is not going to last long, at least, not as a tech company.

<comment><USER11> A startup with that attitude won't last long. Tech companies can last quite a long time with any poisonous attitude, once the cash cow has been found.

I've experienced "work by CYA." It isn't pretty, but it has the "advantage" that nothing too bad ever happens.

<comment><USER9> usually those companies become primarily sales oriented rather than technology oriented. Take Oracle. Yeah, they have some technology... and they even develop some new stuff. But primarily they work in sales. A less radical example would be Microsoft.

The problem with the cya approach is that it minimizes the risk for any particular individual, not for the organization as a whole. They don't take the option that is least likely to fail, they take the option that is least likely to bite them personally in the ass if it does fail.

</comment></comment></comment></comment></comment></comment><comment><USER12> This is quite the definition of "unselfish". When I think unselfish, I think of the guy who steps in to help you out with something and doesn't ask for any credit or imply a quid pro quo. I don't think of glory hogs who go out of their way to make a spectacle of their work ethic.

</comment><comment><USER13> Psychological studies of this type tend only to promote superficial analysis.

A co-worker who has a gracious, giving spirit (and, hence, is unselfish) is infinitely to be preferred to one embodies the opposite traits. That is the person who will be there when times get tough and sacrifice is required. It is the person who will _not_ dart out the door, or dodge responsibility, when something has gone wrong and people have to step up to take responsibility. It is the person who will respect you as a co-worker, who will take a personal interest in knowing that you are well, who will sympathize when you share a problem, who will support you through your trials - I am not talking here about one who is a close friend but rather of the traits exemplified by one who has a loving, kind spirit that is ever alert to show concern for the welfare of others and who is willing to sacrifice for the good of larger aims besides immediate self-interest.

That is what I think of when I think of working with "unselfish colleagues." A genuinely unselfish person is an admirable person by any measure and will usually be humble to boot, not focusing on outward show and phony braggadocio that tends to the sort of self-advancement that is the exact opposite of unselfish.

Such people are known to all of us and are universally admired, or pretty nearly so. And the character traits that underlie the core of such a person cannot be identified or isolated in a superficial study of a few college students playing an artificial game or two.

Common sense will always trump "science" in our understanding of areas such as this and will allow us to sense intuitively what we really don't need people in white lab coats to tell us.

<comment><USER14> "Common sense will always trump "science" in our understanding of areas such as this and will allow us to sense intuitively what we really don't need people in white lab coats to tell us."

Wow, there is so much wrong with this sentence I can't believe it got up votes. This particular study may have flaws, and/or there may be errors in extrapolating the results of this isolated game to general workplace dynamics, but that doesn't mean science is bad.

"Common sense" does not, ever, trump science. "Common sense" is a lazy excuse for "I have an opinion that I can't back up with any data". How many times haven't we all read someone trying to make a claim like "It's common sense that marriage should be between one man and one woman".

Different people might have wildly different ideas backed up by "common sense". That's why we do studies - to find out what the truth is, even if it disproves our initial guess or we are uncomfortable/unhappy with the result.

<comment><USER15> In the hard sciences, you are absolutely right.

In social sciences, I am not certain you are correct, there is at least a solid counterargument.

All social sciences are dealing with topics with numerous confounding variables that cannot be removed, and many others that they do not try to remove.Common sense on the other hand is the accumulation of your observations of humanity over a lifetime.

I think Mr. Grellas' statement may be too strong, the social sciences likely will eventually catch up to and surprass any individuals common sense in understanding humanity. But I think that day is a very long way away and it will likely include the subjective observations of trained and worldly observers like Desmond Morris even when it does arrive.

For the forseeable future, I suspect he is right and that the common sense of an observant and worldly person is a better predictor of human behavior than the formal social sciences.

<comment><USER16> > Common sense on the other hand is the accumulation of your observations of > humanity over a lifetime.

There is no such thing as common sense, and it is anecdotal, at best. Now if the OP and a statistically significant number of people joined together to assert the same point about the specific society discussed, we may have something.

<comment><USER17> How would you ever get a statistically significant number of people to agree on anything if each person relied on those sets of statistics to assert their point?

</comment></comment></comment></comment></comment><comment><USER18> "Parks and Stone found that unselfish colleagues come to be resented because they "raise the bar" for what is expected of everyone. As a result, workers feel the new standard will make everyone else look bad."

This kind of attitude, is not an attitude you want people working for you to have.

</comment><comment><USER19> Is this even a bad thing? Do you have to like someone to work with them?

<comment><USER7> No you don't. And I often wish that companies would stop trying to treat the employees as some kind of big "family." Company picnics, bowling, golf, Christmas parties, etc. that everyone is urged if not forced to go to (outside of work hours of course). About 10 years ago I just stopped going to these things. I already spend 40 - 50 hours a week with all these people, I don't need an evening or weekend day stolen from my time with my REAL family and friends to spend more time with co-workers.

</comment></comment><comment><USER20> What if the students that the psychology profs hired weren't very good actors, and their selfless behavior didn't seem genuine?

</comment><comment><USER21> This is merely another downside of competition within groups, where a boss or other administrative entity would compare individuals' relative performance, and as a result create a group incentive to maintain lower productivity.

When group members are _directly responsible to each other_ , as in the case of a small startup or egalitarian cooperative, this effect disappears.

I'd imagine it would be fairly straightforward to model this in game-theoretic terms.

<comment><USER22> Distressingly, it turns out that antisocial punishment can evolve as easily as social punishment, and has done so in many societies: [http://www.iaa.unisg.ch/org/few/web.nsf/SysWebRessources/Pub...](http://www.iaa.unisg.ch/org/few/web.nsf/SysWebRessources/Pub_CT_Science/$FILE/HerrmannTh%C3%B6niG%C3%A4chter2008\(Science\)+Antisocial+Punishment+Across+Societies.pdf)

This is something of a hot topic in the economics/psychology are now - <USER2> new papers are out along the same lines, but most of them are still paywalled. I have a hunch that predispositions to act one way or the other will turn out to be strongly correlated with a person's perceptions of social mobility.

A large-scale (albeit stereotypical) example of what the OP is talking about is in the economics of labor relations, where an individual 'eager beaver' attitude and the collective goals of a union are somewhat at odds.

<comment><USER23> Name them and maybe some piratical paywall activist will share them for us all.

<comment><USER22> Tee-hee - it is pretty irritating. Just google 'antisocial punishment' - social punishment is the more familiar phenomenon of not rewarding cheaters, but it turns out not to be the norm in all societies. gScholar has the most 3 or papers near the top of the list.</comment></comment></comment></comment>