News for hackers. Stuff that matters.
Re:Why I use old hardware by antoineMoPa on Wednesday January 23, 2019 @10:33AM (#18978996)
RAM? maybe for Visual Studio/Xcode/Android dev. But for any nodejs/ruby/php development, a 10 year old machine with 1GB RAM is perfect.
Re:Why I use old hardware by dijit on Wednesday January 23, 2019 @10:46AM (#18979152)
There are two things that cannot be true at the same time.

"Ram is cheap"

and:

"The maximum ram you can get is 8-16G"

Developers who are making electron applications (not that electron is the primary cause, it's just a correlation I see often) constantly consider that "ram is cheap" for their users and thus do not pay attention to memory consumption like they should.

This means that you're right in a way; vim is good enough for most people and a decent terminal emulator is going to cost you much less than 100mb of ram.

However; slack is consuming 2GiB on my machine, Skype for business is using 500MiB, Outlook @ 600MiB. I use safari and not chrome (safari is @800MiB with too many tabs open) but if I were using chrome I could be using many multiples of gigabytes.

If everyone thinks their program is worth 1GiB of ram or more then your machines become very limited in what can be backgrounded. You might as-well run Android/iOS if you're running with 1G of ram with todays application/web ecosystem.

The thing is; I am quite conservative with memory usage and I'm still quite sure I wouldn't be able to work on anything with 8GiB or less.

( I mean, I just checked and I'm using 15G of memory: https://i.imgur.com/xd6eB91.png )

Re:Why I use old hardware by carlmr on Wednesday January 23, 2019 @11:23AM (#18979602)
Electron is kind of the cause. You can program lean in Electron (see VSCode), but realistically the people that program JavaScript/TypeScript are usually not your CS pros. It's a language that everyone can get into easily, attracting very subpar developers as a result.

So it's not Electron, but it's what Electron enables.

Re:Why I use old hardware by schwartzworld on Wednesday January 23, 2019 @12:01PM (#18980017)
Electron has its place, which is allowing web developers to make 'native' apps without learning new technology. When you are downloading any free software built on Electron, realize that it likely started as a labor of love that the person decided to open source or make available for free.

That said, large companies using Electron is what I don't get. You can't expect me to believe Slack doesn't have the resources to create an actual app for their product.

Re:Why I use old hardware by carlmr on Wednesday January 23, 2019 @01:10PM (#18980789)
It's not that they don't have the resources, but if you want to create something that works the same on Mac, Windows and Linux it might even be a good decision for a bigger company.

Also they might have started in electron and now it's hard to move away from it.

Re:Why I use old hardware by sascha_sl on Wednesday January 23, 2019 @01:01PM (#18980695)
Sure, there's a very low barrier to entry, but node has a big hurtle in the middle.

You can relate if you ever had to setup a JS taskrunner/webpack from scratch. If you don't do it regularly, expect to spend 2-3 hours going through documentation and lots of outdated StackOverflow posts.

JS is easy as long as you stay within the constraints of whatever scaffolding you're using, if you need anything outside of that or need to upgrade your stack you need to know a lot of little things. "Best practices" move fast in JS, and projects die fast too.

Re:Why I use old hardware by carlmr on Wednesday January 23, 2019 @01:08PM (#18980772)
What I'm trying to say is that the low barrier to entry causes a lot of bad software engineering. Of course tooling issues can be hard to solve and you can do beautiful programs in every language. It's just far more likely that if you pick a JS developer at random they won't know much about memory allocation, which algorithm to use, profiling, and on general clean code.
Re:Why I use old hardware by pseudalopex on Wednesday January 23, 2019 @02:53PM (#18982061)
Even VS Code is slower and uses much more memory than native apps.
Re:Why I use old hardware by carlmr on Wednesday January 23, 2019 @04:33PM (#18983250)
True, on my machine it uses 150MB of my RAM. It's a lot compared to native apps, but it's really at the point where it's not that bad in the grand scheme of things.

Our companies customized eclipse on the other hand hogs 8GB ram when doing nothing, needs 2 minutes to start, and is sluggish in general. It's our course written in Java, which is much closer to native than electron, but still they wasted resources everywhere they could.

You can't run a compile on a 8GB ram machine, it will start swapping to hard disk.

Sublime doesn't have all the features, notepad ++ neither, and I just don't like vim style editing.

That leaves vscode.

Re:Why I use old hardware by anthk on Wednesday January 23, 2019 @01:40PM (#18981176)
And here I am, using nmh and exmh under CWM. With vimb + a host file, or plain Links+. IRSSI + Bitlbee for the rest. XMP to play some inspiring tunes. I only use 1.20G of RAM while using cached I/O . That minus the cache, is 185MB, according to vmstat.
Re:Why I use old hardware by dijit on Wednesday January 23, 2019 @01:49PM (#18981294)
You’re lucky. I could run so lean if I didn’t need to read emails using outlook and use Skype for business + slack for communicating with colleagues.

I’ve tried replacing slack with the wee-slack plugin for weechat but, while it works it’s far from a fully working solution and I still need to spin up a slack client sometimes.

Re:Why I use old hardware by anthk on Wednesday January 23, 2019 @03:18PM (#18982390)
Can't you use Thunderbird + Lightning? The RAM usage may be less.
Re:Why I use old hardware by asark on Wednesday January 23, 2019 @11:29AM (#18979664)
The actual act of writing code, maybe, but:

1) 4GB—let alone 1GB—is already cramped with just Slack and any one of your usual bloated shitware issue trackers/wanky PM toyboxes (Jira, Asana) open in a tab or two, plus the usual few tabs of DDG/Google, Stack Overflow, some docs, et c. That's before any actual code-writing tools enter the picture. The basic suite of tools to just be working at all in almost any role is just barely not-painful to use on 4GB. Worst case you're in an agency and have all your tools, plus several duplicates for the same purpose for a client or three, and so on, all open. Yes, it's because all these tools are terrible and eat like 20x the RAM they have any right to and even that's generous, but I still have to use them.

2) Better hope you don't need any design tools at all. (Sketch, say) if you're trying to get by on 4GB or less for everything, unless you like only having one thing open at a time or dealing with UI sluggishness I guess.

3) Docker(-compose) or minikube or whatever? Service dependencies, local mock services? Running test suites? Without a strong CPU and 16GB you'll see slowdown.

4) A fan of any of the fancier webmail clients, like recent GMails or Inbox or Outlook or whatever? I'm not and just keep the Basic HTML version of Gmail open because its full-page loads are faster than the "speedy" AJAX garbage on those, but if you are into that sort of thing take a look at their memory use some time.

FWIW I think almost all the tools surrounding and supporting development these days are god-awful resource hogs that somehow still manage not to be very good and think 1GB absolutely should be enough memory to get by doing node/ruby/php dev, but I still have to work with that junk, and 8GB's the bare minimum to do that without hitting swap constantly, IME, and even with that you've gotta be careful. 16GB's much more comfortable, especially if you sometimes have to do things other that just Web dev.

Re:Why I use old hardware by antoineMoPa on Wednesday January 23, 2019 @12:12PM (#18980138)
I have 8GB here, under Debian. I can easily run docker (with a rails server), firefox (discord, slack, facebook, youtube, online radio + outlook webmail, all at the same time), with many Emacs windows.

I think I could manage to have less RAM (I frequently code on my chromebook with 2GB RAM). My theory is that the ram expands to the amount available https://en.wikipedia.org/wiki/Parkinson%27s_law

Re:Why I use old hardware by asark on Wednesday January 23, 2019 @12:36PM (#18980404)
IIRC at my last employer an Asana tab + Slack ate ~1.5GB all on their own, and Asana was so slow to load that one hated to close it.

Jira's not as bad as Asana but depending on the set-up it can be pretty close. Then there's Invision, et c which are much lighter than those but still pretty damn heavy, if you're trying to get by on 4GB or less. And/or maybe you've got Outlook and Teams and all that. And that's just the communication & collab tools, not even any of the stuff to produce actual work output. Temporarily having to use a 4GB machine with that kind of workflow is why I'm now permanently on Basic HTML for Gmail—it loads fast enough I can close it, and uses so little memory there's no reason to. I couldn't spare the 300+MB for Inbox or whatever with all that other junk open, and besides, Basic HTML's much faster.

Re:Why I use old hardware by WrtCdEvrydy on Wednesday January 23, 2019 @02:34PM (#18981839)
No, it's that developers write their code on 16GB of RAM Macbooks running the minimal amount of software required.

If you're not seeing performance issues in your developer machine, you'll hardly see a developer running on 2GB of RAM.

Re:Why I use old hardware by matthewmacleod on Wednesday January 23, 2019 @10:43AM (#18979122)
But for any nodejs/ruby/php development, a 10 year old machine with 1GB RAM is perfect.

I don't think I'd enjoy the experience of developing on that machine!

Re:Why I use old hardware by amiga-workbench on Wednesday January 23, 2019 @10:34AM (#18979024)
A lot of shops have large and swollen Linux VM's to run your database, web server and interpreter in for consistency with the production environment.

If I wasn't running on a Mac at work I could comfortably use containers without the overhead of another VM.

Re:Why I use old hardware by fiddlerwoaroof on Wednesday January 23, 2019 @10:50AM (#18979194)
The new docker that uses the Mac’s builtin hypervisor works pretty well
Re:Why I use old hardware by amiga-workbench on Wednesday January 23, 2019 @10:50AM (#18979198)
I didn't know about that, I'll give it a look over.
Re:Why I use old hardware by beatgammit on Wednesday January 23, 2019 @10:57AM (#18979284)
You could always install Linux. I personally would hate running a VM regularly for my job. It just adds complexity without much benefit.
Re:Why I use old hardware by 00deadbeef on Wednesday January 23, 2019 @11:09AM (#18979435)
The benefit is the VM can precisely match production, and every project you work on can have a different VM with a different set of software.
Re:Why I use old hardware by amiga-workbench on Wednesday January 23, 2019 @11:03AM (#18979369)
It gets worse than that, I'm still on spinning rust, although I do have 21gig of RAM so I can keep my VM's running.

Looking forward to putting an inexpensive linux workstation together when this Mac eventually bites the dust.

Re:Why I use old hardware by jamesgeck0 on Wednesday January 23, 2019 @11:02AM (#18979353)
For a small app on a box running Linux, _maybe_. Any other case? That hasn't been true for years.

The large Rails app I work on can eat up 500mb RAM easily. The webpack dev server I'm running to compile the Angular frontend for said Rails app is taking another 500mb. Visual Studio Code (easily the best TypeScript editor) is using over a gig of RAM all by itself.

Re:Why I use old hardware by 00deadbeef on Wednesday January 23, 2019 @11:06AM (#18979406)
lol, I'm sorry but no a 1GB machine will not cut it even for a hobby, never mind in a real business environment.

A good IDE like PhpStorm is going to use 1-2GB.

A browser will consume 1GB+. Want multiple browsers for testing? Add another few gigs.

Most devs now use a VM or container with PHP, MySQL, etc running inside it. Add at least 1GB, maybe 2GB.

You probably need Slack or HipChat running. 0.5GB to 1GB.

A mail client. 256MB+.

Your company probably has Office 365, so you'll need Outlook. 1GB+.

Re:Why I use old hardware by beatgammit on Wednesday January 23, 2019 @10:55AM (#18979261)
Eh, 1G is pretty limited. I'd want at least 4G. Yes, 1G is workable (I could do most webdev on a Raspberry Pi), but a desktop environment and a browser running one tab uses half of that, and each tab would increase that usage.

The 4G isn't for building or running code, it's for tons of browser tabs open with documentation. I routinely have >10 tabs open, and that's quite likely to cause swapping on 1G RAM.

Sure, I could slim everything down by running a tiling window manager instead of a desktop environment or configuring my browser to unload older tabs (or close and reopen with bookmarks), but that takes extra time, and if time is money, that money is better spent on a few extra gigs of RAM.

Re:Why I use old hardware by c22 on Wednesday January 23, 2019 @12:06PM (#18980066)
As a counterpoint I currently have over 130 tabs open and my machine isn't breaking a sweat. The secret is leaving Javascript disabled by default and selectively enabling it on a per-tab basis only when needed. This strategy works great if the main thing you're looking at is documentation.
Re:Why I use old hardware by nileshk on Wednesday January 23, 2019 @08:33PM (#18985218)
I found out last year that 1GB RAM is not enough for TypeScript development (whose compiler runs on nodejs). I was building a fairly small TypeScript project on a Linux instance with 1GB and no GUI and no other processes hogging RAM. I was consistently having builds fail with errors about half of the time. Finally figured out that it was running out of RAM and if I turned off source map generation the errors went away. I didn't really need source maps in this case, as I was not developing on this machine, but it certainly would be a problem if I was trying to do development.

Sure, there is a lot of development that can still be done with 1GB RAM, but you're going to run into limitations and it is far from "perfect"

Re:Why I use old hardware by wlesieutre on Wednesday January 23, 2019 @10:35AM (#18979028)
And people who only close browser tabs every six months
Re:Why I use old hardware by simias on Wednesday January 23, 2019 @10:41AM (#18979100)
As long as you don't have to run a bloated electron app or anything similar at least...

I have a relatively minimalist Linux environment by today's standards (I use Emacs, Firefox with about 10 tabs, the Signal client, a few terminals and a lightweight WM) and I already use 1.5GB of RAM at the moment. Firefox alone uses 408M of RES, the Signal app almost as much (!) while my Emacs with dozens of buffers uses "only" 130MB. How times change. The rest is used by all sorts of system processes and minor daemons.

So basically I'd be fine with 1GB if it wasn't for the bloat that's modern web-based development. These days I'd say that 4GB is a more reasonable baseline.

Re:Why I use old hardware by wink on Wednesday January 23, 2019 @11:16AM (#18979518)
Also not strictly true - this is enough for some version of PHP development.

The last PHP app I was developing was running in the same mode as the whole company's infrastructure was developed and running - one puppetized Vagrant VM for the code and one for mysql, and sometimes a few more for other services.

Sure, even if you just want to abstract the stuff away from your host machine you could reconfigure stuff to run on one VM - but that's again diverging from production. And in the grand scheme of things we were working on several different vm types a lot more than only on this PHP app...

Re:Why I use old hardware by azangru on Wednesday January 23, 2019 @11:10AM (#18979456)
> 10 year old machine with 1GB RAM is perfect

No, a machine with 1GB RAM is not perfect. If you are a frontend developer coding in node. And if you are not, you might need a browser for Stack Overflow; and you might need Docker or vagrant for virtualization.

And, you may also want an Electron-based editor, such as Atom or VS Code.

Even 4GB is hardly ideal. 8GB is probably where it starts getting comfortable.

Re:Why I use old hardware by mythrwy on Wednesday January 23, 2019 @11:34AM (#18979714)
I propose we give every front end dev at _most_ 4GB RAM for awhile and see if web bloat stops inflating.
Re:Why I use old hardware by azangru on Wednesday January 23, 2019 @11:58AM (#18979986)
There are far better ways to address this particular problem. Introduce web performance budgets in frontend projects; test frontend projects on specific target devices on which you need them to perform well; perhaps create dedicated web performance teams that will work on the tooling and testing for better performance.

Development machine does not need to have the constraints of a testing machine; it's counterproductive.

In any case, "web bloat" is relative to the target users and target devices. It's one thing to target cheap Android phones in India; it's quite another to target laptops of a SF-based startup. In the second case, web bloat is negligible.

Re:Why I use old hardware by Wowfunhappy on Wednesday January 23, 2019 @12:57PM (#18980655)
> In any case, "web bloat" is relative to the target users and target devices.

What about, relative to how many resources should be required for whatever tasks the software needs to perform?

Just because I have a lot of ram doesn't mean I want Slack to use it all. I'd rather give that space to the OS for file caching and such.

Re:Why I use old hardware by eeZah7Ux on Wednesday January 23, 2019 @12:11PM (#18980132)
Yes please! Very few companies do this type of dogfooding.
Re:Why I use old hardware by winrid on Thursday January 24, 2019 @03:30AM (#18986952)
Nope. The project can still have crazy dependencies that need compiled (thrift etc).

Every morning every Dev in our shop no matter the project is going to run "mvn clean compile -U"

Sure you can split the large projects up. Just get some time from your PM.. next quarter.... :)

Re:Why I use old hardware by hinkley on Wednesday January 23, 2019 @10:57AM (#18979283)
So you’re not doing anything with Docker or ML, or a compiled language, and you have no unit tests?
Re:Why I use old hardware by muro on Wednesday January 23, 2019 @01:21PM (#18980930)
I haven't done web development lately. Why do unit tests mean higher requirements on the hardware?
Re:Why I use old hardware by HumanDrivenDev on Wednesday January 23, 2019 @06:54PM (#18984512)
At a guess - the various popular test runners are slow and bloaty.
Re:Why I use old hardware by hinkley on Thursday January 24, 2019 @10:31PM (#18995326)
Depending who you talk to, there are behavioral breakpoints at one, three, and seven minutes.

If you have a few thousand tests at a couple milliseconds apiece (really really easy to do even in a midsized project) you’re getting above that 1 minute range. Shaving 40% off with a faster computer stops people from task switching while testing.

Task switching pretty much doubles your test cycle because you never switch back at the precise moment the tests are done (we are developers. We always underestimate everything by a factor of 2).

Re:Why I use old hardware by cpburns2009 on Wednesday January 23, 2019 @11:00AM (#18979322)
Can Chrome or Firefox run on less than 1 GB of RAM nowadays?
Re:Why I use old hardware by zozbot123 on Wednesday January 23, 2019 @11:10AM (#18979450)
FF Quantum runs quite well on a 1GB system. You can go even lower than that, but you'll be hitting swap.
Re:Why I use old hardware by jagger27 on Wednesday January 23, 2019 @11:08AM (#18979429)
Firefox can.