Check out this article. Unbelievable. These guys need to be in college (but can't afford it).
http://www.wired.com/wired/archive/13.04/robot.html?pg=1&topic=(none)&topic_set=(none)
Check out this article. Unbelievable. These guys need to be in college (but can't afford it).
http://www.wired.com/wired/archive/13.04/robot.html?pg=1&topic=(none)&topic_set=(none)
How often do we code something like this:
for each object O in ObjectsCollection
SharedFunction.Processing(O)
do some stuff
SharedFunction.WriteToDb(O)
nextA little background The SharedFunction.Processing call does some SQL reads. I'm using the SQLHelper from Microsoft.
Problem
The problem is that with the above code after about 120 objects O I'm getting an error. Connection Time Out or Max Pool Size reached.
The Cause
It is such a tight loop that garbage collection isn't having a chance to clean up the left over connections from the Processing and WriteToDb.
Solution
The solution I used was to force a garbage collection. Then everything is honky dory.
Currently their is a "global" of sorts that carries the SQL Connection string. I didn't want to mess with a global connection as that's just asking for problems. However, an alternate solution could be to refactor SharedFunction.X to be instance functions, instantiate a connection in the instance and reuse it with the instance functions.
After looking at this some more, the alternate solution really isn't that nice to implement. It would require modification of two Business Logic Layer code modules and their associated Data Access Layers. I'd rather not be worrying about carrying a connection around and be more focused on what I'm really trying to accomplish.
I read this with interest. I would have to agree with it from my own personal observations.
What does this mean to us in terms of software development? Is it better to end the day (or go to lunch?) in the middle of a task?
The Zeigarnik effect is the psychological tendency to remember an uncompleted task rather than a completed one. Bluma Zeigarnik first discovered this effect in the 1920's while in a viennese coffee shop. She noticed that a waiter was able to...
[Rachel Davies]
The audio that spewed forth assaulted my ears and shook my core. The piercing highs made me wince. Mushy bass churned in my stomach, like a bowl of left out too long cereal.
Ok, so I believe in looking at the world around you and seeing if there is a metaphor their that goes along with some concept I've learned. The other morning I was cooking an omelet and saw how the steps I was taking fell in line with the primary functions of management. POSLC: Planning, Organizing, Staffing, Leading and Controlling.
Decide what type of Omelet - what you want in it. | Plan |
| Gather ingredients | Staff |
| Prepare cook area and ingredients | Organize |
| Saute the ingredients w/seasoning | Training |
Cook the omelet
| Management functions
|
| Eat the omelet and smile | Appraise and give feedback |
Well for the second time I've washed a flash drive. The first flash drive came through ok, although my level of confidence in it's reliability dropped significantly. This drive seems to be sealed much better. We shall see later today how it faired. This has got to happen more often than we'd think.
UPDATE: The drive seems to have made it OK. Both drives are made by SanDisk. One is the Cruzer Micro and the other a Cruzer Mini. The only issue I've had is that the caps don't seem to fit very well now... too loose.
Be careful to make sure that ALL moisture is removed from the drive. Water can real a do job on your device by causing corrosion between the legs on the SMT components. You can try and remove by flushing with rubbing alcohol and placing the USB drive in a container of uncooked rice.