Recent

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

silvercoder70

  • Jr. Member
  • **
  • Posts: 52
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #15 on: August 07, 2024, 12:55:52 am »
Yeah... I knew that when I did the video and wondered if that would promote bad programming practices. Thanks for your feedback.
P Plate on FPC | YouTube - https://www.youtube.com/@silvercoder70

Hansvb

  • Hero Member
  • *****
  • Posts: 710
Re: The Silver Coder on YouTube
« Reply #16 on: August 07, 2024, 08:24:52 am »
Hi,
Consider it as an opportunity for a follow-up video explaining memory leak detection with "use heaptrace" in Lazarus. (Project options, debugging).

Just one thought.

silvercoder70

  • Jr. Member
  • **
  • Posts: 52
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #17 on: August 07, 2024, 10:21:51 am »
@Hansvb - Funny you mention that as that I have done that already :)
P Plate on FPC | YouTube - https://www.youtube.com/@silvercoder70

avk

  • Hero Member
  • *****
  • Posts: 756
Re: The Silver Coder on YouTube
« Reply #18 on: August 08, 2024, 07:07:06 pm »
Yeah... I knew that when I did the video and wondered if that would promote bad programming practices...

I would like to point out that the conventional way of using enumerators looks much simpler and usually does not lead to memory leaks:
Code: Pascal  [Select][+][-]
  1. ...
  2.   //LPersonInterator := LPersonList.GetEnumerator;
  3.   //while LPersonInterator.MoveNext do
  4.   //begin
  5.   //  LPerson := LPersonInterator.Current;
  6.   //  Writeln('Person Name: ', LPerson.Name_, ', Age: ', LPerson.Age);
  7.   //end;
  8.   //LPersonInterator.Free;
  9.   for LPerson in LPersonList do
  10.     Writeln('Person Name: ', LPerson.Name_, ', Age: ', LPerson.Age);
  11. ...
  12.  

silvercoder70

  • Jr. Member
  • **
  • Posts: 52
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #19 on: August 08, 2024, 11:52:24 pm »
Thanks...

That way is definitely better, however it did not show off (for lack of any better word) what an enumerator looks like, and perhaps when (depending on your background) are used to iterators (/enumerators).

A scenario where they can be useful is where you want to apply some sort of filter on the elements being processed - though here you would be writing your own enumerator.
P Plate on FPC | YouTube - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 52
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #20 on: August 09, 2024, 12:04:37 am »
And sparking discussions like these can also be beneficial for (new) users/programmers as well. :)
P Plate on FPC | YouTube - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 52
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #21 on: August 15, 2024, 09:39:19 am »
New Video here - https://youtu.be/vBKY7wDFy6I

This one is titled "Finding Memory Leaks in Free Pascal (and Lazarus)" and addresses the issues in previous one on generics which had some issues (and mentioned by @paweld). Thanks to @Hansvb for the suggestion.

And thanks to @avk regarding the others suggested change (shown below) which works well if processing all elements in the list ...

Code: Pascal  [Select][+][-]
  1. for LPerson in LPersonList do
  2.     Writeln('Person Name: ', LPerson.Name_, ', Age: ', LPerson.Age);
  3.  


P Plate on FPC | YouTube - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 52
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #22 on: August 27, 2024, 09:47:47 am »
Intro to Database Apps in Lazarus

https://youtu.be/mPvTyTbX2Ko

Want to start building database apps with Lazarus? In this easy intro, I’ll show you how to set up a database connection, work with SQL queries, and use data source components in a data module. We’ll also cover adding DB-aware components to a form, so you can create your own functional database apps.
P Plate on FPC | YouTube - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 52
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #23 on: September 08, 2024, 01:03:15 pm »
Beginner's Guide to Object Pascal Classes: Creating a Person Profile

https://youtu.be/F-83sirIYaQ

In this video, we dive into Object Pascal by creating a person profile class, similar to what you might find on Reddit or a dating app. Learn how to define properties, methods, and build a simple class structure from scratch.

Links:
https://wiki.freepascal.org/Class
https://www.embarcadero.com/products/delphi/object-pascal-handbook
P Plate on FPC | YouTube - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 52
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #24 on: September 28, 2024, 12:52:58 pm »
Verifying Email Addresses in Lazarus: In this video, we explore various methods of verifying email addresses in Free Pascal and Lazarus. From using regular expressions to sending verification emails, we break down the pros and cons of each approach. This tutorial walks you through how to implement email validation using Indy components.

https://youtu.be/Dn7_62hYRIw
P Plate on FPC | YouTube - https://www.youtube.com/@silvercoder70

paweld

  • Hero Member
  • *****
  • Posts: 1220
Re: The Silver Coder on YouTube
« Reply #25 on: September 28, 2024, 01:40:39 pm »
@silvercoder70: Thanks for the video.     
I think you should make a video about interesting features in Lazarus IDE that can significantly reduce time and make programming easier. Using the above video as an example - at about minute 3, when you had a missing variable declaration, instead of manually adding the var section and declaring the variable, all you had to do was press Ctrl + Shift + C and the declaration would have been created automatically. A list of improvements can be found: https://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools and https://wiki.lazarus.freepascal.org/New_IDE_features_since
Best regards / Pozdrawiam
paweld

silvercoder70

  • Jr. Member
  • **
  • Posts: 52
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #26 on: September 28, 2024, 02:22:22 pm »
@silvercoder70: Thanks for the video.     
I think you should make a video about interesting features in Lazarus IDE that can significantly reduce time and make programming easier. Using the above video as an example - at about minute 3, when you had a missing variable declaration, instead of manually adding the var section and declaring the variable, all you had to do was press Ctrl + Shift + C and the declaration would have been created automatically. A list of improvements can be found: https://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools and https://wiki.lazarus.freepascal.org/New_IDE_features_since

Thanks for the idea... and shall certainly look into that :)
P Plate on FPC | YouTube - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 52
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #27 on: October 03, 2024, 10:40:34 am »
@silvercoder70: Thanks for the video.     
I think you should make a video about interesting features in Lazarus IDE that can significantly reduce time and make programming easier. Using the above video as an example - at about minute 3, when you had a missing variable declaration, instead of manually adding the var section and declaring the variable, all you had to do was press Ctrl + Shift + C and the declaration would have been created automatically. A list of improvements can be found: https://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools and https://wiki.lazarus.freepascal.org/New_IDE_features_since

I have just completed a video that does just that.... Link is here ...

https://youtu.be/xjwzPJtQLs4

P Plate on FPC | YouTube - https://www.youtube.com/@silvercoder70

paweld

  • Hero Member
  • *****
  • Posts: 1220
Re: The Silver Coder on YouTube
« Reply #28 on: October 03, 2024, 04:38:46 pm »
@silvercoder70: thanks, great video.
Just for the sake of completeness - you mentioned that “Invert Assignment” does not have a shortcut, this can be changed: menu Tools > Options > Editor > Key mappings > invert Assignment > Edit > select a Key shortcut or “Grab key” > OK.
Best regards / Pozdrawiam
paweld

 

TinyPortal © 2005-2018