Jump to content

David Schwartz

Members
  • Content Count

    390
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by David Schwartz

  1. David Schwartz

    tiny computer for Delphi apps

    I don't know if you can run Delphi on this (maybe D7) but you can surely run small and modest-sized Delphi apps on it. Maybe even use it as a tiny web host for kiosks or demos. https://www.indiegogo.com/projects/chuwi-larkbox-world-s-smallest-4k-mini-pc?secret_perk_token=2ec0a2d6&fbclid=IwAR0cxLgK8Nm7pLcx04GdkAbwKtnuGw46UqG_k2irYqkARFn-h_ya6YhP42M#/ What would YOU do with one of these? (I'm just curious. I'm not involved with this in any way other than I love finding tiny computers.)
  2. David Schwartz

    tiny computer for Delphi apps

    If that was the answer, then neither Apple nor Google would be investing in the development of "Car-play" and similar platforms that are designed to extend and even replace the crapware that car manufacturers install at the factory and never update. What benefit does BT offer to me if I want to have Google Maps show up on my display rather than the junk built into the car? My car has BT, but so what? It's only used for audio and alerts from my phone -- yes, including text messages! Don't ask me why because it doesn't show them unless I'm parked, in which case I'm not going to bother reading them through the car's screen. BT is a data channel. That's all. WiFi is higher bandwidth, but nobody has seen fit to built it into a vehicle's core yet as a way to replace the CAN plug. Maybe they're concerned about little things like security and privacy? It would be a heckofalot easier to have an open WiFi connection for cases like Uber/Lyft drivers who've got passengers who want to connect their phones to the car's audio system. When I did that for a while, and kids would get in and want to connect via BT, it typically took half of the ride time just for them to get everything to connect. After a few times, I just told them, "Sorry it ain't happening". Sometimes they'd get in and have an aux cable they wanted to plug in. I'd just say, "Nope, someone broke my plug. Sorry."
  3. David Schwartz

    tiny computer for Delphi apps

    Sorry, but I've seen many that are simply largish-screen monitors (24"-27") with a small computer attached to the VESA mount on the back. I see these in banks, places with self-help customer services, and similar places. You're thinking of "old-school" things. Not that they don't exist, but this is a popular use for NUCs. As for the "reliability" question .... I once had a contract to do some evaluation of COTS stuff for a military outfit that was wanting to know about the reliability of COTS vs. similar "mil-spec" boards. It surprised them to learn that some COTS boards they were considering actually had better reliability metrics (except for one thing that was easily resolved) than their comparable mil-spec devices, at 10% of the cost per unit. They decided it made sense to order 3x more of the COTS products and maintain a larger inventory of spares rather than order more mil-spec devices. They also expanded their search for qualifying COTS devices as the cost-per-unit was so much lower. In certain applications, you want ruggedized hardware to minimize the risk of random failures at times that would be hard to get replacement parts. But there are situations where it's simply overkill, and making replacement parts available is far more cost-effective than using fully-ruggedized devices. If you have a data collection device out in the middle of a corn field that's supposed to relay data every 5 minutes, and it would take more than a couple of hours to replace, sure, use something more rugged. But if it's sitting in an office with A/C and heat and there are people constantly there who can recognize a failure and address them when they happen, then it's probably cheaper to go with something cheaper and have spares in the back room. Then again, if Management prefers to hire people for minimum-wage and give them the least amount of training required, then the equipment is probably regarded as more reliable than the people, so that approach probably isn't viable for them. At the end of the day, like most things, it's a trade-off. My employers give me Dell computers that are notoriously unreliable, both the hardware and Windows. But they seem to prefer them over Apple for whatever reason. I've been using Apple hardware since 2006 for my own needs, and have had far fewer problems than the equipment given me by employers. Yet how many times do we hear people say they think Apple's stuff is just "toys"? I guess it's all a matter of perspective.
  4. David Schwartz

    tiny computer for Delphi apps

    If they're so concerned, why did they do away with interface controls that you could touch and adjust without having to divert your attention from the road to their "touch-screen" interface that reacts to the slightest whisk of a finger and leaves no clue what you touched or how you ended up where you're at? Nobody is ever going to convince me that a UI that is touch-sensitive and doesn't offer any way to do things without looking at it is in any way "safer" than one that does. The map won't let me edit anything while the car is moving, but if I'm using it for navigation and I happen to brush the screen, it can change state and get messed-up and I have no idea what I did or how to get back to where I was. It connects to my phone and tells me I have a new text message. It forces me to divert my attention from driving to focus on the screen long enough to press a button, and instead of simply reading the text message to me (via text to speech), it displays a message on the screen telling me it cannot show me the message while I'm driving! What kind of idiot designed this and what committee decided it's a "safe" design? Google lets me use my voice to find a destination; the car's nav forces you to enter everything via the touch-screen starting with State, City, address or name. It's effing worthless IMHO compared to what I can get on my phone with a couple of voice commands and touches. I'm sorry, but the current crop of touch-based UIs is far more dangerous than using my phone. Yet states are passing laws to prevent people from using their phones instead of the more dangerous crap that car manufacturers are delivering. Not because they're designed to be safe, but because they're designed to be flashy and make you hope you don't miss your far more flexible mobile devices. Never mind that most people upgrade their devices yearly, and vendors are constantly tripping over themselves to add new features and make them more and more useful. Compare that to car manufacturers who basically design what's in a car 2-3 years before it goes on sale, and IT IS NEVER EVER UPDATED! Unless, of course, their horrid UI ends up causing so many crashes that the resulting lawsuits force them to do a recall and issue an update. When I took my car to the dealer for an oil change recently, I asked the service manager when I can expect Toyota to download a software update to the car to improve the battery life and efficiency, the same way Tesla does it on a quarterly basis. He just gave me a blank look and shook his head.
  5. David Schwartz

    tiny computer for Delphi apps

    I started my professional career working with embedded systems for nearly a decade, so I guess that's why hardware like this catches my eye. This isn't particularly useful for ordinary office tasks or testing or anything like that. But it would be great for a standalone kiosk, or some kind of dedicated application. For years you needed to use an embedded OS and special tools to build stuff that ran on specially-designed hardware. Today you can get a Raspberry Pi for under $50, sure, but you can't build stuff that runs on it with all versions of Delphi. Lazarus and FreePascal perhaps, but those are a lot more limited than a standard Delphi release. This little box includes Win 10, and for the price, the hardware is practically free -- most of the cost is likely going to Microsoft for the Windows license. While that does not excite me, the fact that it's possible to use the same toolchain to build an app for a simple embedded application that runs on an otherwise standard Win 10 platform is far more inviting than the prospect of having to use a whole separate toolchain instead. I can't tell you how many projects I worked on where Management would order special hardware and compilers for builds, but then try to "save money" by not buying the debugger, so we had to use link maps and assembly output from the compiler for debugging off-line. I've always had this vision of little functional building blocks, like "smart" Lego blocks, that perform specific functions and can be plugged into a network and used to solve specific problems. A great example of this is being able to plug your phone into your car and access stuff on it like media, email, messaging, and calls, as if it's built-in. Most vehicles come with something provided by the auto company that built the car, and you're stuck with whatever they want to provide. It's a huge expensive effort for them to add, and it ends up being a political and economic decision for them because they want to retain control. I have a 2017 Toyota Prius Prime and one of the biggest complaints on a forum where Prime (and Prius) owners hang out is Toyota's adamant refusal to add this ability to their vehicles. They offer a horrid UI design and the same crappy mapping that auto manufacturers have used for 15 years. The stuff on our phones seems like it's light-years ahead. When I bought the car, the sales guys bragged "It has Google Maps now!" I don't know what part of their mapping is from Google, but the overall experience is the same crappy mapping I had in my 2012 Prius and in a Garmin GPS from 2005. I hear that Toyota has finally broken down and will be adding support for Apple's car interface to a couple of (non-Prius) models for 2021, but everybody else is out-of-luck. Why is this such a problem for them? Because 100% of their computing platform is dependent on a proprietary hardware design, proprietary embedded OS, proprietary interfaces, and a desire to keep total control of the user's experience. Why? Risk. It's pretty absurd when my iPad Mini has more computing power than the stupid crap they include at the factory and want you to believe is "the best available technology". Yeah, right. They just don't want to get sued by some problem your phone might have caused while you were driving. Look how long it took car manufacturers just to offer a common 1/8" stereo AUX-IN jack to allow people to plug-in their iPods! As far as risks go, I can get why a brand new 787 jet employs CPUs on it that are equivalent to what Apple used in 1990 -- they want stuff that is absolutely rock-solid and has millions of hours of flight time and testing time on it. But I don't need that level of reliability simply to select the tunes I want to listen to while I'm driving, or to display maps. Alexa is another example of an embedded system, but it's an approach that scares me in terms of its ability to expose everybody to unethical and even illegal purposes. But that's a discussion for another day. 🙂 That's how I think of embedded systems that affect consumers -- standalone functional building blocks that use standardized software and interfaces to allow developers like us to offer customized features they just can't get any other way. I started my career in 1979, and this kind of utilitarian application of small standalone computers seemed "just around the corner" in the mid-80's. Here it is 2020 and in spite of a huge proliferation of fully programmable portable computers (a la mobile devices) and almost unlimited access to connectivity to everything, we don't seem any closer to this than we were in the 80's.
  6. David Schwartz

    missing debug\*.res files

    Anybody have any idea what would cause all of the .res files to get deleted from the ...\lib\win32\debug folder? (Actually, there's one left: FireDAC.VCLUI.PanelTreeButton.res) There are 49 in the \release folder.
  7. David Schwartz

    missing debug\*.res files

    so perhaps the release folder got removed from the search path, then? I'll check that. Thanks. BTW, I don't usually use Debug DCUs although I seem to get them more often than I want. It's super annoying hitting F7 to step into a function call and end up in a long chain of RTL code that is totally irrelevant.
  8. David Schwartz

    missing debug\*.res files

    If they don't get installed there, where is the compiler expecting them to be?
  9. David Schwartz

    missing debug\*.res files

    wow, that's weird. Last Friday I started getting compile errors saying it could not find controls.res, tbutton.res, and another. It was late in the day and I forgot about it. Today I tried to build a different project and got the same errors. I looked in the folder and nothing was there. The folder is in the search path, tho. I copied them from the release folder and they disappeared about 5 minutes later.
  10. David Schwartz

    missing debug\*.res files

    looks like there might be some security app the IT guys installed that thinks they're a threat
  11. David Schwartz

    tiny computer for Delphi apps

    It says it comes with Win 10 installed, but you can also install Linux. I didn't want to start a debate about running Delphi on this. I wouldn't want to. I was thinking of it mainly for use with embedded or dedicated Delphi apps.
  12. David Schwartz

    problem with graphic image DL

    [this seems to have gotten lost at the end of my other message] I set up a TWebBrowser in one tab on a form and the image processing stuff in another tab. I can drag-n-drop the image link from Chrome to an area at the top of the form. It switches to the 2nd tab and I click a Process button. That causes the browser to navigate to the image, which it loads into the browser window. Perfect. Now I just need to grab it. But ... while I'm getting the height and width of the image from the target image, I'm not getting the image to show up most of the time. Sometimes, but mostly not. I'm finding the image files on the page using IHTMLElement2.getelementsByTagName('img') and grabbing the first one (since I know that's all there is on the web page). img := getFirstImage; Image1_frame.Height := img.height+2; Image1_frame.Width := img.width+2; rnd := img as IHTMLElementRender ; rnd.DrawToDC(Image1.Canvas.Handle); Image1 is aligned to Client on a panel Image1_frame. So I set the frame's H & W -- they get set ok. But the image is usually not visible. It's just white. I see that DrawToDC is deprecated, but I haven't found what to replace it with. What am I missing here?
  13. We have a ticketing system where we get tickets for work, and sometimes clients send image files to us for different purposes. They get attached to a ticket and the ticket is forwarded to us. They're supposedly PNG files. Currently, I have to right-click on the image link and then Save As... and save it to a specific folder with a slight change to the name. Then I open an imaging tool we have and I have to click the Open button, find the file, select it, then click some buttons in the program, then click a Save button, saving it with a slightly different name, then move on. I'm trying to simplify an otherwise tedious manual process. I want an app that lets me click on the image file URL, drag it to a form, then DL the image, do all of the stuff, and save it. Easy peasy, right? I've got the drag&drop and creating the URL and target filename. When I try to load the file via Indy's http.Get method, it loads something, but I finally figured out that it's not an image. It's a frigging HTML file! When I saved it to disk and looked at it in the browser, it's a stinking LOGIN page. I'm like WTF? The initial response from the http.Get is a 302 redirect, which isn't surprising. There's a HandleRedirects checkbox on TidHTTP and I checked it. That lets the http.Get succeed. But then ... how in the heck do I get it to work just like a right-click -> Save As ... ? MS := TMemoryStream.Create; image := TWICImage.Create; try idHttp1.Request.Accept := 'image/png, image/gif, image/jpg, image/jpeg, image/tif, image/tiff, image/bmp, image/x-bmp;q=0.9,*/*;q=0.8'; idHttp1.Get(URL, MS); hdr := IdHTTP1.Response.ContentType; // this is: text MS.Position := 0; memo2.Lines.LoadFromStream(ms); // saving to a memo to see what it is, since it seems to be text // turns out it's an html login page!
  14. David Schwartz

    Trying to DL image yields a web page instead

    ok, I set up a TWebBrowser in one tab and the image processing stuff in another tab. I open the ticket and can drag-n-drop the image link to an area at the top. It switches to the 2nd tab and I click a Process button. That causes the browser to navigate to the image, which it loads into the browser window. Perfect. Now I just need to grab it. But ... while I'm getting the height and width of the image, I'm not getting the image to show up most of the time. Sometimes, but mostly not. I'm finding the image files on the page using IHTMLElement2.getelementsByTagName('img') and returning the first one (since that's all there is on the page). img := getFirstImage; Image1_frame.Height := img.height+2; Image1_frame.Width := img.width+2; rnd := img as IHTMLElementRender ; rnd.DrawToDC(Image1.Canvas.Handle); Image1 is aligned to Client on a panel Image1_frame. So I set the frame's H & W -- they get set ok. But the image is usually not visible. I see that DrawToDC is deprecated, but I haven't found what to replace it with. What am I missing here?
  15. David Schwartz

    Trying to DL image yields a web page instead

    hmmmm ... now that's an interesting approach ... I'll still need a way to select each individual DL link because the way we do things in this case uses the same ticket to collect these requests up for a whole month, as there can be a dozen requests or more. We only want to deal with the latest ones, and there might be one, two, or even three at once.
  16. David Schwartz

    Trying to DL image yields a web page instead

    Yeah, I woke up this morning thinking it's probably looking for a login cookie. I wonder if there's some way to have the http component look up the cookie in the other browser's cache? I'm clicking and dragging from browser window A to the app, and I guess the http component looks like an unrelated browser window B. I don't really want to force the user into a second login. That said, I could add Name + Pwd fields to this little app and save them, but that's getting into a very muddy area here.... There are a few Authorization events in IdHttp component: * OnAuthorization * OnProxyAuthorization * OnSelectAuthorization * OnSelectProxyAuthorization I guess Right-Click --> Save As ... runs in the security context of browser window A, but a drag&drop runs in the context of browser window B. I wonder if I can set up a proxy of some kind? They really should be the same context.
  17. David Schwartz

    how to get a pseudo-design mode at run-time

    I'm working with TMS Web Core, which pretty much mirrors the VCL. I want to be able to switch between a "configuration" mode and a "run" mode. So say you click an Admin button somewhere and it flips a switch so that whenever you click on something it sends the object's instance pointer to a single handler rather than activating the normal mouse events. Then depending on the object selected, a property form will popup that lets you change certain properties. Some of the properties represent meta-data, and some are actual content. For example, if you click on a box that represents a video, then it will ask for a link to a video and a thumbnail. If you click on a text box, then it will ask you for the text you want to display. I don't need a full designer, as I don't want to move anything around. I just want to suppress the normal mouse events and route everything through a single handler. If this was just a normal Delphi VCL app, what's the best way to handle this at run-time? (No IDE is running, just the EXE.)
  18. David Schwartz

    how to get a pseudo-design mode at run-time

    Hmmm, gotta see how that's done in Web Core.
  19. David Schwartz

    Trying to DL image yields a web page instead

    You missed the part where I said this HTML page is a LOGIN page. The only image on it is the company's logo. That's not what I'm looking for. The URL is pointing to an IMAGE FILE. Not a login page. The MIME type is "image/png" not "text". And a half-dozen questions on Stack Overflow where people asked how to DL specific files, this is the approach that was recommended. Not one of them even hinted that a TWebBrowser is needed. Right-click --> Save As ... actually saves a PNG file. Not an HTML page. Always. The image is in a download folder. Not on a LOGIN page.
  20. I've never had a problem installing a bunch of component libs and then restarting Delphi afterwards. I don't understand why so many libs that GetIt installs require Delphi to be restarted after each one. And after it restarts, it doesn't even have the courtesy of leaving you back where you were when it initiated the restart.
  21. David Schwartz

    Why does GetIt require Delphi to restart so often?

    this makes sense if I'm going to USE what I just installed. But if I'm in the process of installing several components, then there's no need to restart because none of them depend or refer on the others. They're all self-contained. It works fine to restart after you've installed the whole batch. At least, I've never had a problem except for some unusually complex installs.
  22. What's your take on whether a FE and BE should be accessible from the same page / form or completely separately? I've seen desktop apps where the Admin / setup stuff is a totally separate app, and apps where there's a Setup / Config / Options link in a menu. Wordpress is infamous for their "Meta" section with a "Login" link to get to the Admin dashboard. You can't separate them even if you wanted to. SaaS solutions often take you to an Admin area that's separate from where your Users will go, and that generates the User's view elsewhere (frequently a subdomain). I've never given much thought to this. But with things like TMS WebCore, IntraWeb, UniGui, and others for building web apps, now I'm curious.
  23. David Schwartz

    Threading question

    I'm working with some code that was written many years ago, and it uses threading to circumvent delays that tended to occur back when computers were slower and it took a while for the UI to update. For the most part, these apps were headless -- just stuff that ran on a server and spat out log files to document their travails. The thing is, the log files are too sparse; there's not enough info in them to support any sort of auditing. So now we're finding that the program has been failing to update things in the DB and side storage for years and nobody knew. I'm trying to add code to capture more details to the log, but I'm getting random AVs that I suspect are due to the threading not properly synchronizing with the main form. Access violation at address 0040DD41 in module 'DocLink.exe'. Read of address 00000001 The code uses this to send data from the thread to the main form: procedure TSequence.StatusOut(const stat: string); begin if (MainWinHandle <> 0) then Windows.SendMessage(MainWinHandle, WM_STATUSOUT, LongInt(PChar(stat)), 0) end; //---------------------------------------------- // this seems to be the other side in the main form: procedure WMStatusOut(var Message: TMessage); message WM_STATUSOUT; . . . procedure StatusOut(const stat: string); begin LogWrite(stat, true, true); FrmMain.memStatus.Lines.Add(stat); Application.ProcessMessages; end; procedure TfrmMain.WMStatusOut(var Message: TMessage); begin StatusOut(PChar(Message.WParam)); // local StatusOut procedure inherited; end; The main form stuffs it into a TMemo (memStatus) as well as sending it to a logger. I've done some research and it seems that SendMessage should be sufficient. It's ok for low volumes of traffic, but as I send more data, the threads start throwing these AVs. Personally, I don't see any need for threading today, but it is what it is, and I'm not about to redo everything to remove the threading. Any suggestion on how to deal with this? BTW, I'm only guessing that this is the problem. We've got a version of this code that has been running for 2-1/2 years with none of these errors showing up. It's only now as I'm trying to capture more details in the log file that I'm getting these errors.
  24. David Schwartz

    Front-end vs Back-end question

    nearly every question posted here can be answered with "it depends" and stop right there.
  25. David Schwartz

    Something the comunity should be aware of

    I have mixed feelings about this stuff. One big one is that Borland / Inprise really dropped the ball back in the D6/D7 years when they thought it was a Good Idea to hitch their wagon to .NET and everything Microsoft. They made some improvements in the language that left a lot of customers in the dust holding a bag of rocks. Here we are today and they're complaining that these same users STILL don't think it's worthwhile to invest in moving past D6/D7. Sheesh. Developers cost 2x-3x more today than they did back then, and if it didn't make financial sense to upgrade back then, then surely it makes worse sense today. Embt is not making any more friends complaining about the resources these legacy clients are costing them. The problem isn't the compiler -- it's the 3rd-party components like Dream Components that died on the vine and couldn't easily move forward. If they want to fix the problem, Embt should consider buying the rights to these old component libs and investing their own resources in making them work on the latest versions of Delphi. Add them to GetIt and give people a legitimate upgrade path. Whoa! What a novel idea! Still, a lot of folks still won't consider upgrading because it's harder than ever to find developers with solid Delphi skills today. (I think it's easier to find COBOL programmers today than Delphi folks!) Another option is to have a separate maintenance program for legacy products. I have not found a single job in the past decade doing NEW Delphi work -- it's all supporting LEGACY apps that were written in the D4-D7 years. Maybe they're using newer versions of the compiler, but it seems silly to me that the company is COMPLAINING about the fact that all of these old legacy clients are refusing to pay their ridiculous maintenance fees to stay exactly where they are. It's nice that Embt wants people to move forward, but until more jobs start showing up for NEW DELPHI PROJECTS, they're doing little more than Sisyphus pushing a rock up a hill while complaining about the effort involved. They (previous Mgt) created this problem but they don't seem to want to fix it. The world is moving to Open Source Software. Delphi is one if the few remaining products that's not just NOT OSS, but VERY EXPENSIVE for commercial use. Microsoft subsidizes the crap out of their dev tools, as do others like IBM and Oracle. I think the best thing for Delphi would be for Embt to push to get Delphi acquired by a company that can afford to move it in the direction of OSS by subsidizing it from other product revenues. Instead, they keep raising the costs to customers who are mostly using it to MAINTAIN OLD CODE. I'm working on my 4th or 5th gig since 2009 that's maintaining code written prior to D2007 and it hasn't changed at all. The company has NO PLANS FOR FURTHER DELPHI DEVELOPMENT beyond maintaining their legacy code. They pay for maintenance updates, but so what? A couple of places I worked are extremely hesitant to allow any sort of large-scale refactoring -- they say if they wanted to invest in that amount of work, they'd just assume switch to rebuilding the thing from scratch in C#/.NET or something else -- not Delphi. WHERE ARE THE NEW PROJECTS THAT ARE CREATING MORE DELPHI JOBS? This is a MARKETING PROBLEM for Embt. I don't think they have any right to complain when they have steadfastly maintained a posture that has gotten them exactly nowhere in the market. There's no evidence that their products are being used for more NEW product development than to support LEGACY projects. Where's the beef? Or rather, Where's the NEW work? (And don't respond with, "well, we're doing new stuff!" If you are, say how many devs you've hired to help with the NEW stuff vs. to maintain the OLD code. Rather, show me, say, 10 job postings made to any of the popular job boards that are legit posts to hire people for NEW DELPHI-based projects. Nobody hires new devs for new Delphi work -- it's a reward given to long-time employees. The new-hires are almost always for back-filling open spots maintaining the old code. We've lost 3 people in the past 6 months who worked with Delphi, and I'm the only new-hire to replace one. Now Mgt is running around like chickens with their heads cut off because they failed to plan for this. Two of these guys left to work on stuff that's "more fun"; one non-Delphi and one is another legacy project but with some slow growth of new features. EVERYTHING I've seen in the past decade, or been contacted by recruiters about, has been MAINTAINING LEGACY CODE. I've found NO NEW WORK on Delphi, especially within 500 miles of where I live.)
×