Less Wrong is a community blog devoted to refining the art of human rationality. Please visit our About page for more information.

Comment author: 18239018038528017428 27 May 2017 12:48:06AM 0 points [-]

Oh, I see. You're what the Eternal September phenomenon is all about. You shouldn't feel ashamed that you aren't cognitively gifted enough to quickly and rapidly comprehend the salient points I made without substantial expenditure of mental effort, because you were born this way, which also accounts for your overestimation of the amount of time it took for me to write my comments. But please don't pollute the comment space under my comments with your puerile excretions.

Comment author: cata 28 May 2017 07:09:21AM 0 points [-]

Perhaps your excessive cognition is ironically blinding you to the grandiose mediocrity of your overwrought replies, such as this one here, which sounds like something I would have written in third grade if I wasn't already too smart to have written it then, which, as a truly capable mind might have already conceived, I was.

Comment author: Alicorn 17 March 2017 01:46:56AM 21 points [-]

If you like this idea but have nothing much to say please comment under this comment so there can be a record of interested parties.

Comment author: cata 19 March 2017 04:33:50AM 2 points [-]

I am really interested in this and would be likely to want to move into such a place if it existed anywhere in the Bay Area in the next few years.

Comment author: cata 10 August 2016 04:40:12AM 2 points [-]

Pertinent to your questions, check out /r/battlestations.

Comment author: Viliam_Bur 15 January 2015 10:21:17AM *  2 points [-]

I don't know Java books, but I would like to react to this part anyway:

Most Java programmers seem to basically not believe in many of the ways I have learned to write good software (e.g. be precise and concise, carefully encapsulate state, make small reusable modular parts which are usually pure functions, REPL-driven development, etc. etc.) or they apply them in ways that seem unfortunate to me.

There are much more bad programmers than good programmers, so any language that is sufficiently widely used is necessarily a language mostly used by bad programmers. (Also, if the programming language is Turing-complete, it also means that you can reinvent any historical bad programming practices in that language.) On the other hand, there are often genuine mistakes in the language design, or in the standard libraries. So here is my opinion on which is which in Java:

precise and concise -- sorry, no can do. Using proper formatting, merely declaring a read-only integer property of a class will cost you five lines not including whitespace (1 line declaration, 1 line assignment in constructor, 3 lines read accessor). (EDIT: Removed an obsolete info.)

carefully encapsulate state -- that's what the "private" and "public" keywords are for. I don't quite understand what could be the problem here (other than bad programmers not using these keywords; or the verbosity).

make small reusable modular parts which are usually pure functions -- this is not how Java is typically used, but it can be done. It has the garbage collector. It has immutable types; and for the mutable ones, you could create an immutable wrapper class (yes, a lot of writing again). So you can write a module that gets immutable values as inputs, returns them as outputs, which is more or less what you want. The only problem is that "immutability" is not recognized by the language; you only know that a class is immutable by reading the documentation or looking at the source code; you cannot have the compiler check it for you.

REPL-driven development -- it could be technically possible to make an interactive functional shell, and maybe someone already did it. But that's definitely not how Java is typically used. A slightly more traditional solution, although not exactly what you want, would be to use the Groovy language for the interactive shell. (Groovy is more or less a "scripting Java". Very similar to Java, with minor differences; can directly call functions from the Java program it is included in.) The traditional solution is to do unit testing with JUnit.

As a beginner, avoid Java EE like hell. That is the really ugly part. Stay with Java SE until the Stockholm syndrome kicks in and you develop feelings for Java, or until you decide you do not want to go this way.

Feel free to give me a short example in other programming language or pseudocode, and I will try to write it in Java in a functional-ish style.

Comment author: cata 15 January 2015 07:37:58PM *  0 points [-]

