-
Content Count
3482 -
Joined
-
Last visited
-
Days Won
114
Everything posted by Lars Fosdal
-
Help, I'm trying to move an application to Rio.
Lars Fosdal replied to Gary Wardell's topic in General Help
Are you able to compile a fresh new FMX project? If you compare the project file between the old project and the new one, are there any discrepancies that stand out? -
Help, I'm trying to move an application to Rio.
Lars Fosdal replied to Gary Wardell's topic in General Help
The actual compiler output after your changes in the second post would be informative. If they are just "cannot resolve" errors, you need to check your .dproj file for invalid paths -
Help, I'm trying to move an application to Rio.
Lars Fosdal replied to Gary Wardell's topic in General Help
Details are important. Without accurate details, you might as well be posting "something is wrong". -
Help, I'm trying to move an application to Rio.
Lars Fosdal replied to Gary Wardell's topic in General Help
...ponders if he should guess what kind of error, but decides not to... -
Does debugger handle WITH better in latest versions, 10.3+?
Lars Fosdal replied to Mike Torrettinni's topic in General Help
I very rarely use with. Too many pitfalls. -
Patch 2 for RAD Studio 10.4 now available
Lars Fosdal replied to Marco Cantu's topic in General Help
Have a good vacation and stay healthy. -
That is still very much an open-ended question, especially if you consider the power of the Mac Pro. https://www.theverge.com/2020/6/23/21296365/apple-mac-arm-processor-silicon-chips-performance-power-speed-wwdc-2020
-
ARM is an architecture, not a brand. The Apple chips are ARM based.
-
OMG, Yes!
-
Well, the next MacBook Pro will be ARM64. If that exercise works out, will any of the Macs remain x64? There already is a Windows for ARM64. The only constant is change.
-
Like the rest of us. Meanwhile, we make the best of it until we or it retires.
-
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.
-
As I said, they need to spend more resources on testing.
-
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.
-
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.
-
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!
-
IMO, the development resources are probably sufficient, but as for most organizations, there simply isn't enough resource dedicated to testing - manual or automated.
-
That reminded me of
-
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.
-
Unless substantiated, this is just FUD.
-
Can you substantiate this claim?
-
A matter of taste. I don't mind RTTI and we use it extensively in all our apps.
-
std := TJson.JsonToObject<TStDiscovery>(YourJsonStringHere);
-
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.
-
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: