Hacker News new | past | comments | ask | show | jobs | submit login
Introducing Visual Studio’s Emulator for Android (msdn.com)
288 points by AaronFriel on Nov 12, 2014 | hide | past | favorite | 102 comments



This is a great time to reiterate that startups receive Microsoft's software for free, obviously including all versions of Visual Studio.

Check out BizSpark.com or get in touch with me if you happen to be a YC company (felix.rieseberg@microsoft.com).


You mean they receive Microsoft's software for free for 3 years, after which they get a discounted price for 2 years as an "alumni", after which they have to pay full price now they are fully on your stack and have large switching costs.

I'm not buying that Trojan horse.


If you're starting a business, "what will our operating costs be in 3-5 years?" is just about the last thing you should be worried about. In fact, I'd guess that most new business owners would love to end up facing that problem. I certainly would. Plus, it's not like they gouge you after 5 years; Microsoft has a strong incentive to keep its products/services competitively priced. I'm far from a Microsoft fan, but I fail to see how BizSpark is anything but a huge boon to the startup/small business community.


As someone who has started a business, that's insane. Of course you should worry about what your operating costs will be in 3-5 years.

If you don't need to swallow a potential poison pill that could seriously impact your maneuverability at a critical juncture (yes, that includes 3-5 years in), WHY would you?


Depends what kind of business. If you're a rapid growing startup then I imagine you expect your company to have been bought long before 3-5 years.


And 9/10 times, you'll be a crater in the ground instead.


>> what will our operating costs be in 3-5 years?

That is exactly what you need to be thinking about. As much money as Microsoft makes on consumers backs and then they lay these traps for would be small business developers. There's a reason why rich people try to avoid paying for their lunch.


Yes, you should be thinking 3-5 years ahead. And if you're thinking that far ahead, you'll amortize the free 3 years with the 2 years after in which you pay and come out with a true cost. You might even work in the odds that you'll be in business and/or have sold out in that time along with some estimate of switching costs to other technology (which might actually be low if you mainly use Azure).

I don't know if it still comes out as worth it, but that's what you have to figure out. A kneejerk "I'll be paying for this in 3 years so I shouldn't take advantage of it being free now" isn't exactly the most rational response either.


I get the general feeling, but VS licenses are not what going to cause your startup to go bankrupt. People's salaries are an order of magnitude bigger, to say the least.


> I fail to see how BizSpark is anything but a huge boon to the startup/small business community.

For starters, it encourages a bad habit: using the Microsoft stack and deploying on Windows.

Unless you are significantly more productive by using this toolset, I'd advise against it. Having said that, most startups fail, so, chances are using Windows will not be a problem 3-5 years down the road.


>a bad habit: using the Microsoft stack and deploying on Windows

this is not "a bad habit"


Seems like it is on HN, just like basically everything else that isn't open source.


> For starters, it encourages a bad habit: using the Microsoft stack and deploying on Windows.

Or, you know, just using the Azure portion of the program and deploying in any language with any database implementation to linux VMs with docker.


Like I said, more often than not the problems that may appear if the BizSpark-powered startup succeeds will never happen, because most startups don't.


Aren't all three bad choices?

- Windows: proprietary, hard(ish?) to scale. BizSpark.

- Linux: Finicky, spend time & money getting it working right. Scales well.

- Apple: Expensive. Nice.

I'm not a startup guy, but I can easily picture a world in which Apple is chosen by the massively-funded, Linux is chosen by the scaling-is-our-business-model, and Windows is chosen by the get-off-the-ground-first lean (curiously enough) thanks to BizSpark.

FWIW my terminal is Windows, and my datacenter is *nix.


Windows isn't particularly more difficult to scale than Linux. A lot of tooling that you would use to scale in Linux is also available in Windows. The cost of such scaling either horizontally or vertically is another issue altogether.

I actually like a lot of things when it comes to windows, and dislike a lot with Linux. That said, I'm still targeting Linux for next-generation app development... When you need to have 3-5 servers for your data and application layers, the price of MS's stack is a bigger difference here.

It really depends on your situation though.. if you have a need for small LOB apps, or even a SaaS that can work in Azure deployments, using BizSpark and sticking to MS isn't a bad option.

Apple may be used by the developers, but depending on your business need, you really aren't deploying to apple servers.


> - Linux: Finicky, spend time & money getting it working right....

Not if you know what you are doing. I find it easier, cheaper and faster to deploy Linux applications than it is to boot a Windows server, apply updates, secure it and install your application (and keep it updated). I know it can all be done - and automated to a large extent - with Microsoft admin tools, but it still takes longer than spinning up a new Debian, Ubuntu or CentOS server and doing the same steps. The ecosystem is just not there. And since you don't need to worry about licensing costs, you can deploy as many machines as you need and make them role-specific, lighter and individually simpler.

> - Apple: Expensive. Nice.

Expensive is relative. My previous MacBook was still solid after five years. No Lenovo/Dell/HP has that kind of build quality at a lower price and the ones that have that build are uglier and more expensive than their Apple counterparts. I agree if you need a fingerprint or smartcard reader, you can't go with Apple, but those are specific needs. Spreading the cost of a Mac over its useful life makes it look more attractive than a PC. Plus, it has a very developer-friendly OS if you are not developing for Windows.

Also, Apple makes desktop machines. My comment was mostly about BizSpark's server side.


there's a Starcraft analogy in there somewhere


This keeps coming up, so let me make this super clear: While access to the download expires after three years, all software downloaded up to that point remains your property, including the licenses.

Even for the exception, Windows Server, you'll get four production licenses as a farewell gift. Given that StackOverflow runs on 25 Windows Servers, this can't be a bad deal.


Isn't that information made clear up front so that a company can make an informed decision?

Maybe it'd be an apt comparison if the Trojan's put a big sign on the front saying:

"Acceptance of this horse constitutes acceptance of a (up till now) secret invasion"


Now the community IDE will be free as long as your team is <5. So the "risk" here is a startup surviving 3 years and being more than 5 employees? At that point I'd say the cost of buying some IDE:s is pretty small. If going with this platform makes the team just a few percent more productive then it's probably worth it.

The "stack" doesn't cost anything extra as long as you don't do something silly like host on your own windows server machines, or use sql server.


