What are you coding?

I did C++ first, It renders to a buffer using the CPU and then displays that. The C++ version uses Vulkan for the UI and to display the result. The C# version uses WinUI 3 and Win2D to display the buffer result.

Nice! :) I haven't tried using Win2D with WinUI 3 as yet, but it's something I would like to experiment with soon.
 
If you want a copy of the VS C# project I could upload it, don't know what site is good for that?

Yeah, sure - if you're happy to do that. :cool: Do you use anything like github? If not, it might just be easier to use the free tier service offered by file.io or wetransfer.com.
 
Yeah, sure - if you're happy to do that. :cool: Do you use anything like github? If not, it might just be easier to use the free tier service offered by file.io or wetransfer.com.
OK, will upload it. I should say, the code is a mess as I am just trying to get it working and have been playing around, trying different things to speed it up.
 
Last edited:
OK, will upload it. I should say, the code is a mess as I am just trying to get it working and have been playing around, trying different things to speed it up.

I've grabbed it, thank you. Don't worry - I know how messy these home projects can get! It's all good, I'm sure it's fine. I'll try and take a look later this evening; curious about the Win2D stuff. Cheers! :)
 
I've grabbed it, thank you. Don't worry - I know how messy these home projects can get! It's all good, I'm sure it's fine. I'll try and take a look later this evening; curious about the Win2D stuff. Cheers! :)
Only a small amount of Win2D code is used and its in the MainWindow.cs, also use it to render backgrounds for the UI controls: InfoUI, NavUC and StartUC. The [MainWindow.cs]-->canvasControl_Draw is the place its mostly used.
 
Kudos to you! I seem to be very anti Microsoft these days and it pains me just using VS Code and GitHub. :D

I’ve finished the last of my C projects, faffing about with hash tables and linked lists. Good riddance.
 
Last edited:
Personally hate C++/C# - the odd thing aside much prefer the approach of old school C. When I'm doing stuff in C++ I still try to stick to C style approaches and interfaces as much as I can.
 
Personally hate C++/C# - the odd thing aside much prefer the approach of old school C. When I'm doing stuff in C++ I still try to stick to C style approaches and interfaces as much as I can.
I like the simplicity of C#, I don't mean the code syntax, I mean the code management. I have never had an "unresolved external" using .Net. I have wasted an unbelievable amount of time just trying to get C/C++ working code to build, I hate that *****!!!. In terms of syntax, I don't really care which language I use.
 
I like the simplicity of C#, I don't mean the code syntax, I mean the code management. I have never had an "unresolved external" using .Net. I have wasted an unbelievable amount of time just trying to get C/C++ working code to build, I hate that *****!!!. In terms of syntax, I don't really care which language I use.

True I hate that aspect especially when it is something really simple but obscure.
 
Only a small amount of Win2D code is used and its in the MainWindow.cs, also use it to render backgrounds for the UI controls: InfoUI, NavUC and StartUC. The [MainWindow.cs]-->canvasControl_Draw is the place its mostly used.

Thanks again for sharing the code. Loaded it up, ran it, checked it out. :cool: The Win2D looks nice and straightforward to setup so definitely will be looking to have a play with that soon. Thanks again. You've made me want to pick up my own path tracing project again, but I don't have the time at the moment! :cry:

Regarding languages, I absolutely love C and C++. Those were the languages I used most in my earlier career (and still do today, though not as much) - borne out of the need for performance more than anything. Nowadays, most of my work is C# (.NET 6/7/8/9/10) for application development, C++ for the odd research programme and specialist contract, and web tech such as JS/TS, nodejs, and the various frameworks (of which there are so many).
 
I have never used GitHub so don't have an account, don't know if its free or have to pay.

Yeah, there is a free tier and it's plenty feature-rich and capable enough so that you wouldn't need a paid plan. For my personal stuff, I have a free account. You can have public or private repos and it is easily integrated with the various IDEs and code editors that are available today. Git is powerful and can be complex, but the reality is that you only need to familiarise yourself with a small subset of commands and processes in order to utilise it successfully.
 
I remember when I could write in c a window and various coloured pens to scribble on. Was from a book called c for dummies I think.
I don’t think I understood the code mind, I just knew it from repetition.

Had a few books that were well above my skill level but I enjoyed going through them regardless.

This was one such example, I had an rpg one from them too.

IMG-3903.jpg


image.png


