Fuzzing vs. Property Testing

Fuzzing vs. Property Testing

One of the observations I made awhile back about property testing (especially imperative) code was that assertions in the code under test were extremely synergistic with property testing. You’re doing property testing when you’re also spending time describing the space of inputs that should be generated, to accelerate the test running. I’d like to describe two very practical (and sometimes quite magical) techniques you can employ with property testing to improve code and test quality.

Source: www.tedinski.com

Aaron Peskin got his illegally merged $1.5M “monster” home

Aaron Peskin got his illegally merged $1.5M “monster” home

Aaron Peskin’s wife, Nancy Shanahan, had already paid the city to receive advance notice of any permit applications for 224 Filbert, and was notified when Trafton applied for her permits. After discovering (likely through Shanahan or Peskin) that Trafton was filing for her permits, the THD wrote a letter to support Planning’s recommendation to deny the merger. According to this document, Trafton performed renovations and illegally merged the duplex before filing with the city to formally acknowledge the property as a single family home.

Source: medium.com

Bottle: A BitcoinSV Browser

Bottle: A BitcoinSV Browser

Bottle is a browser that lets you surf the Bitcoin network for these things, and brings them all together through Bitcoin native URI schemes such as B:// or C:// (or any other protocols we add in the future). By moving away from HTTP and authoring everything in a Bitcoin native way (using Bitcoin transaction ids and content hashes) we can build a completely self-contained network of documents which can exist forever on the blockchain. Hello B://

Bottle supports B://, a URI scheme for public files, which uses Bitcoin transaction id as the URI.

Source: bottle.bitdb.network

China Warns World Leaders: Don’t Talk About the Hong Kong Protests

China Warns World Leaders: Don’t Talk About the Hong Kong Protests

Zhang’s warning comes after the Chinese foreign minister seemed to blame the “some Western forces” for the mass protests in Hong Kong

Beijing issued a severe warning to any world leaders who planned to talk about Hong Kong’s massive protests during this week’s G20 summit: Don’t do it. Zhang was responding to a question about whether Chinese President Xi Jinping would be discussing the Hong Kong protests with U.S. President Donald Trump during their meeting in Osaka, Japan, later this week. Zhang’s warning comes after the Chinese foreign minister seemed to blame the “some Western forces” for the mass protests in Hong Kong
“They have made trouble in Hong Kong, stirred up opposition and tried to sabotage Hong Kong’s stability and damage the implementation of one country, two systems,” Wang Yi said at a press conference last week.

Source: news.vice.com

Implement with Types, Not Your Brain

Implement with Types, Not Your Brain

Two things:

Using this information, our goal is to write the correct expression in place of the type hole. Our hole has a function type, so let’s introduce a lambda:

We need to produce an again. For example, if you want a function that creates a list with length $n$, where all elements are the same value, then that thing should have type , not .

Source: reasonablypolymorphic.com

Tutorial: Building a Facebook bot with Vapor 3 and Swift, part I

Tutorial: Building a Facebook bot with Vapor 3 and Swift, part I

You have to keep in mind that a Facebook bot is just an app which is handling messages for you. Inside add a function that will be responsible for receiving the messages from the Messenger platform:

Let’s go through this code step by step:

Don’t forget to add all missing routes inside the :

As you may have noticed, the function is not checking the source of the input, so anyone who knows the webhook address can send malicious requests and pretend to be a Messenger bot. Then create the class that conforms to the and the protocol:

Sending the message to the Facebook platform is pretty straightforward:

To use the don’t forget to register it as a inside the app configuration file :

Now let’s create two additional tests to fully test the second webhook endpoint.

Source: mikemikina.com

Getting people to buy imperfect produce

Getting people to buy imperfect produce

Four years later, Simon cofounded Imperfect Produce, a subscription-based home-delivery service for discounted “ugly” fruits and vegetables that are perfectly good on the inside, but otherwise rejected from the food supply chain for their looks. Simon partnered with his friend Ben Chesler, who shared his passion for social good, and the two homed in on farms as the starting point of their food recovery and delivery service. “The reason we created Imperfect Produce as a direct-to-consumer business is because grocery stores didn’t want to partner with us,” said Simon.

Source: edition.cnn.com

Snagging Parking Spaces with Mask R-CNN and Python

Snagging Parking Spaces with Mask R-CNN and Python

Step 1: Detecting Parking Spaces in an Image
Here’s what our camera view looks like:
We need be able to scan that image and get back a list of areas that are valid to park in, like this:
Valid parking locations on this city street.The lazy approach would be hardcoding the locations of each parking space into the program by hand instead of trying to detect the parking spaces automatically. Another idea is to build an object detection model that looks for the parking space hash marks drawn on the road, like this:
Notice the tiny yellow marks — those are where the boundaries of each parking space are drawn on the road.But this approach is also painful. If we run the pre-trained model on our camera image, this is what is detected out of the box:

Our image with the default COCO objects identified — cars, people, traffic lights and a tree.

Source: medium.com

Two-thirds of American employees regret their college degrees

Two-thirds of American employees regret their college degrees

College debt was followed by chosen area of study (12%) as a top regret for employees, though this varied greatly by major. At least one sector of employment bucked the trend: Teachers and other professionals in education, which isn’t typically a high-paying profession, were the second-least likely, after engineering grads, to have any regrets tied to their major, with 37% saying they had no regrets. About 29% of millennials regret their student loans, while only 26% of Gen Xers and just 13% of baby boomers regret the loads they took on for college.

Source: www.cbsnews.com

YouTube should give users a way of knowing if a video has been altered

YouTube should give users a way of knowing if a video has been altered

I never knew you could do that on YouTube, and none of the videos had any sort of “edited” markings, like the ones you see on edited Facebook posts and Reddit comments. What I said then, I will say again:

YouTube: Make it possible for users on your platform to know if a YouTube video has been edited after it’s been posted. YouTube limits this editing to videos with under 100K views, but the restriction does not apply to those in the YouTube Partner Program, a major loophole.

Source: spencerdailey.com