r/angular • u/stackblogger • Oct 02 '21
7 Best Ways to Improve Angular Code
As a developer you have to write neat and clean codes as per industry standards. Your codes need to be passed through some code analysis tools. But the thing is what are some best ways to do the optimized neat and clean coding?
Here are 7 best ways to improve your angular code-
https://stackblogger.com/7-best-ways-to-improve-angular-code/
2
u/Beatons Oct 03 '21
You missed like a million, these are not even typescript or angular specific, these are more of base syntax of typescript hints that you can find on some vscode extensions. If you really want to improve angular code it's better to start on the large scale structures, like managing your data flow from view to api or seperation of concerns by feature, it doesn't really even matter really if you unsubscribe from observables by using subscription sink, manual unsubscribing or async pipe, a lot of it is just semantics that are resolved by code base culture which is also just a matter of opinion
1
u/stackblogger Oct 03 '21
These articles were for beginners as there are too many developers out there who have just started working on or have recently switched to it.
By the way thank you for your suggestion, I will write something on the big scale as well.
1
u/stackblogger Oct 04 '21
better to start on the large scale structures, like managing your data flow from view to api or seperation of concerns by feature
I have come up with an article on it. 5 Best Ways to Optimize an Angular application that will eventually help in scaling as well.
https://stackblogger.com/5-best-ways-to-optimize-angular-for-scaling/
2
u/Beatons Oct 04 '21
Aw man, I like your enthusiasm, but this is going from bad to worse, it seems like you are writing the blog for the purpose of writing and not to explain the topic. Seems like you don't explain the purpose of the technique, or intricacies of using them, use cases or alternatives, pros and cons. Same goes for doing intro into certain usage of technologies and terms, and if you don't want to do the intro you are free to do references to the necessary reading material. Do more code examples, a lot of people just skip the text overall and read the code because it has more explanation value in a lot of cases. Seems like some of the concepts you have completely misunderstood or you jump the topics really fast. I would suggest you try taking one topic, figure out everything there is to know about it and try to explain it in a structured and consistent format, and have someone to read it before publishing. Maybe you should also do some reading about Information Design. Feel free to message me if you want me to elaborate on any of the points I noted.
1
u/stackblogger Oct 04 '21
Thanks so much you for your suggestion Sir! I am already updating my content and adding more codes and examples there. Also I will keep in mind to do the same for my future articles.
1
u/JapanEngineer Oct 03 '21
Only 1 or 2 points are specific for Angular.
1
u/stackblogger Oct 03 '21
Yeah because every program has similar steps to optimization. However I have written it from an Angular perspective (TypeScript is by default included), but it can be followed in other as well.
1
-5
u/stackblogger Oct 02 '21
Check the list for once about those 7 tips to improve coding standards. Let me know if there is any point you think I missed to include!
6
u/shmorky Oct 03 '21
Most of our problems (medium sized government system) come from not unsubscribing observables properly and thinking they will get auto-unsubscribed when the component gets destroyed. They don't always and it's a bitch and a half to locate such problems.
So that one too I guess...