In Defense of Scala. Response to "I Don't Like Scala" - <AUTHOR> http://blog.gridgainsystems.com/in-defense-of-scala-response-to-i-dont-like-scala/

<comment><USER2> It's funny how he can dismiss Haskell as "hopeless academic idealism" and accuse dynamic language of "intellectual laziness" in one breath. Haskell is _different_ from most languages, but that doesn't make it hopeless or academic _a priori_. Saying that is itself intellectually lazy, bordering on intellectually dishonest. But it is a good way to save yourself the effort of learning something new!

Besides this, Scala has way too much Java in it to really be "algebraically elegant" or even simple! Scala is a compromise. It has the legacy of Java compatibility dragging it down. That's one of the main reasons it's caught on, but it's also the reason it isn't actually particularly simple or elegant. It's one of the most _complex_ (but not necessarily difficult) languages in common use.

It is nowhere near as elegant or simple as OCaml or Haskell as they can afford to be much closer to the λ-calculus. Which is also why they can afford such incredible things like tail call elimination and type inference!

Also, while Scala _is_ a multiparadigm language, it _is not_ the best of both worlds. In embracing Java and OO, it throws away many of the advantages of functional programming. In fact, any non-trivial functional programming quickly becomes unbearable. Especially compared to Haskell.

Edward Kmett wrote a nice Reddit post[1] about how Scala falls short from a functional standpoint. This is from an entirely practical commercial standpoint based on his experiences at S&P Capital IQ. Here is what he had to say about functional programming in Scala: "If scala was the only language I had to think in, I'd think functional programming was a bad idea that didn't scale, too." A pretty strong image!

Their story is interesting: they took a Java project to Scala. It was an incredible improvement. Then Scala became a pain on its own, so they designed their own functional language for the JVM[2] and moved to that. It was the same sort of incredible improvement. The same thing that happened to Java happened to Scala!

Ermine, their new programming language, is basically like the core of Haskell adopted to the JVM along with some interesting new features. One thing that really stood out for me is that they have customizable type error messages: they can have type errors that are domain-specific! That by itself probably has a fair amount of value.

