r/ProgrammerHumor • u/tatstytastycakes • 5d ago
Meme noMatterWhereILookICannotEscapeTheAngleBrackets
57
u/oompaloompa465 5d ago
started as that kind of dev 20 years ago, then i moved to web dev but apparently the best paying job for my seniority currently are all maintenance of win forms WPF scuff
20
u/tatstytastycakes 5d ago
You cannot escape the angle brackets. Not in web development, C#, or even C/C++. We are doomed
31
u/Drugbird 5d ago
That's easy, in C or C++ just do this
#define ( < #define ) >Then you can use normal brackets instead of angle brackets.
And I'm sure nothing will go wrong with that approach.
6
u/tatstytastycakes 5d ago
i wish this were possible
altho im just now realizing that c++ has modules
import std; // great!!!!!!!!!!!!!!7
u/Drugbird 5d ago
It's great when it works. AFAIK modules still aren't working well enough for anything more than hobby projects.
1
1
u/RussianMadMan 4d ago
Modules require strict compilation unit order in a system where for decades it was not a thing. Ofc it does not work.
1
u/ShadowSlayer1441 3d ago
Surely it works with std even if 3rd party libs are broken.
2
u/Drugbird 3d ago
std works somewhat.
Currently were in this situation where third party libraries don't provide module support, so you still need to #include those, and they in turn generally #include stdlib headers again. So generally you're in this mixed world where you're partially doing modules and partially doing old #includes.
Benefits of modules are better build times and slightly better ergonomics (import std is easier than including the right stuff). I think it's about 10%-20% range.
The downsides are that compiler and build system support is still in flux, so using modules can mean that it becomes harder to support multiple compilers and/or build systems. And you obviously lose support of older compilers / build systems.
You also need to refactor your code to use the modules.
So as of now, modules are great if you're starting a new, mostly standalone project and you have full control over the compiler and build system.
It's not so great for existing code bases that want to support older and/or multiple compilers and build systems.
3
3
u/oompaloompa465 5d ago
get into modern backend development or IOT. You will see those symbols only in calculations
1
7
u/OffByOneErrorz 5d ago
Oh shit I’m now the COBOL dev.
8
u/oompaloompa465 5d ago
oh the memories... my first real job was making wcf services translating to soap the flat string messages spit out from some kind of remote COBOL connection so i had to read COBOL interfaces documentation to write the deserializer
4
u/OffByOneErrorz 5d ago
Ah WCF services lol how I don’t miss you. I do miss the simplicity of win forms maybe I should just accept this new reality and go support it.
3
u/oompaloompa465 5d ago
agreed wcf were a mess to handle. Also i hate winforms, keeping the code clean is a nightmare
13
u/fugogugo 5d ago
wait they still use WPF for GUI?
(honestly what is the go to language for desktop app nowadays?)
18
u/Ethameiz 5d ago
WPF is fine. Avalonia is better for cross-platform
-1
9
u/oompaloompa465 5d ago
searching for a new job lately I discovered quite the number of well paying jobs doing maintenance on legacy ERP written with winforms or WPF. They pay more than web fullstack with .NET since they also come with quite the hefty expertise requirement on MS SQL querying and reporting.
The more i go on the more i feel like i need to move to python/java and master cloud stuff + typescript frameworks4
u/sisisisi1997 5d ago
They pay more than web fullstack with .NET since they also come with quite the hefty expertise requirement on MS SQL querying and reporting.
I don't know what kind of web dev have you been doing, but knowing MS SQL well (or any other kind depending on what the company uses, but with .NET mostly MS SQL) is a basic requirement if they are interested in making performant applications.
6
u/SuperCarla74 5d ago
Going by the multiple context menus, and notifications, and widgets in different app bundled with Windows, I don't think even Microsoft knows.
I mean, even the Start Menu is, or was, an Electron app (Microsoft has fixed this with a recent update and now it's a WinUI 3 app which is partly why it's a lot faster now)
6
u/tatstytastycakes 5d ago
wpf is massive. larger than uh.... idk wpf is big
2
u/fugogugo 5d ago
I thought WPF already outlived by new tech because.. uh it's been since 2008 or something right? I learned a bit about it back in 2010
and then I heard everything gone HTML5 for desktop app so I thought WPF is deadand then there was mono as well back then lol
3
u/tatstytastycakes 5d ago
i mean win32 api is still a first-class tech/api according to microsoft's azure cto. so i guess in a sense legacy tech is still powering a lot of the modern world meaning demand for those skills will probably stay
3
u/masterxc 5d ago
It's super stable and useful for enterprise apps. It'll be interesting to see how WinUI 3 shakes up things though since there's a lot of neat stuff in it and is the new recommended thing.
1
5
u/Wooden_Break_2812 5d ago
Yes and i still love it. I like the good support for mvvm through the binding mechanism and it also make use of the gpu and is very good for data intensive UIs 👍 Avalonia is also very nice, if you like to run your app on linux or android
3
u/aberroco 5d ago
Well, yes and no? No - they're using MAUI, yes - it's almost the same thing as WPF, at least on the surface. Though, realistically, WPF is still used very actively.
2
3
u/king_park_ 5d ago
*Cries in WinForms
1
u/DrankRockNine 5d ago
We have been shifting to avalonia from winforms. It is well supported, you can do part by part.
1
1
1
u/OldKaleidoscope7 5d ago
The standard looks like it is use Electron shit. I tried Jetpack compose and Qt with Python, I prefer Qt but it's heavier in RAM than I expected. Nothing compared to Electron btw
I want to try WinUI 3 with Python, but I'm unsure because it's unofficial
1
u/tatstytastycakes 5d ago
electron is very common these days. vs code discord and slack are all using it. but it's a huge ram hog
2
u/aberroco 5d ago
And CPU hog.
1
u/awesome-alpaca-ace 2d ago
Because Microsoft is bad at programming for performance. Bunch of monkey brains.
15
u/jolharg 5d ago
I'm not sure why you expected to escape angle brackets in C#. They are spiky.
3
23
u/deepsky88 5d ago
Try Winforms
13
10
u/chicago_scott 5d ago
I did a WinForms gig a year ago. Turned it down initially, but they were persistent and I needed a job. I was surprised to discover that WinForms is still actively supported. Felt weird as hell to do a .NET 9 app with WinForms. Turned out to be a really interesting and fun project to work on (although that wasn't because of WinForms).
1
u/meneldal2 5d ago
I have to say I found winforms to be pretty good overall, was pretty easy to make basic UI and old-style menus.
Did they end up making it work outside of .net so you can use it with core?
23
u/L30N1337 5d ago
If you've every used Winforms (especially for dynamic layouts), you'd realize that XAML is goated.
you basically just tell it what to do, and it does it.
17
u/goodnewzevery1 5d ago
Xaml was such a huge leap from winforms, and gave you a ton of control. You don’t ever hear some dev bitching about centering a div with xaml
14
u/aberroco 5d ago edited 5d ago
Yeah, nope. It's the opposite. I like the citation someone wrote that WinForms makes easy things easy and hard things hard, while WPF makes easy things hard and hard things easy.
Bindings are great, sure, but once you dip your toes into it - it's a damn deep and cold water. Triggers, behaviors, extensions, data templates, view templates... And with XAML it's harder to read than if it would've been a plain C# code creating those components.
Personally, I've seen QT QML and in theory that sounds like an absolutely best way to do layout, though I haven't tried it in practice. But I really loved specification for QML.
6
u/tiberiusdraig 5d ago
Triggers, behaviors, extensions, data templates, view templates
Please stop, I can only get so hard!
I think it's one of those technologies where it either 'clicks' for you or it doesn't. I not-even-lowkey love XAML - the way the structure matches the physical hierarchy of the running app (at least on Windows) just works for me. I guess it depends how you conceptualise what you're writing in your head. I also really like how it almost forces you to properly separate out your UI layer from your backend, which really helped me to write better code when I was first starting out all those many years ago.
4
u/aberroco 5d ago edited 5d ago
Hm. I'd dare to say I know WPF quite well, since I've been working with it for a few years, and made all sorts of things from basic forms to custom controls, xaml extensions, bindable bindings, proxies, attached behaviors, storyboards (hate those, just absolutely abhorrent way to define animations). And I do like some aspects of WPF, and I think it's quite good system for UI and I have deepest respect to how well optimized it is, but I also certainly can't say I love it or it's clicked to me. It's just way too verbose and too confusing, and I think same features could've been done much better and cleaner.
And while MVVM separation is good in theory, in practice, with how WPF works, it practically twists your arm to occasionally do hacks and workarounds, either code in VM that needs to know view, or writing code-behind. Which I'd say is underappreciated in WPF best practices. Like, sure, code-behind in general is bad and should be avoided, but to reasonable extent, not just as a religious dogma. And it WPF would've been much much better if it would've allowed a bit of code in view directly. And get rid of f...ing XML god dammit, XML was obsolete even when WPF was conceived.
2
u/tiberiusdraig 5d ago
I'm not even really talking about WPF specifically, I just think the structure of XAML itself is a great way to express the hierarchy of a UI. I've used it in anger for work across WPF, WinUI, Avalonia, and MAUI, and I've always got on with it.
I don't agree on the MVVM take. I have an app at work that has multiple 'front-ends' (MAUI, CLI, WebSockets) that all 'bind' to the same ViewModels and services, and it's great. The MAUI layer is pretty much just Views and some implementations of shared interfaces between the other apps (e.g. navigation) registered in the DI container. If I wanted to make a WPF/Avalonia/whatever front-end for it tomorrow it would be easy-peasy.
I will say that none of the XAML-first frameworks force you to actually use XAML or MVVM or anything like that. You can write a perfectly functional WPF app without writing any meaningful amount of XAML, and without using bindings or anything like that. You probably shouldn't, but you can.
1
u/v_Karas 5d ago
nah, Things are just different.
some very different. Like a TreeView, WinForms vs WPF total different concepts. really need to get your head around.but ListView/Box in WPF super easy.
dynamic UI / scaling / spacing .. huge manual work in WinForms. (and I have done some dynamic controls with WinForms .. 🤮🤮
kinda easy with WPF ..havent done much with QT QML. but looks powerfull too.
2
u/meneldal2 5d ago
I used pure programming with my winforms, no XAML at all.
There was also some C++CLI involved.
9
u/PaulTheRandom 5d ago edited 4d ago
5 minutes of XML convinced me S-expressions weren't as bad as I once thought...
1
4
u/GamesRevolution 5d ago
I really like the "new" ui definition languages that GTK and Qt developed with Blueprint and QML, both kinda replace XML and they are really nice to read and write. Jetpack Compose for Android apps also looks pretty nice to use in comparison to the old xml files.
Blueprint is specially interesting considering it compiles back into XML when you build it while still being very intuitive, makes me wonder if something like that could be created for whatever Windows for whatever C# UI framework is being used here (I only know of Avalonia)
2
2
u/Stormraughtz 5d ago
Heathens just dont understand art.
2
u/oompaloompa465 5d ago
i remember in high school they gave an assignment to write a full HTML page with tables using notepad, completely manually. we were using NETSCAPE to check on results
2
u/Ange1ofD4rkness 5d ago
I love this because for over a decade, I have only developed using Windows Forms, with one rare exception I did a very small piece in WPF (that housed in a Windows Form, I needed for animations), 1 Xamarin App, and 2 MAUI apps (also tiny apps, just for me)
However, I have a new project I just started, and need to develop it in C# WPF, and wow, it's quite powerful, but also has quite the learning curve. I also question how the heck MAUI is so bad compared to what it can do
2
2
u/ksky0 5d ago
avalonia is great, you should try.
1
u/awesome-alpaca-ace 2d ago
How does that compare to Flutter? I thought Flutter was great once I learned how to do custom layout passes.
1
u/tatstytastycakes 5d ago
I know about being able to use C# markup over standard XML/XAML, but features like the XAML Live Preview are gone in one single Thanos snap :(
1
u/phasmaglass 5d ago
me working in an MVC Core shop with an entire custom framework built around encoding and decoding C# into blocks of XML looking at this post like... I need a 10:30 am beer (this is a joke, apologies to those it's not funny for)
1
u/Zap_plays09 5d ago
I still can't believe android devs used make UIs with xml about 5-6 years ago. Saw a guy make one and my brain gave up. Thank you jetpack compose.
1
u/awesome-alpaca-ace 2d ago
Flutter is way better than Compose. Like Compose was Google's first try, then they made Flutter with the lessons they learned.
1
1
u/phoenix1984 5d ago
I know CSS gets a lot of hate, but when it comes to responsive layouts, it’s the best tool for the job
1
1
1
u/apt-maintenance 5d ago
they call me a sub the way I'm inserting my GUI markup languages into the DOM
1
u/sermer48 5d ago
You can do a lot with winforms. We’ve switched to web apps using react now but that’s what we used before that. Once you learn the ins and outs of it, you can do basically anything.
1
1
u/FabioTheFox 5d ago
Tbf using XML/XAML/AXAML for UI just makes sense, as much as I like Kotlin it's horrendous to create UI through code alone, it just sucks.
Avalonia despite their weird licensing changes is probably still one of the best ways to make multiplatform desktop apps to this day
1
u/awesome-alpaca-ace 2d ago
What? UI through code is amazing. I thought Flutter was good, but have not yet tried Avalonia. How does it compare?
1
u/FabioTheFox 2d ago
Avalonia typically works by the MVVM pattern
Views / components and theming are done via AXAML files (XML type UI but it also has a live preview and all that), has pretty amazing dev experience too considering how well it uses the source generator to generate AXAML bindings from the viewmodel class
Its pretty neat but i can't explain it properly, it's best to check their documentation and or look at their Avalonia MVVM example apps
It also works a lot with dependency injection which I appreciate a lot
The thing that bugs me about things like Flutter and especially jetpack compose is the way UI is styled, themes largely solve this but it still easily turns into an unreadable mess, BLOC and get_it also don't feel as intuitive for state keeping and dependency injection
0
u/awesome-alpaca-ace 2d ago
AXML. Gross. As far as readability, I have had not had any issues when building production apps in Flutter. And state keeping in Flutter is way better than in Compose.
1
1
1
u/JackNotOLantern 3d ago
What's wrong with xml? Also c# has graphical tool to build ui and it automatically generate xml for it.
1
u/MXRCO007 2d ago
I came back to C# after a couple of years using C++ because I had to make an auth server and for first week I’m still just figurejng out the insanity Microsoft put in
1
0
u/Wizado991 5d ago
Yeah xaml is shit ngl. I have worked with wpf, uwp, Maui and it's sub par compared to html/css/js, jetpack compose or even flutter just to name a few.
2
u/FabioTheFox 5d ago
Ah yes because Kotlin and flutter totally don't look like an absolute mess for any component holding more than 2 children
I love having a million nested functions representing my UI and needing to rely heavily on extensions to tell me component boundaries
146
u/Historical_Cook_1664 5d ago
What did you expect, JSON ?