Jump to content

David Schwartz

Members
  • Content Count

    1237
  • Joined

  • Last visited

  • Days Won

    25

Everything posted by David Schwartz

  1. David Schwartz

    handling predicate conditions

    You guys are all really great theoreticians. I'd really much rather see a variety of examples than debate theory. That's because I see very little written about this topic anywhere.
  2. David Schwartz

    handling predicate conditions

    Ahh, and example! Thanks! So how do you bail out of the procedure if a check fails? Does this throw an exception? Or is another test needed? @David Heffernan I'm actually fairly agnostic about Exceptions, It's just that they can be a PITA at times.
  3. David Schwartz

    looking for design ideas for an easily editable list

    Yeah, I've suffered through using that sucker a few times. I think it's more work than I want to put in. Any other ideas?
  4. David Schwartz

    handling predicate conditions

    No, I'm thinking about run-time errors here. Like, you cannot proceed without entering something in a Name field. You could say it's "required field" handling, but the form follows one set of rules, the back-end might follow one or two others, and they're all independent of each other. If you decide to change a field from required to options, or vice versa, you have to implement that logic in several different places, and it's not always obvious where they are. And it's hard to test for.
  5. David Schwartz

    handling predicate conditions

    Ahh, well ... I'm working on a form-based app, and the code I'm staring at isn't of the nature you're describing. But I see your point, for sure. Again, I'm looking for some examples, because the few I've seen don't take things like this into consideration. Historically speaking, these things get lumped into "error logging" mechanisms. If you're working with a server that has no display, then that's a valid perspective. But not so much in a form-based app -- you want to tell the user to fix the problem so processing can continue. Even in situations where the client-side code ends up passing improperly filtered data to the back-end, there needs to be a way to a message from the back-end that the front-end can then use to alert the user so the problem can be corrected. I don't see this much in desktop apps, even using DB servers. But boy do I see it a lot in web-based scenarios where a simple data entry error in one field causes the entire form to be reset and all of the previous data to be lost. (I was trying to enter some data into a site that asks for some work history, starting with the most recent / current thing. I added a couple then realized I forgot my "current" status. There's no way to enter something anywhere but at the end. After several attempts at moving things down, I just deleted everything and started over. Apparently there's a bug where if you check the box that says you're "currently employed" there, the back-end won't accept that, and it deletes the entire (first) entry, which is why i couldn't move things down. After deleting everything, it just left me with an empty list and no error message.) I see this same kind of problem repeatedly in web-based scenarios, and no consistent way of handling it. All these fancy frameworks and nobody seems to have a well thought-out way of handing these kinds of exceptions.
  6. David Schwartz

    handling predicate conditions

    Well, aside from a general sense that exceptions shouldn't be used for flow control ... Anyway, I'm looking for some examples as well. This is not a topic that is very widely discussed, although for lots of projects I've worked on, they've devised some kind of consistent approach, usually NOT based on exceptions. But many haven't, so you can see personality differences in the code depending whose favorite method for vetting incoming parameters was used. This isn't very Delphi-specific, so discussions about it in other languages would be fun to read, too.
  7. David Schwartz

    registering D6

    I'm trying to load up an old project that has dates on the files from 2004. I probably used D6, and I have it installed in a VM, but it keeps telling me to register it. I go through the registration and it has valid keys, but it says the registration fails. What the heck are we supposed to do to load up old projects like this? I also have D2007, but it has none of these components in it. So when I open the main form in this version, it's virtually empty because the panels and notebook I used are ancient. I'm not even sure they can be loaded into D2007. But I can change most of them to newer components.
  8. David Schwartz

    registering D6

    That worked! Thanks!
  9. David Schwartz

    registering D6

    The IDE doesn't run because the registration fails.
  10. David Schwartz

    Playing multiple wave files simultaneously

    WARNING: Mitov's library installs both debug and release libs for every possible platform on your version of Delphi. It does take up quite a bit of disk space! But you can safely go through and delete the platform libs you won't need.
  11. David Schwartz

    Request help from kbm/Component4Developers

    Not sure what you mean "ability to copy an existing TDataSet" But if you want to cache a TDataSet to an in-memory table, then TClientDataSet comes with Delphi and is all you need.
  12. David Schwartz

    Lots of errors when trying to compile an old project

    How much experience do you have working with Delphi? Do you even know how to locate files on the hard drive? Sorry, but I'd probably fire someone who came to me with this question. If you don't know how to find files on the disk or set up Delphi's search paths properly, there's no way you're going to make any sense at all of the crap you're going to see as a result of rebuilding this D7 app with Unicode strings!
  13. David Schwartz

    Playing multiple wave files simultaneously

    What library is this from? It looks like the built-in API for the old original Windows audio services. This was inherited from DOS. I wouldn't go near it with a 10' pole! You mentioned "bloat"... What percentage of your xxGB of memory is the footprint of your EXE taking up with whatever audio library you're referring to? BTW, there's a reason that audio devices all need custom drivers to work flawlessly in WIndows but not MacOS. The audio support built into Windows SUCKS! If you're really worried about "bloat" ... you'd avoid Windows for audio stuff. And I can attest that Mitov's libs work VERY WELL for multi-channel audio (and video, too) on both Windows and Mac.
  14. David Schwartz

    Playing multiple wave files simultaneously

    I've done this with Mitov's audio libraries.
  15. David Schwartz

    Disaster planning by archiving GetIt installers

    Now you know why nobody wanted to pay the price Embt was trying to get for these libs, just to ensure they compiled for new releases. I doubt we'll ever see any fundamental changes to Raise Components at this point.
  16. David Schwartz

    Disaster planning by archiving GetIt installers

    I'm not a "hobbiest" and the companies I've worked for that have products generating 7-figures annually in sales of products that incorporate libraries locked inside of GetIt are not "hobbyists" either. GetIt SUCKS. I'm not talking about GetIt! Raize Components were never distributed with any kind of an installer other than the one most libraries used, which was something like Wise Installer. (I don't recall exactly, but it was just a setup executable of some kind.) In case you haven't noticed Wise Installer is a ridiculously expensive tool, but it has been used by virtually every significant commercial library and software vendor. Who the heck wrote GetIt? What does it even take to prepare something to run on GetIt? That's all strictly confidential information from Embt. They don't own Wise or any other tool, but they do use an installer for Delphi that's about $4000 or so, even more expensive than Wise. Maybe GetIt is built around that? Who knows? If so, why aren't downloadable SETUP files available? Nobody would be calling GetIt a "toy" if it worked with Wise or any other decent installer. Clearly, there's a lot of disdain for Getit as far as being a package manager goes. I still don't know what the heck that has to do with the fact that LOTS of LEGACY PRODUCTS DEPEND on libraries that are ONLY available through this "toy"! I wish people would stop venting about the quality of GetIt in response to those of us who actually DEPEND on the libraries LOCKED INSIDE of GetIt. THAT is the problem I'm trying to address. As I said, I don't give a rip what anybody's PERSONAL OPINION of GetIt is. I want a way to manage the 3rd-party libs currently locked inside of it for times like this when it's broken or offline. Anybody else who has to depend on any of those libs probably feels the same way. If you don't that's fine. But consider what Management of a company thinks when they have to waste one or two man-quarters on updating software for a product that generates several million dollars a year in revenues because the tool they're spending tens of thousands of dollars in supposed "maintenance and support fees" has locked libraries that are critical to their revenue stream inside of a crappy interface that they don't want to support.
  17. David Schwartz

    Disaster planning by archiving GetIt installers

    a lot of stuff on GetIt has nowhere else to get it from. Raize Components, for example, have not been distributed directly since they were incorporated into GetIt. I haven't been able to make GetIt work for 18 months due to persistent errors that have gone unfixed. How am I supposed to get updates any other way? Heck, I don't even know if GetIt distributes source or just the object files! A lot of my personal projects have become hostage to this Good Idea that has run amok, and if my maintenance agreement expires, they may well disappear -- if Embt refuses to fix problems that occur and you can only get a fix if you have an active maintenance contract, you're basically hosed. Also, while I don't personally use them, there are several libraries that commercial products I've worked on over the past 10 years that rely on other libraries currently distributed only via GetIt. Because newer updates were unavailable last year, we spent quite a bit of time migrating older source to newer Delphi versions. This was not looked on favorably by Management, because we had just spent a lot of money on updating our licenses and when we contacted Embt, we were only told that there's a problem with GetIt and we'd just have to wait until it was fixed -- "probably the next release". What the heck kind of "support" is THAT when your company has shifted to a business model based around SELLING SUPPORT AND MAINTENANCE CONTRACTS??? It's PATHETIC. Embt has chosen to bury stuff inside of GetIt while refusing to offer ANY KIND OF ALTERNATE MEANS OF DOWNLOADING IT, and it's stuff that's used in a LOT of LEGACY projects. I don't care what anybody's PERSONAL opinion of GetIt is ... it has become the ONLY means of accessing several Delphi-specific libraries that are used in LOTS of LEGACY apps currently being supported by Delphi customers who have active maintenance agreements, and it would be cost-prohibitive to replace some of them.
  18. David Schwartz

    Disaster planning by archiving GetIt installers

    Is that GitHub repo still active? Does it house all of the libs for all of the releases and updates? We really need something to use as a backup to [cant]GetIt!
  19. David Schwartz

    General mobile app <-> REST design question

    I get all this, but you stepped right over the part that I'm most curious about. The UI says, eg, "Marguarita pizza", "Regina pizza", "Meat Lovers pizza", or "Veggie pizza". These are examples of standard combinations, and there could be a dozen or more. Your "order" packet (TOrder) might have a place to specify a "standard combo" by name. But there's usually an option for "build your own combo", right? In that case, you need a list of ingredients to show the user from which they can make their choices. There could be 5, 10, 20, whatever. AND ... would it not not also be perfectly acceptable to specify all of the individual ingredients when the user selected a standard combo, rather than (or in addition to) the combo's name? Where does this list of ingredients come from? Also, the catalog of standard combos (and what's in them)? Do you build these lists or catalogs into the app? Or would you normally plan for them to be loaded (or updated) from the server when the user logs-in? Is TOrder an ingredient list, or a meta-list that can hold catalogs (lists) of ingredients? See my point? I don't care about JSON or REST -- or even pizza. How does one approach a design like this?
  20. David Schwartz

    Best way to check if an internet SMTP server is available?

    This is where it helps to be an old-timer and remember how things worked back in the early days of the internet. The internet was developed by DARPA in the 60s during the Cold War, when the threat of nuclear war lingered in the air and shaped the way people designed things. DARPA wanted to design a large network of independent computers that had no single-point-of-failure in case major cities with central servers got nuked -- literally. Everything was done by dial-up at the time. That is to say, unless you could afford a dedicated phone line, there was no such thing as an "always-on connection" the way we experience things today. And dial-up was slower than molasses in the winter time. I remember 150 baud in the early 70's. Then 300 baud. In 1990, 2400 baud was fast. In the mid-90s, a "high-speed connection" was a dial-up line with a modem that ran at 9600 baud. In effect, virtually 100% of home users experienced what you're trying to argue against as their "normal" use-case. The server (or wherever your emails went next) was NEVER connected. Guaranteed. In fact, the solution for eliminating a single-point-of-failure scenario was to make the entire internet backbone work using store-and-forward mechanisms. They also took this approach because it would be unworkable to have thousands of computers attempting to dial-in to your computer directly just to drop a couple of emails. (In 1988 I did some work for a guy who literally had 25 phone lines coming into his office to support a couple thousand users who'd dial in to connect to his minicomputer that was used to allow search and download county assessor tax records. They charged something like $500/mo per account. He had me write some special driver software that tweaked the 1200 baud modems connected to each of those phone lines.) So servers were set up to collect stuff, then forward it on to the next server closer to the destination, until each email finally made it to an ISP that hosted that email. ONE SIMPLY DID NOT CONNECT DIRECTLY TO THE DESTINATION MTA! EVER!!!! That's just not how things were designed to work. Back in the days of dial-up access, we all remember times when we'd try to connect and the line would be dead. Or someone would be on the phone (or party line). Or it would be busy. Or the number was disconnected. THIS WAS N-O-R-M-A-L. It was also pretty normal to be in the middle of a dial-up session and someone in your home would pick up the phone in another room and the line would drop. So we'd get online late at night when we knew nobody was going to try to make a call. (Generally speaking, nobody called anybody after 10PM.) And THIS is EXACTLY how the internet in general, and mail delivery specifically, was designed to work. You seem to want to be able to assume otherwise. Just build a mail agent designed to work they way MTAs are SUPPOSED to work and save yourself some grief. You can find the actual RFC spec for how SMTP was designed to work here: https://tools.ietf.org/html/rfc5321 If you go back and look at earlier specs, you'll see that not much has changed since the original specs were written in the 60's.
  21. David Schwartz

    Disaster planning by archiving GetIt installers

    I've been unable to make GetIt work since 10.2.1 was released. Some unrelated libs apparently introduced a problem with something that was never fixed, and it raises some kind if stupid error in the interface that prevents it from loading up. Having an automated installer is nice, but we definitely need a way to manually download and install these libraries, otherwise they're pretty much useless. If Embt is going to provide access to these libs for anything more than fun, they need to offer better support. The quality of the libs themselves is great. The interface sucks and Embt doesn't seem to give a rat's ass.
  22. David Schwartz

    Disaster planning by archiving GetIt installers

    I've been using Raize Components since D4 or so. I much prefer them to the regular components. They're rock-solid and exactly what should be provided as the default components, IMHO. I can't build a TON of older projects without it. When Embt bought it from Raize and then priced them at some outrageous amount vs. what we had been paying Raize, I told my account exec, "Sorry, but I'm not upgrading Delphi because without Raize Components I can't use it for my older projects. And I'm not paying what you guys want just to get the libs updated so they'll recompile with each release." One guy wrote back, "We may be making an announcement shortly that will make you happy." Given the slow and steady demise of Delphi in the marketplace, and the general lack of support users have expressed for commercial libs, a lot of otherwise excellent component libraries have been released for hosting on GetIt. If you want a bunch of half-baked crap, visit Torry's. GetIt has stuff in it that Embt has thankfully agreed to maintain so those of us working on older legacy products that use these component libs can continue to use newer versions of Delphi. Without it, I think they'd lose a lot of business. Of course, there's also a ton of demos that only run inside of the IDE, and require you to pay for if you want the full version, which is fine. But it's the presence of formerly commercial libs that I find most valuable. When Delphi went from D6 to D7, a lot of users bailed out and switched to C#/.NET because some popular component libs did not make it through the transition (Dream Components being a biggie). This happened again when Unicode was introduced. If people have to rewrite entire apps because old libs are no longer available with new versions of Delphi, they're more likely to switch platforms than anything else. I think they learned their lesson.
  23. David Schwartz

    Refer to Form Control without using the Form unit?

    I don't know if this will help or not, but you might find it interesting. It's a talk I did for CodeRage 9: http://w5a.com/u/coderage-9-talk
  24. David Schwartz

    General mobile app <-> REST design question

    Thanks, but I'm not looking for a programming tutorial or any code at all. I'm asking about design tradeoffs that apply regardless of the language or platform. (I don't even really care how the data is packetized. It's just that most REST APIs seem to use JSON.)
  25. David Schwartz

    Best practices for system migration?

    I prefer VirtualBox to the others. One nice thing about it is you can move your VMs between Windows and MacOS fairly easily. (I prefer to work on a Mac.) They're HUGE files (120GB in my case) but they're a lot easier to deal with than either VMWare or especially Parallels. I also prefer running Win 7 as the OS inside the VM. I only wish I could turn off the auto-update, although that looks like it might happen on its own shortly. Every time Windows updates, something seems to break! I only use the VM for development. I don't surf the internet, I don't read email. I don't do anything that's not related to dev work. I don't run anti-virus or anything. It's fast, efficient, and clean. I back it up periodically, and if I were to get a virus or something, I'd just delete it and pull the previous version from backup media. I don't remember the last time I got a virus in my Dev VM (other than Windows itself). I just want a stable platform to work on that's not always reconfiguring itself. That's what viruses do. To me, Windows is the worst virus I have to deal with.
×