News for hackers. Stuff that matters.
Re:Introducing Bing Code Search for C# by rkuykendall-com on Monday February 17, 2014 @03:44PM (#7254385)
Personally, it's because Microsoft development locks you in, and costs a lot of money. The OS costs money, the server OS costs money, the database costs money, the IDE costs money, everything costs money, and you have to use it, for the life of your app.

To many young developers these days, and IIS server is the thing your company keeps in the closet to some sluggish legacy monstrosity which has been replaced for years with a better open source solution, but can't be put out of it's misery because it still holds some data that might be useful sometime.

Is any of this true? I have no idea. I'm just letting you know the rap it has, and the perceived reasons for that rap.

Re:Introducing Bing Code Search for C# by Nate630 on Monday February 17, 2014 @03:58PM (#7254445)
It is a lock in (most technology does lock you into certain dependencies) and it does cost money. But, it's all so easy to use now / saves you lots of time. You can roll out anything using PowerShell these days. Or just copy VMs with OS/IIS/SQL already set-up.

Deploying everything can be one-click. VS even has git integration now.

The old IIS is like you describe. But, the latest IIS is fast and easy.

Re:Introducing Bing Code Search for C# by 300bps on Monday February 17, 2014 @10:22PM (#7256153)
The old IIS is like you describe. But, the latest IIS is fast and easy.

In all honesty this is what I find from most unknowledgeable Microsoft bashers. They tried out the MS development stack with Classic ASP, Visual Basic 6 and SourceSafe 15 years ago. Then in their head they're contrasting that to the latest RoR tools with github. Many are not even aware of ASP.NET MVC and how different it is from ASP.NET.

Now, this isn't to say there aren't knowledgeable Microsoft bashers but this is what I find from many of them that aren't knowledgeable.

Re:Introducing Bing Code Search for C# by d0 on Tuesday February 18, 2014 @03:27AM (#7257018)
As a knowledgeable Microsoft basher, you're right. MVC is better but still a long step away from something great. Some of the internals are crazy bad from attribute thread safety to the numerous singleton piles of crud like the ViewEngines collection and route data. Not only that, the tooling really doesn't scale up well either.

I can only say after managing a project with 400 controllers that it doesn't scale up to complex UI or even medium sized projects well. Also we're reaching 5 minute edit, compile, run cycles (on E5 Xeons!). Also production debugging (which is inevitable one day) is a PITA on CLR based projects.

It has become the opposite of all promises. It's like wading through tar.

To be honest after over a decade of .Net experience and over a decade of Win32/COM etc before that, I'm tired of it all.

I wrote my first Objective C+Cocoa application last week (an RPN calculator) and it's where I'd rather be. It was fun and frustration free. I tried to do exactly the same with WPF/C# a few weeks ago and it was horrible.

Re:Introducing Bing Code Search for C# by UK-AL on Tuesday February 18, 2014 @05:49AM (#7257440)
WTF?

You complain about singletons, then prefer a language where the use of [sharedInstance] is extremely common. Objective-C is singleton hell. Both in third party code, and core libaries.

C# is vastly nicer than objective-c, and I'm a iOS developer. I'd rather use C# or Scala with a IoC container to handle the lifetime of objects, rather than using singletons.

Re:Introducing Bing Code Search for C# by d0 on Tuesday February 18, 2014 @07:09AM (#7257654)
Yes exactly that.

The difference is that your Objective-C/iOS application doesn't consist of thousands of threads which require synchronised access to these objects. It's a pretty static thing with an event loop. Possible a couple of background worker threads.

For a desktop application or even mobile application it's fine but for a massively scalable back-end enterprise system it's a pain in the butt.

Singletons are not for managing lifetime as well. They are a container for an object -- nothing else. Lifetime should be managed separately i.e using a container/service locator or something. Everything I've seen Cocoa-wise is pretty decoupled so far. There are some crimes but only inexperience seems to require them.

