D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Not OT, but apropos of nothing

 

On Sat, 24 Aug 2013, tom wrote:

On 24/08/13 08:15, wes wrote:
it is verr pritteh tree of functions, depicting what functions are
called by what other functions.  given an html document with some
javascriptses, can i haz it?

or can the relative scopes of variables be depicted as a collection of
trees?

maybe these sorts of things would be less illuminating than i imagine.

These things can be illuminating but on anything slightly complex they get a bit spaghetti quickly.

sure.  spaghetti in, spaghetti out.

double the spaghetti!

There is UglifyJS which apparently contains an API so you could have a look at that for parsing the JS and getting the info you need and rather than making an overcomplicated graph simple HTML with links to the caller and callee etc, scope could be covered by indentation and colour?

uglifyjs is definitely in the neighborhood.  awesome.

checking it out.

thank you.

There is of course the chicken and egg problem - if you understand coding the above is unnecessary and if you don't it wont really make it a lot clearer.

yeah, i hear you there.  guess i'll see how it goes.

I think JSlint can tell you how bad some of your code is so you can fix it and COMMENT IT! Must try that myself sometime!

:)

// jslint.js
// 2013-08-13

// Copyright (c) 2002 Douglas Crockford  (www.JSLint.com)
[snip]
// WARNING: JSLint will hurt your feelings.

also:

// The Software shall be used for Good, not Evil.

i guess that means create a group 'good' and restrict execution to
members of good.

due diligence.

-wes

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq