Elegant Error Handling with the JavaScript “Either” Monad

Elegant Error Handling with the JavaScript “Either” Monad

If we end up with an error, it would also be nice to have a way to print that too:

And once we have all of those in place, we can put them together to create our function that will process each row. Perhaps we could use something like this to handle our errors…

Getting back to our problem, we want to define a happy path and a sad path for our code. Let’s create a method that will take a function and run it if we’re on the happy path, but ignore it if we’re on the sad path:

Then we could do something like this:

We’re getting closer to something useful, but we’re not quite there yet.

Source: jrsinclair.com

Google to Reimplement Curl in Libcrurl

Google to Reimplement Curl in Libcrurl

The Chromium bug states that they will create a library of their own (named libcrurl) that will offer (parts of) the libcurl API and be implemented using Cronet. As the primary author and developer of the libcurl API and the libcurl code, I assume that Cronet works quite differently than libcurl so there’s going to be quite a lot of wrestling of data and code flow to make this API work on that code. If the engineers are magically good, they offer a library that can do things better than libcurl can, using the same API so application authors can just pick the library they find work the best.

Source: daniel.haxx.se

Investigating the impact removing password masking has on consumer trust (2014)

Investigating the impact removing password masking has on consumer trust (2014)

Results prove that unmasked passwords were unexpected by participants and when forced upon them a mixed result is gained. However when participants are offered the choice of masked or unmasked passwords within the interface, participants identified the concept as a feature not an error. Participants identified the usability benefits of clear text passwords and the security benefits of masked passwords.

Source: passwordmasking.com

Debian riscv64 port status

Debian riscv64 port status

Given than the arch-dependent packages are about half of the Debian[‘s main, unstable] archive and that (in simple terms) arch-independent packages can be used by all ports (provided that the software that they rely on is present, e.g. a programming language interpreter), this means that around 90% of packages of the whole archive has been available for this architecture from early on. And, of course, all other contributors of Debian help by keeping good tools and building rules that work across architectures, patching the upstream software for needs of several architectures at the same time (endianness, width of basic types), many upstream projects are generic enough that they don’t need specific porting, etc. Currently there are more than 500 packages from the Rust ecosystem in the archive (which is about 4%), and they cannot be built and used until Rust has support for the architecture.

Source: people.debian.org

Remove Password Masking

Remove Password Masking

Results prove that unmasked passwords were unexpected by participants and when forced upon them a mixed result is gained. However when participants are offered the choice of masked or unmasked passwords within the interface, participants identified the concept as a feature not an error. Participants identified the usability benefits of clear text passwords and the security benefits of masked passwords.

Source: passwordmasking.com

Scientists shocked by Arctic permafrost thawing 70 years sooner than predicted

Scientists shocked by Arctic permafrost thawing 70 years sooner than predicted

Permafrost at outposts in the Canadian Arctic is thawing 70 years earlier than predicted, an expedition has discovered, in the latest sign that the global climate crisis is accelerating even faster than scientists had feared. “

Scientists are concerned about the stability of permafrost because of the risk that rapid thawing could release vast quantities of heat-trapping gases, unleashing a feedback loop that would in turn fuel even faster temperature rises. Even if current commitments to cut emissions under the 2015 Paris agreement are implemented, the world is still far from averting the risk that these kinds of feedback loops will trigger runaway warming, according to models used by the UN-backed Intergovernmental Panel on Climate Change.

Source: www.theguardian.com

Scale AI is hiring engineers to accelerate the development of AI

Scale AI is hiring engineers to accelerate the development of AI

Our mission is to make that happen faster, across every industry. One of the biggest bottlenecks for real world AI applications is access to labeled data. Our first product is the most developer-friendly data labeling API for AI applications: self-driving cars, mapping, AR/VR, robotics, drones, retail, and more.

Source: scale.ai

Hacking websites via third-party JavaScript libraries

Hacking websites via third-party JavaScript libraries

However, using third-party libraries as part of a website or application leaves the company significantly more vulnerable to a potential attack. I present three examples of vulnerabilities I have discovered in popular JavaScript libraries affecting thousands of large a free library for displaying table data as HTML, available to everyone. For instance, in case the profile name has a value  , own profile JavaScript code will be uploaded and this way, it will be embedded on any Uber website page that utilizes Tealium iQ.

Source: dmsec.io

Galton Board

Galton Board

The bean machine, also known as the Galton Board or quincunx, is a device invented by Sir Francis Galton[1]:63f to demonstrate the central limit theorem, in particular that the normal distribution is approximate to the binomial distribution. A bean machine for the log-normal distribution (common in many natural processes, particularly biological ones), which uses isoceles triangles of varying widths to ‘multiply’ the distance the bead travels instead of fixed sizes steps which would ‘sum’, was constructed by Jacobus Kapteyn while studying & popularizing the statistics of the log-normal in order to help visualize it & demonstrate its plausibility[6]. Denoting the number of rows of pegs in a Galton Board by n, the number of paths to the kth bin on the bottom is given by the binomial coefficient .

Source: en.wikipedia.org