Re:Introducing Bing Code Search for C# by UK-AL on Tuesday February 18, 2014 @07:13AM (#7257672)
"Singletons are not for managing lifetime as well" - No, but you can replace it with something that does. I.E Single Object with application lifetime vs singleton.
Re:Introducing Bing Code Search for C# by d0 on Tuesday February 18, 2014 @07:24AM (#7257718)
Or a singleton that exposes a service locator (which is the pattern I've been using in Cocoa).
Re:Introducing Bing Code Search for C# by josteink on Tuesday February 18, 2014 @07:05AM (#7257646)
So you had an extremely large .NET project and complained it didn't scale.

And since you attribute those problems to .NET, your solution is a small project (which incidentally uses another technology).

Not dismissing your argument as a whole, but you have to admit you made at least one giant logical fallacy right there.

Re:Introducing Bing Code Search for C# by d0 on Tuesday February 18, 2014 @07:22AM (#7257709)
You're right. 100% right -- I agree with you. Let me break it down into to separate points which are better described.

The problems with the project scaling are primarily down to the infrastructure: MSBuild and the C# compiler are damn slow as is the whole rip up and replace assembly system in .Net. When you have something at the bottom of a dependency chain that is quite deep (with any enterprisey project), you have to recompile all consumers and therefore everything that depends on them and so forth. A single line change means you end up compiling the entire system on top of it. All 200Mb of DLLs need building again. That's a long time. Not only that, when it comes to testing and runtime dev (i.e. using the web front end), reloading assemblies and performing JIT is really expensive and time consuming.

Every time you do something, mount everest is destroyed and recompiled twice: one to IL and once to native. This is expensive and seriously screws productivity. It doesn't scale development-wise. Simple as. This is not specific to my current project - I've consulted at various companies since 2002 and that's exactly what it has ended up for everyone, every time.

Going back to LLVM/XCode. I'm not particularly experienced with the specifics of the abstraction that Apple provide, but I've spent 20 years building monstrous bits of C on top of Unix/Linux with GCC and Sun compiler suite. That's what we're still dealing with but we have LLVM which slings code out much faster than anything we've had before. We also have incremental build support (individual .o files per source file), faster linking and a runtime system that doesn't require recompilation.

I'm not saying it'll realistically turn into anything better at the end of the day but one some points:

1. The Xcode tooling is like lightning, even with a 200,000 line C project I imported from a previous project.

2. The startup time is 487ms compared to the same thing in C# of 2.2s to first output and 10.5s to it actually doing something.

Think I've explained myself better now. Sorry for the initial confusion.

Re:Introducing Bing Code Search for C# by 300bps on Tuesday February 18, 2014 @08:43AM (#7258036)
When you have something at the bottom of a dependency chain that is quite deep (with any enterprisey project), you have to recompile all consumers and therefore everything that depends on them and so forth. A single line change means you end up compiling the entire system on top of it.

This just isn't true at all. Even in COM days it wasn't true. With COM, if you preserved binary compatibility you didn't need to re-compile a client if you compiled a new version of a DLL it calls. In .NET it's even more forgiving. Sure, if you change something major like delete a bunch of properties that are used in the client then you have to recompile the client. But in many cases you don't.

Beyond this, if your architecture has 200 DLLs, it might be completely appropriate but it is a suspect architecture. I manage a .NET project that trades $4 billion of fixed income instruments per day, interfaces to three trading platforms, interfaces to 13 custodial systems and 7 different data providers. It uses about 25 DLLs and is quite manageable.

Finally, how often do you recompile a DLL that is "quite deep" in the dependency chain? Generally, such low-level DLLs should do very little. For example, maybe it's appropriate to change them if you change from Oracle to SQL Server but how often would that happen?

Re:Introducing Bing Code Search for C# by d0 on Tuesday February 18, 2014 @09:17AM (#7258188)
COM is different. The interfaces are well defined between components and processes.

In .Net, any contracts that break between layers in your dependency chain force a rebuild of all layers above it. This is not unusual in .Net projects as the components are bound at runtime.

There are not 200 DLLs - there are 200Mb of DLLs. Total count is 122 DLLs.

This particular beast handles integrations with over 100 systems using vastly different non COTS integration methods, has over 2500 tables, 950 domain objects, 400 controllers, 45 databases, 200 API endpoints, async background processing and piles of MSMQ queues. Data volume is terabytes. It's a behemoth and it's been around for 33 years in various forms.

If you, as we do, change architectural components and APIs, dependencies are broken. The main case for this is when we version our API. We have up to 3 API versions in production. When someone introduces a new API version, the oldest is deprecated and all the historic versions are ported to the newest internal API. This is where it becomes dependency hell.

However it's a fine way to avoid technical debt!

Re:Introducing Bing Code Search for C# by thomasz on Tuesday February 18, 2014 @04:52AM (#7257269)
I feel exactly the same way, but we should be aware that the grass is always greener on the other side.
Re:Introducing Bing Code Search for C# by d0 on Tuesday February 18, 2014 @07:23AM (#7257711)
I'd say the grass was less yellow :)
Re:Introducing Bing Code Search for C# by SDGT on Monday February 17, 2014 @04:52PM (#7254738)
VS lock in is a very real thing. At my current employer, there is no way they could ever come off of VS and .Net because of the lack of polyglots in the office. There is one of us that does Java, 3 that do PHP (only in the last 6 months), and 6 that are set up for .Net MVC. Management just can't spare the costs to retrain, and none of these guys go home and code on non MS platforms.
Re:Introducing Bing Code Search for C# by alkonaut on Monday February 17, 2014 @05:36PM (#7254987)
I could switch languages more easily than I could switch dev environment. The lock in to me is bssically simply that there aren't many other good language+IDE combos out there. There are plenty of languages that are interesting but very few come with a great IDE. I'd love to do Rust or Haskell all day, but I'm sure as hell not going to vim/emacs/sublime from VS. I almost envy those who never started using and IDE and can be productive with a text editor, their threshold to switch language is much Lower. Luckily VS at least supports C++, F#, JS and python so it's not impossible to cover quite a lot of languages in it.
Re:Introducing Bing Code Search for C# by usea on Monday February 17, 2014 @06:03PM (#7255120)
I love Visual Studio, but many of the JetBrains IDEs are great too, like WebStorm and PyCharm.
Re:Introducing Bing Code Search for C# by alkonaut on Monday February 17, 2014 @06:17PM (#7255187)
Yep, and VS isn't really "complete" without resharper which is a shame because the full versions of VS are already quite expensive.
Re:Introducing Bing Code Search for C# by breischl on Monday February 17, 2014 @06:40PM (#7255282)
I tried out Resharper for the entire evaluation period and then dropped it. There were a few nice things, but nothing that was just leaps and bounds better than built in VS features. But everyone says it's necessary, so I keep wondering if I somehow missed the killer features.

What are the features of Resharper that make you say VS isn't complete without it?

Re:Introducing Bing Code Search for C# by alkonaut on Tuesday February 18, 2014 @02:57AM (#7256953)
One of the big ones to me is "move class to its own file". Means when you are sketching up some multi-class API or something you can just type away in a single source file, and as soon as something looks half-finihshed I just alt enter and it creates a new file with the correct name and moves the type to that file including adding the necessary imports to the header. A lot of context-switch time gained.

Next big thing is navigation. Go to type, go to symbol and go to file are super quick and means I never go to the source tree to navigate the solution.

Re:Introducing Bing Code Search for C# by breischl on Tuesday February 18, 2014 @10:06AM (#7258437)
I didn't find the "move class" feature while I was trialing, but it does sound pretty handy.

Symbol search is incredibly useful, that was a revelation when somebody told me about it. But Visual Studio has had that since at least 2010, I think maybe 2008. Resharper's is a bit more complete, but I think the VS built-in one is a bit faster. The VS native implementation is Edit -> Navigate To, the default key combo is ctrl-comma, but I think Resharper takes that combo for its own purposes.

Re:Introducing Bing Code Search for C# by ehaughee on Monday February 17, 2014 @10:33PM (#7256203)
In my experience it isn't one, two, or even three killer features. It's the aggregate additional polish and productivity increase gleaned from 10 to 20 minor features that shave fractions of seconds and remove a click or two off of incredibly common actions. And I just use the default settings.
Re:Introducing Bing Code Search for C# by mattmanser on Tuesday February 18, 2014 @04:32AM (#7257192)
I've tried it a few times now, and never stuck with it.

I think it's because I find the VS interface incredibly cluttered anyway, and Resharper just makes it worse. The right click menus are already 10 miles long filled with useless clutter and when it starts mucking around with the already edging towards overwhelming intellisense pop-ups it just annoyed me one too many time.

After 2 weeks of trialling it then only thing I was really using was the "go to implementation..." but I've long since given up on the ridiculousness of making everything mockable anyway so it's only occasionally useful.

The worst thing about VS is how slow it can be sometimes, even on incredibly powerful machines. In the end it's a glorified text editor and everything should be secondary to that.

There's nothing more annoying than pressing ctrl-f (find) and then have it pause for 1/2 a second because it's trying to parse a massive html tree for intellisense you don't even need because you're just trying to delete a single node you know the name of.

Re:Introducing Bing Code Search for C# by alkonaut on Tuesday February 18, 2014 @05:49AM (#7257439)
I agree the slowness of find (Ctrl+F) and the slowness of the xml/html parsers is still the worse thing about it. I can see how tag soup is hard to parse, but well formed xml should parse in milliseconds. On the bright side, with a good go-to-symbol, go-to-file, go-to-type etc., I search much less for free text.

The text editor is only a tiny part of an IDE, the bits that are added are quite important. Integrated debugging (with edit+continue while debugging), integrated version control interface, integrated build system, integrated profiler and much more makes it so much more productive than having to e.g. do debugging with recompile/restart turnaround times.

Re:Introducing Bing Code Search for C# by mercurial on Tuesday February 18, 2014 @09:02AM (#7258109)
> Integrated debugging (with edit+continue while debugging)

That's the main reason to use an IDE, in my mind, along with the ability to display the call sites of a function.

> integrated version control interface,

Never noticed any advantage compared to a shell with git or git-svn, personally.

> integrated build system

Depends what you mean by that. What's precious is the ability to detect errors before doing a build or testing anything. "Integrated build systems" in general I find often fall flat on their face when something outside of the IDE touches the files.

Re:Introducing Bing Code Search for C# by mattmanser on Tuesday February 18, 2014 @09:12AM (#7258158)
The text editor is by and far the most important part of the IDE and is the only part everyone will use.

It's also the thing that's most important to flow, to producing, not navigating or testing.

That it can pause and stutter when you're just trying to do a simple edit is pretty silly.

I love VS and it's one of the things I always miss whenever using something else, but there's a lot of annoyances and a lot of sub-par features and some you should never use features.

I notice you said "integrated version control interface", if you're talking about TFS, it's terrible. Stop using it. The interface is terrible, all generic tables that you can't tell apart. It's a massive effort to see file changes. And worse than all of that, the actual version control system is shockingly bad, even compared to SVN, let alone Git. You're a madman to be using TFS, it's so bad.

Re:Introducing Bing Code Search for C# by mercurial on Tuesday February 18, 2014 @06:22AM (#7257534)
I'm curious. What do you find so great about Visual Studio? After working with it for a while, I came to the conclusion that while it's extremely fast, it's not particularly full-featured compared to Eclipse. The amount of refactoring you can do out of the box is minimal, and the search is ridiculously crippled.

I haven't lived with it long enough to find out if it's as easy to break as Eclipse when you install the wrong combination of plugins, though. Oddly enough, its vim emulator plugin is much better than what I found for Eclipse, which I find quite ironic.

Re:Introducing Bing Code Search for C# by sz4kerto on Monday February 17, 2014 @04:58PM (#7254778)
That's not what people call lock-in. Then there's Javascript+Sublime lock-in, OCAML lock-in, Emacs lock-in...
Re:Introducing Bing Code Search for C# by spo81rty on Monday February 17, 2014 @06:50PM (#7255314)
Build a huge app in any language and you have technology lock in.
Re:Introducing Bing Code Search for C# by michaelmior on Monday February 17, 2014 @05:01PM (#7254798)
What about Mono? I have no idea how practical this is for real code bases, but I've used it successfully on several smaller projects.
Re:Introducing Bing Code Search for C# by Moto7451 on Monday February 17, 2014 @07:34PM (#7255521)
I have Mono projects in production. Xamarin Studio is pretty nice these days. I don't have a lot of performance sensitive .Net code so I don't notice any real difference between Microsoft's and Xamarin's implementations.

One problem I'm running into at the moment is I'm trying to port a vendor's reference SOAP Service over to Mono/Linux and their provided secret sauce DLL is blowing up when calling their objects' constructors. I'm yet to pin it on Linux or Mono. Here's hoping the vendor is Mono friendly and willing to debug it. If not we're going to have one oddball Windows server in a sea of Ubuntu EC2 instances.

Re:Introducing Bing Code Search for C# by itsboring on Monday February 17, 2014 @11:03PM (#7256293)
Same here, a number of Mono apps in production, both on mobile and desktop. A lot of my recent work has to do with OpenGL-related stuff running on Linux using Mono/MonoDevelop. I have had neither performance-related issues nor stability issues.

Ironically, we have some large-ish C# code-bases that run on everything but Windows.

Re:Introducing Bing Code Search for C# by LordIllidan on Tuesday February 18, 2014 @04:50AM (#7257265)
Personally, I find Xamarin Studio to be quite buggy, often needing several quit+restart a day (I do iPhone apps), a colleague also does Android apps with Xamarin (on Windows) and experiences similar problems.
Re:Introducing Bing Code Search for C# by gabriel on Monday February 17, 2014 @05:19PM (#7254912)
Mono is quite practical. However, C# is one thing, and the .NET Memory Model is quite another.

The memory model is, IMHO, where Microsoft is pushing the limits of the existing C# language.

Re:Introducing Bing Code Search for C# by tanzam75 on Monday February 17, 2014 @11:36PM (#7256407)
> The memory model is, IMHO, where Microsoft is pushing the limits of the existing C# language.

What has Microsoft changed in the .NET memory model that makes you think they're pushing the limits?

From what I can tell, the .NET memory model is one of the things that has changed the least. The languages have changed a lot faster than the memory model.

Re:Introducing Bing Code Search for C# by dewiz on Monday February 17, 2014 @07:52PM (#7255595)
could someone point to some article that expand on this topic ? thanks
Re:Introducing Bing Code Search for C# by matthewking on Monday February 17, 2014 @07:32PM (#7255508)
As far as IDE goes, Visual Studio Express is free and very capable: http://www.visualstudio.com/en-US/products/visual-studio-exp...
Re:Introducing Bing Code Search for C# by mrhyperpenguin on Monday February 17, 2014 @04:50PM (#7254720)
Students and businesses can get (and keep) the software for free through DreamSpark and BizSpark.
Re:Introducing Bing Code Search for C# by benologist on Monday February 17, 2014 @03:57PM (#7254440)
It's not very true that you're locked into anything anymore. See Mono, Xamarin, Sharpdevelop, etc.
Re:Introducing Bing Code Search for C# by kevinskii on Monday February 17, 2014 @04:46PM (#7254692)
We stopped using Mono after a few months. With .NET's Task Parallel Libraries we saw an enormous performance difference between Mono/Redhat vs. .NET/Windows, with the latter often running many times faster. Tuning the GC and heap size didn't make much of a difference.

.NET seems to be well worth the cost of running Windows, but the consequent platform and vendor lock-in is still a concern for us.

Re:Introducing Bing Code Search for C# by kevingadd on Monday February 17, 2014 @07:27PM (#7255479)
Mono's parallel implementation is really bad, yes. I've had similar problems with it (despite the fact that the Mono SGen GC is usually pretty decent at keeping up)

Maybe you should contribute a better one. ;)

