7 ms·
Sometimes it feels like we're entering a new age of coding. C# is so full of "features" that code refactoring tools like ReSharper, CodeRush and JustCode became
by diego_moita 10y ago
Sometimes it feels like we're entering a new age of coding. C# is so full of "features" that code refactoring tools like ReSharper, CodeRush and JustCode became simply indispensable. It is quite hard to be sure, every time, what is the most elegant/compact way of doing things.
In the .Net/VisualStudio world, the language tooling (Intelisense, visual drawing XAML & WinForms, etc) became as important as the language semantics or the availability of frameworks and documentation.
A long ago there was a fad, known as CASE (Computer Aided Software Engineering) that advocated doing on programming what CAD did to other engineering. It seems that were finally getting there.
- pjmlp 10y agoThat type of programming never went away. That is what I was doing on Windows 3.x and have done while coding in Mac OS X and Windows. Also the reason I never quite adapted to UNIX mentally of VI/Emacs. Even though I have spent enough years coding for UNIX that me and Emacs are quite old acquainted with each other.
- caseymarquis 10y agoThere's a Vi plugin for almost everything. Highly recommend VsVim for visual studio.
- pjmlp 10y agoExcept I don't like VI at all. I know the essential for when Emacs isn't available which is quite common on commercial UNIX installations, learned back when Xenix was still being sold and don't intend to learn more than that. Thanks anyway, I know you had good intentions.
- int_19h 10y agoI don't know about that. I'm working on a codebase that heavily uses C# 6.0 features, and for the most part, the "most elegant/compact way of doing things" is disseminated via code reviews, and quite fast at that. Convenient things stick around and become idiomatic precisely because they're convenient. Then again, you don't have to always go for the most elegant/compact thing, either.
- colemickens 10y ago"WinForms" is "language tooling"? "XAML" is "language tooling"? By what definition? I can write server-side C# in vim (without omnisharp) just fine, actually. Maybe the tools became "indispensable" because they add value? I refactor my code in vim but it would probably be faster in VSCode. That doesn't make C# a bad language.
- addicted 10y agoC# has (had? I'm still a couple of versions behind) so much syntactical overhead that writing code without a visual studio seems painful at the very least. The var keyword was the first time it was even possible to write C# without tooling. It has definitely made it possible for me to use Vim for editing C# code. Newer features, such as lambda expressions, and some of the much nicer property syntax makes me feel that it may actually be fun to write C# from scratch without Visuak Studio looking over it.
- deleted 10y ago[deleted]
- brusch64 10y agoCompared to what languages ? I always thought of C# as the improved, less verbous Java. I wouldn't compare it with Python or other dynamic languages, but I prefer it to most compiled languages (especially at the times it was created)
- lgessler 10y agoWhen I read their comment I thought of how much annotation of static types you have to do that compilers in other languages are smart enough to figure out on their own. Consider the following snippet in C#: public static IList<Ephraimite> FindEphraimitesToKill(IList<Ephraimite> ephraimites) { IList<Ephraimite> ephraimitesToKill = new List<Ephraimite>(); foreach (Ephraimite ephraimite in ephraimites) { if (ephraimite.Speak("shibboleth") == "sibboleth") { ephraimitesToKill.Add(ephraimite); } } return ephraimitesToKill; } Now, the same in (imperative-style) OCaml: let findEphraimitesToKill ephraimites = let ephraimitesToKill = ref [] in List.iter (fun (ephraimite) -> begin if speak(ephraimite, "shibboleth") = "sibboleth" then ephraimitesToKill := !ephraimitesToKill @ [ephraimite] end) ephraimites ; ephraimitesToKill;; See how much less we had to specify the type of what we're handling here? And things would have gotten easier if we used functional-style OCaml, but that's not entirely a fair comparison. So hypothetically it should be possible to write a C# compiler that would, if type annotations were omitted in some places, be confident enough to assign a sensible default, which is why we call the current version verbose. Although I suppose it's slightly more complicated than that. (Interfaces, if we want to have them, need to be explicitly declared as there are potentially many interfaces that could be used for a given object, and the rigidity imposed by redundant type declarations could help with the health of large and long-lived codebases.)
- flukus 10y agoFor the last decade or so the c# world has been moving away from those ill conceived tools. Winforms/Webforms were drag'n'drop based and have since been replaced with xaml and html. SSDT has given way to migration based approaches. Intellisense has become it's own lightweight thing and consumable from more tools, you can code just fine without it. ReSharper I've never used, I find it gets in my face more than it helps. If you want to see a tooling based approach, go look at the state of android development these days. That's why we see stuff like react native becoming popular.
- UK-AL 10y agoSSDT style database upgrades are still the most popular. Since it's what most of the red gate tools do, unless you use ready roll.
- flukus 10y agoWith the migrations tools listed above there is no need for any of the red gate tools.
- UK-AL 10y agoWhat tools listed above? I haven't seen any DLM tools mentioned.
- flukus 10y agoSorry, it was in another post: > My go to migrator is fluent migrator (https://github.com/schambers/fluentmigrator https://github.com/schambers/fluentmigrator) or flywaydb if anyone objects to the c# (https://flywaydb.org/ https://flywaydb.org/).
- UK-AL 10y agoThey've been around for a long time. I don't think they will become as popular as red gate. Since you have to write the migrations yourself. That's a lot of additional work.
- pixie_ 10y agoThe most productive I've been as a developer was 20 years ago when I was creating VB6 apps and components...
- frik 10y agoSo true. Between 1998 and 2000 VB6 was perfect, you could develop Windows GUI applications in a rapid manner. The VB6 IDE, the Windows UI guideline, the VB6 API, everything was great. And PlanetSourceCode.com was what was later SourceForge and nowadays GitHub. When I read about Microsoft's vision for .Net in 1999 about applications running as a service over the internet (that was their original idea), I thought that will end the great Windows platform and started looking for alternatives. Microsoft dumbed VB6, but it took them until 2003 to come up with DotNet with a different implementation, it (C# 1) was basically a Java clone with small syntax improvements. The biggest fail was to announce VB.Net and their lackluster Channel9 video that showed the third party developed the converter wizard (VB6 to VB.Net) that barely worked and was free only in the lite version. In the meantime I switched to C, C++, PHP, etc. The web replaced desktop applications in many cases anyway. And nowadays Android and iOS are important targets too. Sadly, the rapid development never got that easy to use as it was with VB6 IDE, with HTML4+PHP with Dreamweaver being almost as fast. But nowadays, the GUI builder aren't as polished and well integrated and don't support all features of the supported languages - so many skip the GUI builder and write the GUI code by hand.
- cm2187 10y agoVB.net development is not that different from VB6. It is a way more sophisticated language and therefore can do more complex things. But the basic things take pretty much the same syntax than they were in VB6.
- frik 10y agoIt is and it isn't. VB.Net is basically everything from C# with an syntax heavily inspired by VB6. But the similarity ends there. The RAD IDE of VB6 or Delphi are unmatched, and the compatibility is gone. As WinForms is legacy as well, the whole experience is different anyway. People would like to run their Win32 apps on their smartphone, nowadays you have more luck with Android than what Redmond comes up.