HNHacker News
TopNewBestAskShowJobs

rdfi

319 karma · joined November 28, 2012

submissionscomments
rdfi··on Uv is the best thing to happen to the Python ecosystem in a decade
For not having to call 'source ...' in a Dockerfile, if you use the python executable from the virtualenv directly, then it will be as if you've activated that virtualenv.

This works because of the relative path to the pyenv.cfg file.

rdfi··on Tell HN: I was permanently banned from eBay in one hour
I wonder if you can, under GDPR, request that all your data is deleted and then create a new account. Not allowing you to create a new account could be argued as a violation of GDPR as it would mean that they kept personally identifiable data about you.
rdfi··on ImageMagick: CLI for Image Editing
Is there an easy way to get that list for a package?
rdfi··on Linux Mint drops Ubuntu Snap packages
The Ubuntu podcast has a very recent episode about this: https://ubuntupodcast.org/2020/06/25/s13e14-ace-of-spades/

The conversation around snaps starts at 5:20.

It sounded to me that they genuinely tried to put themselves in both side's shoes.

rdfi··on Autobiographical memory is typically biased toward positive events
Autobiographic memory and an autobiography are two different things
rdfi··on Spaced Repetition
Been using space repetition since 2013. It's unbelievably useful. Wrote about it in my blog with examples: https://www.blinkingcaret.com/2016/05/04/hack-your-brain-lea...
rdfi··on Show HN: ElectronCGI – Cross Platform .Net Core GUIs with Electron
Currently the only implementation available is for .Net through the ElectronCgi.DotNet nuget package, but there's no reason for this not to work with other languages/runtimes (it relies on stdin/stdout that is available in all processes).

Did you have a particular language/runtime in mind?

rdfi··on Is ASP.NET Core Now a Mature Platform?
I've been using nginx as a reverse proxy to kestrel in Linux. Has been working great for me
rdfi··on Ask HN: Cheap places to live with a good intellectual atmosphere?
I think what you are referring to is the golden visa program (or Resident Permit for Investment program): https://www.expatica.com/pt/visas-and-permits/golden-visa-po...
rdfi··on Anki: Memorization with Spaced Learning
I've been using Anki since 2013 (almost 5 years). One really nice thing about Anki is that it has analytics. I currently have 4532 cards and my numbers are 99.18% correct answers for "Learning" (very young) cards, 98.44% for Young cards and 92.52% for Mature cards. No way I would be able to remember over 4000 pieces of information without spaced repetition. I truly believe this is the best learning "hack" there is. I've wrote about my experience here: https://www.blinkingcaret.com/2016/05/04/hack-your-brain-lea...
rdfi··on To Remember Everything You Learn, Surrender to This Algorithm (2008)
I've been doing spaced repetition with Anki since 2013. I wrote about my experience here: https://www.blinkingcaret.com/2016/05/04/hack-your-brain-lea...

If I could only give one advice to someone about improving their learning skills, it would be to learn about spaced repetition

rdfi··on Ask HN: How can I stop forgetting “things”?
Healthy lifestyle will do wonders for your memory. Try to keep your stress levels down, eat right and sleep well. Memory can be trained too. Look up Dominic O'Brien or Tony Buzan. Their books are a bit sensationalist, but the techniques work, e.g. you'll quickly be able to memorize a full deck of cards. Don't know if that kind of training will improve all aspects of memory, but it certainly won't hurt
rdfi··on How Academia Resembles a Drug Gang (2013)
One thing that should also be emphasized is that there is a great number of PhD candidates that never actually finish, in some universities that number is more than half. Many of these, before quitting, teach to help pay tuition and do all sorts of tasks for their department/supervisor that are not related or help them finish their PhD.
rdfi··on Boolean parameters to API functions considered harmful (2011)
Instead of booleans or enums why not have different methods for each value of the bool/enum, e.g.: openAsync(...), open(...)
rdfi··on Show HN: Lectito, a speed reader for Windows Phone
Link: http://www.windowsphone.com/en-us/store/app/lectito/c4f00daf...
rdfi··on Portugal's growing number of young entrepreneurs
If it's in the first page (and it got to number 2) it definitely has a lot of traffic. Also, the article that is linked is in English
rdfi··on Portugal's growing number of young entrepreneurs
Rough translation: He doesn't understand why those people don't leave the country and go to England or Germany.
rdfi··on Microsoft announces the Surface Pro 3
When the cursor gets stuck, just press one of the arrow keys to unstuck it (works for my Surface Pro Gen 1 with the type cover).
rdfi··on [dead]
I'm of the opinion that you should only test public methods (what your class exposes to the outside world, i.e. its contract). Private methods are implementation details and therefore you should be able to change them [effectively changing your implementation, but that should not change how your public methods behave] and rely on the tests you have on your public methods to detect any change in behavior that is not correct.

