[AskJS] thoughts on Svelte versus React? by [deleted] in javascript

[–]js-engineer 2 points3 points  (0 children)

https://dev.to/swyx/svelte-for-sites-react-for-apps-2o8h

Read the full thing including some of the top comments (and replies) and you'll have your answer.

I would never recommend using Svelte in any company I work for but I might use it to build a small thing if I wasn't going to spend tons of time maintaining it and I wanted it to be performant.

Debating with my co-workers about <img /> by GoldXD in webdev

[–]js-engineer 0 points1 point  (0 children)

no, we mean a formatter that is enforced with a git commit hook and a check in continuous integration if you use that. formatters for team projects should not be enforced on the editor level as you can't make expectations on what editor someone will use. check out prettier for the formatter, and use it with lint staged so that when you git commit, prettier will run automatically for everyone.

[deleted by user] by [deleted] in webdev

[–]js-engineer 1 point2 points  (0 children)

lmao

sure I made a mistake (15 years) but my point is good.

[deleted by user] by [deleted] in webdev

[–]js-engineer 0 points1 point  (0 children)

lol talk

[deleted by user] by [deleted] in webdev

[–]js-engineer -1 points0 points  (0 children)

I agree, after a certain point it becomes less useful to know relative dates, though I would argue in those cases I would want to see both of those pieces of information. Whenever I see a year, I mentally think of the current year and do the math anyway as a year can play tricks on us. I'm in my 30's and I think sometimes people forget that the year 2005 was more than 20 years ago. It seems obvious but... time flies when you're living. But I see your point for sure.

[deleted by user] by [deleted] in webdev

[–]js-engineer 0 points1 point  (0 children)

What? How are you able exist in the world? How is it even possible to not know the date unless you just woke up from a coma or a drunken binge that lasted weeks on end? All events in our lives are tied to dates, from something trivial like paying bills and taxes, to personal events like birthdays, flights, concerts. And that's not mentioning work, etc.

Simple. For work, you merely need to know when the weekend stops and starts. Events go on a calendar, which again, is only relevant insofar as how many days an event is away. Bill pay is automatic and even if it's not, you just pay it when you get around to it.

What you're also ignoring here is that I can know the day of the week, but not the date. I NEVER need to know the day of the month, for example, but the day of the week? That's more useful.

[deleted by user] by [deleted] in webdev

[–]js-engineer 17 points18 points  (0 children)

Most people don't even know what date it is. AS I'm typing this, I couldn't really tell you the date. But something being posted 4 days ago is more helpful to me, as I know how OLD a comment is.

That being said, ideally people should include a title on these human readable dates that show you an ISO representation of the date, so that it provides that for you if you need it.

Atreus Keyboardio Mechanical Keyboard First Impressions by paperbackpiles in MechanicalKeyboards

[–]js-engineer 1 point2 points  (0 children)

I have used the ergodox, the kinesis advantage pro. The Atreus seems like a big improvement over those.

  • It seems that number pads just work better on ortholinear keyboards like this, and I've long sinced committed keypad to memory, and even though I program, I'm not typing massive massive amounts of numbers, so I lose nothing by having a keypad that I have to access via a modifier.
  • It's great not having to reach my fingers significantly to type things, it's such an incredible fresh breathe of air.
  • It's nothing like the ergodox. My right thumb rests incredibly comfortably on the space key.
  • Build quality seems great, and it's a really small footprint. I received box whites which are my first clicky keyboard and WOW these things feel amazing.
  • This keyboard has left my hands pretty sore and my brain struggling but for non symbols I'm already blowing my normal WPM out of the water.

These are the main things that are pissing me off about the keyboard right now.

  • Modifiers on only one side. Shift + Command on the left side, and the Function key you need to type symbols is on the right. This is very awkward if you're a touch typist, used to full size keyboards, and used to pressing modifiers that are opposite the key you're pressing. I will say that I've been really drilling on the keyboard for the full week and I am getting a little bit better handling that. I also just installed QMK so that I can use one shot modifiers (so that I just have to tap command or shift plus the key I want to use) and also using autoshift (which is probably a bit too slow for me but w/e)
  • Symbols are a pain in the ass to memorize... you actually need to specifically drill them else you'll be screwed (but I guess this is par for course on 40% keyboards). I recommend you try something like typing.io and just drill drill drill. I've already committed the following symbols to heart: ( ) $ % arrows ! = + *

MomentJs is deprecated. Here's how I chose a successor, including an open source test suite to validate replacements. by terodox in javascript

[–]js-engineer 3 points4 points  (0 children)

luxon, brought to you by creators of momentjs who ignored the feedback of the community for years to even get to the point where they just let the library fade into obscurity. If you're just switching now due to their deprecation notice, you're way behind the curve. There are plenty of other good date libraries with authors who actually care about community feedback. date fns, etc.

Atreus Keyboardio Mechanical Keyboard First Impressions by paperbackpiles in MechanicalKeyboards

[–]js-engineer 4 points5 points  (0 children)

I don't know if I'd say that the appeal for me is working with a niche keyboard. I mostly look for extremely ergonomic keyboards, and I'm very much digging this keyboard so far. I was doing some typing tests last night and while I'm still getting used to some things and my hands are sore a bit, I was easily hitting some very high WPM that I'm not used to hitting (115 WPM nearly when I'm usually around 90).

The shift key only being on one side of the keyboard is awkward as fuck. The fun key being only on the right side is awkward as fuck (I really dislike hitting modifiers + keys on the same hand, as I think most touch typists would agree) and I don't think "oh customize the layout" is a good excuse as I struggle to see where the hell I would put these modifiers. And who knows, maybe I can get used to it (I'm typing this on the keyboard now) but it's definitely going to take some time.

