HN user

okbake

96 karma
Posts0
Comments65
View on HN
No posts found.

I agree with you about the `nameof` comparison, mainly because it deceptively looks like something you'd be able to write yourself (since it's just an attribute), but under the hood it's compiler magic. I'd rather it be more like a keyword or obvious language built-in so there's a clearer boundary between "this is a language feature" and "this is a standard library feature".

I could see both, but things like integer vs float couldn't be determined from the type, since you just have the single `number` type. That being said, you could just convert to an int on the value you're passing in rather than having the interpolation do it for you. Same thing with object vs string, you could pass in `obj.toString()` instead of just `obj` with an `%s`

A suggestion: don't hide the entire store component when you change one of the filters. You can see it flash with unstyled text "loading" before popping back into view. It's much less jarring if you keep the existing content rendered while waiting on the response and swapping it out after the request completes rather than going to a blank screen when you start the request.

My personal preference is more subtle loading indicators near the element that triggered the interaction (the filter inputs themselves in this case) but that's probably subjective. I think at the very least you should keep filter bar visible while it's loading so that the element you're interacting with doesn't disappear while you're using it and pop back into view.

I wish there was a little bit more data on this last chart. How are they measuring 'math progress' here? It looks like the data comes from "online usage data from Zearn math", but how is progress being measured? Does a +53% increase mean that average classroom scores (tests and quizzes?) increased by 53% over where they were before covid? Does it mean the class as a whole covered 53% more of the topics than they would have otherwise? It's unclear to me.

Whatever the measurement, I find it just as interesting that there was such a large increase over pre-covid for the high income zipcodes. My assumption would have been a decrease in the low-income zipcodes (due to access to technology resources for e-learning, more friction in adjusting to staying at home, economic woes effecting low income families more, etc), but the high-income zipcodes to stay roughly the same. It looks like (for math at least) that e-learning is working out great when you have access to the technology, much better than regular in-person school (assuming what they're measuring as 'progress' is actually meaningful to begin with).

I am in this same boat. I recently signed up for Firefox Private Network and I'm in the process of switching over to Mozilla VPN. I think both of these services are great (even if they're essentially white-labels of other companies products) and they're the kinds of things I associate with Mozilla and Firefox. I would also pay for their password manager if it were a little more robust (and if they charged for it) just to get the tight browser integration.

From Node to Deno 6 years ago

A big benefit of the `users->where(...)` approach is being able to reuse and compose. An example would be conditionally adding a WHERE clause based on some parameters. Using the raw query approach you end up having to do some string concatenation versus managing the state of the some query builder object.

I think that the "query builders" though are just one piece of the ORM that you mention, alongside the change-tracking, data mapping, etc. Having a decent query builder that isn't abstracting away too much of the underlying sql (essentially just mapping 1-to-1) plus data mapping are the sweet spot for me personally.

According to SCS, the UI would be responsible for fetching that data from the other systems, and would pass all of it as part of the payload to the order fulfillment service.

One potential issue is that the order fulfillment service still needs to validate that the data its getting from the client is correct. For example, even if you send a list of full product details rather than a list of productIds to create the order, the fulfillment service still need a way to associate the Order entity with the Product entities. You could also send the ID with each of the products, but how would you know if the product has since been deleted or otherwise doesn't exist.

You end up needing the order service to either have its own set of knowledge about what products exist in the system for that user, or you need to make the synchronous call to ensure they're real products.

Unfortunately the PPP money has all been dried up as of today, and many small businesses weren't able to take advantage of it. This site was put together to track how many businesses have received it, though it relies on self-reporting from the businesses so it won't be entirely accurate: https://www.covidloantracker.com/

Maybe we need a new license that is similar to existing open source licenses with the addition that it can't be used by FAANG.

Amazon Echo Buds 7 years ago

It could be a matter of size, but it's since the charging port isn't on the earbuds itself it might not matter.

usb-c connectors are (8.4mm x 2.6mm) whereas micro-a is (6.85mm x 1.8mm) and micro-b is (6.85mm x 1.8mm)

It might just be a matter of simplicity, since USB-C seems to have a larger surface area for the spec, but I don't really know if that's the case.

Sorry, I didn't mean to imply astroturfing. My comment is asking how many people "paid to read the article" (because it's behind a paywall), and not "were paid to comment here".

Still not a great comment I admit, but with the amount of discussion going on I would be surprised if everyone is subscriber or if they are going off of the headline alone.

Title should either reflect the original article or be amended to include "at some point in the future". FTA:

Once we consider ESLint feature-complete w.r.t. TSLint, we will deprecate TSLint and help users migrate to ESLint; our primary tasks until then include:

Continued TSLint support: The most important maintenance task in TSLint is ensuring its compatibility with new compiler versions and features.

