nc

Distancing and diversity enhance Iowa’s food security

Coronavirus provides a chilling lesson about crowding. The disease originated in a densely packed Chinese City. As it moved worldwide it struck most heavily in crowded places where people live and...




nc

Shower Mom with love — from a distance

Mother’s Day celebrations will look different for many families this year as we follow social distancing guidelines. Fortunately, we don’t have to be in proximity to express our love...




nc

Coronavirus in Iowa, live updates for May 8: Cedar Rapids to host virtual City Council meeting

4:43 P.M.: GOODWILL PLANS TO REOPEN 11 EASTERN IOWA RETAIL LOCATIONS Goodwill of the Heartland will reopen 11 retail locations in Eastern Iowa next week, including all its Cedar Rapids stores,...




nc

Pence’s Iowa visit underscores coronavirus worry

DES MOINES — In traveling to Iowa to call attention to the burdens COVID-19 brought to religious services and the food supply, Vice President Mike Pence unwittingly called attention to another...




nc

Celebrating on a screen: Iowa universities hold first-ever online commencements

Iowa State University graduates who celebrated commencement Friday saw lots of caps and gowns, red-and-gold confetti and arenas packed with friends and family. But none of those images were from...




nc

Marie Francine

MARIE FRANCINE
Iowa City

Marie Francine, 57, of Iowa City, died at her home on Monday, April 27, 2020.
For instructions for the visitation and services, a complete obituary and to share a thought, memory or condolence, please visit the funeral home website at www.gayandciha.com.




nc

Marie "Mamalaki" Francine Kasidi

MARIE "MAMALAKI" FRANCINE KASIDI
Iowa City

On Monday, April 27, 2020, Marie "Mamalaki" Francine Kasidi was called home by God after a brave battle with cancer. She was 57 years old. Marie loved the Lord Jesus Christ and was a pillar in the community.
Visitation will be this Friday at 4 to 8 p.m. at Gay & Ciha Funeral and Cremation Service. The burial service will be noon this Saturday at St. Joseph Cemetery in Iowa City. For instructions for the visitation and services, a complete obituary, to share a thought, memory or condolence, please visit the funeral home website at www.gayandciha.com.




nc

Incremental progress is the right way to build a website

Watch my video about the incremental approach—the cheapest, smartest, and easiest way to build a website (and a business!) One thing that’s always annoyed me about contract web design and development is this idea that you can actually pay for a finished product to be delivered within a particular time frame. Nothing actually works this […]




nc

The Key Difference Between Centralization and Decentralization

One of the more compelling insights to come from the Joe Rogan interview with Elon Musk is this idea that humanity is actively creating “giant cybernetic collectives.” Through our participation in social media platforms and on the internet in general, we are assimilating knowledge and building connections at a rate that vastly exceeds everything that […]



  • Centralization vs. Decentralization
  • Videos

nc

Permanence vs. Impermanence (Are we ever going back home?)

Tthink about the great relics of human civilization—the pyramids, the magnificent castles of Europe, the Great Wall of China, meticulously detailed sculptures from different eras, the awe-inspiring churches and temples that dot almost every landscape we’ve ever inhabited… All made of stone. All hundreds of years old. All crafted with the intention of permanence and […]




nc

Fear: Focus on substance abuse, mental health and human trafficking

I am a longtime resident of Johnson County, currently in my 25th year of law enforcement. I worked for the Coralville Police Department in the late 1990’s and transferred to the Cedar Rapids Police Department in 1999 where I am a sergeant of the patrol division. I have degrees in criminal justice and organizational leadership and have advanced leadership training from Northwestern University in the School of Police Staff and Command.

Working in the second-largest city in the state has offered me many opportunities to lead. I have taught in the police academy and defensive tactics and as a field training instructor. I was the director of the Eastern Iowa Heroin Initiative, where I founded CRUSH of Iowa (Community Resources United to Stop Heroin). CRUSH is a community-based, grassroots organization helping all those affected by substance abuse disorder.

My passion has been community outreach. Currently I am a member of the Johnson County Human Trafficking Coalition and the Johnson County Prevention Partnership. Through these partnerships I will create a criminal interdiction team to fight the trafficking of humans, weapons and narcotics.

As sheriff, my top three concerns are substance abuse, mental health and human trafficking. I believe in creating long-lasting relationships with the community. I believe in common sense solutions without the haze of political bias. I believe that every citizen has a voice and should be heard. I believe in building a proactive and progressive law enforcement agency that serves with professionalism, compassion and dedication to the citizens. I believe we need to place the community back into community policing.

I am ready to be sheriff of Johnson County. I am a proven leader who is determined to build bridges with the citizens of the county and lead with accountability, trust and transparency. I will fight for all of Johnson County as sheriff because I have done so all of my life. This election is not just about me, it is about us. We, together, will make a positive impact on Johnson County. The status quo is not working. It’s time for change!

I would love to have your vote on June 2. We work better when we work together. People before politics!

Al Fear is a candidate in the Democratic primary for Johnson County sheriff. alfearforsheriff.com




nc

Miller: Stick with an experienced team

I have been your County Auditor for over 13 years. I am on the ballot in the Democratic primary election and I have an opponent.

I have been your County watchdog since 2007. I have been a nationally certified election administrator since 2009. I was Iowa’s County Auditor of the Year in 2013.

I am for automatic voter registration when citizens turn 18.

I am for improved post election audits, e.g., risk-limiting audits.

I am for allowing felons to vote after they have served their sentences.

I am for all vote-by-mail elections to reduce the risk of spreading COVID-19.

I oversee a great team! The anchor of our team is First Deputy Auditor Becky Shoop. She has been with the county for over 40 years. Her institutional knowledge is indispensable. She provides guidance not only to our office, but other county offices.

When a vacancy occurred on my elections team a few years ago, I hired local attorney Rebecca Stonawski as Deputy Commissioner of Elections. Her organizational skills and legal background have proved to be invaluable as election laws change from year to year.

And finally, after I successfully lobbied to get the Code of Iowa changed so that county auditors can audit county accounts and funds, I promoted Rhonda Betsworth, a CPA (certified public accountant), to Deputy Auditor to oversee the County’s accounting and property tax systems.

I am a U.S. Army Military Police veteran, former IBEW member, former Chair of the Linn County Democrats, and former Mayor of Robins.

I am a member of Rotary, the American Legion, and the Catholic Church. My wife and I have been married for 42 years. We have three adult married children and nine grandchildren.

I have been a dairy farmer, a deputy sheriff, an electronics technician for AT&T, a senior manager for Teleconnect and MCI, a senior project manager for Siemens, and an IT Director for Four Oaks of Iowa. I have owned my own profitable technology business.

This is not the time to hire an amateur to run your elections. This is not the time to hand watchdog duties over to a former county supervisor who quit to take a job in DC. This is not the time to break up a great team.

I request you vote in the Democratic primary election. I request you vote Miller for Auditor.

Joel Miller is a candidate in the Democratic primary for Linn County auditor.




nc

Franken: Vote for principled, experienced leadership

I’m Admiral Mike Franken, and I’m a candidate for the U.S. Senate.

Months before COVID-19 gripped the world, and what feels like an eternity before it began to run roughshod over Iowa, I decided to run for U.S. Senate. Why? Because Iowans deserve experienced leadership in Washington.

Now, Iowa suffers one of the worst outbreaks in the nation; currently, three Iowa cities are the home of the second, forth, and fifth worst outbreaks in the country.

During a crisis, especially a crisis of this severity, there is no alternative to leadership, experience, and vision. Unfortunately, political decisions have taken precedence over workers and their families. Our governor is insistent on opening the state as local experts and the CDC frantically urge otherwise. Sen. Chuck Grassley has said little.

And, indefensibly, Sen. Joni Ernst is declaring that “Iowa has fared pretty well” despite what we know to be true: Iowa still is in a crisis. And the worst still is to come.

Iowa doesn’t just suffer from a pandemic, we suffer from a profound failure of leadership. The question that voters must ask ahead of the June 2 primary is clear: Where can an Iowan look for leadership?

A lack of leadership may come from a lack of experience, as well. I’m no stranger to dealing with disasters, pandemics, or other crises. Hurricanes have slammed economies, and, working for the Department of Defense, I helped rebuild them. Ebola decimated communities and, working in the Pentagon and in Africa, I helped rally the international efforts to save them. I’ve been here before.

My plan is to win this race by offering a showcase of leadership. Recently I began a Daily Coronavirus Briefing on Facebook Live to fill the vacuum of leadership left by Joni Ernst and others. I use these daily opportunities to set the record straight, to discuss what is best for Iowa, how to recover from this pandemic, and kick start our economy, and ultimately build a new America. In short, I will lead to achieve these opportunities.

On June 2, we have a close race for the U.S. Senate. Let’s chart a new course. I am the only candidate with the experience to lead Iowans out of this crisis. Let’s cast a vote for principled, experienced leadership for Iowa.

Michael Franken is a candidate in the Democratic primary for U.S. Senate.




nc

Impressed with Franken’s experience, openness

We invited Admiral Mike Franken to a gathering of voters to explain why he was qualified to run for the U.S. Senate. We were impressed with his friendliness, his openness, and especially his range of experience as a leader. One of those in attendance at our home was a woman who had served under his command on the U.S.S. Barry; it was a happy reunion for the sailor and the admiral. She had no hesitation in endorsing him and supporting him in his campaign. Admiral Franken also visited our son’s home in another city. Again, those gathered were impressed with Admiral Franken’s experiences and priorities But the person most impressed was our eight-year-old grandson. When Charlie walked into the room, Admiral Franken interrupted himself, introduced himself to Charlie and engaged him in genuine conversation. Charlie’s summation of politicians. “I like him. He was talking about boring stuff, but he was nice to me. People shouldn’t talk about boring stuff; they should just be nice to everyone.”

Mike doesn’t talk about boring stuff — to us, anyway. He talks about the actions we want our United States Senate to take: pass legislation to address climate change, health care and the economy.

Because Mike has experience as a leader and as a staff member on Capitol Hill, he has an advantage over newcomers to Washington.

We, one Democrat and one Republican, encourage you to vote for Admiral Mike Franken to be our Senator.

Dianne and Bim Prichard

DeWitt



  • Letters to the Editor

nc

Distancing and diversity enhance Iowa’s food security

Coronavirus provides a chilling lesson about crowding. The disease originated in a densely packed Chinese City. As it moved worldwide it struck most heavily in crowded places where people live and work in proximity.

Medical experts advise us to stay home and keep fellow humans at a distance. Isolation works. If a pathogen can’t reach us it can’t cause harm.

The same holds true for food. Years ago farmers planted diverse crops in relatively small fields, and raised modest numbers of chickens, pigs, and cattle. One cornfield or chicken coop was, essentially, isolated from the next closest counterpart, making it hard for a disease to jump from one farm to the next.

Modern Agriculture, in contrast, raises hundreds of thousands of chickens and turkeys crowded together in single buildings. Hogs and cattle are also crammed together, as are crops. Essentially the Midwest is one continuous cornfield stretching from Ohio to Nebraska. Once a pathogen mutates a new disease can easily sweep across vast fields or through crowded growing buildings, leaving a path of death and food shortages in its wake.

Modern mass agriculture is efficient, providing consumers with inexpensive eggs, milk, vegetables and meat, but it is vulnerable. Today’s farmers recognize disease potential and practice scrupulous biosecurity to keep pathogens away from their crops and animals. Still, all it takes is one mutation or introduction of a foreign microbe and a high percentage of American food is lost.

Families can reduce their vulnerability to mass food production by growing some at home. During The Second World War the government encouraged families to plant victory gardens and keep one to two hens per family member. Many households were able to grow up to 40% of their annual dietary needs, even in small yards. It freed commercially produced food for the military. Yards remain capable of growing significant quantities of nutritious food using three techniques.

Gardening: An amazing quantity of nutritious food can be grown in even a small sunny backyard, especially when intensive gardening techniques are used.

Foraging: Delicious wild foods grow in unsprayed yards and are free for the picking. Our family, for example, enjoys nettles, lambsquarters, purslane, acorns and dandelions. Learning to identify, harvest, and process them is not difficult. Ironically spraying a yard kills plants people can eat to favor inedible grass.

Chickens: A six hen backyard flock will produce two dozen eggs a week. They need some commercial feed but recycle kitchen scraps and garden weeds into eggs. Cedar Rapids and other towns allow families to keep chickens with a few restrictions.

Families unable or unwilling to grow backyard food can boost food security by buying vegetables, meat and eggs from small local producers.

Coronavirus has taught us about contagion and helps clarify the threat that mass production poses. Raising backyard food enhances resilience. It’s satisfying and helps ensure there will be something to eat.

Rich Patterson of Cedar Rapids is a writer, former nature center director and ecological consultant who co-owns Winding Pathways LLC with his wife, Marion.




nc

How to Set Up Free SSL with Let’s Encrypt and Certbot

Installing an SSL certificate on your domain is an essential step you should take to secure your WordPress site and now with Let’s Encrypt you can get one for free.





nc

The launch of WordPress.tv

Hey, in case you are unaware, WordPress has launched a new site called WordPress.tv. Check out the full post at the WordPress.org blog. Or visit WordPress.tv …WordPress.tv is also now the place to find all that awesome WordCamp footage that was floating around the web without a home. See the presentations you missed and get […]

The post The launch of WordPress.tv appeared first on WPCult.




nc

Manon – Portfolio & Agency Theme

Manon is a true game-changer in the WordPress sphere. This unparalleled portfolio & agency theme lets you create a wonderfully fluid website that will surely stand out in the crowd. It comes completely decked-out with powerful features and a collection … Continued

The post Manon – Portfolio & Agency Theme appeared first on WeLoveWP.




nc

Bud Agency

At Bud we’re nurturing the next evolution of digital marketing ???? SEO, Google Ads, social media, content marketing and our tech team, working together in a growth marketing framework to grow your business better.

The post Bud Agency appeared first on WeLoveWP.





nc

Many anticipated arts, cultural events delayed or canceled

Summer is going to look a bit different in the Corridor this year as many, long-cherished events are being canceled or postponed. And the organizations that run those events want you to know they aren’t any more happy about it than you are.

The organizers of these events are having to make unprecedented, tough decisions.

“Cancellation is not a good word in our business,” said Chuck Swanson, Building a Legacy executive director of Hancher. “It is something that we really don’t want to do and it takes a lot for us to come to that.

“We live for the live performance and bringing the artists and audiences together. That’s the happiest time for me, so none of these decisions have been easy.”

Hancher has had to cancel numerous upcoming events in the past few months that would have brought to Iowa City in artists from all over the country and the world. It also is holding off announcing its upcoming season — which it typically would be doing at this time of year.

this isn’t something the staff has faced since the floods of 2008 and because they book events so far in advance they are confronting additional challenges.

“You know there’s so much that goes into a show before it happens,” Swanson said. “I just think of all the anticipation, booking the artists, advancing the show, setting ticket prices, advertising and then ticket sales.

“It’s like a farmer who does all this work to get his crops ready and then at the end of the season ends up with nothing to harvest.”

He noted Hancher has been reaching out to its booked performers and, in some cases, have had performers reach out to them to cancel upcoming shows.

The significant time and resources that go into planning large-scale events is the main factor in necessitating cancellation discussions and decisions at many organizations.

“Many logistical items have to be coordinated, from renting shuttles to scheduling volunteers and staff. Initial planning for some events begins as early as 12 to 18 months in advance and proceeds all the way up to the day of the event,” said John Myers, Indian Creek Nature Center executive director.

Citing the center’s annual Maple Syrup Festival, he noted food represents a significant cost and often cannot be saved or reused.

“We have had to be mindful of the financial resources available to us and ensure that we wisely manage those to ensure (the center) can emerge from this pandemic as a functioning and healthy organization,” he said.

“None of the decisions to cancel events or how to handle subsequent financial losses are easy and they challenge everyone,” Myers added. “As our whole lives have been upended, it makes even the simplest of decisions harder and that takes an impact on morale.”

He acknowledged staff members aren’t the only ones feeling the strain.

“We have a significant core of volunteers who are no longer able to give their time, which also creates a strain on morale and increases the amount of work that needs to be done when we return,” he pointed out.

Another primary factor is what is allowed and considered safe by the city, state and Iowa Department of Public Health.

“At this point, only allowing groups of 10 or less is a far cry from the thousands or people we usually see at the Iowa Arts Festival,” said Lisa Barnes, executive director of Summer of the Arts in Iowa City, which produces the Iowa Arts Festival.

“The governor has announced that reopening the state will be done in stages, and based on what we’ve found from other events around the country, concerts and large festivals will be the last to open,” he noted.

Summer of the Arts announced just last week that the Iowa Arts Festival would not take place this year, a month in advance of the event.

“We needed to make a decision so that we can move forward with alternative plans,” Barnes said, noting the organization has had questions about the Iowa City Jazz Festival, scheduled for July 3 through 5 and added a decision regarding that festival and July programming will be made by mid-late May.

“We also needed to make the decision far enough out to be able to work with our performers and cancel the agreements,” she said.

On Wednesday, Gov. Kim Reynolds loosened some but not all of the social-distancing restrictions for the remaining 22 counties she had put in place.

Heartbroken

Discussions about the future of these events have been happening for weeks for many organizations, highlighting they are not taken lightly.

Carissa Johnson, executive director of the Cedar Rapids Freedom Festival, said conversations about the future of this year’s event started in mid-March, right around the time the Cedar Rapids SaPaDaPaSo Parade announced its cancellation for 2020.

“We plan year ’round for the two- to three-week festival,” Johnson explained.

“Our planning really ramps up in April and May, and we have many more costs associated with producing the festival the closer we get to the start. In order to protect our time and resources, we elected to cancel before we had more costs and variables to consider.”

As for who is making the final decision, organizations said many stakeholders are involved. Barnes said the decision on the Iowa City Arts Festival, for example, included staff, the board of directors, festival planning committees, the city of Iowa City and Johnson County Public Health, along with input from some of the vendors, artists and performers.

Tapping into experts in those public health field has been key as well.

“We have these assets, people, at the University (of Iowa), that have been really helpful as we make these decisions about canceling and as we prepare to think about reopening,” Hancher’s Swanson said.

The Freedom Festival include staff and board members in discussions, with recommendations from Linn County Public Health and the city of Cedar Rapids, factoring in the health, safety and well-being of the community.

“We are just as heartbroken as the rest of the community, but this decision was to protect our community as much as possible,” Swanson said.

“This community is a family and we will all get through this together and come back stronger next year.”

Myers noted organizations such as the Indian Creek Nature Center are also rely on advice from national associations, such as the American Alliance of Museums, and discussions among the leadership of many local cultural groups.

“For many events, we have also reached out to participants to gather their input and comfort level of attending once we are able to reopen,” Myers said.

The financial effects of having to cancel is stressful for organizations, too.

“Financially, this has been a hard time for the Nature Center to endure,” Myers pointed out. “We’ve had over 100 different programs, events and facility rentals canceled between March 15 and April 30, and our losses are currently over $250,000. As we approach the summer, there are a number of other events we continue to review, including our popular summer camps.”

The Nature Center has postponed a national conference to be held there in September — due to indications of low participation — for peers from around the nation who run not-for-profit and government nature centers.

“We are losing thousands of dollars in vendor fees and sales receipts because we had to cancel,” said Barnes, of Summer of the Arts.

“We have sponsors tied to certain events, like the Iowa Arts Festival, that in some cases want to carry over their support to next year, which impacts our fundraising for this year and next.”

She noted her group already has been made aware of funding that won’t be coming in from some sponsors next year due to the financial impact those organizations are facing as well.

And that can be tough.

“When we cancel, our whole staff is involved — from the box audience and public engagement folks to the technical production team and our front-of-house staff,” Swanson said.

“Our communication is key in talking through it all and then sharing clear messages with our audiences, especially in terms of refunds. But we’ve been encouraged by so many generous friends of Hancher donating their ticket purchase price back to us.”

While disappointment still is thick in the air, organizations don’t plan to abandon their missions and is keeping an eye on serving the public.

“This is a challenging time for everyone, and our board and staff is committed to finding creative and non-traditional solutions to ensure the Freedom Festival’s return,” Johnson said. “The community and our stakeholders have been tremendous supports of the Freedom Festival and we believe they will continue to do so in the future.

“We ask for understanding and patience as we try to navigate this crisis and what we can still provide for our community.”

Freedom Festival buttons will be sold this year as they’ve already been made, and “It’s a way the community can show their support,” Johnson said.

Barnes agreed and noted the Iowa Arts Festival committee is working on ways to support the performers, artists and vendors they had scheduled by trying to develop some virtual opportunities for engagement.

While the show, or events, might not go on, organizers said they very much want to remain connected to their audiences and attendees.

“I want to make sure everybody knows we care about them and that we’re trying to find ways to stay connected because I think we’re all in this together and the arts are one of the best ways for people to get through difficult times,” Swanson said.

Myers agreed.

“Indian Creek Nature Center will be ready to welcome guests and visitors back to our events as soon as we are able to do so safely,” he said.

“In the meantime, we hope everyone finds peace in nature by taking a hike or bike ride, having a picnic or just enjoying time outside.”




nc

Judge rules Iowa law unconstitutional that blocked sex education funding to Planned Parenthood

An Iowa judge has ruled unconstitutional a state law that would have blocked Planned Parenthood of the Heartland from receiving federal money to provide sex education programs to Iowa youth.

Fifth Judicial District Judge Paul Scott on Wednesday ruled the law “has no valid, ‘realistically conceivable’ purpose that serves a legitimate government interest as it is both irrationally overinclusive and under-inclusive.”

“The act violates (Planned Parenthood of the Heartland’s) right to equal protection under the law and is therefore unconstitutional,” Scott ruled in issuing a permanent injunction to prevent the law’s implementation.

House File 766, passed in 2019 by the Republican-controlled Iowa House and Senate, excluded any Iowa organization that “provides or promotes abortion” from receiving federal dollars that support sex education and related services to Iowa youth.

Planned Parenthood of the Heartland and ACLU of Iowa challenged the law, filing a lawsuit shortly after Gov. Kim Reynolds signed the bill into law.

Polk County District Court issued a temporary injunction blocking the law, which was to go into effect July 1, allowing Planned Parenthood to continue providing sex education programming throughout the past year.

The governor’s office did not immediately respond to requests for comment on the ruling.

Law challenged

In its lawsuit, Planned Parenthood and ACLU argued that by blocking the abortion provider from the two federal grants — the Personal Responsibility Education Program (PREP) and the Community Adolescent Pregnancy Prevention (CAPP) — the law violated protections of free speech, due process and equal protection.

“The decision recognizes that the law blocking Planned Parenthood from receiving grants to provide this programming violated the constitutional requirement of equal protection,” ACLU of Iowa Legal Director Rita Bettis Austen said in a statement Thursday.

Though Planned Parenthood would be excluded, the law did allow “nonprofit health care delivery systems” to remain eligible for the federal funding, even if they are contracted with or are affiliated with an entity that performs abortions or maintains a facility where abortions are performed.

By doing so, the law effectively singles out Planned Parenthood, but allows other possible grant recipients to provide an array of abortion-related services, according to the court documents.

“The carved-out exception for the ‘nonprofit health care delivery system’ facilities undermines any rationale the State produces of not wanting to be affiliated with or provide funds to organizations that partake in any abortion-related activity,” Scott ruled. .

Programs in Iowa

In fiscal year 2019, Planned Parenthood received about $265,000 through the federal grants, including $85,000 to offer PREP curriculum in Polk, Pottawattamie and Woodbury counties.

It was awarded $182,000 this year to offer CAPP curriculum in Linn County, as well as in Dallas, Des Moines, Jasper, Lee, Polk, Plymouth and Woodbury counties.

The grants are administered by the Iowa Department of Human Services and the Iowa Department of Public Health.

Planned Parenthood has provided sex education to students in 31 schools and 12 community-based youth organizations in Iowa using state-approved curriculum since 2005, according to a new release.

The focus has remained “on areas with the highest rates of unintended pregnancies and sexually-transmitted infections,” the news release said.

“Today’s decision ensures that teens and young adults across Iowa will continue to have access to medically accurate sex education programs, despite the narrow and reckless policies of anti-abortion lawmakers,” said Erin Davison-Rippey, executive director of Planned Parenthood North Central States.

Comments: (319) 368-8536; michaela.ramm@thegazette.com




nc

No Linn County Fair this year because of coronavirus concerns

CEDAR RAPIDS — The Linn County Fair has canceled grounds and grandstand entertainment at this year because of the novel coronavirus and is looking at ways youths could exhibit their work.

“After consulting with Linn County Public Health, the Linn County Board of Supervisors, and other stakeholders, it was determined this was the best decision due to the uncertainty of what the public health situation may look like at the end of June,” Albert Martin, Linn County Fair Board president, said Thursday in a statement.

The fair was scheduled June 24-28.

The Linn County Fair Association said it is working with the Iowa State University Extension and Outreach of Linn County and Linn County 4-H to determine how 4-H and FFA members and other youths will exhibit their work. Those details — which could include in-person or virtual exhibiting — are expected to be finalized and announced in mid-May.

Tom Barnes, executive director of the Association of Iowa Fairs, told The Gazette on Thursday that the Benton County Fair also was canceled for 2020.

Organizers for the Wapello County Fair in south-central Iowa previously announced they would not host the fair this year.

Comments: (319) 339-3155; lee.hermiston@thegazette.com




nc

Ahead of VP Pence’s Iowa visit, Joe Biden’s campaign calls out ‘consequential failure’ of Trump coronavirus response

Vice President Mike Pence owes Iowans more than a photo-op when he visits Des Moines today, according to Joe Biden’s campaign.

“Iowans are seeing up close the most consequential failure of government in modern American history,” said Kate Bedingfeld, spokeswoman for the former vice president and presumptive Democratic presidential nominee.

“With nearly 300,000 Iowans filing for unemployment, rural hospitals on life support, Latino communities disproportionately suffering and workers on the job without sufficient protection, Mike Pence owes Iowans more than a photo-op — he owes them answers,” she said.

Pence, head of the White House coronavirus task force, is scheduled to meet with Iowa Gov. Kim Reynolds and U.S. Sens. Chuck Grassley and Joni Ernst, all Republicans, as well as with faith, farm and food production leaders.

Pence will talk to faith leaders about how they are using federal and state guidelines to open their houses of worship in a safe and responsible manner.

Later, he will go to Hy-Vee’s headquarters in West Des Moines for a roundtable discussion with agriculture and food supply leaders to discuss steps being taken to ensure the food supply remains secure.

Pence has called Iowa a “success story” in its response to the COVID-19, but Bedingfeld said the Trump administration failed to protect Iowa families from the virus that has claimed the lives of 231 Iowans.

“From devastating losses across the state, at meatpacking plants to rural communities, one thing is clear — it’s Iowans and the American people who are paying the price for the Trump administration’s denials and delays in response to this pandemic,” she said.

“Instead of listening to our own intelligence agencies and public health experts, Donald Trump was fed dangerous propaganda from the Chinese Communist Party — and he bought it,” she said. “Iowans deserve better — they deserve Joe Biden.”

For his part, Grassley said he welcomes the discussion with Pence.

“There’s much work to be done, and the pandemic is disrupting all of our communities,” Grassley said. “It’s important to hear directly from those who help feed the nation and the world.”

Ernst also is looking forward to the discussion of how Iowa is working to protect the health and safety of Iowa’s families and communities while reopening the state’s economy.

“We continue to take an all-hands-on-deck approach to tackling this pandemic,” she said. “Together, we will get through this.”

Comments: (319) 398-8375; james.lynch@thegazette.com




nc

Task force will make recommendations on how to resume jury trials, given coronavirus concerns

DES MOINES — The Iowa Supreme Court has asked a group of criminal and civil lawyers, judges and court staff from judicial districts across the state to make recommendations on how criminal and civil jury trials will resume with coronavirus health restrictions.

The court is asking the 17-member Jumpstart Jury Trials Task Force to develop temporary policies and procedures for jury trials that will ensure the “fundamental rights of a defendant” to a jury trial, while at the same time “protecting the health and safety” of the jurors, attorneys, judges and the public, said Des Moines lawyer Guy Cook, co-chairman of the task force.

The court, Cook said Thursday, has put together a “good cross-section” of professionals who have experience with civil and criminal trials.

Task force members are:

• Associate Supreme Court Justice Mark McDermott, chairman

• Guy Cook, Des Moines criminal and civil attorney, co-chairman

• 4th Judicial District Judge Michael Hooper

• 5th Judicial District Judge David Porter

• Angela Campbell, Des Moines criminal defense attorney

• Jim Craig, Cedar Rapids civil attorney, president of Iowa Defense Counsel Association

• Janietta Criswell, clerk and jury manager, 8th Judicial District, Ottumwa

• Kathy Gaylord, district court administrator, 7th Judicial District, Davenport

• Patrick Jennings, Woodbury county attorney, Sioux City

• Julie Kneip, clerk of court, 2nd Judicial District, Fort Dodge

• Bill Miller, Des Moines civil attorney, chairman of Iowa State Bar Association litigation

• Todd Nuccio, Iowa state court administrator

• Jerry Schnurr, Fort Dodge civil attorney and president-elect of Iowa State Bar Association

