|
I'm starting to see a pattern emerge here.
If it moves, compile it
|
|
|
|
|
It's obvious this guy added the SetDate implementation to a class that implements the IDateRepository in order to facilitate dependency injection and the factory pattern! All the better I say. Should minimize the impact of the Y3K bug and enable unit testing of date functionality against realistic data.
|
|
|
|
|
Let me guess: that guy used to work with VB6, and now he ports many "useful" functions from his year-long experience to VB.NET.
|
|
|
|
|
Yes. He fought using .net in the first place, would not attempt to learn c#, and forces everything to work as if it were still vb6.
If it moves, compile it
|
|
|
|
|
Fire him! No Luddites allowed!!!
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
When i was beggining to make some programs i had to make a small ellectronic book in c++. It started ok, i managed to make a reader and an editor and then came the worst error a programmer can have. When I compiled the program it went smoothly but when i openned it from windows it showed and internal error message whit no message. I suspected it was an I/O error because when i copied the program to c: or d: didnt showed the error but when i placed in other folder that wasnt the root it showed the error message
|
|
|
|
|
the ide was c++ builder 6
|
|
|
|
|
Not really a C++ myself but I was under the impression Borland Builders were one the best.
I was under the impression that the Microsoft versions were created and then Microsoft created the standards to fit, my experience of VC++ is you type a quick test program spend an age trying to figure out why it wont compile, get fed up use Builder6 load the code press F9 away you go!
|
|
|
|
|
If it's Builder 6 turn on CodeGuard. Run the application and then look at the code guard log. There's a decent chance it will just tell you what's wrong. It could be as simple as an assumption about paths and/or permissions. It could even be an issue of finding DLL's
|
|
|
|
|
It's just as well you've had an error like this - hopefully if/when you fix it, you'll have a more structured method for debugging in the future. It is not a good idea to write code with the approach of build and run it hoping it works; you have no idea what could be going wrong under the surface.
If I was faced with an empty error dialog, I think my approach would be as follows (Apologies in advance, I'm not familiar with C++ Builder 6)
- Track down 'when' the error occurs. We know it happens as you open the program, so try building some more useful output into the program. It sounds like you're unable to debug line-by-line, so I'd try bringing up an output dialog each time something works properly - print some useful text to say what was done, etc.
- Find the offending operation/function that is causing the issue. With the information you've provided, I'd keep an eye out for any file loading stuff that may be involved; perhaps your file loader can only handle absolute paths and it's being fed relative ones.
- Replace the suspect code with a simple test - instead of trying to load a file, perhaps output a "Loading file [path+filename]" message. If it doesn't come up with the blank dialog anymore, you know which line causes the issue. I'm far more used to debugging by pressing F10 until it breaks in Visual Studio, so this is effectively a more long-winded approach to doing the same thing.
- Fix the offending code. Naturally, you still need to be able to load the file; I'm unfamiliar with your program's requirements, but if it's plain C++ loading a data file (binary or text, usually) then you should have no problems using an input stream[ ^]. I can promise you that this definitely works, and won't give you blank error messages.
If you find errors in your code, it shouldn't matter if you get nonsensical or unhelpful messages - that's often the flavour of the day when it comes to programming. You need to break it down into each step to find out what's wrong, which inherently helps you understand your own code (or other people's code) better.
Happy hunting!
Sometimes a fist in the face says more than a thousand honeyed words.
|
|
|
|
|
I started C programming in Borland's Turbo C/C++ compiler . I didn't reall start C++ until Microsoft's Visual C++ v4.0 .
I love C++ but after learning other languages and delving into functional programming, I can see why some people might hate it.
Interesting post, by the way.
|
|
|
|
|
Not sure what you're saying exactly, but one of the worst things IMHO, that a programmer can think is that program compilation has anything to do with program operation.
|
|
|
|
|
yes i know that but imagine that you cant trace an error because when you debug the executable it doesnt show up,
what would you do?
|
|
|
|
|
Usually that means that there are environmental differences between your DEBUG running and the running that produces the errors. You need to figure out how to isolate these differences and determine why they are the cause of the error. Sometimes the addition of a logfile to write entries to, can help you narrow down the code that is failing.
Oh and this isn't something that just happens to C++. It can happen with other languages too.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
yes I know but at least in managed languages you get a nice error message not a blank error messsage, thats why I hate c++
|
|
|
|
|
And what if that useless message comes out of some library or DLL you are using? How is C++ responsible for that?
One thing is almost certain: You have some unclean code somewhere in there which you get away with in a debug build, but not in a release build. Like it or not, but you are going to have to find that code and then fix it.
At least artificial intelligence already is superior to natural stupidity
|
|
|
|
|
there is no release and no debug, just a regular .exe that when is run from the IDE to debug it goes fine, but when you click it on windows it goes wrong
|
|
|
|
|
Ouch buddy, you don't even know what are you talking about
It must have to be either debug version or release version. as CDP1802 says, clean your code and stop complaining. and also try to figure out what is the differences and what is missing.
|
|
|
|
|
I surely know what i am talking about, HOW TO CLEAN A CODE THAT YOU CANT DEBUG. and surely you have ever worked with c++ builder 6, c++ builder doesnt have a debug and release version it only has a single output, instead of giving new ideas you talk about how good you are and how ignorant i am.
I will make it simple so your mind can understand!!!
step one -you write code
step two -you compile that code
step tree your ide launches the .exe and you try it
step four you test your program and i does just fine
step five you go to the application folder and make double click on the executable
step six the application show and erro message with no error at all
now you get it, how CAN YOU ISOLATE THE PROBLEM and when you isolate it what will you do if you can trace what is wrong
|
|
|
|
|
Step 7a: Read the code and try to locate the problem by analysis
Step 7b: (only if 7a fails) Try to shorten the code to rule out as much of it as possible as source of the problem
Step 7c: Identify potentially problematic code in what is left over and monitor it by logging
Step 7d: Draw conclusions from the logged values, go back to 7b if the results are not conclusive
Step 8: Fix the problem
Step 9: Restore all the code that has been commented out during troubleshooting
And now repeat 500 times 'I WILL NOT SHOUT AT THOSE WHO TRY TO HELP ME'.
Edit: And there is also the tiny possibility that the compiler is a little antiquated and has a little problem with newer windows versions.
Edit^2: Borland C++ Builder is from 2002. 10 years old, meaning it's probably a rare item in computer museums
At least artificial intelligence already is superior to natural stupidity
modified 25-Apr-12 10:20am.
|
|
|
|
|
Thanks for brightening up my morning! Such things make me
|
|
|
|
|
Everybody hold on one minute and take a deep breath. True: the HoS is not for questions. So look closely at the title of this thread and the original post. Vasily did not ask a question, he told a story from long ago (C++ builder 6 came out in 2002) when he was "beginning to make some programs" and ended up hating C++. He was not asking for help, and he reasonably responded to unsolicited advice by reasserting his reasons for hating C++. You may not share or understand the bad taste the experience left in his mouth, but do not slam his competence (he was a beginner ten years ago, remember?) and drag him into a screaming match then bitch-slap him for getting frusterated.
Get a GRIP.
Now...
I learned to program as a kid in the early 80's and was good at it until I tried to learn OOP and windows programming simultaneously without a teacher, using Borland OWL on Win3.1. With no internet. The documentation was...terse. My code was corrupting the bitmaps used for drawing the minimize/maximize/close buttons. My code crashed. Then my code crashed WINDOWS and dumped out to the command prompt. Not kidding. Bad taste in mouth. For Windows, lParam, wParam, C++, Borland, the whole mess. It was definately HoS experience. I still hate C++ on a deep emotional level that will not be mollified by any appeal to reason. Today I program command line apps in ANSI C and couldn't be happier.
|
|
|
|
|
great, at least someone got my message, a lot of great programmers had their bad days with c++ at least i was lucky to live in a time were you have plenty other options, i was only geting out an old frustration and everyone that didnt had a bad time with c++ cant call himself a good programmer
exegetor wrote: I still hate C++ on a deep emotional level that will not be mollified by any appeal to reason.
I really enjoyed that quote it made me laught
|
|
|
|
|
You're a good person!
|
|
|
|
|
http://fbe.am/5JO[^]
here is the software i found it i will give a million dollar to the brainy to tell me whats wrong
|
|
|
|