6

What I learned about C# this weekend:
1. I am shit at C#
2. There is a nice selection of libraries both from Microsoft and third party.
3. I like a lot of the design decisions to not make foot guns. Like you can't use an int as a bool. You must be explicit so you don't have hidden type conversions.
4. WPF isn't terrible, but it took me a bit to figure out how to make sure the front end can see changes by triggering events when a property changes. I knew this was a thing, but it took forever to figure out how. The new terminology for things is tripping me up.
5. I am shit at C#.

So what do I get out of 1.5 days of banging my head against the wall? An https server that simulates a hardware device and exchanges json messages back and forth. It does what my python code is doing now.

I found a nice library for https:
https://github.com/chronoxor/...
I learned quite a bit reading the code from this library.

Comments
  • 2
    "I like a lot of the design decisions to not make foot guns. Like you can't use an int as a bool." - you mean... Proper Typing?
  • 0
    @retoor why would you want ssh and https on same port?
  • 2
    > WPF isn't terrible

    Let's agree to disagree. :)

    I get what MS was trying to do with WPF, but not everything has to be 6 layers of MVVM "mud".

    They shouldn't have used their own flavor of XML. The whole architecture reeks of know-it-alls who think devs love complexity.
  • 2
    @PaperTrail

    "WPF isn't terrible" means: "we are using it at work...help..."
  • 1
    @Demolishun > "we are using it at work"

    Ditto. My simple lizard brain can't wrap around it.

    We have a couple of what I would call 'WPF experts'. Ex. 'Brian' wrote a WPF data grid from scratch because of the bugs we ran into with DevExpress. His grid is good enough to rival "the big boys". Its almost magical to see him use WPF as a golden hammer.
  • 0
    @retoor oh, I won't use open wifi anymore. Too many people hacking and shit.
  • 1
    I did c# but I don't remember it. I thought it was just java but then did unintuitive things. I got around it the same way I got around in java and usability wasn't different other than the small intuitive differences for some types

    am not a fan of using / debugging Microsoft software so I guess my intuition doesn't work like theirs does as a general
  • 2
    I find C# tolerable nowadays, specially since .net core.

    WPF wasn't a bad idea IMO, but, in habitual Microsoft fashion, terribly executed. The concept is valid though (it's used now in many frontend frameworks).

    @Papertrail said it perfectly. It's like they went the crapple way of "we know better".

    Yet the foundation wasn't that terrible. I worked with WPF for a couple years and never hit a problem that I couldn't find both a designer side and a programmer side solution for.

    That's the real value of these frameworks. In an ideal world where designers are not braindead figma flingers, and knew how to write (because XML ain't hard, fucking Spanish grammar is way harder), programmers would never fucking have to care about fucking frontend.

    And that'd be utopia.

    I don't care what's being rendered if it doesn't require a fragment shader, I guess.
  • 1
    Glad you’re getting on the C# train. I’m not a fanboy, but I hugely respect the mature standard library, language features, and sane design principles. Two things to note: absolutely avoid using WPF in 2024(5). It’s just old at this point and basically the same as WinForms in my mind. There are Microsoft and third party provided alternatives. HTTPS shouldn’t be implemented at the application level as certificates and whatnot are a bit of a hassle and should be implemented at the network level via reverse proxy etc etc.

    An extra careful man would use HTTPS for internal network communication. I am not this man.
Add Comment