ul Should Designers Learn How to Code? By thenextweb.com Published On :: Fri, 08 May 2020 05:46:20 PDT https://thenextweb.com/growth-quarters/2020/05/08/should-designers-learn-how-to-code-syndication/ Full Article
ul Microsoft bundled its beautiful Bing wallpapers into a free Android app By thenextweb.com Published On :: Fri, 08 May 2020 09:08:00 PDT https://thenextweb.com/microsoft/2020/05/08/microsoft-bundled-its-beautiful-bing-wallpapers-into-a-free-android-app/ Full Article
ul 10 Best Content Scheduling Tools for WordPress By line25.com Published On :: Sat, 09 May 2020 09:12:00 PDT https://line25.com/wordpress-plug-ins/content-scheduling-tools-for-wordpress Full Article
ul 10 Websites and Apps All Designers Should Be Using By webdesignledger.com Published On :: Thu, 30 Apr 2020 12:53:15 +0000 As a designer, we’re overloaded with choices every day, but there are some apps that are absolutely worth your time and investment. Finding the best ones and most useful ones can be a difficult task, so we’re going to make things easy for you and give you our top 10 apps and websites we couldn’t […] Read More at 10 Websites and Apps All Designers Should Be Using Full Article Editors Pick Featured Resources Uncategorized
ul Coronavirus pandemic could inflict emotional trauma and PTSD on an unprecedented scale, scientists warn By feedproxy.google.com Published On :: Mon, 30 Mar 2020 14:41:58 EDT Researchers are warning that the coronavirus pandemic could inflict long-lasting emotional trauma on an unprecedented global scale. They say it could leave millions wrestling with debilitating psychological disorders while dashing hopes for a swift economic recovery. Full Article
ul Could you get PTSD from your pandemic experience? The long-term mental health effects of coronavirus By feedproxy.google.com Published On :: Mon, 20 Apr 2020 10:10:58 EDT Experiencing intense flashbacks, nightmares, irritability, anger, and fear? In the face of a traumatic event like the Covid-19 pandemic, it’s common to feel this way. Full Article
ul All The Vintage Logo Template Designs You Could Ever Wish For! By blog.spoongraphics.co.uk Published On :: Mon, 20 Apr 2020 07:00:23 +0000 Creating vintage style designs for company brands, T-shirts, packaging designs, book covers, window signs, and countless other graphic design project scenarios has never been easier with this huge bundle of 200 editable logo templates from Heritage Type Co. Logo Templates are ready-made designs that can be easily customised to quickly create stunning badges and emblems […] The post All The Vintage Logo Template Designs You Could Ever Wish For! appeared first on Spoon Graphics. Full Article News deal heritage type logo templates vintage vintage logo designs vintage logos
ul Could you get PTSD from your pandemic experience? The long-term mental health effects of coronavirus By feedproxy.google.com Published On :: Monday, April 20, 2020 - 10:10am Experiencing intense flashbacks, nightmares, irritability, anger, and fear? In the face of a traumatic event like the Covid-19 pandemic, it’s common to feel this way. Full Article
ul How to Set a Default Commit Message By feedproxy.google.com Published On :: Mon, 02 Mar 2020 15:23:46 +0000 Having a default commit message is really useful for a number of reasons: It can formalize your commit messages It serves as a good reminder for the information you should add to your commit message, like issue number If you set it to “Drunk AF, don’t accept this” To set a default commit message on […] The post How to Set a Default Commit Message appeared first on David Walsh Blog. Full Article git Quick Tips Shell
ul How to Simulate Long HTTP Requests By feedproxy.google.com Published On :: Tue, 17 Mar 2020 14:40:48 +0000 It happens less frequently these days but there are times when we need to accommodate for a HTTP request timing out. The service could be down, under heavy traffic, or just poorly coded, or any host of other issues. Whenever I need to simulate a long HTTP request, I use a bit of PHP to […] The post How to Simulate Long HTTP Requests appeared first on David Walsh Blog. Full Article PHP Quick Tips
ul Permainan Situs Sbobet Casino Live Paling Populer By feedproxy.google.com Published On :: Mon, 03 Feb 2020 06:33:53 +0000 Siapa yang tidak mengenal dengan casino sbobet online? Tentu saja hampir semua orang mengenal permainan-permainan casino. Nah, jika kamu belum mengenal mengenai permainan casino, terutama tentang live casino, tidak usah bingung. Pada artikel yang ada di bawah ini akan menjelaskan tentang permainan live casino. Casino berkembang begitu pesat dan memiliki daya tarik yang sangat kuat … More "Permainan Situs Sbobet Casino Live Paling Populer" The post Permainan Situs Sbobet Casino Live Paling Populer appeared first on Situs Agen Judi Live Casino Online Indonesia Terpercaya. Full Article Situs Live Casino Agen Casino Sbobet Bandar Casino Sbobet Judi Casino Sbobet
ul 15 Effective Tools and Services You Should Pay Attention To By feedproxy.google.com Published On :: Thu, 19 Mar 2020 00:28:00 +0000 One of life’s pleasures is discovering when some small action taken yields a highly positive, or even a game-changing outcome. A web designer could spend many hours creating a modern website with old tools. A single new tool or a single new service could cut the time required to do so dramatically and produce an […] The post 15 Effective Tools and Services You Should Pay Attention To appeared first on WebAppers. Full Article Design Tools design services tools wordpress
ul Top 8 WP Multipurpose Themes that you should check out By feedproxy.google.com Published On :: Thu, 30 Apr 2020 08:20:06 +0000 There are situations when using a specialty theme will enable a web designed to proceed more easily and efficiently. But, in most instances a multipurpose WordPress theme will do what needs to be done and do it well. Premium multipurpose themes generally provide all the functionality needed to create websites for most industry sectors, business […] The post Top 8 WP Multipurpose Themes that you should check out appeared first on WebAppers. Full Article Design multipurpose themes themes wordpress
ul 7 Reasons Every Photographer Should Learn How to Use Photoshop By feedproxy.google.com Published On :: Thu, 06 Jul 2017 14:45:50 +0000 Many photographers think that learning how to find the ideal location and take a picture at the right time is all they need to know. However, this isn’t the case, and in a world where CGI rivals reality and touch-ups via photo editing software are now seen as a necessity to customers, relying on point and click will kill your photography business. Here are seven reasons every photographer should learn how to use Photoshop. Royalty Free Photo Touch-Ups Are Essential When a family orders school photos, they pay a flat fee for copies of the school pictures and a little more if the child’s name is embossed on the picture. They pay a separate fee if the picture is touched up, whether it is hiding acne or reducing glare on the child’s glasses. Photographers who know how to touch up photos without making it look artificial or cartoonish can ... Read more The post 7 Reasons Every Photographer Should Learn How to Use Photoshop appeared first on Digital Photography Tutorials. Full Article Photo Editing complete Photoshop Course Creating Art from Images frame animation take a picture Use Photoshop
ul You Might Be Tempted to Use These CSS Tricks But Should You? By webdesignerwall.com Published On :: Wed, 14 Dec 2016 14:00:00 +0000 The temptation to dive right into new and exciting CSS tricks is strong – you might even do it without knowing it through learning by example or implementing that hot new framework everyone is talking about. It is more important to fully understand new CSS classes and properties, experiment with them and learn their limitations […] The post You Might Be Tempted to Use These CSS Tricks But Should You? appeared first on Web Designer Wall. Full Article Tutorials CSS
ul 30 Truly Interactive Websites Built With CSS & JavaScript By webdesignerwall.com Published On :: Tue, 03 Jan 2017 12:00:09 +0000 All websites are somewhat interactive…we click on links or scroll a page, but truly interactive websites take us on a user-driven adventure or draws us in through motion and sound while giving us the power of choice. Interaction can be as simple as a series of clicks that navigate us through a story or landscape, […] The post 30 Truly Interactive Websites Built With CSS & JavaScript appeared first on Web Designer Wall. Full Article Design Trends Inspiration
ul Four Elements of Truly Mobile-Friendly Responsive Menus By webdesignerwall.com Published On :: Wed, 01 Feb 2017 16:00:23 +0000 There are hundreds of ways to create responsive navigation, limited only by your creativity and the boundaries of what CSS can accomplish. Good responsive navigation is a little harder – a responsive menu must become a mobile menu, adhering to the needs and rules of touch-driven devices. Mobile design is rapidly changing, and so the […] The post Four Elements of Truly Mobile-Friendly Responsive Menus appeared first on Web Designer Wall. Full Article Tutorials CSS jQuery
ul Themify Shoppe – The Ultimate WooCommerce WordPress Theme By webdesignerwall.com Published On :: Wed, 15 Feb 2017 17:52:16 +0000 I’m excited to announce that Themify has released another awesome theme – Themify Shoppe. Designed by Liam McKay and coded by Themify team, Shoppe works hand-in-hand with WooCommerce, making it the ultimate multi-purpose eCommerce theme. It features the popular drag and drop Themify Builder that can help you design and build your online store to […] The post Themify Shoppe – The Ultimate WooCommerce WordPress Theme appeared first on Web Designer Wall. Full Article General Stuff
ul Unwell: The Public Health Implications of Unregulated Drinking Water By feedproxy.google.com Published On :: Mon, 06 Nov 2017 21:28:26 +0000 By Nate Seltenrich Environmental Health Perspectives Roughly one in seven U.S. residents relies on a private well for drinking water.1 Unlike the rest of the population served by the nation’s many public water systems,2 these 44.5 million Americans are not … Continue reading → Full Article Drinking Water safe drinking water water wells
ul 7 Vital Components of a Successful Brand Strategy By justcreative.com Published On :: Fri, 08 May 2020 06:20:02 +0000 A brand strategy is a long-term plan that affects every facet of your business, but creating one can be confusing. We break it down into 7 essential components. Full Article Branding Guest Articles brBrand Strategy
ul Which Programming Language Should Mobile Developers Choose? By icanbecreative.com Published On :: Fri, 27 Mar 2020 08:11:50 PDT When building new apps, the most important thing developers must decide is which language to program in. There are several languages out there, and some are preferred for certain operating... Full Article Learning
ul Playable simulations to decide what happens next By flowingdata.com Published On :: Mon, 04 May 2020 07:21:03 +0000 The timelines keep shifting and people are getting antsy for many valid (and…Tags: coronavirus, Marcel Salathé, Nicky Case, simulation Full Article Infographics coronavirus Marcel Salathé Nicky Case simulation
ul Who should receive care first, an ethical dilemma By flowingdata.com Published On :: Thu, 07 May 2020 07:04:43 +0000 At greater disparities between low resources and high volumes of sick people, doctors…Tags: coronavirus, Feilding Cage, healthcare, policy, Reuters Full Article Infographics coronavirus Feilding Cage healthcare policy Reuters
ul ✚ Tornado Lines – Useful or Not? (The Process 088) By flowingdata.com Published On :: Thu, 07 May 2020 17:30:48 +0000 It looks like a tornado. It's messy. It's circular. It almost looks intentionally confusing. But how bad is it really?Tags: novelty, tornado Full Article The Process novelty tornado
ul Concurrency & Multithreading in iOS By feedproxy.google.com Published On :: Tue, 25 Feb 2020 08:00:00 -0500 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. Building Concurrent User Interfaces on iOS (WWDC 2012) Concurrency and Parallelism: Understanding I/O Apple's Official Concurrency Programming Guide Mutexes and Closure Capture in Swift Locks, Thread Safety, and Swift Advanced NSOperations (WWDC 2015) NSHipster: NSOperation Full Article Code
ul Should you use Userbase for your next static site? By feedproxy.google.com Published On :: Wed, 06 May 2020 08:00:00 -0400 During the winter 2020 Pointless Weekend, we built TrailBuddy (working app coming soon). Our team consisted of four developers, two project managers, two front-end developers, a digital-analyst, a UXer, and a designer. In about 48 hours, we took an idea from Jeremy Field’s head to a (mostly) working app. We broke up the project in two parts:. First, a back-end that crunches trail, weather, and soil data. That data is exposed via a GraphQL API for a web app to consume. While developers built the API, I built a static front end using Next.js. Famously, static front-ends don’t have a database, or a concept of “users.” A bit of functionality I wanted to add was saving favorite trails. I didn’t want to be hacky about it, I needed some way to add users and a database. I knew it’d be hard for the developers to set this up as part of the API, they had their hands full with all the #soil-soil-soil-soil-soil (a slack channel dedicated solely to figuring out our soil data problem—those were plentiful.) I had been looking for an excuse to use Userbase, and this seemed like as good a time as any. A textbook Userbase use case “When would I use it?” The Usebase site lists these reasons: If you want to build a web app without writing any backend code. If you never want to see your users' data. If you're tired of dealing with databases. If you want to radically simplify your GDPR compliance. And if you want to keep things really simple. This was a perfect fit for my problem. I didn’t want to write any more backend code for this. I didn’t want to see our user’s data, I don’t care to know anyone’s favorite trails.* A nice bonus to not having users in our backend was not having to worry about keeping their data safe. We don’t have their data at all, it’s end-to-end encrypted by Userbase. We can offer a reasonable amount of privacy for free (well for the price of using Userbase: $49 a year.) I am not tired of dealing with databases, but I’d rather not. I don’t think anyone doesn’t want to simplify their GDPR compliance. Finally, given our tight timeline I wanted nothing more than to keep things really simple. A sign up form that I didn't have to write a back-end for Using Userbase Userbase can be tried for free, so I set aside thirty minutes or so to do a quick proof of concept to make sure this would work out for us. I made an account and followed their Quickstart. Userbase is a fundamentally easy tool to use, but their quickstart is everything I’d want out of a quickstart: Written in the most vanilla way possible (just HTML and vanilla JS). This means I can adapt it to my needs, in this case React using Next.js Easy to follow, it does the most barebones tour of the functionality you can expect to get out of the SDK (software development kit.) In other words it is quick and it is a start It has a live demo and code samples you can download and run yourself It didn’t take long after that to integrate Userbase into our app with more help from their great docs. I debated whether to add code samples of what we did here, and I didn’t because any reader would be better off using the great quickstart and docs Userbase provides—they are that clear, and that good. Depending on your use case you’ll need to adapt the examples to your needs, for us the trickiest things were creating a top level authentication context to manage users in the app, and a custom hook to encapsulate all the logic for setting, updating, and deleting favourite trails in the app. Userbase’s SDK worked seamlessly for us. A log in form that I didn't have to write a back-end for Is Userbase for you? Maybe. I am definitely a fan, so much so that this blog post probably reads like an advert. Userbase saved me a ton of time in this project. It reminded me of “The All Powerful Front End Developer” talk by Chris Coyer. I don’t fully subscribe to all the ideas in that talk, but it is nice to have “serverless” tools like Userbase, and all the new JAMstacky things. There are limits to the Userbase serverless experience in terms of scale, and control. Obviously relying on a third party for something always carries some (probably small) risk—it’s worth noting Usebase includes a note on their pricing page that says “You can host it yourself always under your control, or we can run it for you for a full serverless experience”—Still, I wouldn’t hesitate this to use in future projects. One of the great things about Viget and Pointless Weekend is the opportunity to try new things. For me that was Next.js and Userbase for Trailbuddy. It doesn’t always work out (in fact this is my first pointless weekend where a risk hasn’t blown up in my face) but it is always fun. Getting to try out Userbase and beginning to think about how we may use it in the future made the weekend worthwhile for me, and it made my job on this project much more enjoyable. *I will write a future post about privacy conscious analytics in TrailBuddy when I’ve figured that out. I am looking into Fathom Analytics for that. Full Article Code Front-end Engineering
ul Shim uses node.js to test sites on multiple browsers By feedproxy.google.com Published On :: Sun, 15 Jan 2012 04:01:13 +0000 Shim was developed within the Boston Globe’s media lab as a way to study how Web sites look on various devices and browsers. A laptop intercepts all wifi traffic – this is redirected to a custom node.js server – which inserts a javascript, or “shim,” at the head of each web page that is visited. Read the rest... Full Article Browsers Front Page JavaScript Testing
ul 40 Beautiful WordPress Divi Theme Examples That Will Wow You By wphacks.com Published On :: Tue, 11 Feb 2020 00:43:00 +0000 Are you looking for a new WordPress theme? The Divi Theme, by Elegant Themes, is easily one of the most […] The post 40 Beautiful WordPress Divi Theme Examples That Will Wow You appeared first on WPHacks. Full Article Themes divi theme elegant themes
ul METAL INJECTION LIVECAST #542 - Dull By Obb By feedproxy.google.com Published On :: Tue, 19 Nov 2019 21:44:05 +0000 We kick things off talking about the Motley Crue reunion. Darren shares a story from work. Rob talks about going... The post METAL INJECTION LIVECAST #542 - Dull By Obb appeared first on Metal Injection. Full Article Metal Injection Livecast
ul METAL INJECTION LIVECAST #553 - Full On Lip By feedproxy.google.com Published On :: Wed, 05 Feb 2020 02:03:04 +0000 What an eventful edition of the Metal Injection Livecast! We kick things off talking about the new Dave Mustaine memoir... The post METAL INJECTION LIVECAST #553 - Full On Lip appeared first on Metal Injection. Full Article Metal Injection Livecast
ul 9 Convincing Reasons Why Designers Should Pursue Personal Projects By feedproxy.google.com Published On :: Thu, 16 Apr 2020 14:06:24 +0000 Web designers have skills and expertise that open up a whole world of possibilities. Many designers and developers choose to pursue personal projects in their own time, which can be a nice change of... Click through to read the rest of the story on the Vandelay Design Blog. Full Article Business Design Featured
ul Urging Multi-Pronged Effort to Halt Climate Crisis, Scientists Say Protecting World’s Forests as Vital as Cutting Emissions By feedproxy.google.com Published On :: Fri, 05 Oct 2018 19:38:06 +0000 By Julia Conley Common Dreams “Our message as scientists is simple: Our planet’s future climate is inextricably tied to the future of its forest.” With a new statement rejecting the notion that drastically curbing emissions alone is enough to curb … Continue reading → Full Article ET News Plants & Forests carbon capture carbon emissions climate scientist Deforestation forest conservation Global Warming
ul Scientists Warn Crashing Insect Population Puts ‘Planet’s Ecosystems and Survival of Mankind’ at Risk By feedproxy.google.com Published On :: Mon, 11 Feb 2019 23:30:02 +0000 By Jon Queally Common Dreams “This is the stuff that worries me most. We don’t know what we’re doing, not trying to stop it, [and] with big consequences we don’t really understand.” The first global scientific review of its kind … Continue reading → Full Article Endangered Species ET News ecosystem collapse ecosystems insect population insects mass extinction species extinction
ul ‘Coming Mass Extinction’ Caused by Human Destruction Could Wipe Out 1 Million Species, Warns UN Draft Report By feedproxy.google.com Published On :: Tue, 23 Apr 2019 18:47:43 +0000 By Jessica Corbett Common Dreams Far-reaching global assessment details how humanity is undermining the very foundations of the natural world On the heels of an Earth Day that featured calls for radical action to address the current “age … Continue reading → Full Article Endangered Species ET News mass extinction UN Report
ul SS Peter & Paul By www.flickr.com Published On :: Sun, 15 Feb 2015 11:43:10 -0800 Andrew Rickmann posted a photo: SS Peter and Paul in Wantage, Oxfordshire. Full Article
ul Vulcan Bomber By www.flickr.com Published On :: Sun, 27 Sep 2015 03:56:29 -0700 Andrew Rickmann posted a photo: The Vulcan at RAF Fairford Full Article
ul Climate Change Driving Population Shifts to Urban Areas By feedproxy.google.com Published On :: Mon, 19 Dec 2016 20:05:26 +0000 By Kristie Auman-Bauer Penn State News Climate change is causing glaciers to shrink, temperatures to rise, and shifts in human migration in parts of the world, according to a Penn State researcher. Brian Thiede, assistant professor of rural sociology, along … Continue reading → Full Article Climate & Climate Change Climate Change climate research Urban Areas
ul Scientists Warn Crashing Insect Population Puts ‘Planet’s Ecosystems and Survival of Mankind’ at Risk By feedproxy.google.com Published On :: Mon, 11 Feb 2019 23:30:02 +0000 By Jon Queally Common Dreams “This is the stuff that worries me most. We don’t know what we’re doing, not trying to stop it, [and] with big consequences we don’t really understand.” The first global scientific review of its kind … Continue reading → Full Article Endangered Species ET News ecosystem collapse ecosystems insect population insects mass extinction species extinction
ul ‘Coming Mass Extinction’ Caused by Human Destruction Could Wipe Out 1 Million Species, Warns UN Draft Report By feedproxy.google.com Published On :: Tue, 23 Apr 2019 18:47:43 +0000 By Jessica Corbett Common Dreams Far-reaching global assessment details how humanity is undermining the very foundations of the natural world On the heels of an Earth Day that featured calls for radical action to address the current “age … Continue reading → Full Article Endangered Species ET News mass extinction UN Report
ul Talking to computers (part 1): Why is speech recognition so difficult? By feedproxy.google.com Published On :: Thu, 3 Jun 2019 08:31:15 GMT Although the performance of today's speech recognition systems is impressive, the experience for many is still one of errors, corrections, frustration and abandoning speech in favour of alternative interaction methods. We take a closer look at speech and find out why speech recognition is so difficult. Full Article
ul Does your website need to be beautiful? By feedproxy.google.com Published On :: Fri, 18 Oct 2019 20:14:50 +0000 When I first started designing websites in the 1990s, I focused most of my attention on creating striking visuals. In my defense, I was typically designing gaming website with only the occasional local business… but my goal was always to design a site that looked “cool.” In the early 2000s I stumbled across a website […] The post Does your website need to be beautiful? appeared first on Psychology of Web Design | 3.7 Blog. Full Article Psychology of Design User Experience Web Design
ul Why personas are antiquated (and what you should use instead) By feedproxy.google.com Published On :: Tue, 17 Dec 2019 15:00:00 +0000 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. Full Article Psychology of Design Strategy and Planning User Experience Web Design
ul How to Create a Full-Screen Welcome Mat Optin Form in WordPress By www.isitwp.com Published On :: Tue, 28 Apr 2020 07:27:00 +0000 Want to create a full-screen optin form in WordPress? Love it or hate it… using a welcome mat is one of the easiest ways to capture your users’ attention. Even big brands like Forbes use a welcome mat to promote their campaigns. In this article, we’ll show you how to properly create a welcome mat […] The post How to Create a Full-Screen Welcome Mat Optin Form in WordPress appeared first on IsItWP - Free WordPress Theme Detector. Full Article WordPress Tutorials create a welcome mat create a welcome mat in wordpress optinmonster welcome mat for users welcome mat in wordpress
ul Three Principles to Remember for Successful Recovery By feedproxy.google.com Published On :: Tue, 18 Feb 2014 00:00:00 EST When it comes to TBI and PTSD, everyone's recovery is different. But Adam shares three key principles that can be crucial for everyone. Full Article
ul 10 On-Page SEO Factors You Should Consider [2019] By dailyblogtips.com Published On :: Wed, 22 May 2019 09:27:56 +0000 When you want to succeed in the organic search engine results today, you have to focus on your website and learn what you should do to optimize it. There are many factors that can help you with that, form the technical, off-page, and on-page. All these factors and parts of a website require updating and […] Original post: 10 On-Page SEO Factors You Should Consider [2019] The post 10 On-Page SEO Factors You Should Consider [2019] appeared first on Daily Blog Tips. Full Article SEO
ul Create your own bulk actions By wpengineer.com Published On :: Tue, 25 Oct 2016 09:00:45 +0000 Including version 4.6 it was quite difficult to add custom bulk actions to the WordPress admin pages. In version 4.7 […] Full Article WordPress Tutorials backend Tutorials
ul Article: 25 Beautifully Dark-Schemed Landing Pages for Inspiration By feedproxy.google.com Published On :: Tue, 05 May 2020 14:58:36 +0000 There is something instantly remarkable about a website with a strong, dark color scheme. Full Article Articles Round-Ups Blue Color Dark Color Scheme Dark Mode
ul Could you get PTSD from your pandemic experience? The long-term mental health effects of coronavirus By feedproxy.google.com Published On :: Monday, April 20, 2020 - 10:10am Experiencing intense flashbacks, nightmares, irritability, anger, and fear? In the face of a traumatic event like the Covid-19 pandemic, it’s common to feel this way. Full Article
ul Warming Weather Could Reduce the Nutritional Value of Rice By feedproxy.google.com Published On :: Tue, 19 Jun 2018 00:47:21 +0000 UN Environment Press Release Hundreds of millions of people in Asia rely on rice not only as a staple but as their main source of nutrition. But new research suggests the rice they eat will become less nutritious due to … Continue reading → Full Article ET News Food Asia Climate Change nutrition rice
ul Judge Could Hold Up Trump Administration's Bid to Clear Flynn, Legal Experts say By feeds.drudge.com Published On :: Fri, 08 May 2020 20:51:52 -0400 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. Full Article news