Wednesday, November 11, 2009

How not to teach Delphi

Your reviewer, DelphiHater was looking at some syllabus or course overview for teaching software development 101.

Computer Sciences 101

Computer programming starts off with learning basic concepts, such as 2^ compliments, what AND, OR, NOT, NAND, NOR, XOR can be easily taught without learning programming language. What hexadecimal, octal, binary, decimal is, what signed and unsigned binary coded digits are, 2^s complement addition, subtraction, division and multiplication are to create digital circuits (such as using your 4001, 4002 chips). timers (the traditional 555 timer), capacitors and resistors.

Computer studies students should also be expected to learn basic statistics and calculus, along with either healthy dose of principles of accounting or business (human resources).

then, learning about Windows, DOS, how to use Access*, Word, PowerPoint and Excel.

(used to be DBase before Borland brought Ashton-Tate and trashed DBase)

Wearing the Computer Science Lecturer's Hat

In order to learn about software development, you have to pick a language to learn. As the computer science lecturer, you would need to pick 2GL, 3GL, 4GL language.

2GL

For 2GL language, it would be basic assembly knowledge. Since Delphi only does Win32 assembly, more suitable language such as Microsoft Assembler with reference to Ralf Brown's Interrupt list.

Explain why using serial port under real-mode / or protected mode assembly is important in embedded systems development.

Do you consider a smart telephone as an embedded system with TI (Texas Instrument) DSP (Digital Sound processor), DTMF pad (Dial Tone Modulation Frequencies) a specialized computer?

Make students interested in why assembly is important to learn. For example, making those cool gameboy games, Sony PSP portable requires deep knowledge of assembly.

(While your reviewer has seen Free Pascal Gameboy compiler, I doubt Nintendo would allow unlicensed materials into their Gameboy system. Did anyone see Action 52, the unlicensed NES game?)

3GL - Choices

For 3GL, there is choice of Basic, C++ and... Pascal.

While some people are quick to dismiss Basic (the Delphi people call it Visual Bullshit), there is Free Basic, which seems to be better than Free Pascal, DarkBasic, which makes Kickass games (show me one good Delphi Game SDK), Real Basic which seems to do Linux better, PowerBasic the step-child of TurboPascal abandoned by Borland.

To be fair, ask any Delphi developer to make good game using Delphi, or Linux application, or MacOSX application. Two things will happen - the person will just quit (maybe I'll hire someone else instead) or lame around the Borland newsgroup asking for answers.

None of the Delphi developers can ever put up with the Basic, but yet, if you look closely, do you see close-minded individuals unable to learn more than just Delphi? At least some people started "getting ideas" that other languages were much better and make more money.

C/C++

While Delphi people hate C++, your reviewer will cover why it is important to learn C++.

Other than the curly braces issue, semantic (begin/end), newsgroup wars, there is scripted C (Python), interpreted C (Java, C#, NET), native-compiler (Visual C++, GNU C++).

The common denominator is the amount of money you make from C/C++. Let's take for example, an average Visual C++ job and Delphi Job.

The most stunning examples is in mobile, embedded and financial markets. The latest iPhone apps are written in Objective C, which seem to produce 100,000 independent applications for the iPhone, yet Borland/CodeGear/Embcardero could not, over the years, bother with Windows Mobile or Palm.

In embedded market, the value is in the hardware and software combination. While most Delphi programmers will moan about a dongle or USB copy-protection, what about hardware-based MP3 players, USB peripherals, cartridge-based games? Then the Delphi programmer who tried to make a basic Windows-MP3 player, or connect his app to USB, or make a ROM-based Win32 application would probably earn US$0 (zero) dollars.

[Okay, to be fair, show me one good Win32-based Media Player made in Delphi, and I will show you 10 Media Players written in C++, let's not even talk about hardware based devices (e.g., MP3 players selling for US$200 a pop) and 64-bit compatible Media players]

For cartridges, ROM-based applications, your reviewer played some good games, such as Mario, Sonic, Wario, etc. Those still make money.

[Show me one good gaming SDK to make gameboy games using FreePascal, you can google around for plenty of GameBoy-compatible, PSP-compatible C/C++ SDKs around]

Back to the review

The usual tirade of computer concepts - stacks, queues, trees, graphs, inverted tables, indexes.

[While your reviewer thinks Julian Bucknall would be fond of them, sadly, few people buy his book.]

Coming to books. Which book would be suitable for students to learn Delphi? with this Delphi book economy-collapse, it would be much wiser to teach C/C++, Java, or even PHP.

4GL would be SAP/ABAP (if your school is a certified SAP/R3 school), SQL, Mathematica.

Delphi as a teaching choice

Let's say for example, your reviewer selects to teach Delphi to students.

The first obstacle is licensing. Your reviewer had very negative experiences with former Borlanders:

- Suppose you want to tell your students to post to the internet, and then to learn how to use UseNet, then google around, and then find old 1980's usenet personal flame wars and stupid insults posted against your lecturer. How would the lecturer feel? Yet, this flaming and insults continues to this very day.

- How do you tell students that Borland newsgroup is mostly not moderated and any stupid post with student's name becomes an embarrassing part of their education?

- How do you tell students not to confront such person nicknamed Troll or Schmuck
who feels Delphi is superior to all languages, yet few jobs exists?

- How to tell to "ignore" anti-islamic posts frequently posted which are inflammatory to Muslims? (See Off-topic)

They are no easy answers.

Book Choices

Your reviewer looked at several books, but sadly, most are out of print. Most publishers will not even publish Delphi books anymore, because they are unprofitable.

Career Choices

Your reviewer does not wish for others to repeat the same poor career choices to his students. Once is enough.

Suitability

Your reviewer, looking at Delphi, wonders if the same concepts that are in C/C++ can be taught.

Someone on certain forum said it nicely:

----------------------
Quoted:
Obviously you are one of the guys programming an image editor like this:

1. Drop a FileLoader component on your form
2. Drop a PhotoShop component on your form
3. Drop a DevExpress multi mega component on your form
4. Drop a FileSaver component on your form
5. Tell your client the project is finished.

Wake up man, real life doesn't work that way ...
----------------------

The danger is when you wake up, you don't learn anything. The students will be forever dependent on "others" for parts of their work and end result is wanna-be work with little or no value-adding.

Conclusions

Your reviewer, wearing the Computer Science Lecturer hat, took hard look at Delphi and wonders...

If your reviewer teaches Delphi to students, my students will be doomed to the same bad career, poor work, get fired, and all sorts of things education was supposed to prevent.

Don't take my word for it. Those who don't learn from the mistakes of the past are destined to repeat them.

No comments: