Amy Blankenship
1 min readFeb 15, 2025

--

I didn't read the whole article, but the part I did read didn't strike me as very senior. For example, the big issue with your first code snippet is it's not very expressive. It should use an array of order statuses that says what the next status is (['Started', 'Paid', 'Shipped', 'Completed'']), and this would avoid the bug that's in this code where orders that haven't been paid or are already completed are going to trigger "Order has an unknown status" even though their status is known. It also will prevent duplicate code, because the logic will then find the current status in the array and simply move it to the next status if there is one. A senior developer would also question whether this code should mutate the orders or whether it would be better to return an new List of updated orders. This appears to be C# code, I'm not sure whether the C# world is ready for that. In addition, one of your examples would benefit if you understood optional chaining, assuming your language supports it. If this is C#, it does.

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

Responses (1)