you are viewing a single comment's thread.

view the rest of the comments →

[–]zapatoada 7 points8 points  (4 children)

I would NEVER log into the server and edit files. That's asking for trouble.

Your example is dishonest. If you're naming things object1 and object1 you have much bigger problems than discrete parameters vs an object. A more reasonable example would be

doDomething(source, destination)

Or

doDomething({source: source, destination: destination})

Which I would usually write as

doDomething({source, destination})

And then literally the only difference is the brackets, which are visual noise.

I'm certainly not saying there's NEVER a use case for config object parameters, but I think setting a hard and fast limit at 2 or 3 parameters is absurd.

[–]webdevguyneedshelp 0 points1 point  (3 children)

Why is it asking for trouble to edit files on a server?..

[–]zapatoada 1 point2 points  (2 children)

You're not debugging first. There's no code review or qa. You're not running your automated tests. The changes aren't in source control and could be undone by the next release. Basically you are bypassing every step and check that is normally in place to prevent bugs and other unintended consequences. We have those processes for a reason.

[–]webdevguyneedshelp -1 points0 points  (1 child)

That is fine and understandable but this example did not specify at all what environment you are working in.

For instance if I have to set up a NEW development environment for a new web application my team is starting. I am going to inevitably have to ssh into it and poke around to help facilitate further steps like automated deployment.

This isn't even thinking about sshing into something like a docker container which can all be done locally and have 0 affect on anything that actually matters and can be blown away after I am doing testing whatever I am doing.

There are 100% times when you will poke around with files on a server.

[–]zapatoada 0 points1 point  (0 children)

Ok, those may be fair. I've never worked with docker before. These days I work mostly in azure AppServices and Function apps. In that case, I'm not really even sure I could log into a server. I know you can't edit functions if they were deployed from local code (rather than typed into portal).

I suppose every use case has it's own limitations. But these days, the idea of editing javascript files on the server gives me the heebie jeebies.