AsiaCel
卐Mongoloid National SocialistϟϟTKD TTD▐┛
★★★★★
- Joined
- Nov 24, 2017
- Posts
- 18,951
I've had this fat co worker for a long time. He's a good coder, capable of fast coding and debugging, however he has communication like hell.
When you code, there are literally many different solutions just to meet the same goal, some more and some less efficient. He only wants a particular solution.
Once, I had to deal with a duplicated item problem. There were many items, let's call them "item" and "item "
My goal was to 'fix' (there was nothing wrong with the code, nor my new solution was wrong) an function that eliminated items with an duplicated name.
I had tried many times.
Solution 1: using select distinct in SQL, thus, eliminating the duplicated items at the very core
Solution 2: using java stream filter distinct to elimate duplicated items
Solution 3: using linkedhashset to eliminate duplications, cus it automatically overrides an item if it has the same name (key)
The problem wasn't even the codes or the solutions, it was that stupid record at the SQL database itself. I discovered that there was actually two different items, one named "item" and another named "item "
How'd I know that? I logged onto the database after stack tracing the function. If it was really an duplicated item, then the stack trace would stop twice. But it only stopped once.
I then updated the SQL record and.thus fixed the problem, without the need to ever edit code. But he insisted on raging and be like "NOT THIS"...smh.
When you code, there are literally many different solutions just to meet the same goal, some more and some less efficient. He only wants a particular solution.
Once, I had to deal with a duplicated item problem. There were many items, let's call them "item" and "item "
My goal was to 'fix' (there was nothing wrong with the code, nor my new solution was wrong) an function that eliminated items with an duplicated name.
I had tried many times.
Solution 1: using select distinct in SQL, thus, eliminating the duplicated items at the very core
Solution 2: using java stream filter distinct to elimate duplicated items
Solution 3: using linkedhashset to eliminate duplications, cus it automatically overrides an item if it has the same name (key)
The problem wasn't even the codes or the solutions, it was that stupid record at the SQL database itself. I discovered that there was actually two different items, one named "item" and another named "item "
How'd I know that? I logged onto the database after stack tracing the function. If it was really an duplicated item, then the stack trace would stop twice. But it only stopped once.
I then updated the SQL record and.thus fixed the problem, without the need to ever edit code. But he insisted on raging and be like "NOT THIS"...smh.
Last edited: