Jump to content

Lars Fosdal

Administrators
  • Content Count

    3319
  • Joined

  • Last visited

  • Days Won

    110

Everything posted by Lars Fosdal

  1. Lars Fosdal

    Are we just "Cash Cows"?

    Like the rest of us. Meanwhile, we make the best of it until we or it retires.
  2. Lars Fosdal

    Are we just "Cash Cows"?

    A language dies when it is no longer in use. COBOL is alive and kicking, but good luck finding young COBOL programmers. There is no shortage of things that can be improved in Delphi. I wish they would do more with the language. Especially generics constraints need more love. Attributes are still somewhat half-baked. I wish they would do more to improve the generated code for efficient memory access and math / vector math. I'd love an ARM64 compiler for Windows, as well as Linux/R pie. I wish the debuggers just worked and kept working and were smarter with regards to multi-threaded code. I wish the IDE would do incremental background compilation so that running your edited code was near instantaneous. But, in the mean time I code... And rant.
  3. Lars Fosdal

    Are we just "Cash Cows"?

    As I said, they need to spend more resources on testing.
  4. Lars Fosdal

    Are we just "Cash Cows"?

    I agree, it is not something you easily add as an afterthought. That said, when modifying or refactoring legacy code - unit testing and integration testing is more than a little helpful. Testing is the only way to ensure that you have achieved only the changes you intended and haven't inadvertently introduced something unfortunate. When writing new code, writing unit tests helps you write testable code. It is extra work, but it really pays off.
  5. Lars Fosdal

    Are we just "Cash Cows"?

    When you sit on millions of lines of code, in projects with several developers, implementing thousands of functions, and integrating with numerous systems, you need automated unit testing, automated integration testing and dedicated testers with proper test plans. We are not talking about one-man toy projects here.
  6. Lars Fosdal

    Are we just "Cash Cows"?

    We usually hold off moving to new major versions until Update 1 is out, but we do make the move. As far as I am aware, nobody on my team has ever had a problem with moving their IDEs to new hardware after XE4, and we use the regular named user licenses w/o any license server. Apart from the quality of the initial release, my biggest Idera/EMBT gripe at the moment is understanding why the f..k they keep spamming me with emails suggesting that I order 10.4 with a discount. Not only do I get these from EMBT, but also from the local reseller. I am on a subscription, FFS!
  7. Lars Fosdal

    Are we just "Cash Cows"?

    IMO, the development resources are probably sufficient, but as for most organizations, there simply isn't enough resource dedicated to testing - manual or automated.
  8. Lars Fosdal

    Are we just "Cash Cows"?

    That reminded me of
  9. Lars Fosdal

    Are we just "Cash Cows"?

    If you cannot say more, you should not have said anything in the first place, IMO. If you are making statements based on "private" information, you are betraying someone's trust. Nothing constructive comes from posts like these. None of the commentary here will affect Idera/Embarcadero's way of doing business what so ever.
  10. Lars Fosdal

    Are we just "Cash Cows"?

    Unless substantiated, this is just FUD.
  11. Lars Fosdal

    Are we just "Cash Cows"?

    Can you substantiate this claim?
  12. Lars Fosdal

    Parsing JSON response from TVDB

    A matter of taste. I don't mind RTTI and we use it extensively in all our apps.
  13. Lars Fosdal

    Parsing JSON response from TVDB

    std := TJson.JsonToObject<TStDiscovery>(YourJsonStringHere);
  14. Lars Fosdal

    Are we just "Cash Cows"?

    Still on 10.3.3 with all its quirks and instabilities, since 10.4 is unusable to me. I try to focus on writing code while I curse at the unstable IDE and debugger. Since I depend on EMBT fixing those issues, at least my subscription renewal increases the chance that there will be funds to do that fixing. Other than that, I refrain from speculations on corporate strategies since they are well and truly outside my control.
  15. Lars Fosdal

    Parsing JSON response from TVDB

    First, remove the comment at the top of the stdiscovery.json file. Comments are not valid in Json. Save this as Json type unit: StJsonTypes.pas Caveat: I assumed that fields with value NULL are Integer fields. Since we don't have nullables, an Integer NULL becomes, you guessed it: 0. unit StJsonTypes; interface uses System.Classes, System.SysUtils; type TLinks = class(TObject) private Flast: Integer; Fprev: Integer; Ffirst: Integer; Fnext: Integer; public property first: Integer read Ffirst write Ffirst; property last: Integer read Flast write Flast; property next: Integer read Fnext write Fnext; property prev: Integer read Fprev write Fprev; end; TLang = class (TObject) private FepisodeName: string; Foverview: string; public property episodeName: string read FepisodeName write FepisodeName; property overview: string read Foverview write Foverview; end; TData = class (TObject) private Flanguage: TLang; FairsAfterSeason: Integer; Ffilename: string; FEpisodeName: string; FlastUpdatedBy: Integer; FdvdChapter: Integer; FthumbHeight: string; FairsBeforeEpisode: Integer; FdvdSeason: Integer; FthumbAdded: TDateTime; FdvdEpisodeNumber: Integer; FcontentRating: string; FthumbAuthor: Integer; FlastUpdated: Integer; Foverview: string; Fdirectors: TArray<String>; FairedSeason: Integer; FabsoluteNumber: Integer; FisMovie: Integer; Fwriters: TArray<String>; Fid: Integer; FairedEpisodeNumber: Integer; FthumbWidth: string; FairsBeforeSeason: Integer; FdvdDiscid: string; FshowUrl: string; FsiteRating: Double; FseriesId: Integer; FproductionCode: string; FfirstAired: TDateTime; FguestStars: TArray<String>; FairedSeasonID: Integer; FsiteRatingCount: Integer; public property id: Integer read Fid write Fid; property airedSeason: Integer read FairedSeason write FairedSeason; property airedSeasonID: Integer read FairedSeasonID write FairedSeasonID; property airedEpisodeNumber: Integer read FairedEpisodeNumber write FairedEpisodeNumber; property episodeName: string read FEpisodeName write FepisodeName; property firstAired: TDateTime read FfirstAired write FfirstAired; property guestStars: TArray<String> read FguestStars write FguestStars; property directors: TArray<String> read Fdirectors write Fdirectors; property writers: TArray<String> read Fwriters write Fwriters; property overview: string read Foverview write Foverview; property language: TLang read Flanguage write FLanguage; property productionCode: string read FproductionCode write FproductionCode; property showUrl: string read FshowUrl write FshowUrl; property lastUpdated: Integer read FlastUpdated write FlastUpdated; property dvdDiscid: string read FdvdDiscid write FdvdDiscid; property dvdSeason: Integer read FdvdSeason write FdvdSeason; property dvdEpisodeNumber: Integer read FdvdEpisodeNumber write FdvdEpisodeNumber; property dvdChapter: Integer read FdvdChapter write FdvdChapter; property absoluteNumber: Integer read FabsoluteNumber write FabsoluteNumber; property filename: string read Ffilename write Ffilename; property seriesId: Integer read FseriesId write FseriesId; property lastUpdatedBy: Integer read FlastUpdatedBy write FlastUpdatedBy; property airsAfterSeason: Integer read FairsAfterSeason write FairsAfterSeason; property airsBeforeSeason: Integer read FairsBeforeSeason write FairsBeforeSeason; property airsBeforeEpisode: Integer read FairsBeforeEpisode write FairsBeforeEpisode; property imdbId: string read FcontentRating write FcontentRating; property contentRating: string read FcontentRating write FcontentRating; property thumbAuthor: Integer read FthumbAuthor write FthumbAuthor; property thumbAdded: TDateTime read FthumbAdded write FthumbAdded; property thumbWidth: string read FthumbWidth write FthumbWidth; property thumbHeight: string read FthumbHeight write FthumbHeight; property siteRating: Double read FsiteRating write FsiteRating; property siteRatingCount: Integer read FsiteRatingCount write FsiteRatingCount; property isMovie: Integer read FisMovie write FisMovie; constructor Create; destructor Destroy; override; procedure Dump; end; TstDiscovery = class(TObject) private Flinks: TLinks; Fdata: TArray<TData>; public property links: TLinks read Flinks write Flinks; property data: TArray<TData> read Fdata write Fdata; constructor Create; destructor Destroy; override; end; implementation { TData } constructor TData.Create; begin Flanguage := TLang.Create; end; destructor TData.Destroy; begin Flanguage.Free; inherited; end; procedure TData.Dump; begin Writeln('id:', id, ' episodeName: ', episodeName); Writeln('filename: ', filename); Writeln('firstAired: ', FormatDateTime('yyyy.mm.dd', firstAired)); Writeln; end; { TstDiscovery } constructor TstDiscovery.Create; begin FLinks := TLinks.Create; end; destructor TstDiscovery.Destroy; var d: TData; begin FLinks.Free; for d in data do d.free; inherited; end; end. Save this as 'TestStDirectory.dpr' - Correct the FileDir constant to point to where you have the StDirectory.json file. program TestStDirectory; {$APPTYPE CONSOLE} {$R *.res} uses System.Classes, System.SysUtils, System.RTTI, REST.Json, StJsonTypes in 'StJsonTypes.pas'; procedure TestStDiscovery; var FileDir: string; std: TStDiscovery; d: TData; f: TStringList; begin FileDir := 'D:\temp\Downloads\'; f := TStringList.Create; std := nil; try Writeln('Reading file'); // Make sure to remove the // comment from the .json file - Comments are not legal in Json f.LoadFromFile(FileDir + 'stdiscovery.json', TEncoding.utf8); Writeln('Create StDiscovery object from Json'); std := TJson.JsonToObject<TStDiscovery>(f.Text); Writeln(Length(std.data), ' elements found'); for d in std.data do d.Dump; Writeln('Converting object back to Json'); f.Text := TJson.ObjectToJsonString(std, [joIgnoreEmptyStrings, joIgnoreEmptyArrays, joDateIsUTC, joDateFormatISO8601]); Writeln('Saving Json to file'); f.SaveToFile(FileDir + 'stdiscovery_recreated.json', TEncoding.utf8); Writeln('Done'); finally f.Free; std.Free; end; end; begin try try TestStDiscovery; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; finally Write('Press Enter: '); Readln; end; end. Output: Reading file Create StDiscovery object from Json 17 elements found id:6143085 episodeName: The Vulcan Hello filename: episodes/328711/6143085.jpg firstAired: 2017.09.24 id:6143290 episodeName: Battle at the Binary Stars filename: episodes/328711/6143290.jpg firstAired: 2017.09.24 id:6321258 episodeName: Context Is for Kings filename: episodes/328711/6321258.jpg firstAired: 2017.10.01 id:6321259 episodeName: The Butcher's Knife Cares Not for the Lamb's Cry filename: episodes/328711/6321259.jpg firstAired: 2017.10.08 id:6353529 episodeName: Choose Your Pain filename: episodes/328711/6353529.jpg firstAired: 2017.10.15 id:6353530 episodeName: Lethe filename: episodes/328711/6353530.jpg firstAired: 2017.10.22 id:6362450 episodeName: Magic to Make the Sanest Man Go Mad filename: episodes/328711/6362450.jpg firstAired: 2017.10.29 id:6362451 episodeName: Si Vis Pacem, Para Bellum filename: episodes/328711/6362451.jpg firstAired: 2017.11.05 id:6362452 episodeName: Into the Forest I Go filename: episodes/328711/6362452.jpg firstAired: 2017.11.12 id:6402864 episodeName: Despite Yourself filename: episodes/328711/6402864.jpg firstAired: 2018.01.07 id:6452568 episodeName: The Wolf Inside filename: episodes/328711/6452568.jpg firstAired: 2018.01.14 id:6452569 episodeName: Vaulting Ambition filename: episodes/328711/6452569.jpg firstAired: 2018.01.21 id:6452570 episodeName: What's Past is Prologue filename: episodes/328711/6452570.jpg firstAired: 2018.01.28 id:6452571 episodeName: The War Without, the War Within filename: episodes/328711/6452571.jpg firstAired: 2018.02.04 id:6452573 episodeName: Will You Take My Hand? filename: episodes/328711/6452573.jpg firstAired: 2018.02.11 id:6854213 episodeName: Brother filename: episodes/328711/6854213.jpg firstAired: 2019.01.17 id:6903811 episodeName: "Will You Take My Hand?" Bonus Scene filename: episodes/328711/6903811.jpg firstAired: 2018.03.25 Converting object back to Json Saving Json to file Done Press Enter:
  16. Lars Fosdal

    Open Type Arrays?

    I am trying to see a proper use case for this, as the example is too simplistic to make sense. What is the problem that needs to be solved? What is the duplicate work that needs to be eliminated?
  17. Lars Fosdal

    Your RAD Studio 10.4 Sydney issues

    Feel free to post a QP link to issues that cause you problems in 10.4 and that you think that other users need to be aware of. For things you love about the new version, see this thread! You can also vote on your current experience here
  18. Lars Fosdal

    Sample for TWaitFor (or something similar)

    IMO, minimizing or avoiding Synchronize is preferable.
  19. But isn't everything moving towards 64-bit?
  20. Lars Fosdal

    How to increase the distance between TCheckBox glyph and caption text?

    There are numerous Unicode white space chars of varying width, so adjusting the distance "by character" is possible.
  21. @David Heffernan - At this point in time, would it make sense to ask EMBT to focus primarily on the 64-bit part of this?
  22. Lars Fosdal

    Sample for TWaitFor (or something similar)

    Use a worker thread which stays active and take tasks through a queue.
  23. Off-topic for this thread, isn't it?
  24. Lars Fosdal

    How to increase the distance between TCheckBox glyph and caption text?

    Well, what do you know! I actually didn't know you could wordwrap a checkbox caption! Thanks, @Attila Kovacs!
  25. Having these discussions on desired language features bear little effect unless a properly thought through and well written proposal is submitted through QP, and even then it is just a pipe dream until it gathers a large number of votes, and/or someone within EMBT agrees that it is a good idea. Keep the ideas coming, and do discuss them - but unless they are formally submitted, we are just having a chat by the watercooler, if you see the analogy?
×