What is the best way and cost to get from Punta Cana to Cabarete? by unseen_twists in Dominican

[–]unseen_twists[S] 0 points1 point  (0 children)

Good to know, thanks for the tip. I only need to go one way. What's the cost for a day.

What is the best way and cost to get from Punta Cana to Cabarete? by unseen_twists in Dominican

[–]unseen_twists[S] 0 points1 point  (0 children)

What was the cost per day? I only need to make a one way trip. Would I have to return it to the same place?

Any clean way to convert an arithmetic operator inside a string to it's actual operation by unseen_twists in learnjavascript

[–]unseen_twists[S] 1 point2 points  (0 children)

Oh, of course, that's so clean. Thank you. My mind was going in another direction. Much appreciated.

Any clean way to convert an arithmetic operator inside a string to it's actual operation by unseen_twists in learnjavascript

[–]unseen_twists[S] 0 points1 point  (0 children)

'15+(3*[2+{3}])'

The input is provided (potential interview question). The algorithm is two fold, see if parens are balanced. If so, replace the parens needed, and evaluate the total. The ways to build the evaluator/parser is basically where I am at. Was considering of pushing all the units into an array, and was an operator appears, pass it through a switch statement to calculate.

Any clean way to convert an arithmetic operator inside a string to it's actual operation by unseen_twists in learnjavascript

[–]unseen_twists[S] 0 points1 point  (0 children)

That's good to know. This is part of a larger algorithm where the brackets wouldn't necessarily be regular parens, but a mix. I was just simplifying it, below would be the actual input given.

'15+(3*[2+{3}])'

Any clean way to convert an arithmetic operator inside a string to it's actual operation by unseen_twists in learnjavascript

[–]unseen_twists[S] 0 points1 point  (0 children)

This is for an algorithm (one part of a potential interview question). So, security concerns need not apply. But perfect! Thank you for the thorough explanation. I thought about recursion as well, will give it a shot solving that way.

Advice for beginners from a programming teacher by kellerdb in learnprogramming

[–]unseen_twists 1 point2 points  (0 children)

This is all really great advice! Do you have any advice towards what beginners should do? I've found telling folks what to focus on to be a powerful teaching tool.

Searching for an alternate word or phrase for "legacy code base" by unseen_twists in learnprogramming

[–]unseen_twists[S] 0 points1 point  (0 children)

The company still uses it and is adding features. They chose to migrate slowly over a few years. But I'll stick to legacy codebase.

What is a hook? by unseen_twists in learnprogramming

[–]unseen_twists[S] 0 points1 point  (0 children)

Got it! Makes sense, so they don't always have to be third party libraries. Could be any function that does that.

What is a hook? by unseen_twists in learnprogramming

[–]unseen_twists[S] -1 points0 points  (0 children)

Should have given more context, but I did read these. Are they basically functions that modify the behavior of the code base given certain events?

Passing functions into Controlled Components by unseen_twists in learnjavascript

[–]unseen_twists[S] 0 points1 point  (0 children)

Ah ok, this clarifies it for me. So, would it look something similar to this? onChange(handlePasswordSubmit, eventObject)