[1]: [http://www.reddit.com/r/haskell/comments/1pjjy5/odersky_the_...](http://www.reddit.com/r/haskell/comments/1pjjy5/odersky_the_trouble_with_types_strange_loop_2013/cd3bgcu)

[2]: [https://github.com/ermine-language/ermine](https://github.com/ermine- language/ermine)

<comment><USER3> Edward Kmett is a Haskell evangelist (not to mention absurdly productive engineer) so it's natural for him to point out the inconsistencies in Scala, inconsistencies that the average programmer will never even realize exist.

He ends his semi-rant with a concession: there's a lot of good in Scala, and that's absolutely true, there is _so much good_ in Scala that only when you leave it's confines do you realize, shit, I miss:

       immutability
       lazy vals
       case classes
       pattern matching
       named parameters
       implicits
       import aliases
       partial functions
       Option, Either (wish latter was biased)
       map/flatMap/fold & collections FP friends

and on and fucking on, how can you not love Scala? o_O

Ok, compile times and IDE support leave something to be desired, but things have improved by leaps and bounds in the past 3 years, and more goodness to come with Scala 2.11 in (hopefully) March.

<comment><USER4> >Edward Kmett is a Haskell evangelist

Really? Could you point me to some of his evangelizing? Or did you mean "he uses haskell and is quite happy with it"? Because that isn't the same thing.

>inconsistencies that the average programmer will never even realize exist.

Do you honestly believe that? [http://www.youtube.com/watch?v=TS1lpKBMkgg](http://www.youtube.com/watch?v=TS1lpKBMkgg)

>Scala that only when you leave it's confines do you realize, shit, I miss

But the very point Edward makes is that you don't give up those things when you leave scala. You only give up those things if you leave scala for something worse. You could leave for something better, keep all those things, and get tons of important things that you also won't realize you are missing until you get used to them and then try to live without them.

<comment><USER3> There's nothing wrong with language evangelism, if you love the language you work in you'll evangelize it without even thinking about it.

Kmett has, I believe, taken on a larger role in Haskell, perhaps officially with FP Complete. At any rate he does mention in one his videos (maybe on www.haskellcast.com) that he is coding less now due to his new obligations, which includes [completely from fallible memory] promoting [read: evangelizing] the language.

>inconsistencies that the average programmer will never even realize exist.

Referring to a presentation by Paul Phillips, an absolute Scala giant, and equating that with what the average Scala programmer encounters in their daily work does not negate my argument...in the slightest.

When you leave Scala and remain on the JVM there is no better statically typed alternative, IMHO. When you leave the JVM, then yes, you can dive into Haskell and experience (compared to Scala) longer compile times, yelp o_O, poor to non-existent (IDE) tooling (just type :t in the REPL to see the inferred type, AKA beginner's joy), lack of an enterprise ecosystem, and yes, purity in all its glory, with a superior type system and quite a friendly community of mostly brilliant minds.

In the end I'd say there's some degree of PITA everywhere, even in Haskell. Just getting my feet wet, maybe I'll learn to love it, but for now, to get shit done in the real world, it's Scala and the JVM.

<comment><USER4> >There's nothing wrong with language evangelism

He says, after suggesting you can't trust what someone says because they are an evangelist.

>Kmett has, I believe, taken on a larger role in Haskell, perhaps officially with FP Complete

FP complete is an independent company and has no official involvement in GHC or any other haskell implementation. Edward is not involved with FP complete. Edward is involved in the haskell community and the scala community. In neither case is he anything like an evangelist (which would make no sense anyways, you can't convert the converted). It seems odd that you are so adamant about inventing a fictional promotional context for him after claiming there's nothing wrong with that.

>Referring to a presentation by Paul Phillips, an absolute Scala giant, and equating that with what the average Scala programmer encounters in their daily work does not negate my argument...in the slightest.

Perhaps you should actually take the time to listen to it. A significant part of what he was saying was "this stuff matters". Just because the person doing the presentation knows scala very well, does not mean the problems he points out do not effect people who know scala less well.

>When you leave Scala and remain on the JVM there is no better statically typed alternative, IMHO

I am not sure how that is relevant. I don't care about the JVM.

>Just getting my feet wet, maybe I'll learn to love it, but for now, to get shit done in the real world, it's Scala and the JVM.

Or this. Do you remember the part where I tried to convince you to use haskell? Neither do I.

<comment><USER3> > He says, after suggesting you can't trust what someone says because they are > an evangelist.

What the hell are you talking about? I provided a counterpoint to Kmett's detailing all that is wrong with Scala, by providing some of the good. Kmett is a living legend, I'm not questioning the guy's integrity; he went off in that reddit thread based on his [deep] experience of the language, which is entirely non-average.

re: Paul Phillips, he's knows Scala probably better than anyone else on the planet; yes, the soundness of the compiler affects everyone, but those who are most bitten and bothered by it are library authors (read: advanced users), not end users who remain, for the most part, unaware of whatever issues may lie under the hood.

> Or this. Do you remember the part where I tried to convince you to use > haskell? Neither do I.

Other than Haskell, given the context of the thread, which language might you be referring to as the better alternative to Scala?

> You could leave for something better, keep all those things, and get tons of > important things that you also won't realize you are missing until you get > used to them and then try to live without them.

That sounds great! I am curious about leaving Scala for something better -- please name this better alternative that is presumably not Haskell.

<comment><USER5> Hi virtualwhys

> I am curious about leaving Scala for something better -- please name this > better alternative that is presumably not Haskell.

With apologies if you think this is too OT and/or if you are uninterested in immature languages/ecosystems, let me mention Rakudo and its increasingly capable JVM backend.

Today's Rakudo Star release (Star means "batteries included") is expected to be the last to ship without Rakudo's JVM backend. Almost certainly there'll be a February Rakudo Star release and it is expected to support the JVM backend out of the box.

I would be happy to say more about why I think P6 is going to become relevant again one day, perhaps this year, to folk at least interested in Scala.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> "For sane type-level programming look at latest Scala collections"

Is this a joke? The Scala collections library are terrible. They are inconsistent, hard to reason about, suffer from scope creep, and have terrible performance characteristics.

<comment><USER7> Every time I've used Scala collections, they've behaved exactly how I'd expect them to. What parts of the collections perform poorly?

<comment><USER8> I hate to call you out on this but look at the collection hierarchy and tell me its not complex.

[http://docs.scala- lang.org/resources/images/collections.muta...](http://docs.scala- lang.org/resources/images/collections.mutable.png)

<comment><USER6> That is just the "published" hierarchy as well. Paul Phillips likes to pick on the ParSeqViewLike trait, and if you ever find yourself delving into it, you'll see why.

<comment><USER9> As someone who actually writes production code in Scala on a daily basis Paul Pillips' "concerns" have had zero practical impact on my daily use of the language. I tried to find content in his presentations that actually had any impact on me but I couldn't.

<comment><USER6> As someone who also writes production code in Scala on a daily basis, and who took exception to the idea that the Scala collections library was a good example of type programming, Paul Phillips' concerns are spot on.

If you are using the collections library as example of how to structure your own code, you are in for a bad time. The abstractions are not right, and things like the silly ParSeqViewLike trait are an expression of that.

<comment><USER9> In day-to-day use I haven't run into any of these issues. Your mileage may vary.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> "Brilliantly simple" is an odd description of Scala. I would easily put Scala in the top 3 most-difficult-languages-for-me to work with. Maybe even top 2.

<comment><USER11> What is on top?

<comment><USER10> Template-heavy C++ and point-free Haskell code.

</comment></comment></comment><comment><USER12> I had my first experience for Scala last week with doing the Stripe CTF.

I really liked the look of the language and I started trying to develop my solution in it. I knew exactly what I wanted to do, and had a reasonable idea of what to write to get there.

Holly molly, compilation times were absolutely _horrible_. I tried to persevere but a tiny change would mean 2 minutes waiting for a recompile. In the end I just switched to python where I could develop a solution from scratch (remember, the Scala solution was 90% finished) in no time at all.

Would like to look closer at the language one day but I have better things to do with time than waiting for a machine to churn through code.

<comment><USER3> > I tried to persevere but a tiny change would mean 2 minutes waiting for a > recompile

incremental compilation: sbt> ~run

in most cases code changes should take one second. Note: SBT sub projects are God's gift to Scala devs (or Mark Harrah's gift at any rate).

You have to get your feet wet in the language, trying something last week for a day or two is not going to result in you flying to the moon on the productivity spaceship of delight.

Programming in Scala 2nd edition is a great intro to the language.

<comment><USER12> Ok. Sounds like there's a solution so I'll try again at some point. There was a build.sh with the project that I was using. I saw something about sbt in there so had a look on their website but couldn't obviously see how to fix the issue.

<comment><USER3> Play framework's a decent gateway drug to Scala, can help you get some of the basics under your belt while seeing tangible results.

Otherwise, a book or 2 on Scala goes a long way.

</comment></comment></comment></comment><comment><USER9> I've used Scala for a few years now. The blog post doesn't do a particularly good job of selling Scala despite the best intentions. I would encourage anyone who is interested in Scala to spend some time learning the language and using it, rather than worrying about occasional misdirected criticism which the blog seeks to counter.

I've found Scala to be very expressive and well suited to large-scale systems. It takes some effort to learn the language, but once you have put in the effort coding in Scala is a pleasure (esp. compared to Java).

</comment><comment><USER13> "intellectual laziness of dynamically typed languages"

What a claim! What an absurdity!

Dynamically type checked memory safe languages (eg. Python, Ruby, Javascript, etc...) enable styles of programming impossible in non-dynamically checked languages. So it certainly isn't the users who are being "intellectually lazy." Nor are the creators, who have focused on productivity and usability instead of waiting for proof systems (static type checkers) to catch up with their ideas. Laziness doesn't factor in on either side.

<comment><USER14> Provide an example where such a style would be deemed useful or superior to doing it the statically checked way.

<comment><USER3> Canonical example would be marshelling one type to another, something that typically requires a fair amount of boilerplate in statically typed languages, whereas in Ruby, Grooy et al you just do something like: complex_object.to_json

and you're done with it (assumes a valid object of course, which can be a rather large assumption on the dynamic side of the fence ;-)).

It's a total PITA in Scala to query your DBMS; marshall a tuple result to a collection of case class(es) and then have to go down boilerplate road again in order to create a a typesafe JSON result.

I basically render everything server-side and use JSON sparingly (e.g. AJAX responses). Until Scala pickling or other cutting edge lib allows me to convert an arbitrarily complex object graph from A to B without the boilerplate, I'll keep to the server-side and leave client-side templating...off to the side.

<comment><USER15> > Canonical example would be marshelling one type to another, something that > typically requires a fair amount of boilerplate in statically typed > languages, whereas in Ruby, Grooy et al you just do something like: > complex_object.to_json

The popular scala libraries only require one line of boilerplate per class for that, e.g. in spray-json I do jsonFormat3(MyClass) and then I can do myObject.toJson. With scala 2.11's implicit macros this will go down to 0 lines and work exactly like in ruby/groovy/etc.

(Whether the scala ecosystem will want it to be 0 lines or prefer to keep the 1 line as a "flag" for which objects should be convertible to json is an open question, but scala-the-language certainly supports doing it the 0-boilerplate way)

> It's a total PITA in Scala to query your DBMS; marshall a tuple result to a > collection of case class(es) and then have to go down boilerplate road again > in order to create a a typesafe JSON result.

Huh? Squeryl just gives me the results as my case classes (I have to define the schema _somewhere_ , but I have to do that with e.g. Django as well). I don't even need to do the json conversion explicitly - as long as it's the only serializer for that type in scope, spray will pick it up implicitly.

<comment><USER3> You're talking about simple 1-to-1 mappings where both db result and case class to json conversion are straightforward.

The example I gave was for objects of arbitrary complexity; it's a trivial operation in dynamic languages because there are no types (or 1 type if you like). In Scala, this is not (yet) the case, beyond a certain point you have to roll up your sleeves and do the marshelling yourself.

<comment><USER16> In Haskell, I can add a single line containing a macro to derive the JSON [de]serialization code.

Even when there's no simple 1-to-1 mappings. I don't see why you think unityping makes this serialization easier?

<comment><USER3> I have no idea whether or not the implementation is easier is dynamic languages or not. I do know that for the language user it's a simple foo.to_json, end of story.

If you can marshall objects of arbitrary complexity to JSON in Haskell with a single line of code that covers all possible cases (e.g. your entire database model), consider me beyond impressed.

<comment><USER16> It's (toJson foo) on the entire data, however complex, as long as there is a sane way to jsonify it. For example, if the data contains functions, there's no default way to convert it into json.

And also, deserialization is going to be more concise in Haskell because type inference decides which type to deserialize to.

<comment><USER3> That's pretty awesome, sounds ideal for a RESTful API. In Scala I've noticed a tendency toward using NoSQL storage engines like MongoDB, which speaks a form of native JSON (i.e. it removes the BP required to marshall to/from JSON).

A few months ago I took a stroll through available Haskell libraries for web dev., found Yesod, HaskellDB, and a couple of other glue items.

What's the state of the art on the web framework front in Haskell? Snap looks interesting but incomplete, and HaskellDB is fairly ancient (LINQ-to-SQL lib would probably get me very interested in Haskell sooner rather than later). Assume email, PDF generation and other web must-haves exist in Haskell ecosystem.

<comment><USER16> I do a lot of Haskell development, but virtually nil web development.

I know the Yesod ecosystem is well-developed and should have good solutions for most problems. I think the downside of Yesod is that it is not as principled/based-on-sound-theory as most of the Haskell ecosystem is, so it gets a lot of negative sentiment. But it solves a real problem now -- at least until a principled approach is proven.

Yesod also has "persistent", which can persist over SQL and IIUC, nosql DB's as well.

Snap is more minimalist, and solves a smaller part of the problem for you -- but is much simpler (and perhaps more elegant) than Yesod.

Happstack is another web framework, like Yesod (all 3 are under active development). Its main problem (perhaps this was fixed already) was prevalent use of "lazy I/O" which is very controversial. I personally despise lazy I/O and think it violates the basic principles that make Haskell great. I heard something about Happstack immigrating to an alternative to lazy I/O though.

Email is a solved problem in the Haskell ecosystem, as far as I can tell.

PDF libraries exist: [http://hackage.haskell.org/packages/#cat:PDF](http://hackage.haskell.org/packages/#cat:PDF) but I haven't used them, so I don't know how good they are.

I don't know about other must-haves. I know an automatic "admin webpage" didn't exist until recently even in the Yesod ecosystem. A friend who encountered this missing piece contributed one, but it was pretty barebones/preliminary. This was a couple years ago though.

<comment><USER3> Thanks for the overview, midway through Learn You a Haskell and it's clear I need to sit down and write some code as reading about Haskell is entirely different than reading about Java, Scala, etc. ;-)

In other words, a simple web project is in order. Snap looks like a good call, along with Yesod's Persistent. PDF, email, etc. can come later, just trying to explore the language.

Thanks again.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER15> It would be nice to have more substantive criticisms. While I dislike SBT[1], scalaz and spray are a large part of why I enjoy scala so much. While akka was so difficult to use that it almost soured me on the whole thing, and shapeless' monstrous compile times made it practically unusable. So don't think this post represents some kind of consensus.

[1] The notion of configuring your build tool in a full programming language is alluring but ultimately a bad idea IMO; builds should be simpler and more declarative than that.

<comment><USER17> I know that I'm in the vast minority, but I don't see what people find difficult about SBT. For the most part, it seems to keep itself out of the way. I would say I've found it only slightly more cumbersome than Rake, and a breath of fresh air when compared to the JVM alternatives (although I haven't had first-hand experience with Leiningen).

<comment><USER15> If used with discipline it's fine. But it ends up encouraging people to put complex logic in their build files. I prefer the rigidity of maven, where it's simply impossible to do e.g. conditional dependencies.

<comment><USER18> I can't understand that. Maven is the absolutely worst cluster fuck in terms of a build system I have ever seen.

I can't deal with Maven's position of "Oh, you want to have some tiny bit of intelligence in your build? Guess what, a) fuck you, b) write a crappy plugin for it." anymore after seeing that simple things can be indeed simple and straightforward with SBT.

</comment></comment></comment></comment><comment><USER19> I'm not a big fan of arguments based on "its the fault of other people's ineptitude."

<comment><USER14> What if it's true?

<comment><USER19> Everyone is inept to some extent or another. Systems (which includes language ecosystems) should be robust enough to correct for that.

</comment></comment></comment><comment><USER20> _" intellectual laziness of dynamically typed languages"_

Ouch. So if I choose to use python, ruby, javascript, lisp, - I am 'intellectually lazy'?

<comment><USER21> Yes, and this is a feature not a bug. As Larry Wall observed, three cardinal virtues of a good programmer are laziness, impatience and hubris. Laziness is important because I have more things on my to-do list than hours in my lifespan, and more things I need to know than neurons in my brain. I didn't choose Python only or even primarily because it's dynamically typed, but nonetheless, every thought I don't have to think about static types is a thought I can instead think about something I actually care about.

<comment><USER4> Odd that you cite Larry Wall given that he thinks haskell is one of the most important languages for any programmer to learn. I always find it weird that people try to use someone famous to support their opinion when that famous person disagrees. Perl lacks a type system because that was what made the most sense for perl. That doesn't mean it makes the most sense period.

>every thought I don't have to think about static types is a thought I can instead think about something I actually care about.

Static types do not add something to think about. You already have to think about what things are. Static types just let the compiler ensure that you didn't make any mistakes. Passing a user object into a function that wants a string isn't suddenly useful because there is no type system giving you an error.

<comment><USER5> > Perl lacks a type system because that was what made the most sense for perl.

Perl 5 that is. Perl 6 has a (gradual) type system.

</comment></comment></comment></comment><comment><USER22> Ultimately, every language is simply a tool and they all have their issues. I'll admit that I pegged Scala as "C++ for JVM" when it first came out, but am not a hard headed man.

Q to the op is what is the turn over of your dev team? Please provide a defense of Scala in terms of economics of development (from a business pov). Items to address are maintaining the codebase after the whiz kids have left for more exciting pastures.

<comment><USER18> Nurturing, retaining and hiring competent developers ... that's probably vastly simpler with Scala than with Java-enterprise-patterns-EJB2 stuff.

</comment></comment><comment><USER23> "The biggest issue with Scala's perception is the deeply varying quality of frameworks and tools that significantly affect one's perception of the Scala language itself"

I've seen the same thing said about Common Lisp.

</comment><comment><USER24> I know of two new businesses using Scala in Boulder. That's been enough to put it back on my radar.

<comment><USER25> Not sure if we're already on that list, but we use Scala heavily at Conspire and we're in Boulder.

<comment><USER24> Nope, but you are now. Thanks for speaking up!

</comment></comment></comment><comment><USER4> That's a pretty terrible defense of scala. Sounds more like a "I hate some random scala projects for made up reasons". How does scalaz have "colossal snobbism" exactly? Because it contains stuff you haven't learned?

<comment><USER3> Agreed, doesn't paint Scala in a good light despite claiming to defend it.

As for Scalaz elitism, the canonical example would be the T-hole himself, _ Morris (who has more or less been expelled from the main Scala user groups). I think the general POV the OP is trying to convey is that Scalaz is an incomprehensible cluster fuck of symbols to everyone but those in the know; in other words, the learning curve is steep and historically the response to beginner questions has been something along the lines of, "go read this paper" a la Haskell.

SBT suffers a similar problem but that's, IMO, more due to lack of IDE support for the project/ build than anything else (i.e. it's difficult to discover [for me] the library without being able to click through method calls and experientially explore the code [Scala docs only get me so far]).

In other news the last milestone of Scala 2.11 was just released; 2014 should be a good year for Scala on many fronts (faster compilations and improved IDE support particularly)

<comment><USER26> > historically the response to beginner questions has been something along the > lines of, "go read this paper" a la Haskell.

There's a lot of tutorials in Haskell that are papers, but if you go to #haskell or ask on stack overflow, the answer to questions are rarely "go read this paper", at least in my experience (even for some pretty deep type-level programming stuff).</comment></comment></comment>


This abuse of the Patriot Act must end - <AUTHOR> http://www.guardian.co.uk/commentisfree/2013/jun/09/abuse-patriot-act-must-end <comment><USER2> While much, if not all, of what he is saying here is good and true, Sensenbrenner is more part of the problem than part of the solution, and he's likely making a big deal here just because it makes his political enemies look bad.

Among other things, he has previously blocked Congressional debate on the PATRIOT act, including cutting off the microphones of other members of Congress.

</comment><comment><USER3> "Abuse"? I think it's working as designed.</comment>


Google Women's Accelerator - <AUTHOR> Are we happy about this? Is it throwing us a bone? What do guys think about this? Peronsally, I'll use its o my advantage but being called a "female founder" feels like a subset of success, like I want to be at the table because I deserve to be there <comment><USER2> Sure , anyone can be a woman

<comment><AUTHOR> Idk if that's actually true - physically yes, but that's not the only thing. Like if I have man parts does that make me a man? No.</comment></comment>


Apache SSL On Multiple Name-Based VHosts Using Server Name Indication (SNI) - <AUTHOR> http://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI

<comment><AUTHOR> Originally, SSL required using a separate i.p. address for every host that wanted to use SSL. The reason was because the security certificate wasn't sent until after the secure connection was made. That precluded choosing the certificate on hostname. [http://stackoverflow.com/questions/517336/apache- name-virtua...](http://stackoverflow.com/questions/517336/apache-name-virtual- host-with-ssl)

Apache HTTPD supports SNI since version 2.2.12.</comment>


Abbott Labs' IT Layoffs 'harsh and Insensitive' 10 Signs Layoffs Are Coming - <AUTHOR> http://www.computerworld.com/article/3039353/it-careers/sen-durbin-calls-abbott-labs-it-layoffs-harsh-and-insensitive.html <comment><USER2> Once again, Computerworld hyping the h1b/foreign worker threat, just as they and Wired have done since the 90s.

I was once replaced by cheaper software developers in Asia. It was painful but it happens. But I have a hard time sympathizing for workers in the tech industry. It's one one of precious few equalizers in our society. Just as in 1998 (and maybe before), you can work your way up the chain without a college education--if you have the determination and curiosity.

I guess like their typical Windows-praising and Mac-bashing pieces, it's a reliable formula for Computerworld's reader base. But protectionist policies aren't productive. Emphasizing the need to adapt and add value are a better message.</comment>


Researchers Find that Parasitic Flies are Turning Bees Into Zombies - <AUTHOR> http://inhabitat.com/researchers-find-that-parasitic-flies-are-turning-bees-into-zombies/ <comment><USER2> There are all kinds of theories on how a Zombie apocalypse could actually happen. From parasites to neuro-toxins. The most far out there I've read about is Neurogenesis. A condition where stem cells re-grow brain tissue. Probable? No Possible? Apparently</comment>


MongoMem: Memory usage by collection in MongoDB - <AUTHOR> http://eng.wish.com/mongomem-memory-usage-by-collection-in-mongodb/

<comment><USER2> Mongo's internal storage mechanisms are a mess. BSON is incredibly inefficient as a storage format (for instance, it stores arrays as string -> string maps with a literal index, ie ["1" "first element" "2" "second element"]), it relies on mmap / fsync for read / write scheduling (see [1] for some issues specifically with regards to database usage), and its "linked list of documents" approach means that any appreciable number of removals or updates badly fragments your storage space. Oh, and key names aren't interned, so better use the first N unicode characters rather than sensible names if you need to fit everything into the page cache (and due to the lack of caching algorithms beyond the OS's LRU-by-page, you definitely need to fit everything into the page cache). "Everything" really means "both data _and indexes_ " since the OS doesn't know the difference between your index & data - it will quite happily evict index entries from cache in favor of a data scan.

[1] [http://rhaas.blogspot.co.uk/2014/03/linuxs-fsync-woes-are- ge...](http://rhaas.blogspot.co.uk/2014/03/linuxs-fsync-woes-are-getting- some.html)

<comment><USER3> TokuMX solves most of the issues you describe without compromising on the query language or other great mongo features. If you are interested in mongo but concerned about these issues, I highly recommend TokuMX.

</comment></comment><comment><USER4> I'm so going to use it. Thanks for open sourcing it!

<comment><USER5> No problem! It's been pretty helpful for us. Results can be surprising sometimes.</comment></comment>


Failure to find sexual partner is now a disability, says WHO - <AUTHOR> http://www.express.co.uk/news/uk/723323/Sexual-partner-fertility-disability-World-Health-Organisation-IVF <comment><USER2> That headline is rather misleading. The key quote is:

"Under the new rules, heterosexual single men and women and gay men and women who want to have children will now be given the same priority as a couple seeking IVF because of medical fertility problems. "

I am quite happy that the WHO is taking that stance to support the human rights of non heterosexual couples.

I feel like the people who are jumping all over the use of the term 'disability' are doing so disingenuously rather than standing up and saying that they believe heterosexual couples are inherently more worthy of having children.

<comment><USER3> How can men undergo IFV?

<comment><USER4> their sperm can be non-viable and it may be treatable I assume

<comment><USER3> Ok how can single men go through IFV?

<comment><USER5> I would guess "with a surrogate".

<comment><USER6> I would guess with an hourly charge.

<comment><USER5> If I take your meaning, that sort of leaves off the IV bit of IVF...

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> Is there a primary source for this? Which part of the WHO said what, when, and to whom? Right now, even the supposedly-official stuff isn't even clearly marked in quotation marks. Maybe the WHO is doing something boneheaded, but right now the biggest offenders are the writer/publisher of this article.

<comment><USER8> I would agree. Reading it felt like a mush of useless quotes and no real substance. All I can find are articles citing this one and when I search WHO, I only get articles about infertility and disabilities, not anything suggesting not finding a partner is the same as infertility.

</comment></comment><comment><USER9> I'd like to present a hypothesis related to this topic.

We're evolution-wise ready to mate at puberty (11-14 y.o), and that's probably the age when pre-civilization humans were sexually active.

That's been pushed much father today.. and it probably varies from say an average age of 16 to 25 when people are active (varies from culture to culture). Most cultures also look down upon pre-marital sex, and anyone who wishes to give in to the evolutionary signals to have sex earlier is probably following a path frowned upon by most societies.

So my hypothesis is that our current-milieu is at odds with our biology, and (possibly) a source of a lot of issues in the world. Sex is at the core of being human, and when you have religions and cultures frowning down upon all but certain white-listed methods of going about it, at an age much past the biological starting point, we're sowing seeds that can affect the species' longevity.

Thoughts?

</comment><comment><USER10> So the asshole who can't find a date can now also legally park in the disabled parking spot...

<comment><USER11> WHO isn't applying the definition of disability that exists in US federal law or state motor vehicle codes (much less doing so with any binding authority), so, basically, no, not at all.

</comment></comment><comment><USER12> Everything can't be a disability. Would not having a defined disability be a disability? If I can't find a date does that mean someone owes me something? What a an odd world we live in.</comment>


My weekend project: What can you really do in a weekend? - <AUTHOR> http://www.romku.com/blog/2011/07/my-weekend-project-what-can-you-really-do-in-a-weekend

<comment><USER3> "It may have taken just the weekend to build the project but it doesn't include all the initial learning."

By that logic, everything takes a lifetime. That's not a useful metric.

No, those weekend projects really did take a weekend. They started without the project before the weekend, and they had the project after the weekend. That's a weekend project.

<comment><USER4> I always assumed a weekend project was just something you worked on in your free time, typically, your weekend.

So imho, weekend projects are not necessarily wrapped up in a 2 day stint.

<comment> misuse-permit Here I was thinking that a weekend project meant no more than 2 days of work. I hope the majority holds your opinion, or the people on HN really are 100 times more efficient than me.

<comment><USER5> Yeah, I'll second that. I was pretty intimidated knowing that people on HN are so much more efficient than me. That in turn motivated me, so I'm kind of disappointed that these didn't actually take 2 days of work. Still, some weekend projects are pretty motivating regardless of how long they took.

</comment></comment></comment></comment><comment> wes-exp Not only do I not care if a project was completed in a weekend...

I don't care if a project came to someone in a dream and they wrote the code onto their bathroom mirror with their left hand, while shaving with their right hand.

I share some of the author's sentiment, but let me be clear: I'm sure some of these projects actually are finished in a weekend or less. But my view is that I don't care about that. Let's focus on the value of a project itself. How long it takes could be useful information for the purpose of critique, but doesn't need to be a central feature like "wow, you're coder superman".

</comment><comment><USER6> People who are serial entrepreneurs or just people who like building things, get good at building things (quickly).

We learn to use the right tools for the job, we use new light weight technologies and we build our own frameworks and scaffolding to allow us to build things quickly.

We make the mistakes that take up all our time on previous projects and avoid them on the new ones we do.

We have a plan of action right from the start and know what we're going to be doing each step of the way.

The first time you learn something, whether it's programming, building something for the web or even just trying to use a certain API - it will take a lot more time than the future iterations. However, it's this process that will allow you to get more efficient in the long run.

A weekend truly dedicated to building something in one sprint can be far more productive than weeks or months of trying to fit in occasional hours of work in our spare time. Don't forget also, that a dedicated weekend (inc Friday evening) could be a total of 54 hours (if you don't sleep), as a comparison a bootstrapped project may only have a few hours a week available - <USER2> the same objective will take months to complete.

</comment><comment><USER7> I'm not sure what the point of this post is. Is it to call people on bullshit? I mean yeah, a lot of people are full of shit about their accomplishments, and that tendency is only encouraged by the internet. But complaining that the time spent learning the tools is not included just sounds whiny. I fail to see the benefit of posting something like this.

</comment><comment><USER8> I'd say HN is primarily read by people who already understand that it takes a while to learn these things, so it basically IS a weekend project.

If a non-technical person came along and saw it they may need clarification that no, you probably couldn't do it as well. But for most purposes it's understood that the person has been programming for longer than the weekend itself.

Also, as nickbw said it also gives an idea of the seriousness of the project rather than anything literal. A "weekend project" or so would (to me) mean something that may not last forever, but it was fun and different to try out.

</comment><comment><USER9> I built <http://wwww.casePop.com> and <http://www.seedcrafting.com> in a single evening (each), but they will never truly be finished as I'm constantly wanting to add more things. But a basic, usable project was done in about 12 hours.

</comment><comment><USER10> In general, 'weekend projects' might just something that you work on in your spare time (ie. weekends) but then again we do have things like <http://nodeknockout.com/> and <http://railsrumble.com/>

</comment><comment><USER11> I usually spend more time thinking about an idea than actually coding it.

"It may have taken just the weekend to build the project but it doesn't include all the initial learning." - ... and all the code snippets/classes that you have done in previous projects and might just use them again.

</comment><comment><USER12> I guess "My Freetime Project" would be more accurate but probably wouldn't get much votes.

Still there's a lot people can do in a weekend, more so as a team. Startup Weekend (Foodspotting is alumni) and Rails Rumble come to mind.

Ycombinator Weekend Audition anyone?

</comment><comment><USER13> Just tried to click on the link and it wouldn't load. Anyone else have this issue?

<comment><USER14> Article text:

Several headlines on HackerNews (HN) have caught my attention recently regarding weekend project. Here're some examples:

* My weekend project: MongoDB implementation in Ruby

* Show HN: my weekend project, Imagestash - a bookmarklet+ for image collectors

* Show HN: My 15 minute project: PimpMySalary.com

The last one is what made me write this post. Can you really build a website in 15 minutes? The purpose of the projects mentioned is not of importance and I am not trying to criticise the work accomplished. What I am curious about is did it really take 15 minutes or even a weekend to create these projects?

It takes months or years to learn programming language, databases, networking... Frameworks, apis, and modern programming language makes it easy to develop but you still need to learn about them. It may have taken just the weekend to build the project but it doesn't include all the initial learning. That is my problem. It makes it sound so easy to develop an app or a website when actually it requires a lot of effort.

Also ideas need to mature and it may take several days or weeks before implementing the idea. Chatting with friends, searching for similar implementations, finding and registering the domain name takes time.

I have been working for months now on my project and as I record the hours spent, I know it is more than 500 hours and the website is far from complete.

Can we be honest with the time we spent on our weekend project and simply call it "My project"?</comment></comment>


"Dark" Personalities Are More Likely to Signal Victimhood - <AUTHOR> https://www.psychologytoday.com/us/blog/after-service/202008/dark-personalities-are-more-likely-signal-victimhood <comment><USER2> After having unrestricted access to bulletin board systems and the internet since being 10 years old, I have to say with some disappointment that if the dark triad personality type is on the rise, it has to be related to what is now unrestricted free internet for everyone.

The current version of the internet having been commercialized and available everywhere creates a sort of machine learning feed back loop for narcissism just like it does with fake news.

We all became the evil queen from Snow White in varying forms. Except the mirror evolved and became halfway sentient and began controlling us.

If you look at the DSM-5 example of Narcissistic Personality Disorder (NPD) it describes the behaviors and outcomes that we have seen with increased social media addiction.

So the theory is that the internet is a dangerous addiction like any other, far more than people want to admit... Certainly more than the people who helped create it want to admit. All you have to do is look around society to see the impact.

<comment><USER3> I definitely see that but could not write this so elegantly. There's forum trolls that comment everywhere to show their mark online. The girls I've dated are different. I don't like most of them anymore because of the things you pointed out. It wasn't that way even a few years ago. Screen addiction is my problem. It's essentially a neon sign you change at your whim to do anything and color really changed perspective. I disabled colors on my devices to attempt to better work.

</comment></comment><comment><USER4> I have a question regarding dark personalities as they are called.

Now it seems clear to me that dark personalities are a problem. My question is, aren't these personalities evolutionary adaptations? And if they're evolutionary adaptations isn't the bigger problem the fact that the environment rewards them? I'm seeing a lot of people bordering on sociopathy who are highly successful.

Why focus on the individual instead of the environment that rewards him

<comment><USER5> Here's a handy tip you won't find often on HN: any time you're wondering whether X is "an evolutionary adaptation", where X is "any complex phenotype that isn't a genetic disease", the answer is very probably _no_. Most of our evolution is accidental, because the dominant evolutionary process is genetic drift [0]. There are exceptions to this rule but they have been usually very easy to demonstrate - natural selection, when it occurs, is fairly obvious to see. There's no such thing as a hidden force that invisibly yet tangibly acts on all genes in such a subtle manner that you can't ever detect it through a reliable genetic mechanism - that's just 21th century essentialism.

[0] [https://sandwalk.blogspot.com/2019/08/evolution-by- accident....](https://sandwalk.blogspot.com/2019/08/evolution-by- accident.html)

<comment><USER3> Just because evolution is accidental doesn't mean there's no structure behind it (emergent intelligence). Because in this environment they are successful it means there is random genetic changes that give these same traits.

How does this explain different phenotypes in grouped populations? Let's say for instance that a species of ant is known to be more aggressive, why it was that way is probably generic drift. Why it stays that way is because of its environment, and it is selected for.

He asked why the environment is like that they rewards this behavior, some serial killers get screwed up in childhood. Did they all have dark personalities before?

<comment><USER5> >How does this explain different phenotypes in grouped populations?

Random fixation and/or founder effect, among a myriad of effects that don't involve natural selection.

>Let's say for instance that a species of ant is known to be more aggressive, why it was that way is probably generic drift. Why it stays that way is because of its environment, and it is selected for.

Or the different alleles for aggressiveness (whatever that means, and assuming they exist) got fixed due to drift? Who knows. The burden of proof is on the adaptationist to show that something other than contingency happened.

<comment><USER3> Why is the founder effect not a part of natural selection? If one population lives and becomes specialized in a way of life is it not natural selection? All mammals come from a common ancestor and genetic drift occured or the founder effect over a long period of time. There are cave fish that are blind but bred with non blind types gives their offspring eyes back. What is the difference between founder effect, and natural selection? Are they not part of the same force?

</comment></comment></comment></comment></comment><comment><USER6> This is an interesting topic, but Psychology Today is a poor quality source for serious discussion.

<comment><AUTHOR> The study is linked in the article if you don't trust them.

<comment><USER6> It is not that I do not trust Psychology Today, but that psychology is a messy subject. The articles in Psychology Today can perhaps give some insight into what is being studied in the field, but omits a vast number of details and nuances that are necessary to interpret study results.

Reliability and validity are notoriously hard to pin down in psychology, and there is no stable model of mind or personality that all people share. In practically every study of psychology, one must critically consider not only the reliability and validity of each and every operational definition, but also be highly skeptical of every measurement and also of the statistical techniques applied to those measurements. We know so much about the physical science compared to so little about psychology because people are "messy" and unique.

Every person has intimate experience with their own mind, and therefore many people consider psychology to be accessible. Unfortunately, this is not true. People do a very poor job of understanding the true nature of themselves, especially with regards to how their minds operate. The hazard with pop psychology is that it encourages people to make judgements on others -- judgements that are not necessarily warranted -- and sometimes leads people to take actions that are not in their or others' best interests.

As an example in the Psychology Today article, the author wrote, "In their recently published paper, Signaling Virtuous Victimhood as Indicators of Dark Triad Personalities, the authors suggest that Machiavellianism, narcissism, and psychopathy might be beneficial for obtaining resources." While Ok et al. collected interesting data, performed some interesting analyses, and generally contributed to the scholarly dialog on dark triad personality traits, I would not characterize the paper as "being a nasty person is good for getting resources." Such a statement completely ignores how dark triad personality traits can also contribute to poor outcomes in life.

Even worse, the original paper did not address anything at all about risk analysis for donating to people requesting resources. Yet, the Psychology Today article concludes with "Today, those with dark triad traits might find that the best way to extract rewards is by making a public spectacle of their victimhood and virtue." Is that advice for dark triad people? Is that a warning for altruistic people? Is is a statement about the Internet? Is it a recommendation against donating to people who claim to urgently need help? My point is that the Psychology Today article took a messy subject, left it messy, and suggests the reader walks away more knowledgable.

With the hard sciences it is much easier to home in on the differences between academic papers and what the popular press writes about them. For the soft sciences, it is much more important be critical of the topic of discussion.</comment></comment></comment>