• Jennifer Solberg, Woodbury County chief public defender

• Chad Swanson, Waterloo civil attorney, president of Iowa Association of Justice

• Brian Williams, Black Hawk county attorney

• Mark Headlee, information technology director of Iowa Judicial Branch

The committee will review the current schedule to resume jury trials that the court has established in consultation with public health officials and other health care providers, and recommend whether the schedule should be altered, according to the court’s order.

Jury criminal trials can resume July 13 and civil trials Aug. 3, according to the order.

The task force also will make recommendations for how those trials should proceed, according to the court’s order.

Members should develop policies and procedures aimed at protecting the health and safety of jurors, court staff, attorneys, judges and visitors throughout the trial process, particularly during the identification of potential jurors, summons of potential jurors, jury selection, trials, jury instructions and jury deliberations.

Cook said members will have to consider the challenges for each type of trial. More jurors, for example, are needed in a criminal case, so space and logistics will have to be considered with social distancing requirements.

That will be more difficult in the rural courthouses that have less space.

A pool of 80 to 100 potential jurors are sometimes summoned for felony trials in larger counties, but that, too, may be a challenge with social distancing.

Another possibility would be requiring masks, but how will a mask affect the credibility of a witness if it hides the person’s facial expressions, Cook said.

These are all issues the members may encounter.

Steve Davis, Iowa Judicial Branch spokesman, said the goal is one uniform statewide plan, but it’s possible that each district may have some discretion, as in the previous orders issued during this pandemic, because of the differences in each county.

Davis said the task force members were chosen based on gender, background and geographic area.

The recommendations should be submitted to the court the first week in June.

Davis said he didn’t yet know when the task force would start meeting by phone or video conference or how often.

Comments: (319) 398-8318; trish.mehaffey@thegazette.com




nc

Iowa Gov. Kim Reynolds will not hold coronavirus press conference Friday

DES MOINES — Iowa Gov. Kim Reynolds will not be holding a news briefing Friday on the coronavirus outbreak in Iowa due to scheduling conflicts created by Vice President Mike Pence’s visit to Iowa, according to the governor’s office.

The vice president was slated to travel to Des Moines Friday morning with plans to participate in a discussion with faith leaders about how they are using federal and state guidelines to open their houses of worship in a safe and responsible manner.

Also, Friday afternoon the vice president was scheduled to visit Hy-Vee headquarters in West Des Moines for a roundtable discussion with agriculture and food supply leaders to discuss steps being taken to ensure the food supply remains secure. Pence will return to Washington, D.C., later Friday evening.

Along with the governor, Iowa’s Republican U.S. Sens. Joni Ernst and Chuck Grassley are slated to join Pence at Friday’s events in Iowa.

According to the governor’s staff, Reynolds plans to resume her regular schedule of 11 a.m. press conferences next week.




nc

Coronavirus in Iowa, live updates for May 8: Cedar Rapids to host virtual City Council meeting

4:43 P.M.: GOODWILL PLANS TO REOPEN 11 EASTERN IOWA RETAIL LOCATIONS

Goodwill of the Heartland will reopen 11 retail locations in Eastern Iowa next week, including all its Cedar Rapids stores, according to an announcement on the Goodwill Facebook page. Stores in Marion, Coralville, Iowa City, Washington, Bettendorf, Davenport and Muscatine also will resume business Monday, starting with accepting donations only.

Locations will be open to shoppers, beginning Friday, May 15, and run from 11 a.m.-6 p.m. Monday through Saturday and from noon-5 p.m. Sunday.

All customers are required to wear face masks to enter the store. For more information, including safety guidelines, visit the Goodwill website.

3:02 p.m.: IOWA DNR URGES CAMPERS TO CHECK WEBSITE BEFORE TRAVEL

The Iowa Department of Natural Resources encourage visitors to recently reopened campgrounds to check the DNR website for temporary closures before traveling to any of the areas. Campgrounds started to open Friday for walk-in, first come, first served campers with self-contained restrooms, according to a news release.

Some parks and campgrounds have closures due construction or other maintenance projects. Staff will monitor the areas closely, reminding visitors to practice physical distancing guidelines and other policies issued by the DNR earlier this week.

Some pit latrines in high-use areas will be open, but all other restrooms, drinking fountains and shower facilities will be closed. Park visitors are asked to use designated parking areas and follow all park signs.

The DNR’s reservation system for reservable campgrounds is available online, taking reservations for Monday and later.

Iowa has 68 state parks and four state forests, including hiking trails, lake recreation and camping. For more information, visit the DNR website.

10:23 a.m.: CEDAR RAPIDS TO HOST VIRTUAL CITY COUNCIL MEETING

The next Cedar Rapids City Council meeting will be hosted virtually. The meeting will be held May 12, beginning at noon. The livestream is available at the city’s Facebook page. Indexed videos can be accessed on the City of Cedar Rapids website.

The public is invited to provide comments, submitting written comments via email to cityclerk@cedar-rapids.org before the meeting or joining the Zoom conference call and registering here before 2 p.m. Tuesday. Registrants will receive an email with instructions to participate. Written comments received before 2 p.m. the day of the meeting will be given to City Council members before the event.

The public will only be invited to speak during designated public comment sections of the meeting. Please visit the City’s website for speaking guidelines. City Hall remains closed to the public. No in-person participation is available.

Tuesday’s meeting agenda will be posted to the website by 4 p.m. Friday.

MICHAEL BUBLE PERFORMANCES IN MOLINE, DES MOINES MOVED TO 2021

Michael Buble’s “An Evening with Michael Buble” Tour has rescheduled dates to 2021. The 26-date series of concerts will begin February 6 in Salt Lake City and conclude March 25 in Jacksonville, Fla., according to a news release Friday.

Bubble’s shows at TaxSlayer Center in Moline, Ill., has been switched to Feb. 20, 2021. He will perform at Wells Fargo Arena in Des Moines the following day.

Tickets for previously scheduled dates will be honored.

“I am so looking forward to getting back on stage,” Buble said in the release. “I’ve missed my fans and my touring family. Meantime, I hope everyone stays safe. We can all look forward to a great night out.”

Buble also just completed a series of Facebook Live shows while in quarantine with his family in Vancouver.

Comments: (319) 368-8679; kj.pilcher@thegazette.com




nc

Pence’s Iowa visit underscores coronavirus worry

DES MOINES — In traveling to Iowa to call attention to the burdens COVID-19 brought to religious services and the food supply, Vice President Mike Pence unwittingly called attention to another issue: whether the White House itself is safe from the disease.

So far this week, two White House aides — President Donald Trump’s valet on Thursday, and Pence’s press secretary on Friday — have tested positive for the virus.

On Friday morning, Pence’s departure to Des Moines was delayed an hour as Air Force Two idled on a tarmac near Washington. Though Pence’s press secretary was not on the plane, White House physicians through contact tracing identified six other aides who had been near her who were aboard, and pulled them from the flight. The White House later said the six had tested negative.

Trump, who identified the Pence aide as press secretary Katie Miller, said he was “not worried” about the virus in the White House.

Nonetheless, officials said they were stepping up safety protocols and were considering a mandatory mask policy for those in close contact with Trump and Pence.

The vice president and 10 members of his staff are given rapid coronavirus tests daily, and the president is also tested regularly.

Miller, who is married to Trump adviser Stephen Miller, had been in recent contact with Pence but not with the president. Pence is leader of the White House coronavirus task force and Katie Miller has handled the group’s communications.

After landing in Des Moines, Pence spoke to a group of faith leaders about the importance of resuming religious services, saying cancellations in the name of slowing the spread of the virus have “been a burden” for congregants.

His visit coincided with the state announcing 12 more deaths from the virus, a total of 243 in less than two months.

Pence spoke with the religious leaders and Republican officials during a brief visit. He also spoke later with agricultural and food company executives.

“It’s been a source of heartache for people across the country,” Pence told about a dozen people at the Church of the Way Presbyterian church in Urbandale.

Pence told the group that continued efforts to hold services online and in other ways “made incalculable difference in our nation seeing our way through these troubled times.”

Iowa is among many states where restrictions on in-person services are starting to ease. GOP Gov. Kim Reynolds, who joined both of the state’s Republican senators at the event, has instituted new rules that allow services to resume with restrictions.

At Friday’s event, some religious leaders expressed hesitation at resuming large gatherings, while others said they would begin holding services soon,

“We are pretty much in a position of uniformly believing that it’s too early to return to personal worship. It’s inadvisable at the moment particularly with rising case counts in communities where we are across the state,” said David Kaufman, rabbi of Temple B’nai Jeshurun in Des Moines.

The Rev. Terry Amann, of Church of the Way, said his church will resume services May 17 with chairs arranged so families can sit together but avoid the temptation to shake hands or offer hugs. He said hand sanitizer will be available.

A new poll by The University of Chicago Divinity School and the Associated Press-NORC Center for Public Affairs Research shows just 9 percent of Americans think in-person services should be allowed without restrictions, while 42 percent think they should be allowed with restrictions and 48 percent think they shouldn’t be allowed at all.

Pence later met with agriculture and food industry leaders. Iowa tops the nation in egg production and pork processing and is a top grower of corn and soybeans.

Meatpacking is among the state’s biggest employers, and companies have been working to restart operations after closing them because hundreds of their workers became infected.

As Pence touted the Trump administration’s announcement of the reopening of 14 meatpacking plants including two of the worst hit by coronavirus infections in Perry and Waterloo, the union representing workers called for safer work conditions.

“Iowa’s meatpacking workers are not sacrificial lambs. They have been working tirelessly during the coronavirus pandemic to ensure families here and across the country have access to the food they need,” said the United Food and Commercial Workers Union in a statement.

The Associated Press and the McClatchy Washington Bureau contributed to this report.




nc

Celebrating on a screen: Iowa universities hold first-ever online commencements

Iowa State University graduates who celebrated commencement Friday saw lots of caps and gowns, red-and-gold confetti and arenas packed with friends and family.

But none of those images were from this year — which now is defined by the novel coronavirus that has forced education online and put an end to large gatherings like graduation ceremonies.

Appearing in front of a red ISU screen Friday, College of Agriculture and Life Sciences Dean Daniel J. Robison addressed graduates like he usually would at commencement — but this time in a recorded message acknowledging the unprecedented circumstances keeping them apart.

“This year, because of the COVID crisis, we are unfortunately not all together for this happy occasion,” he said, pushing forward in a motivational tone by quoting famed ISU alumnus George Washington Carver.

“When you can do the common things in life in an uncommon way, you will command the attention of the world,” Robison said, citing Carver.

About 12,000 graduates across Iowa’s public universities this month are doing exactly that — capping their collegiate careers with never-before-attempted online-only commencement ceremonies, with each campus and their respective colleges attempting a variety of virtual celebration methods.

ISU and the University of Iowa are attempting some form of socially-distanced livestreamed convocation with countdown clocks and virtual confetti. All three campuses including the University of Northern Iowa have posted online recorded messages, videos and slides acknowledging individual graduates.

Some slides include photos, thank-yous, quotes and student plans for after graduation.

UNI, which didn’t try any form of a live virtual ceremony, instead created a graduation website that went live Thursday. That site hosts an array of recorded video messages — including one from UNI President Mark Nook who, standing alone behind a podium on campus clad in traditional academic regalia, recognized his campus’ 1,500-some spring graduates and their unusual challenges.

“We know the loss you feel in not being able to be on campus to celebrate this time with your friends, faculty and staff,” Nook said. “To walk around campus in your robe and to take those pictures with friends and family members … The loss is felt by many of us as well.”

He reminded those listening that this spring’s UNI graduates — like those at the UI and ISU — can participate in an upcoming in-person commencement ceremony.

And although students were allowed to return caps and gowns they ordered for their canceled walks across the stage, some kept them as keepsakes. The campuses offered other tokens of remembrance as well, including “CYlebration” gift packages ISU sent to graduates in April stuffed with a souvenir tassel, diploma cover, and streamer tube — to make up for the confetti that won’t be falling on graduation caps from the Hilton Coliseum rafters.

In addition to the recorded messages from 17 UI leaders — including President Bruce Harreld — the campus solicited parent messages, which will be included in the live virtual ceremonies.

To date, about 3,100 of the more than 5,400 UI graduates have RSVP’d to participate in the ceremony, which spokeswoman Anne Bassett said is a required affirmation from the students to have their names read.

“Students do not have to sign up to watch,” she said. “So there’s no way at this time to predict how many will do so.”

Despite the historic nature of the first online-only commencement ceremonies — forever bonding distanced graduates through the shared experience — UI graduate Omar Khodor, 22, said it’s a club he would have liked to avoid.

“I’d definitely prefer not to be part of that group,” the environmental science major said, sharing disappointment over the education, experiences and celebrations he lost to the pandemic.

“A lot of students like myself, we’re upset, but we’re not really allowed to be upset given the circumstances,” Khodor said. “You have this sense that something is unfair, that something has been taken from you. But you can’t be mad about it at all.”

‘Should I Dance Across the Stage?’

Life is too short to dwell on what could have been or what should have been — which sort of captures graduate Dawn Hales’ motivation to get an ISU degree.

The 63-year-old Ames grandmother calls herself the “oldest BSN Iowa State grad ever.”

“It’s the truth, because we’re only the second cohort to graduate,” Hales said. “I’ll probably be the oldest for a while.”

ISU began offering a Bachelor of Science in nursing degree in fall 2018 for registered nurses hoping to advance their careers — like Hales, who spent years in nursing before becoming director of nursing at Accura Healthcare, a skilled nursing and rehabilitation center in Ames.

In addition to wanting more education, Hales said, she felt like the “odd man out” in her red-and-gold family — with her husband, three sons and their wives all earning ISU degrees. She earned an associate degree and became a registered nurse with community college training.

“I was director of nursing at different facilities, but I did not have a four-year degree,” she said. “I always wanted to get my BSN.”

So in January 2019, she started full-time toward her three-semester pursuit of a BSN — even as she continued working. And her education took a relevant and important turn when COVID-19 arrived.

“My capstone project was infection control,” she said, noting her focus later sharpened to “infection control and crisis management” — perfect timing to fight the coronavirus, which has hit long-term care facilities particularly hard.

“We were hyper vigilant,” Hales said of her facility, which has yet to report a case of COVID-19. “I think we were probably one of the first facilities that pretty much shut down and started assessing our staff when they would come in.”

Hales said she was eager to walk in her first university graduation and was planning antics for it with her 10-year-old granddaughter.

“We were trying to think, should I dance across the stage?” Hales said. “Or would I grab a walker and act like an old lady going across the stage?

“She was trying to teach me to do this ‘dab’ move,” Hales said. “I said, ‘Honey, I cannot figure that out.’”

In the end, Hales watched the celebration online instead. She did, however, get a personalized license plate that reads, “RN2BSN.”

