Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "Coding with empathy" #66

Merged
merged 12 commits into from
Jul 12, 2021
Merged

add "Coding with empathy" #66

merged 12 commits into from
Jul 12, 2021

Conversation

sndrs
Copy link
Member

@sndrs sndrs commented Jun 28, 2021

Adds a section on preferring empathic approaches to how we write our code.

This tries to capture recommendations based on a number of recent discussions we've had in/around the CSTI team, but it is not intended to only apply to client-side code.

please add your thoughts!

co-authored with @jamie-lynch

@JamieB-gu
Copy link

JamieB-gu commented Jun 28, 2021

This is interesting 🤔. It may be important to define what we mean by "idiomatic" as part of this recommendation, as I think some of the discussions in the PR you referenced exposed the fact it means different things to different people.

I suspect this issue is more acute in JavaScript than in other languages. It's not like, for example, Python which has PEP 20 and a massive standard library to draw on for examples. The language is typically very permissive, it tends to be written in different styles depending on the organisation or codebase, and there's no real standard library to draw on for reference. It might be preferable to figure out a "Guardian style" for writing JavaScript (or TypeScript?) and orient the recommendation towards that?

I'd also point out that idiomatic TypeScript may look quite different to idiomatic JavaScript. Programming with types allows you to solve problems in very different ways, and the patterns you follow to structure your code are likely to reflect that.

@sndrs
Copy link
Member Author

sndrs commented Jun 28, 2021

It might be preferable to figure out a "Guardian style" for writing JavaScript (or TypeScript?) and orient the recommendation towards that?

that could be something we want to do for typescript (or for any specific language), but these recommendations are intended to be more generic

@davidfurey
Copy link
Member

To me the title of this new section is misleading. It seems they are actually recommendations on programming style, with idiomatic programming being one aspect of this.

The PR reminded me of Felienne Hermans' talk "How to read complex code" (https://www.youtube.com/watch?v=GUtfW7SHMc4).

@sndrs
Copy link
Member Author

sndrs commented Jun 29, 2021

@davidfurey that's a good point. i guess we started thinking that would be the subject and on writing it felt like we were actually getting at something different – more about why than which specific things the guardian wants to encourage.

how do you feel about something like Coding with empathy?

@davidfurey
Copy link
Member

I think "Coding with empathy" is a better summary of what these recommendations are about than "Idiomatic programming".

@sndrs sndrs changed the title add "Idiomatic programming" add "Coding with empathy" Jun 29, 2021
@sndrs
Copy link
Member Author

sndrs commented Jun 29, 2021

is this better thought of as "Writing useful code" or "Programming for productivity" or something?

@mchv
Copy link
Member

mchv commented Jun 29, 2021

Looks good to me 👍
Could we ask some of our new starters if they understand what we means?

Copy link
Contributor

@SiAdcock SiAdcock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this 👍

Copy link
Member

@markjamesbutler markjamesbutler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - thank you for taking time to reach this conclusion.

@akash1810
Copy link
Member

akash1810 commented Jul 9, 2021

Wonderful stuff! This revision history is pretty noisy, I recommend squashing commits.

This is a fantastic video that eloquently explains why keeping a clean revision history is favourable. (Maybe we should add some revision history recommendations too?)

@sndrs sndrs merged commit 3a20888 into master Jul 12, 2021
@sndrs sndrs deleted the idiomatic-programming branch July 12, 2021 13:05
@sndrs
Copy link
Member Author

sndrs commented Jul 12, 2021

@akash1810 that talk is excellent. i'm 100% guilty of nonsense commits and it's pretty much changed my mind completely! should we add it here do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants