Jump to content

David Schwartz

Members
  • Content Count

    1190
  • Joined

  • Last visited

  • Days Won

    24

Everything posted by David Schwartz

  1. As I said, I back-up anything I can't get from somewhere else or recreate quickly. But you're making an assumption here, which is exactly why I said most people forget about this. (Hint: what were YOU referring to regarding saving/backups? And what do you think I was referring to?)
  2. David Schwartz

    RAD Studio 11 Alexandria is now available

    The place they chose to honor for this release was Alexandria ... don't know if that's the place in Virginia or Greece, but it's what they decided to call it. You can call it whatever you like as long as you keep it to yourself. It can be your own secret! 🙂
  3. David Schwartz

    Send a message to App users??

    Applications that I've worked on solved that by having their main module poll a central folder or message queue in a DB for new messages every minute or two. When something showed up, it would be displayed to the user. That works as long as it's YOUR OWN APP they're running. But if it's a portal and you need to reset/reboot regardless of what apps they're running, then you'd need something else. Windows 10 has a way to send alerts; I know b/c I get them all the time from different places. You could always write a very small listener app that sits in the task bar and watches for a message, or is connected via a socket listener to a broadcast source. Lots of possibilities!
  4. I back-up anything I can't get from somewhere else or recreate quickly. One thing most people forget about is ... Windows Registry settings! Another is INI files that aren't kept with your source or EXEs. If you're working inside of a VM, do you mirror your backups somewhere? I don't like backing up my VMs because they're so damn big and they don't seem to get delta'd very well. If you use something like git, the master could be on the VM or the host or in the cloud somewhere. But a lot of folks forget about that and just keep the files local. You should keep a copy of everything both inside and outside of the working environment!
  5. David Schwartz

    Delphi 11: Text size too small!

    Did you watch the webinar today? In the webinar they spent some time talking about the new HIGH DPI settings. If you have a 4k monitor that's more like 27" vs. 55" and your Windows settings are designed to compensate for things, the IDE is may be ignoring the system's compensatory mechanism and doing things itself. I have a 4k 55" monitor and things look fine in Windows because everything is able to run at "normal" -- ie, uncompensated -- resolution. So it looks the same as 4 HD monitors running at HD DPI settings But on a small monitor, it's too tiny to read. I have to go into the Windows Settings and tell it to compensate. So the question about your SYSTEM SETTINGS IS 100% DEAD-ON. This is more about your system than Delphi because this NEW version of Delphi probably overrides whatever your Windows settings are. And there are settings in Delphi as well.
  6. Looking for ideas and suggestions, so I can't post this to SO. I'm looking for something that can be called from inside of a web service (part of my app) that allows the persistence of ad hoc data (eg., JSON data) that can be accessed across multiple service calls. It doesn't need structured data that a SQL database provides. Rather, it would function similar to how the Windows Registry works. However, it needs to have a REST API. There would be a "start" function where some data is saved that's tied to a key, followed by lots of reads by dozens of calls from multiple service instances, followed by a "stop" that deletes the data and key. The time-duration would span seconds to 10 minutes. Anything >30 mins old can be deleted. It cannot be file-based (like INI files or Sqlite) or platform specific. Security is not a big issue as there's nothing sensitive about the data being stored; mostly this thing is just going to be used as a kind of "clipboard" for some transitory data shared briefly by a bunch of independent threads, kind of like shared memory in a multi-tasking OS. Open source would be ideal. There are some commercial services that are mostly overkill for single-user situations and the costs seem ridiculous for this application. There might be 500-1000 hits one or two days a month, and that's all. It doesn't have to be hosted on the same server as my app (ie., accessible via localhost), but it can be. (For scaling purposes, localhost would be limiting, but initially it's fine.)
  7. For now, quick-n-dirty is just fine. I've been fleshing out a proof-of-concept prototype. I just need a very simple persistent store that I don't have to host or write much code to make it work. Yes, the first one works fine for my current needs. I've been farting around for 6 hours now with something throwing weird exceptions thinking it was my code ... I backed-out 3 layers of new code and found out the 3rd-party API I'm using moved some stuff around in their JSON layout without telling anybody. And they removed some of the labels, so you can't get to several fields without manually parsing them. Sometimes when you need something to set something else on, grabbing an upside-down bucket from a nearby trash dumpster can be way faster than building a table, especially when you find out something else changed and negated the need for either one.
  8. I offered up a solution. It may not be ideal, but as you say, that's impossible. So, yeah, we've gotta make do with what we've got. The language purists have managed to keep stuff like this from being properly implemented forever. There are all kinds of holes and back-doors and things that can only be done with awkward work-arounds in Delphi, and I don't expect that will ever change. Everywhere I've worked has all sorts of unwritten rules about what devs can and cannot do in order to deal with this stuff, and when I dig into the code there are also lots of violations of said rules, mostly by those who made the rules up in the first place. ("Do as I say, not as I do!")
  9. If it's for a singleton, treat it like a Factory method with the constructor hidden. The static method would create it initially if it's NIL, and otherwise return the existing reference. Also, make the constructor Create a strict private member of the class and only reference it through the static factory method in the same unit.
  10. I'm not sure it can get any simpler than these: https://jsonbase.com found this related item: https://www.indiehackers.com/product/jsonbase this next is very similar, but the site was taken down. However, the source is on github: https://www.producthunt.com/posts/jsonbox-io https://github.com/vasanthv/jsonbox
  11. As I said, it needs to have a REST API already in place. Something comparable to, say, TMS myCloudData .net but open-source.
  12. David Schwartz

    Index properties in interfaces

    https://quality.embarcadero.com/browse/RSP-17148?focusedCommentId=105837&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-105837 Marco Cantù added a comment - 1 hour ago There was a mistake when we closed it. Should have been closed as "Won't do" rather than fixed. I've amended it internally, I'll see if we change the closing here
  13. David Schwartz

    FinTech anyone?

    Some folks here might find this article interesting... Axway: 52% of Americans have never heard of ‘open banking’ https://venturebeat.com/2021/08/22/axway-48-of-americans-have-never-heard-of-open-banking/
  14. David Schwartz

    FinTech anyone?

    So write your own UI. That's why I posted this ... not to evoke a bunch of complaints about what OTHERS might do, but so you can do it yourself. Anyway, I don't think what you're suggesting is possible. It's more like how an IFRAME works. IFRAMEs have been around forever, and I've never heard anybody complaining that site owners have any possible way of dipping into an IFRAME data stream. Plaid, for example, opens a popup window where you enter the data. The vendor saves a key that refers to your account info record on Plaid. This is the same way many sites keep hold of references to credit cards, rather than the CC data itself. PCI regulations are pretty onerous here in America, and EU is even worse I hear. So generally speaking, I think any outfit that tries snooping into your data served up by a 3rd-party would be violating a bunch of different laws, not the least of which would be the license they have to use the 3rd-party's API. FWIW ... A couple of years ago, I set up one of my accounts to display a bunch of other balances. One of the accounts kept giving me error messages. The bank said they couldn't help because they don't have access to anything. The middle-man data provider (sort of like what Plaid does) said they couldn't help either. I finally had to go in and just delete the account. Basically, banks didn't think through this stuff very well, and came to different conclusions. Some decided they wanted to require a login each time data was pulled. Some issued a key that let the client get access to the data for a while. In this case. the query worked the first time, but I'm guessing the middle tier expected the key to mean they didn't need to login again. But the financial institution didn't play that game -- they wanted to see the login info every time a query was made. I'm guessing this API has been fairly standardized so those kinds of things don't occur any more, but that's just a guess. I do know that I've had some problems with Plaid not finding banking institutions, but later on (a month or two later) they do.
  15. David Schwartz

    FinTech anyone?

    ROTFLMAO! Yes, my thoughts exactly! I nearly choked when I read that article and had to check to see if it might have been published on April 1st as an April Fool's Joke! It appears to be legitimate. I didn't really get much of an idea of what "Open Banking" really means from that article either, but one thing is undeniable: I've heard many reports that the bulk of venture capital investments have been going into so-called FinTech startups for the past 2-3 years, and big main-stream banks are actually getting nervous. For 15 years all they had to contend with was PayPal. Now there are dozens of smaller startups and even PayPal is having to adapt. One very clear way to see the impact of this is that most of these online financial services are now adding ACH interfaces to their accounts, including PayPal. For years they kept saying, "We're not a bank!" but now that they offer ACH interfaces, it looks like they've given in, since you can now treat your PayPal account like a checking account. There's a startup called Plaid that just went public (or is about to) and they provide a fairly universal hub for connecting any two financial institutions together. Many banks are now using them rather than their own limited intra-bank services that let them limit who they work with. Plaid has a public API and it's fairly easy to work with. For years, the big banks have been making most of their profits from abusive fees, and it's making a lot of people angry. Like the "cut-the-cable" people who are ditching cable TV because in spite of all their promises to offer more services at lower costs, they just keep raising prices and pulling popular channels out and putting them into separate tiers that cost more money. A lot of people are starting to thumb their noses at traditional banks, and one reason is because of all these little startup virtual banks that make "no fees!" one of their primary features. Congress has been trying to do stuff through the CFPB, but Trump gutted the CFPB and turned it from protecting consumers to protecting the profits of financial institutions. So costs and fees just keep going up and up. I just got an update from one of my store cards notifying me that late fees are now $40 and their minimum interest rate is now 24.9% on outstanding balances. Thanks, guys, it's been nice knowing you! A large number of these FinTech startups are focused on helping consumers manage their finances. Traditional banks are very opaque and unpredictable, even to the point where they deliberately process things out-of-order to increase fees when your bank balance lets them do that to their advantage. Congress has tried to punish them for that, but they've figured out how to get around it anyway. You cannot manage things that are kept hidden and where the goal posts keep moving without your knowledge. So these FinTech startups are simply pushing transparency and simplicity, with no fees. Just "no fees" alone can save lots of people $100-$200 PER MONTH! Most of these folks are already at the lower-end of the income spectrum, and they're tired of getting screwed by their bank which is supposed to be working to HELP them. Anyway, the reason I posted this here is in case anybody might have some ideas for simple financial tracking apps that consumers might find helpful. There's an API for that now, and it doesn't require you to post a $100k fee to get started. (I'm pulling that number out of my ass, but banks have never wanted to let any random software devs access their data, and usually require big up-front fees to keep the riff-raff away. Plaid has opened the door for any of us to get into that market using Delphi or whatever other tools we want.)
  16. well, if you're going to cite expectations and "likely" barriers as blocking your path in one, then consider the other: in what world is a computer that runs Delphi going to be "free"? Or the internet? What about the source of electricty needed to run them? The building you're likely working in? (Or vehicle?) It certainly wasn't developed for free! It wouldn't exist if millions of dollars had not already been spent on it. The POINT is ... for MOST of its life, Delphi never had anything more than a "trial period" of 30 or 60 days. Now the company offers a full-blown unrestricted copy of the platform that can be used in situations where a few "limitations" aren't actual "limitations" for all practical purposes. Some of those "limitations" do involve certain non-essential libraries and other things that may be "nice to have" but are not essential. You do still need a pretty beefy computer running Windows 7 or newer to run Delphi, as well as an internet connection and other things to make it useful for more than 15-30 minutes or so, but the vendor is under no obligation to provide any of those at all. Never mind that Delphi is pretty much an anachronism in most ways -- just about the only commercial compiler left on the market; the only fully proprietary compiler on the market; perhaps the biggest piece of commercial software made in America that has more foreign users than domestic users; the language (pascal) is no longer taught in most schools; there are probably more COBOL programmers on the market than Delphi programmers; and so on. If I had 10 years or more left in my professional career, I'd have changed horses a while back. But I just turned 65 and have started to collect Social Security, so now I get to play with my toys and have fun doing whatever I want instead of what somebody else wants me to do. 🙂🙂 I might downgrade to the "free" version, but I hope to make money down the line. Then again I might just stick with TMS and their WebCore for VSC, since the future is mostly connected to the web somehow. (The cost to renew my All-Access pass is less than have of what it costs me to renew Delphi, and VSC is totally free as well, so I'm not really losing much.)
  17. No, they're NOT included on the FREE sports car. They are OPTIONAL. If you BUY the car, they're INCLUDED. Free car => optional windows; buy the car => windows included
  18. Feeling like you're getting a free sports car where all of the windows are optional, eh?
  19. David Schwartz

    thread-safe ways to call REST APIs in parallel

    I have no problem paying for libraries. I am aware that some come with better examples than others. I'm also aware that there are plenty of things in the Delphi help system that are completely undocumented, even though they have placeholder pages for them on the wiki or the help system. We all continue to pray that our steadily increasing annual "maintenance" fees will eventually be used to pay someone to fill in these gaps instead of just creating more. That IS what "maintenance" is all about, right? It's also annoying when there is documentation that only explains WHAT parameters are needed and leaves it to the reader to figure out HOW this mess of stuff is supposed to be used. I've found that to be fairly common with the different classes and whatnot involved with this particular effort. Why should one need to buy a 3rd-party library to figure out how to code something that Delphi has plenty of available mechanisms to work with, but they're just not documented anywhere? There are no examples shown in Delphi's help for TRESTRequest.ExecuteAsync for example, even though there are help pages there.
  20. David Schwartz

    thread-safe ways to call REST APIs in parallel

    I understand from the first reply that the three objects need to be created dynamically inside the task. That's fine. A different post about this general topic suggested a fork/join approach using a counter object to know when it's finished. That's fine, too, although it may be more complicated than I need. Another reply here pointed out ExecuteAsync which I had not noticed (although I looked for Async...something), and it has some very interesting properties that also suggest the fork/join approach might have a simpler solution with it. In particular, I like the options that the anonymous methods offer in conjunction with the parameters that say whether the code should run in the main form's thread or the current thread. But every other post here added a warning about this or that, and it got confusing with the Execute vs. ExecuteAsync. The entire discussion seems like it could have been reduced to one or two short code examples like the above, so thank you Dalija. (The whole discussion on fork/join has quite a bit of code in the referenced article, although it seems to me it shouldn't be that complicated. Be that as it may, adding the logic needed to perform the REST queries in the task shouldn't add very much complexity.) I looked on SO for examples as well. It's hard to search for help there (or anywhere) on obscure topics. The few I found had lots of comments back and forth debating this and that, and not much code. (I'd post something on SO, but it seems a lot of my questions get downvoted or locked for being "off-topic". They're Delphi questions -- I don't get what's "off-topic" about Delphi questions in a forum intended for Delphi questions. Now I get warnings from SO saying my account is close to being locked because of the "low-quality" of my questions. I used to have nearly 2000 points and 45 badges before something short-circuited and SO's support people denied there was a problem. All of that "bling" just disappeared. So I don't spend much time there any more. I'm also very hesitant to post any more questions. The last one I posted got lots of opinions, and no definitive answers.) OT: There have been times in my life when I worked with a team of other developers. For the past 12 years or so, I've been either the only Delphi dev or had a junior person working with me with only 3-5 years of experience. Also, I'm a fairly high-level abstract thinker and most of the folks I work with are heavily left-brained highly detail-oriented people who can't handle abstract discussions. They want concrete examples for everything, which I find challenging. My only resources for help have been this place, SO, and Google. I truly do appreciate all of the help that's available here, and it's mostly because I value the level of mastery everybody here has. I know I can be a PITA at times because I often have very clear pictures in my head of what I'm looking for, I just have trouble expressing things clearly. We programmers are often no better at describing things in our heads than our clients, eh? 🙂 Unfortuntely, my memory recall is getting a little flakey, and complex topics I used to have no problem dealing with seem to show up in my head with pieces missing. But I still do love the process of programming -- it has always been like playing word games to me, and it's something I can do for hours and hours and never really get tired of doing. I'm sure most of you can relate ... how many people can say that about the things they do to earn a living? We're blessed in that respect. I only have one compliaint about what we do: we spend way too much time describing and explaining, in text, what it is we're talking about. I mean ... that's all programming is at its core: we have an idea in our head, we conjur up a recipe in some arcane language (Delphi in this case) and we use that to make the computer sing, dance, and jump through hoops. If we want to see a circle on the screen, we describe a circle. If we want to launch a rocket, we describe all of the steps that all of the different parts need to accomplish that. As annoying as I find reverse-engineering code to understand what it's doing (since most code is undocumented and what's there is usually outdated), sometimes the answer to a question is better given as code (or pseudo-code) than words describing what code needs to be written. But overall, I wish there was a more abstract way of dealing with things other than, say, English words explaining what's needed in a translation.
  21. David Schwartz

    thread-safe ways to call REST APIs in parallel

    Everybody is describing eating a different piece of this elephant, making different assumptions about what's being used. Doesn't anybody have a more or less complete code example available? I like the ExecuteAsync method, which seems to solve a lot of the sync issues. I've got a few dozen API calls to the same endpoint with different parameters (similar to the same SQL query with different parameters). I want to run them all in parallel, then extract some data from each of the returned JSON packets, put that data into a fairly simple (newly-created) object, and stick the object onto the Data property of a TListItem in a ListView while updating the line to show its status. There are virtually no examples of this sort of thing I can find anywhere (with or without the UI updates). Just stuff that increments an integer 100k times. Doesn't anybody do anything useful with multi-threading REST API calls besides incrementing integers?
  22. David Schwartz

    thread-safe ways to call REST APIs in parallel

    Thanks, I had not noticed that for some reason.
  23. Has there been anything mentioned publically about the language enhancements supposedly being added to the pending Delphi update? I think something way back mentioned nullables as a good possibility. Anything else?
  24. David Schwartz

    Prevent OnClick to be handled twice

    I think you are solving the wrong problem. Why are you getting multiple clicks enqueued that are so close together? They're supposed to be translated into double-clicks. Clicks at the short intervals you're showing are NOT from a single user! Find out what's spewing out all of those clicks and fix it.
  25. David Schwartz

    Prevent OnClick to be handled twice

    Looks like you may have a bouncy mouse. I'd try another mouse and see if it works better. This shouldn't be an issue.
×