|
honey the codewitch wrote: He finally bumped out. Good riddance.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
|
Lets be honest here, you are always whinging about something, or, it's 'look at me, look what i'm doing, aren't I wonderful!' It gets very tedious. Go back and look through your posts and tell me where you're not whinging or self gradiosing.
|
|
|
|
|
As a counter example to your assertion right now I'm not doing any of those things. Right now I'm making fun of you.
Let's be honest here. You need a job. All you're doing is whining.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
modified 20-Nov-23 13:28pm.
|
|
|
|
|
|
honey the codewitch wrote: Does Microsoft already produce a JSON entity framework type thing that gives you typed access to JSON data?
Edit: NVM, I finally found one. Microsoft didn't write it, but it's much more ambitious than anything I'd come up with.
Rather curious about that.
Transmitting data over the wire guarantees that there is no type. Because of course type is really an artificial construct that is enforced by code (compiler, loader, etc.)
One can create data constructs that add type. For example (not a viable one but good enough.)
"type": "int",
"DValue1": "13"
"type": "string",
"DValue2": "xxx"
But is has the same problem if one doesn't do it in that the 'type' itself might not be known at the other end.
So what is the solution that you found?
|
|
|
|
|
JSON Schema, like XML Schema allows you send something like type information over the wire. Like XML Schema it operates and validates in lexical space rather than value space, but it's good enough to impose "typed" validation on one's data.
But even if you didn't send it, creating hard typed JSON entity objects on say, the C# receiving end allows you to validate that JSON that came from the wire, and apply strict typing to it via the properties on the generated entity objects.
TL;DR version: The solution is similar to XML.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
honey the codewitch wrote: I finally found one.
You said that so I was hoping you would post the link.
honey the codewitch wrote: receiving end allows you to validate that JSON
Ok but of course any deserialization for any message type is going to apply some validation. And myself I would likely code some other validation myself.
Before using any other validation I am also going to want to see what a failure looks like. I know XML failures can be miserable to figure out until one has seen enough of them to know what to look for.
And then there are microservices where one cannot just drop the message on the floor because of a validation error. So one needs to be sure an intercept is possible.
|
|
|
|
|
|
|
|
Update: It was my fault and I feel like an idiot. I went over my code with a fine tooth comb before posting this, and I could have sworn it wasn't me. It was, and I just somehow missed it. My fault.
Microsoft has this tech called the CodeDOM that is an object model for an abstract syntax tree representing generic code independent of language. It can render the trees to C#, VB.NET or another .NET language like perhaps IronPython or whatever - anything that can be used with ASP.NET, because that's where Microsoft employs this tech.
It's ancient code and should be battle tested at this point.
I found a bug with their VB code renderer:
This is how doc comments end up when declared on a type. Everywhere else they are fine. Only on the type declarations are they messed up.
But because of that, Rolex generates incorrect VB doc comments, and there's little I can do about it, because it's not my code that is broken.
I might be able to do a workaround but it pains me to even think about given what it requires.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
modified 19-Nov-23 8:12am.
|
|
|
|
|
Oh well, even Homer nods.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
honey the codewitch wrote: It's ancient code and should be battle tested at this point.
Err...facts not in evidence!
honey the codewitch wrote: This is how doc comments end up when
With doc comments? That would of course be the least tested.
|
|
|
|
|
Well as per my edit, it turns out the problem was with my code.
I don't assume other people's code is the problem until I feel I've exhausted the possibilities of it being my code.
However, this time I missed it despite my efforts.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Wordle 883 4/6
⬛⬛⬛⬛🟩
⬛⬛⬛⬛🟩
⬛⬛⬛⬛🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
⬜⬜⬜⬜🟩
⬜⬜⬜🟩⬜
🟩🟩🟩🟩🟩
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 883 4/6
⬜⬜⬜⬜🟩
⬜⬜⬜⬜⬜
⬜🟨⬜⬜🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 883 4/6
⬛⬛⬛⬛🟩
⬛⬛⬛⬛🟩
⬛⬛🟨⬛🟩
🟩🟩🟩🟩🟩
This one was a struggle!
Ok, I have had my coffee, so you can all come out now!
|
|
|
|
|
Wordle 883 5/6
⬜⬜⬜⬜🟩
⬜⬜🟨⬜⬜
🟨⬜⬜🟩🟩
⬜🟩⬜🟩🟩
🟩🟩🟩🟩🟩
hard one
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Hello Folks,
For an upcoming side project - a Desktop GUI app, open source, Apache 2.0 licensed, I'm slightly confused regarding what technology to use.
Skills wise, C#/WinForms should be my natural choice as that was the primary technology I had worked on before losing employment at Tech Mahindra few years back and getting into freelancing. But post my freelance experience, I taught myself things like open source and Python as it came with the territory, and now PySide2 is also a running candidate in this race!
The goal here is to be as much ubiquitous as possible - that my app should be easy to just "download, extract and run" by as many people as possible. A couple decades ago, a .NET GUI library targeting Microsoft Windows platform would have been the clear choice here as most people used Windows OS and targeting that platform meant being ubiquitous.
But over the last few years, I've observed that Windows OS has been continuously losing its market share to Linux Distros and Mac OSX, mostly due to some incorrect decisions and strategic blunders by the former than some ground breaking or revolutionary innovation on part of the latter. This means .NET or WinForms is no longer the ideal choice today if you want to be cross-platform and ubiquitous.
This lead my research to some other toolkits like the Java Swing library, for example. It's old but classic, not a bad choice at all in this case, platform independence is Java's biggest selling point. However, the app I'm making is non-trivial and slightly performance intensive, and Swing GUIs are known to be sluggish on PCs unless you ensure a good supply of RAM by tweaking the JVM settings. I'm also not very experienced in Java to be able to handle those situations in case they arise.
I also considered Lazarus IDE/Object Pascal, it is also not a bad choice. It is open source, used as the primary course language across many Universities in Europe and most importantly, still maintained and developed. But guess I will have to teach myself a whole new paradigm along with a programming language in case I go this route.
Finally, Python is something I've almost settled on for this project. It's a language that I'm very fond of and it has helped me survive through the tough times in the freelance market. It also has a vibrant ecosystem and rich repository of user contributed packages like PyPI.
Now, I've worked on the default Tkinter library in past but somehow felt that it's quite limited in terms of making the GUI more flexible and "tweakable", especially a non-trivial one having several container widgets, syntax editors, menus and drop-downs, trees and list views, etc. PySide2 is, from what I understand, a better choice in this regard as it is comprehensive and based on the time-tested Qt interface. It is not only very easy to code and maintain but also very easy to port across various platforms.
What do you think? In which direction should I go here?
|
|
|
|
|
If you're going to discount Windows Forms, then you also need to discount WPF and UWP. And Windows 11 just became an IOS "App" ... whatever that implies.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Xaml UI is the clear winner regarding .NET GUI
Similar concepts and classes are used by WPF (the first one to introduce them), Xamarin/MAUI (phone apps), WinUI (the new Windows native API) and Avalonia (3rd party, opensource, multiplatform, native GUI, including Linux and OSX)
|
|
|
|
|
MAUI, perhaps? That could make your desktop app be (relatively easily) ported to MacOS.
/ravi
|
|
|
|
|
#Worldle #666 1/6 (100%)
🟩🟩🟩🟩🟩🎉
https://worldle.teuteuf.fr
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|