VS Pro with MSDN is under $1000 (the bare tool's much less) - if your engineers are 1% more efficient using VS rather than whatever the alternative is, then it's paid for.


Developing for Android, the likelihood is actually they will be less efficient. Generally when developing for a target use the same tools that most people use for it; the probability of someone having encountered the your particular problems and already solved them for you on StackOverflow is so much higher.


Microsoft prices are discussed all the time in HN, but they are actually quite competitive.

Yes, in the age of open source it is great to build business using software for free[1].

However, when I compare with other commercial players that you need to call for prices, Microsoft is quite good.

[1] Assuming engineers' salary spent on support doesn't count.


Oh only 3 years of free software and services... Nobody should want that...


Well, if the other option is a lifetime of free software...


As everyone likes to point out, Linux is free as in speech, not free as in beer. There's a reason many people shell out money to the likes of Red Hat when they run their business on libre software.


Sure, people pay for support where they need it. If you've got a critical box, it's probably a good idea.


My understanding is that the software is not free, but that you have to pay license fees down the line, if your company is successful.

Is that not true?


No. After BizSpark expires you get to keep all the software licenses for free forever.


It used to be worded like this, but not quite any longer. Now you get to keep a 'standard configuration' of licenses free forever, but if you have 100 instances of SQL Server Enterprise or whatever, they 'probably' won't all be free.

I have to use scare quotes because at that point it's a negotiation between you and Microsoft, and they have no obligation to grant you all those licenses, but they just might I suppose.


I believe the thinking is that if your business is still around after the 3 years of free licenses, it is successful enough to afford to pay for licenses from that point forward.


That's still about on par with wireless carrier definitions of "unlimited" -- not a good trend to set. Don't use the word free unless its truly cost-free.


It is free. For three years.

Free is not so rigorous a word it can only be applied to things which are free in perpetuity.


Most importantly it is free for 3 years without any obligation to ever pay anything. It is clearly intended to convince you to choose to pay in the future, but it is still free.


Don't forget the 60k USD/yr hosting credit on Azure at 40% off list prices - aka $84k of free hosting on Azure which can be spent however you need to in the technologies that you feel most comfortable with. No need to develop in C# and deploy on Windows - you can equally go the Ruby/NodeJS/GO + Docker route using linux.


I've only slightly dabbled in Android development: installing the SDK, IDE, build a "hello world", and run in an emulator. I've done a bit of old-school mobile development (Symbian, WinMobile) and I was very surprised how poor the emulation experience was for Android.

It looks like Microsoft might have a better Android emulation workflow than Google. What strange times!


You should realise that Android apps aren't like traditional apps. Regular apps including those for iOS have a single entry point (main or similar). An Android application is closer to a mashup. There is no main. Your manifest declares the various components provided, and a normal Android app combines both them and external ones together to provide whatever it is you intend for the user.

For iOS Apple provides a simulator where your app is compiled against substantially similar APIs provided by the Mac host. That provides quick startup, debugging etc as iOS apps are islands. For Android a majority of the system has to be provided because your code could be inter-operating with numerous other components, hence the emulator approach they took.


There's nothing stopping Google from making HAXE work properly (it allegedly does now, but it practically does not) or just shipping genymotion, asides from they don't care enough to do so.


Microsoft has, consistently, supported developers better than almost any other ecosystem. It's a walled garden, but it's well-kempt.


Besides recent problems like poor C++11 support, MS in the past has pulled support for proprietary languages leaving mission critical code in limbo. Recal the death of VB6.


Yeah, you know, if they wanted to support developers better, they would have turned Windows into a Unix, they would have made Visual Studio cross-platform, or at the very least they would have fixed that goddamn cmd.exe, which is like the worst CLI ever and they would have cared about web standards. I also find Visual Studio to be worse than IntelliJ IDEA (at least without IntelliJ Resharper that is) and in the past every time I did anything with .NET I was baffled to find out that I do not have access to source with one click, or that .NET doesn't have anything like Maven.

At least now they are open-sourcing the CLR, the core library, ASP.NET, are making .NET cross-platform and made progress on the tooling, like with NuGet (still not close to what Maven does, but it's something). So I'm ready to forgive and forget, but lets not go overboard - only 2 years ago .NET and Windows felt like going back to 1998 ;-)


So, if you're still using cmd instead of PowerShell (which we are, sigh...), you deserve the misery.

Why would turning Windows into a Unix have helped anyone? Pike and Plan9 tried to save Unix better then ten years ago, and nobody gave a shit.

Also, why do you even want something like Maven? That's like bitching that Windows doesn't have autotools--or was that next on your list of complaints?

Tell me about how the MSDN is less helpful than man pages. Tell me about how the Windows API is worse documented and more poorly designed than POSIX (lol). Tell me about how executables compiled on one Windows machine don't transport to other Windows machines easily.

I'll stand by my statement, thank you very much.


> if you're still using cmd instead of PowerShell

PowerShell is a shell, not a CLI, one starts PowerShell inside cmd.exe.

> Why would turning Windows into a Unix have helped anyone?

It helped OS X ;-)

> Also, why do you even want something like Maven?

Because you have to rely on Visual Studio for automating your build, testing and deployment process, it it's not doing a good job and again, is like going back to the nineties.

> Tell me about how the MSDN is less helpful than man pages.

Well, MSDN isn't competing with man pages, but with readily available source-code at the click of a button and with libraries documented like this one is - http://akka.io/

> Tell me about how executables compiled on one Windows machine don't transport to other Windows machines easily.

Never had a problem with OS X. And on Linux, people automate the shit out of the build process so it isn't much of a problem, hence the need for tools ;-)


One does not, in fact, start Powershell from inside cmd.

"It helped OS X ;-)"

Have you seen what they were coming from? Apple is a fucking joke when it comes to systems and software engineering--it's their industrial design and UX that everyone loves.

"rely on Visual Studio for automating your build"

msbuild.exe and PowerShell.

"It's not doing a good job" compared to what, exactly? It's super easy to set up compiler options in C/C++ on MSVC, pretty easy to add other things. You'd prefer makefiles?

"available source-code at the click of a button"

because when we're hacking we want to stop and read somebody else's code instead of, you know, just using a cleanly documented API.

"And on Linux, people automate the shit out of the build process so it isn't much of a problem"

bahahahahahha

hahahahaa

haha

(no)

~

It seems like you're trolling or you've never worked on a project outside of your bubble.


> One does not, in fact, start Powershell from inside cmd

I'm talking about the Command Prompt, that window with which you get access to a shell. I really don't know what you're talking about.

> Apple is a fucking joke when it comes to systems and software engineering

That's not an argument I can reply to.

> msbuild.exe and PowerShell

MsBuild.exe is Ant. PowerShell is, well, a shell language. This combination is not a substitute for Maven, hence my argument that it felt like going back to the nineties.

> You'd prefer makefiles?

No, I'd prefer something like Maven.

> Because when we're hacking we want to stop and read somebody else's code

Yes, precisely.

> It seems like you're trolling or you've never worked on a project outside of your bubble.

Note that I never resorted to ad-hominems. That's very unprofessional and very unlike the HN attitude. Chill.

And if you do feel the need for personal attacks, I'm also public about my identity, it's not much, but here you have my resume and my GitHub profile, no need to guess - https://www.bionicspirit.com/pages/about.html


> I'm talking about the Command Prompt, that window with which you get access to a shell.

You mean "a console window". Command Prompt is the name of the baked-in shortcut which starts cmd.exe in a console window.


It helped OS X ;-)

OS X benefited from the labor savings of forking somebody else's existing project, dramatically reducing cost & time compared to a) continuing to support OS9 b) starting from scratch.

The technical nature of its status as a Unix derivative is, to my knowledge, basically nothing to do with its current market success.

The Navy's practice of stripping old ships and building a new ship with the old hull comes to mind.



Anybody that ever edited a MSBuild file without Visual Studio, step forward.


Hello. Do you have any questions about the process? I used emacs (MSBuild files are just ordinary XML) but some of the people I was working with used - I think - Notepad++.

(The entire process in question ran outside Visual Studio - it was a hellish mix of PowerShell, batch files, MSBuild, C++ tools and C# tools. Somebody had even implemented a getopt-type affair, using the batch commands, so the batch files all responded to /? and everything. May I never see its like again.)


That would be almost anyone who's automated a build for, say, a CI server.

I also use it to compile outside of VS, because 1) it's often quicker on large solutions and 2) it mirrors the CI build (sometimes VS is too smart and papers over issues).


tentatively raises hand - jokes aside, I have, an I know that the produc I was working on involved supporting a custom build target - we maintained te XML files by hand.


Hi, I do this often. MSBuild is actually very good.

That being said, the new stuff coming with ASP.NET 5.0 (vNext), where the build is a simplified JSON file is interesting


That would be me, and I vastly prefer it to maven scripts. Once written you can then basically forget about it. All I do now is type:

msbuild build.msbuild and I get full-rebuilds of 32-bit and 64-bit executables, tests run, and upon success, everything packaged up in an installer and ready for deployment.


I have too. I find it a great tool once I understood it.


I used to complain about Maven but in the past couple of years it has made some significant usability improvements especially with regards to Eclipse projects.


> I also find Visual Studio to be worse than IntelliJ IDEA

I guess it's personal opinion...but I can't imagine how or why you would think this. Unless you enjoy long GC pauses in the middle of writing code?


I've never experienced a (noticeable) GC pause while working in IntelliJ, despite working on some very large projects.

That said, if this is a problem, you can tune the VM's memory options. There's even a "MaxGCPauseMillis" option: http://stackoverflow.com/questions/4676604/how-to-improve-in...

Or even better, submit a CPU snapshot to JetBrains so they can fix the problem: https://intellij-support.jetbrains.com/entries/29983118-Repo...


These aren't too uncommon, even with smaller codebases (<1 million SLOC). I've seen it on my Linux box and my Macbook. I tend to leave IntelliJ open for a long time, which may or may not be related.

I still love the IDE, but this is my one big gripe. Maybe they'll fix it with the next big platform update.


IntelliJ is an excellent IDE. I've used it off and on for a decade. I can't ever recall it going into a long GC pause.


>It looks like Microsoft might have a better Android emulation workflow than Google. What strange times!

Sure but keep in mind that Google has to produce an emulator that emulates ARM, MIPS and x86 and all of that has to work on Windows, Linux and Mac. Significantly different and tougher challenge!


Sounds like qemu


The Android emulator is qemu based - and it is hard to get qemu to emulate fast without acceleration on all OSes.


I can't think of reasons for not accelerating it for development purposes.


Android apps are Java based. Google does not need to do what you just said.


Yes it does. Android includes the NDK as well as the SDK for writing native code (C, C++, etc.) which gives you ARM, etc. specific libraries you package in your app. Although it is pretty popular for people to drop Intel's lib houdini into faster x86 emulators like Genymotion to let them still use ARM games and Google Play Services.


Android's NDK supports much more than just Java


True but the vast majority of Android developers don't need to use NDK. Additionally the native part can run as x86 code. It doesn't need to be emulated.


This isn't true, as anybody who sees bugs on the iPhone that don't show up on the Simulator will be happy to tell you. You test on an emulator when you have the option because it's the hardware you're actually deploying against.

And, again, Android does not run Java and characterizing it as such is ignorance of the environment involved.


... and the hardware can vary greatly from chipset to chipset and from phone to phone. There are a number of drivers that work directly with the underlying chip and hardware. You can never emulate that.

The actual CPU (ARM, x86) is a small part of the overall emulation equation and almost inconsequential to uncovering these bugs you talk about. There will be bugs that will exist solely on the hardware. You can't replicate it unless you are fully replicating that hardware, with those system level drivers.

IMHO, In the context of the app development what Apple did is the better way in this case.


Running under ARM emulation the Android emulator is unusable, IMO.

However, if you run x86 images and enable Intel's hardware extensions and CPU acceleration it's perfectly usable. Still not as nice as the iOS emulator but it's good enough to get the job done.


Visual Studio had always been what I perceive to be the most polished work environment (IDE) i've used. Despite that I have moved away from Microsoft and into Linux based environments over the past couple years. The thought of working out of Visual Studio for all of my Android, Node.js and .NET projects is very tempting.

I however didn't see any mention for Maven / Gradle support, and my latest VS is 2012. Anyone here with some insight into dependency management outside of NuGet?

