4,299 reputation
1121
bio website None
location North Carolina
age 50
visits member for 4 years, 3 months
seen Apr 22 at 19:42
Software Engineer

Apr
22
comment Please tell me I'm not alone (can't program on paper)
I can "almost" relate to not needing pencil and paper for software development but I can't see how you wouldn't at least replace that with something like a whiteboard. While most problems can certainly be solved using tools on a computer, occasionally I need to to "write" what I know on the whiteboard, sit back and stare (sometimes for quite a while) until the solution reveals itself. There's something about actually writing something down that makes a stronger connection to the mind than typing or drawing on a computer. But that could just be me.
Apr
22
comment Can't figure out class scheduling issue?
Doesn't this problem become even more complicated because not every class is offered every semester? At least when I went to school, that's how it was. FYI, the easiest approach would probably be to work backwards. Start at the desired class and keep adding the prerequisites versus starting with freshman classes and computing a path to the desired class.
Apr
22
comment How to test Windows .NET TCP program handling of connection failure
"mocking" the client or server is simply creating a test client and/or server that specifically performs the types of tests you wish to perform. It can even be your exact application code with the slight modification to instill errors/conditions that you wish to test for.
Apr
17
comment Verifying absence of an event in multithreaded unit test
Do you have to check the results as you go (IOW after each Thread.Sleep) or can you simply set some flags as events occur and wait until all the steps are complete and then you could have 1 sleep at the end. Then just check the flags to verify if events occurred or not. The total amount of Sleep time is probably going to be less this way, which will allow you to give more time for the problem event to be sure it completes. Otherwise, isn't there a requirement for the max completion time and if the event occurs after this time then that means the test failed, like it is reporting.
Apr
17
answered How to test Windows .NET TCP program handling of connection failure
Apr
17
comment Difference between Throttling and Rate limiting in API Management
Maybe you can change your answer to mention that throttling is a "dynamic" form of rate-limiting where "rate-limiting" is usually a fixed cap value.
Apr
17
comment How to unit test a top level method
Jeroen's comment is what I would say, with this addition. It seems like an integration test because you are doing an integration test by the strictest definition. You are integrating with the Team and Candidate classes. However, that's the route most people would probably take. The other route would be to mock your Team and Candidate classes in order to give yourself very explicit control of the results, but I don't know how that might help you because Team and Candidate seem so trivial.
Apr
17
comment Difference between Throttling and Rate limiting in API Management
Did you find this somewhere "semi-official"? In my mind, "rate-limiting" is when a cap is set on the maximum rate of performing some operation. "Throttling" is when the rate of performing some operation is dynamically reduced because the system can't handle the current workload at the current rate so it reduces the rate of processing the operation in the hopes that the system can catch up and then increase the rate of processing once again. Neither definition is specific to a client or server.
Apr
17
comment Class refactoring
1 class per row is certainly an option, just a really, really, really bad option:) After all, your table column could simply be text representing a class and each row can hold its own kind of class. Unfortunately, judging by the OP's question, I think that might be what they are doing:( Either that or they got the row/column nomenclature wrong.
Apr
17
comment Synchronization of resource that has moved out of requests filter range
I am having a hard time thinking of a "concrete" example for you problem. Can you maybe give a specific example? Otherwise, my answer would be, why would an update outside the requested range have any affect on the results. You asked for events in a specific range and you get them. Anything that happens outside the range doesn't affect what happened inside the range.
Apr
13
comment Ant colony algorithm
While there are many variations, I think most of the ant colony algorithms assume that the ant can remember its way back home. IOW, it knows the nodes it visited already. The pheromone's come into play for the randomly travelling ants.
Apr
13
comment Should I validate API output?
It depends on your customer and your contract. If this is an informal project/customer then you may show that everything you are going to do is already being done by the client and avoid it. If you are in a more formal environment then you'll have to do the validation even if it is duplicate work. It may seem like a waste of time but it likely will save your company time and money and could prevent potential legal actions against your company because you've shown you delivered as expected and when things don't work for the client you can show your software does. Must be the customer's problem.
Apr
10
comment Should I validate API output?
What about your situation is "different" from any other type of testing done on software? People typically test a specific input and verify the expected output is received. Whether the client also validates your data doesn't really matter; unless you are also the client then you can do the test as more of an integration level test. Or are you not being asked to validate your code but to validate the message itself before passing it along as part of normal processing? That sounds reasonable but then raises a slew of requirements questions with regards to what happens when the message is invalid
Apr
10
comment Repetitive code over multiple classes. Best way to centralize code?
Seems to me that you need to be working with a 3D class that encapsulates your 3D array; you shouldn't be working directly with the 3D array. Then it becomes obvious where the functionality should go.
Apr
10
comment Should developers be responsible for testing other developer and contractor/vendor code?
I don't know if gnat's edit changed the question but this isn't a duplicate any more IMO. However, this might now be a question better suited for the Project Management site. The bottom line is "What does the contract say?". Agile development makes these situations very difficult. Traditional methods would specify that the customer approves the requirements, the test procedures and development process. At a minimum the contractor has to pass all tests in the test procedure before delivering and claiming Done. This would solve the OP's problem. That's why traditional methods will never go away.
Apr
10
comment What to tell a manager who tells your estimates are too much for a genuine task
@Euphoric-If YOU don't have historical data on how long tasks take but your manager knows about how long it takes a half dozen other people to perform similar tasks then odds are extremely high that YOU are the one who doesn't understand.
Apr
10
comment What to tell a manager who tells your estimates are too much for a genuine task
I couldn't agree with Jan's comment more. If your company (or at least you) don't keep historical records for how long it has taken to complete tasks then your manager's time estimates are probably about as valid as your estimates. OTOH, if you have actual data that shows that on average it takes x amount of time to perform tasks similar to y then there's not much room for your manager to disagree. Then you can start focusing on the "real" decisions that you should be grappling with, The Project Management Triangle. Scope, Cost and Schedule, find the balance the customer can live with.
Apr
7
comment Why are my unit tests so expensive?
@Michal - By any chance do you develop your code in the context of a working application? That's how I typically develop. Thus, unit tests (at the class level) don't typically reveal many bugs for me either. That's why I write subsystem level tests instead and only test individual classes when they have non-trivial processing going on. If you design your subsystem interface well then most internal redesigns tend not to affect the interface and don't invalidate the test cases.
Apr
7
comment Why are my unit tests so expensive?
Don't kid the OP. Writing unit tests takes time and frequently more time than than it took to write the code being tested. And this is true no matter how experienced you are at working with unit tests. Thus, your suggestion of performing automated "integration-level" testing is highly recommended in lieu of blanket unit testing as most errors occur because of misunderstandings on how different modules are supposed to work together as opposed to incorrect implementations. That and error conditions that you didn't think of which unit tests won't catch because you didn't think of them yet.
Apr
7
comment Is lazy loading always required?
@Howls-It is good practice to not write code that is obviously inefficient. I don't agree that it is good practice to write code that is optimized just because. Working, robust and understandable code is far more important than optimized code. Once the system is running then you'll know when particular parts of the code need to be optimized. Also, odds are high that if traffic increases, you are going to have to go back and make changes anyways because the bottleneck will probably not be where you thought it might be.