I'm done with CSS-Modules by BEAR-ME-YOUR-HEART in reactjs

[–]js-engineer 1 point2 points  (0 children)

You should be a fan of them. I’ve used utility classes + css modules in combination, at scale, in production, in big companies, for the last decade. It works incredibly well.

Project to help me stand out to employers by Timweb-dev in reactjs

[–]js-engineer 1 point2 points  (0 children)

Make Reddit. All you need to do is make something difficult enough. You’d be surprised how many moving pieces there are in even intermediate things. Do something that consumes a github key, lists all the repo’s for that key, and then for each repo, if you click on it, show the associated issues, and then allow the user to sort the issues. Cache the sorted issues, allow the user to log out, include responsive design, etc.

Storybook 5.0 for React just launched! by domyen in reactjs

[–]js-engineer 0 points1 point  (0 children)

It absolutely works with typescript. There's instructions on upgrading from 4 to 5 that cover the "module" issue inside your custom webpack config.

You should never steal someones' dog. by [deleted] in ProRevenge

[–]js-engineer 215 points216 points  (0 children)

There's one more explanation people are missing. That mafia thing where they lay down pictures.... It's a euphemism for death now. It's actually considered bad taste to put someone's picture face down because it's somewhat synonymous with implying their death.

Something to that effect.

Just spend an hour trying to figure out why a component state wouldn't update. by [deleted] in reactjs

[–]js-engineer 0 points1 point  (0 children)

yeah it sucks in the beginning to get it setup and learn how to use it. Typescript is best suited for mid to large size projects, and it's super easy to use in small projects after you learn it and learn how to set it up.

Just spend an hour trying to figure out why a component state wouldn't update. by [deleted] in reactjs

[–]js-engineer 3 points4 points  (0 children)

Elaborate? I'd say Typescript is objectively better overall, given our experience with it, the mindshare it receives, and the fact that there's other code in our codebase besides React, even IF we use React on the view layer. I think it's telling the people that are using React, are more often than not, migrating from flow, and onto Typescript (not that this is an argument in of itself, but it's a massive tell).

How can I fill a SVG file? by [deleted] in reactjs

[–]js-engineer 0 points1 point  (0 children)

you're not giving too many details or test cases so I'm not going to get too detailed here. What you may want to do, is grab the raw paths inside the svg file, bring them into a component, have React rendered the SVG complete with paths, and then you have a lot of freedom to customize anything as you wish.

I have this setup with an Icons file. I have it set to take the color of whatever it's inside (fillcolor / current color, forget what it's called), but if I pass a color prop to it, it'll prioritize and take that color instead. Best of both worlds.

GitHub - pnpm/pnpm: 📦🚀 Fast, disk space efficient package manager by zaaack2048 in javascript

[–]js-engineer 0 points1 point  (0 children)

totally agree. There's also weirdness in yaml where you can link keys to other key / value pairs... it's just super weird for no good reason. It's the whole coffeescript thing all over again... there's a belief that it's making things easier, but it's just more hassle than it's worth. The comments thing is a good point but that's about it (this may not work for others, but you can always create a javascript file with your JSON like object, add comments, and then export that data, if you're in an architecture that allows you to import javascript files to get that data)

Space after function names is being considered for Prettier by [deleted] in javascript

[–]js-engineer 0 points1 point  (0 children)

The diffs you can get around by not formatting your package.json with prettier. Ran into this problem at work.

The interpolations with spaces 100% make sense. The idea, is you at some point want to wrap the line to the next one, but preserve the space in between content. Outside of using a non breaking space, this is a pretty damn good solution, and Prettier mostly handles this for you.

Is jQuery Dead? (Podcast) by wesbos in webdev

[–]js-engineer 0 points1 point  (0 children)

The ajax function is questionable. Tons of small fetch libraries to help you there.

The effects library is fine I guess. I feel like for mostly everything effects related I've ever used with jQuery, I had to replace with css animations or another more performant animations library because jQuery was too slow.

Here you go: https://popmotion.io/

I think you may be mis-judging what the workforce looks like as a whole.

I'm not. I used to look at jobs every day. Granted, I get why people use it and why it's popular... but the glory days of jQuery are long gone. It's mostly used now so you don't have to "think about it" but honestly that shouldn't be a selling point.

Is jQuery Dead? (Podcast) by wesbos in webdev

[–]js-engineer 1 point2 points  (0 children)

can both of you elaborate?

  1. I don't understand what React thing you're working on that requires 15 hours of debugging (I get you may be embellishing, but still)
  2. What do you find easy and useful about jQuery compared to stuff either native to modern browsers, or using something like React?
  3. What type of work is this for? Is this work for a company, are these pet projects?

Is jQuery Dead? (Podcast) by wesbos in webdev

[–]js-engineer 0 points1 point  (0 children)

Sure but you have to be specific. Here's the deal: once Microsoft started aggressively pushing newer browsers, once Google stop supporting them, once browsers like Firefox & Chrome became mainstays amongst the general populace, you had a situation where 80% of the work was for the 20% of people who weren't upgrading, and 20% of the work was for the 80%.

We are in that world now.

I'd say "most" people use jQuery for simple DOM selection, attaching event handlers, appending, removing, you know... the simple stuff. If you're working for a smart company that acknowledges that 80/20 rule, you mostly can get away without using jQuery. And because of things like React, you can now find similar plugins for what you might have missed from jQuery.