TSLint → ESLint compat package: Once the ESLint static analysis checks are on a par with TSLint, we’ll publish an eslint-config-palantir package, a drop-in ESLint replacement for our TSLint rule set.

Sketches of Elixir 8 years ago

`with` is an oddball. It's a macro but it's also a special form that has unique syntax that's not used anywhere else. It's basically the only variadic function in the language and it doesn't fit IMO.

It could have been implemented without needing the same special treatment with something like:

    with do
      x <- foo()
      y <- bar(x)
      z <- baz(y)
      blah(z)
    else
      err -> handle_err(err)
    end

NGRX (the redux inspired state management library for angular) has a concept called 'effects', which lets you subscribe to the action stream (actions and the state in ngrx are both rxjs observables) and trigger side effects in response to certain actions. The effects themselves map to one or more actions (or zero if you want side-effects only) when they are finished that get dispatched.

Since you're dealing with them from within an observable stream you have access to all the rxjs operators, so you can do things like waiting for multiple actions to be dispatched before doing something, etc.

Vim plugins I use 8 years ago

The biggest thing for me when trying to switch from console vim is `alt + <key>` will send ESC and the key, so you can use alt to exit insert mode and send a command at the same time. Doing alt+j or alt+k has become the way I always leave insert mode (or command, or visual).

Unfortunately most IDEs that have vim keybindings don't support this, and it has become such a baked in part of my muscle memory that it makes switching to anything else such a pain.

I'm a fan of TypeScript's structural typing for this reason. I can define an interface that describes the shape of a "plain old object" (it's fields and their types), and then write functions that accept/returns an object of that interface. What's great about structural typing is I don't have to explicitly say "create a new object of this type", any object that satisfies the shape of the interface is valid (object literals for example).

So you end up with the best of both worlds (in my opinion), where your state is made up of simple plain objects and you behaviors are just functions that accept simple plain objects, but you get all of the benefits of compile time static type checking because they are checked against the interface.

I recently switched jobs and went through several rounds of interviews with several companies and the MOOCs I listed on my resume always came up. They served as a way for the interviewer to segue into the topic rather than a blind trust like a degree served. Not only did they show self motivation but they also acted as a way to shift the interview towards a subject I'm familiar with.

I think some of that shift is probably because of interviewers second guessing those courses though.

The recursive search is frustrating. I'm so used to doing <first few letters><enter> to navigate from the root directory all the way down to what I'm looking for. It's not only the small hangs while it searches but also the information overload with all of the results when I'm only ever looking for a specific sub directory in the directory I'm currently in. I guess I'm so used to using it as a hotkey instead of a search.

I use a tiling window manager (spectrwm) and I am almost always using a single window in fullscreen. Apart from the browser most of my workspace exists inside the terminal where I'm very liberal with using multiple panes/windows/sessions in tmux. This fills a similiar role for me with regards to tiling, but for almost everything else I prefer having only a single application front-and-center at a time, with tiling available for rare occasions.

What I like about the tiling wm is that I can launch an application and have it immediately fill the entire screen (without annoying decorations). Then opening and closing windows, changing windows, moving workspaces, etc, is all just a hotkey away.

This same setup would be possible with openbox I think, but it all comes "out of the box" with most tiling window managers.

I pipe a list of installed programs into dmenu and have it run whichever one I select. I have this bound to Mod+p. dmenu has fuzzy search, so if I want to open firefox I can just type `Mod+p fox <cr>`. Not quite as fast as having dedicated hotkeys, but it also covers all installed programs on the system (or some small subset if I want).

Having programs available from anywhere with just a few keystrokes makes everything feel very accessible. Whenever I want to run something I just need to type a few characters of the binaries name to launch it.

I use a similiar set up for ssh, where I pipe the Hosts from my ~/.ssh/config into dmenu and only need to type part of the hostname to connect.

[dmenu] http://tools.suckless.org/dmenu/

You can do something similiar in rust. 'if' is an expression, so it can appear on the right hand side of an assignment.

  let x = if number > 2 { "yes" } else { "no" };
It's not quite the same, and I'm not sure what the failure case would be if the 'else' statement was ommitted, but it comes close.

After experimenting with Rust and Elixir I've really come to like the 'everything is an expression' approach. That and pattern matching can make some things really expressive.

Something else that is really useful in these situations (in bash at least) is alt-* (alt-shift-8). It will expand a directory or glob into all effected top level files/directories.

For example, it will expand `ls *` to `ls foo bar baz`, etc

Yeah, it's not so subtle. But then again:

ThatOnePrivacyGuy should use their open source speed test tool instead

Using their instead of our makes it sound like there is no affiliation.

I can see the logo just fine on the imgur link, but I can't see the original in firefox or in GIMP.

I wonder if it has to do with imgur compressing the image, or maybe approximating/ignoring the colorspace as was mentioned above.