Better HN
topnewbestaskshowjobs
Log inSign up

insertnickname

840 karma · joined Nov 15, 2011 (15y ago) · 364 submissions

Submissions

comment 7y ago · link · parent

I've been using Kotlin lately, and while I do enjoy it, I'm not sure that it actually makes me more productive compared to Java. I haven't yet used coroutines, but if anything in Kotlin is a killer feature, I suspect coroutines are it. The lack of a decent way to write concurrent/async programs lead Java programmers to use over-complicated solutions like Rx.

Rx is cool and definitely a good solution for some cases, but if what you really want is just to talk to your database without blocking the thread, then it's way overkill. Just give me async/await like C#.

I'm a bit concerned about Kotlin code tending towards being overly concise and clever, especially with the IntelliJ refactoring suggestions that constantly pop up to entice me to make my code a few characters shorter. Of course, "my IDE told me to do it" is no excuse, it's my responsibility to write clear code.

One of the things I like about Go is the tendency to write straight forward code that reads easily from top to bottom. Java has a bit of this tendency too (if you forego the kind of all too common libraries that require you to instantiate 14 objects to do even the simplest things). Java has already become much less noisy with type inference for local variables.

Java code doesn't have to look like this, Java programmers are doing it to themselves:

    HttpURLConnection httpConnection = (HttpURLConnection) new URL(url).openConnection();
    httpConnection.setRequestMethod("POST");

comment 7y ago · link · parent

I use fzf [0] with zsh. I frequently use the Ctrl-T and Ctrl-R commands for finding files and searching history, respectively. Ctrl-R without fzf is great too, but with fzf you can see more of the history than just the currently selected entry. I hardly do `history | grep` anymore.

I've also been using trash-cli [1] for years with `rm` aliased to `trash-put`. It's saved me a handful of times when I've carelessly `rm`d something I shouldn't have.

[0] https://github.com/junegunn/fzf

[1] https://github.com/andreafrancia/trash-cli - Command Line Interface to FreeDesktop.org Trash.

comment 7y ago · link · parent

Yes, cryptocurrency is clearly to blame for kidnappings. It's not like we ever had kidnappings before Bitcoin.

comment 7y ago · link · parent

See https://www.lewrockwell.com/2011/10/hans-hermann-hoppe/why-i...

comment 7y ago · link · parent

1. Methylphenidate (Ritalin) is not "meth", that's methamphetamine.

2. I'm not judging people who use any of these drugs, whatever their purpose. If it were up to me, all drug laws would be repealed and the state would have no say about what anyone is allowed to put in their own bodies. I'm only pointing out that there are stark differences between caffine and drugs like amphetamine, methylphenidate, and, yes, even modafinil, and lumping them all together as "stimulants" isn't useful to this discussion. (If modafinil is no better than caffeine, why does anyone bother going through the hassle and expense of obtaining it when caffeine is dirt-cheap and easily accessible?)

This discussion is not about villifying drugs or people who use them, it's about the unreasonable, inhumane workload that medical students are expected to handle. If 75 % of medical students feel the need for and take steps to obtain prescription drugs, whether illegally or by getting a prescription, then there is clearly something wrong with medical school. If 75 % of medical students drink coffee or other caffinated beverages, that is not a cause for concern (for me, at least).

comment 7y ago · link · parent

Prescription stimulants like amphetamine and methylphenidate are more potent than caffeine.

What if the headline had said "75 % of med students are on drugs" but actually it just means that 75 % of med students occasionally take acetaminophen or aspirin for headaches? Those are indeed drugs, but wouldn't you feel misled? People drinking coffee is not newsworthy, so one wouldn't expect an article about it. I haven't looked at the data the article is based on, so I don't know if something like this is what's going on, but I think this is the point village-idiot was trying to make.

comment 7y ago · link · parent

https://github.com/Microsoft/language-server-protocol/wiki/P...

comment 7y ago · link · parent

Erich Gamma works at Microsoft.

comment 7y ago · link · parent

