Recent submissions

Comment · 9 months ago
Comment · 1 year ago
And The Netherlands
Comment · 2 years ago
Comment · 2 years ago
Comment · 3 years ago
I really like this answer because it tests CTEs in a modular way. One question I have is: how do you test a the CTE with an in.csv and out.csv without altering the original CTE? Currently I have a chain of multiple CTEs in a sequence, so how would I be able to take the middle CTE and "mock" the previous one without altering the CTE actually used in production? I prefer not to maintain a CTE for the live query and the same CTE adapted for tests.
Comment · 4 years ago
https://www.aceandtate.com is an option as well.
Comment · 4 years ago
Comment · 4 years ago
It might be, but the originally linked article is more about tech and not so much about politics on a national or global level.
Comment · 4 years ago
Wow, that's quite a discussion. I'll be sure to make time to read it in its entirety.
Comment · 4 years ago
Thanks for the recommendation. I've read the book by Eric Evans and I like the first chapters about creating an ubiquitous language. I'm trying to figure out how to create a balance between the spoken language in code and the actual implementation of the code.
Comment · 4 years ago
Regarding a unit test it looks something like this in pseudocode:

  function test_addition() {
      given_two_integers(2,3);
  
      when_summed_up();
  
      then_the_result_should_be(5);
  }
Whereas I would prefer something like

  function test_addition() {
      int a = 2;
      int b = 3;
  
      int result = new Addition(a, b);
  
      Assert.AreEqual(result.Sum(), 5);
  }
For a non-coder it might seem more intuitive to read the first example, because it only contains natural language. For a coder it seems more intuitive to read the second example, because it prevents "method hopping" (I have to go into the methods from example one to see what's actually happening inside them).

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton