HackerTrans
TopNewTrendsCommentsPastAskShowJobs

wa1987

no profile record

comments

wa1987
·il y a 4 ans·discuss
State charts / FSM's work wonders in these situations.
wa1987
·il y a 4 ans·discuss
For these situations I often use IFFEs with if-statements and early returns inside.
wa1987
·il y a 5 ans·discuss
What's the pros/cons vs Promise.all([...])?
wa1987
·il y a 5 ans·discuss
There's Clojure too.
wa1987
·il y a 5 ans·discuss
> Please stop spreading this misnomer.

That's a fairly… direct way of putting it :-)

Anyway:

1. What are the key differences in terms of usage and use cases?

2. Why isn't Deno a 'wholesale' replacement for Node?

3. In which respect are the vastly differently inner workings relevant in regards to usage of both products?
wa1987
·il y a 5 ans·discuss
"Money earned"
wa1987
·il y a 5 ans·discuss
One of your best bets might be the vintage keyboard community:

- https://www.modelfkeyboards.com/

- https://deskthority.net/

- https://geekhack.org/
wa1987
·il y a 6 ans·discuss
There’s no need to in my situation. 99% of the files are dependencies installed through Composer (PHP) while building the Dockerfile. The few directories I need to work on directly are bind mounts and don’t have much impact on overall runtime performance.
wa1987
·il y a 6 ans·discuss
> On a Mac, there is a major performance hit whenever you do disk IO in a bind mount (i.e. voluming a directory of the host system into the container). Working without bind mounts is extremely limiting. [..] If you’re using Docker on a Mac and you’ve never tried it on Linux, you owe it to yourself to try it on Linux.

Or use named volumes. I'm running a dockerized WordPress dev environment on my MacBook with average TTFB's of 40 ms.
wa1987
·il y a 6 ans·discuss
> - for in loop - for of loop

It's 2020 and you still use loops? ;-)

source: https://github.com/buildo/eslint-plugin-no-loops
wa1987
·il y a 6 ans·discuss
Agreed. I find myself using a pretty small subset of the language which definitely doesn't include the class keyword. Doubt I'll ever find it useful.
wa1987
·il y a 6 ans·discuss
Often times operations are order-independent. Specifying those as sequential `await`-s does not make a lot of sense in those situations. I guess less fine grained control is desirable under such circumstances :-)

There's also other useful utilities such as Promise.all(), Promise.any() and Promise.race().
wa1987
·il y a 6 ans·discuss
Well, it's complicated :-)

https://stackoverflow.com/questions/36419713/are-es6-classes...
wa1987
·il y a 6 ans·discuss
> Well, how interesting that Apple's software is going to be bypassing Little Snitch, making it harder to discover and fix this sort of issue.

Source?
wa1987
·il y a 6 ans·discuss
https://every-layout.dev/ is downright amazing for learning how to write robust layouts
wa1987
·il y a 6 ans·discuss
Recursion never really clicked and felt intimidating until I read "How to Design Programs":

https://htdp.org/2020-8-1/Book/part_two.html

By far the greatest educational piece I've come across on this subject matter.
wa1987
·il y a 6 ans·discuss
Related video on this subject: https://www.youtube.com/watch?v=IcgmSRJHu_8
wa1987
·il y a 6 ans·discuss
> I usually modify HTML forms so that they won’t work and fix them with javascript. This gives me almost zero spam.

Interesting. One would assume that most spammers use automated browsers with JavaScript enabled.
wa1987
·il y a 6 ans·discuss
> If a static site generator put my images in the wrong place and required a gigantic JSON file to be loaded by the client for no reason I would not think twice to get rid of it.

Incorrect DOM-output is likely caused by common mistakes (e.g. conditional rendering based on `typeof window !== 'undefined'`) which screw up rehydration. Dealt with it in the past and seen a lot of developers struggle with it. This article describes it well:

https://joshwcomeau.com/react/the-perils-of-rehydration/

Gigantic page-data.json files are caused by querying more data than necessary to render a given template/component. Let's say you define a component named `EmployeeCard` that renders a name and photo given an `employeeId`. Now you need to query all employees and render the right one using `.find()`. All this data (including base64 thumbnails) ends up in page-data.json, even if you need to render a only single employee.

This is solved by querying only the relevant employee(s) in the template and provide the data (name + photo) directly to the `EmployeeCard` component as props.

I've developed quite a few websites using Gatsby (mostly backed by various GraphQL API's such as WPGraphQL and Strapi) and while there's lots to learn, it's been an enjoyable experience so far.
wa1987
·il y a 6 ans·discuss
Maybe he's referring to closures.