Recent

Author Topic: The Silver Coder on YouTube  (Read 8046 times)

silvercoder70

  • Jr. Member
  • **
  • Posts: 98
    • Tim Coates
The Silver Coder on YouTube
« on: July 06, 2024, 12:40:17 pm »
Hi everyone, I'm Tim! A developer with a passion for Pascal that stretches back 30 years, starting with Turbo Pascal in the late 1980s and then Delphi.

Life takes interesting turns, and these days I find myself as a parish admin with a tutoring side-hustle. But the developer fire still burns! That's why I launched "The Silver Coder," a YouTube channel dedicated to the world of Pascal. I delve into Lazarus, Free Pascal, and the broader Pascal family.

My channel goes beyond tutorials. It's about growth, mentorship, and building a strong foundation for your development success. I'm here to share my knowledge and help you unlock your coding potential.

What topics would you like to see covered? Let me know in the comments!

Interested in joining the journey? Check out The Silver Coder here: (https://www.youtube.com/channel/UCEDZT_VZ0oz-gt7Mf_hJp2A)
« Last Edit: August 06, 2024, 12:02:13 pm by silvercoder70 »
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

Handoko

  • Hero Member
  • *****
  • Posts: 5377
  • My goal: build my own game engine using Lazarus
Re: Introduction from The Silver Code (aka Tim)
« Reply #1 on: July 06, 2024, 03:49:09 pm »
Hello Tim,
Welcome to the forum.

I visited The Silver Coder, nice!

Video tutorials for Lazarus/Delphi are rare to be found, glad to know there is a new one. Someone please add it into the list:
https://wiki.lazarus.freepascal.org/Lazarus_videos

What topics would you like to see covered? Let me know in the comments!

Actually I have a very long list of topics but I think you should start with some general topics that suitable for beginners/newbies first, like:
- How Lazarus compare to Delphi
- How to convert Delphi source codes to Lazarus
- Writing simple GUI programs, like calculator, screen capture, etc
- Writing simple games, like pong, etc

Later, it would be nice if you can cover these topics:
- Prepare Lazarus cross compiler
- How to write Android applications using LAMW
- How to write database programs
- How to write programs that allow computers to communicate via LAN

Here are some links that maybe useful for you:
https://wiki.freepascal.org/Portal:HowTo_Demos
https://wiki.freepascal.org/Lazarus_For_Delphi_Users
https://wiki.freepascal.org/Code_Conversion_Guide
https://wiki.freepascal.org/Delphi_Converter_in_Lazarus
https://wiki.freepascal.org/Cross_compiling
https://wiki.freepascal.org/Portal:Android
https://wiki.freepascal.org/Databases
https://wiki.freepascal.org/Lazarus_Database_Overview

~~~ Edit ~~~
I saw you're good in C/C++/# and Python too, maybe you can talk about the similarity and differences how they compare to Pascal, and what are their advantages and disadvantages in your point of view.
« Last Edit: July 06, 2024, 04:15:39 pm by Handoko »

nouzi

  • Sr. Member
  • ****
  • Posts: 306
Re: Introduction from The Silver Code (aka Tim)
« Reply #2 on: July 06, 2024, 07:25:12 pm »

Quote
I saw you're good in C/C++/# and Python too, maybe you can talk about the similarity and differences how they compare to Pascal, and what are their advantages and disadvantages in your point of view.


هل تعتقد انها فكرة جيدة ؟
By Google
Do you think it's a good idea?

My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

Handoko

  • Hero Member
  • *****
  • Posts: 5377
  • My goal: build my own game engine using Lazarus
Re: Introduction from The Silver Code (aka Tim)
« Reply #3 on: July 06, 2024, 08:49:06 pm »
I prefer to hear from someone who really has years of experience of using them.

Years ago, I wrote health articles and let Google indexed them. I was not a doctor nor a medical practioner. I just did some research on the web, then I could write.
« Last Edit: July 06, 2024, 08:54:54 pm by Handoko »

silvercoder70

  • Jr. Member
  • **
  • Posts: 98
    • Tim Coates
Re: Introduction from The Silver Code (aka Tim)
« Reply #4 on: July 06, 2024, 10:47:16 pm »
I still remember quite a bit of C/C++.

As far as python goes... I tutor in that language.

But years of experience .... No

That said, to my knowledge python replaced pascal as an intro language at Uni?

There is a lot more that could be said, but will leave that for a later time.
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 98
    • Tim Coates
Re: Introduction from The Silver Code (aka Tim)
« Reply #5 on: July 06, 2024, 10:51:20 pm »

Thank you for the suggestions. Really appreciate it.
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 98
    • Tim Coates
New Video - Playing with TFPExpressionParser in Lazarus
« Reply #6 on: July 10, 2024, 12:21:44 pm »
hello all, new video (Journey to the dark side: There is nothing new under the sun (Ep 4)) on YouTube - https://youtu.be/xekUY2tVtwQ where TFPExpressionParser (part of FPC) is added to the calculator that was started in the prev. video.

The code can be found on GitHub - https://github.com/silvercoder70/fpc-calculator
« Last Edit: July 10, 2024, 12:25:54 pm by silvercoder70 »
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 98
    • Tim Coates
Re: Introduction from The Silver Code (aka Tim)
« Reply #7 on: July 10, 2024, 12:28:03 pm »
Hello Tim,
Welcome to the forum.


I have started on one of your ideas with the calculator. Will look at the others over time :)
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

Handoko

  • Hero Member
  • *****
  • Posts: 5377
  • My goal: build my own game engine using Lazarus
Re: Introduction from The Silver Code (aka Tim)
« Reply #8 on: July 10, 2024, 04:00:23 pm »
Nice!
And thank you for sharing the source code.

But I saw you used AnchorDockPanel, as you also mentioned it in the brief recap. The problem is, AnchorDockPanel is not installed/activated on default Lazarus installation, novice users won't able to download and try your code. It would be good if you have a tutorial about installing AnchorDockPanel and/or explain it in the video note section.

silvercoder70

  • Jr. Member
  • **
  • Posts: 98
    • Tim Coates
Re: Introduction from The Silver Code (aka Tim)
« Reply #9 on: July 10, 2024, 11:52:19 pm »
Yeah... I worked that part out after I put up the code. Sigh :(
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 98
    • Tim Coates
Safeguard Your Object Pascal Code: Initialization and Error Handling
« Reply #10 on: July 22, 2024, 12:38:02 pm »
Safeguard Your Object Pascal Code: Initialization and Error Handling

Nobody likes dealing with bugs after their software is out in the wild. That's where defensive programming comes in. Starting with solid variable initialization is your first line of defense. Learn how to prevent those nasty surprises, handle those tricky constructor exceptions, and master the art of dealing with pesky nil pointers in Object Pascal.

References:
Initialised Variables - https://www.freepascal.org/docs-html/...
Declarations - https://www.freepascal.org/docs-html/...

https://youtu.be/0bIY3LHNZJo?si=pm3s1p4WfMtqAm8w
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

indydev

  • Full Member
  • ***
  • Posts: 116
Re: Introduction from The Silver Code (aka Tim)
« Reply #11 on: July 23, 2024, 02:24:48 am »
Thank you for doing this. One of the problems we have is the lack of Lazarus content on YouTube. Tons of C#, Python etc.

Content Suggestions:

The example code from various CCR units:
  lgenerics
  PascalContainer
  etc. (any gems you find in there)

Maybe cover generics first.
The MVVM pattern for Lazarus is a little different than for Delphi. But the example from that book is online: 

MVVM in Delphi.
https://link.springer.com/book/10.1007/978-1-4842-2214-0

The sourcecode of the book can be found at:
https://github.com/apress/mvvm-in-delphi

There's a forum discussion here

  https://forum.lazarus.freepascal.org/index.php/topic,65825.0.html

where user cdbc covers some ground on the subject and provides some units.

Of course games are always good. Maybe a simple bitblit game without a game engine, and then one with a game engine.

Just suggestions. Anything added is a plus.

silvercoder70

  • Jr. Member
  • **
  • Posts: 98
    • Tim Coates
Re: Introduction from The Silver Code (aka Tim)
« Reply #12 on: July 23, 2024, 07:12:26 am »
Woohoo!

Thanks for the ideas. I will add them to my list! :)
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 98
    • Tim Coates
A Quick Guide to using Generics in Free Pascal
« Reply #13 on: August 06, 2024, 12:03:34 pm »
Learn how to use generics to create reusable and type-safe code - this video provides a clear and concise introduction to generics in Free Pascal that you can use out of the box. Let me know if you want to see more videos on generics...

https://youtu.be/je6Wx4CI7ac

Links:
https://wiki.freepascal.org/Generics
https://github.com/silvercoder70/code-examples/
example6.lpr + uPerson.pas

#generics #freepascal #programming #coding #tutorial #beginner #softwaredevelopment #developers
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

paweld

  • Hero Member
  • *****
  • Posts: 1268
Re: The Silver Coder on YouTube
« Reply #14 on: August 06, 2024, 12:55:54 pm »
You have several memory leaks in your code.


Some comments:
- if the item is a class then use TFPGObjectList or TFPGMapObject, otherwise you have to take care of releasing the item yourself.
- as you create a class, you must also release it (LPersonInterator)
- with FGL, you can use an iterator, eg.

Code: Pascal  [Select][+][-]
  1. for i := 0 to LPersonList.Count - 1 do
  2.     Writeln('Person Name: ', LPersonList.Items[i].Name_, ', Age: ', LPersonList.Items[i].Age);  
revised version:
Code: Pascal  [Select][+][-]
  1. program example6;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   {$IFDEF UNIX}
  7.   cthreads,
  8.   {$ENDIF}
  9.   Classes, SysUtils, CustApp
  10.   { you can add units after this }
  11.   , fgl, uPerson;
  12.  
  13. type
  14.   TPersonList = specialize TFPGObjectList<TPerson>;  // <--auto free items, fix memory leak
  15.  
  16. var
  17.   LPersonList: TPersonList;
  18.   LPersonInterator: specialize TFPGListEnumerator<TPerson>;
  19.   LPerson: TPerson;
  20.  
  21. begin
  22.   LPersonList := TPersonList.Create;
  23.   LPersonList.Add(TPerson.Create('Malcolm', 30));
  24.   LPersonList.Add(TPerson.Create('Bob', 19));
  25.   LPersonList.Add(TPerson.Create('Alice', 30));
  26.   LPersonList.Add(TPerson.Create('Charlie', 30));
  27.  
  28.   LPersonList.Sort(@ComparePerson);
  29.  
  30.   LPersonInterator := LPersonList.GetEnumerator;
  31.   while LPersonInterator.MoveNext do
  32.   begin
  33.     LPerson := LPersonInterator.Current;
  34.     Writeln('Person Name: ', LPerson.Name_, ', Age: ', LPerson.Age);
  35.   end;
  36.   LPersonInterator.Free;   // <-- fix memory leak
  37.   LPersonList.Free;
  38.   Readln;
  39. end.
  40.  
  41.  
  42.  
  43.  
Best regards / Pozdrawiam
paweld

 

TinyPortal © 2005-2018