Relevant blog post in defense of generalists: "Jack of all trades, Master of One" https://8thlight.com/blog/makis-otman/2018/10/30/master-of-o...

comment 7y ago · link · parent

Are you talking about LXC or LXD? I don't think LXD existed six years ago.

comment 8y ago · link · parent

You said it, at least it's the only source you referred to.

comment 8y ago · link · parent

How do you get "often problematic" from one person's experience? People have different reactions to drugs, and "ADHD drugs" isn't even one particular drug or kind of drug, although stimulants are the most widely used kind of drug for treating ADHD.

comment 8y ago · link · parent

That's not quite true. For instance, the error value returned from `fmt.Printf`[0] is usually ignored silently.

[0] https://godoc.org/fmt#Printf

comment 8y ago · link · parent

I still do that. I plug in my MP3 player with USB, download the audio files I want to listen to, and then copy them to the MP3 player's file system. I don't see the problem.

comment 8y ago · link · parent

You probably mean 5000 IU, which is equivalent to 125 micrograms (of vitamin D).

comment 8y ago · link · parent

https://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost/2...

comment 8y ago · link · parent

Gentoo's portage package manager is written in Python.

https://github.com/gentoo/portage/

comment 8y ago · link · parent

https://github.com/libuv/libuv/wiki/Projects-that-use-libuv

comment 8y ago · link · parent

There's my userscript that I posted in another comment, but it's not as featureful. It just makes certain usernames specified in a static array bold. https://news.ycombinator.com/item?id=17717736

comment 8y ago · link · parent

It's always fun to read a great comment and only then notice that it was Walter Bright who wrote it (and it often is).

comment 8y ago · link · parent

I currently have nine usernames in the array (removed all except Walter from the comment for brevity and privacy), but it's still a pretty small `n`. I don't know at what `n` the set becomes faster than the array, but I haven't noticed any performance impact from the script, and I can't be bothered even googling how to profile it in the browser.

comment 8y ago · link · parent

Funny, I just made something like this today (but more primitive), mostly so that I won't miss Walter Bright's comments.

    // ==UserScript==
    // @name     Hacker News VIP highlighter
    // @version  1
    // @grant    none
    // @match    https://news.ycombinator.com/*
    // ==/UserScript==

    function highlightVIPs() {
      'use strict';

      const VIPs = [
        "WalterBright"
      ];

      const userTags = Array.from(document.getElementsByClassName("hnuser"));

      userTags.forEach(tag => {
        const username = tag.href.split("=")[1];
        if (VIPs.includes(username)) {
          tag.style.fontWeight = 'bold';
        }
      });
    }

    highlightVIPs();

(I'm not much of a JavaScript programmer, but it seems to work.)

comment 8y ago · link · parent

As much as I love IRC, this argument seems to me to not be that different from the "just use rsync/ftp" Dropbox argument. There is this IRCv3 extension proposal, though: https://github.com/ircv3/ircv3-specifications/pull/292

comment 8y ago · link · parent

But Uncle Bob presents the SOLID principles like hard rules, which rubbed me the wrong way. In fact, I'm pretty sure a system that never violated the SOLID principles would be a giant mess.

In his Clean Coders videos, he says that you shouldn't try to apply all the SOLID principles all the time. Perhaps he should have made that clearer in the book.

Not enough examples

I very much agree with this.

comment 8y ago · link · parent

What's so important about progressing version numbers for commits?

comment 8y ago · link · parent

A job description that uses the phrase "We're looking for someone to manage a team" may seem innocuous enough.

But research has shown that the word "manage" encourages more men than women to apply for the role.

Changing the word to "develop" would make it more female-friendly, says Kieran Snyder

So all you have to do to attract more women to a job is to lie about what the job entails? Maybe jobs for managers put off women because they don't want to be managers.

comment 8y ago · link · parent

People would be free to make use of the creative expressions of others, yes, but it would be more like MIT/BSD than GPL. All else equal, anyone would be free to make a modified Linux and publish the compiled binary without being required to publish the source code. What you describe would require not only abolition of copyright law but also a new copyleft law.
12345
13