When you say: "...methods used by a method under test can only be assumed to work if each of those methods has good tests", my opinion is that if that is an issue, than those private methods belong in another class that is a dependency of the class you are testing, and should be tested in the context of that other class.

rdfi··on Why are callbacks more “tightly coupled” than promises?
And that is what I pointed out in the answer, although worded a little differently: "If you use a callback, at the time of the invocation of the asynchronous operation you have to specify how it will be handled, hence the coupling. With promises you can specify how it will be handled later."
rdfi··on Doctoral degrees: The disposable academic (2010)
The requirement to constantly be publishing is ridiculous, no wonder there are cases like the one reported in nature (http://www.nature.com/nature/journal/v485/n7396/full/485041e...) where in 56 paper only 6 had results that were successfully reproduced :( And this is cancer research...
rdfi··on Doctoral degrees: The disposable academic (2010)
Even if you have a PhD it isn't necessarily easily to find a job as a lecturer in an university. Often the criteria for hiring a lecturer is their publication record, and if you leave academia for the industry you probably won't be writing any papers. Without publications getting a lecturer position probably won't happen. This is the case in most European universities that I know. Also, the average time a student takes to complete a PhD, especially if you are planning to work while you do it, is well over 5 years.
rdfi··on Just 11% of 53 cancer research papers were reproducible
Really?

Meaning that either there's another unaccounted variable(s) that controls the effect of A in B and C, meaning that we cannot conclude anything from the experiment.

Yes and no is not acceptable...

rdfi··on Just 11% of 53 cancer research papers were reproducible
I agree that reproducing someone else's experiment won't help you get your PhD closer to completion (because you should be doing your own experiments and publishing no matter what, if you expect to land that lecturing position, i.e. publish or perish).

Reproducibility is one of the main principles of the scientific method (those papers shouldn't even been accepted if they don't contain enough information about how to reproduce the experiments they describe)

If an experiment is so complex that it can be compared to redoing someone else's thesis it can be either that the thesis is very simple or the experiment is so complex that it probably proves nothing.

rdfi··on Test-Driven Development Bypasses Your Brain
I would argue that this type of discourse is not useful. There people putting effort into properly assessing the usefulness of using tdd. Personal anecdotes are of little value. See http://blinkingcaret.wordpress.com/2012/10/02/tdd-bdd-add-ev...
rdfi··on Test-Driven Development Bypasses Your Brain
I'm inclined to agree that it is hard to create an algorithm using tdd (for example Dijkstra's algorithm). But "the example" mentioned in the post is not grounded. It would be nice if someone had a real-world example to back up this claim or else it is very easy to bring up the argument that the author is not applying tdd correcly
rdfi··on TDD, BDD, and the tea tasting lady
A pissing match of who can find the most errors in other people's code is probably a good thing :P It's when it starts being about personal aesthetic preferences without any consequences in terms of code readability/quality that I think it starts to be annoying.
rdfi··on TDD, BDD, and the tea tasting lady
I believe the rule is not necessarily about having a small number of lines (that is just a consequence), it's about the method having one responsibility, only do one thing, and that thing should be understandable just by reading the method's name. The ultimate goal is that the code can almost be read as plain English.

This has the consequence of making the methods smaller since they are narrow in scope.

It's easier to understand a well named method with a few lines of code (and believe me, it's easier to properly name it than a method with a lot of code, since the former is focused in one task and it is easy to come up with a name that describes that task; and the latter, where the method does so many things that there's no way you can name it properly [have you ever found methods with names like DoWork and then 100 lines, I'd say that is a code-smell].

rdfi··on TDD, BDD, and the tea tasting lady
Thanks for this
rdfi··on TDD, BDD, and the tea tasting lady
Found that paper about code reviews, it is mentioned in this blog post: http://kev.inburke.com/kevin/the-best-ways-to-find-bugs-in-y... And here's the link to the paper itself: http://kev.inburke.com/docs/basili_testing.pdf
Page 1 of 2Next →