ad

Adobe to forgo Flash plug-in for mobile devices

Earlier this week, Adobe VP and General Manager Danny Winokur disclosed that the company has concluded that HTML5 is ”the best solution for creating and deploying content in the browser across mobile platforms.” The company said it would stop building Flash to run on mobile browsers. In a blog post on the new focus of Read the rest...




ad

Winding road of open-source webOS

HP continues to divulge bits and pieces of a road map for the ill-starred and nearly-orphaned webOS. The company has followed up its December plan to release webOS mobile platform and development tools with a proposed timeline, with a full release set before year’s end.  Some people see a life for the associated Enyo JavaScript Read the rest...




ad

Windows 8 HTML5 WinRT RSS reader app

WinJS is a JavaScript framework for Windows 8, and David Rousset uses it here to create a quick RSS reader. He shows how in a tutorial series. This first article shows the way to build a welcome screen that employs WinJS ListView control. Blend and CSS3 are employed. The second tutorial shows work on the Read the rest...






ad

2010 – 2019: Decade in Review

As the decade comes to a close, I thought it would be interesting to look back on the past 10 years. So, rather than posting my regular year in review, here’s an abbreviated trip through the past 10 years of my life, both personal and professional. 2010 The decade started for me in an almost […]

The post 2010 – 2019: Decade in Review appeared first on MOR10.




ad

Understanding Climate Change Means Reading Beyond Headlines

By David Suzuki The David Suzuki Foundation Seeing terms like “post-truth” and “alternative facts” gain traction in the news convinces me that politicians, media workers and readers could benefit from a refresher course in how science helps us understand the … Continue reading





ad

'And the award goes to...' How to avoid winning a Procrustes Award for bad UX

We're familiar with awarding prizes for excellence, from the Oscars to The International Design Awards. But what if we started giving prizes to shame bad examples of design? Enter the Procrustes Awards.




ad

Transitioning from academic research to UX research

Doing UX research in a university is very different to doing UX research in a business setting. If you're an academic making the leap, what are the main differences you need to keep in mind?




ad

What is cognitive load and why does it matter in web and interface design?

Successful design manages cognitive load. Cognitive load is a technical term for “mental effort,” more specifically it’s the total amount of mental effort required for a given task. Completing any task requires some level of mental effort. This includes learning new information, analyzing stimuli, and working with short and long-term memory. Mental energy which has […]

The post What is cognitive load and why does it matter in web and interface design? appeared first on Psychology of Web Design | 3.7 Blog.




ad

10 Design Principles to Reduce Cognitive Load

If you’re not familiar with cognitive load and how it impacts interface design, it’s worth reviewing our previous blog post. If you’re already convinced cognitive load is important, the next step is addressing it. Reducing cognitive load is accomplished by reducing or offloading mental effort (which are similar but different concepts.) Reducing mental effort is […]

The post 10 Design Principles to Reduce Cognitive Load appeared first on Psychology of Web Design | 3.7 Blog.




ad

Why Your Website Doesn’t Generate Leads (and how to fix it)

You’re homepage is beautifully designed. It’s clear all the ways you can help. You’ve articulated why someone should hire you. You’ve validated your claims through case studies and testimonials, yet… You’re not getting the volume of leads you need. Sure they trickle in every month, but it’s not enough to grow your business. What are […]

The post Why Your Website Doesn’t Generate Leads (and how to fix it) appeared first on Psychology of Web Design | 3.7 Blog.




ad

Why personas are antiquated (and what you should use instead)

Personas are antiquated… this coming from someone who has relied on and written about them for years. For years at 3.7 Designs, we’ve created personas during the design discovery phase. I recently realized that the traditional marketing persona is no longer a relevant practice. The keyword here is “traditional.” At 3.7 we’ve adopted a practice […]

The post Why personas are antiquated (and what you should use instead) appeared first on Psychology of Web Design | 3.7 Blog.




ad

Mona Kuhn, AD 6309

Mona Kuhn
AD 6309, Joshua Tree, California, 2013/2014 (winter)
Website - MonaKuhn.com

Mona Kuhn is best known for her large-scale, dream-like photographs of nudes. Her work often reference classical themes with a light and insightful touch. Kuhn’s approach to her photography is unusual in that she usually develops close relationships with her subjects, resulting in images of remarkable naturalness and intimacy, and creating the effect of people naked but comfortable in their own skin.

Kuhn was born in São Paulo, Brazil, in 1969, of German descent. She received her BA from The Ohio State University, before furthering her studies at the San Francisco Art Institute in 1996. She is currently an independent scholar at The Getty Research Institute in Los Angeles. Kuhn’s first monograph, Photographs, was debut by Steidl in 2004; immediately followed by Evidence (2007), Native (2010), and Bordeaux Series (2011). Mona's upcoming book is titled Private (release 2014).

Mona Kuhn's work has been exhibited and/or included in the collections of The Louvre Museum in France, The J.Paul Getty Museum, The Los Angeles County Museum of Art, The Pérez Art Museum in Miami, The Museum of Photographic Art in San Diego, The George Eastman House, the Griffin Museum in Boston, Miami Museum of Art, the Cincinnati Art Museum, North Carolina Museum of Art, Georgia Museum of Art, The International Center of Photography in NYC. In Europe, her work has been exhibited at the Royal Academy of Art in London England, Le Louvre in France, Deichtorhallen in Hamburg Germany, Musée de l'Élysée in Switzerland, Centre d'art Contemporain at Musée Chaleroi in France, the Leopold Museum in Vienna Austria, and the Australian Center for Photography in Sydney. Currently, Mona lives and works in Los Angeles.




ad

Canada 2019

The yearly fishing trip, this year at the Bulkley river in British Columbia. Shot on the Panasonic GH-5, DJI Mavic 2 Zoom and some GoPro.




ad

12 Best GoDaddy Alternatives for Domain & Web Hosting (2020)

Are you looking for the best GoDaddy alternative for domain registration and web hosting? Without a doubt, Godaddy is one of the most popular names when it comes to registering domain names and hosting your business online. Over the last 22 years, GoDaddy has managed to establish a stronghold in the market. In this article, […]

The post 12 Best GoDaddy Alternatives for Domain & Web Hosting (2020) appeared first on IsItWP - Free WordPress Theme Detector.




ad

Advice for Caregivers: Walking in the Shoes of a Loved One with TBI and/or PTSD

Adam offers advice to caregivers of a loved one with TBI and/or PTSD — from simply trying to see how that person's life has changed to helping him get involved in confidence-boosting activities.




ad

BrainLine Military Blogger Adam Anicich Says Thank You and Goodbye for Now

Adam thanks you — his blog viewers and supporters — and encourages you to continue the discussion and awareness raising about TBI and PTSD; the battle does not stop here.





ad

Download older plugin versions from wordpress.org

So you’ve updated your plugins… … and your blog doesn’t work anymore … and you have no backup … … […]




ad

Download older plugin versions from wordpress.org

There’s a simple way to get hold of previous versions of your WordPress plugins, for example if a current version […]




ad

Troops to receive Purple Hearts for injuries during Iranian missile barrage on al-Asad airbase in Iraq

There will be Purple Hearts awarded to troops injured during the Jan. 8 Iranian missile barrage on the al-Asad airbase in Iraq, a defense official told Military Times.




ad

Judge Could Hold Up Trump Administration's Bid to Clear Flynn, Legal Experts say

The notoriously independent-minded federal judge who once said he was disgusted by the conduct of Michael Flynn could block the administration's bid to drop criminal charges against the former adviser to President Donald Trump, legal experts said.




ad

Top Colorado Republican Pressures Official to Report False Election Results

U.S. Rep. Ken Buck, who is also the chairman of the Colorado Republican Party, was captured ordering a local party official to report false election results in a primary race for a state Senate seat in a leaked audio recording released earlier this week.




ad

The Introvert Advantage with Beth Comstock

Even though I’m an extrovert, I have a feeling the future favors the introvert. Beth Comstock was at the CreativeLive studios in Seattle and I could not help but snag her for a quick moment to pick her brain on one of the most popular topics on my channel — navigating an extroverted world as an introvert. As a self-described introvert, Beth knows what it’s like to find elevate your strengths and have the courage to defend your creative ideas. Beth was named one of the most powerful women in business. After leaving a 27 year career at GE as their Chief Marketing Officer and Vice Chair, she decided to got a completely different direction to focus on new areas such as writing, art, exploration, and discovery. In this episode, Beth shares her advice to embrace your nature, and bring those strengths to any client, team, or situation. Enjoy! If you dig the show, please give a shout out to Beth on social and let her know. ???? FOLLOW BETH: twitter | instagram | website Listen to the Podcast  Subscribe   This podcast is brought to you by CreativeLive. CreativeLive is the world’s largest hub for online creative education in […]

The post The Introvert Advantage with Beth Comstock appeared first on Chase Jarvis Photography.




ad

Adaptation, Self-Awareness and Art of the Side Hustle with Chris Guillebeau

Chris Guillebeau has traveled to 193 countries. And just to be clear, that is all of the countries recognized on the planet. He is the first person to do it before the age of 35. More importantly, he has built online businesses, side hustles, and mastered the art of a non-conforming lifestyle since he was 19 years old. There’s almost nobody better person equipped to talk about starting lots of businesses. He has a daily podcast called Side Hustle School where he’s featured more than 850 different side hustle businesses + featured many in his new book called 100 Side Hustles. Chris also started half a dozen or more himself, started one of my favorite conferences, The World Domination Summit, and is a New York Times bestselling author of books like the $100 Start Up and The Art of Non-Conformity and many others. This guy is a beast and he’s so savvy, so humble. In this episode: We go into details about some of Chris’ favorite side hustle businesses he’s come across in his podcast & writing this book – what are some of the most common traits and failures. Chris shares his experience with depression, how he’s faced it, […]

