HNHacker News
TopNewBestAskShowJobs

great_cormorant

11 karma · joined March 21, 2023

submissionscomments
great_cormorant··on Ask HN: Is it just me or is mobile web browsing awful?
This is something that Android would ostensibly do better at. You're able to get browsers with full ad-blocking capabilities there.

I've had luck with Orion (notably on YouTube videos) on iOS, though. DNS and other browsers might help, too.

great_cormorant··on Tell HN: Postman update removes all your stuff if you refuse to create account
I really like the built-in `.http` file clients in IntelliJ products. You can paste from CURL and copy to CURL, so interop with CLI commands is very easy.

https://www.jetbrains.com/help/idea/exploring-http-syntax.ht...

great_cormorant··on Understanding the .NET ecosystem: The evolution of .NET into .NET 7
What's wrong with mocking concrete implementations? I've worked on pretty large-scale services with AWS and we did it all day everyday. I think it worked fine and don't know if adding an interface on top of them would help.

I don't really remember J2EE, but I do run into weird Javax imports from time to time. +1 on them going away being a good thing.

For the open source stuff, I don't really care that much about the politics or history of it. Maybe I should, but at the end of the day Java just seems to have the libraries I need.

And for the project structure, maybe I should have worded that differently. The structure of nested projects makes sense, but the dependency management through Nuget and the hidden project files in IDEs just seems needlessly indirect - just show me files and let me add text for a dependency like in Maven or Gradle. To be fair, I think this one is partially just me being new to the .NET world.

great_cormorant··on Understanding the .NET ecosystem: The evolution of .NET into .NET 7
Right, marking methods as virtual is the other route I saw. Are most C# codebases opting to do that rather than add interfaces? It feels weird to edit signatures like that for testability, but maybe it's just what I'm used to - I'm putting all of my objects in constructors already for testability's sake, and I'm no stranger to making a factory or two.

VSCode has been my way forward for file-based editing so far. It's not so bad - just feels like I'm doing things that I ought not to be when I'm searching for DLLs or a random "scripts" folder in the root folder of our repo in Rider. In IntelliJ IDEA, all of the folders are just sitting there, ready for quick edits.

I think C# overcommitted on interface-driven design. It's good in some instances, but the more I work in code the more I think that the majority of it is needless and oftentimes harmful to maintaining a healthy code base.

Thanks for the pointers! Nsubstitute looks cleaner than Moq at first glance.

great_cormorant··on Understanding the .NET ecosystem: The evolution of .NET into .NET 7
I spent a lot of time as a Java developer and have recently moved into a spot where I'm being asked to work with C#. A few things rub me the wrong way, and I'm wondering if it's just ignorance and / or me being stuck in my old ways.

- Unit testing with mocking is kludgy compared to Java and Kotlin (Moq vs Mockito). There's no mocking of concrete implementations for technical reasons, perhaps unless you shell out money for a paid product. This leads to folks putting interfaces everywhere so that code is testable.

- Along the lines of the above, everything feels a lot more corporatized or tied to Microsoft. The open source ecosystem and tooling around C# isn't to the same level of the JVM langs.

- The project structure feels odd. Solutions hide a lot of files from you, whereas JVM langs generally show what's actually there.

When it comes to actually writing implementations, I don't mind it, and it's far ahead of, say, Java 8. ASP.net might even be ahead of Spring in a few ways. But with Java 20 and Kotlin around, I don't feel compelled to move to it as a new default.