Jump to content

David Schwartz

Members
  • Content Count

    1237
  • Joined

  • Last visited

  • Days Won

    25

Everything posted by David Schwartz

  1. If memory serves me correctly, MS SQL Server has a metadata-field attached to everything that serves just this purpose. It's distinct from the ones that you can add comments in SQL GUI tools. I was looking through MS documentation for an odd TSQL API function that some code was calling, and I scrolled around the other functions in that group, and it seemed like an odd collection of stuff attached to records and tables.
  2. Who is the consumer of this data? Run-time access presumes the end-user, which doesn't make much sense. End users have no knowledge of what's under-the-hood. It's like when SQL queries fail and spill these horrid run-on queries to the user in a warning box. Great for testing, but bad to have them exposed in the field. Can you describe your use-case better? (some?)
  3. David Schwartz

    Modern C++ and Delphi

    Much of this is true, and I'd like to say it's Delphi-specific. But when you suggest redesigning an app by moving the business logic to so-called micro-service APIs, they cringe. Then someone comes along and suggests doing something analogous using Microsoft's latest stuff and their ears perk up as if they'd never heard it before. And they don't even seem to notice when 2-3 zeros are added to the total cost. I've never seen a "migration" from a large stable Delphi app to a full .NET web-service app succeed. At least, not in the time I was working at these places, and they all were scheduled to be complete during my tenure by had barely made headway by the time I left. I just don't get it. It's actually pretty straightforward to migrate business logic out of a Delphi app incrementally, and improve the testability dramatically along the way. But Management always seems to jump on the Microsoft bandwagon that restarts everything from scratch with a whole new design.
  4. David Schwartz

    Modern C++ and Delphi

    Fair point, but it's more a matter of "when" and "where"... I began using C in 1985, learned C++ about a year later and used it heavily from 1987 thru about 2000. Delphi was released in 1995 and it replaced C++ in my daily work by 2000. I used C/C++ at the time b/c I was doing embedded real-time system programming. Work in business apps, mostly under Windows, was taking off in the 90's, and it became far easier to find Delphi work than C/C++ work. Now it's getting hard to find ANY work b/c potential employers want to see 3+ years of immediate hands-on experience with whatever tools they happen to be using. (I remember seeing an ad for a job about 6 months after Apple published their iOS API that stated "must have at least 3 years experience working in iOS".) It's possible to learn pretty much anything, but you can't magically conjure up OTJ experience for them. 🙂 The last bunch of C code I looked at was some open-source stuff that was written in a way to simulate what C++ did, but in the author's words, "to avoid the overhead that C++ imposes at run-time". So instead, you had to write tons of highly stylized code to pretend you were working with classes. The last bunch of C++ code I looked at was well over a decade old and was about as "vanilla" as you could get. It hardly even implemented any of the idioms from that famous "C++ Idioms" book. Not a whole lot of consistency across any of the class designs. There was also a Delphi gig I had around 2004 where I was asked to maintain some code written by a guy steeped in C++; it was an unbelievably large and convoluted class library in Delphi that was extremely hard to figure out even with C++ expertise. Ditto for Delphi. In fact, all of the Delphi gigs I've had in the past 10 years were all maintaining D6/D7 code. Sadly the main reason a couple of them migrated to newer versions of Delphi was because the IT people there forced them to upgrade SQL Server and they needed to upgrade some libs they used with it that were only available in newer versions of Delphi. So aside from the fact that I try to keep up with the latest Delphi features myself, it's not due to any actual employment / OTJ needs. As an aside, there was a time I was working on learning Java. It's very similar to C/C++ in my mind, and Java 8 had just been introduced. I ran into a curious problem. I'd see job reqs that just specified "Java" (no version#) and libs like Spring. When I'd inquire more deeply, I'd find out they were almost all using Java 5. I talked with a VP of software at InfusionSoft at a job fair about this and asked, "When are you moving to Java 7?" and he admitted their entire platform was based on Java 5 and they had a few guys working on Java 6, but it would be at least 2 years before they could switch because they'd have to completely rearchitect their entire platform first. Meanwhile, he said they were hiring as many Java (?) developers as fast as they could. State Farm moved their world development HQ to Phoenix and they have been hiring Java devs like crazy. All Java 5 at the time I inquired, but they don't say that in any of the job reqs I've seen. I was particularly interested in the functional aspects added to Java 7, and not one place I talked with said they're using them (or even Java 7 itself). Kind of the same way none of the Delphi projects I've worked on use Interface units for anything other than those mandated by OCX. The last place I was at, my colleagues complained about my use of functional code stuff in Delphi using a library that made it much easier. It sure did simplify the code and make it a lot easier to read, but they just weren't interested. So I'm glad to hear there are places that actually keep up with new languages features and idiomatic uses. That's not what I've encountered over the past 25 years in this field, and not for lack of trying. I've found places that use the latest versions of Delphi, for example, but almost none of the features introduced since D2010. Trying to introduce them starts pushing upstream against fears rooted in the harm refactoring can have vs. stability. Very little new code is being written, and when it does happen, they want you to follow existing coding practices so future maintainers don't have to deal with a variety of coding styles. That sort of attitude is hardly language-specific in my experience. As the old saying goes, YMMV.
  5. David Schwartz

    LiveBinding at runtime

    Well, that's what the marketing fluff says, right? 🙂
  6. David Schwartz

    Modern C++ and Delphi

    C++ has had inline var declarations forever, that's true; although I disagree with your conclusion, mainly because I never saw them used much that way when I worked with C++. I even tried using them occasionally; I found them quite clunky to use except for relatively long lists of operations on the same base object. (It has been many years since, but the code I've glanced over still doesn't show that people use what you're suggesting.) Delphi now has inline var declarations too, and I bet they won't replace with statements, or end up making code any shorter for people who are allergic to with statements.
  7. David Schwartz

    Modern C++ and Delphi

    I didn't know that. 🙂
  8. David Schwartz

    LiveBinding at runtime

    As was asked earlier, why are you trying to use LiveBindings with a data-aware control in the first place? LiveBindings were designed to replace the need (and overhead) of data-aware controls. Even if you get this example working, I think it might end up causing strange problems at run-time because the data-aware control events could trigger LiveBinding events and either go in circles or undo each other.
  9. David Schwartz

    Modern C++ and Delphi

    My beef is that it's too verbose compared with Delphi. Not that it doesn't work. But if that's your exclusive experience, then of course that's what you're going to say. There are some things about C++ that I sorely miss in Delphi, but I've learned to get past them. But looking over the draft of the latest C++20 std proposal, mostly what I see is the need for more and more namespace qualifiers (somenamespace::dothis(xyz) constructs) that just clutter things up. C++ will never have a 'with' statement, although it sorely needs it for just this reason. (And yes, it can be easily misused and abused, the same way people can set the color of a STOP button to Green and the color of a GO button to Red, and all sorts of other things that can be done if you don't apply a little common sense to them. Please don't go there!)
  10. David Schwartz

    Modern C++ and Delphi

    I'd go a step further and suggest implementing the UI stuff in Delphi and move the business logic into microservices. DLLs can't be moved off of the machine, but microservices can be run anywhere -- locally or moved to another machine somewhere (assuming it handles the OS needs). And you can implement microservices in whatever language you want. You could start by migrating the existing C++ and HT Basic (if that's possible) into the microservice bundle, then rewrite them any time you want later on. I spent 15 years working with c and c++, but when I compare the same app implemented in both Delphi and c++ Builder, the c++ source code is invariably 2x-3x the size of the .pas code. It's just horribly verbose, which is totally ironic because most people's biggest criticism of both c and c++ is that it's often so terse as to be almost cryptic to read! Maybe some features of the latest iterations of c++ will help, but I wouldn't hold my breath. If you look at the evolution of c++, there were originally all sorts of implied namespaces for things. It's as if there were a bunch of Pascal's 'with' statements sprinkled around all of the header files. At least in Pascal/Delphi, you tend to have the benefit of a 'with' statement in close proximity to where it's used, not hidden in header files. What I am most struck with in the evolution of c++ is how the standards folks have been sussing out all of these implied namespaces and are now requiring them to be listed explicitly. So you end up with namespace qualifiers littering the code landscape, yet offering no particular benefit in the most common use cases. NOT using them is certainly possible, but then you're right back to having implied 'with' statements throughout your code. This seems to be the source of so much bloat in the c++ source files vs. Delphi. You don't need to use 'with' statements in Pascal, but it sure does help to make the code a whole lot more readable in many cases. Also, the way property designations are managed by the compiler in Delphi makes them very natural to read and write. In c++ they're more like having to wear galoshes over your boots while the Delphi expressions are more like lightweight flip-flops. IMHO, C++ is great for lots of things, but not interfacing with UIs or the VCL.
  11. David Schwartz

    Call to create a form to return a value?

    Ok the problem has been fixed. Please try again: http://w5a.com/u/coderage-9-talk
  12. David Schwartz

    Call to create a form to return a value?

    Your previous code set Action := caFree, then the call to Execute did a F := Create ... if aFunc(F.ShowModal) then use stuff in F ... F.Free If you're going to reference ANYTHING in F after calling ShowModal then you want to set Action := caHide and then call F.Free later. The problems with passing a record in are unrelated. You might want to watch my CodeRage 9 session here: https://w5a.com/u/coderage-9-talk
  13. Where do I find info on enabling 10.2.x and 10.3.x to support Android and Linux? I went through and upgraded one VM from 10.2.2 --> 10.2.3 and it ended saying to expect a separate Android SDK installer, but nothing came up after I clicked Finish. And I saw no mention of Linux anywhere. Similar thing happened upgrading 10.3.1 --> 10.3.2. All I've found on EMBTs site is how to select a platform in the IDE. They have to be installed first before you can select them; that's what I'm looking for.
  14. David Schwartz

    installing support for Android and Linux platforms

    Ok, I switched to the ISO installer again, and I notice that both Android and Linux are ENABLED by default, along with iOS and MacOS options. They weren't installed last time I ran the installer, let's see if they get installed this time.
  15. David Schwartz

    installing support for Android and Linux platforms

    Well, I finally got around to flushing out Delphi 3.2.3 installed via ISO and all the component libs from a copy of the VM so I can run the ESD installer. It installed the base stuff, the gave me a menu of options. I selected a lot of stuff, then it stopped: Operation Error A problem occurred during the process For those who cannot "read between the lines" of that super-informative error message, you have to hit the Retry button to see what the problem is. Seems it couldn't download the JDK. (Is the JDK even required to build Android apps? It's an option, but it would be nice if the UI informed users if it's actually required or not.) The only options this dialog offers are "Retry" and "Cancel". Retry gets the same results over and over, and Cancel ... well, it just aborts the whole installation process and launches Delphi. WTF? So now to continue (or install anything else you forgot the first time around), it UNINSTALLS everything, then REINSTALLS the base files, then presents the same options. This time I don't ask for Android support, and restart the process. About 30 seconds in, it stopped: Operation Error A problem occurred during the process Hitting Retry a few times show it's unable to download DirectX. Ok, so HOW THE HELL DO YOU INSTALL EVERYTHING WHEN IT STOPS DEAD IN ITS TRACKS WHEN IT CAN'T DL A FILE AND THEN REQUIRES A FULL UNINSTALL/REINSTALL TO CONTINUE??? All of the files are on the ISO volume, but the ESD installer fails because it can't download files. Sheesh....
  16. David Schwartz

    installing support for Android and Linux platforms

    I did install via ISO, and I never saw an option to select or deselect platforms. There's a tree-view kind of display that shows things like Intraweb, FastReport, code examples, etc., but nothing was grayed-out, so I assumed it was installing everything. What did I miss? Anyway, I already had to uninstall and re-install, and it took nearly 90 minutes just to un-install! Why can't it just snip off entire folders, then go back and see what's left and adjust its DB accordingly? This has to be one of the least efficient processes I can possibly imagine doing.
  17. David Schwartz

    Beginner - How is Delphi for mobile development?

    Check out bubble.io and similar platforms. They may be better suited to your needs.
  18. David Schwartz

    formatting HTML code

    This site https://htmlformatter.com/ does an awesome job of taking a huge glom of unformatted HTML and pretty-printing it so it's super-readable. Are there any components that can do that in Delphi? You'd give it a string or stringstream, and it formats it into another string or stringstream or TStringList (eg., a TMemo) All I can find in Google is how to format Delphi (pascal) code.
  19. David Schwartz

    formatting HTML code

    Thanks, but my time is exhausted on this. It wasn't worth the trouble to automate ... faster to just eyeball the results.
  20. David Schwartz

    Bitonic sorter

    Interesting. Thanks. I notice that the java code example doesn't utilize any of Java's built-in parallelism / threading stuff. Can't say about the Python example. Is there an expectation that the underlying hardware or something else is smart enough to break this into parallel pieces at run-time? (I'm not really up on contemporary parallelism tech.)
  21. David Schwartz

    Parsing Google Search Results redux

    No. I've exhausted the time allotted to investigate this, and there's no budget for 3rd-party commercial subscriptions. What used to be pretty easy up to about a year ago or so is much, much more difficult today. The only real HTML tags that appear useful as possible "landmarks" for identifying different sections of content are the Header tags (H1, H2, etc.). An e-Reader wouldn't have any problem rendering text-to-speech because it does not need to "recognize" the sections. It just parses through it and performs TTS as it encounters things, adapting to the various tags it finds as needed. It doesn't need to find structure or parse out pieces of content. I don't know how feasible it is to extract CSS attributes along the way that might influence how it renders things -- it's not like you can "hear colors" other than having it report the start and end of a hex code or maybe a recognizable color name, eg., "blue". It's pretty evident that the DIVs and SPANs around the content are sprinkling in quite a bit of visual stuff that would just be a ton of noise if it was all vocalized by a TTS system -- italics, bolds, colors, (sub)headings, etc. There are ad blocks that can be inserted between meaningful sections, and they "look" nearly the same except for one little visual tag that's presented as a CSS attribute that has a random classid. If I had another week to spend on this, I might come up with something that works, but at this point, my time budget is exhausted.
  22. David Schwartz

    Running the IDE in a VM on Mac Book Pro?

    very carefully. They're getting harder and harder to upgrade. The thinner the cases get, the more stuff is soldered in place. The newest ones are not upgradeable from what I'm told. Do some research ... look for SSDs on eBay specifically for MacBook Pros and you can learn a lot from the vendors who sell them. I have a mid-2014 MBP and these devices can have their RAM and SSD upgraded simply by removing the bottom, but you need special tools. The problem is, some machines can't be upgraded past a certain point. Mine came with 1TB of SSD, but I can't upgrade it to 2TB, although some mid-2014 models can. I also can't expand my RAM past 16GB. There are vendors who sell upgraded equipment on eBay. I bought a Late 2014 Mac Mini that was upgraded to 2TB of SSD and 16GB of RAM for $1100. I thought it was the same as my MBP, but it turns out the i7 chip is only a dual-core not quad-core. Apple didn't put quad-core i7's in Mac Minis until the newer generation they announced last fall. A new Mac Mini similarly configured but with a 3.2GHz 8-core i7 is about $2300.
  23. David Schwartz

    Running the IDE in a VM on Mac Book Pro?

    Uhhh ... no, it's far from unique. Just something I guess you've never considered. Look, Apple has a discount program at most colleges, and many schools are REQUIRING students to have a laptop. So when the inevitable 15% or so of students drop-out every semester, a lot of them decide to sell their nearly-new equipment, usually at a pretty decent discount because they don't know much about that stuff. Many of them are like a friend I've got who has a saying: "A fast nickel is better than a slow dime" and they're hurting for cash, so they post their stuff up on eBay at ridiculous discounts. If you're quick, you can score some AMAZING deals! For example, my sister wanted a 12.9" iPad Pro and asked me to see what I could find for her. I scoped out eBay and found one that the owner said was 6 months old, barely used, with AppleCare. The description was quite vague, and when I asked her to clarify something, she just wasn't sure. The price was $475, which was a pretty good deal for a 32GB WiFi-only device with nothing else. I've seen similar things with cracked screens sell for this much, and I was surprised that it hadn't been snatched up in over 24 hours. When it arrived, I freaked-out! It came with a $150 case, 128GB of memory, an Apple Pencil, original boxes, and had cellular service built-in. I could have flipped it that day for $750! My sister said she wanted a WiFi only device, and I said I'd be happy to trade it for mine (the specs she asked for) but she decided to think it over. The next day she told me her partner saw it and immediately took it over to the Verizon store and activated it on their account. They LOVE it! (I should have opened the box and looked at it BEFORE I saw my sister and just given her mine instead; she'd have been quite satisfied.) That may seem like a fluke, but there are plenty of folks who simply don't know what they've got, and a LOT of them own Apple equipment -- because they DON'T HAVE TO KNOW! My brother has three kids, one has been in and out of college for 7 years; one just graduated last year; and one is about to go into college. He called me in total frustration 2-1/2 years ago and said his oldest daughter just had her HP laptop die for the umpteenth time and he just can't afford to keep replacing the damn things. He asked what I'd suggest, and I told him the same thing I've said numerous times in the past: get her a used MacBook! Of course he hemmed and hawed and kept saying how he can't afford it, and I just said again, "Well that's what I'm going to tell you every time you ask." I'm not sure exactly what happened after that, but somehow one of them came across a 6-mo old MBP from another student and picked it up at about 25% discount off of list price. It had AppleCare. I've asked several times how it's holding up, and at first my brother was hesitant ... "so far so good, but if the damn thing breaks, I'm going to be really pissed." Here we are 2-1/2 years later and guess what? The other HP and Dell his other two kids had both broke AGAIN, and they didn't honor their warranty deals for obscure reasons. But that MBP has only had a couple of minor problems: something on the kbd broke and he had some other weird problem with the OS, and both times they took it to the Apple Store and they fixed things right up. He was so amazed that he told me he will never buy another PC again, only Apple hardware. I've heard this same story over and over and over from so many people.... like a manager at a place I was working said he had been a loyal Dell users for years, but his kids kept breaking them, and they seemed to be breaking with increasing frequency. One Monday he said he was fed up and went to the Apple Store and bought 5 (yes, 5) brand new MBPs for his family, and said as soon as they can get switched off of their Dells, he was going to donate the Dells to some charity. My brother is the kind of guy who NEVER buys anything NEW. So he actually enjoys hunting down good deals on used Macs! Kinda weird, I know. But they're not that hard to come by if you know where to look. My first iMac I bought new at a Thanksgiving sale at Best Buy and it was discounted by several hundred dollars. I've never bought a new Mac since, although I do buy new iPads from T-Mobile (my cell phone carrier) b/c I can get 24 months same-as-cash with no credit app from them. My fist MBP I got with a Apple-branded BarclayCard that gave me 5% cashback for purchases made through Apple with 24 months same-as-cash payments, and I bought it from their refurb store at a 15% discount. You just have to know how to find good deals on this stuff I guess.
  24. David Schwartz

    Parsing Google Search Results redux

    Thanks for all the side-chatter, but none of it is helpful. I was merely passing along the results of what I found. I'm not running Linux; I'm not getting captchas doing this manually, and I have no reason to believe I will get them using similar timings with a different means of doing the data entry; I'm only interested in the first page of results; and in summary, y'all are making stuff up that is completely irrelevant to my present needs. All I'm focusing on is scraping one page of results, and that's all that's up for discussion. But thanks for the insights.
  25. David Schwartz

    Running the IDE in a VM on Mac Book Pro?

    I'm just stating my experience; I guess you're free to call it whatever you want. As I said, YMMV. Also, it seems you don't track resale prices of Apple products as closely as I do, so of course you're going to think whatever I'm saying is dubious. This is why there are people in the world on both sides of the climate issue. The unquestionable fact is ... the average level of CO2 in the air has been steadily rising for decades. The debate is ... so what? The only thing most people will react to is when living beings start dying off of hypoxia due to too much CO2 and not enough O2 in the air. But the plants and animals will have died off long before that, so I guess we'll never really know until it's far too late.
×