Recent

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

Handoko

  • Hero Member
  • *****
  • Posts: 5376
  • My goal: build my own game engine using Lazarus
Re: The Silver Coder on YouTube
« Reply #30 on: October 28, 2024, 02:26:32 pm »
Nice video.

Glad to know Lazarus now has option to enable docking mode when installing, some users sure will appreciate it. You said it is more responsive than before, maybe I should try it when I have time.

Thank you for making the video.
« Last Edit: October 28, 2024, 02:28:47 pm by Handoko »

silvercoder70

  • Jr. Member
  • **
  • Posts: 91
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #31 on: October 29, 2024, 12:33:33 pm »
Thank you to everyone here who has watched a video and supported my channel. Today, I reached 500 subs and this is really not something I thought would happen. But it seems there are some who like what I do. Humbled. Honoured. I hope I can do some more for the community here. :)

Cheers, Tim
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

Handoko

  • Hero Member
  • *****
  • Posts: 5376
  • My goal: build my own game engine using Lazarus
Re: The Silver Coder on YouTube
« Reply #32 on: October 29, 2024, 05:05:35 pm »
Today, I reached 500 subs ...

Congratulation !

There were some users regularly making videos about Lazarus/Pascal programming in the past. Unfortunately, don't know what has happened, they stopped posting new videos.

Videos about Lazarus/Pascal programming is a very important strategy for marketing. And we are lacking of it. Please keep making new videos. Your contribution is very needed. And thank you.

silvercoder70

  • Jr. Member
  • **
  • Posts: 91
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #33 on: October 30, 2024, 03:18:48 am »
I certainly will not be stopping for a long while...
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

vercetti

  • New Member
  • *
  • Posts: 10
Re: The Silver Coder on YouTube
« Reply #34 on: October 30, 2024, 06:52:20 am »
What topics would you like to see covered? Let me know in the comments!

It would be interesting to see a video of real work. For example, fixing a bug in one of the components or an application on GitHub. Show debugger operation, bug finding and fixing. With the subsequent sending of the fixed version to github. There are a lot of simple calculators on YouTube, but there is almost no content with real work.

Handoko

  • Hero Member
  • *****
  • Posts: 5376
  • My goal: build my own game engine using Lazarus
Re: The Silver Coder on YouTube
« Reply #35 on: October 30, 2024, 07:07:50 am »
That was a good suggestion. Writing code isn't too difficult, many tutorials and books are available. Debugging is a kind of 'secret' skill, not much people talking about it, tutorials are hard to be found. We learn debugging from out own experience. It would be great if there are more tutorials and people sharing their tricks.

440bx

  • Hero Member
  • *****
  • Posts: 4731
Re: The Silver Coder on YouTube
« Reply #36 on: October 30, 2024, 08:21:58 am »
It would be great if there are more tutorials and people sharing their tricks.
I definitely agree with that.

The crucial part is that debugging is very much driven by how the code is written.  This means, some code is extremely hard to debug while other code can be extremely easy to debug and, the difference is, how the code is structured/written.
 
In any complex program there should be a debugging "layer" activated by defines.  That layer should consist of, among many other things, a copious number of asserts throughout the code ensuring that the programmer's assumptions are valid (invalid assumptions are a very common cause of bugs.)

Another things that makes debugging difficult is the use of the heap to store everything.  That makes it difficult to see bad data by just eyeballing it.  When distinct blocks of memory are allocated for different purposes, not only it makes debugging a lot easier but, it also usually makes the program faster.

Another bad habit that makes debugging difficult is not resetting pointers to nil after freeing the block it pointed to.  That's the reason why FreeAndNil should always be used because that way, if the class/pointer is reused then there will be an access violation instead of memory corruption which may only become evident tens of thousands of instructions later which makes it extremely difficult to figure out what happened.

One useful "trick" is data breakpoints.  Those are often extremely useful when a variable is eventually set to a bad value.  I think FpDebug supports them but, I haven't needed them in quite some time so I can't be certain.

IMO, a good debugger is as important as a good compiler.  The reason is simple: because everyone makes mistakes and a good tool to find them saves a lot time and aggravation but, the programmer has to help the debugger help him/her.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

silvercoder70

  • Jr. Member
  • **
  • Posts: 91
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #37 on: November 02, 2024, 09:40:59 am »
New video about using conditional breakpoints

"... to help streamline your debugging process by setting breakpoints that only trigger under specific conditions"

Link:
https://youtu.be/zI-_fCcncr0
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

Handoko

  • Hero Member
  • *****
  • Posts: 5376
  • My goal: build my own game engine using Lazarus
Re: The Silver Coder on YouTube
« Reply #38 on: November 02, 2024, 01:24:23 pm »
Nice video!

silvercoder70

  • Jr. Member
  • **
  • Posts: 91
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #39 on: November 02, 2024, 01:26:23 pm »
Thanks! :)
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

silvercoder70

  • Jr. Member
  • **
  • Posts: 91
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #40 on: November 20, 2024, 01:02:52 pm »
Unsure who here might be interested in the latest video just posted (and while the IDE is Delphi) it is the 2nd video in a series on the fundamental of (modern) pascal. This video covers variable types...

https://youtu.be/yMO5pob7B-4
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

Lulu

  • Sr. Member
  • ****
  • Posts: 265
Re: The Silver Coder on YouTube
« Reply #41 on: November 20, 2024, 01:57:05 pm »
Hi Tim, I've just watched your video about conditional breakpoints: I didn't know this feature...
Thanks !  :)
wishing you a nice life!
GitHub repositories https://github.com/Lulu04

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10552
  • Debugger - SynEdit - and more
    • wiki
Re: The Silver Coder on YouTube
« Reply #42 on: November 20, 2024, 03:55:43 pm »
Btw: Alt + left-mouse click to set a breakpoint *AND* open it's properties

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10552
  • Debugger - SynEdit - and more
    • wiki
Re: The Silver Coder on YouTube
« Reply #43 on: November 20, 2024, 04:10:36 pm »
@SilverCoder70 It seems you have "gdb" set as backend (that is why there is the "linker symbol" stuff). If you have an Intel/AMD CPU and are on Window or Linux I would strongly advise to use FpDebug instead. It usually gives you faster and better results.
Tools > Options > Debugger > Debugger Backend: Then at the very top, in the toolbar there is a drop-down-button (which currently would say something about gdb/gdbmi and that can be changed to FpDebug)




About the event log options: You normally do not need the checkbox "Debugger" => that is only if you want to see the debuggers internal notes and warnings.

The option "Debugger" has to be read in the context that the entire event log is only for debugging related events.

silvercoder70

  • Jr. Member
  • **
  • Posts: 91
    • Tim Coates
Re: The Silver Coder on YouTube
« Reply #44 on: November 22, 2024, 09:46:44 am »
@Martin_fr, Many thanks for your feedback. I will do a video about the changes and issues...
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

 

TinyPortal © 2005-2018