TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why I stuck with Windows for 6 years while developing Discourse

100 点作者 sams99大约 6 年前

23 条评论

jacobsenscott大约 6 年前
Having used windows for several years, linux for several years, and currently macos for several years (because that&#x27;s what work gave me) - linux is by far the most stable and easiest to manage OS, after you get past the initial learning curve. The main reason is you can actually fix problems. You pretty much know why every single bit of software is there for and how to configure it. You google the problem and someone has released a patch, or instructions on what configuration changes need to be made. Or you can roll back to old versions of software easily.<p>Also you are a hero because you catch and fix production problems nobody else sees or understands because production is running linux.<p>If you have a problem on OSX you just get 500 people telling you to reset your pram, and really you just need to wait for the next osx update. You certainly can&#x27;t rollback an osx update. Nobody knows whats wrong because nobody has access to the code. Even if you did - each update is millions of lines of code. It is crazy town.<p>Same for windows except there is not pram to reset. You just reboot until the next update I guess.
评论 #19540509 未加载
评论 #19544305 未加载
评论 #19540525 未加载
评论 #19540858 未加载
评论 #19542646 未加载
评论 #19543361 未加载
评论 #19541830 未加载
评论 #19540432 未加载
评论 #19540474 未加载
评论 #19540462 未加载
mastazi大约 6 年前
I&#x27;ve used Linux as my main desktop OS for about 3 years, from around 2010 to around 2013 (so maybe some things changed in the meantime).<p>The article says that you pay a &quot;VM tax&quot; by running in a Linux VM in Windows or by using WSL, but by using Linux directly you end up &quot;paying&quot; in other areas, for example in terms of less-than-perfect drivers (which leads to problems such as worse battery life, worse graphical performance etc). In an ideal world, laptop and GPU makers would put as much effort developing Linux drivers as they do when they create Windows drivers, but unfortunately this is not the case.<p>Another point is that, even if you are running Linux on your dev machine, it is often challenging to have a local environment that is as close as possible to your production one; for example where I work we have Ubuntu 16.04, Ubuntu 18.04 and CentOS (and with various combinations of installed packages), even if I was using a Linux laptop, I would still need containers to get all the different environments right. The only case where you could use no containers at all is if you had all of your servers running the exactly the same environment.<p>Finally there is the issue of some pieces of software not being available for Linux, 95% of the times you can find a Linux equivalent that works for you but, in my experience, there were still rare cases where I had to resort to Wine or some Win VM just to run some specific tool that was needed to do my job.<p>PS My job, at the time I was using Linux as my main desktop OS, and during the couple of years after I switched back to Windows, was about PHP, Python and Java web apps deployed on Linux servers, so my comments above should be taken in this context. Maybe in other fields of software development there are different factors to take into account.<p>PPS I have also tried MacOS, on the one hand it&#x27;s great that Mac is UNIX, but on the other hand it&#x27;s not Linux so, if you want to closely replicate your production Linux environment, you will still need VMs or containers.
评论 #19540320 未加载
评论 #19540301 未加载
评论 #19540265 未加载
评论 #19540481 未加载
nickjj大约 6 年前
WSL isn&#x27;t too bad nowadays. I would go as far as saying it&#x27;s very good. I&#x27;ve been using it for full time development for over a year now.<p>I&#x27;ve run 100,000+ line Rails apps in WSL (well technically through Docker, which I connect to through WSL) and I never noticed a slowdown that was bad enough to make me think &quot;this sucks&quot;. It&#x27;s always been pretty good. I run all sorts of Rails, Flask, Phoenix and Webpack driven apps and all of them run fast enough where I don&#x27;t think twice about it.<p>Personally, I find the WSL set up somewhat close to native Linux in terms of the user experience. I&#x27;m not talking about I&#x2F;O performance, but I mean how it feels to use the OS in general.<p>For example:<p>I spend 99% of my time in a WSL terminal using tmux + terminal Vim + ranger. So that takes care of coding and managing files.<p>Then I use a browser and other graphical apps (image &#x2F; video editors) that run directly in Windows.<p>Dexpot sets up virtual screens with key binds that are comparable to how i3wm lets you switch and move windows to another screen.<p>Keypirinha lets you launch apps with a fuzzy finder (like dmenu but better IMO)<p>AutoHotkey lets you easily manage global hotkeys (just like i3 does) and more<p>When you put all of that together, you get a really really good development experience that also doubles for gaming and running programs that don&#x27;t have a good alternative on Linux (such as Camtasia on Windows).<p>Then for the icing on the cake, since you&#x27;re running Ubuntu 18.04 in WSL, you can provision WSL itself with the same exact configuration management scripts you would use to provision a production box. For me specifically I run all of the same Ansible roles against WSL that I do in production. I can set the whole thing up with 1 Ansible command. Plus my dotfiles also happen to work exactly how they do on my native Linux laptop so it&#x27;s easy to keep things in sync and feeling the same.<p>This all runs from a i5 3.2ghz &#x2F; 16GB of RAM &#x2F; SSD &#x2F; etc. $750 desktop built 5 years ago.<p>Even if Apple tax didn&#x27;t exist I would still use this Windows &#x2F; WSL set up if I weren&#x27;t in a position where I could run Linux natively.
StillBored大约 6 年前
? What I see when I look at that benchmark is a comparison between linux running in a VM, via WSL and natively.<p>AKA, VMs are slower than bare metal. News at 10.<p>Sure there are things windows tends to be slower at, but similarly there are things linux tends to be slower at. For general desktop usage I think you will find two things, windows does quite well, and desktop level virtualization tends to be slower than server virtualization because most desktop users will be using a virtio&#x2F;emulation IO access method vs servers which tend to be punching PCIe adapters into the VMs. Either way, the overhead of additional translation layers and VM exits for various things is always going to be worse than just running on bare metal. Wether that works out to barely noticeable for compute heavy benchmarks that are TLB friendly, 2x for small packet edge case IO&#x27;s, or somewhere in between is completely application dependent.
评论 #19540175 未加载
评论 #19540384 未加载
pixelmonkey大约 6 年前
If you run Linux on vanilla Intel ultrabook or Intel desktop&#x2F;server hardware, it is not only blazing fast, but all the hardware works out of the box, too.<p>I wrote about this in the context of Lenovo X1C laptop here:<p><a href="http:&#x2F;&#x2F;amontalenti.com&#x2F;2017&#x2F;09&#x2F;01&#x2F;lenovo-linux" rel="nofollow">http:&#x2F;&#x2F;amontalenti.com&#x2F;2017&#x2F;09&#x2F;01&#x2F;lenovo-linux</a><p>I also recently built a Linux desktop from ~$950 of commodity parts (including a pair of free GPUs a crypto friend donated to me after his startup died). I use it as a devserver and a GPU rig for playing with CUDA, PyTorch, and TensorFlow.<p>Aside from the requirement of proprietary Nvidia drivers, this whole box works perfectly in Linux too, is blazing fast, and operates silently and with low power consumption. (The case itself is bulky, but it’s stationary.) I think an equivalent Mac would cost a 2-3x multiple and run less well for developer workloads.<p><a href="https:&#x2F;&#x2F;pcpartpicker.com&#x2F;user&#x2F;amontalenti&#x2F;saved&#x2F;r4rLJx" rel="nofollow">https:&#x2F;&#x2F;pcpartpicker.com&#x2F;user&#x2F;amontalenti&#x2F;saved&#x2F;r4rLJx</a><p>Say what you will about Linux, but if you choose your hardware carefully, it truly does “just work” these days. And you can’t beat having access to scriptable everything and source code everywhere. That said, I keep a Mac Mini around because there is some proprietary stuff you can’t avoid in the Apple ecosystem (e.g. XCode for iOS, Safari Debugger, Keynote&#x2F;Pages, ...)
underwater大约 6 年前
If the time taken to run the test suite is <i>so</i> critical, then how is the &quot;winning&quot; result of 7m55s any better?<p>In my experience any multi-minute operation invites a context switch or coffee break, and end up being roughly equivalent in practice.
评论 #19540305 未加载
评论 #19540448 未加载
snarfy大约 6 年前
In the late 90s I installed Slackware on a 386DX 40mhz with kernel 1.2.8, XFree86, elvis vi clone, etc. I&#x27;ve been using Linux for a long time, on and off as my main desktop. I have various Linux machines around the house, but it&#x27;s not my main desktop today.<p>There&#x27;s too much fiddling around to get it working right as a desktop. Audio has always been a ghetto. Wifi drivers are still binary blobs. Fonts, hidpi, multi monitor support, wayland, systemd are all still issues today. I really don&#x27;t want my development machine to match production. Production is a stripped down image for a reason. I spend far more time writing code than running it, so the VM performance hit is a moot point.<p>To be fair, Windows 10 has plenty of issues of its own that need tweaking, like having the only way to disable cortana is through group policy edits. And then they reenable it on the next update, and give me some candy crush ads in my start menu. It&#x27;s pretty infuriating, but still less so than manually fixing wifi drivers through USB boot drives.
NightlyDev大约 6 年前
I&#x27;ve been using Linux as my main OS for over 10 years now, mainly Ubuntu.<p>The best part is the performance and a realistic bare metal environment. You can profile code and actually trust the results. You can&#x27;t say the same for virtualizarion, containers or other platforms.
robocat大约 6 年前
It is unfortunate that there is no comparison against an Ubuntu host with an Ubuntu guest.<p>&quot;I was paying a pretty high tax for deciding to stick with Windows” was likely &quot;I was paying a pretty high tax for deciding to use a VM”.<p>I have little love for Windows, but I would prefer to see numbers that place the blame correctly.
评论 #19542654 未加载
评论 #19540826 未加载
评论 #19540482 未加载
ryan-allen大约 6 年前
&gt; Here I am freaking out about a measly 38% perf hit when I could be running stuff concurrently and probably be able to run our entire test suite in 2 minutes on my current machine on Windows in a VM.<p>I think this is the point, given you can get an inexpensive desktop CPU with 6 cores and 12 threads, it wouldn&#x27;t matter so much if you had a 20% perf tax with WSL when you have approx 12x the throughput.<p>You could always offload full test suites to an external CI box upon check-in and work with a subset of unit tests locally, once the suite becomes prohibitive for a single machine.
bluedino大约 6 年前
I love OS X, but it&#x27;s just &#x27;slow&#x27;. I have no problem admitting that.<p>It&#x27;s much better than it was in the PowerPC days, when (IMO) OS X was almost too slow to be usable. We have it good these days with faster graphics and 12-core CPU&#x27;s and super fast SSD&#x27;s...<p>But you give these same advantages to Windows&#x2F;Linux and OS X is just handily beaten in just about every benchmark you can think of.
impostir大约 6 年前
I have been using Linux as my daily driver for a little over 2 years and day to day, I haven&#x27;t had practically any problems. Every once in a while, I will mess with something and then things break, but I know I can fix it. Knowing I can find a fix to any day to day problem has become absolutely crucial to me; I can&#x27;t go back to chasing windows error codes.
rcarmo大约 6 年前
I’ve been doing an increasing amount of Node development in WSL, and the thing that helped me the most where it regards disk performance was adding an exclusion path to Windows Defender so that it wouldn’t constantly scan my WSL working tree.<p>Also, I get it that some kinds of testing “feel better” when done locally, but... why not have those run on a cloud VM?
pmontra大约 6 年前
Ruby has always been a nightmare on Windows. Every time a new junior freelance developer is onboarded in a Rails project everybody hopes he&#x27;s got a Mac or Linux laptop. A significant number of them uses Windows and we always suggest them to run a Linux VM. Some of them resist the suggestion. We make clear we&#x27;re not wasting time to support their environment (we&#x27;re deploying on Linux anyway) and that they are on their own. After not to much time they comply or leave. After months some of them could even buy a Mac or dual boot on Linux (Windows is good at videogames.)<p>Still, AFAIK VirtualBox has a problem with supporting multiple cores. Single core VM is heavily handicapped even for Ruby. Parallel testing was not in Rails but it&#x27;s definitely a thing.
评论 #19540935 未加载
ncmncm大约 6 年前
It never occurred to him to run Linux on his machine, for real work, and keep Windows in a VM for when he really needs it?<p>Surely someone, somewhere has explained that Windows runs faster in a VM than on bare metal, because Linux is better at file systems and buffer management? Or that relying on drivers from all over makes your system less reliable than the fixed set used in the VM?<p>Me, I cannot imagine running MSWindows on bare metal. It just feels wrong.
amanzi大约 6 年前
Curious to know why you were using VMware on Windows instead of Hyper-V? I would expect Hyper-V to be significantly faster than VMware.
评论 #19540455 未加载
评论 #19542599 未加载
评论 #19540872 未加载
evancox100大约 6 年前
Meanwhile, in ASIC&#x2F;hardware testing land, we&#x27;re lucky to get a regression suite done in under 24 hours.
mwcampbell大约 6 年前
I wonder how big a role Windows Defender, or other antivirus software, plays in the notorious inefficiency of reading and (especially) writing many small files on Windows. Sam, did you disable Windows Defender real-time protection, or add exceptions for it?
评论 #19540224 未加载
craz8大约 6 年前
I added parallel tests to our app last year. My 4 core&#x2F;8 thread system runs the tests pretty well with a process count of 6. The suite runs about 4 times faster, which makes a real difference<p>No need to wait for Rails 6 to get this boost
lazyjones大约 6 年前
Why do people run their server software on their desktop systems instead of, say, a proper server? Back in the days our desktop systems were VT102s, NCD X-Terminals or underpowered laptops and developing on the server through rsh&#x2F;ssh or even VNC was natural. Does Ruby somehow require locally running GUI processes?
评论 #19540425 未加载
评论 #19540458 未加载
评论 #19541148 未加载
xvilka大约 6 年前
By the way, is there something like Discourse but in Go?
评论 #19540365 未加载
评论 #19540217 未加载
评论 #19540340 未加载
0x8BADF00D大约 6 年前
VM will always be shit at compilation tasks. All of the existing solutions out there (including Docker) will lead to slower builds, especially if you need to build an embedded Linux distribution. Native is better, for those tasks.<p>The haters he’s replying to are literally splitting hairs.<p>Wow, they shave off 3 mins to run an interpreted language test suite. This is the ABSOLUTE state of the industry right now.
评论 #19540231 未加载
bgdnyxbjx大约 6 年前
This whole Twitter thread and blog post gave me real pause for ever wanting to work at Discourse.
评论 #19560568 未加载