HNHacker News
TopNewBestAskShowJobs

deepersprout

901 karma · joined September 13, 2019

submissionscomments
deepersprout··on Session: An open-source private messenger that doesn’t need your phone number
Signal depends on play services on android. I keep reading here that signal is secure and we should all switch to that, but I just can't get over the fact that it works only if you effectively give root to google on your phone. I can not take Signal seriously when it tells me it is secure, but has that requirement.
deepersprout··on A note of reflection after 10 years of “A successful Git branching model”
Your model is called trunk based development and personally I like it a lot. It keeps the history clean and is very easy to use even for junior devs.
deepersprout··on A note of reflection after 10 years of “A successful Git branching model”
> A year after you release v1.0.0 (which you say is a tag), a customer reports a bug in it. They don't want a breaking upgrade to v9.13.0. They want to pay for v1.0.1 (aka "hotfix").

> But you can't open a PR against a tag v1.0.0. Hence you discover that v1.0 should be a branch, and both v1.0.0 and v1.0.1 tags. This way you can open a PR against v1.0 and easily create v1.0.1, v1.0.2, etc.

So you could just `git checkout v1.0.0; git checkout -b v1.0`, commit your hotfix and deploy v1.0.1.

> Another problem. You are at "master" and approach v13.0.0. But there are numerous bugs to fix before you release. Testing takes >24 hours. You choose to work on bugs on a branch (v13.0) this way master can proceed with new features and not be feature-frozen for days or weeks.

Or you could use topic branches for new features, and fix bugs on master at the same time.

> Another problem. Your CI is deficient in that it allows merging and cloning before it makes sure that previous merge produced good product. Puny as it is, it is the current industry standard. Thus your main branch becomes broken now and then. So you call it "develop" and only merge it to "master" what you are sure is a good product.

I don't understand your point here. Usually your CI builds a branch, runs some tests on the compiled product and makes sure the `master` branch is ok before deploying to staging or production.

> If these common situations don't apply to you - proceed as you are. Do the simplest thing possible, but not simpler. What you've described doesn't create any roadblock or dead end street for the project.

I think there are a lot of branching strategies for a reason. Your use cases can be covered with other branching strategies as well.

deepersprout··on WireGuard Gives Linux a Faster, More Secure VPN
> While I don't believe WireGuard is a drop in replacement for IPsec tunnels or OpenVPN

Why?

deepersprout··on How to write the perfect pull request (2015)
Put them in comments on the commit on github. It's better to keep github stuff inside github. Your source code with your git history may move off github one day.
deepersprout··on Mass Evacuation Underway in German City over WWII Bombs
I think the train re-routing you talk about took place because of this bomb in Bolzano: https://www.dw.com/en/italy-thousands-evacuated-for-world-wa...
deepersprout··on Police tracked terror suspect, phone went dark after Facebook/WhatsApp warning
> There was no terror attack. Why is this the framing of the story?

Maybe there was no terror attack because the intelligence gathered from the hacked phones prevented it.

deepersprout··on Australia first to test new lithium-sulphur batteries
> Unless you're on mobile and then you're helpless

uBlock Origin is very reliable on my Firefox on Android.

You know, Safari and Chrome are not your only options on mobile.

deepersprout··on Ask HN: How do you manage logs for your backend services?
Keep logs local, and send only errors and noteworthy events to a central server like sentry.io, rollbar, or something else.

If you log everything to a single server, as you noticed yourself, it will become very expensive and difficult to filter out the stuff that you really need when looking for errors or when you try to hunt down a specific problem.

deepersprout··on Wildfires Are Raging Outside Every Major City in Australia
> Contributing to every environmental issue, including this one, is overpopulation.

Citation needed. Why is 7.7 billion people a problem? IMHO earth as it is today can accommodate 9 or 10 billion people without problems. (And like you, I have no citation as well.)

deepersprout··on Age: A simple, modern and secure file encryption tool
> 2. How does using electron apps make me more secure than using native apps?

The electron app exists. The native app does not.

You think that ranting against electron is somehow making a native app appear, but the reality is that there are way more js/electron devs than there are qt/gtk/wpf devs, and the choice in most cases is either an electron app or no app.

deepersprout··on My experience hosting a static Jekyll blog with Azure
Please do!
deepersprout··on My experience hosting a static Jekyll blog with Azure
Did they change something? Is it better now? Keep us posted!
deepersprout··on A man using Google ad data to help heroin users
"This data includes the words clickers type, but also their web browsing history, where they work, the size of the company they work for, whether they rent or own a home, whether they’re married or single, whether they have kids, how old their kids are, the apps they use, whether they’ve recently gone through a “major life event,” whether they drive a Chevy (or prefer Ford), any degrees they hold, whether or not they graduated high school, and more."

I would love to know what google knows about me. Is there a way to find out?

