What is the quickest way to learn to support Delphi? [closed]
Asked Answered
P

3

8

I have taken over support for some applications written in Delphi. I have programming experience, but none in Delphi, and very little in OOP. In the opinion of experienced Delphi programmers, what is the quickest way to learn how to decipher the original programmer's instruction, and correct some problems in the code?

BTW, the code was written in Delphi 5, and the original programmer is not available to answer questions about his work.

TIA

Purpure answered 15/3, 2011 at 17:44 Comment(6)
This is an impossible question to answer. We don't know you, your capacity to learn, your programming or educational background, or the complexity of the code you've received.Monometallism
If you are good at programming, the programmer's intension should be pretty obvious (Delphi is not an "esoteric" language). The details, well, the best way to get them is to learn Delphi.Priesthood
This is sort of a bad situation to be in, but as bad situations go, this is a pretty good one. Delphi code is very easy to read and understand, (it's based on Pascal, which was originally designed as a teaching language,) and if you have a copy of the Delphi 5 IDE available, you should be able to use the debugger to feel your way around the program.Optician
@Mason: Only when you're assuming it's decently written program. If not, Delphi is just as bad as any other moderately modern language out there. (to avoid a flamewar: I'm not trying to say Delphi is a dated language)Did
@Willem: I'm not sure about that. Bad Delphi code still tends to be easier to read than bad C code, for example. (And I've certainly read my fair share of it!) You ever hear of an obfuscated Pascal code contest?Optician
I voted to close this question, because it's not a real programming question. But if you had asked "how do I learn delphi" (which is what you maybe could have asked), then it would also get closed as a duplicate: #4305876Endocardium
S
3

The Delphi language itself should not be a problem. It's based on Pascal, and designed for easy comprehension - in fact I have often seen what is practically Pascal used as a pseudo-code. Getting OOP is likely to be more of a challenge.

For a good, basic language reference, I'd recommend 'Delphi in a Nutshell' and of course Delphi Basics.

Further than that, it depends on what programming experience you have had, which you have not specified. COBOL? VB? C/C++? LOGO?

And of course there are hundreds of helpful Delphi experts here on Stackoverflow, who will try to pip each other to the post when locating specific bugs in the code if you can find sections where there is a problem - I'm looking at you in particular, @David Heffernan and @Andreas Rejbrand ;-)

Welcome to StackOverflow, BTW.

Secede answered 15/3, 2011 at 18:29 Comment(3)
Thanks. Most of my programming experience is in C and Fortran on Unix (and other, obsolete) systems. I have used Microsoft Visual Studio in developing and supporting applications in Fortran & C++ on Windows XP.Purpure
The question has been closed, which is fair enough, as it is a bit vauge. I started with Delphi from a similar point though, so I'd reccommend a couple of more books.Secede
Darn that 5 min limit. However - I started with Delphi from a similar point. There are plenty of good books on Object Oriented programming, but I found "An Introduction to Object Oriented Programming" by TA Budd useful - started from the basics, introduced the jargon, but didn't rehash basic programming, and had code examples in multiple languages, including Delphi. Also an obscure title "From COBOL to OOP" by Markus Knasmuller helped me first get the point of OOP, again with Delphi examples.Secede
S
2

In your case, I would say "learning by doing". If you have some programming experience, you should be able to follow the steps in a Delphi program.

1) Open the project in Delphi 5
2) Open a form (window) by pressing Shift + F12
3) Select the component that invokes the code you want to inspect
4) Press F11 to get the Object Inspector, and find the event in the "Events" tab
5) Go to the method by double-clicking the event
6) Insert a breakpoint (F5)
7) Run the code from the IDE (F9)
8) And step through the code lines with F7 (steps into sub-routines) and F8 (step over sub-routines)
9) Watch how variables change by Watching them with Ctrl + F5
10) If you need to get help about some code, press F1 (help was still good in D5, AFAIR)
11) Google it and StackOverflow it

Check this question for good newbie Delphi books, and this question for general Delphi learning.

Sward answered 15/3, 2011 at 18:59 Comment(0)
L
1

I think this would be a good place to start. Teach Yourself Borland Delphi 4 in 21 Days

Lovash answered 15/3, 2011 at 17:56 Comment(5)
+1, if for no other reason to "compensate" for the unmotivated downvote.Priesthood
I didn't downvote this, but I'd be very leery of any resource claiming to teach programming in 21 days.Optician
@Mason Wheeler - I agree. This might not be a bad book for the OP, though; it's written by Kent Reisdorph, one of the senior programmers at TurboPower back in the day (see the Introduction, About the author).Monometallism
@Andreas Thanks, the silent downvotes is sad. I guess not everyone is here to be helpful.Lovash
@Mason Wheeler The book does not claim to teach programming.Lovash

© 2022 - 2024 — McMap. All rights reserved.