text:
Saudi Arabia
Banking & Finance
Travel & Hospitality
Reader Comments
Cars & Boats
Companies A-Z
Market Data
Saudi Arabia
Banking & Finance
Travel & Hospitality
Reader Comments
Cars & Boats
Companies A-Z
Market Data
Latest News
Banking & Finance
Culture & Society
Travel & Hospitality
Company News
Most Read
Emirates' premium economy to be delayed, says Tim Clark
22 Sep 2019
Emirates approved for biometric boarding for US-bound flights
22 Sep 2019
Subscribe to print and digital
Google Play
Advertise with us
Culture & Society
In Pictures: 100 under 40: The world's most influential young Arabs 2016 - Culture and society
Welcome to the 2016 Arabian Business guide to the world's most influential young Arabs.
1 of
13. Hadeel Ibrahim
\nAge: 32
\nNew entry
\nExecutive Director, Mo Ibrahim Foundation
\nUK (Sudan)
\nHadeel Ibrahim is the founding executive director of the Mo Ibrahim Foundation – a position she took on aged just 22 - which was established in 2006 to support great African leadership. The Foundation was established by Mo Ibrahim, Sudanese-born telecommunications billionaire, and offers a $5m prize to an African head of state who has demonstrated excellence as a leader based on the Mo Ibrahim Index of African Governance. She is also co-chair of the board of directors of the Africa Center in New York, which will attempt to help the US better understand and engage with contemporary Africa. Ibrahim sits on the boards of the Clinton Foundation and the Mary Robinson Foundation for Climate Justice. She is a member of the Royal African Society Council and a patron of Restless Development, a youth-led development agency.
2 of
20. Yousef Munayyer
\nAge: 32
\n16 (2015)
\nExecutive Director, US Campaign to End the Israeli Occupation
\nUS (Palestine)
\nCulture and society
\nYousef Munayyer has been front and centre during the battle to change American minds about a slew of issues that affect the Arab world. From the occupation of the Palestinian territories to the rise of Donald Trump, Munayyer provides regular commentary on US media. He is executive director of the US Campaign to End the Israeli Occupation, and has also served as executive director of the Washington DC-based not-for-profit the Jerusalem Fund for Education and Community Development and The Palestine Centre. Both organisations aim to provide humanitarian support to Palestinian people and promote Palestinian-Arab culture in the United States. Munayyer contributes to American newspapers including the Washington Post, Chicago Tribune and Boston Globe and has appeared on numerous international television and radio programmes to discuss the Middle East. In particular, he has criticised Israeli occupation of Arab territory and called on the US government to implement a fundamental policy change.
3 of
25. Ahmad Alhendawi
\nAge: 31
\n78 (2015)
\nUN Secretary General's Envoy on Youth
\nCulture and society
\nAlhendawi became the youngest ever senior official at the United Nations when he was appointed the first Envoy on Youth, working directly under secretary-general Ban Ki-moon, in January 2013. His mandate includes harmonising and enhancing the organisation's response to youth issues, as well as youth involvement, and to advocate the development of their needs and rights. The Envoy on Youth also acts as the advisor to and the representative of the Secretary-General on youth-related matters.
\nWith a Master's Degree in Advanced European and International Relations and a Bachelor's Degree in Computer Information Systems, Alhendawi has spent the majority of his career advocating for youth. He was previously youth policy advisor to the League of Arab States and has worked on several major youth projects across the Middle East, as well as with non-government organisation Save the Children.
\nHe co-founded the Youth for Democracy Network in Jordan and the International Youth Council, based in New York.
\nIn February, he made a speech to a UN youth forum challenging ten common misconceptions of youth, including that they are the 'future' rather than the 'present'. He said it was imperative that youth have greater participation in decision-making processes at all levels.
4 of
33. Jawad Nabulsi
\nAge: 34
\n1 (2015)
\nSocial entrepreneur
\nUS (Egypt)
\nCulture and society
\nJawad Nabulsi paid a significant price when he stood up to the Hosni Mubarak regime in Egypt in 2011, taking a gunshot wound to the eye. But as soon as he was well and despite wearing a permanent black eye patch, rather than hide, he used his entrepreneurial skills to launch the Nebny Foundation, which immediately provided medical assistance to 2,200 people during the first uprising.
\nHe turned down a post-revolution offer to become Minister of Youth and instead dedicated his time to providing Cairo's slum poor with education, medical assistance, micro-loans and business advice. His work has had such a great impact, the World Bank chose the foundation from among 40,000 Middle East non-government organisations to become one of its donor recipients. Jawad also received the 2011 Khalil Gibran Spirit of Humanity Award. Now living in the US, Nabulsi has spent the past two years improving his own education, completing a Master's Degree in Public Administration at the John F Kennedy School of Government at Harvard University in mid-2015. Shortly before graduating, he co-authored an article with fellow members of the Harvard Muslim Society, titled 'A Call for Tolerance and Understanding' following the massacre of three Muslim students in Chapel Hill.
\n"As Muslims in America, we feel that the average American, and even the average Harvard student, knows very little about who we are, where we come from, and what we stand for," the co-authors said.
\nHe is now studying a Master's in Management at the Stanford Graduate School of Business, while continuing to run the Nebny Foundation.
5 of
35. Mohamed El Dahshan
\nAge: 32
\n39 (2015)
\nEconomist, writer
\nCulture and society
\nMohamed El Dahshan is a regional economist at the African Development Bank, helping to establish links between the bank and private sector partners to further Africa's development goals. He is also a non-resident Fellow with the Tahrir Institute for Middle East Policy in Washington, DC, and a professor of development economics at Cairo's Ain-Shams University.
\nThe Harvard Kennedy School of Government graduate specialises in private sector development and investment promotion and entrepreneurship, particularly in post-conflict countries. He has worked for the Center for International Development at Harvard University, and consulted for international organisations including UNDP, the World Bank, IDRC and UNIDO, as well as for the governments of Palestine and Dubai, and various think tanks and research centres.
\nEl Dahshan is also an activist and has received applause for his writings on both economic development and Egyptian politics, with articles published in media including The Guardian, Huffington Post, Foreign Policy magazine's Transitions blog, The New York Times, The New Yorker, and on his eponymously titled blog.
\nHis coverage and analysis of the 2011 Egyptian revolution earned him the Anna Lindh Euro-Mediterranean Journalism Award for traditional and social media. He also co-author "Diaries of the Revolution", a collective memoir of the uprising.
\nEl Dahshan remains based in Cairo but travels extensively, often for speaking engagements.
6 of
38. Amira Yahyaoui
\nAge: 31
\n41 (2015)
\nBlogger and activist
\nCulture and society
\nHaving been raised by a father who spoke out about the lack of justice in Tunisia and experiencing the death of her equally outspoken cousin in 2005, Amira Yahyaoui was unafraid to follow her own human rights activist path at a young age. She was still only a teenager when she was forced to flee to France where she was stateless until the downfall of former president Zine Al Abidine Ben Ali's regime in 2011.
\nThat year Yahyaoui returned to her homeland and founded the non-profit, non-government organisation Al Bawsala. The organisation is strictly independent from political influence and works to hold the Tunisian government to account, but also to enhance relationships between elected representatives and the public and thereby help avoid another revolt. The country's peaceful transition to democracy indeed saw it named The Economist magazine's country of the year in 2014.
\nHer activism during and following the revolution saw her win a Vital Voices Global Trailblazer award for women transforming the Middle East. In 2014 she became a Meredith Greenberg Yale World Fellow and was awarded the Prize for Conflict Prevention by the Fondation Chirac, established by former French president Jacques Chirac.
7 of
41. Amine Raghib
\nAge: 30
\nNew entry
\nCulture and society
\nAmine Raghib is one of a growing number of young Arabs taking to social media to document their interests, activities and expertise to the world. From Marrakesh in Morocco, Raghib started his YouTube channel Al-Muhtarif (which means 'Arabic for the professional'), five years ago and it now has 1.3 million subscribers.
\nIn 2014 he became the first Moroccan to win a YouTube 'Silver' Award, handed to content creators on the platform who reach 100,000 subscribers. At the time he had more than 365,000 subscribers — the next award is 'Gold' when creators reach one million subscribers. Raghib told local media: "I am a very simple person. I started from zero. What I want to tell you is to hold on to your dreams. Do not make excuses." He has been awarded a 'best blogger' prize in Morocco and participated in several technology competitions across the Arab world, including one organised by the Universal Center for Journalists in Morocco. He has also appeared on sevelocal TV shows to discuss his work.
8 of
46. Bader Saleh
\nAge: 31
\nNew entry
\nSaudi Arabia
\nCulture and society
\nThirty-one-year-old Bader Saleh is a stand-up comedian and host of the hit Arabic language YouTube show Eysh Elly. Since its inception in 2011 the channel has attracted more than 2.7 million subscribers and each fortnightly episode regularly receives more than 1 million views.
\nEach ten-minute show is a mix of skits and segments poking fun at other YouTube clips, and Saleh has been quoted as saying its success is down to its 'good, clean fun'.
\nOften credited as helping to establish the stand-up comedy scene in Saudi Arabia, he was one of the first to regularly perform on the circuit. He told the media last year those shows were challenging. "This was especially the case when you are not playing in the main cities such as Jeddah, Riyadh or Damam. The crowds just didn't know what to expect in a stand-up show."
\nHe has maintained his stand-up career, however, performing at shows across the region including at du Forum on Yas Island, last year as part of Abu Dhabi Summer Season. He has 2.2 million Twitter followers.
9 of
57. Mona Seif
\nAge: 30
\n64 (2015)
\nCulture and society
\nPart of a family of social activists, Mona Seif grew up taking an early interest in many of the social issues facing her home country of Egypt. Her father is a human rights attorney who was imprisoned for five years, while her mother helped organise demonstrations against the Mubarak regime during the decades before his downfall. Her brother, Alaa Abd El Fattah, was imprisoned for 45 days for his blog Manalaa, through which he used to document abuses by the Mubarak regime. Following in her family's footsteps, Seif became known for her participation in dissident movements during and after the 2011 Arab Spring.
\nShe co-founded the campaign, No to Military Trials for Civilians, which pushes for the release of those detained during the Egyptian revolution, and manages a blog called Tahrir Diaries — Diaries Under Military Rule.
\nShe also regularly writes on her blog Ma3t, requesting that people come forward with their own stories for publication.
\nIn 2012, Seif was a finalist for the Front Line Award for Human Rights Defenders at Risk, and in 2013 she was a finalist for Geneva human rights prize the Martin Ennals Award for Human Rights Defenders, presented by Human Rights Watch. She told the press in February: "They [the authorities] cannot silence people with bloodshed."
\nWhen not campaigning for human rights in Egypt, Seif is a biology graduate student investigating the BRCA1 breast cancer gene and its mutation pattern in Egyptian patients.
10 of
60. Ali Al Saloom
\nAge: 37
\nNew entry
\nCultural ambassador
\nCulture and society
\nRising media star and public speaker Ali Al Saloom aims to increase cultural awareness of the UAE across the Gulf and beyond. Educated in the US and Canada, Alsaloom has lived in several countries, including the UK, France, Hungary and Spain, and says this has given him a deeper appreciation of his Emirati heritage.
\nWith a university degree in hospitality management and tourism and a Master's in Brand and Cross-Cultural Management, Al Saloom wanted to apply his knowledge to his hometown's fast-growing tourism industry.
\nHe joined the Abu Dhabi Tourism & Culture Authority in 2005, helping to build the city's first Meeting, Incentives, Conference and Exhibition (MICE) department. His strong communication skills and sense of "showmanship" meant he became the go-to employee to deliver special city tours and presentations to VIP guests, including actor Antonio Banderas and architect Frank Gehry.
\nSince leaving the authority to build his own business, he is now a recognised cultural and tourism ambassador for the UAE. He has delivered hundreds of cultural awareness talks and seminars to businesses looking to set up or expand in the emirates via his holding company Maestro Enterprises, as well as advising tourists and other members of the public via his TV show 'Ask Ali', which answers questions on all things Emirati, from the country' working hours to must-see destinations.
\nHe was chosen as the Best Male Personality in 2010 by Ahlan magazine for his work and was named as one of Time Out Dubai's 40 Local Heroes in 2008. Al Saloom is also a member of the Professional Speakers Association of the Middle East.
11 of
62. Hassan Al Damluji
\nAge: 33
\n81 (2015)
\nHead of Middle East relations, Bill & Melinda Gates Foundation
\nUK (Iraq)
\nCulture and society
\nAs head of Middle East relations for the world's largest private foundation, the Bill and Melinda Gates Foundation, Hassan Al Damluji is helping to manage colossal change in the Arab world. Last year, he led a $2.5bn development fund in partnership with the Islamic Development Bank that aims to tackle poverty in the Islamic world. The Lives & Livelihoods Fund will finance projects in areas of health, agriculture, and basic infrastructure. Al Damluji also focuses on health issues including polio and malaria, which he says are major health concerns in the Arab world.
\nThe Bill and Melinda Gates Foundation itself aims at improving healthcare and education as well as decreasing poverty worldwide. Though it focuses on Sub Saharan Africa, South Asia and parts of China, it has attended to the Middle East's poorer areas as well as sought cooperation from Gulf countries, who have given heavily to the foundation.
\nPrior to taking on his position at the foundation, Al Damluji worked as an engagement manager at consultancy McKinsey. He has an Master of Arts in Middle Eastern Studies from Harvard University and a double first in Classics and Arabic from Oxford.
12 of
63. Hayla Ghazal
\nAge: 20
\nNew entry
\nUAE (Syria)
\nCulture and society
\nBlogging has changed the lives of many, not least Hayla Ghazal. Now the owner of a fashion boutique and a successful blogger, she began by launching her own YouTube channel and blog, HaylaTV, at 18.
\nIntended to help shy teenagers like herself deal with peer pressure, the channel comprised everything from makeup tutorials to cooking tips and style advice.
\n"It's great to see more women recognising how technology can empower them to own their own voice, speak up and share anything they want," she told Arabian Business recently.
\nAt 20, Ghazal now has her own brand extension, including a fashion boutique called Hayla Couture, featuring evening gowns and bridal dresses, and a strong following of over 400,000 on her blog and social media pages. But they were not Ghazal's first career ventures. At 15, she took a part-time job at a fashion agency, which helped to push her into her current direction. Ghazal is also pursuing a business management degree.
13 of
65. Ramzi Jaber
\nAge: 30
\n83 (2015)
\nCo-founder, Visualizing Impact
\nCulture and society
\nRamzi Jaber is changing the world one infographic at a time. Alongside Joumana Al Jabri, he co-founded Visualizing Impact (VI), a non-profit organisation that uses design and technology to create infographics, or data-based stories, aimed at informing the public about social justice issues and encouraging social change. It was under this firm that he started Visualizing Palestine, a similar initiative focused on social injustices in Palestine, from unfit drinking water in Gaza to the imprisonment of Palestinian civilians without trial.
\nThe idea for VI first came to Jaber after he quit his job as a civil engineer to organise an independent TEDx event in Ramallah. The event had such a profound impact on him, for 18 months afterwards, he kept "asking myself two questions over and over again. Why are we in this mess? And who is doing something about it?" he told Kalimat magazine.
\nToday, Jabri's infographics have been used in publications including The Guardian, and on Huffington Post, Al Jazeera, and Daily Beast. They also have been used in books and universities to help design students.
\nJaber is also the co-founder of onlinecensorship.org, a platform for people to crowdsource examples of censorship enacted by social media companies.
\nIn 2013, Jaber was awarded a fellowship by Ashoka, the world's largest network for social entrepreneurs.\n
14 of
67. Zeina Abou Chaaban
\nAge: 33
\n50 (2015)
\nFounder, Palestyle
\nUAE (Palestine)
\nCulture and society
\nThere are few people empowering women refugees. One of them is Zeina Abou Chaaban. Originally a logistics planner for Procter & Gamble (P&G) in Dubai, Abou Chaaban is the co-founder of heritage-based fashion brand, Palestyle. The business model involves paying women in refugee camps for embroidery work, which is then stitched into a Palestyle design. Part of the proceeds of sales also are diverted to social development projects in the camps.
\nSo far, the brand has employed 100 refugee women to produce the embroidery and benefited over 4,000 refugees with social projects such as a water tank exchange program and olive tree plantation.
\nAbou Chaaban told The National newspaper that what makes embroidery unique is that it speaks the language of a culture. The refugee women use the traditional Palestinian embroidery style for all their work, which is then used for Palestyle products such as pillow covers, bags and menswear.
\nPalestyle has become so popular it is now being sold in some of the world's top high-end retailers including Bloomingdales, Etoile, and House of Frasier. Its products have been seen on celebrities such as Gwyneth Paltrow and Eva Longoria and are available in boutiques across the UAE, Qatar, Pakistan, and the UK.
\nThe idea to merge heritage and fashion came to Abou Chaaban while on a visit to a refugee camp in Lebanon. She was inspired by the colourful embroideries of refugee women who, despite living in harsh conditions, continued to engage in the age-old Arab tradition.
\nToday, she runs the firm alongside her brother Ahmed, who joined her in 2011.
15 of
71. Omar Samra
\nAge: 37
\n47 (2015)
\nEntrepreneur, adventurer
\nCulture and society
\nIt does not get much more exciting than Omar Samra's life. He is best known for being the first Egyptian to climb Mount Everest and the Seven Summits and ski to both the Geographic South and North Poles. The adventurer reached the highest point on Earth in 2007 and completed the Seven Summits challenge in 2014, becoming the first Egyptian to complete the "Explorer's Grand Slam".
\nBut Samra's impressive list of accomplishments does not stop with physical endurance. The 37-year-old graduated with a Bachelor of Arts with a major in economics and a minor in business administration and earned an MBA, particularly concentrating in entrepreneurship, from the London Business School in 2007. Two years later he founded Wild Guanabana, a carbon-neutral travel company specialising in ethical and adventure travel. Guanabana has offices in Cairo and Dubai, where Samra lives.
\nSamra had worked at HSBC in London and Hong Kong for two-and-a-half years before he threw it in to embark on a 370-day journey across 14 countries in Asia and Latin America that sparked his fascination with travel and adventure. Where to next Samra?
16 of
72. Loujain Al Hathloul
\nAge: 26
\n21 (2015)
\nSaudi Arabia
\nCulture and society
\nLoujain Al Hathloul made global headlines when she was arrested for driving in Saudi Arabia, defying the kingdom's informal ban. The women's rights activist and social media figure was again detained on December 1 last year, when she attempted to drive from the UAE to Saudi Arabia to highlight the discrepancy in the kingdom's ban compared to other Gulf states that allow women to drive. Arrested on the Saudi side of the border, she was held for 73 days.
\nIn an interview with The Telegraph, Al Hathloul revealed that her father, who supports the campaign, was in the passenger seat at the time. She credits her freedom to her liberal father.
\nAl Hathloul was also among the first women to run for local council in Saudi Arabia's historic elections in December, last year. But she said she was not interested in competing or winning. "I'm focused on increasing the number of women who stand in elections," she told the British daily.
\nThe activist is married to Fahad Albutairi, a renowned YouTube personality and Saudi's first stand-up comedian to perform professionally.
17 of
73. Lama Younis
\nAge: 33
\nNew entry
\nFounder, Hissah Enrichment Centre
\nUAE (Saudi Arabia)
\nCulture and society
\n"You were born unique and you should continue your life journey being unique." Lama Younis is without a doubt unique. The Saudi national is a forensic psychologist, criminologist, and founder of Hissah Enrichment Centre. As a Saudi woman, it was not easy for Younis to acquire the three titles, which is why she is also an advocate for personal and social improvement and hopes to push women in the GCC to "follow what they really want to be".
\nHer enrichment centre, named after her mother and launched in 2013, focuses on the prevention of child abuse and the empowerment of its victims in the region. It also works to enrich interpersonal skills, develop personal empowerment, and improve social relationships on personal and professional levels for adults, youth and children.
\nYounis completed her counselling psychology studies at Effat University in Saudi Arabia in 2005. She then went on to obtain a Master's Degree in Criminology and Forensic Psychology from Middlesex University in London, after which she finished her PhD in Childhood Studies in the UK.
18 of
74. Khalifa Saleh Al Haroon
\nAge: 32
\n85 (2015)
\nFounder, IloveQatar.net
\nCulture and society
\nKhalifa Saleh Al Haroon graduated with a law degree and worked in investment banking, but he ended up as an online specialist — and a successful one too.
\nHe is best known for founding several companies including a popular digital network of websites including the brands iLoveQatar.net, Qatar Events, and Qatar News, as well as online programmes such as QTips, Mr. Q Visits, Karak Time, Raqami TV, and Top 5 Everything. He is also the founder and CEO of Haroon United Group (HUG), a holding company housing a range of brands and start-ups including Shake Shake and King Koil, as well as the executive director for marketing and communications at Qatar Stars League, Qatar's top football league.
\nFor his achievements, he was named Entrepreneur of the Year by Qatar's Ministry of Information and Communications Technology in 2011, made an ambassador for Qatar's National Cancer Programme, a board member of the Internet Society (ISOC) and vice president of the Entrepreneurs' Organisation (Qatar).
\nAl Haroon is currently working on Identity Qatar, a joint venture with PJ Media, run by Peter Jones from Dragons Den, ILQ Radio, Shake Shake and Misha.
19 of
77. Awni Farhat
\nAge: 27
\nNew entry
\nUK (Palestine)
\nCulture and society
\nYou would never guess that Awni Farhat was born in a refugee camp in the Gaza Strip. He is multilingual and has worked as a translator for international journalists and activists, has project managed the Children Monitoring and Reporting Groups Coalition — which supports Palestinian children and is funded by Save the Children International — and is the products and endorsements coordinator for the international campaign Gaza's Ark. It is safe to say that he has achieved more than many would have hoped to achieve in their lives. But his resume does not stop there.
\nIn 2014, Farhat set up a crowdfunding website that allows visitors to donate money towards any of the not-so-typical causes listed on the site. His own cause? Farhat was inspired to create the site because he needed help funding a Master's Degree programme in Violence, Conflict, and Development in the UK, a qualification he wanted so he could return to Palestine and help make a difference.
\nA year later, Farhat hit his target. He responded aptly on his website: "I have come to believe strongly that knowledge and education are the most powerful tools that we can use to change the world".
20 of
83. Abdullah Al Jumah
\nAge: 29
\n78 (2015)
\nSaudi Arabia
\nCulture and society
\nAs well as lecturing on law at King Saud University in Riyadh and acting as legal counsel to the Ministry of Petroleum and Mineral Resources, Abdullah Al Jumah is an acclaimed author.
\nThe Harvard Law School graduate was inspired to become a travel writer after the impressive response he received from his Twitter followers each time he tweeted about his travels. Jumah wrote the book Tales of a Saudi in Europe after being inspired by those who followed his journey with him online.
\nIn the book, a collection of 11 stories and anecdotes from nine different European countries, Jumah writes from the perspective of a Saudi trying to relate to entirely different cultures.
\n"It was all about travelling as a traveller and not as a tourist. It's a different experience that people should try once in a while, because it gives them a chance to deeply explore the country they are visiting and engage with other cultures in a more meaningful way," Al Jumah said in an interview with Gulf News last year.
\nHe makes an effort to interact and mingle with locals wherever he travels to, which he says creates a more complete travel experience.
\nJumah's other books are 'Greats Without Schools' and 'Orphans who Changed the Course of History'.
21 of
86. Raha Moharrak
\nAge: 29
\n97 (2015)
\nExplorer/Mountain climber
\nSaudi Arabia
\nCulture and society
\nAt the age of 25, Raha Moharrak became the youngest Arab and the first Saudi woman to conquer Mount Everest.
\nPrior to tackling the world's tallest mountain in 2013, Moharrak had already climbed Mount Kilimanjaro, Mount Vinson (Antarctica), Mount Elbrus (Russia) and Aconcagua (Argentina), along with a host of other peaks on different continents.
\nShe said in an interview that in searching for something different and adventurous, she explored the idea of climbing Mount Kilimanjaro, having already mastered scuba diving, sky diving and shark diving.
\n"I got a lot of resistance from my society and the people around me, which further pushed me towards taking the decision to actually climb it. I felt like this was something that I really wanted to do and it would give me a completely new and different outlook on life in general," she said in an interview with Edarabia education journal.
\nShe spent months in Nepal before executing her plan to conquer Mount Everest. She was joined by 34 other mountaineers and 29 guides in reaching the summit on May 18, 2013 from the Nepalese side of the mountain.
\nSpeaking about her achievement, she said: "I really don't care about being the first, so long as it inspires someone else to be second."
\nMoharrak also has revealed details of a planned book entitled 'For All Us Dreamers', the story of the Saudi woman who endeavoured to touch the sky. She is also studying an MBA in Women's Leadership at Synergy University Dubai Campus.
22 of
87. Kais Salman
\nAge: 39
\n51 (2015)
\nLebanon (Syria)
\nCulture and society
\nAs a Syrian, Kais Salman's homeland provides him with plenty of inspiration for his paintings. The contemporary art pieces use satire to subvert the normalisation of greed, vanity, and ideological extremism.
\nSalman says each of his series of works has sought to reflect a type of psychological violence that occurs when excess becomes rationalised and accepted by societies. Terrorism, consumerism, cosmetic surgery, and the voyeurism of the digital age have all served as topics of Salman's carnival-esque compositions.
\nBorn in Tartous, Syria in 1976, Salman now lives and works in Beirut. He received a Bachelor of Arts from the Faculty of Fine Arts, Damascus in 2002. His paintings are currently housed in private collections throughout the Middle East, North Africa and Europe.
\nSolo and group exhibitions include the Alexandria Biennale (2014); Ayyam Gallery DIFC, Dubai (2014, 2010); Ayyam Gallery Beirut (2015, 2014, 2012); Ayyam Gallery Al Quoz, Dubai (2014, 2011, 2010); Damascus Museum of Modern Art (2009); The Park Avenue Armory, New York (2008); Carthage Festival for Coast Mediterranean Sea Artists, Tunisia (2005).
\nIn May 2010, a work from his Fashion Series appeared on the cover of the Wall Street Journal's Weekend Edition magazine, a first for an Arab artist.
23 of
90. Aya Chebbi
\nAge: 27
\nNew entry
\nCulture and society
\nAya Chebbi, an award winning Pan-Africa feminist, activist and blogger, started her activism at summer camps, as a peer educator on sexual health and HIV/AIDS and as a Red Crescent volunteer.
\nAs a children's mentor, Aya helped direct a national organisation for Tunisian children, improving to improve their lives and protect their rights. She organised workshops and events for orphans, handicapped and hospitalised kids, mainly suffering from cancer.
\nAfter the 2011 revolution in Tunisia, she volunteered at the refugee camps on the Tunisian-Libyan borders to help Libyan children during the refugee crisis.
\nShe considers that her life's mission is to put smiles on children's faces.
\nShe has spoken widely about social movements worldwide for conferences and rallies in the US, Canada, Poland, Turkey, Kenya, Ethiopia and South Africa, among other countries. She is also a regular guest speaker at settings such as the African Union and the United Nations.
\nIn recognition of her achievements, Aya was named as one of Africa's most Outstanding Young Women Leaders in 2013.
\nAya has travelled to over 20 African countries working with young people and represented Africa internationally for the past four years. She considers her life's mission uniting North Africa with the rest of the continent based on her pan-African vision, changing the narratives about Tunisia, Africa and the Middle East and promoting youth agenda regionally and internationally.
24 of
91. Sherine Abdel Wahab
\nAge: 35
\n84 (2015)
\nSinger, actress
\nCulture and society
\nSimply known as Sherine, Egyptian singer and actress Sherine Abdel Wahhab began her music career with the single 'Ah Ya Leil' (Oh, night!) in 2000, and has since released several albums.
\nMore recently, she has been a judge and coach on the Arabic version of 'The Voice' ('The Voice Ahla Sawt'), a reality television competition for musicians now in its third season.
\nIn the latest series, Sherine's chosen act Nedaa Sharara won the competition, which had 150 million viewers across the Middle East, according to broadcasters MBC. Prior to the airing of the season finale, Sherine made newspaper headlines when she criticsed US presidential hopeful Donald Trump for his pledge to temporarily ban Muslims from entering America.
\n"I don't like politics and I don't like delving into politics," she said, "but not anyone in America can speak about us and insult us and say we shouldn't be let into his country, especially considering how little he knows about us and about our talents."
25 of
94. Hisham Fageeh
\nAge: 28
\nNew entry
\nComedian, actor
\nSaudi Arabia
\nCulture and society
\nIf he was not already known for his comedy, Riyadh-based Hisham Fageeh's Bob Marley-inspired 'No woman, No drive' satire made sure he was. Produced with fellow comedians Fahad Albutairi and Alaa Wardi, the clip went viral the same day that a number of Saudi women defied the kingdom's driving ban.
\nFageeh began performing stand-up while at Columbia University and performed in Arabic in his YouTube series Isboo'iyat Hisham, which subsequently went viral.
\nFageeh has also turned to acting, first with a role in the short film 'Daughter', and then a small part in the hit Middle East-based feature length film 'From A to B', about childhood friends who embark on a road trip from Abu Dhabi to Beirut.
\nFageeh landed the leading role in the hit Saudi romantic comedy 'Barakah Meets Barakah', which was a surprise hit at the Berlin Film Festival.
26 of
95. Huda Kattan
\nAge: 32
\n94 (2015)
\nFounder of Huda Beauty, blogger
\nCulture and society
\nDubai-based Huda Kattan is one of the top beauty influencers and bloggers in the region.
\nShe used her public profile to go on to found her own beauty brand, Huda Beauty, under which she runs a line of false lashes, false nails and henna tattoos, all of which are best-selling products at worldwide branches of French cosmetics giant, Sephora. Her lip contouring kit also is in the pipeline.
\nThe 32-year-old makeup artist started her career in 2010 by writing makeup tips and tricks and filming YouTube tutorials.
\nWith a 12 million-strong following on her Instagram account alone, Kattan has proven that she does more than just blog. While the blog itself made little money for the first four years, Kattan told Arabian Business this month that her cosmetics business had more than doubled over the past two years, driven largely by the beauty products.
Up Next
In Pictures: 100 under 40: The world's most influential young Arabs 2016 - Arts and entertainment
In Pictures: 100 under 40: The world's most influential young Arabs 2016 - Media
27 Mar 2016
In Pictures: 100 under 40: The world's most influential young Arabs 2016 - Science and technology
27 Mar 2016
In Pictures: 100 under 40: The world's most influential young Arabs 2016 - Sport and education
27 Mar 2016
Sun 27 Mar 2016 11:36 AM GST
Saudi Arabia
United Arab Emirates
United Arab Emirates
Saudi Arabia
United Arab Emirates
Saudi Arabia
Culture & Society
Recent Galleries
In pictures: The world's highest-paid celebrities
Gallery: Sharjah ruler performs funeral prayers on Sheikh Khalid Al Qasimi
Gallery: Stars of celebrity and sporting worlds feature in Dubai Duty Free Irish Open Pro Am
In pictures: Hampton Court Palace Flower Show
In pictures: Manchester bee mural tribute to arena victims
In pictures: Kafkasor bullfighting in Turkey
In pictures: Massive fire breaks out in Kuwait building
In pictures: Amusement park in Palestine
In pictures: Phone booths in Times Square tell oral histories of immigrant New Yorkers
In pictures: UAE Rulers perform Eid al-Fitr prayer


text:
Archive for the 'Intermediate' Category
Unit Tests: Not Just for Dev – Idea 1
Unit tests offer much more than just the means to get 75%+ code coverage, and they can be used to protect more than just Apex. Read the intro to this series in Idea 0.
Our first example is the simplest: protecting fields that you don't want deleted. A use case for this is External Integrations that rely on Salesforce fields. If someone tries to delete the fields, you want to ensure that they are alerted to the impact. By including the fields Current Generators and SIC Code in the example Unit Test below, an attempt to delete the fields will throw an error referencing the unit test.
@isTest private class UnitTest1 { static testMethod void protectFields(){ /*Create a new Lead, populating any Fields you need to protect * In this case, we want to ensure Current Generators and SIC Code cannot be deleted * or the field type changed by including them in this Apex Unit Test */ Lead l = new Lead(Company = 'Test Lead', LastName = 'Lead Last Name', CurrentGenerators__c = 'Generator X', SICCode__c = '1234-ABC'); insert l; } }
Let's describe what's happening here.
We start off with the all-important @isTest flag. This tells Salesforce that the Apex Class contains only test Methods. That means nothing you do in the Class will be saved to the server, and will not delete or change anything on the server. It also means you cannot use most records that exist on the server, so you have to create your own test records.
@isTest means that Salesforce will recognize it as a test Class, and when you Run All Tests, it will know to run this test too.
Next is the Class Name, UnitTest1 and its access modifier is set to "private". Access modifiers are irrelevant for Unit Tests, private is the default.
The actual test Method here is protectFields(). Your test exists between the curly braces {}. Here you must create your test records and perform any actions you want tested. The critical item here is "testMethod" which ensures that Salesforce recognizes the method as performing tests. Without this, Salesforce will not report a test failure regardless of the outcome.
In this case we are creating a Lead. We are using standard Apex code to create a Lead, to populate fields on that Lead, and finally to use DML to insert the Lead. Required fields and Validation Rules will get enforced when you create the Lead, so be sure to include any fields affected by them.
Once this Unit Test is saved to the server, any attempt to delete the field or change its data type will be blocked with a reference to this Unit Test.
For this limited scenario, that's all we need!
Unit Tests: Not Just for Dev – Idea 0
This post is kicking off a series of posts about how Salesforce Admins & Developers can use Unit Tests for more than just testing Apex. The target audience is Admins who haven't written Unit Tests. The ideas for Unit Tests here are intended to be easily copied and modified by anyone with System Admin access, a Sandbox or Developer Edition Org and a need to add a little more protection to their hard-won successes in building their org.
Unit Tests are designed to test Apex Triggers and Classes. They are required for deploying them to Production, but more important they are an essential tool to ensure that your logic, both Apex and declarative, does what it's supposed to do, and nothing more or less.
But how else can they be useful?
Protection Integrations: Many Salesforce Orgs are now integrated with other applications and rely on the fields in Salesforce to, well, exist. And not to change or get locked down. Unit tests can be used to protect all the fields an integration uses against deletion, against changes to field type or restrictions by Field-level Security or Validation Rules.
Testing Declarative-only Apps: All those Clicks-not-Code components can add up to a complex series of Workflow Rules, Formula Fields and Validation Rules where you've got an application that is vulnerable to even slight changes. Unit tests can be used to ensure that a series of related Rules and Fields perform as expected, and that changes don't disrupt the outcome.
And that application's complexity can become difficult to test when there are hundreds of combinations of fields and their values. Throw in the ability to mass edit records in Views or Data Loader and you've got hours of manual tests to perform. Unit Test can be written to try all the combinations you want to throw at it, for hundreds of records.
The Ideas and Unit Tests in this series are all written using the sample data and metadata from the Developer Edition Orgs. Where necessary, I'll add some new Workflow Rules, Validation Rules and Fields to come up with viable scenarios. If you don't already have a Developer Edition org, you can get one (or one hundred) free Orgs at developer.force.com.
Because it's so handy, we'll use the Developer Console to write and run the Unit Tests, but you can also use the Force.com IDE for Eclipse, MavensMate or even the declarative interface.
You won't need to know much Apex. I'll attempt to explain the parts that are not intuitive, or just advise you to do-as-I-do if the explanation won't help (or I don't know either).
So put your pencils down, Testing time is up: Idea 1
Apex – Sorting a map
So this is going to be one of the more apex heavy posts. This is a challenge I think many developers
have come across, and while what I propose is by no means the most elegant thing ever, it does do the
job until hopefully salesforce implements a native map sorting method. So here is the basic approach
1) populate map with information
2) create another map with the keys as the values you want to sort by, and the value as the key
for the other map.
3) create a list whos values are the keyset of the map created in step 2
4) sort the list
5) iterate over the list which now has your values in order, get the value from map 2 using the
current loop iterator as the key.
Sounds pretty complicated eh? It's not SO bad once you kinda get the hang of it, but there is one
gotcha that kind of sucks, but we'll cover that in a minute.
Here is a sample using a simple object called contestEntry. We'll create a bunch of them with
random ordering, and then sort them and loop over the sorted result. You should be able to run this
in any org so you can see the principals in action.
public class contestEntry { public decimal rank{get;set;} public string name{get;set;} } map<string,contestEntry> entries = new map<string,contestEntry>(); contestEntry entry1 = new contestEntry(); entry1.rank = 5; entry1.name = 'Frank'; entries.put(entry1.name,entry1); contestEntry entry2 = new contestEntry(); entry2.rank = 3; entry2.name = 'Bob'; entries.put(entry2.name,entry2); contestEntry entry3 = new contestEntry(); entry3.rank = 1; entry3.name = 'Jones'; entries.put(entry3.name,entry3); contestEntry entry4 = new contestEntry(); entry4.rank = 4; entry4.name = 'Sandy'; entries.put(entry4.name,entry4); contestEntry entry5 = new contestEntry(); entry5.rank = 2; entry5.name = 'Felix'; entries.put(entry5.name,entry5); //oh no, these entries are all out of order. system.debug(entries) ; //lets get sorting these guys. First we'll need a map to store the rank, and the contestEntry that rank is //associated with map<decimal,string> rankToNameMap = new map<decimal,string>(); for(contestEntry entry : entries.values()) { rankToNameMap.put(entry.rank,entry.name); } //now lets put those ranks in a list list<decimal> ranksList = new list<decimal>(); ranksList.addAll(rankToNameMap.keySet()); //now sort them ranksList.sort(); //ok, so now we have the ranks in order, we need to figure out who had that rank for(decimal rank : ranksList) { String thisEntryName = rankToNameMap.get(rank); contestEntry thisEntry = entries.get(thisEntryName); system.debug(thisEntry); }
Walking through it first we just make a sample object to use here. Normally this would be whatever you are actually trying to sort, but for the sake of easyness I just created an object called contestEntry. It just holds a name and a rank.
So then I make a map of those things, keyed by the persona name, and containing the contestEntry object. You might in real life have a map of sObjects keyed by their Id and containing the sObject itself. So then I make a bunch of those and add them to the map in random order so my sorting actually has some work to do 😛
The next thing is creating a map with the key of the value I want to sort this list by. The value is key of the first map. So in real life this might be a dollar amount on an opportunity and then the opportunity Id if the original map was a list of opportunities keyed by their Id.
We loop over all the objects in the original map, and add them to our temporary sorting map, again keyed by value to sort by, and value with key from original map.
Then we create a list of the type of the key of the temporary sorting map. Your key was a decimal? Then your list is of decimals as well, etc. Then add all the keys from the sorting map to the list you just made.
Sort the list.
Iterate over the sorted list, each entry in this list will be a key you can use to get the entry from the sorting map, which will contain the key to the original map. You now have a reference to your original map value by whatever value you sorted on.
There is however one gotcha with this approach. If you have duplicates in the value you are going to sort by, you are going to end up with collisions in your sorting map, which will end up with values overwriting each other and ultimately values missing in your final iteration. This happens because say in my example I have two people with rank 1. First person comes through, their rank is 1, and their name is Sandy. So the sorting map has 1=sandy. Then another person comes through, they also have rank 1 and their name is jones. Now the map has 1=jones. Sandy just fell out of the list. How do you deal with this? The best hack-ish fix I could come up with is to see if the key you are attempting to write to already exists, if so, then write to a slightly higher value key. Basically replace
for(contestEntry entry : entries.values()) { rankToNameMap.put(entry.rank,entry.name); }
for(contestEntry entry : entries.values()) { decimal rank = entry.rank; while(rankToNameMap.containsKey(rank)) { system.debug('------ INCRIMENTING Rank TOTAL FOR ' + entry.name); rank += 0.001; } rankToNameMap.put(rank,entry.name); }
This won't affect the value displayed when you retrieve and display the object, it just changes the sort order. I haven't tested this throughly though so don't rely on it extensively.
Anyway, there you have it Apex fans. A method to reliable (if not quickly or efficiently) sort Apex maps by just about anything. Once you understand the concepts it's fairly easy to expand to sort to your hearts desire.
Originally posted by Kenji776 @ http://iwritecrappycode.wordpress.com/2011/09/28/apex-sorting-a-map/
Mastering the Force.com IDE: Searching metadata
The Force.com IDE is a developer application that is great utility for Salesforce.com administrators even if they never have to write or troubleshoot Apex or Visualforce. The most useful capability for any admin is the Search feature which allows you to find all the places a field is used: workflow, reports, templates, formulas, etc.
Let's consider this scenario: you've been hired to update a company's Salesforce org and you discover a duplicate field on Accounts. You run reports and find out both fields are populated with data. Before you can decide which one to keep and which to delete, you need to know all the locations in which each field is used: reports, views, workflow, templates, etc. You can find all those configurations in minutes with your Salesforce org's metadata in a project in the Force.com IDE.
I'll assume you've already installed Eclipse and the Force.com IDE. If you haven't, developer.force.com has a great page to help you; see you back here soon!
The first step is to create a Force.com project that contains all your metadata. Do this during the set up by selecting all the Metadata components.
If you have a very large amount of metadata and Eclipse throws a Java Out of Memory error, you can either apply this solution or choose fewer metadata components. You should at least include the following to ensure you are searching the common components that reference fields.
|file extension
|Apex Classes
Visualforce Components
Email Templates
Page Layout
Custom Objects
Standard Objects
Object Translations
Visualforce Pages
Reports(includes reports built from Custom Report Types)
Apex Triggers
Once you have created your project, you're ready to start your search!
- Click on your Project to highlight it
- Click on the Search menu in the menu bar and select Search… to open the Search dialog box
- Enter the API Name of the field you're seeking in Containing Text
- Copy the following file extension names into the field called File Name Patterns:
*.cls, *.component, *.email, *.layout, *.object, *.page, *.profile, *.report, *.scontrols, *.trigger, *.workflow
- Set the Scope option to "Selected Resource" to ensure that only one Project is being searched.
- Click Search
- The Search Results pane will open when your search is completed with a list of all locations where the field occurs.
The following video demonstrates these steps in the Force.com IDE for Windows (Mac version is similar)
The search results will show you a tree with all the results in each metadata component. Click on any result will open the metadata file and show you exactly where your field occurs. You'll be viewing XML, but don't worry if you've never looked at XML before, there's nothing tricky here. In fact, the tags you see are very friendly. They'll be "nested" which means indented like a outline so that you can tell which tags are subordinate to which other tags. With a little investigative analysis, you'll be able to discern the exactly how a field is being used in the metadata.
For example, in this screenshot you can see the Search results pane showing the components in which the field was found. The Reports components are open and the report called "Server Alerts" has two matches. By clicking on the matches, the Server_Alerts.report XML file is opened and the matches are highlighted. In the XML you can see all the configurations for this particular report. The <columns> tags show which columns are displayed in the report's output, so we can see that our "App Server" field is one of the output columns. We also see the field nested in the <filter> tags and can translate the XML tags to tell us that the field is being used in a filter with the operator "notEqual" and no value which means we are looking for records where App Server is not populated with any data. You can compare it to the actual report in the UI which is depicted in the second image below.
Visualforce Code Generator
This is a cross post from my Blog Post.
We know how much important role visualforce plays in our application. There are many instance where we need to create a visualforce page and apex class. Salesforce provides powerful tools like workflows, approvals, validation etc. from which we can implement our business functionalities with just button clicks.
Now I was having a requirement where I need to create many visualforce pages, some are custom and some are cloning native page with native layouts with some small changes. This just clicked me to create a tool from which we can create a visualforce page code with just clicking buttons. Yes!! Visualforce page code with button click.
This saved a lot of time, as I do not need to write any thing to create a heavy visualforce page and amazingly it is done just using button clicks.
Install the package : https://login.salesforce.com/packaging/installPackage.apexp?p0=04t90000000Pqos
Just append "/apex/vfgenerator__codegenerator" in URL.
Now let me jump into the explanation what exactly I have done. A simple UI will be displayed, where user can select the desired type of page, object name, record type, email field.
Object Name : Valid object API name (include namespace if any)
Record Type : Record type Id of object selected in Object Name
Type of Page :
- Edit : Code will be generated for the edit page of the object (according to "record type" layout if selected any).
- Detail : Code will be generated for the detail page of the object (according to "record type" layout if selected any)
- Custom Detail : Code will be generated for detail page according to the fields selected from UI
- Custom Edit : Code will be generated for edit page according to the fields selected from UI
In the above screen I have selected "Edit" as the type of page and "Account" in object, also provided my email. When I click "Generate Code" it displays like this :
Just copy the code and paste it in new visualforce page. Why I have given my email id because when you paste the code in visualforce page it will loose all the formatting and will display in one single line, but code sent on email will come with formatting. So we can copy the generated code from email also. Now when you hit the newly created visualforce page it will display all fields in edit mode which are displayed on native edit page. Isn't that good?
Now lets try creating some custom visualforce page. Select "Custom Edit" in "Type of Page" and "Account" in "Object Name". It will display a section "Select Fields". Click on "Display Fields", it will display all fields which are up datable by present user.
Select some fields and click on "Generate Code". Again copy paste the code in your visualforce page, it will display selected fields in edit mode.
Now heavy visualforce pages are created with just button clicks.
Package provided is managed because the tool is under testing and I would like to have feedback from you all. Once it is free from all bugs I will provide the code.
Declaration: You may find similar post related to "Visualforce Code Generator". The end result may be similar but there is a considerable difference in the approaches being followed here. So I, hereby declare that my project is entirely my own creation and has not been copied from any other person/organization's words or idea. Please feel free to drop me an email at "firstname.lastname@example.com" if there is any disagreement.
Writing Good Test Methods
Yesterday Rebecca (@sfdc_nerd) posted about her first trigger. She did a great job and even got 100% coverage from her test class. Rebecca had actually posted this on her own blog: A force behind the force a few days earlier and I noted that she needed to do just one more thing in her test class to make it a real test. The one thing she didn't do was check that the trigger actually created the record it was supposed to create and we sorted that out with a phone call and an email. Afterwards I started thinking that it would be good to explain what a test method really needs to be "complete" and figured I would post it here. I have come up with a slightly contrived example below to illustrate some extra points.
I often see test classes written which achieve the necessary code coverage but aren't exactly "tests". Salesforce.com requires at least 75% code coverage to deploy code to a production environment. Some developers then see 75% as the goal and are happy once they cross that threshhold when they should really be shooting for 100%. Now, if you have spent any time doing development in Salesforce, you know that 100% coverage is sometimes impossible, but we should at least aim for 100%.
With that in mind, I wanted to dissect a simple test class to explain (in my opinion at least, please feel free to chime in) what you should be aiming to achieve when writing a test class.
Consider the following trigger which creates a task to call the lead when the lead is created. The due date of the lead should be 7 days from today unless a lead for a member of the very important 'Elephantman' family calls in. Then we will make the task due tomorrow (sorry about the formatting, wordpress doesn't like me today).
trigger newLeadTask on Lead (after Insert) { List<Task> taskList = new List<Task>(); for(Lead l : trigger.new){ Task t = new Task(Subject = 'Contact Lead', WhoId = l.id, Status = 'Not Started', OwnerId = l.OwnerId); if(l.LastName <> 'Elephantman'){ t.ActivityDate = Date.today()+7; }else{ t.ActivityDate = Date.today()+1; } taskList.add(t); } insert taskList; }
In order to test this, we must write a class which will insert a lead. Inserting the lead will cause the trigger to fire and the code will be executed.
@isTest private class testLead{ private static testmethod void testLeadActivity(){ Lead l = new Lead(LastName = 'Randomname', Company = 'ABC, Inc.'); insert l; } }
Running this test we see that we get 87% coverage of our trigger. Awesome, we are ready to deploy to production because we are above 75%. Well, yes, but we are aiming for 100% here if we can get it.
We need to think of the test method as sort of a stand in for a human tester. If you asked your colleague to test this trigger, you would expect them to create a lead. Once the lead was created you would then expect them to actually check that the task was created. Well, let's do that. After we insert the lead, let's query for the newly created task; we should expect that 1 (and only 1) exists and that it has a date 7 days from today:
@isTest private class testLead{ private static testmethod void testLeadActivity(){ Lead l = new Lead(LastName = 'Randomname', Company = 'ABC, Inc.'); insert l; List<Task> taskList = [SELECT id, ActivityDate from Task WHERE whoId = :l.id]; System.assertEquals(1,taskList.size()); System.assertEquals(Date.today()+7,taskList[0].ActivityDate); } }
The first System.assertEquals statement equates to our colleague checking that the task was actually created, the second statment checks that the date is correct. Great, so now we have a valid test but we still haven't tested everything. The logic of the trigger says that if a lead is created for a member of the 'Elephantman' family, then the task due date is the next day. We expect our colleague to test both use cases, so we will do the same.
@isTest //indicates this is a test so that the code below doesn't count against our quota private class testLead{ private static testmethod void testLeadActivity(){ //insert a random (non Elephantman lead) Lead l = new Lead(LastName = 'Randomname', Company = 'ABC, Inc.'); insert l; List<Task> taskList = [SELECT id, ActivityDate from Task WHERE whoId = :l.id]; System.assertEquals(1,taskList.size()); System.assertEquals(Date.today()+7,taskList[0].ActivityDate); //insert an Elephantman lead Lead eMan = new Lead(LastName = 'Elephantman', Company = 'ABC, Inc.'); insert eMan; List<Task> eManTaskList = [SELECT id, ActivityDate from Task WHERE whoId = :eMan.id]; System.assertEquals(1,eManTaskList.size()); System.assertEquals(Date.today()+1,eManTaskList[0].ActivityDate); } }
When I run this test I get 100% coverage and I know that I have fully tested all use cases for this trigger. I can now deploy this to production.
Beyond being good practice, there is a very good reason to write your test classes as completely as possible. On a recent salesforce.com Webinar, I heard it mentioned that Salesforce actually runs ALL, yes ALL, test methods across all orgs before upgrading them to a new release. By writing your test methods properly, you are helping ensure nothing breaks when Salesforce updates to a new version.
Trigger to create a new record
Ask me a year ago, and I never thought I'd be writing triggers, but yet, here I am. I gained a bit of confidence after taking the Salesforce DEV 531 class, and that confidence then flourished with the support of this community. This blog just goes to show how many people out there are willing to help, and I definitely want to return the favor whenever possible. So here goes – the anatomy of my first trigger.
What I was looking to do was to create a new support request record (a custom object) when a new Event record of a specific type was created. Pretty straight-forward, but definitely not doable without a trigger. The final result was this:
trigger createPDtask on Event (after insert) { List<Support_Request__c> sr = new List<Support_Request__c>(); for (Event newEvent: Trigger.New) if (newEvent.Type__c == '1. Meeting - Initial'){ sr.add (new Support_Request__c( Name = 'New PD', Task_Type__c = 'PD', SFDC_Record_ID__c = newEvent.Id, Rep__c = newEvent.OwnerId, Event_Date__c = newEvent.ActivityDate)); } insert sr; }
Now for the breakdown of what I was trying to do with each step. First, I define what I want the trigger to do & when to do it.
trigger createPDtask on Event (after insert) {
The second line compiles all new records I am going to insert into a list (& therefore takes care of bulkifying my trigger).
List<Support_Request__c> sr = new List<Support_Request__c>();
Then I need to define the criteria around the event record that would cause this trigger to create a new support request.
for (Event newEvent: Trigger.New) if (newEvent.Type__c == '1. Meeting - Initial'){
Next, I set the details that get inserted into the new Support Request record. You can see that some are static, while a few are dynamically pulled from the event record.
sr.add (new Support_Request__c( Name = 'New PD', Task_Type__c = 'PD', SFDC_Record_ID__c = newEvent.Id, Rep__c = newEvent.OwnerId, Event_Date__c = newEvent.ActivityDate));
Finally, the list gets inserted.
} insert sr; }
As far as triggers goes, it's pretty simple, but it was a great learning process for me to build on my own. From here, the next step is to write some test coverage, and while I thought I had it in the bag, I'm going to let Kyle share the lesson he gave me in a subsequent post.

subset: commoncrawl


text:
Just 10 twitter tips…
I just wanted to share some thoughts and tips regarding Twitter.
This doesn't (of course!) want to be a comprehensive list of all the things I learnt since 2007 in using this tool. I'm sure many people touched this topic already but I'm honest: I didn't do any research on the web. I didn't want to be influenced by others (thus missing some stuff, inevitably).
1) Use a short nickname. By doing this, you allow people to "retweet" you very easily and you may end up being re-tweeted several times. So a long nickname won't work (remember, maximum characters allowed are 140
2) Enter a Bio. Whether you wanna use it for fun, for business or your to promote your activities, if I want to "follow you" (= read your updates) I want to know who you are. Add short bio and a blog/website if you have it. Remember, a shorter bio is better as you may be read through different clients including the ones for smartphones (so experience may change)
3) Focus your account on yourself. I will follow you based on your interests/passions you have. So, after you updated your bio, you may start talking about the things you like most. Try to focus on 4-5 things (IMHO) and use hash tags (below) !
4) Use Hash Tags. If you want to be more "visible", I'd recommend you to use hash tags. If you are, say, into Ford cards, write the name with the # right before it. So people with the same interests as you may find you. Same for you: if you are interested in Microsoft Lync, you just search for #Lync and you'll find all the latest tweets related to that product
5) Use a desktop client to tweet. Going to http://twitter.com everytime you want to say something is a pain in the neck. I would recommend 2 clients you can install on your desktop: TweetDeck and MetroTwit (but there are tons more)
5) Mention others with @. When you want to mention someone else in one of your tweets, do a quick search on the web and see if she/he has a twitter account. It's a "nice policy" to mention people by simply put @alead (this is myself, as an example)
6) Re-tweet your friends. If you think a news/tweet is worthy for you and your readers, give it a shout and re-tweet it: you may do your friend a favor
7) Shorten your links. This is not something you have to do as, if you are going to use a desktop client, they'll do it automatically. But, just so you know, if you have long hyperlinks you wanna share, you can shorten your links by using some services like TinyUrl or bit.ly (remember the 140 characters limitation: the shorter, the better )
8 ) Engage in conversations. This is important as a lot of people just post stuff but they don't care about what the others are doing. Engaging is a many:many collaboration and, by discussing topics, you really don't know where you'll end up (I started to know a lot of people on Twitter before actually meeting them and that was very nice as I knew a lot about them before the meet)
9) Change your password frequently & settings. This doesn't need to have an explanation. But beware: there are some applications that will ask you to access your twitter account. So, no matter which password you are using, they will still have access to your twitter account. So, be sure, every once in a while, to login to twitter.com, go to Connections and check the applications that have access to your account
10) Link it to Facebook & LinkedIn: if you're really into it, you may want your FB friends and LinkedIn contacts to know what you doing. But, if you don't want to spam Facebook, I'd recommend to use Selective Tweets which enables you to select just the tweets you want them to appear on Facebook. So, your tweets will end up with an ash tab like this (#fb for Facebook and #in for LinkedIn).
11) (only if you're a blogger) I'd recommend to use Twitter Notify which for Windows Live Writer so, everytime you make a blog post, you'll have the option to make an update on Twitter about your recent post…
Now, look at that (isn't that confusing? It won't be after a while, don't worry!):
- @MladenPrajdic ROTFL !! 33 minutes ago
- My 5 top posts on #2010 – http://bit.ly/h8aoOi (on my brand new #blog :)) #stats #fb #i 5 hours ago
- RT @WSSpl: Styczniowe nominacje MVP: Początek stycznia to czas nominacji MVP…(read more http://bit.ly/fBstSb) #mvpbuzz 5 hours ago
- @dexter_be yum yum, I want sum !! 🙂 #blogengine #stickers 6 hours ago
- @MrSmersh congrats again !!! 6 hours ago
- @MladenPrajdic nope, because it's not 100% public. It's just a privacy topic 🙂 7 hours ago
- Updated: http://j.mp/f5mlWZ – Microsoft MVP Award – January 2011 Awards ! #mvpbuzz 7 hours ago
- Autobahn A21: there's a #genoan folk who needs #coffee ! 🙂 (@ Autogrill Tortona Nord) http://4sq.com/g1WhHu 9 hours ago
- I so wanna plunge into the water…but we're not in Capetown :)) (@ Priaruggia) http://4sq.com/fTDymG 1 day ago
- @aboschin it's not the religion itself: IMHO it's the use (and abuse) of the word religion to justify men's personal needs & interests.. 1 day ago
- @alexandair thank you so much !! 🙂 1 day ago
- Congrats to all new – Dariusz Porowski, Marcin Borecki, Paweł Wilkosz, Tomasz Onyszko and renominated PL MVPs! #MVPbuzz /via @kstilger 1 day ago
- Just posted – MVP Awards – January 2011 http://j.mp/f5mlWZ #fb #in #mvpbuzz !! 2 days ago
- 2011 Uploaded ██████████████████ 100% /via @Jas 2 days ago
- Happy New Year everyone ! #fb #mvpbuzz 2 days ago
- #Android still has horrible text messaging bugs http://engt.co/hlKXlO <= be careful! Please RT /via @shultquist 2 days ago
- @kstilger same here, man, lovely ! 3 days ago
- #SurfCube , the new #wp7 3D #browser http://j.mp/edxdYA congrats @vbandi for this great job !! #fb #in @Engadget 3 days ago
- My friend's trip to #Peru & #MachuPicchu http://j.mp/gTB5A6 #travels 3 days ago
- RT @despos: Next time you're about to complain about #VS, first think of what it takes to write code for Java/#Android/#iOS. Then bow to … 3 days ago
In the end, enjoy your conversations and have fun with it !
sklep turystyczny04/01/2011 at 15:14
Really nice & interesting post !
- No trackbacks yet.
Leave a Reply Cancel reply
Blog Stats
- 52,070 hits
Recent Posts
Follow me on TwitterMy Tweets
There was an error retrieving images from Instagram. An attempt will be remade in a few minutes.


text:
"Startup culture" brings to mind dozens of office environment stereotypes, from ping-pong to beers on draught to office dogs. But for startup leaders that want to prioritize meaningful & impactful company culture -- the kind that attracts, retains, and empowers top talent -- what actually works? What techniques are effective and practical for startups to implement -- both at the early-stage when they're resource-constrained, and as they're rapidly scaling, when the pace of hiring alone can crush the best intentions?
We've brought together a panel of startup founders and People Ops leaders to share lessons learned from their extensive experience at startups of all stages. From interviewing to company values to structure & communication practices, to the truth about perks and startup office stereotypes. If you're a leader in a startup that's growing or will be, and you care about your company being a place where people can do their best work... don't miss this.
This event is part of the Talent & Training track at Startup Boston 2018.
Our Speakers:
Sam Oliver, Technical Recruiter at PathAI
A Maine native and former DCist, Sam currently leads technical recruiting at PathAI. Before that, Sam freelanced as a hiring consultant for VCs and co-founders at early-stage companies, helping them build founding engineering teams. Sam is an outspoken talent advocate and active in the Boston startup community, helping organize popular meetups like Boston DevOps and Mobile Tea. When she's not organizing events or networking, she's at the yoga studio working on perfecting her crow pose.
Ellen Chisa, Co-Founder & CEO at Dark
Ellen Chisa enjoys making new things. She is currently the CEO and cofounder of Dark, a startup to build software 100x faster. They're designing a language and tools for engineers to quickly build microservice based applications. Before this, she worked on Lola, Kickstarter, and Office Mobile. She also advises and invests with Flybridge and parcelb.vc.
More speakers to be announced soon!
This is a Startup Boston event.
Startup Boston is a free, five-day series of events celebrating, educating, and connecting entrepreneurs in Boston. Taking place from September 10-14th, 2018, Startup Boston brings entrepreneurs, company leaders, innovators, and industry experts together to foster collaboration and fuel growth in Boston's startup ecosystem.


text:
- Lately: LXIV -
FRIDAY - I have been waiting for you for a long time. I can't wait to get some work done and maybe even get some sleep?!
Stocking up on one pieces. F21 has such a great selection.
I love how this portrait I drew came out - such cuties!
Packing and shipping orders with my StickerApp stickers :)
In full on wedding countdown mode! Have the best weekend, lovelies xx


text:
Optimization in Integers
Author(s): Thomas L. Saaty
Language: English
Publisher: RWS Publications
Pages: 306
Edition: 2014
This text, the first of its kind, surveys the entire field of optimization in integers. It is designed for students of mathematics, engineering, science, social science, and operations research. It will stimulate and excite the reader's interest in the elementary methods and ideas. of discrete optimization and related problems.
The text presents the current theories and a wide variety of examples and applications of optimization in integers in both geometric end algebraic settings.
Coverage is given to a wide class of problems and the ways in which they may be handled. The text includes numerous exercises and illustrations.
Last modification2016-09-19 18:11:38


text:
Hours: Thursday,Friday, Saturday, Sunday, Monday 8am - 5pm. Open every day during school holidays.
Beach side dining with panoramic views of Goolwa Beach
Casual seaside cafe specialising in local seafood.
Enjoy innovative breakfasts, lunches and dinners during summer while overlooking beautiful Goolwa Beach.
Fully Licensed!
Beach Road, Goolwa SA 5214, Australia


text:
Spiritual direction is the process of accompanying people on a spiritual journey. It is sometimes referred to as spiritual guidance or spiritual friendship. In this ongoing relationship, one who wants to be more attentive to his or her spiritual life, meets with a person trained in spiritual direction who helps them see where they are growing closer to God as they become more aware of, and respond to, God's Presence. The director, who is only a facilitator in the process, may question, challenge, suggest, support as seems called for by the Spirit. The one seeking spiritual direction claims the journey and insights uncovered are dependent upon the prayerful openness to the Spirit's leading. The real Director is the Holy Spirit.
Spiritual Direction, while most often a part of other faith traditions, is also being sought by United Methodists. There are 18 United Methodists among the 35 spiritual directors who have recently formed as The North Carolina Community of Spiritual Directors, indicating their availability for referrals. Four other United Methodists (lay and clergy) are currently enrolled in spiritual direction in a Catholic training program.
North Carolina Community of Spiritual Directors – find a spiritual director or become a member of the group. Check the brochure links below:
Friends of Christ for Christian Spirituality – offers training and classes for the spiritual journey
Spiritual Directors International – educational events, publications, and outreach programs, helping people connect with one another and with the Sacred


text:
In order to understand the issues involving the Mayor and San Francisco cab drivers, a few definitions and a little background are necessary. For starters, it's impossible to understand anything unless you know what a medallion is.
- Medallion = a license to own and operate a taxicab. I believe (correct me if I'm wrong) that all U.S. cities have some form of medallion system. In all cities, except San Francisco (once again, correct me if you can) these medallions are for sale, usually at auctions. In New York City they cost upwards of $500,000. They are currently not for sale in San Francisco because of:
- Proposition K = which was passed by San Francisco voters in 1978 and gave the city a unique system. The medallions are not for individual sale but are owned by the city and the rights to use them are sold to working drivers for a fee. There is a limit of one medallion holder (often called an owner) per taxi. He or she can use the medallion as long as he or she follows certain rules. When the holder retires or dies, the medallion reverts to the city and the rights to use it is sold to the the first driver on a waiting list. Over the years, the rules covering the holding of medallion have evolved. Currently:
- It takes an average of fifteens years to get to the top of The List.
- A driver has to have worked a minimum of 800 hours per year for five of the last six years to qualify for a medallion.
- Medallion holders have to work a minimum of 800 hours per year to keep their medallions.
- If the holders cannot work because of disability or illness, the medallions are be taken away and given back to the city.
- The San Francisco Medallion Holders Association has filed a lawsuit against the above rule on the basis that it violates the American Disabilities Act. A verdict is pending in the Ninth Circuit Court of Appeals.
- Proposition K could not be changed except by San Francisco voters. Numerous attempts to eliminate Prop K were all overwhelmingly voted down.
- Then along came:
- Proposition A = which was passed by the voters in 2007 as a way to raise money for the reform of the Municipal Transportation Agency (MTA). The money was primarily to be used for the repair, rebuilding and improvement of the bus and rail system. The measure contained a one sentence rider that put taxicabs under the control of the MTA. The Mayor took this to mean that the voters had overturned Prop K.
- Independent Contractor = those who have signed an independent contract with companies rather than work for a salary. All the cab drivers in San Francisco are Independent Contractors. It is an accurate description of the condition of Medallion Holders. For ordinary drivers, however, the contract is pure fiction. About the only thing they are really independent of is the protection of most labor laws. Thanks to a Supreme Court reject named Robert Bork, independent contractors can't legally form a union.
- The List = the waiting list that cab drivers sign up for the right to own a medallion. The medallions are awarded on a first come first serve basis.
- Medallion Holders = guys who have bought the right to own and operate taxicabs. Often incorrectly called "owners."
- Medallion Holders Association (MHA) = what it sounds like. An organization devoted to the interests of the medallion holders.
- Metropolitan Transportation Agency (MTA, SFMTA) = The agency that controls San Francisco's buses, light rail, taxis and other vehicular sevices.
- Transferability = The right to transfer or sell a cab medallion to someone else.
- United Taxicab Workers (UTW) = what is sounds like. An organization devoted to the interests of non-owner cab drivers. It's an association, not a union.


text:
7 CFR § 1291.7 - Review of grant applications.
§ 1291.7 Review of grant applications.
(a)Applications will be reviewed and approved or rejected as appropriate for conformance with the provisions in § 1291.6 of this part. AMS may request the applicant provide additional information or clarification.
(b) Incomplete applications as of the deadline for submission will not be considered.


text:
Read a quirky, lovely post here, that gave me a little giggle and made me spend a few minutes thinking about the weird little things that really make me just feel good. Cheap thrills I guess you could say.
- love the feeling I get at the airport that all i have to do is step through the door onto the ramp at any of those thousands of gates and in a few hours i could be de-planing at some exotic location. step HERE and I get off in tahiti, HERE and i could be in las vegas, HERE and i go to greece...it's like magic, all those doorways all leading to their own destination.
- the smell and feel of a big batch of white cottons, like t-shirts and socks, coming out of the dryer. the smell so good, feel so good, warm me up to my soul. note this is the only laundry type situation i like!
- getting an unexpected check in the mail. this isn't so much about money for me, but about the promise of unaccounted for cash that has a million options: take my girls out for ice cream, have pizza on a friday night with my family, go crazy in the yarn store, rifle through the paper stacks at my LSS, download groovy tracks for my ipod. i think what i like about it is the possibilities.
- being a secret witness to some kind deed, or word, from one of my children to someone else, or one of their sisters. makes me feel like they're going to turn out ok in the end.
- the crack open of a fresh can of pop and the first fizzy, burn-y sting-y gulp. Coke is a lifetime fave, but i like them all pretty much. now it's Coke zero. awesome taste, if you don't like "diet", try zero, i think you'll be pleasently surprised (Pepsi One is also good.)
- and always, ice cream with my daughters. sitting outside at the rickety, sticky tables at our local baskin & robbins. i relish the weird, goofy conversations that come from this time when no one is expecting anything from anyone except that we all eat our ice cream.
what makes you happy? [ t ]


text:
The rain did not dampen Yewande and Colin's mood on their wedding. You could say that is one of the evidence of two people that are hopelessly in love.
Walking down the street, never mind fancy shoes and sequin dresses, drew applause from bystanders and chorus of congratulations from complete stranger as we made our way to the war memorial for some pre-wedding photos. What happens when you have a group of great friends on a bus, in celebration mood? They sing that is, sometimes off key to be sure, but it was melodious.
They were surrounded by family and friends as they exchanged vows and the thunderous sound of the confetti cannons made their exit even more memorable. The reception was filled with love, fun, laughter and a whole lot of dancing. I am so honored to have captured this beautiful love story and preserve the memories for generations to come.
Photography | Ronnie Bliss Photography
Co Photographer | Ishola Photography
Photographers Assistant | Chiugo Nwofor
Bridal Dress | Curvaceous Couture
Bridesmaids Dresses | Rent The Runway
Cake | Cake Plus
DJ | Van My DeeJay
Groom & Groomsmen Tux | Generation Tux
Day of Event Coordinator | Mara Wild
Hair & Makeup | Alison Harper & Co
Event Venue Planner | Maria Howes
Florals | Wegmans
Venue | The City Club of Washington


text:
Kingsley Spencer
Associate Creative Director
Adjective: METHODOLOGICAL
Life Story (in 140 Characters)
Born via Atlanta, soccer, Space Coast, team USA, UNF grad, married HS sweetheart @ 21, #ilovejax, 4 continents by 28 and all 7 before long
Career Story (in 140 Characters)
From ancient methods of communication to the razor's edge of the internet. Smiles, handshakes, late nights and non-stop learning.
Brand Experience
The PLAYERS, Red Bull, Jacksonville Jaguars, Whalebone Media, Farah & Farah, Interim Healthcare, CIT, Really Good Beer Stop
Awards & Recognition
2015 Gold & Silver ADDYs, 2016 AAF Jacksonville Best of Show, and the One of the Best posters of the #Occupy movement by FastCo.


text:
The Raise Craze Media Kit
LET's Get Your School in the spotlight!
Spread the warm and fuzzy to the rest of your community by getting coverage in your local media!
We've compiled a list of tips and tricks as well as a Press Release template. This should make your outreach efforts a total breeze!
Want to see what others have done?
Check out our In The News page.


text:
671 Dawson Street
$699,000, 5 Beds 2 Baths 2,416 Sqft
About This Property
Fully renovated. Very large. Nice Back yard. Very Convenient location. Close to #5 and # 2 Train and Highway 95. Beautiful Two Family home with Finished Basement with separate entrance. Live in one and let the other apartments pay the mortgage for you. Semi-Attached property . Property has Three Bedrooms Apt + Three Bedrooms Apt + Finished Basement + 4 kitchens and 4 total full bathrooms.
Essential Information
Community Information
School Information
Listing Details
The data relating to real estate for sale or lease on this web site comes in part from HGMLS. Real estate listings held by brokerage firms other than KELLER WILLIAMS NY REALTY are marked with the HGMLS logo or an abbreviated logo and detailed information about them includes the name of the listing broker.
Information deemed reliable but not guaranteed.
© 2019 Hudson Gateway Multiple Listing Service, Inc. All rights reserved.
Listing information last updated on September 21st, 2019 at 4:13pm CDT.


text:
I know I already talked about allowing words to push my buttons and how I wasn't going to go apeshit on someone for calling me a tranny. I still hold to that, but let me tell you, I still can't get comfortable with the word transsexual. It's stupid, right? I mean, by very definition, I am a transsexual and meet most or all of the criteria as defined in the DSM V… that says I have gender identity disorder? Shit, my copy at home is still the III-R from back in college. Nevertheless, I, Michelle, am a Transsexual. It's true… buy why does this make me uncomfortable?
I've never made it a secret that my preferred term is Transgendered. I know this is an umbrella term and by co-opting it I'm pushing aside the cross-dressers, female impersonators, gender queer, third sex, intersex, no sex, two-spirit, and every other slightly different but equal group that might also prefer it as an exclusive definition. It's not fair of me, but I still want to do it. Why, why, why? I think it really comes down to the fact that 'transsexual' just sounds incredibly creepy.
I don't think there is such a thing as a good 'creepy'. Creepy is when you shake hands with someone who uses way too much lotion. It's like going into a corn field with disconcerting blonde children who never smile. Too creepy; I'd rather be boiled. Maybe it's that double 's' in the middle of the word. It's very German. These are the people who turned the whimsically delightful notion of going to camp into the worst thing ever. I think if someone opened a transsexual gym, people would imagine it has whips, chains, leather and probably a gimp or two running around. I'm probably one of the people who would think that.
That half the word is 'sexual' doesn't help at all. When many people hear the term, I would not be surprised if they assume it's some sort of fetish where the person being described derives some intense orgasmic delight over the prospect of changing their gender. Those of us who are trans know there isn't an iota of truth to that. It takes about a week on hormones before even the thought of arousal is a thing of the past. Yes, we know it, but just type it into any search engine, even wavy-gravy hip Amazon, and the vast majority of offerings are meant to titillate, to put it politely. I'm OK with being misunderstood, but not so much when it involves shallow breathing and upper lip perspiration. Ew.
So what do we want to be called? If we stick with the DSM, switching it up to become GID's would fit, unless we don't care to sound like we fast tracked a later in life high school diploma. Given a choice, I'd just go with 'woman', but we are human and must classify well beyond logical reason. 'Transgender' you know I'm down with, but tired of being corrected or asked to qualify, bringing me back to 'transsexual'. Something about 't-girl' just pisses me off. I have no reason for this, but it does. We could make up something new. Sisters of Loki? The Untesticulated? Reidentified? I'm being facetious.
Truth be told, if I could come up with some catchy new term that would be enthusiastically adopted, I'd do it. This blog just doesn't get enough hits. Our lives are such that unless we are unquestionably passable, we are going to have to spend a significant portion of our lives having to explain what we are supposed to be anyway. If a single word could sum it all up succinctly, it would be a wonderful thing. In the mean time I'll stick with transgendered and the strong probability of invasive questions to follow.


text:
Egg of Yoke Power
Egg of Yoke Power ~
Jesus said, "Come to me, all you who are weary and burdened, and I will give you rest. Take my yoke upon you and learn from me, for I am gentle and humble in heart, and you will find rest for your souls." Matthew 11:28-29
This necklace is exotic and pure. The pendant is a egg shaped encrusted pendant which holds the exuberance of a gold fascicle wonder that signifies Jesus' yoke. This piece was found on the grounds of the Church of the Holy Sepulchre. When the light hits the piece it glistens with heavenly delight.
This pendant is a piece of sifting light endurance. You will feel free spirited and be able to realize your own enriched path of life that you are supposed to be on.
The blessing of Jesus Christ and his true words of wisdom to teach you come forth from the love and power that has been instilled in this item.
The piece will cherish the holiness of your soul and embed peace and serenity into your life with the divine installments of white light that will exude upon you!


text:
Hacking the Maya Animation System
The previous post focused on the "interact" mode of the ephemeral rig, and how node callbacks are used to create the ephemeral rig behavior. This post is about the "playback" mode, and how the system switches back and forth between the modes.
While the user is scrubbing or playing back, playback mode literally does nothing. The deformation rig (which will not normally be manipulated by the user) has stepped keyframes, and those keyframes drive its motion exactly as one would expect. In an ideal world, I'd use an animation system based on poses through time, rather than conventional keyframes, but while implementing that in Maya would probably be possible, it would be a pretty significant overhaul of the way Maya looks at animation, probably with unintended consequences for the animation workflow. So while the ephemeral rig presents to the animator as if it were simply poses through time, on the deformation rig keyframes do in fact exist--they are simply never set by the animator.
What playback mode does need to do is to recognize when the user has stopped on a given frame, so that it can conform the control rig (which is in whatever state the user left it in, probably not the same pose as the current frame) to the deformation rig before turning interact mode back on. To do that I ended up using Maya's other way of triggering arbitrary code based on something changing in the scene, the rather justifiably maligned "scriptJob."
ScriptJobs are...well, they're very MEL. For instance, while you can pass a function to them to execute just like you can with callbacks, the scriptJob doesn't let you pass any data through to the function. This necessitates using a function that doesn't need to receive any arguments to know what to operate on, which is irritating and complicates the code.
Another common problem with scriptJobs is that they don't fire while the Maya scene is evaluating--they fire the next time the system is idle. So you could never use them for the kind of thing I'm using callbacks for here--if you did, the deformation rig transform would only update AFTER you'd moved the control rig around and released the mouse.
In this case though, that turns out to be a hidden advantage. For playback mode, something that fires after the user does something (ie. changes the current time) but not while they are doing so is precisely what I needed. ScriptJobs are slow compared to callbacks, but they're still fast enough that the scriptJob can fire after the user releases the mouse, conform the control rig to the deformation rig, and switch interact mode back on before the user can click on anything else.
After consulting with Brian Kendall, I ended up deciding to use a system where an attribute in the scene defines what the current pose is for the purposes of the ephemeral rig system. This attribute is step-keyed right along with the the deformation rig, and on the pose that the animator is currently manipulating it's value is 1. On all other poses it's value is zero.
As you may recall from the previous post, each callback checks a plug called "watchPlug" to see if it should do the ephemeral matching:
def callbackFunc(msg, node, data): sourceMatrixPlug, targetPlugs, watchPlug, activePlug = data if watchPlug.asFloat() == 1 and activePlug.asFloat() == 1: matchUsingTransformMatrix(sourceMatrixPlug, targetPlugs)
When the value isn't 1, the callback function does nothing, effectively disabling interaction mode. But this attribute is also being watched by a scriptJob, and when the attribute changes value--because the user has changed the current frame--it fires, causing the control rig matchback and resetting all the watchAttr's keyframes to 0 except for the one associated with the current pose. Now we're back to where we started, just on a different pose.
Here's the code that creates the scriptJob:
pa.scriptJob(compressUndo = True, attributeChange = onWatchAttrChange)
This calls a function that performs a "matchback" from the target to the control of each ephControl, simply setting the control to the transformation of the target using pyMEL:
def matchBack(self): self.ephControl.setRotation(self.target.getRotation(), space='world') self.ephControl.setTranslation(self.target.getTranslation(), space='world') self.ephControl.scale.set(self.target.scale.get())
And then resets the ephCurrentPose attribute so that the pose the timeline is now on becomes the current pose, therby turning interact mode back on. To do that first I need to have a way to recognize the extents of a pose from the keyframe information I have:
The formatting of my blog completely mangled this code, so I did a screenshot from Sublime Text instead--not the best way to share a code example, I know! Basically it first figures out if you are or are not on the first frame of a pose, then uses findKeyframe to get you the first and last frame. Then:
One advantage to watching an attribute, as opposed to having the scriptJob fire on frame change itself, is that anything that changes the timing of the system's keyframes still functions. It's possible that I may want scripts and tools that change keyframes, and potentially shift a different pose onto the current frame, without changing the current time. This system behaves correctly whether or not the current time has been changed--the only relevant question is whether or not the pose on the current frame is the previous current pose, or a different pose that requires a control rig conform and switch back to interact mode.
Of course, this only works if you have a way to bundle up all the keys associated with the deformation rig and the watchAttr, and ensure that any operations you do to the keys affect all of them at once, since, despite being keys, they're supposed to represent poses. Luckily we do have such a method, though, just like scriptJobs, it's apt to my purpose but also weird and irritating: character sets.
Character sets are an outgrowth of the Trax editor. The Trax editor used to be Maya's nonlinear animation tool. An ancient order of TDs sealed the Trax editor behind the Windows/Animation Editors menu, there to remain hidden for all time. Opening it will unleash its horror yet again upon an unsuspecting world, so you should probably not do that.
Character sets were the Trax-editor's way of interacting with keyframes in Maya. They insert themselves between an animCurve node and the attribute it drives, with the intent to do a bunch of Trax editor-related stuff that I don't care about. What I do care about is that it allows you to have the timeline display the keys of an arbitrary set of attributes, instead of anything related to your selection. All keyframe operations--making keys, copying them, moving them around, etc--happen to these attributes at once. In other words, it lets us treat a whole bunch of unrelated keys as if they were indeed one pose.
I wish there was a way to do this that wasn't character sets, but I haven't found another method yet, short of writing my own timeline. After I get the ephemeral rig system rock solid, I'm thinking about trying to do my own timeline in QT, and seeing if that's a reasonable thing to do. There are so many features--character-based tracks, markers, regular beat markers, the list goes on--that I'd like to have in a Maya timeline, and don't. But I guess that's going to have to wait a while.