Re:Introducing Bing Code Search for C# by gisenberg on Monday February 17, 2014 @04:43PM (#7254677)
That's an optimistic world view.

Getting a web app built on .NET/MVC4/IIS running on mono isn't a trivial endeavor, and the open source implementations rightfully tend to lag behind the closed implementations.

Re:Introducing Bing Code Search for C# by Pacabel on Monday February 17, 2014 @05:04PM (#7254820)
What you're saying is only true for perhaps the simplest "Hello World!"-level apps. Much beyond that and it just isn't trivial to use those alternative tools effectively, even when you're specifically targeting them and not actual .NET.
Re:Introducing Bing Code Search for C# by kevingadd on Monday February 17, 2014 @07:29PM (#7255487)
I've deployed fairly large .NET applications to Mono with only trivial modifications. They behaved equivalently, even if Mono's garbage collector isn't as good.
Re:Introducing Bing Code Search for C# by benologist on Monday February 17, 2014 @08:46PM (#7255810)
My smaller experience only had problems within SqlDbType particularly with Date acting as strings and Structured not existing.
Re:Introducing Bing Code Search for C# by cliffcrosland on Monday February 17, 2014 @05:49PM (#7255052)
We have a C# asp.net MVC web app that we are transforming into a consumer of independent node.js and python web services. I must admit that I sometimes miss the static type refactoring tools visual studio offers when I'm wrestling with grep in node.js code, but my team really appreciates the open source tools and deployment options that come with the OSS territory.
Re:Introducing Bing Code Search for C# by stefantalpalaru on Monday February 17, 2014 @06:50PM (#7255315)
Have you considered Vala as an alternative? It has a similar syntax[1] to C# but no compatible libraries.

