AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Delphi-PRAXiS - Lounge Delphi-News aus aller Welt Delphi Tip of the Day - TODO or not TODO
Thema durchsuchen
Ansicht
Themen-Optionen

Delphi Tip of the Day - TODO or not TODO

Ein Thema von DP News-Robot · begonnen am 28. Jul 2019
Antwort Antwort
Benutzerbild von DP News-Robot
DP News-Robot

Registriert seit: 4. Jun 2010
14.979 Beiträge
 
#1

Delphi Tip of the Day - TODO or not TODO

  Alt 28. Jul 2019, 16:00
I tend to be a scatter-brain when it comes to Delphi.

Really? Tend to be? "No Gunny. You are a scatter-brain when it comes to Delphi." I can hear all of you who know me saying this. That's fine.. I fully embrace it. I am a scatter-brain, especially when it comes to everything Delphi. There is so much I want to learn and do.

I have been trying to update my very old, flagship product Zilch Standard for 8 years. I've made zero progress. Why? Two reasons:
  1. I am a scatter-brain.
  2. I was of the mindset I needed to start from scratch and completely redesign everything.
When I was a teenager, I would go to the ...


When I was a teenager, Iwould go to the library with a specific idea of what I wanted to read about. I'd head straight to those bookshelves and start eyeballing titles. "Nope." "Nope." "Uh Uh." 'Nah." 'Oh, that looks interesting." "Hey that reminds me of X." "Where is the 'X' section." Off I'd go to the "X" section, and repeat this process until I found something all consuming.



This happens to me all the time with Delphi. My thirst for learning overtakes me and I lose focus on actually making progress inside the IDE.


How about the other issue, having the mindset of completely redesigning everything from scratch? Well that was squelched when my hard drive crashed and I lost over three-and-a-half years of code. Gone! Poof! It actually turned out to be a blessing. It has forced me to look at things with a whole different perspective.


That brings me to today's Delphi Tip of the Day.


As I was going through and porting over my old Delphi 5 code, I started doing that "scatter-brain" thing again. I first noticed it when I was updating the Main Menu functionality. "Hey, you know what would be cool, an MRU (Most Recently Used) file list." "Yeah lets add that". And off I went on a quest to learn how to build an MRU list.


Two hours later when I went to make another Nespresso (yeah I'm a coffee snob), it hit me. "Hey Gunny, an MRU list is not the objective. Put it on the back burner."

My back burner items tend to get lost and disappear.



My back burner items tend to get lost and disappear. Then I get frustrated because I can't remember all those "To Do" items I have on the back burner. "Hey wait a minute. Doesn't Delphi have a 'To Do' list function built in?


Yes, Delphi does indeed have TODO functionality and I started using it the other day. However, in traditional Gunny Fashion it's not your normal TODO.
"If we are going to get wet up to our knees, we might as well get wet up to our waist and get the job done right."
I often use that phrase at my day job. Especially when there are two or three of us gathered around working on an immediate issue. It's different when it's an urgent need that must get done before you go home.


So when I get ankle deep on a "new" feature I'd like to add, that is not a priority, I add it to my TODO list in Delphi. However, I also include the links to the website articles that will be useful when the time comes to implement them later. For example here is my current TODO list:








If you drill down into the highlighted "TODO" item it brings up the source code:

var
HWnd: THandle;
MR_Result : Word;

begin
{---------------------------------------------------------------}
{ Use this code for retail version }
{---------------------------------------------------------------}
Hwnd := FindWindow('TMainForm','Zilch Standard - Main Screen');
{---------------------------------------------------------------}
{ Use this code for trial version }
{---------------------------------------------------------------}
//Hwnd := FindWindow('TMainForm','Zilch Standard (Evaluation Copy) - Main Screen');

{---------------------------------------------------------------}
{ TODO 3 -oMJR -cPhase 2 : Set Focus to running application }
{---------------------------------------------------------------}
// Refer to these links when for implementing this TODO item
// https://codeoncode.blogspot.com/2016...e-include.html
// https://stackoverflow.com/questions/...in-delphi-10-2
{---------------------------------------------------------------}
If Hwnd 0 then SetForeGroundWindow(GetForeGroundWindow())
else
begin
Application.Title := 'Zilch';
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TNoPrintDlg, NoPrintDlg);
Application.CreateForm(TCreditorInfo, CreditorInfo);
Application.CreateForm(TDisclaim_Save, Disclaim_Save);
{---------------------------------------------------------------}
{ Use this code for US Marine Corps distribution }
{---------------------------------------------------------------}
{
MR_Result := USMC_End_User_License.ShowModal;
If MR_Result = idYes then
begin
Application.ProcessMessages;
Application.Run;
end;
}
{---------------------------------------------------------------}
{ Use this code for genral public distribution }
{---------------------------------------------------------------}
Application.ProcessMessages;
Application.Run;
end;
end.
This way I can do a little "ankle deep" research and keep it preserved on the back burner for latter use without the risk of loosing it. It allows me to scratch the itch at the time it itches and lets me go knee deep later on when the time comes to dive in.

Going forward I will make extensive use of the TODO feature in Delphi. I hope this has helped you better understand TODO's and how they can help you scratch the itch when it itches.

It's time to publish this and get back to work!

Enjoy,
Gunny Mike




Weiterlesen...
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:07 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz