Q: Have you ever programmed with Pascal?
A: Yes, Borland turned me into
a real programmer with Turbo Pascal 3, before OOP. Borland simplified
everything, gave you a great environment, and sold it at a very low price.
It's the same thing now, with Delphi and OOP.
Q: Have you ever programmed with C/C++?
A: I programmed in C, but I
never had a need for OOP in my work, and Turbo Pascal was adequate for
all my DOS needs.
And since this was pre Windows, all OOP programming was like building
with Sand.
Let me explain that. In fact I said this in one of my Lessons.
I don't want to offend anyone but; programming with C++ is like
programming with Sand
with Sand you can make Bricks in HOURS
with Bricks you can make Walls in DAYS
with Walls you can make Rooms in WEEKS
with Rooms you can make Houses in MONTHS
With Delphi you work with Rooms and make Houses in HOURS.
Q: What version of Delphi did you use first?
A: I started with D1, but did
not do much in Windows 3.1 UUUUUGGG!!!
Q: What is it you like about Delphi the most?
A: Its Elegant Design (I now
love OOP). The IDE (Environment). Also, the speed of the compiler
and the great source code Debugging environment.
Q: What do you dislike about Delphi the most?
A: Not very much. The
BDE (Database Engine) is a little frustrating at times.
Q: What other programming languages do you use at the moment?
A: I use TP7 for DOS and C for
micro controller Firmware. Talk about Sand!!
Q: Do you use Delphi at work or at home or both?
A: Since I work at home, Both.
Delphi is both the most fun that I've had in my engineering experience;
and it can also be the most frustrating thing.
Q: What do you think are the most important things a programmer
should have? (Good monitor, chair,
books etc.)
A: A 17" monitor really helps
let you see more stuff, and with Delphi you have a lot of stuff.
And all the books that you can afford. Also a Delphi friend that you can
call and email.
Q: What Internet sites do you run or have projects on?
A: I just started getting into
Web sites. There's a possible whole new Lesson on getting your own
Web site up and running. You need special ftp programs to upload and download
your web pages. HTML, Tables, Frames, Styles etc. are done a little differently
from Browser to Browser; even from HTML Editor to editor.
Q: What programming Newsgroups do you use the most?
A: The Borland ones are the
best. DB, IDE, VCL, 3rd Party, Object Pascal. Going there, you realize
that there are some very smart people in the Delphi community. And
they all seem willing to help newcomers. That's another great thing
about Delphi. There are a lot of people, sharing with others, because
it feels good; not for money. Money can't buy that.
Q: Do you have any advice to new users of Delphi?
A: That's a topic for a book.
Read my Lessons. (Ha) Here are a few off the top of my head.
- Buy at least 1 good book
- Get a guru or a friend who knows
Delphi, to show you some things
- Learn what the main Components
do LISTBOX, TABLE, QUERY, DBGRID, ...
- Have places to go for HELP:
- F1,
Help(Key Search),
- use
Windows FIND to search all *.pas files for the Component or function
- look
it up in your Book's Index
- email
friends who use Delphi
- go
to the Newsgroups and post your questions
Q: Do you consider Shareware worth considering for a new Delphi
programmer?
A: For a new programmer, No.
Delphi is complicated enough, without having to learn more stuff. Delphi
can do much more than you need, right out of the box. Later when
you see what's missing from Delphi's Components; then you can get some
Freeware and some inexpensive Shareware that enhances your programming
tools. But at the start everything looks great and you want it.
There is some excellent Shareware for under $100.
Q: What books and magazines do you recommend for a new Delphi
programmer?
A: Check the newsgroups for
any book recommendations. I'm out of date; most of my books are for
D2 and D3. But they still are useful. Mastering Delphi 3, Delphi
In Depth, Delphi Unleashed, ...are ones I use a lot.
Q: What web sites do you recommend for a new Delphi programmer?
A: Well I sure didn't find any good
Tutorial sites, last Dec. That's why I started my Lessons.
It's amazing how few good learning aids are available for the beginner
and intermediate programmer.
Either they give you tons of tiny pieces of code, or they have a
Tutorial with 2 lessons on how to put a Button on a Form. Thanks a lot.
Or they immediately get into the Win API and building Components and forget
to give help on Delphi's basics.
Q: Many rumors are going around about Delphi or Inprise not surviving
the next few years, what do
you think about these comments?
A: I don't know what's going
to happen, but learning and using Delphi will give you a really good head
start with any other language; C++Builder, VC, VB etc. So you can't
loose learning to use Delphi.
Borland is still a great place to go, to learn how good programming
should be done. And it even got me to be a tried and true OOP pusher.
Q: Do you have a wish list for future versions of Delphi, if
so what?
A: Yes, make it better then
VB6's IDE, improve their Components, Help file and add more Macro capabilities.
Also make it easier to create and modify Components. I really do
not like to do any API programming, there are tons and tons of parameters
and functions that I really don't need or want to learn. Delphi,
should encapsulate (wrap) all that windows (excuse the expression - rubbish)
into easy to use and understandable chunks. I don't want to write
OOP software from the ground up, but I love using a well designed OOP environment,
like Delphi. Also improve the StringGrid, DBGrid, MaskEdit
and the BDE. I just looked at VB6 and they list Properties
in their Object Inspector 2 ways:
Alphabetically (like Delphi), and Categorized by function.
I hope Borland incorporates Categorized Properties in D5.
Q: Frank, you have Delphi Tutorials for new users, how did this
project get started?
A: For the last 6 months I have
been teaching Delphi to 2 people in our Oregon office. Then last
December I started to search for any free Tutorials and programming aids
on the net; and was totally disappointed with what I found. So, I
decided to try and create a Tutorial that would have helped me, when I
first got started learning Delphi. Delphi has so many features, functions,
etc. that it is a little overwhelming to the beginner. What is important,
What isn't; and How and When do you use them?
What are the Watch Outs (don't do that) and strengths and weaknesses
of all the Components.
Q: What do you want/expect new Delphi programmers to learn from
these Delphi Tutorials?
A: Well, I just want to give
programmers more resources and tools that will speed up the learning process.
I started out as a Hardware Engineer, but now do almost all Software design.
As I always say; "You build Hardware once, then you write Software till
you die". I am by no means a software expert. I am more of
software user, rather than a component developer. But I can give
the new programmer a different perspective of Delphi; and try and present
things a little differently than books do. I started out with this
rambling style in the Lessons; comments, watch outs, don't do this, Frank's
philosophy, etc. And surprisingly everyone who responded back
to me, loved it. A real power programmer needs powerful tools;
Tractors and Bulldozers, rather than a Hammer or Screwdriver.
Q: When I started my Delphi e-group, I found that while I was
helping people by posting Delphi code, I was also learning more about Delphi,
is this the same for you?
A: Yes, I wanted the Example Programs, Help Libraries, Macros
and Reference sheets for myself too. I also didn't know the Components
as well as I thought, until I started creating simple projects with just
one main Component, and then putting Buttons to change properties and Breakpoints
to see the program flow. With Delphi, as with everything else, you
learn by doing. You can read a programming book for 3 hours, and
end up with a head full of stuff that you really do not know how and when
to use. You have to sit down and write and run a program, to see
what Components really do and how to
use them.
Q: How much time do these Delphi lessons take for you to complete?
A: Wow, it is amazing how long
it takes to Create the data, Format it, Document it, Test it, Organize
it, ...
Q: What type of feedback do you get from people taking your Delphi
Tutorials?
A: It has been amazing.
Even though these Tutorials are pretty crude, I have gotten a lot of Thank
you's and Great Job; and they want more.
Q: You started these Delphi Tutorials with you e-mailing people
the
lessons, why did you stop doing
this and then put the Delphi Tutorials on a web site?
A: I didn't have the right ISP,
software or desire to email over 400 people, every few weeks. Plus,
it forced me to build a real web site, that had Content, not Glitz.
I am still amazed at the many badly designed sites that I find. My
philosophy is keep it simple. If fact making it Simple and Elegant
is the difficult part. Making it Complicated is easy.
Q: At what lesson do you intend on stopping or do you intend
on these lessons being a on-going thing?
A: I probably have 3 or 4 more
good Lessons in me, then I will start to slow down. But I hope to
continue creating good self documented Example Programs, Code Snippets
and References. I would also like to work with other programmers
and sites, to make a comprehensive Delphi learning center to help newcomers.
Q: How many people are helping you put together these Delphi
Tutorials?
A: So far, I have been doing
it myself.
Q: Do you need more volunteers or do you have a good team already?
A: Yes, I would love to have
help improving and expanding these Tutorials..
Q: Do you think schools/universities will find your Delphi Tutorials
good reading for students?
A: After I go back and reorganize and polish up the structure
a bit, I think that they
might be useful in a teaching program.
Q: How can people contact you?
A: Email me at:
[email protected]
Answering these questions has set me off on my programming philosophy.
So, let me vent a little.
I've always preferred Pascal over C++, because of C's poor use of strings and C's less highly typed structure. I still hate dealing with PChars etc. I can live with the wordiness of Pascal.
There will always be a need for the genius programmers who can create
a language like Delphi. But there is a lot greater need for programmers,
who can use Delphi, VB or whatever other super tools there are. For
every 1 job there is for a super programmer to develop a new component
or programming tool, there are 1000 jobs for programmers to create User
applications, Databases, build web sites, and do multimedia work.
So, get closer to the user side of programming, if you want to be able
to do more and have more job security. Learn how to write HTML, Java
Script, Java; besides Delphi. Learn how to use multimedia stuff etc.
By the way, you can download free Demo software
from a lot of sites. They are a great learning tool.
Delphi is the language for everyone, not just expert programmers. I have another Delphi programming example that I give people. What if you wanted to write a program to drive a car. Some people would write a complicated program that would have to know all the streets and stop signs, so that it could automatically drive the car from point to point. All I would want, is a program to give me a Steering Wheel, an Accelerator and Brakes; then I can drive the car anywhere. Delphi is that program.
Having a basis in Assembly programming, it always amazes me how a lot of programmers religiously avoid any global variables or goto's. They sometimes make their programs harder to read and understand, by never using them. The technique to learn is, how to manage your programs. You can make the same number of errors passing parameters and making function calls, as you can using globals. Of course if you are working with a lot of other programmers, then management becomes even more important.
For every 1 hour you spend writing code, you will spend 10 hours
debugging
and maintaining it. So, make your code easy to read and understand
First; then try to compact it and make it more efficient.
Gone are the days when you worried about how much RAM you use, or
how many clock cycles it takes. There are very few places where that
is important anymore. Sometimes I feel programmers get too deeply
into the the nuts and bolts of programming, rather than how to make programs
that work and are easily modified and maintained. In school your
taught to write recursive programs, sort routines and working with linked
lists. That is great to know, but, I feel that it is more important,
to learn how to use programming tools rather then writing programming tools.
One person creates a new tool once, then thousands of programmers use that
tool thousands of times. So, what is more important? Yes, learn
how to use the tools, the right way. Of course my programming superstars
are Cantu, Calvert etc. But there are just a handful of them, and
just a handful of jobs for them. You can
stand on their shoulders, just buy their books. After trying
to write these Lessons, I totally admire their book writing efforts.
Also, take a look at Visual Basic or Visual C++, then you will see
why Delphi is different. You don't have to have an MS in Computer Science
to be an excellent programmer. Good Programming is very much an Art,
and not just a coding exercise. Some of the so called best programmers,
can write the hardest to understand and maintain programs. I call
that poor programming. Don't always try to use the trickiest and
most complicated features. Try and use the best technique to make
things easy to understand. The idea is to make a program that anyone
can read and understand and improve. Put your ego in your pocket.
The idea is not to impress others. You really don't need the appraisal
of others, to know that you have done a good job. With Delphi, programming
style is ultra important; since there are so many different ways to do
the same thing. It is easy to clutter a screen up with too much color,
or fail to organize elements is a simple and easy to understand way.
That's where the Art
comes in. Even the best technically based programers, can
produce the hardest to use software.
What everyone needs, is examples of good style and function.
But where do you go to learn these things?
I did not like OOP programming when it first came out, because it was structures of structures of structures. It was too complicated, with thousands of rules, parameters etc. If you get too deep into the bowls of programming, you miss the point. Remember, you don't want to pave the road, you want to drive the trucks. So, learn the basics of OOP programming with Classes, Inheritance, Polymorphism and whatever, and immediately go into how to use Delphi's Components; not how to create Components.
What do you need, to be a good programmer, a POWER PROGRAMMER? You need Experience solving different problems, you need good Tools, you need good References (Books etc.), you need places to go for Help, and you need Libraries of tested code that works. You will spend 10 hours, setting up a Database; then you will spend 100 hours on the User interface, to get data in and out of the Database. So, what is more important? Most of the work seems to gravitate towards the User interface, yet very few books give you any real help in this area.
One last point. The most important part of any project is the
initial design and specification phase.
You should spend 40% of your time (not 10%), seeing what all your
options are and deciding on a path to take. Once you start on a path,
it is very difficult to turn back. So, be sure where you are going,
before you start. Also, you learn along the way; seeing better techniques
as you build and try what you've done. Remember, make it work First,
then polish it. Program Top Down, and Bottom Up.
i.e. Do the overall design and program flow, and also start writing
the primitive functions. Then they meet somewhere in the middle.
And always expect to make changes. What sounds like a good idea,
sometimes isn't.
Here's another learning tip. This helped me in college. When you want to learn something new, load data into all of you senses. Look at it, say it out loud (hear it), write it down (or type it in). Then it will stick better. Your memory has a easy time storing data, the part that is hard, is to find the link to access the memory. That's why you learn so much by doing something, rather then just silently reading about it. It impacts your senses a lot more when you see, say, hear and feel it. Also, there is a very generic truth in the saying "You learn more by your mistakes". That is because making a mistake impacts you more. You are frustrated, humbled and kicked all at the same time. How could you ever forget that. The worst thing to do is stand still, then you are sure to go nowhere. So keep on Trucking! And that means, driving the Delphi truck.
End of venting section.
I've only been working on these Tutorials since Dec. 1998; and I have a lot more work to do.
Future Lessons and aids will include:
- Lessons
- more Database stuff
- SQL
- Debugging
- Style
- Self documented Example Programs for:
- SQL
- Individual Components
- Debugging
- Reference docs for:
- SQL
- Currency
- Component Groups (Input Comps,
DB Comps,...)
- Code Template (Keyboard Macros)
- Component Templates
- Repository Forms
So, stay tuned.
Frank
Contents of Franks Website:
Purpose of These Lessons
Lesson 1 Delphi Basics
Programming philosophy
Environment Options
Naming conventions
Using F1 (Help)
The 3 main Delphi Files
(.dpr .pas .dfm)
Right Mouse Clicking
Modify your Toolbar
Delphi Quirks
Making your own Help Library
Owner / Parent Sender?
Multitasking
Lesson 2 More Delphi Basics
Object or Component?
Property, Method, Event?
Structure of Unit1.dfm file
and
Form1
Delphi and Windows95
(multitasking info)
Project Options, Environment
Options.
Third Party Components from
the WEB
Installing New Components
and Packages
Global Variables
Using BreakPoints to understand
Delphi
Lesson 3 Databases
What is a Database (DB)?
Minimum Components it takes to
use a DB
Some Confusing things about Databases
3 ways to organize your Databases
Multiple ways to access a Field
Calculated Fields
Database Watch Outs
Searching a Database
Letting the User See and Touch
a Database
SQL
Lesson
4 Examples BtnArray, DateHelp, SQL1, RunTimePopup,
DynamicForm 5/23/99
L5Examples
CopyTblDBI, Messages, TblAndQuery
6/12/99