Live data from Hacker News

Things I Don’t Know as of 2018

overreacted.io

141–150 of 226 posts

Re: Things I Don’t Know as of 2018

#141
post #53

Earlier quoted context omitted.

>My "thing I dont know as of 2018", just for good measure: How to build complex front-end applications without making a complete mess of things! If you find anyone that truly knows the answer, please let us know :) I'm sure plenty of people claim to, and many more will just claim that the mere concept is flawed so there's no point, and there are even more non-answers. But the actual problem is very difficult. I remem…

You definitely aren’t restricted to lazy loading when using RouterModule.forChild, idk where you got that, just define a module, add forChild with your routes, and import it into another module. Im doing this all over our codebase. I can understand you’re opinions about the module system, but I disagree. For a small to medium size app it can seem like annoying boilerplate that gets in the way. If you’re working on a…

>You definitely aren’t restricted to lazy loading when using RouterModule.forChild, idk where you got that, just define a module, add forChild with your routes, and import it into another module. Im doing this all over our codebase.

Genuinely, I have not been able to figure out what it actually does from the documentation. Either it isn't there or I have been holding it wrong.

Because, loadChildren actually would import the routes from a child module as children of an existing route. But what you're saying, it sounds like the child routes would get placed at the root of the tree. I don't want that though, that doesn't allow me to do the decoupling I wanted to do. I don't fully understand why I can't just specify a module for children when loadChildren will happily take one asynchronously.

>I can understand you’re opinions about the module system, but I disagree. For a small to medium size app it can seem like annoying boilerplate that gets in the way. If you’re working on a large app across multiple teams then it’s very helpful. You have a single entry point for all relevant code. You can define the api for that module so other teams don’t misuse what you have built. It can get frustrating when you have a single component that you want to share and you need to wrap it in a module, that feels very unnecessary, but I know the angular team is working on that.

I work on only relatively large teams and I still don't get it. If I didn't want someone to be able to use part of my API, I would just not export it. Further, systems like Bazel already provide package visibility, which is a lot more powerful in terms of limiting the spread of an API imo. I know in Angular sometimes things have to be exported because of the AOT compiler, but that's not a great justification.

>I actually really like that my components are in the dom, I can see clearly where it is, not which div with which class or Id it is. It makes inspecting the tree very easy.

I would've thought it would make this easier, but due to the amount of power you have in the selector for components and the way directives work, I've still definitely found myself confused at times. At the end of the day, I didn't really have a complaint with the way React handled it, aside from the inconvenience of needing a separate debug tool to see the component tree.

>RxJS can be difficult and hard to learn, which doesn’t help that the docs are meh and you can never find exactly where to go.

To be honest with you, I found the RxJS docs to be OK. It is a bit hard to search them, but most of the information I actually needed was available if I did. I personally had more trouble finding answers with Angular than RxJS.

>Juniors really need someone to help them not leak subscriptions.

I don't like the way you've worded this because it heavily implies that it's mostly only an issue for junior developers. However, I've seen some very tricky takeUntil setups that are surprisingly nuanced. If your async chains are simple it's easy to define the lifetime, it's not so easy when your chains lifetime may be a subset of your components or services lifetime.

Interestingly, if we had things like higher order components, we could turn the problem into a component lifecycle problem, which is what React likes to do. I miss being able to encapsulate problems like that.

>Though if you follow Angulars promoted idea of using the async pipe, then that will automatically clean up your subscriptions.

I use the async pipe where possible because it does offer a reprieve from manually managing things like lifespan. Sadly, there are a lot of times where using the async pipe is not super nice. Let's say a value that was synchronous has become an observable, now if I was using other pipes or using the dot accessor suddenly it becomes more complicated. Generally I just give up at that point.

>Again, for small components/apps it feels way overkill, but it feels oh so nice when your trying some complex async stuff and can handle it and pass it along so easily.

With the caveat that it actually does not map all complex async problems elegantly.

It is super nice for some common cases like implementing type-ahead, and I generally use RxJS even outside of Angular nowadays because of the fact that it's just easier to express complex asynchronous behavior with it, but there have definitely been moments when I realized my somewhat complicated RxJS code could be replaced with relatively simple use of async/await and a for loop :|

I have a very large number of Angular gripes other than what I listed, so please don't take it to be exhaustive. I just wanted to illustrate in great detail the ways I did not like Angular because if I don't do that many people will assume it's because I didn't give it a fair shake.

Re: Things I Don’t Know as of 2018

#142
post #63

Earlier quoted context omitted.

