DEV Community

Adam Crockett 🌀
Adam Crockett 🌀

Posted on

Precedent, a better prettier idea

This is just an idea post, hit me up if you want to make it with me.

Precedent is the name for this IMAGINARY product, a code formatter with no config, well apart from one, you elect a team lead to set the precedent, their code style is analysed and the code is formatted to fit that style, so if the leads code style changes that changes the overall formatting. After all what else is a team wide formatted for but to make the lead happy! 😆

Okay okay, well maybe we could instead average the entire teams code and create a formatting rule set based on that.

But even better, how about it finds the idiomatic style from the community and makes everyone do that?

So AI decentralised code formatting what do you think?

Top comments (6)

Collapse
 
jonrandy profile image
Jon Randy 🎖️

I had another idea - kinda similar -whereby you have your own preference for code formatting stored - and the code is always presented to you like that. You never need to know or care how it is actually stored. Kind of like a CSS for code if you will. Not sure how easy it would be to implement so that it always works both ways - as individuals are never 100% accurate in following their own preferences.

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

I’m not following the explanation Jon, tell me again 😊

Collapse
 
jonrandy profile image
Jon Randy 🎖️
  • The code is stored in the repo in one particular formatting style - the 'global' style
  • Each user working on the code has their own set of preferences for formatting
  • Whenever they work on any of the code, it is presented to them according to their preferences - and they work with it like that
  • When they push it back to the repo, it is transformed back to the 'global' style

Everyone is happy.

The transforming between styles could be tricky though, as everyone breaks their own preferred formatting rules fairly regularly - don't they? I know I certainly do

Collapse
 
mneme profile image
Alex T

recently. I experienced a challenge on web development collaborations. A backend person I met with demanded on full web hosting access(cpanel). my goal is to build a 6 people team to work in versatile way. I wonder if there is a good way to work on web development efficiently.

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

Umm well I have not seen a CPanel in many years but I suppose I’m spoiled by VPS and AWS style services. If you write about this challenge I’d love to read and suggest some ideas 💡

Collapse
 
mneme profile image
Alex T

haha. bet you are spoilt by VPX and AWS.
usually I work lone wolf, I think most coders do.
Story:
There are projects I need extra hands. I approached a backend who claimed he can work on anything backend. I expected backend can work remote and flexible. He demanded on full cpanel access and told me that cpanel can be delegated, also insinuated that I am a noob of not giving. I checked. cpanel only for single account access. If I give away full web hosting access, I am giving all domains access under that web hosting, included all emails accounts, accesses. He got so mad and insisted he can't work without full access.

Challenges here:

  1. delegation and access
  2. integration skills and languages
  3. VCS pros and cons(git is very good for software, frontend dev-with no database, correct me if I am wrong.. )
  4. project managements, milestone and timeline( found Gitinery at dev.to)

I am inspired to build a 6 people team who can work synergistically.