I might try Groovy for the REPL stuff -- I was trying Clojure before, but I ran into problems getting it to get the dependencies and stuff all into the REPL (I work on a big project that uses Gradle as a build system, and Clojure doesn't usually use Gradle.)

carefully encapsulate state -- that's what the "private" and "public" keywords are for. I don't quite understand what could be the problem here (other than bad programmers not using these keywords; or the verbosity).

One pattern I have in mind here: if I have some algorithm I have to perform that has some intermediate state, I will break it down into some functions, pass the state around from function to function as necessary, and wind up composing five or six functions to get from the start to the end. Java programmers seem to often instead do something like make a class with the five or six functions as methods, and then set all the state as fields on the class, which the methods then initialize, mutate, and consume, and call the methods in the right order to get from the start to the end. That seems a lot harder for me to read because unless there is also great documentation I have to read very closely to understand the contract of each individual method.

(I'm also incidentally confused about when in Java people like to use a dependency injection tool like Guice and when people like to pass dependencies explicitly. I don't think I understand the motivation for the tool yet.)

Comment author: cata 15 January 2015 04:50:33AM *  4 points [-]

I'm a programmer with a fair amount of reasonably diverse experience, e.g. C, C#, F#, Python, Racket, Clojure and I'm just now trying to learn how to write good Java. I think I understand most of the language, but I don't understand how to like it yet. Most Java programmers seem to basically not believe in many of the ways I have learned to write good software (e.g. be precise and concise, carefully encapsulate state, make small reusable modular parts which are usually pure functions, REPL-driven development, etc. etc.) or they apply them in ways that seem unfortunate to me. However, I feel foolish jumping to the popular conclusion that they are bad and wrong.

I would really like a book -- or heck, just a blog post -- which is like "Java for Functional Programmers" that bridges the gap for me and talks about how idiomatic Java differs from the style I normally consider good and readable and credibly steelmans the Java way. Most of my coworkers either don't like the Java style, only know the Java style, or just don't care very much about this kind of aesthetic stuff, so none of them have been very good at explaining to me how to think about it.

Does this book exist?

Comment author: Liron 13 January 2015 10:56:38PM 2 points [-]

What's the point of dollar cost averaging? Why not just pick a % of your asset allocation that you want in Bitcoin and rebalance from 0% up to that ASAP? I see this as a special case of the virtue of rebalancing as often as possible.

Comment author: cata 14 January 2015 04:08:55AM *  1 point [-]

It's just a hedge for if you're risk-averse or if you're worried that market fluctuations will negatively influence your behavior about when to rebalance or invest. Here's a Vanguard study comparing the two historically if you're curious.

Comment author: cata 13 January 2015 09:38:35PM *  4 points [-]

People have often compared Bitcoin to making a bet in which you have a 50% chance of losing everything, and a 50% chance of making multiples (far more than 2x) of what you started with.

There are times when the payout on that bet is much lower, when everyone is euphoric and has been convinced by the positive feedback loop that they will win. And there are times when the payout on that bet is much higher, when everyone else is extremely fearful and is convinced it will not pay off.

A good way to think about how much money to invest in these kind of bets if you think you have logarithmic utility with respect to money is the Kelly criterion.

In response to Rational Healthcare
Comment author: cata 06 January 2015 07:33:09AM *  4 points [-]

You gotta put more interesting information in if you want anyone to take this seriously as more than an advertisement. Things that you could discuss to make me more curious and likely to click your link:

  • Why doesn't this already exist?
  • If this works out well for the participants, why don't employees of companies organize like this instead of going through an insurance provider?
  • I often hear that health care costs are drastically inflated for non-insured customers. Is that true? How does this model deal with that? Can the groups negotiate with care providers to bring costs down?
Comment author: cata 15 September 2014 05:10:03AM *  6 points [-]

You mentioned at your talk that you were leveraged well past 100% of your net worth in equities. Can you elaborate on how you came to make that decision? As far as I can see, the only source of money at a reasonable rate that I can easily invest is margin, and that comes with both a 1.5-2% interest rate and the risk of margin calls, which makes me nervous. (In addition, I'm not so confident that I would be psychologically capable of making good decisions if such a really huge volatility happens to me.)

What's your thought process about that like?

Comment author: buybuydandavis 20 July 2014 12:52:19AM 15 points [-]

So the lesson I'm taking away from that one is to beware of trivial inconveniences.

I thought the lesson was look for trivial inconveniences as indicative of potential opportunities.

Comment author: cata 20 July 2014 01:29:08AM 4 points [-]

Sure, you can look at it that way. From my perspective, I think the lower-hanging fruit is to make sure that when I have a good idea and I don't do it because of a trivial inconvenience, I notice and do it anyway.

View more: Next