|
Building a working app from scratch is in the disrespectful waste of time category, in my opinion. I did a take-home thing while applying for my current job. I was to take an already made but broken toy app, make it not broken, and implement some minor improvement (I fixed some styling/layout inconsistencies or something). I found it to be a good test because I didn't have to waste my time building something from nothing and I was able to demonstrate my skills in a focused manner. The thing about that sort of assessment is that it's on the company that's hiring to build the app in the assessment and also carefully design the exercise so that it tests what you need it to test within a given time frame. It's a lot of engineering hours to develop that sort of test. My thought is that when the take-home involves a requirement list and zero foundation/scaffold, it possibly means that they didn't have the time/resources/wherewithal to build something for you that tests for what they need it to test while respecting your time because writing a list of requirements is super easy and quick, while building you a scaffold/something to fix/improve and coming up with the accompanying exercises/objectives is not.
|
# ? Oct 7, 2021 18:05 |
|
|
# ? Jun 10, 2024 10:26 |
|
Are you put in the spot and watched while doing these? Do you have access to Google? The tests are why I haven't applied to anything. Like I usually need Google to start and then I'm golden but there's no way I could poo poo out something on the tip of my head
|
# ? Oct 7, 2021 18:40 |
|
Fixins posted:Are you put in the spot and watched while doing these? Do you have access to Google? The tests are why I haven't applied to anything. Like I usually need Google to start and then I'm golden but there's no way I could poo poo out something on the tip of my head So you're saying you aren't a 100x Rockstar Ninja Unicorn?
|
# ? Oct 7, 2021 18:47 |
|
marumaru posted:i've never once been offered compensation for the multiple-hour take-homes i've done. actually this is a great point. Most of my jobs I've taken were quick code challenges, not ones that gave me long hour challenges
|
# ? Oct 7, 2021 18:48 |
|
Grump posted:actually this is a great point. Most of my jobs I've taken were quick code challenges, not ones that gave me long hour challenges Is it possible to learn this power?
|
# ? Oct 7, 2021 18:53 |
|
marumaru posted:Is it possible to learn this power? Yes. If the company you are going to interview with mentions a multiple hour exercise, you decline the interview. That said, our second round of interviews are three ~30-40 minute things in different areas of competence, done live. Someone with "mad skills" can bang them out in 10-20 minutes, and we honestly don't care if you finish, and we make it very clear you can google, stack overflow, whatever you need. We just want you see how you think.
|
# ? Oct 7, 2021 19:16 |
|
minato posted:Did they qualify what "from scratch" meant? What libraries could you use? Because that list is basically the Django 101 tutorial. Slap in Bootstrap and Django Rest Framework and you could speedrun that in a couple of hours. If you couldn't use something like Django then fuuuuuck that. Using a backend MVC framework to get around their "no frontend framework" requirement and essentially doing the whole assignment in something like Spring, Rails, Django, Symfony etc rather than writing any JS would be a kinda hilarious response to that test. I know with Spring for instance you can handle most of that list with a few config class annotations and short, basic implementations of a config interface method or two. Then just use your choice of CSS UI library with whatever templating language the MVC framework uses to spit out the dashboard. "You said no frontend framework so I used a backend framework...because I'm a professional and wouldn't waste time building something like this from scratch."
|
# ? Oct 7, 2021 22:38 |
|
The other question to ask yourself is "Do I want my co-workers to be the kind of people that agreed to go through this same bullshit?"
|
# ? Oct 8, 2021 02:16 |
|
I did a code challenge recently when I got a new job. They created the challenge, rather than using something pre-built or asking me to build them something from scratch. The position is front end, so the challenge had a simple Angular app built out that talks to a public API, where I needed to add a page and show that I knew how to use NgRx (basically redux for Angular wrapped in observables) to handle data for that page. I thought this was reasonable since they use NgRx all over the place and the app is large enough to justify it. They designed it to take around two hours. It also gave me a good opportunity to get an idea of their code style and some ideas of code organization. Getting paid to do the work would have been nice, but I nearly doubled my total compensation with the job so I'm happy with the end result. It helps that they reached out to me and I wasn't actively looking, so it was the least stressful interview process I've ever done.
|
# ? Oct 8, 2021 03:24 |
|
Jadeilyn posted:The position is front end, so the challenge had a simple Angular app Red flag
|
# ? Oct 8, 2021 04:32 |
|
new job is angular with ngrx everywhere it sucks
|
# ? Oct 8, 2021 05:02 |
|
prom candy posted:Red flag I like Angular. I knew that the job used it and it has been a nice step up from my previous job at a web agency that has a lot of leadership issues. If I’m going to do a code challenge for a job, it’s nice for it to use the same stack as the job and have some of the same sensibilities. NgRx doesn’t make sense for smaller apps, but I think it does for the product I’m working on now. At the agency where I worked previously, I managed state with RxJS BehaviorSubjects and it worked fine. It was also a lot easier to teach to juniors. My previous job had an attached bootcamp-style internship program, so there were a larger than normal percentage of juniors.
|
# ? Oct 8, 2021 08:13 |
|
Someone at work commented about the new internal tool I released recently, and said it looks really nice
|
# ? Oct 8, 2021 17:11 |
|
Next/Image is so annoying. I really don't need to use it for 3 KB SVG files, stop yelling at me, ESLint. I also don't need it for logos and whatever; it's not necessary for it to have to generate two divs with more inline styles than your average Tailwind button.
|
# ? Oct 8, 2021 18:48 |
|
LifeLynx posted:Next/Image is so annoying. I really don't need to use it for 3 KB SVG files, stop yelling at me, ESLint. I also don't need it for logos and whatever; it's not necessary for it to have to generate two divs with more inline styles than your average Tailwind button. Extremely same. Not to mention on netlify it makes images take like 4s to load because it's spinning up a serverless function to apply the 0 transformations i asked for. Jadeilyn posted:I like Angular. I'm just joshin
|
# ? Oct 8, 2021 20:48 |
|
I'm looking for suggestions on ways to keep on top of what's happening in the front end space in terms of new tools, industry news, interesting articles, that sort of thing. How do you all keep your finger on the pulse of this stuff?
|
# ? Oct 11, 2021 04:01 |
|
Twitter
|
# ? Oct 11, 2021 04:03 |
|
i dunno if this is a hot take or not, but I hate typescript enums. They don't work with intellisense and they feel pointless:
|
# ? Oct 16, 2021 00:23 |
|
Nah that is normal. Union types are better in every way.
|
# ? Oct 16, 2021 00:27 |
|
teen phone cutie posted:i dunno if this is a hot take or not, but I hate typescript enums. They don't work with intellisense and they feel pointless: TypeScript code:
|
# ? Oct 16, 2021 03:07 |
|
neurotech posted:I'm looking for suggestions on ways to keep on top of what's happening in the front end space in terms of new tools, industry news, interesting articles, that sort of thing. I mostly just listen to podcasts. Syntax.fm and Shop Talk in particular.
|
# ? Oct 16, 2021 03:54 |
|
You can iterate through the values of a string enum but not union types, so that's one thing that they have going for them
|
# ? Oct 16, 2021 04:46 |
|
If that's a thing you need to do there is a slightly hacky workaround https://twitter.com/housecor/status/1387083288989380610
|
# ? Oct 16, 2021 06:04 |
|
I've got a meddlesome problem that I'd love to solve with pure CSS to avoid the need for a janky JS implementation that would have to account for page resize, but a solution eludes me. Basically, I want an image to "fill" the height of a container that gets its height from the other items in it, plus have a specific aspect ratio (1:1; 3:2; etc.)HTML code:
The padding top/bottom trick doesn't work as it defines the height by the width, which is the opposite of what I need. Cugel the Clever fucked around with this message at 03:48 on Oct 17, 2021 |
# ? Oct 17, 2021 03:46 |
|
Cugel the Clever posted:I've got a meddlesome problem that I'd love to solve with pure CSS to avoid the need for a janky JS implementation that would have to account for page resize, but a solution eludes me. Basically, I want an image to "fill" the height of a container that gets its height from the other items in it, plus have a specific aspect ratio (1:1; 3:2; etc.) I’m not in a place to test it but that sounds like it might be a flexbox problem. flex-direction: column then something like .item—image { flex: 0 0 auto } and width: 100% on the actual image. You might need to stretch items but I forget which property that is. (Who am I kidding, everything is a flexbox problem)
|
# ? Oct 17, 2021 04:08 |
|
Sometimes align-self: center on the image fixes whatever flexbox problem is bugging you.
|
# ? Oct 17, 2021 05:30 |
|
Cugel the Clever posted:I've got a meddlesome problem that I'd love to solve with pure CSS to avoid the need for a janky JS implementation that would have to account for page resize, but a solution eludes me. Basically, I want an image to "fill" the height of a container that gets its height from the other items in it, plus have a specific aspect ratio (1:1; 3:2; etc.) https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit https://developer.mozilla.org/en-US/docs/Web/CSS/object-position https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio Not sure I understand exactly what you are looking for, but these properties should be helpful to you.
|
# ? Oct 17, 2021 13:36 |
|
So I've solved at least the "fill" part of the equation with flex, but it's non-viable as it's treated as having no width, despite visually appearing to, resulting in the other items in the container potentially overlapping the image div... And it still doesn't work without aspect-ratio, regardless. Glitch sandbox and screenshot, if anyone's interested in a brain teaser and loving wonky browser flex/grid behavior:
|
# ? Oct 17, 2021 17:51 |
|
Cugel the Clever posted:Basically, I want an image to "fill" the height of a container that gets its height from the other items in it, plus have a specific aspect ratio (1:1; 3:2; etc.) Say that the container becomes higher than wide, for example in a narrow layout. If the image is going to have to be the full height of the container, and it has a 1:1 aspect ratio requirement, it must now be wider than the container.
|
# ? Oct 17, 2021 23:04 |
|
Started working on a projected that uses Redux, which I'm not super experienced with. Several pages of the app needs a piece of state that is retrieved by an API call. I'm wondering where I should trigger the action to retrieve the data. Initially I did it on each of those pages, but is it more clevererer to do it in App.tsx or some other place that' ensures it is done before the user navigates anywhere? Edit: Currently the dispatch is placed in the router for that subset of pages. uncle blog fucked around with this message at 14:20 on Oct 22, 2021 |
# ? Oct 22, 2021 13:33 |
|
Generally I would put it in the highest level place it can go where it can be accessed by everything that needs it while not being called unnecessarily by things that don't need it.
|
# ? Oct 22, 2021 14:24 |
|
uncle blog posted:Started working on a projected that uses Redux, which I'm not super experienced with. Several pages of the app needs a piece of state that is retrieved by an API call. I'm wondering where I should trigger the action to retrieve the data. Initially I did it on each of those pages, but is it more clevererer to do it in App.tsx or some other place that' ensures it is done before the user navigates anywhere? Alternatively: Make a hook that wraps useState and useDispatch, plus something like SWR that makes it easy to pass null to the fetch to have a fetch not happen, to trigger the data retrieval only if the needed data isn't already in the state, then include that hook in each component that needs the data. You should be making the most of hook reusability, and that includes making stuff with basic caching (don't go overboard on optimizing it) so that instead of needing to specially arrange things you just reference whatever's needed everywhere it's needed and have the hooks do the necessary de-duplication. Also, if you're not actually doing anything to this state it shouldn't even be in the Redux store in the first place. Just have a custom hook wrapping a fetch call with a suitable cache on it (or again, SWR because it makes cache stuff super easy) and reference that hook in every component that needs the data.
|
# ? Oct 24, 2021 07:11 |
|
That's a good approach but the useState state won't be shared between components in a custom hook so you'll definitely need to either use something that uses context or write your own context. Maybe that's what you're getting at with the SWR reco but I just wanted to clarify since you mentioned useState as well.
|
# ? Oct 25, 2021 05:09 |
|
I put SWR calls in a custom context in my React application. Just some core things like lookup values, etc that are often used on multiple screens. It's really quite nice actually. I should probably learn Redux one of these days but context does 99% of what I need too.
|
# ? Oct 25, 2021 15:22 |
|
I really like Redux still but I've also been using it since 2015 or so. I don't think it would be worth learning now unless you have an app with a lot of global state, and even that problem is generally mostly solved by the data fetching libraries that manage their own cache. Personally I like RTK Query for that since, surprise, it's built on top of redux. It also makes it really easy to hook into your own reducers, which I've done for slices where I want a highly normalized cache instead of the denormalized one that SWR, react-query, and RTK Query give you out of the box. Also having used Apollo extensively for data fetching and caching, don't use Apollo.
|
# ? Oct 25, 2021 18:05 |
|
prom candy posted:That's a good approach but the useState state won't be shared between components in a custom hook so you'll definitely need to either use something that uses context or write your own context. No, you're right there, I had Redux too much on the brain, though there's also other no-config don't-do-it-yourself methods around, like useState-like hooks that sync automatically with LocalStorage/SessionStorage. But in any case, if all you're doing is a one-way read of data, you should never spend the effort to specially store it, just set up whatever's doing the data retrieval for proper caching and then call it everywhere you need the data. prom candy posted:I really like Redux still but I've also been using it since 2015 or so. I don't think it would be worth learning now unless you have an app with a lot of global state, and even that problem is generally mostly solved by the data fetching libraries that manage their own cache. Personally I like RTK Query for that since, surprise, it's built on top of redux. It also makes it really easy to hook into your own reducers, which I've done for slices where I want a highly normalized cache instead of the denormalized one that SWR, react-query, and RTK Query give you out of the box. RTK Query is another good option, though I think their docs are slightly disingenuous about the comparative overhead of "just have a set of data retrieval hooks" for most web apps. I'm working on a thing with about 20 "fetchWhateverData" hooks, each one's about 10 lines (plus type definitions), and the only settings that live in each are ones that would need be individually detailed anyway (e.g. cache this thing for 1 day, cache that thing for 1 minute, etc).
|
# ? Oct 26, 2021 18:48 |
|
Roadie posted:RTK Query is another good option, though I think their docs are slightly disingenuous about the comparative overhead of "just have a set of data retrieval hooks" for most web apps. I'm working on a thing with about 20 "fetchWhateverData" hooks, each one's about 10 lines (plus type definitions), and the only settings that live in each are ones that would need be individually detailed anyway (e.g. cache this thing for 1 day, cache that thing for 1 minute, etc). Yeah it's kind of just an opinionated library for doing what you describe, plus the integration with redux means debugging your cache is stupid easy.
|
# ? Oct 26, 2021 19:48 |
|
This might be a dumb question but is there a way to console log the source file from where something is being imported? like I recently made a change to the "main" field in my package.json, and I want to make sure TypeScript code:
|
# ? Oct 29, 2021 17:44 |
|
teen phone cutie posted:This might be a dumb question but is there a way to console log the source file from where something is being imported? You can debug how Node itself resolves modules like this, code:
code:
|
# ? Nov 3, 2021 05:55 |
|
|
# ? Jun 10, 2024 10:26 |
|
Oh wait you can just docode:
|
# ? Nov 3, 2021 05:58 |