-
Content Count
2561 -
Joined
-
Last visited
-
Days Won
133
Everything posted by Anders Melander
-
I use the policy that all projects must be completely self-contained. Each project has a complete copy (source and installer) of the all the in-house and third party libraries used. The project search path points to the local copies. I always build from the source. dcu, exe and bpl files goes into local project folders. Everything is under version control. Getting a project setup on a new system is just a matter of fetching the project from version control, running any necessary 3rd party installers (usually just for design time functionality) and installing the bpls. Since the different projects tend to use the same libraries the two last steps are usually just done once. I don't care about what the installers do because I don't use their dcu-files or their search paths. The project itself contains it all. Never had problems with duplicate dcus (since I started doing it this way, that is). There's of course the problem that different projects might use different versions of design-time components, but that is a bit outside the scope of your question. WRT the VM solution I used it a while ago and it actually worked very well. I used Hyper-V with one VM per project. The only problem was that it got a bit tiresome to have to install the same tools in each and every VM whenever there was a change in the toolset.
-
True. I'm more worried about those that would use something like this just because it's a new smart way of doing stuff, regardless of whether it's a suitable pattern to use - and then I have to clean up after them. But then again, they pay me good money to do so 🙂
-
Oh, I thought you meant the "else after end" style but I guess you're shooting at "else...if" in general. Well yes, I guess a more flexible case would be nice, but I can also imagine the horrors people would create with it.
-
Pattern matching? You'll have to explain that one.
-
I see. Thanks. No need for a war; We all know there's only "One True Style" - and it's the one we use ourselves 🙂
-
Just out of curiosity, as I use this style myself, why do you "hate" it?
-
Line numbers in code editor
Anders Melander replied to Jacek Laskowski's topic in Delphi IDE and APIs
This is were the option is found in 10.2.3: -
Saving a large project takes soooo Loooonnnnggg..
Anders Melander replied to Ian Branch's topic in General Help
I'm not saying that the feature doesn't make sense. I'm saying that it doesn't make sense that these settings can be edited more than one place and that one of the places is the global Components, Install Packages dialog. After all if I still get confused about this after using Delphi for 24 years, then there's either something wrong with the UI or I'm just slow. Change the global dialog so it doesn't edit the project package list and instead make it clear that it's editing the default options and there's no confusion. Even better, and I remember this was discussed ad nauseam some twenty years ago, but if the package list had been opt-in instead of opt-out then much of these package juggling problems wouldn't exist. -
Saving a large project takes soooo Loooonnnnggg..
Anders Melander replied to Ian Branch's topic in General Help
I believe you, but that makes absolutely no sense from a usability perspective. You're saying that the Design packages list in project options is working on the same settings as the Design packages list in the Component, Install Packages dialog (which is where one used to install packages globally). [checking...] You're right. The dialog even says "Project options". Amazing! -
Saving a large project takes soooo Loooonnnnggg..
Anders Melander replied to Ian Branch's topic in General Help
That typically doesn't stick. For some reason Delphi enables the packages again sooner or later. It's been like that for as long as I can remember. -
Saving a large project takes soooo Loooonnnnggg..
Anders Melander replied to Ian Branch's topic in General Help
It so happens I have written a tutorial on that exact topic. Here it is: Disabling Live Bindings, The Tutorial Google "disable live bindings". [the end] -
Saving a large project takes soooo Loooonnnnggg..
Anders Melander replied to Ian Branch's topic in General Help
Sorry. Didn't read your description properly. I thought it was the save that was slow. I've encountered projects that took a long time closing but I can't remember what I did to solve it. I don't know if Live Bindings can affect close performance like they do open. One of my clients has a project where one of the datamodules has almost 200 datasets and thousands of persisted fields. Before I disabled Live Bindings there it took in the neighborhood of 15 minutes to just open this datamodule. Now, with Live Bindings disabled it takes less than a second. Anyway, you can easily get a call stack of the Delphi IDE with Process Explorer. Double click bds.exe, view threads, double click the thread with the highest CPU usage. That should give you (or us, if you post the call stack here) a clue about what it's doing. -
ToDo items should have a separate syntax color in the editor
Anders Melander replied to PeterPanettone's topic in Delphi IDE and APIs
Pfft! You did ask for opinions, did you not? For me the use case would be that I'm either looking for TODOs or I'm focused on something else. If I'm looking for TODOs then the existing functionality is just fine. If I'm focused on something else then I'll read the comments anyway and I don't need the extra distraction. -
ToDo items should have a separate syntax color in the editor
Anders Melander replied to PeterPanettone's topic in Delphi IDE and APIs
You have View, Tool Windows, To-do list. That's pretty visible... -
Saving a large project takes soooo Loooonnnnggg..
Anders Melander replied to Ian Branch's topic in General Help
My bet would be cloud storage: Try disabling iTunes, GDrive, OneDrive, DropBox etc. if you have them. For some reason these don't show up in Process Explorer (probably because they work on a too low level), but in my experience they can completely kill system performance. Every so often members of my family will ask for a new computer because it's gotten so slow they can't use it. I've tried, in vain, to explain to them that hardware doesn't get slower with age (my main workstation is actually the oldest in the household) but they persist. So I just uninstall or disable the various cloud storage services they use and just like that their system runs like new again. -
Delphi compiler need to be opensourced
Anders Melander replied to AlekXL's topic in RTL and Delphi Object Pascal
I'm pretty sure many of the countries on the receiving end of US' forced friendship has a different view on that. Look to me like the US is actually also guilty of most of the issues you listed. I don't mind the US looking after its own interests, just don't pretend it's doing anything but that. China is a complex issue. Sure it's bad in some areas, but it's slowly improving. It's a huge country and rapid change would cause the country to implode. -
Delphi compiler need to be opensourced
Anders Melander replied to AlekXL's topic in RTL and Delphi Object Pascal
Didn't you mean to capitalize "US"? And on that note I can't see how what China is trying to do is different from what the US is already doing to the rest of the world... -
Delphi compiler need to be opensourced
Anders Melander replied to AlekXL's topic in RTL and Delphi Object Pascal
It's not possible to downvote in JIRA. -
Use graphics32 to draw rounded rectange with gradient + border
Anders Melander replied to DelphiRio's topic in VCL
And have you looked at the Polygon and Gradient examples? -
Prefer composition over inheritance for code reuse?
Anders Melander replied to Edwin Yip's topic in Algorithms, Data Structures and Class Design
@Dalija Prasnikar I agree with your characterization but in some cases I find that composition is better suited than inheritance even though inheritance would be more natural. For example if I were to create a list of TSomething it would be tempting to use TList<T> as a base class, Problem is that it might give me too much. If I only need an Add method, a Count and an array property, then composition is probably better (I guess one could call it inheritance through composition). I've seen too many examples of inheritance (not just from TList) where most of the inherited methods doesn't make any sense and would break the application if used. -
Check for override
Anders Melander replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
OK then, let me spell it out; In regular applications or even simple libraries individual braking changes are probably relatively easy to locate and fix. The TStream change for example could almost have been made with search/replace, but I guess they thought that the backward compatibility solution was safe enough that they didn't need to make it breaking. In retrospect, although I never personally got bitten by it, they should have marked the old overload as deprecated to flag that ppl should fix their code or else. FWIW I don't think the TStream method is fragile. From what I can see it's very robust. For a large framework the situation can be different. A framework has an API and therefore a contract with the users of the framework. A breaking change in the RTL that lies below the framework can mean that the break propagates to the API of the framework. For example I just yesterday finished updating my local copy of a framework that sits on top of DevExpress from a two year old version of DevExpress to the latest version. DevExpress changed the type of some properties from TBitmap to TdxSmartGlyph and since the framework exposed those same properties as TBitmap it got stuck on that old version. If the framework had followed suit and also changed the type, then it again would have broken the code of hundreds of customers (the users of the framework) with no gain to them. The company that with this particular framework is still stuck on that old version of DevExpress since they no longer have have the in-house expertise to solve the problem and you can bet they would have preferred a non-breaking change. Another example is systems with a plethora of applications and millions of LOC. A breaking change here can be hugely costly because of the accumulated time it takes to evaluate, fix and test each required change. In some cases the people that wrote the original code have moved on and nobody knows or understand what it does anymore. I see that daily (not the break, the lack of knowhow). Anyway, I don't think there much point in flogging this much more so I'll let you have the last word - I know you want it 🙂 -
Check for override
Anders Melander replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
Ehem.. I think you should speak for yourself and not put these labels on the motives of other developers you know nothing about. Breaking backward compatibility is easy. Maintaining it is often very hard. I have seen many examples of projects that have stranded on old versions of 3rd party libraries because it was simply to costly to locate and fix breaking changes. That said I naturally agree that one should strive to move code forward and eliminate dependencies on backward compatibility. -
Check for override
Anders Melander replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
Are you saying that it wasn't worth it back when the change was made or that it isn't worth it anymore (i.e. today)? IMO the change was definitely worth it at the time because it didn't break backward compatibility and AFAIR didn't introduce new problems. They could have marked the old methods deprecated at some point and eventually retired it completely. AFAIK the change didn't introduce any new problems in older TStream descendants with 2+Gb files - it just made them possible going forward. If you have examples of bugs then I'd love to hear of them. -
Check for override
Anders Melander replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
Good thing you're not in charge of the RTL then. IRL backward compatibility matters. -
Check for override
Anders Melander replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
You're missing the point. The purpose was to provide backward compatibility for existing descendants of TStream - not existing code using TStream.