The post Adaptation, Self-Awareness and Art of the Side Hustle with Chris Guillebeau appeared first on Chase Jarvis Photography.




ad

Rethink Impossible with Colin O’Brady

Colin O’Brady is a world record holding explorer and one of the world’s top endurance athletes. Fresh out of college, Colin had a vast world of possibility in front of him when a tragic accident left him hospitalized. Unsure if he’d ever walk again, his injuries covered nearly 25% of his body, primarily damaging his legs and feet. Despite the odds, his mother encouraged him to dream big and he dared to set a seemingly impossible goal that set him on a path to rethink what’s possible. Fast forward to today, and Colin’s list of achievements is staggering. In this episode, we get into many of his harrowing adventures, including his solo, unsupported, unassisted crossing of Antartica. Even if you’re not a professional athlete or have any ambition to break world records, his story will resonate. We all need courage, a strong mindset, and pure grit to overcome obstacles, pursue big dreams, and do the seemingly impossible. A few highlights from our conversation: 1000 NOs paves the way to YES. How failure is only helping us forge and prepare us for the thing we are reaching for. The longest journey is 6 inches between your ears. Colin shares how he discovered mindset […]

The post Rethink Impossible with Colin O’Brady appeared first on Chase Jarvis Photography.




ad

Ben Moon: Surf, Survival, and Life on the Road

Since we’re home, I’m working to bring more LIVE conversations to you from our living rooms. ???? Join me + adventure photographer / filmmaker Ben Moon at 12:30PM PST tomorrow. There will be a live chat, so please ask us some questions as well. See you there. You might know Ben from his adventure and lifestyle photography or his beautiful films. Surviving cancer in his 20s gradually shifted his artistic focus from capturing the pursuit of adventure to telling nuanced human stories that have inspired and impacted millions. Most notably, his personal story battling colorectal cancer and his special relationship with his dog Denali, which he shares in his beautiful viral short film, now turned book, Denali. ABOUT BEN Ben Moon is an adventure, lifestyle, and portrait photographer whose vibrant images have graced the pages of Patagonia catalogues for the past 18 years.  In recent years, he has shifted his focus to filmmaking. In 2015, he founded his production company, Moonhouse as a platform for collaboration with friends and creatives to bring a wide range of thought-provoking, impactful and cinematically beautiful stories to life on-screen. As a director, Ben’s unique ability to connect with his subjects paired with the talent […]

The post Ben Moon: Surf, Survival, and Life on the Road appeared first on Chase Jarvis Photography.




ad

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.




ad

African American Women Leading in Tech

“Close your eyes and name three people who have impacted the tech industry.”

In all likelihood, that list might be overwhelmingly white and male.

And you are not alone. Numerous lists online yielded the same results. In recent years, many articles have chronicled the dearth of diversity in tech. Studies have shown the ways in which venture capital firms have systematically underestimated and undervalued innovation coming particularly from women of color. In 2016 only 88 tech startups were led by African American women, in 2018 this number had climbed to a little over 200. Between 2009 and 2017, African American women raised $289MM in venture/angel funding. For perspective, this only represents .0006% of the $424.7B in total tech venture funding raised in that same time frame. In 2018, only 34 African American women had ever raised more than a million in venture funding.

When it comes to innovation, it is not unusual for financial value to be the biggest predictor of what is considered innovative. In fact, a now largely controversial list posted by Forbes of America’s most innovative leaders in the fall of 2019 featured 99 men and one woman. Ironically, what was considered innovative was, in fact, very traditional in its presentation. The criteria used for the list was “media reputation for innovation,” social connections, a track record for value creation, and investor expectations for value creation.

The majority of African American women-led startups raise $42,000 from largely informal networks. Criteria weighted on the side of ‘track record for value creation’ and ‘investor expectations for value creation’ devalues the immense contributions of African American women leading the charge on thoughtful and necessary tech. Had Forbes used criteria for innovation that recognized emergent leadership, novel problem-solving, or original thinking outside the circles of already well-known and well-established entrepreneurs we might have learned something new. Instead, we're basically reminded that "it takes money to make money."

Meanwhile, African American women are the fastest-growing demographic of entrepreneurs in the United States. Their contributions to tech, amongst other fields, are cementing the importance of African American women in the innovation space. And they are doing this within and outside traditional tech frameworks. By becoming familiar with these entrepreneurs and their work, we can elevate their reputation and broaden our collective recognition of innovative leaders.

In honor of black history month, we have compiled a list of African American women founders leading the way in tech innovation from Alabama to the Bay Area. From rethinking energy to debt forgiveness platforms these women are crossing boundaries in every field.

Cultivating New Leaders

Photo of Kathryn Finney, courtesy of Forbes.com.

Kathryn Finney founder of Digitalundivided
Kathryn A. Finney is an American author, researcher, investor, entrepreneur, innovator and businesswoman. She is the founder and CEO of digitalundivided, a social enterprise that leads high potential Black and Latinx women founders through the startup pipeline from idea to exit.

