|
The more complex the system, the more spectacular the failure.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
|
On the bright side, after losing so much blood it won't take too much Gin to get to the altered state.
I feel your pain with git (almost feels like we should call it something like It-What-Must-Not-Be-Named).
|
|
|
|
|
I'll just leave this[^] here shall I?
|
|
|
|
|
Ah, I see I was right.
Now the question is, can you repeat the process for the next set of changes?
And if you're not, use a GUI like SmartGit/Hg!
Marc
|
|
|
|
|
Get a bloody mary
Loading signature...
. . . Please Wait . . .
|
|
|
|
|
Hi All,
Need a whinge about the lack of documentation for some instruments I am using and having to interface to in the process of building the test rig for a customer. In the past I have used TTi instruments for ATE work and have a good understanding of them. They do the send them a command once the command has been operated on they send you back a prompt (a '>' ) to let you know it's safe to send another command fine you wait until you see a '>', I am told to use another companies the procedure appears to be send a command and get a line feed back. Fine, so you wait for a line feed, get a line feed and send the next command and splat! it all goes very wrong. Looking through the software I was told to fix (impossible!) I could see a these Thread.Sleeps() Looking at I thought oh that's bad, should do that with 'Sync Locks' to ensure data is correct and Thread safe. Face + Palm I can't seem to get it working I have had to use Thread.Sleep to allow for the instrument to reply. It's wrong but I can't think around it. Why reply when a command is given (even incorrectly) if you can't act on another. I get the impression these instruments are not really intended for ATE work. Sorry whinge over!!
If anyone reading this (if you got this far) is writing code for instrumentation bear this in mind. Here ends the rant!
Glenn
|
|
|
|
|
"Mein Kampf", by Glenn Patton: volume III?
"Ve must round up ze non-conforming instruments and '>' zem..."
[edit]Typo on your name.... - OriginalGriff[/edit]
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
You must at some stage have had a similar problems (from your profile), how is done properly by a professional rather than some one like me (rank ammeter) . Thread.Sleep() I view as the same as DoEvents, A solution but not a good one!
|
|
|
|
|
Call me Mr Doofas-Frapbrain, but I thought DoEvents released the thread and was more like thread.notify() .
|
|
|
|
|
Threading, I know little about so I maybe wrong but I was under the impression it emptied the messaging cue (so it looked like it freed up the multitasking, but not quite always). thread.notify() I haven't seen before so I will have a look! Thanks, I was of the view that my message was too long (I needed to vent over this) I'm more amazed that someone read it and didn't complain to the hamsters!!
|
|
|
|
|
It does - DoEvents empties the message queue and dispatches messages, and almost every .NET application uses it, but it's "hidden": ShowDialog calls it to allow the dialog to be modal and the "parent" form to continue to update. It's there, but it can cause some horrible, horrible problems if it isn't used carefully - so the "blank ban" on using it is the same as for goto - it should have "until you know what you are doing, a couple of years experience should do it". I haven't used DoEvents for twenty years...
Thread.Sleep is different: it takes the current thread and stops it doing anything until the time is up. So if you call that on the UI thread...the interface stops updating, and the user thinks your app has crashed. So generally it's a poor idea. But...if you are doing something on a non-UI thread then it is a good idea, and more efficient than a timer. Did you know that the SerialPort.DataRecieved event is never executed on the UI thread? So any code that is handling this data can safely call Thread.Sleep without any problems if it has to "wait" for an external device to "catch up" and be ready for new commands. It's a PITA, yes - but sometimes we have to work with awkward hardware...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
notify() may well be a java thing.
|
|
|
|
|
Yes, it is!
|
|
|
|
|
DoEvents() is a cheap trick from VB6 (as I recall) to keep the whole program from freezing and dying (just in case you created a deadlock somewhere)
Edit:
I worked on a project where it was liberally spread throughout the code in place where you really wouldn't think context switching was necessary, but if they were removed, it broke.
|
|
|
|
|
External physical devices are often really badly written from the point of view of automating them.
|
|
|
|
|
I went through the same thing. Measurement instrumentation, synched using threading by Sleep().
I have actually never found any real use to the Sleep function.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Entropy isn't what it used to.
|
|
|
|
|
|
You uninstalled Windows 8...It's obvious!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Your huge list of pending Windows Updates finally got installed?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You deleted your porn history?
|
|
|
|
|
I thought we should be keeping that at safe and sound place where space shouldn't be an issue !
Not on C drive which is reserved for OS as it needs frequent updates/reinstallations !
Thanks,
Milind
|
|
|
|
|
You got a 100gb drive and installed something else that was 6 gb?
There are no secrets to success. It is the result of preparation, hard work, and learning from failure. Colin Powell
|
|
|
|
|
The volume shadow service decided to get rid of some old crap?
Have a look at vssadmin from the command prompt.
(Not sure whether that's something it'll do on its own...every once in a while, before I back up my VMs, I have vssadmin delete shadow copies, then followed by shrinking my dynamically expanding disks--very often, I'll find that an 80GB VHD drops down in size to 40GB)
|
|
|
|
|
An old topic, but in the Q&As I've seen a lot of questions about cross-thread failures in UIs. It gets asked time and time again and yet is so very basic. There must be a million and one things on the internet about it, so why can't people just Google around a bit rather than charge in and demand an answer? Or even more radical, buy a book and learn a bit about the subject?
Whilst the intentions of Q&As are admirable, I think by answering questions such as this we are just aiding the demise of experienced developers who know their field. Seriously, why should we bother to help people who make no effort themselves? Oh yes, reputation points.
Regards,
Rob Philpott.
|
|
|
|