deepersprout··on Movim 0.16 – A federated web-based social XMPP client
Hi! How many users do you have on your main pods (nl, de, jp and fi)?
deepersprout··on Using Firefox for a faster, calmer and distraction-free internet
I use firefox on ubuntu as well and it works very nicely. Its RAM and CPU usage is negligible, sites load very fast, and the developer tools are awesome.

I think something is wrong on your system.

deepersprout··on PostgREST
Basically you are saying "I don't need stored procedures, therefore neither should you".

If you don't use them clearly you don't need to debug them. That does not change what I said earlier: a difficult development workflow hinders their adoption.

deepersprout··on PostgREST
You don't debug views of course. But with postgREST you have to write your logic in stored procedures. So say I want to write an accounting app that has an invoice function. A view is not enough to create an invoice, because there are complex rules to apply to the data, so I have to write a SP. I need to debug that stored procedure, and if I have to install pgAdmin and switch from my very much loved and customized editor to debug my invoicing procedure, the workflow is broken, and so it comes that I will write that invoicing function in C#, java, python or js instead, because the tooling is better.

Compare that to a node application: just open vscode, start editing away and press F5 to test it. If you want to debug it, add a breakpoint and step away. When you are done you commit and push to git.

It should be the same with stored procedures.

deepersprout··on PostgREST
> for the first one, read my other comments, this is solved.

> The second one, you can start here https://www.pgadmin.org/docs/pgadmin4/4.13/debugger.html

I think Starter Kit and the pgAdmin debugger lack in convenience. If you write C# or node js code in your preferred editor, you can debug it there. You can debug your express routes, webapi or resteasy controllers in vscode/vs/eclipse/intellij without leaving the file you later commit to git.

Starter Kit and the pgAdmin debugger are fine tools, but they come nowhere close to how you work with a js, C#, java, python or whatever you like codebase.

The development workflow with stored procedures imho is broken, and I think that is one of the main reasons people do not use them much.

deepersprout··on PostgREST
I really like this approach for mostly crud apps. What is missing is

- something to conveniently version control database objects

- something to conveniently debug stored procedures. Maybe directly from vscode or your preferred editor.

If those two things get solved somehow, pg could be a really awesome application server.

deepersprout··on You cannot cURL under pressure
> curl follows redirects, `curl -O` is functionally identical to wget.

No it's not :)

You need to `curl -LO`. See for example github releases:

  curl -LO https://github.com/S2-/gitlit/releases/download/v1.4.1/gitlit-1.4.1.tar.gz
downloads the tar.gz, while

  curl -O https://github.com/S2-/gitlit/releases/download/v1.4.1/gitlit-1.4.1.tar.gz
will download an html file.

Even better would be to use `curl -LOJ`, so if the filename is not in the url, but in the `Content-Disposition filename` http response header, curl would get the filename from there.

deepersprout··on TypeScript 3.7 Beta
> i’m not sure about typescript, but in many languages assertion have the natural behavior of being compiled out of release builds and kept only for debug mode.

Not in TS. This code

  function something(num : number) {
    assertIsInRange(num);

    return num + 1;
  }

  function assertIsInRange(num: number, msg?: string): asserts num {
    if (num < 50 || num > 100) {
      throw new Error('not in range');
    }
  }

  something(50);
gets compiled to

  function something(num) {
    assertIsInRange(num);
    return num + 1;
  }
  function assertIsInRange(num, msg) {
    if (num < 50 || num > 100) {
      throw new Error('not in range');
    }
  }
  something(50);
deepersprout··on TypeScript 3.7 Beta
If the `something` function had `(num: string | number)` I would not be able to call `assertIsInRange(num: number)` because `Argument of type 'string | number' is not assignable to parameter of type 'number'.`

So If I wanted to do that I would have to

  if (typeof num === 'number') {
    assertIsInRange(num);
  }
anyway.

I think I still don't get it.

deepersprout··on TypeScript 3.7 Beta
I still don't get it. Please help me out.

Why should the type system have anything to do with something like this?

  function something(num : number) {
    assertIsInRange(num);
  
    return num + 1;
  }
  
  function assertIsInRange(num: number, msg?: string): asserts num {
    if (num < 50 || num > 100) {
      throw new Error('not in range');
    }
  }
  
  something(50);

How is `asserts num` helping here?
deepersprout··on TypeScript 3.7 Beta
I don't get Assert Functions.

What are they good for? Maybe there is a use case I am not getting, but this

  function yell(str) {
    assert(typeof str === "string");

    return str.toUppercase();
    //         ~~~~~~~~~~~
    // error: Property 'toUppercase' does not exist on type 'string'.
    //        Did you mean 'toUpperCase'?
  }

  function assert(condition: any, msg?: string): asserts condition {
    if (!condition) {
        throw new AssertionError(msg)
    }
  }
Seems like the equivalent to

  function yell(str : String) {
    return str.toUppercase();
    //         ~~~~~~~~~~~
    // error: Property 'toUppercase' does not exist on type 'string'.
    //        Did you mean 'toUpperCase'?
  }

But the latter has much less code and is clearer too.

What am I missing?

← PreviousPage 2 of 2