|
Thanks.
I did a lot of embedded development, mostly with soft real-time requirements; logging was the first and best tool for debugging all kinds of problems then, and it still beats an interactive debug session except for the simplest errors (the ones an experienced programmer typically doesn't make ).
For complex apps, I have my own log class with categories one can interactively raise and lower thresholds for; I include log statements from the very beginning, and whatever debugging code I add, I never remove it again (it is part of the code, part of the effort, why throw it out?)
|
|
|
|
|
Excellent response, Luc!
It reminds me a bit of my former career designing automated test systems for missiles. The #1 rule of Testability: A Testable product is both Observable and Controllable. All electronic control systems use feedback; an open-loop system is inherently undesirable, as functional accuracy is limited to component accuracy without active feedback. But if a tester cannot see interior points in the circuit, and can't open the feedback loop to measure values inside, it is not possible to test the circuit. There also must be a means to force a change of state in the circuit and observe the results in order to make an effective test.
The same principle applies to software; if you can't observe the internal states, you can't expect to diagnose a problem when it occurs. Logging - not only errors, but the system states before and after a fault - makes diagnosing the cause of a problem far easier. In many cases, it probably is the only way to diagnose a failure.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Thanks Roger.
|
|
|
|
|
Thank you so much Luc for your awesome response! I will definitely create a logging class as it sounds like the best option.
|
|
|
|
|
you're welcome.
|
|
|
|
|
hi, I am working on a cyber cafe program and using sql server express. Will I need to install sql server to the target pc's to use my program? And is there anything that I should be careful when compiling?
|
|
|
|
|
Maybe.
More detail would be helpful. Is it client/server? Only the server needs the server software.
|
|
|
|
|
the program is a client/server application and only server will be using the database locally
One more question: if I compile my program, is the database I created included in the compilation? (I use VS C# Express with Sql exspress)
|
|
|
|
|
teknolog123 wrote: is the database I created included in the compilation
The data files? No. But you could include them in the deployment/installer project.
|
|
|
|
|
|
If you run your program locally as a server, you need to install.
I think what you should be careful about is the connecting string of your database file.
|
|
|
|
|
Hello
I've just find out a strange behaviour of the ComboBox
If you set the DropDownWidth property of a combo the Width it not activated if the dropdown list is opened by typing text in the combo (SuggestAppend mode)
However if you open the list using the Combo button the given width is taken
And after the width is activated either using the button either by resizing the dropdowlist manualy the width setting remain active until the form is closed
How can I directly set the right width (is there an opening event that I can use)
Thanks for anu suggestion
|
|
|
|
|
hi men and womans
I want to send mail to yahoo
but some problem occured
as you know I used smtp class
and I wrote the server name for yahoo like that
smtp.mail.yahoo.com
but the an exception with message like that "server dose not support secure connection"
and thanks
|
|
|
|
|
Try setting EnableSsl property to false or see this[^] thread.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Hello everyone.
As far as I know Jagged array is also called "array of array" does that mean that I can use a definition like int[][][] Jagged Array = new int[3][3][]? And does it mean "array of array of array"?
I mean if I use something like that does it contain 9 arrays in it? if I'm wrong how can I define something like that?
Thanks in advance!
|
|
|
|
|
|
Almost, yes it would be "an array of (array of (array of ints))" (with parentheses for extra clearness)
However, you can only create 1 array at the time, so you can make a new int[3][][] , but then you'd have to loop over it and fill every entry with a new int[3][]
You would then have 9 places in which you could put an "array of int" (but they are all null ) so only 1 + 3 arrays in total (the outer array and the three middle arrays). (until you also create the arrays of ints)
It's not all that useful to do this though (when all sub-arrays have the same length), you might as well make a new int[9][] and index it with [3*i+j] instead of [i][j] , which takes much less code (you don't have to fill the outer array with arrays). You could extend this to three dimensions if all arrays of int will be the same length.
|
|
|
|
|
|
Hi Sokka93,
For an excellent discussion of "jagged arrays" compared to "multidimensional" arrays, see : [^]
For performance comparisons of jagged and multidimensional arrays see : [^]
best, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
|
HI All,
I need to write a routine that read, at same time, 3 files and raise each string on 3 separate event handler.
I think that the correct way to solve this problem is multithread. It's correct?
Can you help me with an example?
Thanks a lot.
Alex
|
|
|
|
|
Can you provide more details?
|
|
|
|
|
I need to read, at same time, 3 files that contain info to horse race. This 3 files contain the info for position istant by istant any horse (time info, x and y for draw point on virtual circuit). The start is equal for ALL, and I need to draw the position of any horse at same time ... and know how arrival first, second and three after passing the virtual "end line" ...
Alex
|
|
|
|
|
How the drawing is initiated?
For example:
I have to update my animation when one of the files is updated on the disk.
Or
I have to update my animation with specific time intervals.
|
|
|
|
|
in 2 mode:
- In real time from event receive from 3 comPort
- in post processing by read all files saved on hard disk (read time field saved internal)
Alex
|
|
|
|