LasseVK
LasseVK
CC#
Created by Saulojr on 8/16/2024 in #help
Career crisis advice
Even Microsoft seems to be pushing .NET Blazor as the "right" way of doing .NET Web application programming these days. However, many companies still have "legacy" projects, and these range from using razor pages (previous "hot" technology from Microsoft) all the way back to pages built using VBScript.
29 replies
CC#
Created by Saulojr on 8/16/2024 in #help
Career crisis advice
.NET Aspire and Blazor are superb technologies, but unfortunately I have not yet seen any notable adoption of these technologies. In the long term, I would hope that more companies adopt these technologies, but right now ......
29 replies
CC#
Created by Ninja Kirby on 7/5/2024 in #help
should state machine have ability to add/remove
It depends entirely on your definition of what "a state machine" is. On one hand, it could be a static "machine" that specifies exactly what happens if you do X in state Y. On the other hand, it could be a framework that allows you to create state machines, where you can specify what happens if you do X in state Y. In the first case, being able to modify it after the fact is probably not a feature. In the second case, probably it is.
3 replies
CC#
Created by The Fog from Human Resources on 7/5/2024 in #help
What is dependency injection and when should I realistically use it
Static methods are absolutely the way to implement things, unless you feel there is a need to be able to depend on "something that does X", except that you don't want it to actually do X. This in particular comes up during testing. For instance, if you have a method that says "File.WriteAllText", that writes a string to a file, replacing it if it exists, and you want your own code to depend on "something that (re)writes a file with the text I supply", then for test-purposes, using a static method call is not a good idea, as you will have to depend on an implementation that actually writes something to disk. Instead, that might warrant an abstraction, and interface or class that you can depend on that will write to the file on disk, but which you can substitute during testing with an implementation that does not write to the disk, but instead writes to memory, or just observes that the write was attempted.
17 replies
CC#
Created by eid on 7/6/2024 in #help
enumerable.range vs yield return
What exactly is the question here? Might it be that you want to understand how a method implemented using yield return actually works?
8 replies