Laura Weidman Co-founder Code2040
Laura Weidman Powers is the co-founder and executive director of Code2040, a nonprofit that creates access, awareness, and opportunities for minority engineering talent to ensure their leadership in the innovation economy.

Angelica Ross founder of TransTech Social Enterprises
Angelica Ross is an American businesswoman, actress, and transgender rights advocate. After becoming a self-taught computer coder, she went on to become the founder and CEO of TransTech Social Enterprises, a firm that helps employ transgender people in the tech industry.

Christina Souffrant Ntim co-founder of Global Startup Ecosystem
Christina Souffrant Ntim is the co-founder of award-winning digital accelerator platform – Global Startup Ecosystem which graduates over 1000+ companies across 90+ countries a year.

Media and Entertainment

Bryanda Law founder of Quirktastic
Bryanda Law is the founder of Quirktastic, a modern media-tech company on a mission to grow the largest and most authentically engaged community of fandom-loving people of color.

Morgan Debaun founder of Blavity Inc.
Morgan DeBaun is an African American entrepreneur. She is the Founder and CEO of Blavity Inc., a portfolio of brands and websites created by and for black millennials

Cheryl Contee co-founder of Do Big Things
Cheryl Contee is the award-winning CEO and co-founder of Do Big Things, a digital agency that creates new narratives and tech for a new era focused on causes and campaigns.

Photo of Farah Allen, courtesy of The Source Magazine.

Farah Allen founder of The Labz
Farah Allen is the CEO and founder of The Labz, a collaborative workspace that provides automated tracking, rights management, protection—using Blockchain technology—of your music files during and after you create them.

Health/Wellness

Mara Lidey co-founder of Shine
Marah Lidey is the co-founder & co-CEO of Shine. Shine aims to reinvent health and wellness for millennials through messaging technology.

Alicia Thomas co-founder of Dibs
Alicia Thomas is the founder and CEO of Dibs, a B2B digital platform that gives studios quick and easy access to real-time pricing for fitness classes.

Photo of Erica Plybeah, courtesy of BetterTennessee.com

Erica Plybeah Hemphill founder of MedHaul
Erica Plybeah Hemphill is the founder of MedHaul. MedHaul offers cloud-based solutions that ease the burdens of managing patient transportation.

Star Cunningham founder of 4D Healthware
Star Cunningham is the founder and CEO of 4D Healthware. 4D Healthware is patient engagement software that makes personalized medicine possible through connected data.

Kimberly Wilson founder of HUED
Kimberly Wilson is the founder of HUED. HUED is a healthcare technology startup that helps patients find and book appointments with Black and Latinx healthcare providers.

Financial

Viola Llewellyn co-founder of Ovamba Solutions
Viola Llewellyn is the co-founder and the president of Ovamba Solutions, a US-based fintech company that provides micro, small, and medium enterprises in Africa and the Middle East with microfinance through a mobile platform.

NanaEfua Baidoo Afoh-Manin, Briana DeCuir and Joanne Moreau founders of Shared Harvest Fund
NanaEfua, Briana and Joanne are the founders of Shared Harvest Fund. Shared Harvest Fund provides real opportunities for talented people to volunteer away their student loans.

Photo of Sheena Allen, courtesy of People of Color in Tech.

Sheena Allen founder of CapWay
Sheena Allen is best known as the founder and CEO of fintech company and mobile bank CapWay.

Education

Helen Adeosun co-founder of CareAcademy
Helen Adeosun is the co-founder, president and CEO of CareAcademy, a start-up dedicated to professionalizing caregiving through online classes. CareAcademy brings professional development to caregivers at all levels.

Alexandra Bernadotte founder of Beyond 12
Alex Bernadotte is the founder and chief executive officer of Beyond 12, a nonprofit that integrates personalized coaching with intelligent technology to increase the number of traditionally underserved students who earn a college degree.

Shani Dowell founder of Possip
Shani Dowell is the founder of Possip, a platform that simplifies feedback between parents, schools and districts. Learn more at possipit.com.

Kaya Thomas of We Read Too
Kaya Thomas is an American computer scientist, app developer and writer. She is the creator of We Read Too, an iOS app that helps readers discover books for and by people of color.

Kimberly Gray founder of Uvii
Kimberly Gray is the founder of Uvii. Uvii helps students to communicate and collaborate on mobile with video, audio, and text

Nicole Neal co-founder of ProcureK12 by Noodle Markets
Nicole Neal is the co-founder and CEO of ProcureK12 by Noodle Markets. ProcureK12 makes purchasing for education simple. They combine a competitive school supply marketplace with quote request tools and bid management.

Beauty/Fashion/Consumer goods

Regina Gwyn founder of TresseNoire
Regina Gwynn is the co-founder & CEO of TresseNoire, the leading on-location beauty booking app designed for women of color in New York City and Philadelphia.

Camille Hearst co-founder of Kit.
Camille Hearst is the CEO and co-founder of Kit. Kit lets experts create shoppable collections of products so their followers can buy and the experts can make some revenue from what they share.

Photo of Esosa Ighodaro courtesy of Under30CEO.

Esosa Ighodaro co-founder of CoSign Inc.
Esosa Ighodaro is the co-founder of CoSign Inc., which was founded in 2013. CoSign is a mobile application that transfers social media content into commerce giving cash for endorsing and cosigning products and merchandise like clothing, home goods, technology and more.

Environment

Jessica Matthews founder of Uncharted Power
Jessica O. Matthews is a Nigerian-American inventor, CEO and venture capitalist. She is the co-founder of Uncharted Power, which made Soccket, a soccer ball that can be used as a power generator.

Etosha Cave co-founder of Opus 12
Etosha R. Cave is an American mechanical engineer based in Berkeley, California. She is the Co-Founder and Chief Scientific Officer of Opus 12, a startup that recycles carbon dioxide.

Kellee James founder of Mercaris, Inc.
Kellee James is the founder and CEO of Mercaris, Inc., a growing, minority-led start-up that makes efficient trading of organic and non-GMO commodities possible via market data service exchanges and trading platforms.

Workplace

Photo of Lisa Skeete Tatum courtesy of The Philadelphia Citezen.

Lisa Skeete Tatum founder of Landit
Lisa Skeete Tatum is the founder and CEO of Landit, a technology platform created to increase the success and engagement of women in the workplace, and to enable companies to attract, develop, and retain high-potential, diverse talent.

Netta Jenkins and Jacinta Mathis founders of Dipper
Netta Jenkins and Jacinta Mathis are founders of Dipper, a platform that acts as a safe digital space for individuals of color in the workplace.

Sherisse Hawkins founder of Pagedip
Sherisse Hawkins is the visionary and founder of Pagedip. Pagedip is a cloud-based software solution that allows you to bring depth to digital documents, enabling people to read (text), watch (video) and do (interact) all in the same place without ever having to leave the page.

Thkisha DeDe Sanogo founder of MyTAASK
Thkisha DeDe Sanogo is the founder of MyTAASK. MyTAASK is a personal planning platform dedicated to getting stuff done in real-time.

Home

Photo of Jean Brownhill, courtesy of Quartz at Work.

Jean Brownhill founder of Sweeten 
Jean Brownhill is the founder and CEO of Sweeten, an award-winning service that helps homeowners and business owners find and manage the best vetted general contractors for major renovation projects.

Reham Fagiri co-founder of AptDeco
Reham Fagiri is the co-founder of AptDeco. AptDeco is an online marketplace for buying and selling quality preowned furniture with pick up and delivery built into the service.

Stephanie Cummings founder of Please Assist Me
Stephanie Cummings is the founder and CEO of Please Assist me. Please Assist Me is an apartment task service in Nashville, TN. The organization empowers working professionals by allowing them to outsource their weekly chores to their own personal team.

Law

Kristina Jones co-founder of Court Buddy
Kristina Jones is the co-founder of Court Buddy, a service that matches clients with lawyers.

Sonja Ebron and Debra Slone founders of Courtroom5
Sonja Ebron and Debra Slone are the founders of Courtroom5. Courtroom5 helps you represent yourself in court with tools, training, and community designed for pro se litigants.

Crowdfunding

Zuley Clarke founder of Business Gift Registry
Zuley Clarke is the founder of Business Gift Registry, a crowdfunding platform that lets friends and family support an entrepreneur through gift-giving just like they would support a couple for a wedding.



  • News & Culture

ad

So You've Written a Bad Design Take

So you’ve just written a blog post or tweet about why wireframes are becoming obsolete, the dangers of “too accessible” design, or how a certain style of icon creates “cognitive fatigue.”

Your post went viral, but now you’re getting ratioed by rude people on the Internet. That sucks! You were just trying to start a conversation and you probably didn’t deserve all that negativity (except for you, “too accessible” guy).

Most likely, you made one of these common mistakes:

1. You made generalizations about “design”

You, a good user-centered designer, know that you are not your user. Nor are you every designer.

First of all, let's acknowledge that there is no universal definition of design. Even if we narrow it down to software design, it’s still hard to make generalizations. Agency, in-house, product, startup, enterprise, non-profit, website, app, connected hardware, etc. – there are a lot of different work contexts and cultures for people with “designer” in their titles.

"The Design Industry" is not a thing, but even if it were, you don't speak for it. Don’t assume that the kind of design work you do is the universal default.

2. You didn’t share enough context

There are many great design books and few great design blog posts. (There are, to my knowledge, no great design tweets, but I am open to your suggestions.) Writing about design is not well suited to short formats, because context plays such an important role and there’s always a lot of it to cover.

Writing about your work should include as much context as you would include if you were presenting your portfolio for a job interview. What kind of organization did you work for? Who was your client and/or your stakeholders? What was the goal of the project? Your timeline? What was the makeup of your team? What were the notable business rules and constraints? How are you defining effectiveness and success?

Without these kinds of details, it’s not possible for other designers to know if what you’ve written is credible or applicable to them.

3. You were too certain

A blog post doesn’t need to be a dissertation. It’s okay to share hunches and anecdotes, but give the necessary caveats. And if you're making claims about science, bruh, you gotta cite your sources.

Be humble in your takes. Your account of what worked for you and why is more valuable to your peers than making sweeping claims and reheating the same old arguments. Be prepared to be told you’re wrong, and have the humility to realize that your perspective is just your perspective. Real conversations, like good design, are built on feedback and diverse viewpoints.

Together, we can improve the discourse in our information ecosystems. Don't generalize. Give context. Be humble.




ad

Readability Algorithms Should Be Tools, Not Targets

The web is awash with words. They’re everywhere. On websites, in emails, advertisements, tweets, pop-ups, you name it. More people are publishing more copy than at any point in history. That means a lot of information, and a lot of competition. In recent years a slew of ‘readability’ programs have appeared to help us tidy up the things we write. (Grammarly, Readable, and Yoast are just a handful that come to mind.




ad

DJI’s new Matrice 300 RTK drone offers a ridiculous 55-minutes of flight time and 2.7kg payload

DJI has announced their new Matrice 300 RTK “flying platform” (big drone) and the Zenmuse H20 hybrid camera series, to provide “a safer and smarter solution” to their enterprise customers. The M300 RTK, DJI says, is their first to integrate modern aviation features, advanced AI, 6-direction sensing and positioning, a UAV health management system and […]

The post DJI’s new Matrice 300 RTK drone offers a ridiculous 55-minutes of flight time and 2.7kg payload appeared first on DIY Photography.



  • DIY
  • dji
  • DJI M300 RTK
  • DJI Matrice 300 RTK
  • Matrice 300 RTK


ad

On boundedness, gradient estimate, blow-up and convergence in a two-species and two-stimuli chemotaxis system with/without loop. (arXiv:1909.04587v4 [math.AP] UPDATED)

In this work, we study dynamic properties of classical solutions to a homogenous Neumann initial-boundary value problem (IBVP) for a two-species and two-stimuli chemotaxis model with/without chemical signalling loop in a 2D bounded and smooth domain. We successfully detect the product of two species masses as a feature to determine boundedness, gradient estimates, blow-up and $W^{j,infty}(1leq jleq 3)$-exponential convergence of classical solutions for the corresponding IBVP. More specifically, we first show generally a smallness on the product of both species masses, thus allowing one species mass to be suitably large, is sufficient to guarantee global boundedness, higher order gradient estimates and $W^{j,infty}$-convergence with rates of convergence to constant equilibria; and then, in a special case, we detect a straight line of masses on which blow-up occurs for large product of masses. Our findings provide new understandings about the underlying model, and thus, improve and extend greatly the existing knowledge relevant to this model.




ad

Representations of the Infinite-Dimensional $p$-Adic Affine Group. (arXiv:1906.08964v2 [math.RT] UPDATED)

We introduce an infinite-dimensional $p$-adic affine group and construct its irreducible unitary representation. Our approach follows the one used by Vershik, Gelfand and Graev for the diffeomorphism group, but with modifications made necessary by the fact that the group does not act on the phase space. However it is possible to define its action on some classes of functions.




ad

Graded 2-generated axial algebras. (arXiv:2005.03577v1 [math.RA])

Axial algebras are non-associative algebras generated by semisimple idempotents whose adjoint actions obey a fusion law. Axial algebras that are generated by two such idempotents play a crucial role in the theory. We classify all primitive 2-generated axial algebras whose fusion laws have two eigenvalues and all graded primitive 2-generated axial algebras whose fusion laws have three eigenvalues. This represents a significant broadening in our understanding of axial algebras.




ad

Twisted quadrics and algebraic submanifolds in R^n. (arXiv:2005.03509v1 [math-ph])

We propose a general procedure to construct noncommutative deformations of an algebraic submanifold $M$ of $mathbb{R}^n$, specializing the procedure [G. Fiore, T. Weber, Twisted submanifolds of $mathbb{R}^n$, arXiv:2003.03854] valid for smooth submanifolds. We use the framework of twisted differential geometry of [Aschieri et al.,Class. Quantum Gravity 23 (2006), 1883], whereby the commutative pointwise product is replaced by the $star$-product determined by a Drinfel'd twist. We actually simultaneously construct noncommutative deformations of all the algebraic submanifolds $M_c$ that are level sets of the $f^a(x)$, where $f^a(x)=0$ are the polynomial equations solved by the points of $M$, employing twists based on the Lie algebra $Xi_t$ of vector fields that are tangent to all the $M_c$. The twisted Cartan calculus is automatically equivariant under twisted $Xi_t$. If we endow $mathbb{R}^n$ with a metric, then twisting and projecting to normal or tangent components commute, projecting the Levi-Civita connection to the twisted $M$ is consistent, and in particular a twisted Gauss theorem holds, provided the twist is based on Killing vector fields. Twisted algebraic quadrics can be characterized in terms of generators and $star$-polynomial relations. We explicitly work out deformations based on abelian or Jordanian twists of all quadrics in $mathbb{R}^3$ except ellipsoids, in particular twisted cylinders embedded in twisted Euclidean $mathbb{R}^3$ and twisted hyperboloids embedded in twisted Minkowski $mathbb{R}^3$ [the latter are twisted (anti-)de Sitter spaces $dS_2,AdS_2$].




ad

A reaction-diffusion system to better comprehend the unlockdown: Application of SEIR-type model with diffusion to the spatial spread of COVID-19 in France. (arXiv:2005.03499v1 [q-bio.PE])

A reaction-diffusion model was developed describing the spread of the COVID-19 virus considering the mean daily movement of susceptible, exposed and asymptomatic individuals. The model was calibrated using data on the confirmed infection and death from France as well as their initial spatial distribution. First, the system of partial differential equations is studied, then the basic reproduction number, R0 is derived. Second, numerical simulations, based on a combination of level-set and finite differences, shown the spatial spread of COVID-19 from March 16 to June 16. Finally, scenarios of unlockdown are compared according to variation of distancing, or partially spatial lockdown.




ad

Derivatives of normal Jacobi operator on real hypersurfaces in the complex quadric. (arXiv:2005.03483v1 [math.DG])

In cite{S 2017}, Suh gave a non-existence theorem for Hopf real hypersurfaces in the complex quadric with parallel normal Jacobi operator. Motivated by this result, in this paper, we introduce some generalized conditions named $mathcal C$-parallel or Reeb parallel normal Jacobi operators. By using such weaker parallelisms of normal Jacobi operator, first we can assert a non-existence theorem of Hopf real hypersurfaces with $mathcal C$-parallel normal Jacobi operator in the complex quadric $Q^{m}$, $m geq 3$. Next, we prove that a Hopf real hypersurface has Reeb parallel normal Jacobi operator if and only if it has an $mathfrak A$-isotropic singular normal vector field.




ad

Optimality for the two-parameter quadratic sieve. (arXiv:2005.03162v1 [math.NT])

We study the two-parameter quadratic sieve for a general test function. We prove, under some very general assumptions, that the function considered by Barban and Vehov [BV68] and Graham [Gra78] for this problem is optimal up to the second-order term. We determine that second-order term explicitly.




ad

On solving quadratic congruences. (arXiv:2005.03129v1 [math.NT])

The paper proposes a polynomial formula for solution quadratic congruences in $mathbb{Z}_p$. This formula gives the correct answer for quadratic residue and zeroes for quadratic nonresidue. The general form of the formula for $p=3 ; m{mod},4$, $p=5 ; m{mod},8$ and for $p=9 ; m{mod},16$ are suggested.




ad

General Asymptotic Regional Gradient Observer. (arXiv:2005.03009v1 [math.OC])

The main purpose of this paper is to study and characterize the existing of general asymptotic regional gradient observer which observe the current gradient state of the original system in connection with gradient strategic sensors. Thus, we give an approach based to Luenberger observer theory of linear distributed parameter systems which is enabled to determinate asymptotically regional gradient estimator of current gradient system state. More precisely, under which condition the notion of asymptotic regional gradient observability can be achieved. Furthermore, we show that the measurement structures allows the existence of general asymptotic regional gradient observer and we give a sufficient condition for such asymptotic regional gradient observer in general case. We also show that, there exists a dynamical system for the considered system is not general asymptotic gradient observer in the usual sense, but it may be general asymptotic regional gradient observer. Then, for this purpose we present various results related to different types of sensor structures, domains and boundary conditions in two dimensional distributed diffusion systems




ad

GraCIAS: Grassmannian of Corrupted Images for Adversarial Security. (arXiv:2005.02936v2 [cs.CV] UPDATED)

Input transformation based defense strategies fall short in defending against strong adversarial attacks. Some successful defenses adopt approaches that either increase the randomness within the applied transformations, or make the defense computationally intensive, making it substantially more challenging for the attacker. However, it limits the applicability of such defenses as a pre-processing step, similar to computationally heavy approaches that use retraining and network modifications to achieve robustness to perturbations. In this work, we propose a defense strategy that applies random image corruptions to the input image alone, constructs a self-correlation based subspace followed by a projection operation to suppress the adversarial perturbation. Due to its simplicity, the proposed defense is computationally efficient as compared to the state-of-the-art, and yet can withstand huge perturbations. Further, we develop proximity relationships between the projection operator of a clean image and of its adversarially perturbed version, via bounds relating geodesic distance on the Grassmannian to matrix Frobenius norms. We empirically show that our strategy is complementary to other weak defenses like JPEG compression and can be seamlessly integrated with them to create a stronger defense. We present extensive experiments on the ImageNet dataset across four different models namely InceptionV3, ResNet50, VGG16 and MobileNet models with perturbation magnitude set to {epsilon} = 16. Unlike state-of-the-art approaches, even without any retraining, the proposed strategy achieves an absolute improvement of ~ 4.5% in defense accuracy on ImageNet.




ad

The Cascade Transformer: an Application for Efficient Answer Sentence Selection. (arXiv:2005.02534v2 [cs.CL] UPDATED)

Large transformer-based language models have been shown to be very effective in many classification tasks. However, their computational complexity prevents their use in applications requiring the classification of a large set of candidates. While previous works have investigated approaches to reduce model size, relatively little attention has been paid to techniques to improve batch throughput during inference. In this paper, we introduce the Cascade Transformer, a simple yet effective technique to adapt transformer-based models into a cascade of rankers. Each ranker is used to prune a subset of candidates in a batch, thus dramatically increasing throughput at inference time. Partial encodings from the transformer model are shared among rerankers, providing further speed-up. When compared to a state-of-the-art transformer model, our approach reduces computation by 37% with almost no impact on accuracy, as measured on two English Question Answering datasets.




ad

The Sensitivity of Language Models and Humans to Winograd Schema Perturbations. (arXiv:2005.01348v2 [cs.CL] UPDATED)

Large-scale pretrained language models are the major driving force behind recent improvements in performance on the Winograd Schema Challenge, a widely employed test of common sense reasoning ability. We show, however, with a new diagnostic dataset, that these models are sensitive to linguistic perturbations of the Winograd examples that minimally affect human understanding. Our results highlight interesting differences between humans and language models: language models are more sensitive to number or gender alternations and synonym replacements than humans, and humans are more stable and consistent in their predictions, maintain a much higher absolute performance, and perform better on non-associative instances than associative ones. Overall, humans are correct more often than out-of-the-box models, and the models are sometimes right for the wrong reasons. Finally, we show that fine-tuning on a large, task-specific dataset can offer a solution to these issues.




ad

Generative Adversarial Networks in Digital Pathology: A Survey on Trends and Future Potential. (arXiv:2004.14936v2 [eess.IV] UPDATED)

Image analysis in the field of digital pathology has recently gained increased popularity. The use of high-quality whole slide scanners enables the fast acquisition of large amounts of image data, showing extensive context and microscopic detail at the same time. Simultaneously, novel machine learning algorithms have boosted the performance of image analysis approaches. In this paper, we focus on a particularly powerful class of architectures, called Generative Adversarial Networks (GANs), applied to histological image data. Besides improving performance, GANs also enable application scenarios in this field, which were previously intractable. However, GANs could exhibit a potential for introducing bias. Hereby, we summarize the recent state-of-the-art developments in a generalizing notation, present the main applications of GANs and give an outlook of some chosen promising approaches and their possible future applications. In addition, we identify currently unavailable methods with potential for future applications.




ad

Optimal Adjacent Vertex-Distinguishing Edge-Colorings of Circulant Graphs. (arXiv:2004.12822v2 [cs.DM] UPDATED)

A k-proper edge-coloring of a graph G is called adjacent vertex-distinguishing if any two adjacent vertices are distinguished by the set of colors appearing in the edges incident to each vertex. The smallest value k for which G admits such coloring is denoted by $chi$'a (G). We prove that $chi$'a (G) = 2R + 1 for most circulant graphs Cn([[1, R]]).




ad

The growth rate over trees of any family of set defined by a monadic second order formula is semi-computable. (arXiv:2004.06508v3 [cs.DM] UPDATED)

Monadic second order logic can be used to express many classical notions of sets of vertices of a graph as for instance: dominating sets, induced matchings, perfect codes, independent sets or irredundant sets. Bounds on the number of sets of any such family of sets are interesting from a combinatorial point of view and have algorithmic applications. Many such bounds on different families of sets over different classes of graphs are already provided in the literature. In particular, Rote recently showed that the number of minimal dominating sets in trees of order $n$ is at most $95^{frac{n}{13}}$ and that this bound is asymptotically sharp up to a multiplicative constant. We build on his work to show that what he did for minimal dominating sets can be done for any family of sets definable by a monadic second order formula.

We first show that, for any monadic second order formula over graphs that characterizes a given kind of subset of its vertices, the maximal number of such sets in a tree can be expressed as the extit{growth rate of a bilinear system}. This mostly relies on well known links between monadic second order logic over trees and tree automata and basic tree automata manipulations. Then we show that this "growth rate" of a bilinear system can be approximated from above.We then use our implementation of this result to provide bounds on the number of independent dominating sets, total perfect dominating sets, induced matchings, maximal induced matchings, minimal perfect dominating sets, perfect codes and maximal irredundant sets on trees. We also solve a question from D. Y. Kang et al. regarding $r$-matchings and improve a bound from G'orska and Skupie'n on the number of maximal matchings on trees. Remark that this approach is easily generalizable to graphs of bounded tree width or clique width (or any similar class of graphs where tree automata are meaningful).