Recent

Author Topic: Recommend something for newbie  (Read 3246 times)

ssliackus

  • Jr. Member
  • **
  • Posts: 65
Recommend something for newbie
« on: September 17, 2018, 06:23:12 pm »
Hi guys

What libraries you could recommend to beginner with OOP? Something to play with simple graphics, small database or text based menus/widgets or similar - just to get basic ideas behind OOP and event driven programming concepts.

Please do not offer anything super fancy or high level - I am just beginner  :)

Thank you.

ps I am on Linux.




JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Recommend something for newbie
« Reply #1 on: September 17, 2018, 07:01:31 pm »
What libraries you could recommend to beginner with OOP? Something to play with simple graphics, small database or text based menus/widgets or similar - just to get basic ideas behind OOP and event driven programming concepts.

Please do not offer anything super fancy or high level - I am just beginner  :)
Actually high level is typically easier then low level. Text based widgets don't make OOP any easier either. Besides, why would you want a text based UI in year 2018.
Just use LCL! It provides simple graphics, database stuff and GUI widgets.  :)
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Recommend something for newbie
« Reply #2 on: September 17, 2018, 07:21:48 pm »
I would recommend the same as Juha: a base Lazarus + FPC has most of what you'll ever need and there will be time enough, once you've learned more, to search for something the base system lacks.

Other than that, a personal recommendation is to look for, and read, tutorials on OOP. One often cited ressource, although very dated now, is the (scanned) original Turbo Pascal 5.5 Object Oriented Programming Guide (1989)*, but there are more (and more modern ones!) all over the web ... including in our very own wiki.

My best wishes to you, and remember! the community is here too to help you when your program breaks down---which it will, never doubt :D

-----
* Juha's comment below is point-blank: this reference treats with the very first implementation of objects by Borland (they hadn't even private/public distinction), thus it can NOT be recommended for modern programming. The OOP concepts, though, are quite well explained so it can be used as a refresher for that. And for its historical interest, of course :)
« Last Edit: September 17, 2018, 08:19:49 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Recommend something for newbie
« Reply #3 on: September 17, 2018, 08:05:02 pm »
One often cited ressource, although very dated now, is the (scanned) original Turbo Pascal 5.5 Object Oriented Programming Guide (1989)
Unfortunately it teaches the old "object" syntax which is kind of an evolutionary step between a record and the current class syntax. Like:
Code: Pascal  [Select][+][-]
  1. Location = object
  2.   X, Y : Integer;
  3.   procedure Init(NewX, NewY : Integer);
  4. end;
  5.  
It requires pointer syntax when allocating from heap. It can be seen as an experiment from Borland before they got it right. Thus it should not be recommended to new programmers, it will only confuse them.
The "reference semantics" of the current class syntax is a big improvent. It is similar to what many other modern languages have. Internally an object reference is implemented as a pointer but a user does not need to care about it.

There are plenty of modern OOP tutorials, too, for both Delphi and FPC/Lazarus.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

ssliackus

  • Jr. Member
  • **
  • Posts: 65
Re: Recommend something for newbie
« Reply #4 on: September 17, 2018, 10:00:22 pm »
Thank you all for answers.
Why I am asking for this is that I am slow learner and I learn by doing. Lazarus provides god RAD and I am quite comfortable with it when doing simple GUI software, but even behind very simple visual application there are many programming concepts that I am skipping (isolation, main loop, event handling). It is already prepared for me to use, so I will not learn how it works i.e. I will build the knowledge on the top knowing that "it is just like that and accept that".
What I want to learn, for example, create simple text menu (with for example, good old crt) and embed it in main loop, or create primitive game with 1-2 moving object that would react to keyboard interaction, but I want to do all this from empty file in simple text editor. In this way I learn much much better rather then dropping components on frame.

As there is very limited availability of books dedicated to FPC/Laz, I use Object Pascal Handbook by Marco Cantu as main book. I love his writing style.

I know, it is not the most effective way to do this, but that helps me to learn.

Thanks once again for opinion.

Trenatos

  • Hero Member
  • *****
  • Posts: 535
    • MarcusFernstrom.com
Re: Recommend something for newbie
« Reply #5 on: September 17, 2018, 10:11:54 pm »
Great stuff here - https://castle-engine.io/modern_pascal_introduction.html

As for starting from scratch, just use the option to create a simple program (See screenshots)

 

TinyPortal © 2005-2018