Volunteering at a kids' hackathon at a community centre here six years ago, Dr Ayesha Khanna was given a visceral reminder of a deep-seated bias when it comes to women and tech.

"I was working with kids on a small electric robot and, at some point, the mother of one girl took her daughter away and replaced her with her son, saying he was better suited to the activity," said the co-founder and chief executive of artificial-intelligence (AI) firm Addo AI.

"Later, the girl's grandmother brought her back and it was obvious she was really interested. That really resonated with my experience as a software engineer my whole career."

The unhealthy stereotype prompted Dr Khanna, 45, to start 21st Century (21C) Girls, which now organises two programmes - a coding initiative targeted at girls aged eight to 15 and an AI pilot initiative for youth aged 16 to 22.

It is among a handful of community organisations here that aim to bridge the gender gap by working with children.

"Not everyone is going to be a data scientist, but nearly everyone will be working with one in the future," she said.

"As a country, Singapore can't afford to have half the population unaware of the impact of programming. We need everyone to participate."

The gender gap in the tech profession is not a new trend - both globally and in Singapore.

In the United States, 25 per cent of computing jobs were held by women in 2015.

In Japan, women comprise 13 per cent of the tech workforce, and in South Korea, it is 16 per cent.

In Singapore, women make up about a third of info-communications and media professionals, according to 2017 figures from the Info-communications Media Development Authority.

The gender gap in the tech industry is one the booming sector can ill afford, with 1.1 million new positions expected to be created globally by 2020.

Statistics for the number of women in coding roles in Singapore are not available, but data from the US suggests the gender gap is even more marked for these jobs.

Only 18 per cent of software developers and 21 per cent of computer programmers in the US in 2015 were female, according to numbers from the US Bureau of Labour.

NOT KNOWING WHERE TO START

Many women are either unaware of or unable to find opportunities to pick up coding skills.

Ms Elisha Tan, 30, founder of the 2,700-strong TechLadies community, was trying to set up a tech start-up in 2011, but could not find a partner with a tech background.

She decided to pick up programming herself, with the help of a good friend who tutored her.

"I was fortunate, but I thought it was a shame that other women get put off because they don't know where to start," said Ms Tan, who studied psychology in university.

When a lack of exposure is coupled with the stereotype that men are better suited to tech jobs, coding ends up not being an option for many girls in their teens, said Ms Annabel Lee, policy manager in Asia Pacific for BSA The Software Alliance.

"The sharpest drop in girls' interest in the Stem (science, technology, engineering and mathematics) subjects occurs during the ages of 13 to 17 due to a lack of mentors, role models and support from parents, as well as teachers around that age group," said Ms Lee.

"These young girls require support systems all along the pipeline and there is insufficient effort in introducing them to computer science earlier on, such as during kindergarten."

Less than 30 per cent of computer science undergraduates at both the National University of Singapore (NUS) and Nanyang Technological University (NTU) for the 2018/2019 academic year are female. This is comparable to the corresponding figures in 2015, despite the intake increasing from 500 to 1,000 at NUS and from 450 to 675 at NTU.

CHANGING PERCEPTION

Even so, perception is slowly shifting, said Ms Ann Luo, 29, founder and chief executive of CodingGirls, another community coding organisation here.

"We were quite surprised to see a 12-year-old girl at our Python workshop for beginners last March," she said, adding that the girl's mother had signed her up. Python is a programming language.

Such workshops also function as a positive feedback loop, with programme graduates often keen to provide the support they had benefited from.

Ms Toh Hui Min, 28, a former portfolio management analyst in the finance industry, went through the TechLadies boot camp - a 12-week high-intensity coding programme for small groups - in 2017 and subsequently returned as a volunteer to organise the fourth and latest iteration that ended last November.

She started working as a developer last week, having left her job in the finance industry.

"It sounds cliched, but my advice to anyone who's thinking of making the switch is just to trust in your own abilities," she said.

The ultimate measure of success is when the barriers of entry for aspiring female coders are the same as those of their male counterparts, said TechLadies' Ms Tan.

"Our purpose, really, is to make sure we don't have to exist anymore," she said.

"We will have succeeded when there is no more need for us to do what we do."

REWRITE THE CODE

Mission: Advocate for gender equality through coding, AI and robotics classes for girls in Singapore

Number of participants to date: About 1,500

Target age group: Eight to 22

Programmes/lessons: There are two main ones. The first, Code in the Community, is a Google-sponsored initiative to bring free coding classes to young Singaporeans from less well-to-do backgrounds. Launched in 2017, it has two difficulty levels, one for children aged eight to 11 and one for those 12 to 15 years old. The second, Empower, is a national movement to teach Singaporean youth basic AI and data science techniques, how to connect AI to business goals and outcomes, and the principles of data governance and AI ethics. The pioneer batch of 24 girls from Ngee Ann Polytechnic completed this 12-week programme last month.

Mission: To inspire, unite and empower women and girls to pursue careers in tech

Number of participants to date: 500, with 3,000 community members

Target age group: 20 to 50

Programmes/lessons: Data analysis classes that teach programme languages SQL and Python. Also courses on website and app design as well as digital marketing. Other events include product design workshops and public forums featuring industry speakers.