840 karma · joined Nov 15, 2011 (15y ago) · 364 submissions
comment 7y ago · link · parent
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'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
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
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
comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
// ==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
comment 8y ago · link · parent
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
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