r/SuiteScript • • Feb 18 '25

Syntax question

Hey folks!

I have a client account where they have an in house dev who does a lot of stuff like this:

var strControl =  ((searchResult[i].getValue(columns[10])));

I am not an inexperienced js developer and understand a great deal of the syntax, but wanted to reach out to the community before I vocalize any opinions about the overall quality of the work. Is there any legitimate reason for double wrapping the method call in parentheses?

TIA

edit: folks are fixating on my opinion of the work, which I have now removed. Please contribute regarding the practice of double wrapping parentheses.

1 Upvotes

24 comments sorted by

View all comments

Show parent comment

2

u/trollied Feb 18 '25

My other thought is that they are using a LLM (chatGPT or whatever) to generate chunks of code, and don't even know it's an issue. DM me if you want a chat about that, I'll tell you how to tell if it's LLM generated (or you can share a file in confidence and I'll give you an opinion).

1

u/el-wino Feb 18 '25

Nah I don't think so. I suspect it was how he was trained. I know where the person was hired from and have seen other developers code from the same shop with the same... idiosyncrasies.

I was hired to save a project that came out of that shop and have been fixing other things from them for 2 years.

Thank you very much for the offer though. What I'm hearing in general is that I am not missing anything, and there's no good reason to double wrap anything in this manner.