In From Idaho To Exalt ‘In ‘Our Own Way’

Coming from a family-run dairy farm in Jerome, Idaho, EllieMae Millenkamp, 22, is the first in her family to graduate college.

Although music is her passion, Millenkamp long expected to study at an agriculture school — but Colorado State was her original choice.

Then, while visiting family in Iowa during a cousin’s visit to ISU, she fell in love with the Ames campus and recalibrated her academic path.

While at ISU, the musical Millenkamp began writing more songs and performing more online, which led to in-person shows and a local band.

And then, during her junior year, a talent scout reached out to invite her to participate in an audition for NBC’s “The Voice.” That went well and Millenkamp, in the summer before her senior year, moved to Los Angeles and made it onto the show.

She achieved second-round status before being bumped, but the experience offered her lifelong friendships and connections and invigorated her musical pursuits — which have been slowed by COVID-19. Shows have been canceled in now idled bars.

Millenkamp went back to Idaho to be with her family, like thousands of her peers also did with their families, when the ISU campus shut down.

After graduation she plans on returning and working the family farm again until her musical career has the chance to regain momentum.

But she recently returned to Ames for finals. And she and some friends, also in town, plan to celebrate graduation, even if not with an official cap and gown.

“We’ll probably have a bonfire and all hang out,” she said. “We’ll celebrate in our own way.”

Seeking Closure After Abrupt Campus Exits

Most college seniors nearing graduation get to spend their academic hours focusing on their major and interests, wrapping their four or sometimes five years with passion projects and capstone experiences.

That was Omar Khodor’s plan — with lab-based DNA sequencing on tap, along with a geology trip and policy proposal he planned to present to the Iowa Legislature. But all that got canceled — and even some requirements were waived since COVID-19 made them impossible.

“There were still a lot of a lot of things to wrap up,” he said. “A lot of things I was looking forward to.”

He’s ending the year with just three classes to finish and “absolutely” would have preferred to have a fuller plate.

But Khodor’s academic career isn’t over. He’s planning to attend law school in the fall at the University of Pennsylvania, where he’ll pursue environmental law. But this spring has diminished his enthusiasm, with the question lingering of whether in-person courses will return to campus soon.

If they don’t, he’s still leaning toward enrolling — in part — because of all the work that goes into applying and getting accepted, which he’s already done.

“But online classes are definitely less fulfilling, less motivating. You feel like you learn less,” he said. “So it will kind of be a tossup. There’ll be some trade-offs involved in what I would gain versus what I would be paying for such an expensive endeavor like law school.”

As for missing a traditional college commencement, Khodor said he will, even though he plans to participate in the virtual alternative.

“Before it got canceled, I didn’t think that I was looking forward to it as much as I actually was,” he said.

Not so much for the pomp and circumstance, but for the closure, which none of the seniors got this year. When the universities announced no one would return to campus this semester, students were away on spring break.

They had already experienced their last in-person class, their last after-class drink, their last cram session, their last study group, their last lecture, their last Iowa Memorial Union lunch — and they didn’t even know it.

“So many of us, we won’t have closure, and that can kind of be a difficult thing,” he said.

Comments: (319) 339-3158; vanessa.miller@thegazette.com

Online Celebrations

For a list of commencement times and virtual celebrations, visit:

The University of Iowa’s commencement site at https://commencement.uiowa.edu/

Iowa State University’s commencement site at https://virtual.graduation.iastate.edu/

University of Northern Iowa’s commencement site at https://vgrad.z19.web.core.windows.net/uni/index.html




nc

I just realized that I can export my entire story all at once...



I just realized that I can export my entire story all at once now, which means uploading my tutorials to my Facebook page will be a million times easier (it was tedious to stitch all the individual clips together before). ????
.
Related: I posted a story this morning deconstructing the edit on yesterday’s shot.
.
Also related: I uploaded the 3 tutorials from my November feature on @thecreatorclass to my Facebook page this morning too. More to come! (at London, United Kingdom)




nc

New Auphonic Privacy Policy and GDPR Compliance

The new General Data Protection Regulation (GDPR) of the European Union will be implemented on May 25th, 2018. We used this opportunity to rework many of our internal data processing structures, removed unnecessary trackers and apply this strict and transparent regulation also to all our customers worldwide.

Image from pixapay.com.

At Auphonic we store as few personal information as possible about your usage and production data.
Here are a few human-readable excerpts from our privacy policy about which information we collect, how we process it, how long and where we store it - for more details please see our full Privacy Policy.

Information that we collect

  • Your email address when you create an account.
  • Your files, content, configuration parameters and other information, including your photos, audio or video files, production settings, metadata and emails.
  • Your tokens or authentication information if you choose to connect to any External services.
  • Your subscription plan, credits purchases and production billing history associated with your account, where applicable.
  • Your interactions with us, whether by email, on our blog or on our social media platforms.

We do not process any special categories of data (also commonly referred to as “sensitive personal data”).

How we use and process your Data

  • To authenticate you when you log on to your account.
  • To run your Productions, such that Auphonic can create new media files from your Content according to your instructions.
  • To improve our audio processing algorithms. For this purpose, you agree that your Content may be viewed and/or listened to by an Auphonic employee or any person contracted by Auphonic to work on our audio processing algorithms.
  • To connect your Auphonic account to an External service according to your instructions.
  • To develop, improve and optimize the contents, screen layouts and features of our Services.
  • To follow up on any question and request for assistance or information.

When using our Service, you fully retain any rights that you have with regards to your Content, including copyright.

How long we store your Information

Your Productions and any associated audio or video files will be permanently deleted from our servers including all its metadata and possible data from external services after 21 days (7 days for video productions).
We will, however, keep billing metadata associated with your Productions in an internal database (how many hours of audio you processed).

Also, we might store selected audio and/or video files (or excerpts thereof) from your Content in an internal storage space for the purpose of improving our audio processing algorithms.

Other information like Presets, connected External services, Account settings etc. will be stored until you delete them or when your account is deleted.

Where we store your Data

All data that we collect from you is stored on secure servers in the European Economic Area (in Germany).

More Information and Contact

For more information please read our full Privacy Policy.

Please do not hesitate to contact us regarding any matter relating to our privacy policy and GDPR compliance!







nc

Leveler Presets, LRA Target and Advanced Audio Parameters (Beta)

Lots of users have asked us about more customization and control over the sound of our audio algorithms in the past, so today, we have introduced some advanced algorithm parameters for our singletrack version in a private beta program!

The following new parameters are available:

UPDATE Nov. 2018:
We released a complete rework of the Adaptive Leveler parameters and the description here is not valid anymore!
Please see Auphonic Adaptive Leveler Customization (Beta Update)!

Please join our private beta program and let us know how you use these new features or if you need even more control!

Leveler Presets

Our Adaptive Leveler corrects level differences between speakers, between music and speech and will also apply dynamic range compression to achieve a balanced overall loudness. If you don't know about the Leveler yet, take a look at our Audio Examples.

Leveler presets are basically complete new leveling algorithms, which we have been working on in the past few months:
Our current Leveler tries to normalize all speakers to the same loudness. However, in some cases, you might want more or less loudness differences (dynamic range / loudness range) between the speakers and music segments, or more or less compression, etc.
For these use cases, we have developed additional Leveler Presets and the parameter Maximum Loudness Range.

The following Leveler presets are now available:
Preset Medium:
This is our current leveling algorithm as demonstrated in the Audio Examples.
Preset Hard:
The hard preset reacts faster and applies more gain and compression compared to the medium preset. It is built for recordings with extreme loudness differences, for example very quiet questions from the audience in a lecture recording, extremely soft and loud voices within one audio track, etc.
Preset Soft:
This preset reacts slower, applies less gain and compression compared to the medium preset. Use it if you want to keep more loudness differences (dynamic narration), if you want your voices to sound "less compressed/processed", for dynamic music (concert/classical recordings), background music, etc.
Preset Softer:
Like soft, but softer :)
Preset Speech Medium, Music Soft:
Uses the medium preset in speech segments and the soft preset in music segments. It is built for music live recordings or dynamic music mixes, where you want to amplify all speakers but keep the loudness differences within and between music segments.
Preset Medium, No Compressor:
Like the medium preset, but only (mid-term) leveling and no (short-term) compression is applied. This preset is optimal if you just use a Maximum Loudness Range Target and want to avoid any additional compression as much as possible.
Please let us know your use case, if you need more/other controls or if anything is confusing. The Leveler presets are still in private beta and can be changed as necessary!

Maximum Loudness Range (LRA) Target

The loudness range (LRA) indicates the variation of loudness over the course of a program and is measured in LU (loudness units) - for more details see Loudness Measurement and Normalization or EBU Tech 3342.

The parameter Max Loudness Range controls how much leveling is applied:
volume changes of our Adaptive Leveler will be restricted so that the loudness range of the output file is below the selected value.
High loudness range values will result in very dynamic output files, low loudness range values in compressed output audio. If the LRA value of your input file is already below the maximum loudness range value, no leveling at all will be applied.

It is also important which Leveler Preset you select, for example, if you use the soft(er) preset, it won't be possible to achieve very low loudness range targets.

Also, the Max Loudness Range parameter is not such a precise target value as the Loudness Target. The LRA of your output file might be off a few LU, as it is not reasonable to reach the exact target value.

Use Cases: The Maximum LRA parameter allows you to control the strength of our leveling algorithms, in combination with the parameter Leveler Preset. This might be used for automatic mixdowns with different LRA values for different target platforms (very compressed ones like mobile devices or Alexa, very dynamic ones like home cinema, etc.).

Maximum True Peak Level

This parameter sets the maximum allowed true peak level of the processed output file, which is controlled by the True Peak Limiter after our Global Loudness Normalization algorithms.

If set to Auto (which is the current default), a reasonable value according to the selected loudness target is used: -1dBTP for 23 LUFS (EBU R128) and higher, -2dBTP for -24 LUFS (ATSC A/85) and lower loudness targets.

The maximum true peak level parameter is already available in our desktop program.

Better Hum and Noise Reduction Controls

In addition to the parameter (Noise) Reduction Amount, we now offer two more parameters to control the combination of our Noise and Hum Reduction algorithms:
Hum Base Frequency:
Set the hum base frequency to 50Hz or 60Hz (if you know it), or use Auto to automatically detect the hum base frequency in each speech region.
Hum Reduction Amount:
Maximum hum reduction amount in dB, higher values remove more noise.
In Auto mode, a classifier decides how much hum reduction is necessary in each speech region. Set it to a custom value (> 0), if you prefer more hum reduction or want to bypass our classifier. Use Disable Dehum to disable hum reduction and use our noise reduction algorithms only.

Behavior of noise and hum reduction parameter combinations:

Noise Reduction Amount Hum Base Frequency Hum Reduction Amount
Auto Auto Auto Automatic hum and noise reduction
Auto or > 0 * Disabled No hum reduction, only denoise
Disabled 50Hz Auto or > 0 Force 50Hz hum reduction, no denoise
Disabled Auto Auto or > 0 Automatic dehum, no denoise
12dB 60Hz Auto or > 0 Always do dehum (60Hz) and denoise (12dB)

Advanced Parameters Private Beta and Feedback

At the moment the advanced algorithm parameters are for beta users only. This is to allow us to get user feedback, so we can change the parameters to suit user needs.
Please let us know your case studies, if you need any other algorithm parameters or if you have any questions!

Here are some private beta invitation codes:

y6KCBI4yo0 ksIFEsmI1y BDZec2a21V i4XRGLlVm2 0UDxuS0vbu aaBxi35sKN aaiDSZUbmY bu8lPF80Ih eMsSl6Sf8K DaWpsUnyjo
2YM00m8zDW wh7K2pPmSa jCX7mMy2OJ ZGvvhzCpTF HI0lmGhjVO eXqVhN6QLU t4BH0tYcxY LMjQREVuOx emIogTCAth 0OTPNB7Coz
VIFY8STj2f eKzRSWzOyv 40cMMKKCMN oBruOxBkqS YGgPem6Ne7 BaaFG9I1xZ iSC0aNXoLn ZaS4TykKIa l32bTSBbAx xXWraxS40J
zGtwRJeAKy mVsx489P5k 6SZM5HjkxS QmzdFYOIpf 500AHHtEFA 7Kvk6JRU66 z7ATzwado6 4QEtpzeKzC c9qt9Z1YXx pGSrDzbEED
MP3JUTdnlf PDm2MOLJIG 3uDietVFSL 1i7jZX0Y9e zPkSgmAqqP 5OhcmHIZUP E0vNsPxZ4s FzTIyZIG2r 5EywA0M7r5 FMhpcFkVN5
oRLbRGcRmI 2LTh8GlN7h Cjw6Z3cveP fayCewjE55 GbkyX89Lxu 4LpGZGZGgc iQV7CXYwkH pGLyQPgaha e3lhKDRUMs Skrei1tKIa
We are happy to send further invitation codes to all interested users - please do not hesitate to contact us!

If you have an invitation code, you can enter it here to activate the advanced audio algorithm parameters:
Auphonic Algorithm Parameters Private Beta Activation







nc

Advanced Multitrack Audio Algorithms Release (Beta)

Last weekend, at the Subscribe10 conference, we released Advanced Audio Algorithm Parameters for Multitrack Productions:

We launched our advanced audio algorithm parameters for Singletrack Productions last year. Now these settings (and more) are available for Multitrack Algorithms as well, which gives you detailed control for each track of your production.

The following new parameters are available:

Please join our private beta program and let us know how you use these new features or if you need even more control!

Fore/Background Settings

The parameter Fore/Background controls whether a track should be in foreground, in background, ducked, or unchanged, which is especially important for music or clip tracks.
For more details, please see Automatic Ducking, Foreground and Background Tracks .

We now added the new option Unchanged and a new parameter to set the level of background segments/tracks:
Unchanged (Foreground):
We sometimes received complaints from users, which produced very complex music or clip tracks, that Auphonic changes the levels too hard.
If you set the parameter Fore/Background to the new option Unchanged (Foreground), Level relations within this track won’t be changed at all. It will be added to the final mixdown so that foreground/solo parts of this track will be as loud as (foreground) speech from other tracks.
Background Level:
It is now possible to set the level of background segments/tracks (compared to foreground segments) in background and ducking tracks. By default, background and ducking segments are 18dB softer than foreground segments.

Leveler Parameters

Similar to our Singletrack Advanced Leveler Parameters (see this previous blog post), we also released leveling parameters for Multitrack Productions now.
The following advanced parameters for our Multitrack Adaptive Leveler can be set for each track and allow you to customize which parts of the audio should be leveled, how much they should be leveled, how much dynamic range compression should be applied and to set the stereo panorama (balance):

Leveler Preset:
Select the Speech or Music Leveler for this track.
If set to Automatic (default), a classifier will decide if this is a music or speech track.
Dynamic Range:
The parameter Dynamic Range controls how much leveling is applied: Higher values result in more dynamic output audio files (less leveling). If you want to increase the dynamic range by 3dB (or LU), just increase the Dynamic Range parameter by 3dB.
For more details, please see Multitrack Leveler Parameters.
Compressor:
Select a preset for Micro-Dynamics Compression: Auto, Soft, Medium, Hard or Off.
The Compressor adjusts short-term dynamics, whereas the Leveler adjusts mid-term level differences.
For more details, please see Multitrack Leveler Parameters.
Stereo Panorama (Balance):
Change the stereo panorama (balance for stereo input files) of the current track.
Possible values: L100, L75, L50, L25, Center, R25, R50, R75 and R100.

If you understand German and want to know more about our Advanced Leveler Parameters and audio dynamics in general, watch our talk at the Subscribe10 conference:
Video: Audio Lautheit und Dynamik.

Better Hum and Noise Reduction Controls

We now offer three parameters to control the combination of our Multitrack Noise and Hum Reduction Algorithms for each input track:
Noise Reduction Amount:
Maximum noise and hum reduction amount in dB, higher values remove more noise.
In Auto mode, a classifier decides if and how much noise reduction is necessary (to avoid artifacts). Set to a custom (non-Auto) value if you prefer more noise reduction or want to bypass our classifier.
Hum Base Frequency:
Set the hum base frequency to 50Hz or 60Hz (if you know it), or use Auto to automatically detect the hum base frequency in each speech region.
Hum Reduction Amount:
Maximum hum reduction amount in dB, higher values remove more noise.
In Auto mode, a classifier decides how much hum reduction is necessary in each speech region. Set it to a custom value (> 0), if you prefer more hum reduction or want to bypass our classifier. Use Disable Dehum to disable hum reduction and use our noise reduction algorithms only.

Behavior of noise and hum reduction parameter combinations:

Noise Reduction Amount Hum Base Frequency Hum Reduction Amount
Auto Auto Auto Automatic hum and noise reduction
Auto or > 0 * Disabled No hum reduction, only denoise
Disabled 50Hz Auto or > 0 Force 50Hz hum reduction, no denoise
Disabled Auto Auto or > 0 Automatic dehum, no denoise
12dB 60Hz Auto or > 0 Always do dehum (60Hz) and denoise (12dB)

Maximum True Peak Level

In the Master Algorithm Settings of your multitrack production, you can set the maximum allowed true peak level of the processed output file, which is controlled by the True Peak Limiter after our Loudness Normalization algorithms.

If set to Auto (which is the current default), a reasonable value according to the selected loudness target is used: -1dBTP for 23 LUFS (EBU R128) and higher, -2dBTP for -24 LUFS (ATSC A/85) and lower loudness targets.

Full API Support

All advanced algorithm parameters, for Singletrack and Multitrack Productions, are available in our API as well, which allows you to integrate them into your scripts, external workflows and third-party applications.

Singletrack API:
Documentation on how to use the advanced algorithm parameters in our singletrack production API: Advanced Algorithm Parameters
Multitrack API:
Documentation of advanced settings for each track of a multitrack production:
Multitrack Advanced Audio Algorithm Settings

Join the Beta and Send Feedback

Please join our beta and let us know your case studies, if you need any other algorithm parameters or if you have any questions!

Here are some private beta invitation codes:

8tZPc3T9pH VAvO8VsDg9 0TwKXBW4Ni kjXJMivtZ1 J9APmAAYjT Zwm6HabuFw HNK5gF8FR5 Do1MPHUyPW CTk45VbV4t xYOzDkEnWP
9XE4dZ0FxD 0Sl3PxDRho uSoRQxmKPx TCI62OjEYu 6EQaPYs7v4 reIJVOwIr8 7hPJqZmWfw kti3m5KbNE GoM2nF0AcN xHCbDC37O5
6PabLBRm9P j2SoI8peiY olQ2vsmnfV fqfxX4mWLO OozsiA8DWo weJw0PXDky VTnOfOiL6l B6HRr6gil0 so0AvM1Ryy NpPYsInFqm
oFeQPLwG0k HmCOkyaX9R G7DR5Sc9Kv MeQLSUCkge xCSvPTrTgl jyQKG3BWWA HCzWRxSrgW xP15hYKEDl 241gK62TrO Q56DHjT3r4
9TqWVZHZLE aWFMSWcuX8 x6FR5OTL43 Xf6tRpyP4S tDGbOUngU0 5BkOF2I264 cccHS0KveO dT29cF75gG 2ySWlYp1kp iJWPhpAimF
We are happy to send further invitation codes to all interested users - please do not hesitate to contact us!

If you have an invitation code, you can enter it here to activate the Multitrack Advanced Audio Algorithm Parameters:
Auphonic Algorithm Parameters Private Beta Activation







nc

Concurrency & Multithreading in iOS

Concurrency is the notion of multiple things happening at the same time. This is generally achieved either via time-slicing, or truly in parallel if multiple CPU cores are available to the host operating system. We've all experienced a lack of concurrency, most likely in the form of an app freezing up when running a heavy task. UI freezes don't necessarily occur due to the absence of concurrency — they could just be symptoms of buggy software — but software that doesn't take advantage of all the computational power at its disposal is going to create these freezes whenever it needs to do something resource-intensive. If you've profiled an app hanging in this way, you'll probably see a report that looks like this:

Anything related to file I/O, data processing, or networking usually warrants a background task (unless you have a very compelling excuse to halt the entire program). There aren't many reasons that these tasks should block your user from interacting with the rest of your application. Consider how much better the user experience of your app could be if instead, the profiler reported something like this:

Analyzing an image, processing a document or a piece of audio, or writing a sizeable chunk of data to disk are examples of tasks that could benefit greatly from being delegated to background threads. Let's dig into how we can enforce such behavior into our iOS applications.


A Brief History

In the olden days, the maximum amount of work per CPU cycle that a computer could perform was determined by the clock speed. As processor designs became more compact, heat and physical constraints started becoming limiting factors for higher clock speeds. Consequentially, chip manufacturers started adding additional processor cores on each chip in order to increase total performance. By increasing the number of cores, a single chip could execute more CPU instructions per cycle without increasing its speed, size, or thermal output. There's just one problem...

How can we take advantage of these extra cores? Multithreading.

Multithreading is an implementation handled by the host operating system to allow the creation and usage of n amount of threads. Its main purpose is to provide simultaneous execution of two or more parts of a program to utilize all available CPU time. Multithreading is a powerful technique to have in a programmer's toolbelt, but it comes with its own set of responsibilities. A common misconception is that multithreading requires a multi-core processor, but this isn't the case — single-core CPUs are perfectly capable of working on many threads, but we'll take a look in a bit as to why threading is a problem in the first place. Before we dive in, let's look at the nuances of what concurrency and parallelism mean using a simple diagram:

In the first situation presented above, we observe that tasks can run concurrently, but not in parallel. This is similar to having multiple conversations in a chatroom, and interleaving (context-switching) between them, but never truly conversing with two people at the same time. This is what we call concurrency. It is the illusion of multiple things happening at the same time when in reality, they're switching very quickly. Concurrency is about dealing with lots of things at the same time. Contrast this with the parallelism model, in which both tasks run simultaneously. Both execution models exhibit multithreading, which is the involvement of multiple threads working towards one common goal. Multithreading is a generalized technique for introducing a combination of concurrency and parallelism into your program.


The Burden of Threads

A modern multitasking operating system like iOS has hundreds of programs (or processes) running at any given moment. However, most of these programs are either system daemons or background processes that have very low memory footprint, so what is really needed is a way for individual applications to make use of the extra cores available. An application (process) can have many threads (sub-processes) operating on shared memory. Our goal is to be able to control these threads and use them to our advantage.

Historically, introducing concurrency to an app has required the creation of one or more threads. Threads are low-level constructs that need to be managed manually. A quick skim through Apple's Threaded Programming Guide is all it takes to see how much complexity threaded code adds to a codebase. In addition to building an app, the developer has to:

  • Responsibly create new threads, adjusting that number dynamically as system conditions change
  • Manage them carefully, deallocating them from memory once they have finished executing
  • Leverage synchronization mechanisms like mutexes, locks, and semaphores to orchestrate resource access between threads, adding even more overhead to application code
  • Mitigate risks associated with coding an application that assumes most of the costs associated with creating and maintaining any threads it uses, and not the host OS

This is unfortunate, as it adds enormous levels of complexity and risk without any guarantees of improved performance.


Grand Central Dispatch

iOS takes an asynchronous approach to solving the concurrency problem of managing threads. Asynchronous functions are common in most programming environments, and are often used to initiate tasks that might take a long time, like reading a file from the disk, or downloading a file from the web. When invoked, an asynchronous function executes some work behind the scenes to start a background task, but returns immediately, regardless of how long the original task might takes to actually complete.

A core technology that iOS provides for starting tasks asynchronously is Grand Central Dispatch (or GCD for short). GCD abstracts away thread management code and moves it down to the system level, exposing a light API to define tasks and execute them on an appropriate dispatch queue. GCD takes care of all thread management and scheduling, providing a holistic approach to task management and execution, while also providing better efficiency than traditional threads.

Let's take a look at the main components of GCD:

What've we got here? Let's start from the left:

  • DispatchQueue.main: The main thread, or the UI thread, is backed by a single serial queue. All tasks are executed in succession, so it is guaranteed that the order of execution is preserved. It is crucial that you ensure all UI updates are designated to this queue, and that you never run any blocking tasks on it. We want to ensure that the app's run loop (called CFRunLoop) is never blocked in order to maintain the highest framerate. Subsequently, the main queue has the highest priority, and any tasks pushed onto this queue will get executed immediately.
  • DispatchQueue.global: A set of global concurrent queues, each of which manage their own pool of threads. Depending on the priority of your task, you can specify which specific queue to execute your task on, although you should resort to using default most of the time. Because tasks on these queues are executed concurrently, it doesn't guarantee preservation of the order in which tasks were queued.

Notice how we're not dealing with individual threads anymore? We're dealing with queues which manage a pool of threads internally, and you will shortly see why queues are a much more sustainable approach to multhreading.

Serial Queues: The Main Thread

As an exercise, let's look at a snippet of code below, which gets fired when the user presses a button in the app. The expensive compute function can be anything. Let's pretend it is post-processing an image stored on the device.

import UIKit

class ViewController: UIViewController {
    @IBAction func handleTap(_ sender: Any) {
        compute()
    }

    private func compute() -> Void {
        // Pretending to post-process a large image.
        var counter = 0
        for _ in 0..<9999999 {
            counter += 1
        }
    }
}

At first glance, this may look harmless, but if you run this inside of a real app, the UI will freeze completely until the loop is terminated, which will take... a while. We can prove it by profiling this task in Instruments. You can fire up the Time Profiler module of Instruments by going to Xcode > Open Developer Tool > Instruments in Xcode's menu options. Let's look at the Threads module of the profiler and see where the CPU usage is highest.

We can see that the Main Thread is clearly at 100% capacity for almost 5 seconds. That's a non-trivial amount of time to block the UI. Looking at the call tree below the chart, we can see that the Main Thread is at 99.9% capacity for 4.43 seconds! Given that a serial queue works in a FIFO manner, tasks will always complete in the order in which they were inserted. Clearly the compute() method is the culprit here. Can you imagine clicking a button just to have the UI freeze up on you for that long?

Background Threads

How can we make this better? DispatchQueue.global() to the rescue! This is where background threads come in. Referring to the GCD architecture diagram above, we can see that anything that is not the Main Thread is a background thread in iOS. They can run alongside the Main Thread, leaving it fully unoccupied and ready to handle other UI events like scrolling, responding to user events, animating etc. Let's make a small change to our button click handler above:

class ViewController: UIViewController {
    @IBAction func handleTap(_ sender: Any) {
        DispatchQueue.global(qos: .userInitiated).async { [unowned self] in
            self.compute()
        }
    }

    private func compute() -> Void {
        // Pretending to post-process a large image.
        var counter = 0
        for _ in 0..<9999999 {
            counter += 1
        }
    }
}

Unless specified, a snippet of code will usually default to execute on the Main Queue, so in order to force it to execute on a different thread, we'll wrap our compute call inside of an asynchronous closure that gets submitted to the DispatchQueue.global queue. Keep in mind that we aren't really managing threads here. We're submitting tasks (in the form of closures or blocks) to the desired queue with the assumption that it is guaranteed to execute at some point in time. The queue decides which thread to allocate the task to, and it does all the hard work of assessing system requirements and managing the actual threads. This is the magic of Grand Central Dispatch. As the old adage goes, you can't improve what you can't measure. So we measured our truly terrible button click handler, and now that we've improved it, we'll measure it once again to get some concrete data with regards to performance.

Looking at the profiler again, it's quite clear to us that this is a huge improvement. The task takes an identical amount of time, but this time, it's happening in the background without locking up the UI. Even though our app is doing the same amount of work, the perceived performance is much better because the user will be free to do other things while the app is processing.

You may have noticed that we accessed a global queue of .userInitiated priority. This is an attribute we can use to give our tasks a sense of urgency. If we run the same task on a global queue of and pass it a qos attribute of background , iOS will think it's a utility task, and thus allocate fewer resources to execute it. So, while we don't have control over when our tasks get executed, we do have control over their priority.

A Note on Main Thread vs. Main Queue

You might be wondering why the Profiler shows "Main Thread" and why we're referring to it as the "Main Queue". If you refer back to the GCD architecture we described above, the Main Queue is solely responsible for managing the Main Thread. The Dispatch Queues section in the Concurrency Programming Guide says that "the main dispatch queue is a globally available serial queue that executes tasks on the application’s main thread. Because it runs on your application’s main thread, the main queue is often used as a key synchronization point for an application."

The terms "execute on the Main Thread" and "execute on the Main Queue" can be used interchangeably.


Concurrent Queues

So far, our tasks have been executed exclusively in a serial manner. DispatchQueue.main is by default a serial queue, and DispatchQueue.global gives you four concurrent dispatch queues depending on the priority parameter you pass in.

Let's say we want to take five images, and have our app process them all in parallel on background threads. How would we go about doing that? We can spin up a custom concurrent queue with an identifier of our choosing, and allocate those tasks there. All that's required is the .concurrent attribute during the construction of the queue.

class ViewController: UIViewController {
    let queue = DispatchQueue(label: "com.app.concurrentQueue", attributes: .concurrent)
    let images: [UIImage] = [UIImage].init(repeating: UIImage(), count: 5)

    @IBAction func handleTap(_ sender: Any) {
        for img in images {
            queue.async { [unowned self] in
                self.compute(img)
            }
        }
    }