[not OP but I can remember feeling the same, also I haven't done a big redux project in about a year] I haven't looked at the docs in a while but I'm not sure that's where the big problem lies. The hard thing about Redux is that you need to "get" the core concepts (not that complex), and how they interplay with how (and when) React renders component subtrees (very complex - this requires a new understanding of react…

Yeah, the docs can't solve everything, but I'm hoping we can improve the structure, the content, the reading flow, and how the prerequisite concepts are handled. As part of that, I definitely want to have new category sections on "Using Redux with a UI" (which would include both how that works in general, and specific pages for use with React, Angular, Vue, Ember, etc), and "Real World Usage" (which could cover thing…

> As part of that, I definitely want to have new category sections on "Using Redux with a UI" (which would include both how that works in general, and specific pages for use with React, Angular, Vue, Ember, etc), and "Real World Usage" (which could cover things like app structure, code splitting, choosing a side effects approach, and so on).

Those new sections sound awesome! Kudos for thinking about adding them to the docs.

Re: Things I Don’t Know as of 2018

#143
post #53

Earlier quoted context omitted.

>My "thing I dont know as of 2018", just for good measure: How to build complex front-end applications without making a complete mess of things! If you find anyone that truly knows the answer, please let us know :) I'm sure plenty of people claim to, and many more will just claim that the mere concept is flawed so there's no point, and there are even more non-answers. But the actual problem is very difficult. I remem…

A few things that have made creating new React projects easier for me: - create-react—app or Parcel bundler, both of which require zero config. CRA is easiest but I’m not a fan of their defaults for Typescript (which is to prevent the app loading in dev if you have any tslint or compiler errors, even if they are just warnings) so once I’ve messed around fixing that, it’s almost just as easy to use Parcel. - For websi…

I disagree with CRA because it promotes developers avoiding and fearing configuration files. If you are a full time front end developer and your shop uses it you NEED to learn Webpack/Babel/NPM/etc because it is a short up-front investment, will save significant amounts of time, and will lead to a noticeably better product.

We're talking about hours of study leading to a long-term hundreds of hours of time saved.

Re: Things I Don’t Know as of 2018

#144
post #63

Earlier quoted context omitted.

[not OP but I can remember feeling the same, also I haven't done a big redux project in about a year] I haven't looked at the docs in a while but I'm not sure that's where the big problem lies. The hard thing about Redux is that you need to "get" the core concepts (not that complex), and how they interplay with how (and when) React renders component subtrees (very complex - this requires a new understanding of react…

Yeah, the docs can't solve everything, but I'm hoping we can improve the structure, the content, the reading flow, and how the prerequisite concepts are handled. As part of that, I definitely want to have new category sections on "Using Redux with a UI" (which would include both how that works in general, and specific pages for use with React, Angular, Vue, Ember, etc), and "Real World Usage" (which could cover thing…

> As for the "boilerplate" line... everyone throws around this word, and everyone means something different. Could you clarify what specific things you're thinking of when you say that?

As stated before I haven't done a big JS project for about a year now. In the last project I did we used redux in a create-react-app. At the time the best practice was creating presentational and container components[1].

The biggest boilerplate was:

- Whenever we added a react component (presentational) we would need to create a container component to wrap it in, this would always result in ~20 or basically the same lines (in our project we did things pretty verbose, so we didn't have a HoC or whatever people use).

- "immutable update logic", reducing deeply nested objects is a pain an error prone (using es6 spread or Object.assign), I've heard about some libraries that can help with this, but we didn't use anything at the time).

> FWIW, we have a new package called `redux-starter-kit`

I am most definitely going to use this for an upcoming project!

[1] https://medium.com/@dan_abramov/smart-and-dumb-components-7c...

Re: Things I Don’t Know as of 2018

#145
Great post. I tackle the problem of being aware of things I don’t yet know or fully understand by maintaining an [open Trello board](https://trello.com/b/cu32qF3q) that lists topics I want to learn in a visual way.

I then mark off topics I am focusing on learning now and topics I want to learn ‘Next’. This helps me greatly. I also try to learn things in context of projects I am working on and the direct knowledge I need to solve the problems I have.

Re: Things I Don’t Know as of 2018

#146

It's on tangent but I owned an agency before and my employees under NDA wrote opensource projects for celebrity developers. It was effectively a GhostCoders for hire service. Out of them a few developers got very popular. It was a matter of luck more than anything. Anything can catch wind anytime, we just needed to keep up with the trend. One way to catch this is coding style. Since, we employed GhostCoders - style v…

This is disgusting. I’m not condemning you for finding a gap in the market — that’s totally fair play. But the fact that this can exist and that we have a culture of celebrity in software development at all (especially in such a dishonest way) is just disgusting.

Yes, this is hacker news. We've to find hacks in the capitalism to get ahead in life. As long as it's legal, it's good for us.

Since we pay well, don't see any problem.

Re: Things I Don’t Know as of 2018

#147

Very surprised that he is not expert at functional programming... I always assumed that all the folks behind React were driven by a desire to make web programming more functional generally - that this was an ideal toward which they thought we should be working. And furthermore assumed that this was informed by a deep understanding of functional programming generally and the reasons why it is desirable as a programmin…

I wonder, do we have the same friend...

Re: Things I Don’t Know as of 2018

#148

Earlier quoted context omitted.

"I understand the concept of types and can read annotations but I’ve never written it. The few times I tried, I ran into difficulties." I know it's part of the "typescript" section. But it honestly sounds like it is quite general. I looked his github, and his only C# experience seems to be a tictactoe made in 2014.

Author here. I’ve worked on C# codebases professionally for about four years. They’re not open source because half of that time I worked on enterprise software (ASP .NET MVC, Entity Framework, NHibernate) and another half was a closed source product (Xamarin aka MonoTouch, Rx). Prior to that I worked a little on an open source static analysis tool (Gendarme) using Mono Cecil. Prior to that I was moderating the .NET s…

Hey. Thanks for Redux, and thanks for this blog post. It’s refreshing.

I’ve mentored a few junior devs in my day, and this kind of thing would have been really helpful to encourage them to keep pushing.

Re: Things I Don’t Know as of 2018

#149
There's a risk of being a "Jack of all trades, master of none" in Software Engineering.

Companies pressure Engineers to be "Generalists" because it lowers salary rates and makes people more replaceable. But it's the Specialists (like Dan) that drive actual innovation.

Re: Things I Don’t Know as of 2018

#150
post #38

Is that guy really an experienced developer? He's obviously talented but experience and talent are different things. It sounds like he has less than 10 years under his belt.

I’ve been learning programming since 12, got first software job at 18. I’m 26 now. So depends on how you count.

And not that many technologies.
Post reply on HN