As a tech worker for 35 years, IBM CEO Ginni Rometty knows all about the challenges women technologists face, but she also knows how they can succeed. Rometty shared three of the most important lessons she has learned during her career in front of thousands on Wednesday at the opening keynote for the Grace Hopper Celebration of Women in Computing, a tech diversity conference.

During her keynote, Rometty gave the attendees a brief history lesson, including shout-outs to Hopper as well as Ada Lovelace, who Rometty referred to as "the mother of software." Rometty also gave a shout-out to Katherine Johnson, Dorothy Vaughan, and Mary Jackson, the African American female scientists who were key to NASA's space missions in the 1960s--the three will be the subjects of the upcoming film Hidden Figures.

"The past is the prologue, and it is a fact that women have helped drive every era of technology," said Rometty, who has served as IBM's CEO since 2012. In her role, she leads more than 377,000 tech workers.

Rometty drew from her own history to provide lessons for the audience that she said she hopes will serve them well in their careers. In one personal story, Rometty recounted what her family went through when her father suddenly left them. She said she saw her mother step up to support her and her three siblings, going to school during the day and to work at night.

"We all learned you never let someone else define who you are, ever," she said. "Only you define who you are."

In her second lesson, Rometty recounted a time when she was asked if she would be interested in being recommended for a promotion. Rometty responded by saying she needed to think about it because she did not feel she was ready for the position. She went home and told her husband. He asked her, "Do you think a man would've answered the question in that way?"

"He was right," said Rometty, adding that the experience taught her that growth and comfort never coexist. "Ask yourself when you've learned the most? I guarantee you it's been when you've felt at risk."

For her final lesson, Rometty talked about the work she and her employees are doing with Watson, IBM's machine learning system. Watson is famous for its appearance on Jeopardy, but these days, the artificial intelligence system is being used to solve major problems in the field of medicine. Rometty said Watson is IBM's "modern-day moon shot," and added that she is privileged to work at a company that has had such an impact on history.

"No matter where you are in your career, you work on something you're passionate about and work on something bigger than yourself," Rometty said. "There is a chance you will make the world better and for far more people than you ever thought possible."