Announcements
Visit Fusion 360 Feedback Hub, the great way to connect to our Product, UX, and Research teams. See you there!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

pristine sample / stub code [for scripts / plugins]

pristine sample / stub code [for scripts / plugins]

Have never seen F360 build, but I've long suspected that the list of compiler warnings must be a mile long*. Noticed something today that lends credence to that..

 

Brackets [the mandatory / default Javascript editor] uses JSLint. If you make a new plugin, without changing a single character, you get this:

 

Capture d’écran 2016-08-14 à 08.24.56.png

 

The default / mandatory / built in editor reports 12 problems in 27 lines (a little over a page) of externally visible boilerplate Javascript that anyone writing a script will see and base their code on ‽‽‽

 

A couple of those take a little (read: still not much) thought to fix, but all but one of them were fixable in (literally) under 30s with zero thought, and the resulting code fits easily into a single page so it's much easier to grok:

 

Capture d’écran 2016-08-14 à 08.44.58.png

 

That remaining warning smells awful and could be best handled by passing adsk** to the «run» function (and incidentally, it's an undeclared global variable that comes immediately after "use strict" which, among other things, is meant to enforce not using undeclared variables ‽)

 

* incidentally / assuming that's the case: Carl / @promm / etc - please get a couple of competent interns to use «-Weverything» (in fact, make that the default) and have them plow through each of those; it's very possible for a big project to have none and those are all red flags and when the list is a mile long, who cares if whatever you check in adds another page of warnings; when it's zero, you'll put in the extra time to get rid of them. Sure it's a tiny pain in the åss, but it'll save an enormous amount of debugging time (and user frustration) downstream so it's way worth it.

 

** why not just «autodesk» or something more descriptive ‽ I know it's a little shorter but nearly every halfway decent editor includes autocomplete now, so «it's faster / easier to type» is BS, and it encourages people to use abbreviations that will almost always be needlessly opaque 

2 Comments
colin.smith
Alumni
This item has been archived due to a lack of votes. If you feel this item is important feel free to create a new idea station item.
colin.smith
Alumni
Status changed to: RUG-jp審査通過
 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea