Better HN
topnewbestaskshowjobs
Log inSign up

sunaurus

1,562 karma · joined Jan 29, 2016 (10y ago) · 183 submissions

Submissions

comment 6y ago · link · parent

I recommend checking out Dbmate as an alternative to Liquibase. I've previously used Liquibase, Flyway, Django's built in migration tools, and others, but Dbmate is my favorite tool for migrations by far due to its simplicity.

It's completely language agnostic, super easy to embed into any deployment pipelines, and works using regular SQL (so you don't need to learn a new syntax).

https://github.com/amacneil/dbmate

comment 6y ago · link · parent

I love the idea of DDG, but after using it for about a year, I realized that I'm redoing most of my searches with !g. DDG seems to be quite bad at searches that are in my native language and somehow also often doesn't find good results for programming related queries.

I ended up switching back to Google. It was painful from a privacy standpoint, but what good is privacy if I don't get useful search results.

comment 6y ago · link · parent

I've used hooks in 3 different teams now, each team had engineers who weren't really familiar with React before using it with hooks.

The only thing I've noticed is that built-in hooks with dependency arrays consistently caused confusion for newbies - for some reason, people aren't used to thinking in terms of "call this function every time this data changes", but they are very used to thinking in terms of "call this function on initial page load" for example. The second way of thinking will probably lead to bugs or just weird code. Other than that (relatively tiny) hurdle, I don't think I've noticed any other common issues with understanding hooks.

I would be very interested in hearing specific examples of cases where hooks have worked in confusing or unexpected ways.

comment 6y ago · link · parent

> Organisations who actively pay for trainings are rare.

Maybe this depends on region? I've worked at 5 different companies in the EU, and every one of them reimbursed pretty much any kind of training I wanted (including physical courses, conferences, online courses and books). In fact, I regularly see software dev job ads that list a personal development budget as a benefit.

comment 6y ago · link · parent

This is an excellent example of how the word "REST" in its common use tells you absolutely nothing about an API. This API certainly does not look like a Fielding-REST-API, and it doesn't even look like a programming-blog-REST-API (in my experience, bloggers just like to use "REST" to mean "HTTP + JSON + no RPC").

Why can't we just call this an "HTTP API"?

comment 6y ago · link · parent

The problem isn't that REST as a concept was not intended to be used in some way, it's that "REST" as a word is used when people actually mean "HTTP".

comment 6y ago · link · parent

You're exposing an API in both cases. In one case, your API returns HTML, in the other case, it returns (presumably) JSON. The format of the response doesn't have to have any bearing on what SQL queries you write or what permissions you check - you can implement the data fetching exactly the same way for both cases.

comment 6y ago · link · parent

I really hate this current reality of having to use social media channels for a chance of proper customer support. Are there any initiatives that are working against this? I would be happy to contribute to any kind of platform or movement or whatever that aims to mitigate/fix this.

comment 6y ago · link · parent

I guess the hopes of the Keybase acquisition leading to better privacy in Zoom are dead.

comment 6y ago · link · parent

The idea is to keep all old versions of your website, and when somebody requests an URL, try to find that URL on all versions of your websites (starting with the newest), and only return 404 not found if the URL does not exist on any of the archived versions.

comment 6y ago · link · parent

I think this is sadly very true - trying to actually be a kind person really limits how well you can play "the game".

There's no good solution to this either - if there was more kindness in the world, then that would just create even more opportunities for the people playing the game to get ahead, because they would have more victims to exploit.

132.

Uber-rival Bolt raises 100M euros ($1.9B valuation)(uk.reuters.com ↗)

2 points · by sunaurus · 6y ago · discuss

comment 6y ago · link · parent

"Hey, <cheaper alternative that co-worker has> costs less than <expensive alternative that I want>, why am I not being compensated more?"

(I think it's a weak argument)

comment 6y ago · link · parent

The constant "threat" of interruption is exhausting. Even on quiet days, it's mentally very difficult to force myself to focus when I know that somebody can break my focus at any moment.

I'm lucky because I have an awesome home-office, so when I need to focus more, I can just work from home. But many people don't have that luxury, so open offices probably end up being quite harmful to overall productivity.

comment 6y ago · link · parent

Looking at https://www.hetzner.com/cloud, the top of the line dedicated option seems to be CCX51, which only has 32GB (edit: 128GB, I must have misread). Do you have some sort of special deal with them?

comment 6y ago · link · parent

As a heavy Keybase user, this looks promising. Is the lack of chat a permanent decision, or is it just something that's planned for later?

comment 6y ago · link · parent

Great answer, thanks! I still don't think it makes sense for Uber (as a tech company) to start employing their own drivers, but maybe the current system isn't great either.

comment 6y ago · link · parent

Can somebody explain the argument against companies like Uber and Lyft being able to provide "gig platforms"?

And where should the line be drawn? For example, web browsers are also apps that facilitate different kinds of transactions, but surely nobody wants Google to be responsible for paying benefits to anybody whose services can be bought through Chrome.

comment 6y ago · link · parent

> The amount of times I have managed to slightly misconfigure Syncthing and as a result it _deletes all my files_ is incredible.

That only happened to me once (when I was initially setting up Syncthing), but even once is too often for something like this.

The incredible part for me is that there was no clear indication in the UI that I was doing something destructive, I only realized that Syncthing was destroying my files because I was manually keeping an eye on it through my file browser. Surely deleting local files should require the user to first confirm using large warnings and red buttons?!

comment 6y ago · link · parent

React does not "iterate over parts" of your functions, it simply calls the entire function. There is no magic happening.

You've already received a lot of responses explaining how both const works (which you still seem to misunderstand) and how React works, I hope you can take this as an opportunity to learn and perhaps not be so confident in the future when criticizing something that you clearly haven't taken time to even understand at a basic level.

comment 6y ago · link · parent

You can't do that. Just like you can't do:

    const [count, setCount] = useState(0); 
    count = 1;

In both cases, const is const.

The fact that `setState` modifies state outside of the local scope does not mean that a local variable is not const. This is really basic programming, it doesn't have anything to do with React.

Here's the exact same scenario without React to show why you're wrong in your original comment:

    const foo = () => {
      const bar = getBarFromDatabase();
    }
Imagine that this is a typical database where values can change, so that every time `foo()` is called, `bar` can have a different value. Do you think that this is a dirty hack that is overruling the const type declaration as well?

comment 6y ago · link · parent

I started my career with jQuery, and soon after moved to Angular v1. There was nothing simple about those tools - the mental models involved were complex, different parts of an application were difficult to isolate from each other and optimizing performance was a nightmare.

Compared to all that, React is ridiculously simple - it has a very small API surface, different parts of your app are isolated by default and performance optimization is generally very straightforward. As somebody who really loves simplicity, React is by far my favorite UI library at the moment.

I think when people fondly remember simpler times with jQuery, it's not because jQuery itself was simple, it's just that they remember working on less complex applications.

comment 6y ago · link · parent

> "Everything an HTML tag" is an insane mantra to have.

I don't think this is a React mantra at all. Maybe "everything is a function" would be a modern React mantra? Seeing how React code is mostly hooks and components, and both are nowadays generally written as functions.

JSX is not even required when writing React, by the way. It's just syntactic sugar.

> It's crazy to me that it's normal now to have like 3-4 compilation/transpilation steps when working on a simple JS-based app.

There's nothing about React that requires this. You can simply include the react.js script at the beginning of your HTML document and write all the React code you want, no transpilation required.

If you want to use JSX, then you need transpilation, but again, JSX is not required to use React.

comment 6y ago · link · parent

> I would love to have static types in JS, but not at the expense of node..

What do you mean by this? I use TypeScript with node all the time.

comment 6y ago · link · parent

Writing statically typed code will always be slower than writing dynamically typed code.

People don't use static typing for writing code faster, they use it for code that can be READ (and understood) much faster, especially by somebody who doesn't work with that specific piece of code every day.

I think it's generally agreed that in most situations, reading code is much more common than writing code, so static typing really make sense.

comment 6y ago · link · parent

> ...the selling point of IINA is a well thought out UI with just enough features but not too many

That's exactly how I would describe the default mpv UI :)

comment 6y ago · link · parent

I've never used IINA, but I'm wondering why you don't just use mpv on Linux? I've been using mpv for years and I've never had any issues with it.

comment 6y ago · link · parent

This was my first thought as well. OP, your symptoms sound very similar to an app I recently updated to support SCA - it was just dropping a portion of the payments.

comment 6y ago · link · parent

I think you're using Occam's Razor incorrectly here.

Here are all the facts:

1) There's an incomprehensibly large amount of stars and planets in the universe

2) On one of these planets (Earth), there are conditions which have lead to the appearance of life

3) These conditions are not unique to this planet

We don't know of any fact that would exclude the possibility of life coming about on other planets with similar conditions, so using Occam's Razor actually tells us that there's probably lots of other life out there.

comment 6y ago · link · parent

I assume what you're arguing against is using small functions with descriptive names as documentation. If that's the case, I think the term "hyper-abstract" is a massive overstatement.

In any case, I think the core issue is really how much faith you have in the proficiency of your teammates. If you can't trust the developers in your team to actually only write functions that do what they say in the name (without nasty side-effects), then I can see why not having all the logic in front of you in one giant function can be annoying - you have to jump into all the definitions and manually double check to be sure what's happening.

1234567