Jump to content

Mike Torrettinni

Members
  • Content Count

    1509
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Mike Torrettinni

  1. Makes sense. It was just confusing because it seemed like the comment could have some logic, but it was commenting basic git flow - as if it's over engineered. It's good to know I'm not using git completely wrong.
  2. I know I will eventually learn command line for git, but I'm glad I don't need to do it, yet. I will probably try other git gui tools, like SourceTree, before settling with one. Do you have any experience with others?
  3. Mike Torrettinni

    What options do I have to control custom releases?

    Yes, works as expected - multiple defines accepted!
  4. I agree (well, I've only been using it for a few days...) At the beginning it was a hassle to work with branches, as I'm single developer. Now I see the benefit, but I'm not sure which flow I will choose - I like that change log shows bugs and features. Perhaps I will end up with single branch, too, not sure. I'm trying out Fork now, what a change from 'right-click' TortoiseGit.
  5. Mike Torrettinni

    What options do I have to control custom releases?

    Thanks, will have a look.
  6. Mike Torrettinni

    What options do I have to control custom releases?

    This is now partially sorted out - now that I know I can control features from build process - ExtraDefines=Trial/Licensed/.... I think you are referring to creating multiple build configurations... thank you, I'm trying to stay away from that. For now! 🙂 I still use IDE for this, so not everything is fully automated; meaning I don't want to have too many build configurations. Debug and Release is enough; and 64bits are coming soon, so 4 will be enough. I came up with a good-for-now ExtraDefines configuration in one keyowrd that covers what I need.
  7. I'm looking a this article: https://www.linkedin.com/pulse/como-organizar-e-agilizar-o-desenvolvimento-com-git-flow-rafael-naves It seems I've seen similar graphics (picture on top of the article) for master-develop-feature branches in most of the git resources. But here is a comment on that article, on Twitter: "That seems like an excellent way to make Git even more complicated! Seriously, the most straight-forward and practical methods are the ones which will encourage people to use Git. If you over-engineer things people simply give up." Anybody has any idea what the comment is referring to? I don't see any special way of using git by Delphi developers... git is git, Delphi is Delphi.
  8. I just found out about this feature: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Code_Editor#Synchronizing_Prototypes Very cool, it copies parameters from implementation to interface (or backwards) , so you don't need to copy&paste anymore! 🙂 I do this quite often and it's annoying because Ctrl + click doesn't always work, to jump between interface/implementation. With Ctrl+Shift+Alt+P the parameters are synchronized immediately. 🙂
  9. Yes, I can't imagine how slow it would be on HDD. And what you are describing is the reason IDE should be better optimized. Perhaps future versions of LSP will help. It's hard to imagine every installation should tweak all these possible settings to find the right ones for Delphi.
  10. I doubt it's the system performance, it's the IDE poorly optimized. I hope for 10.5 to be better. It runs good in vmware for something to look at here and there, testing, but for day to day work is just too much 'lag' for me, overall.
  11. You notice faster system in general or Delphi IDE?
  12. Mike Torrettinni

    What options do I have to control custom releases?

    I finally made some progress on this and am using this solution: https://stackoverflow.com/a/8509206/5198394 So, I use ExtraDefines keyword that inserts new define keyword used in msbuild. The problem is I need 2! 🙂 extra defines. It works OK when I set it like this: Project settings: ...$(ExtraDefines);$(ExtraDefines2);... msbuild: "Config=release;ExtraDefines=CustomerA;ExtraDefines2=VISIO" This is probably not used that often, but does anybody have a solution to insert multiple defines into single ExtraDefines? I tried this: Project settings: ...$(ExtraDefines);... msbuild: "Config=release;ExtraDefines=CustomerA;VISIO" msbuild complains: MSBUILD : error MSB1006: Property is not valid. Switch: VISIO I tried all sorts of combinations, like: "Config=release;ExtraDefines=(CustomerA;VISIO)" "Config=release;ExtraDefines=(CustomerA;$VISIO)" ... same error about Property not valid. Any suggestions?
  13. I assume the combination is good for teams, rather than single developers.
  14. oh, you don't use git?
  15. When you find solution, please let us know. Not sure if anything in older thread could be useful to you, but I never managed to have useful setup in vmware: I'm still on 10.2.3, so perhaps that is the cause.
  16. Yes, like I will do the same. In all the available git resources online it's often hard to decipher when the project is referred to as set of features and when to a separate .dproj project. I just started wrong because I set a repository on main dev folder, instead for each subfolder - project. So, delete and start again... fun 🙂
  17. I'm just setting my git, so this is all new to me. How do you have your Apps organized, as repositories? Did you set 😄\src\Programs as repository and App1..2 are just folders in branches or each their own repository?
  18. I saw this example of ExtractContent function: https://stackoverflow.com/a/62918216/5198394 - by Andreas Rejbrandt It should return string without whatever is within brackets: function ExtractContent(const S: string): string; var i, c: Integer; InBracket: Boolean; begin SetLength(Result, S.Length); InBracket := False; c := 0; for i := 1 to S.Length do begin if S[i] = '{' then InBracket := True else if S[i]= '}' then InBracket := False else if not InBracket then begin Inc(c); Result[c] := S[i]; end; end; SetLength(Result, c); end; Then the last comment for this answer is :"... I'd use a pchar indexer and omit the bool flag and use two mutually exclusive (accept and reject) loops..." - by MartynA So, I was trying to implement his suggestions, but this is not my area of expertise. So here is my attempt: Renamed and brackets as parameters: function RemoveTextBetweenChars(const aString: string; const aChar1, aChar2: Char): string; var c : integer; vP : PChar; vSkip : boolean; // when to skip text begin SetLength(Result, aString.Length); c := 0; vP := PChar(aString); vSkip := False; while vP^ <> #0 do begin if vP^ = aChar1 then vSkip := True else if (vP^ = aChar2) then vSkip := false else if Not vSkip then begin Inc(c); Result[c] := vP^; end; Inc(vP); end; SetLength(Result, c); end; But I was only able to implement PChar indexer. I have no idea how to do this without boolean variable and I jhave no idea what two mutually exclusive (accept and reject) loops are. Any help is appreciated!
  19. Mike Torrettinni

    Help with string extraction function

    Pretty impressive level of knowledge!
  20. Mike Torrettinni

    Help with string extraction function

    Does that mean you need a trial and error to get to know all these little 'secret' tips how to write best possible optimized code, for each compiler?
  21. Mike Torrettinni

    Is quality.embarcadero.com down?

    Just tried and works.
  22. I'm trying to generalize my method to remove formatting tokens from the string, and just want to be sure that I handle all cases. So, the questions is: besides the d, e, f, g, m, n, p, s, u, x are there other possible options in Format (SysUtils) function? I have this method and would like to make sure it covers all options: // Remove any %s %d... from string // Used for cleaning formatted ready strings to be display ready // 'Customer name %s contains invalid characters.' -> 'Customer name contains invalid characters.' function RemoveFormatSettingsFromString(const aString: string): string; const cReplacements: array [1..10] of string = ('%s ', '%d ', '%e ', '%f ', '%g ', '%m ', '%n ', '%p ', '%u ', '%x '); var vReplacement: string; begin Result := aString; for vReplacement in cReplacements do Result := StringReplace(Result, vReplacement, '', [rfReplaceAll]); end;
  23. Mike Torrettinni

    Problem with ExitCode

    In short: Seems like ExitCode is not always reliable retrieved with %ERRORLEVEL% if Project is not a console project. Long version: I'm testing simple example of how ExitCode works. The problem is that I can't reliable retrieve it with %ERRORLEVEL%, when not running in batch file. When executing example project in batch file, it works OK, always shows correct ExitCode as %ERRORLEVEL%. This is batch file - that always works: project1.exe echo %ERRORLEVEL% echo always show correct ExitCode as set in project1.exe. BUT: When I try to execute the same project1.exe from cmd line, without batch file, it doesn't reliable returns ExitCode with echo %ERRORLEVEL%. This is how I run it without batch file: This is simple VLC Forms project: program Project1; uses Vcl.Forms, Unit1 in 'Unit1.pas' {Form1}; {$R *.res} begin Application.Initialize; ExitCode := 2; // Application.MainFormOnTaskbar := True; // Application.CreateForm(TForm1, Form1); // Application.Run; end. Then, I tried to do the same with Console project and in this case %ERRORLEVEL% always works correct - show correct ExitCode, with and without batch file. So, am I missing something really obvious? Is non-console project the problem here?
  24. My projects are quite big now and it's getting harder and harder working on new features that require a lot of changes at the beginning - they evolve as development goes on. The problem is all the settings and initialization, and then compiling, running the full project just to test simple changes how they work. So, when I have clear idea of class structures for new feature, I start new project and develop feature as much as possible on it's own, before integrate it into the project. But this is not always possible, especially for features that rely on existing features. Any recommendations on this topic are appreciated. One of my 'quirks' is that I need to compile and test almost every new method, as soon as is written - this means a lot of compiling and running. Right now I'm just not that sure of my skills to write and write a lot of code before compiling and testing. Perhaps this will be useless topic when I can write complete feature in one go and compile much fewer times.
  25. Mike Torrettinni

    Anybody up for an ethics question?

    Perhaps this is opportunity to sell them better app that produces constantly accurate exports. Or a little utility that per-processes data and reports on issues, before they send data to you.
×