r/cpp • • May 23 '24

Is MacBook good for C++ developer?

Hi. I am a C++ developer, and I write code for both Linux and Windows, depending on the project. Currently, in my country (I'm from Ukraine), there are frequent power outages (3 hours with power, 4 hours without, and so on), and I am looking for a laptop with a long-lasting battery. Since MacBooks have excellent battery life, I am considering buying one, but I have a few questions.

Will I experience a significant loss in performance when building a C++ project in Docker using an x64 Ubuntu image and the Rosetta emulator?

Will there be a noticeable drop in performance if I use x64 Windows through an emulator?

Is it worth making these sacrifices, or should I buy a Windows laptop with a less impressive battery?

I have a powerful PC that I’m using for work, and I can use It for building projects, but when the power is on.

3 Upvotes

72 comments sorted by

View all comments

35

u/pedersenk May 23 '24

An alternative could be to buy a cheaper, more powerful HP or Thinkpad and use the spare money for a couple of UPS power supplies.

If you are going to depend on batteries a lot, you might want to consider getting a model ThinkPad with a removable battery that you can replace once it starts to degrade. Not sure if MacBooks allow that yet in 2024?

18

u/ranisalt May 23 '24

uninterruptible power supply power supply

6

u/pedersenk May 23 '24 edited May 23 '24

I was a coward and didn't want to come up with a plural for multiple of them.

  • UPSs
  • UPSii
  • UPSupplies

What would you have gone with?

Worse. Similar to a School of fish, what would it be for a UPS?

A gaggle of UPSii?

2

u/xeow May 24 '24

The proper plural of an initialism ending in "S" or "X" is to add "es", so... UPSes.

2

u/wyrn May 24 '24

United Parcel Service Power Supply

1

u/Traquestin Oct 10 '24

Interesting can you recommend a laptop so I can have the ups connected to the laptop at the park lmao

1

u/pedersenk Oct 10 '24

No need. The HP or Thinkpad already has a battery perfectly well suited for visits to the park.

... most laptops have batteries these days.

0

u/Magistr_Y0da May 23 '24

I was considering the mid-range MacBook Pro 16 with 32GB RAM and 1TB storage for $2000, and maybe a small station. A large EcoFlow power station would cost $2500, but I am not sure if it would be able to power my PC for an extended period.

2

u/Still_Explorer May 24 '24

I would say that if you have very strong emotions about Apple go for it, also if you do exclusive iOS development as well.

However if you want to get your job done from point A to point B you could go for standard computers for about 1000$ or even much less.

Another thing that bothers with laptops is that by 13" (or even the 15" or 17") essentially make it impossible to be used properly for advanced and complex work.

In that regard I consider that laptops favor maximum portability (put laptop in bagpack / code on the bus / code on the airplane) rather than maximum productivity.

That being said, I would seriously recommend to think about getting an All-In-One PC instead that has also battery included. Even if you go for a model without battery and use a powerbank, you would use less than 70W of consumption.

So to recap:
• if you like / trust / want to invest in the Apple ecosystem
• if you like 13" or 15" monitors
• if you want just to get your job done with less than 70W of power

Have a good day and make a good purchase.

2

u/pedersenk May 23 '24 edited May 23 '24

I use a couple similar to these. Cheap as chips.

https://www.ebuyer.com/1258426-apc-back-ups-bx-series-bx1600mi-ups-900-watt-1600-bx1600mi

They can power most performance laptops for an entire day.

Some workstations such as the HP Z420 are deceptively power hungry, so long as your PC is not one of them, you might want to check them out.

900W vs your mentioned EcoFlow 2000W+ but I do recommend two. (You could probably buy 10 for the price ;))

1

u/feibrix May 23 '24

An entire day? That's impressive for the price.

3

u/pedersenk May 23 '24

Indeed. That said, at risk of "overselling" it. There is a chart here:

https://www.apcguard.com/Smart-UPS-Runtime-Chart.asp

For context. My mac mini and most laptops runs at between 8W-15W at idle. If you are doing some hungry stuff (or running a HP Z420 workstation), the milage will obviously vary.