Jump to content

Mike Torrettinni

Members
  • Content Count

    1509
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Mike Torrettinni

  1. Mike Torrettinni

    How to manage feature changes during release cycle?

    This actually forced me to look up if I can connect SourceTree with Jira projects and you can and works very well! I'm not that good with comments, but being able to connect Jira issues with commits, it's gold to me.
  2. Mike Torrettinni

    How to manage feature changes during release cycle?

    Well, this guy definitely pushed me read up more on this stuff, I just couldn't listen and follow his graphics at the same time. The good thing is that being single developer on a project that you can not only decide which branching model you use, if any, but you can combine and switch as needed. But using Git flow model, It would be really nice if Delphi IDE could give a little more info about the current working branch, as it has so many branches. Pretty cool when you can refer to your product as legendary and write it on your blog about Git branching models: https://www.gitkraken.com/learn/git/best-practices/git-branch-strategy
  3. Mike Torrettinni

    How to manage feature changes during release cycle?

    I think you missed the beginning of my statement where I agreed with you. All good, now. @Lars Fosdal I found diagram flow from left going up. not as detailed as the other one, but at least the flow direction is not confusing to me. https://www.bitsnbites.eu/a-stable-mainline-branching-model-for-git/
  4. Mike Torrettinni

    How to manage feature changes during release cycle?

    Correct. Perhaps is my personal quirk, but I don't like the situation when the feature bug is fixed in develop branch and I didn't fix or check for it in the feature branch. I just can't wait until the end to see if the merge will work and then work it out, I need to fix it right away, if possible. Most likely new feature branch will overwrite full feature code in develop branch, when ready. Yes, you say 'drastically refactor' I say changing, improving a feature 🙂
  5. Mike Torrettinni

    How to manage feature changes during release cycle?

    This looks pretty clean and quite disciplined development. I rarely have 2 scheduled changes in a row that I don't find something else to improve, change. So, simple 1 line descriptions are almost never an option, except build numbers which are logged and have detailed description of changes.
  6. Mike Torrettinni

    How to manage feature changes during release cycle?

    This is only true in very simple example, or where bug needs fixing in very obscure part of the code, untouched in the feature branch. As soon as you start changing the feature, it's highly unlikely the bug fix for old code could be applied also to the branch. You need to have 2 implementation of bug fixing. Well, actually you could have fixed the bug already in the branch, unknowingly, while making changes.
  7. Mike Torrettinni

    How to manage feature changes during release cycle?

    Yes and it make sense, up, down. Not sure why you would start diagram with main branch on right and draw to the left, seems odd.
  8. Mike Torrettinni

    How to manage feature changes during release cycle?

    Thanks, this means I need to implement bug fixes in both places. I kind of wanted to avoid this. It's interesting how GUI tools branching flow from left and up, while a lot of images of git branching go from right and down.
  9. Mike Torrettinni

    How to manage feature changes during release cycle?

    Aha, so this is GUI layer that helps with branching and merging, right? Does it introduce any different, better features, or just better visual presentation? Like all these git tools Kraken, SourceTree, Fork.. are just GUI tools for Git (so you don't need to write command in cmd), right?
  10. Mike Torrettinni

    How to manage feature changes during release cycle?

    I think there is just 1 question that I'm a still unsure how to handle: what if there is a bug in the part of the code that is being changed in a branch? You guys probably have short lived branches, I don't ... I can redesign a feature and release it in a month or more. What if there is a bug in this feature, I fix it in main branch to have release for customers, but the old code is in the branch I'm currently working on. So, I do need to patch this branch,too? There is no other way?
  11. Mike Torrettinni

    How to manage feature changes during release cycle?

    Thanks, I didn't know about git submodules, which seems what I could use: "Git submodules allow you to keep a git repository as a subdirectory of another git repository. Git submodules are simply a reference to another repository at a particular snapshot in time. Git submodules enable a Git repository to incorporate and track version history of external code."
  12. Mike Torrettinni

    How to manage feature changes during release cycle?

    Aha, my main branch is always what gets released, so bug and feature branches get merged back into the main and released (well in only rare cases, so far). I never have the need to release bug fix for older version, so never needed to make a release branch. It's simplified and it works because I'm the only developer on this project.
  13. Mike Torrettinni

    How to manage feature changes during release cycle?

    Hm, not sure I know what you mean exactly. So, when you commit (or release) main project you somehow note the shared code version. And in the future when you need to go back to this version of main project, you also pull that noted specific version of shared code. Right? Is that manual process?
  14. Mike Torrettinni

    How to manage feature changes during release cycle?

    Same here. well not always the latest, but all projects always use the same version of 3rd party libs. I don't handle this good enough, because shared code is always the latest version and it's annoying looking at old project that should have old share source, but that's rare. What do you mean by 'pin a version per project'?
  15. Mike Torrettinni

    How to manage feature changes during release cycle?

    I do use branches but not that often, so that wasn't my first thing to think about. But it makes sense, a feature changes in it's own branch and when ready merged and released. And all bug fixes that happened meanwhile will be retained in the main branch. What if the bug fix is needed in the feature, screen you have a branch out? In this case you need to implement the fix twice, in main branch to release bug fix and in a branch to not reintroduce bug... how do you handle this?
  16. I know that empty dynamic array = nil, so you can check if array is empty by: array = nil or Length(array) = 0 If a TList<T> is nil the Count will not return 0. Why did they design it like that? What is the purpose of empty array to be also nil (undefined)? Why the same logic doesn't apply to lists? Any explanation is appreciated!
  17. Mike Torrettinni

    Why empty dynamic arrays = NIL?

    I don't have such example, but I searched in some third party source and there are plenty same and similar examples. I see this is 'never use Magic numbers' more than a 'it's implementation detail that can change'. I would totally understand if arrays follow same logic. And if they ever change that, I will gladly use Length and not nil. I was thinking about this and probably is specific to just me, but I actually find it easier to distinguish between = and <> when using nil vs Length: if DataArray = nil then ... if DataArray <> nil then ... vs if Length(DataArray) = 0 then ... if Length(DataArray) <> 0 then ... Especially if condition is part of longer condition, is just easier to quickly identify what is going on.
  18. Mike Torrettinni

    Why empty dynamic arrays = NIL?

    OK, I see what you mean. This seems like a simple setup: program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.Classes; type TStringList = class(system.Classes.TStringList) public function GetCount: integer; end; function TStringList.GetCount: integer; begin if not Assigned(Self) then Result := 0 else Result := Self.Count; end; procedure TestWhenNil; var vSL: TStringList; begin vSL := nil; Writeln('Items in SL = ' + vSL.GetCount.ToString); end; procedure TestWhenHasItems; var vSL: TStringList; begin vSL := TStringList.Create; try vSL.Add('test'); Writeln('Items in SL = ' + vSL.GetCount.ToString); finally vSL.Free; end; end; begin TestWhenNil; TestWhenHasItems; Readln; end. And output is:
  19. Mike Torrettinni

    Why empty dynamic arrays = NIL?

    So, I would need interposers for the most common used (in my code): TStringList, TList<integer> and TList<rec>. That seems a good suggestion.
  20. Mike Torrettinni

    Why empty dynamic arrays = NIL?

    We still need to do: if List <> nil then iterate List ... while arrays you can just loop and no errors. Right?
  21. Mike Torrettinni

    Why empty dynamic arrays = NIL?

    Does any other type behave like this? My little knowledge explains this to me that array is just declared variable that points nowhere, until Length() > 0. While a TList variable points to a reserved space in memory (4 bytes?), but not initialized, yet. And when initialized it will point to memory space reserved on TList<>.Create. Isn't that the case for string? When it's empty, it's a pointer to empty, no?
  22. Mike Torrettinni

    Why empty dynamic arrays = NIL?

    @Stefan Glienke Thanks. Looking on my phone it cut short the lines, so it appears as test jz (test-jay-zee ) 🙂
  23. Mike Torrettinni

    Why empty dynamic arrays = NIL?

    Hm, I use it a lot. I prefer array <> nil over Length(array) > 0.
  24. I have a very simple text search feature that uses Pos() to locate search text in string. Now I want to extend it to handle just a little more complex phrases. I think the most complex examples I need to implement includes: - brackets - quotes for full phrase - and AND/OR Probably most complex example: ("test phrase" OR testing) AND text OR "anything else" I assume most common will be simple examples like: test OR test2 test OR "test case" test AND test2 I have all text in arrays with object IDs to know where it belongs, records like: CustomerID, Address, Name, Notes; DocID, Title, Description, Notes... - and all fields except CustomerID, DocID are searchable strings. One idea is to try to convert search expression into regex, the other one if to parse the expression and try to make logical search as needed (this would probably be most complex to implement). I see examples of using database and use their advanced search capabilities like: https://zarko-gajic.iz.hr/full-text-search-functionality-in-delphi-applications-implementation-idea/ But this is just one small feature of my full project, so I'm not really sure I want this to be reason to implement database, even the lightest ones. I appreciate any suggestions on parsing such expression, converting to regex.. perhaps there are components that already do same or similar things.
  25. Is it possible to somehow see what is current project branch I'm working on, in IDE? I use SourceTree for Git.
×