|
Wordle 1,176 3/6*
β¬π¨π¨β¬π¨
β¬π¨π©π©π©
π©π©π©π©π©
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
β¬π¨β¬π¨π¨
β¬β¬π©π©π©
π©π©π©π©π©
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 1,176 6/6
β¬β¬π¨π¨π¨
π©β¬β¬π©π©
π©β¬β¬π©π©
π©β¬β¬π©π©
π©β¬β¬π©π©
π©π©π©π©π©
Bad luck! Sheer bad luck!
Ok, I have had my coffee, so you can all come out now!
|
|
|
|
|
Wordle 1,176 4/6*
β¬β¬π¨π¨π¨
β¬π¨π©π©β¬
π©π©π©π©β¬
π©π©π©π©π©
|
|
|
|
|
Wordle 1,176 3/6
π¨β¬β¬π©β¬
β¬π¨π¨π©π©
π©π©π©π©π©
|
|
|
|
|
I need my vector graphics library to be feature complete enough to render most SVG.
I have that, with some compromises for embedded, such as using TTF instead of WOFF or whatever for the font formats.
The trouble is there is just so much to it. You have fills, strokes, gradients, textures, fonts, paths, basic shapes, and all kinds of minutia therein.
I've fleshed out my header file for my class, and it's huge, and I'm not entirely finished with it.
I'd like to break it up somehow because I'm overwhelmed, but I need to get a lot of it done before I can even test a little.
I pasted the class proto here, sans supporting structures to give you an idea of the mess I'm up against.
I hate messes.
class canvas final {
void* m_info;
canvas(const canvas& rhs)=delete;
canvas& operator=(const canvas& rhs)=delete;
public:
typedef gfx_result(*on_write_callback_type)(const rect16& bounds, rgba_pixel<32> color, void* state);
canvas();
canvas(size16 dimensions);
canvas(canvas&& rhs);
~canvas();
gfx_result initialize();
bool initialized() const;
void deinitialize();
canvas& operator=(canvas&& rhs);
on_write_callback_type on_write_callback() const;
void* on_write_callback_state() const;
void on_write_callback(on_write_callback_type callback, void* state=nullptr);
size16 dimensions() const;
void dimensions(size16 value);
rect16 bounds() const;
rgba_pixel<32> stroke_color() const;
void stroke_color(rgba_pixel<32> value);
canvas_gradient stroke_gradient() const;
void stroke_gradient(const canvas_gradient& value);
canvas_texture stroke_texture() const;
void stroke_texture(const canvas_texture& value);
canvas_stroke_style stroke_style() const;
void stroke_style(const canvas_stroke_style& value);
canvas_dash stroke_dash() const;
void stroke_dash(const canvas_dash& value);
canvas_paint_type stroke_paint_type() const;
void stroke_paint_type(canvas_paint_type value);
rgba_pixel<32> fill_color() const;
void fill_color(rgba_pixel<32> value);
canvas_gradient fill_gradient() const;
void fill_gradient(const canvas_gradient& value);
canvas_texture fill_texture() const;
void fill_texture(const canvas_texture& value);
canvas_paint_type fill_paint_type() const;
void fill_paint_type(canvas_paint_type value);
stream* font() const;
void font(stream& ttf_stream, size_t index);
float font_size() const;
void font_size(float value);
canvas_fill_rule fill_rule() const;
fill_rule(canvas_fill_rule value);
canvas_compositing_mode compositing_mode() const;
void compositing_mode(canvas_compositing_mode value);
float opacity() const;
void opacity(float value);
::gfx::matrix matrix() const;
void matrix(const ::gfx::matrix& value);
rectf fill_bounds() const;
rectf stroke_bounds() const;
gfx_result move_to(pointf location);
gfx_result line_to(pointf location);
gfx_result quad_to(pointf point1, pointf point2);
gfx_result cubic_to(pointf point1, pointf point2, pointf point3);
gfx_result arc_to(sizef radiuses,float angle, bool large_arc, bool sweep, pointf location);
gfx_result rectangle(const rectf& bounds);
gfx_result rounded_rectangle(const rectf bounds, sizef radiuses);
gfx_result ellipse(pointf center, sizef radiuses);
gfx_result circle(pointf center, float radius);
gfx_result arc(pointf center, float radius, float a0, float a1, bool ccw);
gfx_result close_path();
};
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
At explaining Higgs fields and gravity in an understandable manner? Just came across this, and it seems as foo-foo as every other explanation I've heard: How the Higgs Field (Actually) Gives Mass to Elementary Particles | Quanta Magazine[^]:
> "...As I mentioned earlier, these standing waves are nothing more nor less than motionless elementary particles, rippling in their respective fields."
The engineer in me says that particles must move in order to create waves/ripples, so they aren't 'motionless'
|
|
|
|
|
It occurred to me the other day that Chat GPT might be able to convert a C# WinForms form to HTML, or at least it would be interesting to try. ChatGPT 4o[^] seems to be a bit improved over ChatGPT 4. I would not be surprised others have tried the same.
So, I created a simple Windows Form, with some labels, textboxes, a drop-down list, a checkbox and a button. I then uploaded the contents of the Form1.cs, Form1.designer.cs, and Form1.resx files to the chat, and asked it to return the code for an HTML page. I also asked it to return a Blazor razor component page.
It did a pretty good job. Not perfect, but for trying to convert the UI portion of a WinForms application, it could save time from simply manually doing the conversion.
I did not try anything complicated, and I would not expect it to translate the C# code to code for Blazor, but I plan to experiment further.
Since this forum is not for programming questions, I am hesitant to provide files, but you should be able to replicate the process yourself.
For those interested, it might make an interesting thread.
|
|
|
|
|
"AI" writing code makes me paranoid to the point where I'd have to review every line to feel good about it.
Most of the time, that means between prompting and review, I'd blow more time than I would solving it myself.
I don't know if that's true in this case, but certainly the review part is an issue.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
That is not the problem here. I am having it do one page from one form.
Yes, of course, I review and revise. I don't expect AI to produce complete, bullet-proof code. I don't have that much experience writing HTML and the byzantine world of CSS. Compared to WinForms (with a designer) and C# code, HTML/CSS (with no designer) is so backwards and unnecessarily convoluted, it saves me time. I have written HTML/CSS by hand like the cavemen did, but it takes less time to design the page in WinForms, then export it via AI (all within Visual Studio) than hand coding the HTML/CSS.
I've known many web front end coders, and they all think they can write a fairly complex page quicker than a designer, but in real world projects, the WinForms folks have always finished well ahead of the hand coders.
The trick is to realize I just want the WinForms to have the UI components and validation code (events in WinForms, things like onclick or mouseover), and let Copilot in Visual Studio generate the Blazor page file(s). From there, almost all of it is just C#. In short, just have AI do whatever takes me more time by hand. I keep it as simple as possible.
|
|
|
|
|
I'm guessing that a lot of you, here on this site, have read this book.
Star Trek Cats[^]
A lot of you mention cats & a lot of you are 100% geek.
I haven't read it...yet.
|
|
|
|
|
Even though I've been writing code for a long time, I often find that I don't understand things the way I should.
I've been reading Grokking Data Structures[^] (Manning publishers -- I mention because they do a great job on books)
A few years ago I read, A Common-Sense Guide to Data Structures and Algorithms, Second Edition: Level Up Your Core Programming Skills 2nd Edition[^], so along with the experience I have I had a good foundation.
However, this book goes in depth explaining how Data Structures are built on top of UDT (User defined types) and it is absolutely fascinating. The only problem I have with the book is that the samples are written in Python.
I've used a Bag data structure in ASP.NET (ViewBag) but I never really thought about how it is implemented and this book explains that type of stuff.
I'm 70% thru and it's a really great book.
Have you read it?
|
|
|
|
|
raddevus wrote: Have you read it? Nope, but totally applaud you for peeking underneath the hood to get your learn on.
Jeremy Falcon
|
|
|
|
|
Have not read it. Even though I guess that it wouldn't have taught me very much new stuff, I might have considering buying it, just to pick up the way things are formulated today. But ...
The Amazon sample pages doesn't give me a single sample. I can flip through from the title page, colophon, the brief table of contents, the foreword, the preface, the acknowledgements, the About this book, About the author, and then, finally, eight text lines from the first chapter, which is essentially 'Welcome to this book' (as if all the preceding blurb is not enough of 'welcome'!). There is nothing to show the style of problem discussions, nothing to show the expected knowledge level.
This book is so new that there are no revealing user reviews. The amount of blurb is so large that I honestly do not think this is any sort of directly-to-the-point-with-a-minimum-of-fuzz book for seasoned professionals. So for now, I will not order a copy.
That being said: For the major part of my university, data models (a.k.a. data structures) was an essential part. We spent quite some time on creating database schemas (this was in the CODASYL-relational transition, so we were into both models), we did a lot of work on entity-relationship models (which I still think of as one of the lost pearls of information technology), and class based data modeling.
In our senior year, the last semester, our entire class was split into a number of subproject teams, each assigned to a different main module of a complete software system. The idea was that we should gain experience in cooperating with other teams. The professor in charge had just been caught by some 'functional design' ideas, demanding that all interactions between modules should be through function calls and their parameters, with no common data whatsoever. No data structure design - each module might have some static structures, if they preferred, but none of it should be revealed to others. Seen in a bird's eye perspective, there were no other data than those passed as parameters.
To say that the project failed miserably is to put it in rosy, romantic terms. None of the teams were able to produce anything useful. One significant part of the explanation was that we all had been taught the importance of well designed data structures. Without it, we were lost. But the professor's ideas were coming in like a tsunami, so maybe five years later, when data structures / models teaching had been completely abandoned, those students would have made a greater success.
I have not seen good data modeling returning to the mainstream yet. I still miss it. I still tend to sketch data structures on paper to make clear to myself how complex information sticks together, but whenever I present it to any programmer younger than myself, they are unable to see the data as entities independent of the operations you do on them, but defined by their relationships. Modern programmers immediately start attaching various methods to them, replacing data relationships with one, two or more specific method calls for changing object attributes, pushing aside the relationships of the data model.
From the table of contents of this book, it does not seem to point to data model design. 'Arrays', 'Queues', 'Stacks' is at a very elementary level; it does not suggest system design by data model design. Furthermore, it points towards coding techniques, not modeling techniques.
So I guess that if some youngster comes to me for advice on data structuring, I will have to dig into my basement to find my old textbooks, published 40-50 years ago. Unless someone can suggest newer textbooks on how to do system design based on a data model. Not system implementation and coding - design.
But I guess that doing proper system designs is not agile enough in today's software development environments. System design is intitiated by first typing 'int main(int argc, char **argv){}' and take it from there as ideas and requirements come to mind.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
trΓΈnderen wrote: Amazon sample pages doesn't give me a single sample
Oh, that's unfortunate. I'm reading the book from my oreilly.com subscription where I can read all of these books so I didn't notice that.
trΓΈnderen wrote: I have not seen good data modeling returning to the mainstream yet.
There is a weird movement (probably caused by Universities getting stuck on the Functional Paradigm) where new devs are literally saying that OOP is evil. It's crazy.
Instead of learning from the past and building on it, they burn everything to the ground & then start out with dirt & say, "We've built the newest thing. It's dirt and we can make the best structures from it with a little water. And also, we are so much smarter than those who came before us."
Yeah, I've noticed the move away from any type of planning too.
Anyways, the book isn't actually written on that it just gets to the basics of Data Structures.
If you're interested, but you probably aren't.
The Manning book site is actually much better.
Check out this link and you can click on chapters[^] in table of contents and read actual chapters.
I just thought the book was interesting. I've discovered over the years that I often believe that other devs ("architects") know all of this foundational stuff and then I discover that they don't know it either.
|
|
|
|
|
|
I've been buried in legacy maintenance of other people's π© for a while, to the point where I really don't want to come in to work . Among other things I do our installers, which encapsulate several third-party packages. Today, we've discovered a problem that's fixed in a new version of a package. The new package requires that the old one be uninstalled before the new one goes in. While this isn't too hard, the uninstaller isn't silent and the user has to click on a number of buttons for it to do its thing.
Here's the fun part. For a long while I've wanted to have my installer click buttons automatically so that I didn't have to rely on the user doing it. Even when I include detailed and explicit instructions in my installer, they sometimes screw it up. We use Inno Setup[^] which lets you call functions in a DLL of your own from their Pascal script. I use this feature for several things that aren't easily accessible from script.
I'm implementing an auto-click feature in the DLL that spins up a thread that watches for windows with a caption and then clicks a specified button in that window. It looks like it's going to work.
I'm happier than a pig in slop .
Software Zen: delete this;
|
|
|
|
|
But according to the docs, InnoSetup does also understand the command line Parameters /SILENT and /VERSILENT. They did not work for you?
|
|
|
|
|
This is the case where the encapsulated installers don't support silent installs or uninstalls. I even have one case where a command line installer when run with the silent option still pops up a message box when it completes .
Software Zen: delete this;
|
|
|
|
|
I used to rip apart MSI files with some MSI decompiler thing that I used to have, and then modify them to make them unattended.
I wish I could remember the tool name. Orca or something?
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
MSI is an abomination before all known deities. Before we started using Inno Setup we tried InstallShield, which generated MSI. I spent over a month trying to get our stuff installed properly. When I found out they wanted over $1K for each additional user language to support localized installs, I said screw it and went looking.
After finding Inno Setup, I replicated our product install in in a single day.
Software Zen: delete this;
|
|
|
|
|
|
It was indeed called Orca, and was part of the Platform SDK.
A few links brought me here: Windows SDK - Windows app development | Microsoft Developer
There's no direct link to it however, it looks like you have to download the entire SDK just to get that one file.
[Edit]
Oh, and here. Although this still has no direct link.
|
|
|
|
|
Yes, it's Orca. But that's like doing assembly programing. I wouldn't wish it on my favorite enemy.
Bond
Keep all things as simple as possible, but no simpler. -said someone, somewhere
|
|
|
|
|
I don't remember it being terrible for modifying MSIs as long as you knew how they worked, but I wouldn't use it to build one from scratch.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|