QUOTE(WongGei @ Mar 4 2023, 04:37 PM)
A senior programmer might not be a good programmer and a junior programmer might not be a bad programmer.
As we see in Big Bang Theory, high IQ != high EQ. Some programmers have the ego that writing code to get the job done and don't border to let other people understand their code, while this kind of attitude is not welcomed by business who is looking for extend-ability and readability. Same as other skilled professionals such as carpenter, they are good in their skill but not good as a team player. They can produce fine work as an individual but they can't build the whole house which require the skill of other professional such as electrician and plumber.
Lets look at a program and see if it is able to fulfill it job and how it can be extended without bring in company politics.
For the above mentioned source, it can handle the new business requirement.
The potential problem here is even with the updated menu.csv file, they are definitely some
nasty clients who put the following orders.
Since You Tiao is the same price as Butterfly Bun and Friend Red Bean Bun and they are exchangeable, is it possible to order 2 You Tiao , 2 Butterfly Bun and 1 Friend Red Bean Bun, and pay the same price as 5 You Tiao?
If you are the business owner, what will you say?
If you are the cashier, how will you enter the order to get the discount price?
If you are the technician who asked to maintain the system, what will you do?
If you are the programmer who asked to change the program / system, what will you do?
Lets look at the menu.csv file after 3 new lines being added for 5 * you Tiao / Butterfly Bun / Friend Red Bean Bun = 20% discount
...
E1,5 You Tiao,4,2,2,2,2,2
E2,5 Butterfly Bun,4,1,1,1,1,1
E3,5 Friend Red Bean Bun,4,4,4,4,4,4
This should be the improved version of the menu.csv
Then with the nasty client request , the owner agree that 2 You Tiao , 2 Butterfly Bun and 1 Friend Red Bean Bun also entitle the same discount.
Luckily, the program is designed to handle this without changes, just update the menu.csv to handle that
E4,20 discount 1,4,2,2,1,1,4
E5,20 discount 2,4,2,2,1,1,2
E6,20 discount 3,4,2,2,1,1,1
.....
And the list goes on.
The programmer was brought in and he just inform the technician that this can be done and the technician manully added all the possible combination into the menu.csv.
So, how long you think the technician will take to update 21 lines (all possible combinations of 3 items)
After 15 minutes, the technician happily update the menu.csv and handover to the business owner, and the cashier happily put up the 20% discount.
Isn't this sounds familiar with our daily life as a programmer and technician?
What is the possible bad thing that you can foresee here?
This post has been edited by WongGei: Mar 6 2023, 06:06 PM