I'd see books like this and be full of wonder but the reality was I was never going to be able to do this stuff due to my struggles with maths (diagnosed in adult life with dyscalculia), however I was still able to have a lot of fun with things like the source engine world builder tool and things like that. Used to fondly remember NeHe's OpenGL tutorials too, was mesmerized just seeing the how to draw a triangle on screen one and his Christmas demo scene. Cool thing is the website is still up with the original tutorials for Win32. Spent a lot of time on game tutorials site too which doesn't exist now, and gamedev. Basically doing everything except trying to code because it turns out I didn't find it as interesting doing it as I did thinking about it. Pretty much how I am with games these days, the idea is often better than the practical.
 
Last edited:
Personally hate C++/C# - the odd thing aside much prefer the approach of old school C. When I'm doing stuff in C++ I still try to stick to C style approaches and interfaces as much as I can.

Yep.

I've come to the conclusion that object orientated programming, although a great idea, the 'patterns' create a coupling of algorithms which then becomes an anti-pattern for mapping to future architectures.

I think one of the LLM benefits will become getting from basic data models and transformations to execution whilst abstracting and optimising the architecture.
 
I remember when I could write in c a window and various coloured pens to scribble on. Was from a book called c for dummies I think.
I don’t think I understood the code mind, I just knew it from repetition.

Had a few books that were well above my skill level but I enjoyed going through them regardless.

This was one such example, I had an rpg one from them too.

IMG-3903.jpg


image.png


I'd see books like this and be full of wonder but the reality was I was never going to be able to do this stuff due to my struggles with maths (diagnosed in adult life with dyscalculia), however I was still able to have a lot of fun with things like the source engine world builder tool and things like that. Used to fondly remember NeHe's OpenGL tutorials too, was mesmerized just seeing the how to draw a triangle on screen one and his Christmas demo scene. Cool thing is the website is still up with the original tutorials for Win32. Spent a lot of time on game tutorials site too which doesn't exist now, and gamedev. Basically doing everything except trying to code because it turns out I didn't find it as interesting doing it as I did thinking about it. Pretty much how I am with games these days, the idea is often better than the practical.

I have a small library's worth full of these books from over the last few decades. :cry: I can't even begin to figure out how many hours I have spent with my head buried in them over the years. I find the tech - and the thinking behind the various techniques and algorithms - fascinating. A lot of their content is very much out of date now, but the ideas and fundamentals will always remain valuable. I cannot bring myself to throw them out. The more modern books are still very much in use, such as the Physically Based Rendering book. Good stuff!

55073001366_fb7e6b6676_o.jpg
 
Yep.

I've come to the conclusion that object orientated programming, although a great idea, the 'patterns' create a coupling of algorithms which then becomes an anti-pattern for mapping to future architectures.

I think one of the LLM benefits will become getting from basic data models and transformations to execution whilst abstracting and optimising the architecture.

I'd respectfully disagree - I believe OOP has as much value as functional or procedural programming. Rigid coupling, that makes future changes difficult, isn't inherent to OOP. It comes from poor or ill-advised design choices and that can happen in any paradigm. It is equally as possible to write tightly coupled procedural and functional code.

OOP can really shine in huge and complex systems when managing state and behaviour side-by-side. A properly architected system can aid in creating clear boundary subsystems and components. It can be a great enabler that allows multiple teams to effectively work on different parts of a large codebase simultaneously, which is essential when you consider the size and complexity of modern enterprise applications and games (where it is not unusual to have tens and hundreds of developers working on the codebase). OOP's encapsulation and interfaces, done right, provide crucial structure for the organisations that undertake and maintain such projects.

I do think OOP has a bad rap from past years and legacy codebases, perhaps where its implementation was not befitting of the project or through bad use of design patterns. It was/is quite easy to dogmatically use them without necessarily understanding the trade-offs. You don't always need a singleton or factory abstraction, etc. ("Gang of Four") - arguably a misuse of patterns within an OOP environment rather than a flaw in OOP. You also don't need to go to 27 layers of abstraction, which seemed to be a common thing some years ago. Again, this is a misuse - rather than a flaw - of OOP. In reality, a lot of modern software development uses a mixture of paradigms. It's not necessarily a case of one versus the other. A modern software programme might use OOP for domain modeling/system architecture, functional concepts for data transformations/state management, and procedural code in other places.
 
Back
Top Bottom