In your current role, how often do you write code to complete your work objectives? | Percentage |
---|---|
Never | 20.3% |
Rarely | 16.9% |
Sometimes | 22% |
Regularly | 27.1% |
Always | 13.6% |
Sample size = 59 |
Department summary: Department for Business & Trade
How to use this research
Responding to CARS is voluntary. The results presented here are from a self-selecting sample of government analysts. Because respondents are self-selecting, the results we present reflect the views of the analysts who participated.
For more detail, see the data collection page.
Coding frequency and tools
How often analysts are using code at work
We asked all respondents if they had any coding experience, inside or outside of work. Of 65 respondents, 90.8% reported having coding experience. We asked respondents with coding experience “In your current role, how often do you write code to complete your work objectives?”
Access to and knowledge of programming languages
Given a list of programming tools, we asked all respondents if the tool was available to use for their work.
Access to tools does not necessarily refer to official policy. Some analysts may have access to tools others cannot access within the same organisation.
Access to coding tools
Programming tool | Yes | No | Don't know |
---|---|---|---|
Python | 88.1% | 3.4% | 8.5% |
R | 96.6% | 1.7% | 1.7% |
SQL | 79.7% | 0% | 20.3% |
Matlab | 1.7% | 32.2% | 66.1% |
SAS | 18.6% | 28.8% | 52.5% |
SPSS | 20.3% | 27.1% | 52.5% |
Stata | 32.2% | 20.3% | 47.5% |
VBA | 27.1% | 18.6% | 54.2% |
Sample size = 59 |
Given the same list of programming tools, all respondents were asked if they knew how to program with the tool to a level suitable for their work, answering “Yes”, “No” or “Not required for my work”.
Please note that capability in programming languages is self-reported here and was not objectively defined or tested. The statement “not required for my work” was similarly not defined.
Knowledge of coding tools
Programming tool | Yes | No | Not required for my work |
---|---|---|---|
Python | 50.8% | 28.8% | 20.3% |
R | 76.3% | 16.9% | 6.8% |
SQL | 52.5% | 27.1% | 20.3% |
Matlab | 15.3% | 39% | 45.8% |
SAS | 11.9% | 42.4% | 45.8% |
SPSS | 15.3% | 42.4% | 42.4% |
Stata | 15.3% | 40.7% | 44.1% |
VBA | 8.5% | 49.2% | 42.4% |
Sample size = 59 |
Access to and knowledge of git
We asked respondents to answer “Yes”, “No” or “Don’t know” for the following questions:
- Is git available to use in your work?
- Do you know how to use git to version-control your work?
Please note these outputs include people who do not code at work.
Access to git
Is Git available to use for your work? | Percentage |
---|---|
Yes | 84.7% |
No | 3.4% |
Don't know | 11.9% |
Sample size = 59 |
Knowledge of git
Do you know how to use Git for your work? | Percentage |
---|---|
Yes | 61% |
No | 23.7% |
Not required for my work | 15.3% |
Sample size = 59 |
Coding capability and change
Where respondents first learned to code
Respondents with coding experience were asked where they first learned to code.
These data only show where people first learned to code. They do not show all the settings in which they learned to code, to what extent, or how long ago.
Where did you first learn to code? | Percentage |
---|---|
Self-taught | 13.6% |
Primary/secondary education | 13.6% |
Higher Education | 50.8% |
Current role | 1.7% |
Previous public sector employment | 20.3% |
Previous private sector employment | 0% |
Other | 0% |
Sample size = 59 |
Coding experience
We asked respondents with coding experience how many years of experience they had in a coding role, excluding any years in education.
This data includes any experience in other roles and sectors, but does not define the type of experience.
How many years of experience do you have in a coding role? | Percentage |
---|---|
None | 13.6% |
Less than 1 year | 25.4% |
1 - 3 years | 28.8% |
3 - 5 years | 11.9% |
Over 5 years | 20.3% |
Sample size = 59 |
Change in coding ability during current role
We asked “Has your coding ability changed during your current role?”
This question was only asked of respondents with coding experience outside of their current role. This means analysts who first learned to code in their current role are not included in the data.
How has your coding ability changed during your current role? | Percentage |
---|---|
It has become significantly better | 10.3% |
It has become slightly better | 39.7% |
It has stayed the same | 24.1% |
It has become slightly worse | 19% |
It has become significantly worse | 6.9% |
Sample size = 58 |
Coding practices
We asked respondents who said they currently use code in their work, how often they carry out various coding practices. For more information on the practices presented below, please read our guidance on Quality Assurance of Code for Analysis and Research
Open sourcing was defined as ‘making code freely available to be modified and redistributed’
Consistency of good coding practices
Statement | I don't understand this question (%) | Never (%) | Rarely (%) | Sometimes (%) | Regularly (%) | All the time (%) |
---|---|---|---|---|---|---|
Have code reviewed | 0% | 4.3% | 6.4% | 19.1% | 29.8% | 40.4% |
Manually test code | 2.1% | 6.4% | 4.3% | 8.5% | 29.8% | 48.9% |
Separate settings from code | 19.1% | 6.4% | 4.3% | 29.8% | 19.1% | 21.3% |
Use a standard code style | 8.5% | 4.3% | 6.4% | 14.9% | 31.9% | 34% |
Use control flow | 4.3% | 6.4% | 10.6% | 23.4% | 36.2% | 19.1% |
Use open source software | 0% | 0% | 6.4% | 8.5% | 23.4% | 61.7% |
Write automated tests | 14.9% | 34% | 21.3% | 19.1% | 4.3% | 6.4% |
Write functions | 0% | 4.3% | 14.9% | 27.7% | 23.4% | 29.8% |
Sample size = 47 |
Documentation
We asked respondents who reported writing code at work how frequently they write different forms of documentation when programming in their current role.
Embedded documentation is one of the components which make up a RAP minimum viable product. Documentation is important to help others be clear on how to use the product and what the code is intended to do.
Statement | I don't understand this question (%) | Never (%) | Rarely (%) | Sometimes (%) | Regularly (%) | Always (%) |
---|---|---|---|---|---|---|
Create README files | 2.1% | 25.5% | 6.4% | 19.1% | 21.3% | 25.5% |
Document dependencies | 8.5% | 34% | 12.8% | 8.5% | 19.1% | 17% |
Document functions | 19.1% | 31.9% | 10.6% | 12.8% | 6.4% | 19.1% |
Document manual QA steps | 4.3% | 19.1% | 10.6% | 14.9% | 27.7% | 23.4% |
Document pipeline design | 17% | 23.4% | 12.8% | 21.3% | 21.3% | 4.3% |
Sample size = 47 |
Working practices
We asked respondents who reported writing code at work how frequently they use good working practices in the coding projects they work on.
Statement | I don't understand this question (%) | Never (%) | Rarely (%) | Sometimes (%) | Regularly (%) | Always (%) |
---|---|---|---|---|---|---|
Have a succession plan | 0% | 8.5% | 2.1% | 6.4% | 44.7% | 38.3% |
Publish code in the open | 10.6% | 34% | 19.1% | 12.8% | 19.1% | 4.3% |
Understand project aims | 0% | 2.1% | 0% | 8.5% | 55.3% | 34% |
Understand project roles | 0% | 2.1% | 2.1% | 12.8% | 51.1% | 31.9% |
Use version control | 6.4% | 14.9% | 6.4% | 10.6% | 21.3% | 40.4% |
Work to quality standards | 2.1% | 6.4% | 2.1% | 14.9% | 40.4% | 34% |
Sample size = 47 |
Reproducible analytical pipelines (RAP)
We asked respondents about their knowledge of and opinions on reproducible analytical pipelines (RAP). RAP refers to the use of practices from software engineering to make analysis more reproducible. These practices build on the advantages of writing analysis as code by ensuring increased quality, trust, efficiency, business continuity and knowledge management.
The RAP champions are a network of analysts across government who promote and support RAP development in their departments. Please contact the analysis standards and pipelines team for any enquiries about RAP or the champions network.
The Analysis Function RAP strategy was released in June 2022 and sets out plans for adopting RAP across government.
Knowledge of RAP
We asked all respondents if they had heard anything about reproducible analytical pipelines (RAPs).
Opinions on RAP
We asked respondents who had heard of RAP whether they agreed with a series of statements.
Statement | Strongly Disagree (%) | Disagree (%) | Neutral (%) | Agree (%) | Strongly Agree (%) |
---|---|---|---|---|---|
I think it is important to implement RAP in my work | 1.9% | 5.6% | 14.8% | 40.7% | 37% |
I have the resources I need to help me implement RAP in my work | 3.7% | 16.7% | 25.9% | 29.6% | 24.1% |
I am currently implementing RAP in my work | 14.8% | 14.8% | 29.6% | 14.8% | 25.9% |
My department values RAP | 0% | 1.9% | 27.8% | 33.3% | 37% |
Sample size = 54 |
RAP scores
In this section we present RAP components and RAP scores.
For each RAP component a percent positive was calculated. Positive responses were recorded where an answer of “regularly” or “all the time” was given. For documentation, a positive response was recorded if both code comments and README files questions received positive responses. For the continuous integration and dependency management components, responses of “yes” were recorded as positive.
“Basic” components are the components which make up the RAP MVP. “Advanced” components are components which help improve reproducibility, but are not considered part of the minimum standard.
RAP components
RAP component | Type | Percentage of analysts who code in their work |
---|---|---|
Use open source software | Basic | 85.1% |
Work to quality standards | Basic | 74.5% |
Peer review | Basic | 70.2% |
Version control | Basic | 61.7% |
Create project README | Basic | 46.8% |
Open source own code | Basic | 23.4% |
Manually test code | Advanced | 78.7% |
Follow code style guidelines | Advanced | 66% |
Use control flow | Advanced | 55.3% |
Write functions | Advanced | 53.2% |
Use configuration files | Advanced | 40.4% |
Document dependencies | Advanced | 36.2% |
Document functions | Advanced | 25.5% |
Write automated tests | Advanced | 10.6% |
Sample size = 47 |