Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Understand your code better #3

Open
geraldchecka opened this issue Sep 17, 2016 · 0 comments
Open

Understand your code better #3

geraldchecka opened this issue Sep 17, 2016 · 0 comments

Comments

@geraldchecka
Copy link
Member

Introduction

I've been doing Angular 1.X recently and had chance to deep dive into its internals. This totally changed my perception towards Angular. It works great, but it's internals are overwhelmingly complex and uncanny.

Motivation(s)

  • 'step-into' & 'breakpoints' are baby steps into learning the code.
  • They are not just enough when debugging complex ones like Angular/Project-Code-Base/React etc...
  • There's got to be a better way to learn it quick with a helping hand.

Idea

Let's call our imaginary library Alpha. It takes input from a configuration file.
For e.g.,

{
   "watch": "../angular-1.5.1.js",          // Library to watch
   "listenOn": "http://localhost:9000/"     // Your local webpage port to listen to
}

Alpha has an _AST_ parser running in the background listening to execution in your webpage. It will track the interactions on your webpage, like the functions, variables, context, flows etc... and remembers them(including the data state). It will immediately go to the library supplied as inputs in the config, correlates all matching items and pulls out their documentation.
Execution of your webpage ends.

Now you have 5 items in hand

  • Execution flow
  • Items covered (vars, func, etc...)
  • Data
  • Documentation
  • Library file

Combine all the above data and present it in a meaningful information.

Say what all methods in the library have been covered during your webpage runtime and explain their documentation and purpose
How many times the flows are covered
State of your data at different point during app runtime
How much time is spent on individual items
etc...

Peeps can deep dive into the internals in a presentable and meaningful way.

Please feel free to debate :-)
@hemanth @juarezpaf @andreicek @gokulkrishh @josueggh @juarezpaf @manekinekko @mhartington @pselle @radhikakhetan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant