Overblog Tous les blogs Top blogs Entreprises & Marques Tous les blogs Entreprises & Marques
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU
http://kdqfi.over-blog.com/

kdqfi.over-blog.com/

Publicité

Mac Vs Windows For Coding



  1. Pc Or Mac For Programming
  2. Windows Or Mac For Coding
13th May 2020

When I got my Windows computer, the first thing I did was to set up Windows so it mirrors the writing system I had on Mac. I also mirrored Mac's modifiers as much as possible.

Then, I set up my Windows development environment (with Windows Subsystem for Linux) on my new Windows computer.

Next, I had to do was to make Visual Studio Code on both Mac and Windows play nice.

Correcting mistakes is really daunting and the best is really to develop from Mac to mitigate the damages, but it won't be hurdles free as well! It took me more time debugging than coding within VS Windows. After developing chunk of your app within Visual Studio MAC, the best is to get the code on the windows machine and arrange it to work in UWP. Perhaps that's just because my CS department was all Linux, all the time. From what I've seen the array of coding and debugging tools is far beyond that of OSX or Windows. Even the people I knew that had Macs in my department only used them to remote into the CS department terminal server when it came to development. This is a win for outdoor coding and working in the car. And the thermal qualities of the Mac's aluminum chassis combined with the efficiency of macOS means Apple laptops often run cooler than equivalent PCs. MacOS is more efficient than Windows, so battery life tends to rival the best Windows laptops. Reliable DPI Scaling. This is unlike with Windows where various computer operations occasionally interrupt work. Developers need their full concentration while coding and the MacBook offer this luxury. Cross-Platform Compatibility. Working with MAC OS X, you are able to run all the major operating systems on your machine, which is a great advantage for programmers. It doesn't matter whether you're coding with Linux, on a Mac, or a Windows PC, a text editor should be easy to use and do the job the way it was intended to be done.

By 'play nice', I meant:

  1. Syncing preferences across Mac and Windows
  2. Syncing extensions across Mac and Windows
  3. Syncing key bindings across Mac and Windows

Enter Settings Sync.

Settings Sync

Settings Sync is an extension for Visual Studio Code. It lets you sync preferences and extensions. I also found out it synced key bindings later! (More on key bindings later because it's more nuanced).

It's easy to sync preferences and extensions. Settings Sync does this automatically. To sync extensions and preferences across my Mac and Windows computer, all I had to do is install the settings sync extension, log in with Github, and, select a Gist to sync to.

Separating preferences for Windows and Mac

Thankfully, most of my preferences can be shared between Windows and Mac. I don't have to change many things. I only changed the fontSize of the code editor and the integrated terminal between my Windows and Mac.

I changed fontSize because I have a 15' Mac and a 13' Windows. Their screen resolutions were different too. After some testing, I figured I needed the following sizes:

  • Mac: 18px
  • Mac (Integrated Terminal): 16px
  • Windows: 16px
  • Windows (Integrated Terminal): 14px
Mac or pc for coding

Settings Sync lets you preserve specific settings with a thing they call sync pragmas. Stronghold crusader 2 mac os x. A pragma is a piece of code that tells a compiler about something. In this case, the sync pragmas tell Settings Sync whether to keep a specific setting.

Sync pragma looks like this:

A sync pragma can only be applied to one property (as far as I can tell).

I used the Operating System pragma (os) to preserve preferences between Mac and Windows. Here's what I wrote for Mac:

And here's what I wrote for Windows: Youtube hd converter mac.

Settings decides whether to apply a property with sync pragmas. If Settings Sync thinks the property should be disabled, it'll comment it out.

For example, anything labelled with os=windows got commented out on my Mac's preferences (the settings.json file).

Likewise anything labelled with os=mac got commented out on my Windows' settings.json file.

So I get to keep the settings I like for both computers. Pretty cool!

Settings Sync is a real lifesaver here :)

Syncing keyboard shortcuts

If you can keep preferences with sync settings, how do you keep preferences for keyboard shortcuts?

I put a ton of effort into customising my keyboard shortcuts. (I'll share them in the next article). And I'm worried my shortcuts will overwrite each other.

Turns out, there's nothing to worry!

Settings Sync is smart. It uses a file called keyBindings.json to store Windows shortcuts. For Mac, it uses a file called keybindingsMac.json.

So feel free to upload your key bindings without adding any comments. They would NOT overwrite each other.

Pc Or Mac For Programming

This, however, means you need to configure key bindings for Mac and Windows separately.

I'll share my configurations in the next article.

Windows Or Mac For Coding

If you enjoyed this article, please tell a friend about it! Share it on Twitter. If you spot a typo, I'd appreciate if you can correct it on GitHub. Thank you!





Publicité
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article