[1]: https://wiki.gnome.org/Projects/Vala/ValaForCSharpProgrammer...

Re:Introducing Bing Code Search for C# by pjmlp on Tuesday February 18, 2014 @07:13AM (#7257669)
Like any other commercial vendor I would say.
Re:Introducing Bing Code Search for C# by diminish on Monday February 17, 2014 @04:05PM (#7254486)
Moreover, their business unit's licensing/pricing team are chasing your code forever to suck more margins from its use.

While developing with MS technologies, you must accompany any code, tests and documentation with a "My License" folder with "licensing.cs" files to calculate, the implied licensing costs of each piece of code you develop along with all required MS components down to the metal. Finally, you must make sure the relevant "My License/licXX.cs" gets updated with changing licensing policies.

Next to your developers, designers you must staff an MS certified licensing specialist, or for larger projects a License team with a director level position to analyze, plan, design, test, negotiate and pay licensing costs.

Re:Introducing Bing Code Search for C# by WickyNilliams on Monday February 17, 2014 @04:26PM (#7254599)
Having worked on many enterprise .NET projects I can assure you this is not true, at least in the general case. Licensing is definitely a complex beast but I have never heard of, or followed, this requirement
Re:Introducing Bing Code Search for C# by codelap on Monday February 17, 2014 @04:50PM (#7254716)
Yea, this is complete bollocks. Not a word of it is true. You may have a shitty thing in your corp that forced you to do this, but that has nothing to do with Microsoft.
Re:Introducing Bing Code Search for C# by yulaow on Monday February 17, 2014 @04:10PM (#7254519)
I never ever ever read anything about it. Can you link some information related? Because googling it I can't find anything
Re:Introducing Bing Code Search for C# by alkonaut on Monday February 17, 2014 @04:58PM (#7254774)
This is satire. Calm down.
Re:Introducing Bing Code Search for C# by diminish on Monday February 17, 2014 @05:12PM (#7254870)
thanks for getting the satire :-) few years back i used to work for mankind's largest IT project leading a C# team to develop certain missing parts. Licensing implications for each piece of idea were so immense, we needed to keep architectural decision inline with licensing plans.