    private func compute(_ img: UIImage) -> Void {
        // Pretending to post-process a large image.
        var counter = 0
        for _ in 0..<9999999 {
            counter += 1
        }
    }
}

Running that through the profiler, we can see that the app is now spinning up 5 discrete threads to parallelize a for-loop.

Parallelization of N Tasks

So far, we've looked at pushing computationally expensive task(s) onto background threads without clogging up the UI thread. But what about executing parallel tasks with some restrictions? How can Spotify download multiple songs in parallel, while limiting the maximum number up to 3? We can go about this in a few ways, but this is a good time to explore another important construct in multithreaded programming: semaphores.

Semaphores are signaling mechanisms. They are commonly used to control access to a shared resource. Imagine a scenario where a thread can lock access to a certain section of the code while it executes it, and unlocks after it's done to let other threads execute the said section of the code. You would see this type of behavior in database writes and reads, for example. What if you want only one thread writing to a database and preventing any reads during that time? This is a common concern in thread-safety called Readers-writer lock. Semaphores can be used to control concurrency in our app by allowing us to lock n number of threads.

let kMaxConcurrent = 3 // Or 1 if you want strictly ordered downloads!
let semaphore = DispatchSemaphore(value: kMaxConcurrent)
let downloadQueue = DispatchQueue(label: "com.app.downloadQueue", attributes: .concurrent)

class ViewController: UIViewController {
    @IBAction func handleTap(_ sender: Any) {
        for i in 0..<15 {
            downloadQueue.async { [unowned self] in
                // Lock shared resource access
                semaphore.wait()

                // Expensive task
                self.download(i + 1)

                // Update the UI on the main thread, always!
                DispatchQueue.main.async {
                    tableView.reloadData()

                    // Release the lock
                    semaphore.signal()
                }
            }
        }
    }

    func download(_ songId: Int) -> Void {
        var counter = 0

        // Simulate semi-random download times.
        for _ in 0..<Int.random(in: 999999...10000000) {
            counter += songId
        }
    }
}

Notice how we've effectively restricted our download system to limit itself to k number of downloads. The moment one download finishes (or thread is done executing), it decrements the semaphore, allowing the managing queue to spawn another thread and start downloading another song. You can apply a similar pattern to database transactions when dealing with concurrent reads and writes.

Semaphores usually aren't necessary for code like the one in our example, but they become more powerful when you need to enforce synchronous behavior whille consuming an asynchronous API. The above could would work just as well with a custom NSOperationQueue with a maxConcurrentOperationCount, but it's a worthwhile tangent regardless.


Finer Control with OperationQueue

GCD is great when you want to dispatch one-off tasks or closures into a queue in a 'set-it-and-forget-it' fashion, and it provides a very lightweight way of doing so. But what if we want to create a repeatable, structured, long-running task that produces associated state or data? And what if we want to model this chain of operations such that they can be cancelled, suspended and tracked, while still working with a closure-friendly API? Imagine an operation like this:

This would be quite cumbersome to achieve with GCD. We want a more modular way of defining a group of tasks while maintaining readability and also exposing a greater amount of control. In this case, we can use Operation objects and queue them onto an OperationQueue, which is a high-level wrapper around DispatchQueue. Let's look at some of the benefits of using these abstractions and what they offer in comparison to the lower-level GCI API:

  • You may want to create dependencies between tasks, and while you could do this via GCD, you're better off defining them concretely as Operation objects, or units of work, and pushing them onto your own queue. This would allow for maximum reusability since you may use the same pattern elsewhere in an application.
  • The Operation and OperationQueue classes have a number of properties that can be observed, using KVO (Key Value Observing). This is another important benefit if you want to monitor the state of an operation or operation queue.
  • Operations can be paused, resumed, and cancelled. Once you dispatch a task using Grand Central Dispatch, you no longer have control or insight into the execution of that task. The Operation API is more flexible in that respect, giving the developer control over the operation's life cycle.
  • OperationQueue allows you to specify the maximum number of queued operations that can run simultaneously, giving you a finer degree of control over the concurrency aspects.

The usage of Operation and OperationQueue could fill an entire blog post, but let's look at a quick example of what modeling dependencies looks like. (GCD can also create dependencies, but you're better off dividing up large tasks into a series of composable sub-tasks.) In order to create a chain of operations that depend on one another, we could do something like this:

class ViewController: UIViewController {
    var queue = OperationQueue()
    var rawImage = UIImage? = nil
    let imageUrl = URL(string: "https://example.com/portrait.jpg")!
    @IBOutlet weak var imageView: UIImageView!

    let downloadOperation = BlockOperation {
        let image = Downloader.downloadImageWithURL(url: imageUrl)
        OperationQueue.main.async {
            self.rawImage = image
        }
    }

    let filterOperation = BlockOperation {
        let filteredImage = ImgProcessor.addGaussianBlur(self.rawImage)
        OperationQueue.main.async {
            self.imageView = filteredImage
        }
    }

    filterOperation.addDependency(downloadOperation)

    [downloadOperation, filterOperation].forEach {
        queue.addOperation($0)
     }
}

So why not opt for a higher level abstraction and avoid using GCD entirely? While GCD is ideal for inline asynchronous processing, Operation provides a more comprehensive, object-oriented model of computation for encapsulating all of the data around structured, repeatable tasks in an application. Developers should use the highest level of abstraction possible for any given problem, and for scheduling consistent, repeated work, that abstraction is Operation. Other times, it makes more sense to sprinkle in some GCD for one-off tasks or closures that we want to fire. We can mix both OperationQueue and GCD to get the best of both worlds.


The Cost of Concurrency

DispatchQueue and friends are meant to make it easier for the application developer to execute code concurrently. However, these technologies do not guarantee improvements to the efficiency or responsiveness in an application. It is up to you to use queues in a manner that is both effective and does not impose an undue burden on other resources. For example, it's totally viable to create 10,000 tasks and submit them to a queue, but doing so would allocate a nontrivial amount of memory and introduce a lot of overhead for the allocation and deallocation of operation blocks. This is the opposite of what you want! It's best to profile your app thoroughly to ensure that concurrency is enhancing your app's performance and not degrading it.

We've talked about how concurrency comes at a cost in terms of complexity and allocation of system resources, but introducing concurrency also brings a host of other risks like:

  • Deadlock: A situation where a thread locks a critical portion of the code and can halt the application's run loop entirely. In the context of GCD, you should be very careful when using the dispatchQueue.sync { } calls as you could easily get yourself in situations where two synchronous operations can get stuck waiting for each other.
  • Priority Inversion: A condition where a lower priority task blocks a high priority task from executing, which effectively inverts their priorities. GCD allows for different levels of priority on its background queues, so this is quite easily a possibility.
  • Producer-Consumer Problem: A race condition where one thread is creating a data resource while another thread is accessing it. This is a synchronization problem, and can be solved using locks, semaphores, serial queues, or a barrier dispatch if you're using concurrent queues in GCD.
  • ...and many other sorts of locking and data-race conditions that are hard to debug! Thread safety is of the utmost concern when dealing with concurrency.

Parting Thoughts + Further Reading

If you've made it this far, I applaud you. Hopefully this article gives you a lay of the land when it comes to multithreading techniques on iOS, and how you can use some of them in your app. We didn't get to cover many of the lower-level constructs like locks, mutexes and how they help us achieve synchronization, nor did we get to dive into concrete examples of how concurrency can hurt your app. We'll save those for another day, but you can dig into some additional reading and videos if you're eager to dive deeper.




nc

Committed to the wrong branch? -, @{upstream}, and @{-1} to the rescue

I get into this situation sometimes. Maybe you do too. I merge feature work into a branch used to collect features, and then continue development but on that branch instead of back on the feature branch

git checkout feature
# ... bunch of feature commits ...
git push
git checkout qa-environment
git merge --no-ff --no-edit feature
git push
# deploy qa-environment to the QA remote environment
# ... more feature commits ...
# oh. I'm not committing in the feature branch like I should be

and have to move those commits to the feature branch they belong in and take them out of the throwaway accumulator branch

git checkout feature
git cherry-pick origin/qa-environment..qa-environment
git push
git checkout qa-environment
git reset --hard origin/qa-environment
git merge --no-ff --no-edit feature
git checkout feature
# ready for more feature commits

Maybe you prefer

git branch -D qa-environment
git checkout qa-environment

over

git checkout qa-environment
git reset --hard origin/qa-environment

Either way, that works. But it'd be nicer if we didn't have to type or even remember the branches' names and the remote's name. They are what is keeping this from being a context-independent string of commands you run any time this mistake happens. That's what we're going to solve here.

Shorthands for longevity

I like to use all possible natively supported shorthands. There are two broad motivations for that.

  1. Fingers have a limited number of movements in them. Save as many as possible left late in life.
  2. Current research suggests that multitasking has detrimental effects on memory. Development tends to be very heavy on multitasking. Maybe relieving some of the pressure on quick-access short term memory (like knowing all relevant branch names) add up to leave a healthier memory down the line.

First up for our scenario: the - shorthand, which refers to the previously checked out branch. There are a few places we can't use it, but it helps a lot:

Bash
# USING -

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit -        # ????
git push
# hack hack hack
# whoops
git checkout -        # now on feature ???? 
git cherry-pick origin/qa-environment..qa-environment
git push
git checkout - # now on qa-environment ????
git reset --hard origin/qa-environment
git merge --no-ff --no-edit -        # ????
git checkout -                       # ????
# on feature and ready for more feature commits
Bash
# ORIGINAL

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit feature
git push
# hack hack hack
# whoops
git checkout feature
git cherry-pick origin/qa-environment..qa-environment
git push
git checkout qa-environment
git reset --hard origin/qa-environment
git merge --no-ff --no-edit feature
git checkout feature
# ready for more feature commits

We cannot use - when cherry-picking a range

> git cherry-pick origin/-..-
fatal: bad revision 'origin/-..-'

> git cherry-pick origin/qa-environment..-
fatal: bad revision 'origin/qa-environment..-'

and even if we could we'd still have provide the remote's name (here, origin).

That shorthand doesn't apply in the later reset --hard command, and we cannot use it in the branch -D && checkout approach either. branch -D does not support the - shorthand and once the branch is deleted checkout can't reach it with -:

# assuming that branch-a has an upstream origin/branch-a
> git checkout branch-a
> git checkout branch-b
> git checkout -
> git branch -D -
error: branch '-' not found.
> git branch -D branch-a
> git checkout -
error: pathspec '-' did not match any file(s) known to git

So we have to remember the remote's name (we know it's origin because we are devoting memory space to knowing that this isn't one of those times it's something else), the remote tracking branch's name, the local branch's name, and we're typing those all out. No good! Let's figure out some shorthands.

@{-<n>} is hard to say but easy to fall in love with

We can do a little better by using @{-<n>} (you'll also sometimes see it referred to be the older @{-N}). It is a special construct for referring to the nth previously checked out ref.

> git checkout branch-a
> git checkout branch-b
> git rev-parse --abbrev-rev @{-1} # the name of the previously checked out branch
branch-a
> git checkout branch-c
> git rev-parse --abbrev-rev @{-2} # the name of branch checked out before the previously checked out one
branch-a

Back in our scenario, we're on qa-environment, we switch to feature, and then want to refer to qa-environment. That's @{-1}! So instead of

git cherry-pick origin/qa-environment..qa-environment

We can do

git cherry-pick origin/qa-environment..@{-1}

Here's where we are (🎉 marks wins from -, 💥 marks the win from @{-1})

Bash
# USING - AND @{-1}

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit -                # ????
git push
# hack hack hack
# whoops
git checkout -                               # ????
git cherry-pick origin/qa-environment..@{-1} # ????
git push
git checkout -                               # ????
git reset --hard origin/qa-environment
git merge --no-ff --no-edit -                # ????
git checkout -                               # ????
# ready for more feature commits
Bash
# ORIGINAL

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit feature
git push
# hack hack hack
# whoops
git checkout feature
git cherry-pick origin/qa-environment..qa-environment
git push
git checkout qa-environment
git reset --hard origin/qa-environment
git merge --no-ff --no-edit feature
git checkout feature
# ready for more feature commits

One down, two to go: we're still relying on memory for the remote's name and the remote branch's name and we're still typing both out in full. Can we replace those with generic shorthands?

@{-1} is the ref itself, not the ref's name, we can't do

> git cherry-pick origin/@{-1}..@{-1}
origin/@{-1}
fatal: ambiguous argument 'origin/@{-1}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

because there is no branch origin/@{-1}. For the same reason, @{-1} does not give us a generalized shorthand for the scenario's later git reset --hard origin/qa-environment command.

But good news!

Do @{u} @{push}

@{upstream} or its shorthand @{u} is the remote branch a that would be pulled from if git pull were run. @{push} is the remote branch that would be pushed to if git push was run.

> git checkout branch-a
Switched to branch 'branch-a'
Your branch is ahead of 'origin/branch-a' by 3 commits.
  (use "git push" to publish your local commits)
> git reset --hard origin/branch-a
HEAD is now at <the SHA origin/branch-a is at>

we can

> git checkout branch-a
Switched to branch 'branch-a'
Your branch is ahead of 'origin/branch-a' by 3 commits.
  (use "git push" to publish your local commits)
> git reset --hard @{u}                                # <-- So Cool!
HEAD is now at <the SHA origin/branch-a is at>

Tacking either onto a branch name will give that branch's @{upstream} or @{push}. For example

git checkout branch-a@{u}

is the branch branch-a pulls from.

In the common workflow where a branch pulls from and pushes to the same branch, @{upstream} and @{push} will be the same, leaving @{u} as preferable for its terseness. @{push} shines in triangular workflows where you pull from one remote and push to another (see the external links below).

Going back to our scenario, it means short, portable commands with a minimum human memory footprint. (🎉 marks wins from -, 💥 marks the win from @{-1}, 😎 marks the wins from @{u}.)

Bash
# USING - AND @{-1} AND @{u}

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit -    # ????
git push
# hack hack hack
# whoops
git checkout -                   # ????
git cherry-pick @{-1}@{u}..@{-1} # ????????
git push
git checkout -                   # ????
git reset --hard @{u}            # ????
git merge --no-ff --no-edit -    # ????
git checkout -                   # ????
# ready for more feature commits
Bash
# ORIGINAL

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit feature
git push
# hack hack hack
# whoops
git checkout feature
git cherry-pick origin/qa-environment..qa-environment
git push
git checkout qa-environment
git reset --hard origin/qa-environment
git merge --no-ff --no-edit feature
git checkout feature
# ready for more feature commits

Make the things you repeat the easiest to do

Because these commands are generalized, we can run some series of them once, maybe

git checkout - && git reset --hard @{u} && git checkout -

or

git checkout - && git cherry-pick @{-1}@{u}.. @{-1} && git checkout - && git reset --hard @{u} && git checkout -

and then those will be in the shell history just waiting to be retrieved and run again the next time, whether with CtrlR incremental search or history substring searching bound to the up arrow or however your interactive shell is configured. Or make it an alias, or even better an abbreviation if your interactive shell supports them. Save the body wear and tear, give memory a break, and level up in Git.

And keep going

The GitHub blog has a good primer on triangular workflows and how they can polish your process of contributing to external projects.

The FreeBSD Wiki has a more in-depth article on triangular workflow process (though it doesn't know about @{push} and @{upstream}).

The construct @{-<n>} and the suffixes @{push} and @{upstream} are all part of the gitrevisions spec. Direct links to each:



    • Code
    • Front-end Engineering
    • Back-end Engineering

    nc

    What happens if my visa is refused or cancelled due to my character?

    If you have your visa refused or cancelled, you need to get expert advice a soon as possible. Strict time limits apply to drafting submissions and appeals. A visa refusal or cancellation can limit the type or visas you can apply for in the future or even prohibit you from applying for any visa to […]

    The post What happens if my visa is refused or cancelled due to my character? appeared first on Visa Australia - Immigration Lawyers & Registered Migration Agents.




    nc

    Visa cancelled due to incorrect information given or provided to the Department of Home Affairs

    It is a requirement that a visa applicant must fill in or complete his or her application form in a manner that all questions are answered, and no incorrect answers are given or provided. There is also a requirement that visa applicants must not provide incorrect information during interviews with the Minister for Immigration (‘Minister’), […]

    The post Visa cancelled due to incorrect information given or provided to the Department of Home Affairs appeared first on Visa Australia - Immigration Lawyers & Registered Migration Agents.



    • Visa Cancellation
    • 1703474 (Refugee) [2017] AATA 2985
    • cancel a visa
    • cancelledvi sa
    • Citizenship and Multicultural Affairs
    • Department of Home Affairs
    • migration act 1958
    • minister for immigration
    • NOICC
    • notice of intention to consider cancellation
    • Sanaee (Migration) [2019] AATA 4506
    • section 109
    • time limits

    nc

    Social Icons Widget 4.0 — Now With a Social Icons Block for Gutenberg Included

    In 2015 we launched Social Icons Widget by WPZOOM with the intent to provide WordPress users with a simple and easy-to-use widget for adding social links to their websites. With over 100k installs at the moment and continuous positive feedback from the users, it kept us motivated to constantly improve and keep updating this free plugin. Now, to keep the […]




    nc

    Presence 2.0: Beaver Builder Integration, Dark Skin & More!

    Great news for the users of Presence — our multipurpose theme. We have finally released the long-awaited 2.0 version, which features major changes and improvements. What’s new in Presence 2.0? Beaver Builder Integration Dark Skin New Demo: Organic Shop New Typography and Colors options in the Customizer New Templates in Page Builder Beaver Builder Integration If you have followed recent […]




    nc

    Concurrency & Multithreading in iOS

    Concurrency is the notion of multiple things happening at the same time. This is generally achieved either via time-slicing, or truly in parallel if multiple CPU cores are available to the host operating system. We've all experienced a lack of concurrency, most likely in the form of an app freezing up when running a heavy task. UI freezes don't necessarily occur due to the absence of concurrency — they could just be symptoms of buggy software — but software that doesn't take advantage of all the computational power at its disposal is going to create these freezes whenever it needs to do something resource-intensive. If you've profiled an app hanging in this way, you'll probably see a report that looks like this:

    Anything related to file I/O, data processing, or networking usually warrants a background task (unless you have a very compelling excuse to halt the entire program). There aren't many reasons that these tasks should block your user from interacting with the rest of your application. Consider how much better the user experience of your app could be if instead, the profiler reported something like this:

    Analyzing an image, processing a document or a piece of audio, or writing a sizeable chunk of data to disk are examples of tasks that could benefit greatly from being delegated to background threads. Let's dig into how we can enforce such behavior into our iOS applications.


    A Brief History

    In the olden days, the maximum amount of work per CPU cycle that a computer could perform was determined by the clock speed. As processor designs became more compact, heat and physical constraints started becoming limiting factors for higher clock speeds. Consequentially, chip manufacturers started adding additional processor cores on each chip in order to increase total performance. By increasing the number of cores, a single chip could execute more CPU instructions per cycle without increasing its speed, size, or thermal output. There's just one problem...

    How can we take advantage of these extra cores? Multithreading.

    Multithreading is an implementation handled by the host operating system to allow the creation and usage of n amount of threads. Its main purpose is to provide simultaneous execution of two or more parts of a program to utilize all available CPU time. Multithreading is a powerful technique to have in a programmer's toolbelt, but it comes with its own set of responsibilities. A common misconception is that multithreading requires a multi-core processor, but this isn't the case — single-core CPUs are perfectly capable of working on many threads, but we'll take a look in a bit as to why threading is a problem in the first place. Before we dive in, let's look at the nuances of what concurrency and parallelism mean using a simple diagram:

    In the first situation presented above, we observe that tasks can run concurrently, but not in parallel. This is similar to having multiple conversations in a chatroom, and interleaving (context-switching) between them, but never truly conversing with two people at the same time. This is what we call concurrency. It is the illusion of multiple things happening at the same time when in reality, they're switching very quickly. Concurrency is about dealing with lots of things at the same time. Contrast this with the parallelism model, in which both tasks run simultaneously. Both execution models exhibit multithreading, which is the involvement of multiple threads working towards one common goal. Multithreading is a generalized technique for introducing a combination of concurrency and parallelism into your program.


    The Burden of Threads

    A modern multitasking operating system like iOS has hundreds of programs (or processes) running at any given moment. However, most of these programs are either system daemons or background processes that have very low memory footprint, so what is really needed is a way for individual applications to make use of the extra cores available. An application (process) can have many threads (sub-processes) operating on shared memory. Our goal is to be able to control these threads and use them to our advantage.

    Historically, introducing concurrency to an app has required the creation of one or more threads. Threads are low-level constructs that need to be managed manually. A quick skim through Apple's Threaded Programming Guide is all it takes to see how much complexity threaded code adds to a codebase. In addition to building an app, the developer has to:

    • Responsibly create new threads, adjusting that number dynamically as system conditions change
    • Manage them carefully, deallocating them from memory once they have finished executing
    • Leverage synchronization mechanisms like mutexes, locks, and semaphores to orchestrate resource access between threads, adding even more overhead to application code
    • Mitigate risks associated with coding an application that assumes most of the costs associated with creating and maintaining any threads it uses, and not the host OS

    This is unfortunate, as it adds enormous levels of complexity and risk without any guarantees of improved performance.


    Grand Central Dispatch

    iOS takes an asynchronous approach to solving the concurrency problem of managing threads. Asynchronous functions are common in most programming environments, and are often used to initiate tasks that might take a long time, like reading a file from the disk, or downloading a file from the web. When invoked, an asynchronous function executes some work behind the scenes to start a background task, but returns immediately, regardless of how long the original task might takes to actually complete.

    A core technology that iOS provides for starting tasks asynchronously is Grand Central Dispatch (or GCD for short). GCD abstracts away thread management code and moves it down to the system level, exposing a light API to define tasks and execute them on an appropriate dispatch queue. GCD takes care of all thread management and scheduling, providing a holistic approach to task management and execution, while also providing better efficiency than traditional threads.

    Let's take a look at the main components of GCD:

    What've we got here? Let's start from the left:

    • DispatchQueue.main: The main thread, or the UI thread, is backed by a single serial queue. All tasks are executed in succession, so it is guaranteed that the order of execution is preserved. It is crucial that you ensure all UI updates are designated to this queue, and that you never run any blocking tasks on it. We want to ensure that the app's run loop (called CFRunLoop) is never blocked in order to maintain the highest framerate. Subsequently, the main queue has the highest priority, and any tasks pushed onto this queue will get executed immediately.
    • DispatchQueue.global: A set of global concurrent queues, each of which manage their own pool of threads. Depending on the priority of your task, you can specify which specific queue to execute your task on, although you should resort to using default most of the time. Because tasks on these queues are executed concurrently, it doesn't guarantee preservation of the order in which tasks were queued.

    Notice how we're not dealing with individual threads anymore? We're dealing with queues which manage a pool of threads internally, and you will shortly see why queues are a much more sustainable approach to multhreading.

    Serial Queues: The Main Thread

    As an exercise, let's look at a snippet of code below, which gets fired when the user presses a button in the app. The expensive compute function can be anything. Let's pretend it is post-processing an image stored on the device.

    import UIKit
    
    class ViewController: UIViewController {
        @IBAction func handleTap(_ sender: Any) {
            compute()
        }
    
        private func compute() -> Void {
            // Pretending to post-process a large image.
            var counter = 0
            for _ in 0..<9999999 {
                counter += 1
            }
        }
    }

    At first glance, this may look harmless, but if you run this inside of a real app, the UI will freeze completely until the loop is terminated, which will take... a while. We can prove it by profiling this task in Instruments. You can fire up the Time Profiler module of Instruments by going to Xcode > Open Developer Tool > Instruments in Xcode's menu options. Let's look at the Threads module of the profiler and see where the CPU usage is highest.

    We can see that the Main Thread is clearly at 100% capacity for almost 5 seconds. That's a non-trivial amount of time to block the UI. Looking at the call tree below the chart, we can see that the Main Thread is at 99.9% capacity for 4.43 seconds! Given that a serial queue works in a FIFO manner, tasks will always complete in the order in which they were inserted. Clearly the compute() method is the culprit here. Can you imagine clicking a button just to have the UI freeze up on you for that long?

    Background Threads

    How can we make this better? DispatchQueue.global() to the rescue! This is where background threads come in. Referring to the GCD architecture diagram above, we can see that anything that is not the Main Thread is a background thread in iOS. They can run alongside the Main Thread, leaving it fully unoccupied and ready to handle other UI events like scrolling, responding to user events, animating etc. Let's make a small change to our button click handler above:

    class ViewController: UIViewController {
        @IBAction func handleTap(_ sender: Any) {
            DispatchQueue.global(qos: .userInitiated).async { [unowned self] in
                self.compute()
            }
        }
    
        private func compute() -> Void {
            // Pretending to post-process a large image.
            var counter = 0
            for _ in 0..<9999999 {
                counter += 1
            }
        }
    }

    Unless specified, a snippet of code will usually default to execute on the Main Queue, so in order to force it to execute on a different thread, we'll wrap our compute call inside of an asynchronous closure that gets submitted to the DispatchQueue.global queue. Keep in mind that we aren't really managing threads here. We're submitting tasks (in the form of closures or blocks) to the desired queue with the assumption that it is guaranteed to execute at some point in time. The queue decides which thread to allocate the task to, and it does all the hard work of assessing system requirements and managing the actual threads. This is the magic of Grand Central Dispatch. As the old adage goes, you can't improve what you can't measure. So we measured our truly terrible button click handler, and now that we've improved it, we'll measure it once again to get some concrete data with regards to performance.

    Looking at the profiler again, it's quite clear to us that this is a huge improvement. The task takes an identical amount of time, but this time, it's happening in the background without locking up the UI. Even though our app is doing the same amount of work, the perceived performance is much better because the user will be free to do other things while the app is processing.

    You may have noticed that we accessed a global queue of .userInitiated priority. This is an attribute we can use to give our tasks a sense of urgency. If we run the same task on a global queue of and pass it a qos attribute of background , iOS will think it's a utility task, and thus allocate fewer resources to execute it. So, while we don't have control over when our tasks get executed, we do have control over their priority.

    A Note on Main Thread vs. Main Queue

    You might be wondering why the Profiler shows "Main Thread" and why we're referring to it as the "Main Queue". If you refer back to the GCD architecture we described above, the Main Queue is solely responsible for managing the Main Thread. The Dispatch Queues section in the Concurrency Programming Guide says that "the main dispatch queue is a globally available serial queue that executes tasks on the application’s main thread. Because it runs on your application’s main thread, the main queue is often used as a key synchronization point for an application."

    The terms "execute on the Main Thread" and "execute on the Main Queue" can be used interchangeably.


    Concurrent Queues

    So far, our tasks have been executed exclusively in a serial manner. DispatchQueue.main is by default a serial queue, and DispatchQueue.global gives you four concurrent dispatch queues depending on the priority parameter you pass in.

    Let's say we want to take five images, and have our app process them all in parallel on background threads. How would we go about doing that? We can spin up a custom concurrent queue with an identifier of our choosing, and allocate those tasks there. All that's required is the .concurrent attribute during the construction of the queue.

    class ViewController: UIViewController {
        let queue = DispatchQueue(label: "com.app.concurrentQueue", attributes: .concurrent)
        let images: [UIImage] = [UIImage].init(repeating: UIImage(), count: 5)
    
        @IBAction func handleTap(_ sender: Any) {
            for img in images {
                queue.async { [unowned self] in
                    self.compute(img)
                }
            }
        }
    
        private func compute(_ img: UIImage) -> Void {
            // Pretending to post-process a large image.
            var counter = 0
            for _ in 0..<9999999 {
                counter += 1
            }
        }
    }

    Running that through the profiler, we can see that the app is now spinning up 5 discrete threads to parallelize a for-loop.

    Parallelization of N Tasks

    So far, we've looked at pushing computationally expensive task(s) onto background threads without clogging up the UI thread. But what about executing parallel tasks with some restrictions? How can Spotify download multiple songs in parallel, while limiting the maximum number up to 3? We can go about this in a few ways, but this is a good time to explore another important construct in multithreaded programming: semaphores.

    Semaphores are signaling mechanisms. They are commonly used to control access to a shared resource. Imagine a scenario where a thread can lock access to a certain section of the code while it executes it, and unlocks after it's done to let other threads execute the said section of the code. You would see this type of behavior in database writes and reads, for example. What if you want only one thread writing to a database and preventing any reads during that time? This is a common concern in thread-safety called Readers-writer lock. Semaphores can be used to control concurrency in our app by allowing us to lock n number of threads.

    let kMaxConcurrent = 3 // Or 1 if you want strictly ordered downloads!
    let semaphore = DispatchSemaphore(value: kMaxConcurrent)
    let downloadQueue = DispatchQueue(label: "com.app.downloadQueue", attributes: .concurrent)
    
    class ViewController: UIViewController {
        @IBAction func handleTap(_ sender: Any) {
            for i in 0..<15 {
                downloadQueue.async { [unowned self] in
                    // Lock shared resource access
                    semaphore.wait()
    
                    // Expensive task
                    self.download(i + 1)
    
                    // Update the UI on the main thread, always!
                    DispatchQueue.main.async {
                        tableView.reloadData()
    
                        // Release the lock
                        semaphore.signal()
                    }
                }
            }
        }
    
        func download(_ songId: Int) -> Void {
            var counter = 0
    
            // Simulate semi-random download times.
            for _ in 0..<Int.random(in: 999999...10000000) {
                counter += songId
            }
        }
    }

    Notice how we've effectively restricted our download system to limit itself to k number of downloads. The moment one download finishes (or thread is done executing), it decrements the semaphore, allowing the managing queue to spawn another thread and start downloading another song. You can apply a similar pattern to database transactions when dealing with concurrent reads and writes.

    Semaphores usually aren't necessary for code like the one in our example, but they become more powerful when you need to enforce synchronous behavior whille consuming an asynchronous API. The above could would work just as well with a custom NSOperationQueue with a maxConcurrentOperationCount, but it's a worthwhile tangent regardless.


    Finer Control with OperationQueue

    GCD is great when you want to dispatch one-off tasks or closures into a queue in a 'set-it-and-forget-it' fashion, and it provides a very lightweight way of doing so. But what if we want to create a repeatable, structured, long-running task that produces associated state or data? And what if we want to model this chain of operations such that they can be cancelled, suspended and tracked, while still working with a closure-friendly API? Imagine an operation like this:

    This would be quite cumbersome to achieve with GCD. We want a more modular way of defining a group of tasks while maintaining readability and also exposing a greater amount of control. In this case, we can use Operation objects and queue them onto an OperationQueue, which is a high-level wrapper around DispatchQueue. Let's look at some of the benefits of using these abstractions and what they offer in comparison to the lower-level GCI API:

    • You may want to create dependencies between tasks, and while you could do this via GCD, you're better off defining them concretely as Operation objects, or units of work, and pushing them onto your own queue. This would allow for maximum reusability since you may use the same pattern elsewhere in an application.
    • The Operation and OperationQueue classes have a number of properties that can be observed, using KVO (Key Value Observing). This is another important benefit if you want to monitor the state of an operation or operation queue.
    • Operations can be paused, resumed, and cancelled. Once you dispatch a task using Grand Central Dispatch, you no longer have control or insight into the execution of that task. The Operation API is more flexible in that respect, giving the developer control over the operation's life cycle.
    • OperationQueue allows you to specify the maximum number of queued operations that can run simultaneously, giving you a finer degree of control over the concurrency aspects.

    The usage of Operation and OperationQueue could fill an entire blog post, but let's look at a quick example of what modeling dependencies looks like. (GCD can also create dependencies, but you're better off dividing up large tasks into a series of composable sub-tasks.) In order to create a chain of operations that depend on one another, we could do something like this:

    class ViewController: UIViewController {
        var queue = OperationQueue()
        var rawImage = UIImage? = nil
        let imageUrl = URL(string: "https://example.com/portrait.jpg")!
        @IBOutlet weak var imageView: UIImageView!
    
        let downloadOperation = BlockOperation {
            let image = Downloader.downloadImageWithURL(url: imageUrl)
            OperationQueue.main.async {
                self.rawImage = image
            }
        }
    
        let filterOperation = BlockOperation {
            let filteredImage = ImgProcessor.addGaussianBlur(self.rawImage)
            OperationQueue.main.async {
                self.imageView = filteredImage
            }
        }
    
        filterOperation.addDependency(downloadOperation)
    
        [downloadOperation, filterOperation].forEach {
            queue.addOperation($0)
         }
    }

    So why not opt for a higher level abstraction and avoid using GCD entirely? While GCD is ideal for inline asynchronous processing, Operation provides a more comprehensive, object-oriented model of computation for encapsulating all of the data around structured, repeatable tasks in an application. Developers should use the highest level of abstraction possible for any given problem, and for scheduling consistent, repeated work, that abstraction is Operation. Other times, it makes more sense to sprinkle in some GCD for one-off tasks or closures that we want to fire. We can mix both OperationQueue and GCD to get the best of both worlds.


    The Cost of Concurrency

    DispatchQueue and friends are meant to make it easier for the application developer to execute code concurrently. However, these technologies do not guarantee improvements to the efficiency or responsiveness in an application. It is up to you to use queues in a manner that is both effective and does not impose an undue burden on other resources. For example, it's totally viable to create 10,000 tasks and submit them to a queue, but doing so would allocate a nontrivial amount of memory and introduce a lot of overhead for the allocation and deallocation of operation blocks. This is the opposite of what you want! It's best to profile your app thoroughly to ensure that concurrency is enhancing your app's performance and not degrading it.

    We've talked about how concurrency comes at a cost in terms of complexity and allocation of system resources, but introducing concurrency also brings a host of other risks like:

    • Deadlock: A situation where a thread locks a critical portion of the code and can halt the application's run loop entirely. In the context of GCD, you should be very careful when using the dispatchQueue.sync { } calls as you could easily get yourself in situations where two synchronous operations can get stuck waiting for each other.
    • Priority Inversion: A condition where a lower priority task blocks a high priority task from executing, which effectively inverts their priorities. GCD allows for different levels of priority on its background queues, so this is quite easily a possibility.
    • Producer-Consumer Problem: A race condition where one thread is creating a data resource while another thread is accessing it. This is a synchronization problem, and can be solved using locks, semaphores, serial queues, or a barrier dispatch if you're using concurrent queues in GCD.
    • ...and many other sorts of locking and data-race conditions that are hard to debug! Thread safety is of the utmost concern when dealing with concurrency.

    Parting Thoughts + Further Reading

    If you've made it this far, I applaud you. Hopefully this article gives you a lay of the land when it comes to multithreading techniques on iOS, and how you can use some of them in your app. We didn't get to cover many of the lower-level constructs like locks, mutexes and how they help us achieve synchronization, nor did we get to dive into concrete examples of how concurrency can hurt your app. We'll save those for another day, but you can dig into some additional reading and videos if you're eager to dive deeper.




    nc

    Committed to the wrong branch? -, @{upstream}, and @{-1} to the rescue

    I get into this situation sometimes. Maybe you do too. I merge feature work into a branch used to collect features, and then continue development but on that branch instead of back on the feature branch

    git checkout feature
    # ... bunch of feature commits ...
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit feature
    git push
    # deploy qa-environment to the QA remote environment
    # ... more feature commits ...
    # oh. I'm not committing in the feature branch like I should be

    and have to move those commits to the feature branch they belong in and take them out of the throwaway accumulator branch

    git checkout feature
    git cherry-pick origin/qa-environment..qa-environment
    git push
    git checkout qa-environment
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit feature
    git checkout feature
    # ready for more feature commits

    Maybe you prefer

    git branch -D qa-environment
    git checkout qa-environment

    over

    git checkout qa-environment
    git reset --hard origin/qa-environment

    Either way, that works. But it'd be nicer if we didn't have to type or even remember the branches' names and the remote's name. They are what is keeping this from being a context-independent string of commands you run any time this mistake happens. That's what we're going to solve here.

    Shorthands for longevity

    I like to use all possible natively supported shorthands. There are two broad motivations for that.

    1. Fingers have a limited number of movements in them. Save as many as possible left late in life.
    2. Current research suggests that multitasking has detrimental effects on memory. Development tends to be very heavy on multitasking. Maybe relieving some of the pressure on quick-access short term memory (like knowing all relevant branch names) add up to leave a healthier memory down the line.

    First up for our scenario: the - shorthand, which refers to the previously checked out branch. There are a few places we can't use it, but it helps a lot:

    Bash
    # USING -
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit -        # ????
    git push
    # hack hack hack
    # whoops
    git checkout -        # now on feature ???? 
    git cherry-pick origin/qa-environment..qa-environment
    git push
    git checkout - # now on qa-environment ????
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit -        # ????
    git checkout -                       # ????
    # on feature and ready for more feature commits
    Bash
    # ORIGINAL
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit feature
    git push
    # hack hack hack
    # whoops
    git checkout feature
    git cherry-pick origin/qa-environment..qa-environment
    git push
    git checkout qa-environment
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit feature
    git checkout feature
    # ready for more feature commits

    We cannot use - when cherry-picking a range

    > git cherry-pick origin/-..-
    fatal: bad revision 'origin/-..-'
    
    > git cherry-pick origin/qa-environment..-
    fatal: bad revision 'origin/qa-environment..-'

    and even if we could we'd still have provide the remote's name (here, origin).

    That shorthand doesn't apply in the later reset --hard command, and we cannot use it in the branch -D && checkout approach either. branch -D does not support the - shorthand and once the branch is deleted checkout can't reach it with -:

    # assuming that branch-a has an upstream origin/branch-a
    > git checkout branch-a
    > git checkout branch-b
    > git checkout -
    > git branch -D -
    error: branch '-' not found.
    > git branch -D branch-a
    > git checkout -
    error: pathspec '-' did not match any file(s) known to git

    So we have to remember the remote's name (we know it's origin because we are devoting memory space to knowing that this isn't one of those times it's something else), the remote tracking branch's name, the local branch's name, and we're typing those all out. No good! Let's figure out some shorthands.

    @{-<n>} is hard to say but easy to fall in love with

    We can do a little better by using @{-<n>} (you'll also sometimes see it referred to be the older @{-N}). It is a special construct for referring to the nth previously checked out ref.

    > git checkout branch-a
    > git checkout branch-b
    > git rev-parse --abbrev-rev @{-1} # the name of the previously checked out branch
    branch-a
    > git checkout branch-c
    > git rev-parse --abbrev-rev @{-2} # the name of branch checked out before the previously checked out one
    branch-a

    Back in our scenario, we're on qa-environment, we switch to feature, and then want to refer to qa-environment. That's @{-1}! So instead of

    git cherry-pick origin/qa-environment..qa-environment

    We can do

    git cherry-pick origin/qa-environment..@{-1}

    Here's where we are (🎉 marks wins from -, 💥 marks the win from @{-1})

    Bash
    # USING - AND @{-1}
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit -                # ????
    git push
    # hack hack hack
    # whoops
    git checkout -                               # ????
    git cherry-pick origin/qa-environment..@{-1} # ????
    git push
    git checkout -                               # ????
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit -                # ????
    git checkout -                               # ????
    # ready for more feature commits
    Bash
    # ORIGINAL
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit feature
    git push
    # hack hack hack
    # whoops
    git checkout feature
    git cherry-pick origin/qa-environment..qa-environment
    git push
    git checkout qa-environment
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit feature
    git checkout feature
    # ready for more feature commits

    One down, two to go: we're still relying on memory for the remote's name and the remote branch's name and we're still typing both out in full. Can we replace those with generic shorthands?

    @{-1} is the ref itself, not the ref's name, we can't do

    > git cherry-pick origin/@{-1}..@{-1}
    origin/@{-1}
    fatal: ambiguous argument 'origin/@{-1}': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'

    because there is no branch origin/@{-1}. For the same reason, @{-1} does not give us a generalized shorthand for the scenario's later git reset --hard origin/qa-environment command.

    But good news!

    Do @{u} @{push}

    @{upstream} or its shorthand @{u} is the remote branch a that would be pulled from if git pull were run. @{push} is the remote branch that would be pushed to if git push was run.

    > git checkout branch-a
    Switched to branch 'branch-a'
    Your branch is ahead of 'origin/branch-a' by 3 commits.
      (use "git push" to publish your local commits)
    > git reset --hard origin/branch-a
    HEAD is now at <the SHA origin/branch-a is at>

    we can

    > git checkout branch-a
    Switched to branch 'branch-a'
    Your branch is ahead of 'origin/branch-a' by 3 commits.
      (use "git push" to publish your local commits)
    > git reset --hard @{u}                                # <-- So Cool!
    HEAD is now at <the SHA origin/branch-a is at>

    Tacking either onto a branch name will give that branch's @{upstream} or @{push}. For example

    git checkout branch-a@{u}

    is the branch branch-a pulls from.

    In the common workflow where a branch pulls from and pushes to the same branch, @{upstream} and @{push} will be the same, leaving @{u} as preferable for its terseness. @{push} shines in triangular workflows where you pull from one remote and push to another (see the external links below).

    Going back to our scenario, it means short, portable commands with a minimum human memory footprint. (🎉 marks wins from -, 💥 marks the win from @{-1}, 😎 marks the wins from @{u}.)

    Bash
    # USING - AND @{-1} AND @{u}
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit -    # ????
    git push
    # hack hack hack
    # whoops
    git checkout -                   # ????
    git cherry-pick @{-1}@{u}..@{-1} # ????????
    git push
    git checkout -                   # ????
    git reset --hard @{u}            # ????
    git merge --no-ff --no-edit -    # ????
    git checkout -                   # ????
    # ready for more feature commits
    Bash
    # ORIGINAL
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit feature
    git push
    # hack hack hack
    # whoops
    git checkout feature
    git cherry-pick origin/qa-environment..qa-environment
    git push
    git checkout qa-environment
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit feature
    git checkout feature
    # ready for more feature commits

    Make the things you repeat the easiest to do

    Because these commands are generalized, we can run some series of them once, maybe

    git checkout - && git reset --hard @{u} && git checkout -

    or

    git checkout - && git cherry-pick @{-1}@{u}.. @{-1} && git checkout - && git reset --hard @{u} && git checkout -

    and then those will be in the shell history just waiting to be retrieved and run again the next time, whether with CtrlR incremental search or history substring searching bound to the up arrow or however your interactive shell is configured. Or make it an alias, or even better an abbreviation if your interactive shell supports them. Save the body wear and tear, give memory a break, and level up in Git.

    And keep going

    The GitHub blog has a good primer on triangular workflows and how they can polish your process of contributing to external projects.

    The FreeBSD Wiki has a more in-depth article on triangular workflow process (though it doesn't know about @{push} and @{upstream}).

    The construct @{-<n>} and the suffixes @{push} and @{upstream} are all part of the gitrevisions spec. Direct links to each:



      • Code
      • Front-end Engineering
      • Back-end Engineering

      nc

      Visual Identity: ESA Annual Conference




      nc

      Let's Encrypt Everything

      I'll admit I was late to the HTTPS party.

      But post Snowden, and particularly after the result of the last election here in the US, it's clear that everything on the web should be encrypted by default.

      Why?

      1. You have an unalienable right to privacy, both in the real world





      nc

      New Branding & Website Design Launched for Enterprise High School in Clearwater, Florida

      We recently completed a full rebrand and website design project for Enterprise High School, a charter school located in Clearwater,...continue reading






      nc

      Logo Design & Branding for Food Launcher

      A startup specializing in food product development and commercialization services, “Food Launcher” is a team of food scientists with over...continue reading




      nc

      Fort Myers Brewery Website Launch for Coastal Dayz Brewery

      Located in Downtown Fort Myers, just steps from the Caloosahatchee River and a short drive away from the Gulf coast...continue reading