Seems like a pretty bad idea to me. But I had a .Net application that was working well, and Microsoft updated some security aspect and broke it. Really not appreciated. Maybe do both? - Owen -
Owen Lawrence
Posts
-
Roll your own... -
Are you code obsessed?I was up 'till 3am the other night debugging an ESP32 OTA update issue. I just couldn't leave it knowing I still had something in mind that could potentially fix the problem. Thankfully I did fix it but still had enough sense left to avoid deploying it to the remote devices until I had some sleep. So yeah, it's normal. Perhaps a bit uncharitable, but I thought Python's whitespace treatment was supposed to save you from ever having ugly code. - Owen -
-
( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ?mdblack98 wrote:
Reaching the } that terminates a function is equivalent to executing a return statement without an expression.
My copy of the 1978 C reference manual contains the equivalent statement: "Flowing off the end of a function is equivalent to a return with no returned value." It also said that if 'return;' form is used, the returned value is undefined. The absence of a type declarator was assumed to mean 'int'. At that time there was no 'void' keyword. So, no need to search earlier than 1978 for the complete answer. - Owen -
-
I have an Embedded Issue!Thanks for the answers. If the provided libraries don't do what I want (or the way I want), I tend to scavenge for other more focused ones, often building up my own, piecemeal, to remain minimalist. The last thing I want is to drag in resource hunger for features I'll never use. But I'll admit I've got more time than brains, and at the moment I'm not doing anything sophisticated. I do have long term plans that may require following your example, though these problems could go away by the time I get there. I would have liked something better for provisioning over Bluetooth. It took so much room (why?!!!) that I couldn't use OTA. In the end I rolled my own without Bluetooth, something that served my immediate needs. _ Owen _
-
I have an Embedded Issue!Now I have so many questions: - How is Arduino HAL superior? Is it just coverage for more devices, better implementation of specific devices, or something more architectural, or ESP-32 specific? - What led you to divert from ESP32? What would you consider to be "more professional"? I've invested a lot of time learning ESP32-IDF, but if there's something better I'd like to know about it. The fact that they're cheap is a big one for me. Sure I'm just doing hobby IoT stuff, but I've got well over three decades of software development experience under my belt and I've got some attitude about how I'm willing to go about things. _ Owen _
-
Six Year Knowledge Update Please // Backup Software AdviceI'll add another downvote to Acronis. They ruined their UI first (dumbing it down well beyond usefulness, inflating wasted real estate), then proceeded to introduce the stupidest problems to the backend. I stopped updating at 2019. I can list far too many serious problems. Whoever's running the show there simply doesn't "get" backups. Just don't. One thing I've done for as long as I can remember is to set up NAS and keep my backups some physical distance from their sources. After all this time it still seems like a good idea. I recently built my own. It might not be feature-rich, but for this job I don't need it to be, and it was way cheaper. I'd avoid single-disk solutions, though, because you'll out of commission when you need to upgrade and potentially face a new problem of how to transfer your existing data. - Owen -
-
Fighting a monsterI don't recall the longest file, but it was definitly many thousands of lines long. The last application I worked on had quite a few of these, even individual functions that long. Ugh. Those functions tried to do everything and I'm sure they cost the company more than they were worth to maintain. I'm the same as you; around 1000 lines I start to get uncomfortable. 500 is the sweet spot. It gets really annoying to have to use tools to hunt for your spot in the file every single time, rather than just paging there. Good monitors have made a little extra length easier to tolerate, but not that much. It's generally a bad smell. Some files just get that way because of neglect, which is its own source of problems. If you see this symptom, expect others. Careful, incremental refactoring over a period of years can help, but you still have a job to do, so there are limits. Good luck with your new codebase. It's a chore, but hopefully you'll find lots of gems, too. - Owen -
-
Sick of 2FAOne employer demanded I use my personal phone for Visual Studio 2FA authentication because his wasn't recognized by Microsoft as a valid number. I refused, he yelled at me, I refused again. He went to the next underling who was too scared to refuse and used her phone. I now have another employer, a huge company that has initiated 2FA, expecting me to install Microsoft's MFA app on my phone. (And yes, they demand you have an Android phone or an iPhone.) Rather than use my cell phone I installed Android Studio, created a virtual phone, and used it to help me figure out how to write my own. I now have a tiny program that puts the 6-digit code onto the clipboard (with a beep so I'm sure it ran) whenever I click its Quick Launch icon. Works great. It seems to me that an institution's database of users' secret keys (or their generator algorithm) is just another target for hackers. I have a hard time appreciating how this really increases security. - Owen -
-
LoggingI have worked on lots of simulators, telescope and sensor control hardware. These desktop applications operate as processes, so progress through their various tasks is logged, as well as important choices that the software makes throughout the process, and substantive I/O values and events. Naturally unexpected events are logged too, as well as meta-info about software modules and hardware devices. Plus whatever extras we need to track down difficult problems. Often the goal is to provide the user with the right amount of info to help them solve problems themselves without overwhelming them with cryptic detail, but make the detail available when we need to step in. For example, putting in full file paths saves us a lot of tech support calls when the user cannot find their results, or have a typo in their configuration file. Always include the complete software version (and licensed feature level) that produced the log, too. The rest of the time a log is a useful history of what data as produced, and how.
- Owen -
-
Anyone know any motivational techniques?This isn't actually a motivational technique, but whenever I find myself doing this it's usually because there's something distasteful about the remaining chunk. Often that means I have yet to find an elegant solution or structure to apply, or maybe it requires contacting a lot of people to get missing information, or maybe it's just boring. What works best for me is to resolve to power through it, holding my nose if necessary, get it done and turn my back on it. No reward, celebration, nor admiration. Make it history. - Owen -
-
Windows is becoming adwareWindows is a toy. It has always been a toy. It was built by children (just look at the APIs!), who grew up to be assholes. - Owen -
-
Multi-screen Remote Desktop?I haven't tried this myself, but I recently learned of Barrier, a software KVM switch. - Owen -
-
Is this spaghetti?Not spaghetti code, but it is an antipattern. Remove it, and if nothing breaks, leave it gone. Otherwise, if you figure out what it's for, add comments. As it sits now it's expensive trash. - Owen -
-
Your opinion ob language to create a website / blog.I'm not a web developer and I think the whole web is an outrageous hack. As an individual it's pretty hard to keep pace with all the crazy changes needed to make things barely work. You can tell this is true by how terrible most websites have become. But I do appreciate how important this work is, and more power to you for wanting to dive in. I can't really recommend anything you should use, other than to suggest you don't get stuck on any one framework or toolset at this point and try different ones to broaden your experience. Let that process take years, so be patient. That said, I once wrote a blog using C#, then started filling it with content. It was great for a couple of years, and then without warning Microsoft pulled the rug out from under me by changing some of the functions I was using. It was basic stuff like string handling, which they were claiming required more security, but they left the burden on me to replace them. I would have had to refactor the whole thing. I eventually moved the whole site to a Linux box and left the blog behind. Do you really want to wake up one morning to discover your website needs to be rewritten because of an overnight update you didn't ask for?! I vowed never to use Microsoft .Net for anything ever again. In general I now shy away from anything that isn't highly portable. The more you build, the more you must maintain. Eventually you'll reach your limit and either start discarding your hard work or never produce anything new. Maybe both. I lived through the tyranny of significant whitespace with Fortran in the 90s, and as long as Python remains religious about its indentation scheme, I'll never use Python either. It's not worth the aggravation I guarantee you'll experience if your application reaches any appreciable size. - Owen -
-
Let the 3D Printing BeginPersonally I'm avoiding Autodesk Fusion 360 because it's 100% cloud-based. I've settled on FreeCAD for my first attempts at learning this stuff, but I have nothing more to offer you other than the following: Andreas Spiess just put out a video about how he prints his project boxes.
- Owen -
-
Nag popups on websitesYou're asking the wrong species. - Owen -
-
SPI Debugging - a question for hardware hackersJust making sure the most obvious question gets asked, did you try a different ESP32? No amount of analysis will get you past a fried port. It happens. - Owen -
-
Cordless tools: The new Planned ObsolescenceNiCd batteries need to be used regularly to be able to hold a charge. It's a poor choice for something that's going to sit unused for most of a year (not that it was your choice). You might have better luck with lithium batteries. There are also battery repair stores all over the place, so they might be able to extend your tool's lifetime when it comes to that. A cord on a hedge trimmer is going to be just as annoying if your hedge is large. And eventually the plastic insulation on the wiring is going to break down. Maybe you'll get twenty to thirty years out of it. Plan your budget accordingly. - Owen -
-
What part of software development do you wish was "fixed"?Borders are obsolete; get rid of them. Problem solved.
-
What part of software development do you wish was "fixed"?- I wish hackers would go away so I could stop having to pay security taxes. - For the same reason, I wish customers would pay honestly so I could stop wasting time securing the product against unlicensed use. - I wish Microsoft would finish its APIs before releasing them. - Reliable and deterministic GUI layout (and stop trying to cram the whole world into a browser) - Team members that would stop taking shortcuts, and bosses that think cheaper/faster isn't worth the expense/delay/mess - A complete set of tools that everyone is happy with so we can stop changing them all the time and get some work done - Marketing departments would have small budgets, get it right the first time, and stop forcing us to create nonsensical applications and keep changing them in a giant hurry. Recognize when a product is finished and stop piling in more features that ultimately ruin it. (That goes for programming languages, too.) - Reliable hardware, asynchronous access everywhere all the time, push notifications, easier thread coordination that didn't result in crashes or hangs whenever something went amiss - Hotshot programmers that know their place and humbly stay in it - I wish all customers would follow troubleshooting instructions, in order, to completion, answering every question that was asked, only what was asked, in complete, intelligible, punctuated sentences.