Make Your Mac Dev Ready

Make Your Mac Dev Ready

MAC CONFIGURATIONS & EXTENSION CHECKLIST FOR DOTNET DEVELOPER

DEVELOPER SETTINGS

Hello hiveminds,

This article is intended to share the settings/apps installed to make the developer's life easier when getting used to Mac.

The following steps are mostly intended for C# & Vscode users, if you are using neither of them then wouldn't it be nice sharing with friends for whom this might be helpful ?☺️ Also please check out the general tips for setting up the Mac here: Make your Mac Better

1. GIT

of course, this would be the first step in getting the code workspace in our mac🥳. The git can be installed by installing xcode from AppStore. Also, this can be installed via homebrew as well

brew install git

1.1 GIT ADD SSH KEY

When you set up an SSH key, you create a key pair that contains a private key (saved to your local computer) and a public key (uploaded to Bitbucket). Bitbucket uses the key pair to authenticate anything the associated account can access. This two-way mechanism prevents man-in-the-middle attacks. steps to generate ssh keys for bitbucket are mentioned here

2. Add VSCODE PATH

If we add vscode to the path it will be super helpful since we can directly open any folder/ workspace in vscode from the command line. You can also run VS Code from the terminal by typing 'code' after adding it to the path:

Launch VS Code. Open the Command Palette (Cmd+Shift+P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command.

image.png Restart the terminal for the new $PATH value to take effect. You'll be able to type 'code .' in any folder to start editing files in that folder. Note: If you still have the old code alias in your .bash_profile (or equivalent) from an early VS Code version, remove it and replace it by executing the Shell Command: Install 'code' command in the PATH command.

2.1 VSCODE EXTENSIONS

  • GitLens — Git supercharged

    Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more

image.png

  • Test Explorer for Visual Studio Code image.png This extension provides an extensible user interface for running your tests in VS Code. It can be used with any testing framework if there is a corresponding Test Adapter extension.

  • Prettier - Code formatter Code formatter using prettier-It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.

image.png

adds a Visual Studio Solution File explorer panel in Visual Studio Code. Now you can navigate into your solution following the original Visual Studio structure.

vscode-solution-explorer-1.gif

  • C# - this gives c# related features and makes capabilities to develop c# codes using VSCode
  • GraphQL.vscode-graphql 687474703a2f2f672e7265636f726469742e636f2f497379504655484e5a342e676966.gif GraphQL extension for VSCode adds syntax highlighting, validation, and language features like go to definition, hover information, and autocompletion for graphql projects. This extension also works with queries annotated with all tags or comments.

  • C# extensions-C# IDE Extensions for VSCode provides extensions to the IDE that will hopefully speed up your development workflow.

newclass.gif

newdemo.gif

image.png

2.2 CONFIGURE TAB SPACE AND NAVIGATION SHORTCUTS

sometimes the no of spaces configured for the tab will not match the required indentation for the specific file extension. And it can be configured using in menu Code → Preferences → Settings or ⌘,

image.png

image.png

CMD+K CMD+S shortcut will help us to map the keyboard shortcuts which makes the coding comfortable, one such shortcut that helped me a lot is configuring Go Back and Go Forward navigation keys which helped to navigate to previous and next files in my navigation history in a single click. There are a lot more configurations available (folding, unfolding, formatting, auto suggestions ..etc) in keymaps don't forget to check and configure them.

3.1 FIX NUGET SOURCE

To restore internal Dotnet packages, run below command to add the package source into the NuGet config file

* dotnet NuGet add source "https://sourceurl" -n "source name"

4. ZOOM /TEAMS SCREEN SHARING PERMISSIONS

To avail the screen share feature on zoom/teams we will have to give the screen sharing and accessibility permissions for the zoom/teams app. If we enable these options beforehand no need to give permission and quit the apps in mid of important meetings, Cheers!

image.png

image.png

5. ENABLE FUNCTION KEYS FOR IDES

Mac comes with a touch bar, and with that to access the function keys we have to press the Fn key every time. And for programmers that might be difficult since FN keys play a major role in IDEs.

So, to overcome this if we configure the FN keys as default keys for IDEs when IDES are opened and in focus on the MAC, function keys will be shown by default on the touch bar.

2022-04-11 23.29.44.gif

How cool is that??-> function keys adv + touch bar adv both are in our MAC now ✌️✌️

6.POSTMAN

for calling API resources or to test the API resources we can install and use the postman client.

REFERENCES

These are some insightful posts I found that shares tips/guidelines for MAC usage, please check them out too.