Sometimes I have nightmares of updating Newtonsoft.Json (https://www.nuget.org/packages/Newtonsoft.Json/) and chasing down all of the version conflicts for the next several days.


Android and iOS development in VS will be done via Xamarin, Cordova, or C++. That's why you don't see Maven or Gradle support anywhere, there's no Java involved.


So no native android development? Or am I wrong thinking these options are not native.


It depends on your definition of native. Xamarin lets you use all the native Android APIs, but you're using them via bindings in C# or F# instead of Java.


Yes and no. Xamarin does some binding to the native APIs but you are going to code in C#. Even if it is your favorite language in the world, I don't think that Xamarin is a good platform to develop non-trivial apps.

If you need to develop something relatively simple on multiple platforms, Xamarin is a good way to do it once on iOS & Android.


The C++ and Xamarin stuff is native. Take a look at Xamarin.Forms. It looks very nice.


When we built the WP7 emulator (not really an emulator because that implies cpu emulation) we chose to make it x86 based, using virtual machine tech. We could do this and get great performance because all 3rd party apps used managed CLR code and thus were processor independent.

Later the WP8 emulator was actually fully based on Hyper-v and this is too...meaning it is "just" a vm running x86 android, which explains why it's so fast.


The Hyper-V requirement is kind of a pain - or rather, the requirements to run Hyper-V are a pain. On non-server versions of Windows, it's only available on Windows 8+ Pro / Enterprise. So anyone with Windows 7 or non-Pro Windows 8 can't run it.

I've been to a few Windows Phone developer camps and this is always an issue for attendees.


Does anyone know what kind of development for Android does VS offer? I guess it's not java, and I'm not familiar with options


From the article:

  With Visual Studio 2015 Preview you can target Android and edit-compile-debug regardless
  of your choice of programming models:

  JavaScript (or TypeScript) with Cordova, C++, or C# with Xamarin.


I wonder how much effort it would be to support C# as well, without Xamarin. Would they ever do that? Or would they prefer to not hurt Xamarin (or maybe Google/Apple) too much by offering their own C# crossplatform development?


I don't see what they would gain from a separate initiative when Xamarin has done all that work. They're "partnered", after all.


any famous apps done with cordova?



Wikipedia's app used to be. Not sure if that's the app they still run across all the platforms though. https://github.com/wikimedia/WikipediaMobile


Thanks! I must've missed it


Xamarin. It is a good solution in order to make a small applications (let's say a showcase/order app for a small restaurant) on iOS and Android at the same time.

For more ambitious apps, IMO the overhead will never be worth it.


Right now it is x86 Android only, not ARM, which is the vast majority of Android devices:

"You need to recompile your code for x86. If you have parts of your code that can only be compiled for ARM, or you depend on 3rd-party libraries for which you do not have an x86 version, your code will not run on our emulator at this point."


I believe those are the same limitations as on the x86 emulator provided by Google/Intel.


How does it compare to Genymotion? It would be much more interesting comparison than stock emulator.


One difference is that it probably doesn't include adware/malware.


I hadn't heard of Genymotion having adware/malware previously. Would you mind linking a source?


This looks fantastic - Google's emulator offering has always been so poor that I turned to Genymotion. The only shame is that we won't see the same for iOS, given that the simulator requires OS X.


This is great, the main thing really keeping me from Android development is the Emulators. I'm going to try this out. I love Visual Studio, never thought I'd get to do Android development on it, I wish Visual Studio for Ubuntu / Mac would come next though, but this is good enough for me!


So Microsoft is able to provide a better Android emulator than Google itself.

I really wonder who is developing Android at Google, when I look at the emulator, open bugs in the SDK or NDK support.

I guess spending resources moving from Eclipse to Android Studio and still not there, after one year is more important.


Its great news, but I think it will take some time before the developers that grew up thinking of MSoft as a closed shop will slowly change their minds. A few "wow" open source releases will really help shift this mindset.


Such amazingly convenient timing. I just picked up my droid app I paused on working on. Definitely going to give this a shot. Thanks for posting!

Microsoft is so hot right now!


This is incredible, perfect for xamarin or phonegag. Cant wait to use it


This is a great time to reiterate that startups receive Microsoft's software for free, obviously it's a trap and you should not be hooked to Microsoft technology if you want to iterate quickly.


"hooked to Microsoft technology if you want to iterate quickly."

Why the hatchet comment? What basis do you have for saying this?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: