title
stringlengths
1
200
text
stringlengths
10
100k
url
stringlengths
32
885
authors
stringlengths
2
392
timestamp
stringlengths
19
32
tags
stringlengths
6
263
Basic Concepts of DevOps Core and Pipeline Building
Basic Concepts of DevOps Core and Pipeline Building Development and operational tasks for better SDLC management Photo by air focus on Unsplash DevOps is an application development practice that merges development tasks and operational tasks for a better software development lifecycle management, in the meanwhile also handling the frequent updates, bugs, and features of the application. DevOps involves continuous development tasks like planning the code, coding, building the code, and testing it along with continuous operational tasks like releasing the code, deploying it, operating it, and monitoring it, followed by continuous integration of both the task sets. DevOps core concepts: The continuous build is a continuous and automated build process. It runs the added or modified codes. Continuous Integration is the automated build and execution of at least unit tests to prove integration of new code with existing code but preferably integration tests (end to end). It is a practice of automatically building and unit testing an entire application frequently, ideally, on every source code check-ins, dozens of times a day, if necessary. Continuous delivery is the additional practice of deploying every change to a production-like environment and performing automated integration and acceptance testing after it passes its build and unit tests.CD can involve deploying on a local server creating an environment with the assistance of docker containers or virtual machine sets to carry out production environment similar to integration tests. Testing usually would result in a deployed production similar environment. This lets us in validating the deployment process and checking and monitoring the functionality of the environment real world alike. Continuous deployment extends the concept of continuous delivery to a level where any modification undertakes full automation testing and then is deployed to the production environment. Build Pipelines in practice: Flow Chart of Building pipeline A build pipeline is a sequential combination of tools and operations that performs assigned tasks ranging from the source code to a deployed system. Common tools used for the source code repository include Git, Perforce, or Subversion. These tools provide services to store and handle configuration management for all the applications used hapcode, deploy scripts, infrastructure definitions. Its job is to handle the code, protect it, manage its versioning, and handle simultaneous commits on the code. Build system Then next is a build system, which monitors the repository, and triggers the code builds whenever a change is requested. Jenkins, Bamboo, and TeamCity are popular build systems. Circle CI and Travis CI are some of the available online services. Any build scripts you assemble and can run make will also do the job. But some functionalities like webhooks, off plugins, and other features that’ll help you optimize the process will be missed in those codes. Its job’s to build code and run unit tests. And, of course, to provide feedback and visibility into the build process. Depending on what language you’re using, you may have a variety of compilation and build orchestration tools. If it’s a compiled language, you may need a c or go compiler. Interpreted languages may not have a compilation step and skip straight to packaging. You might have a build definition file like a make file or a docker file, or perhaps you use something like Maven, Ant, or Gradle as a command-line build orchestration tool. This allows developers to build on their local machine and to keep as much code in source control and out of the build console configuration as possible. You probably have a unit test harness, which may be a separate tool, but it’s invoked inside the build system. Unit tests or basic tests designed to verify a piece of code is doing the job it was intended to do. Unit tests don’t have dependencies on external systems. At most, they mock or stub out anything outside their codebase. They’re your first line of defense in figuring out whether your build is going to work as expected. Packaging The next step is packaging what you’ve built into an artifact. Part of this is usually language-dependent. For example, Java code is usually put into JAR files, and then those are combined up into a WAR or EAR file. But you may have a higher level packaging structure you prefer, like an RPM package or docker image. Once you’ve packaged the code, it goes into your artifact repository. Some people just use a storage device or Amazon S3 for their artifacts. Others use tools built for the job like Nexus or Artifactory. Or there’s technology-specific repose, like docker registries or Puppet Forges. In the old days, a building engineer thought they were done here. But not so. You have some bits on a drive somewhere, not a service delivering value to customers, so your job isn’t done. You need a deployment tool to bring up a working instance for your service. You’ll use the same tool to deploy both your test and production environments. Your deployment code is code, and like any other code, you want to find any issues in the build and test cycle, not when you’re deploying to production. So you run your deployment tool on a test environment, sometimes also called a CI environment, to get your service up and running. Next, you perform integration testing, which is designed to exercise a real running service in a real environment and ensure that it’s working correctly. Then you have an end to end acceptance testing stage. This may include a manual testing component. Manual tests can be mostly dispensed with once you reach CD process maturity but will almost always predominate initially. Then you use the same artifact that passed testing and the same deployment tool to deploy it to the production environment. Ideally, you use some of the same acceptance tests to test it there as well. There are many more types of tools you can layer onto your pipeline, test coverage measurement tools, linters, security testing tools, performance testing tools, but these are the basics. And nailing the basics is the key to getting to continuous integration and then if you want continuous deployment. Reach me on my LinkedIn Recommended Articles 2. Python Data Structures Data-types and Objects
https://medium.com/towards-artificial-intelligence/basic-concepts-of-devops-core-and-pipeline-building-eb3a4645c61b
['Amit Chauhan']
2020-11-19 19:02:28.004000+00:00
['Machine Learning', 'Python', 'Analytics', 'Data Visualization', 'Programming']
Product Update: A new Social Media Automation Platform
So, at the end of the day, we have professionals that spend too much time planning and executing their strategies and yet struggle to make the most out of Social. This set the tone for the developments we’re hereby presenting. Over the last couple months, and with the feedback gathered over the last quarters from customers and partners, we’ve been renewing our Facebook Automation Platform. Here’s a list of the main updates of this feature: New Automation Rule Manager: you can now create multiple concurrent rules for automation. Rules are automation settings that trigger a post on a Facebook Page. Facebook Page Selector: tailored for multi-brand companies, allows for selection of multiple Facebook Pages to post to. Useful for cross post strategies. Ignoring old content : avoids content older than a set date to be automatically posted on a Facebook Page. : avoids content older than a set date to be automatically posted on a Facebook Page. Ignore content posted on the page: verifies if the post was already posted by GetSocial or by anyone on the page (manually). Will only post content fresher than a week and if that content hasn’t been posted in the facebook page in the last 12 hours Location/Path Selector: allows automating content based on its URL structure, with options to Include and Exclude paths. A user may exclude content from the /travel section to be automated, for example. Includes content from the Fashion & Travel sections, while excluding URLs from the past season (2016) Meta Tag Selector: allows automating content based on its URL meta tags (name & property types). A user may automate only content from author “John Doe”, for example. Includes all content with Joao Romao as author or any content with meta-keywords tech, ai or machine learning Custom Automation Triggers: On v1, automation would be triggered based on GetSocial’s virality score. On v2, a user may select custom triggers in a time and engagement dimensions. For example, a user may automate any content that had more than 350 shares on Facebook during the last week. Automates content with more visits than 70% of other articles and at least 1k shares on Facebook New Delivery Settings: On v1, a user could select for a fully automated solution (post x articles during a specific time window) or use a scheduling tool (post articles at specific dates & times). On v2, a user may use one of three settings:
https://medium.com/getsocial-io/product-update-a-new-social-media-automation-platform-ccbd35191dce
['João Romão']
2017-12-20 18:54:13.215000+00:00
['Facebookpages', 'Facebook', 'Marketing Automation', 'Social Media Marketing', 'Social Media']
The #1 Way To Be Attractive In Life & Social Media
Attracting new customers is the biggest challenge entrepreneurs face. Today, dating has also become a little more complex thanks to the creation of the internet and all of its Tinder glory. It seems to be that were having a similar problem on both ends and it appears to have a shared root cause. The truth of what attracts people has been proven to be based more on BEHAVIOR rather than “good looks”. We don’t know how to be attractive online. Sure, you probably look good when people walk into your brick and mortar location but what if you don’t have a brick and mortar like most of us? Are we doomed to the horrors of being unattractive? NO. We fight hard and use our resources to create the best damn experience online. The next question that poses is how do we exactly be “attractive” to new potentials. I relate a lot of what I’m going to tell you back to dating. I have a small amount of experience in this area. A year ago, I helped a few guys find their confidence to meet women and it was a great journey, I learned a lot. Funny enough, the concepts I was teaching relate full circle to attracting new customers. So here we go, a few pointers on how to be attractive: Neediness Neediness is probably the most universally unattractive traits known to the world. What is neediness? It’s mindset plagued by scarcity and self-doubt. We have probably met a fair share of people who we would consider needy. Constantly asking for validation kills any interest that was developed. To me, women experience this often from men. And customers can smell needy brands from a mile away. Some social profiles scream “PLEASE PLEASE PLEASE BUY THIS”. Desperation admits to having no value and keeps trying anyway. Profiles with posts of product after product, offer after offer, reek of neediness. In order to not appear needy, you must come into the practice of giving more than you’re asking to receive. When I takeover my clients’ social profiles, they usually fall into the same pattern: Inconsistent posting (week or month long gaps in posting) Dull Caption Pictures of products people have seen 1000 times None of these carry the giving spirit that we as humans love. People in general appreciate someone who gives without the expectation of receiving. This is hard to find in a world where everyone has a self-interest at play. How does this look on social media? Posts with captions that add value to the photo Informative posts that don’t end with “SHOP NOW” Posts that contain light humor The best way to not appear needy(even if you are) is to give, give, give your value and not push to receive. Now, when I say that I don’t mean not sell. Selling is important. We all sell for a living. I’m saying not to burst through the door, whip the guns out, and perform a hostile takeover. There is art in subtly. A good rule of thumb is to deliver 4–5 value offering posts and then post a great offer to drive traffic back to your site. Consider your online presence as a Starbucks. They don’t force people to buy coffee as soon as you walk through the door. They offer value first. Free WiFi (love), comfortable seating, a place to charge your device. Starbucks knows they have great coffee and doesn’t feel the need to push that on people who have already chosen to walk in. You want coffee. The urge to buy it comes from within, not the fancy 15% off poster. Although, 15% off is appealing, if you didn’t enjoy the coffee, how appealing could it be? Share this someone who struggles with being digitally beautiful! This article was originally posted here
https://medium.com/steller-media-marketing/how-to-be-attractive-in-life-social-media-75dec50d0f7e
['Darrell Tyler']
2017-08-09 20:28:09.194000+00:00
['Social Media Marketing', 'Facebook', 'Content Marketing', 'Ecommerce', 'Instagram']
Usual production patterns applied to Integration tests
To be honest, the patterns that will be shown in this story are not something new, but people tend to see testing as part of the code where copy-pasting is allowed. They see testing as something that is forced upon. Usual patterns that can be applied in the test code, that would otherwise be applied in the production code, are not applied. In this story, I will present the patterns I use every day to build a test infrastructure that in the end make writing tests easier and faster. Typical application In this story, I will try to summarize all the concepts I use when writing integration tests. To be clear, for me integration tests are the ones that are written before UAT (user acceptance tests). Those that are testing single method/API call using the real database (external system). I will also write all the alternatives I came across during my programming career and will elaborate on why those alternatives should be avoided. All the examples will be shown in pseudo-code (influenced with Java) but can be applied in other programming languages. All of the good practices mentioned in this story I have put in a small project available on Github (written in Java). Basics: Build, operate, check pattern Let’s start with the basics. Anatomy of an integration test Every integration test should have the following phases: Build — phase in which you prepare the test scenario. In this phase you normally put some data in the database; Operate — phase in which you execute the method on the object/API you are testing; Check — phase in which you check whether the executed method has made an expected impact on the system. In this phase, you normally query the database and check the result of the method execution. How to get to the data in and out of the database? Anatomy of a test If we look at the picture in which the anatomy of a test is shown (picture above), you will see that we are accessing the database in each phase. In the build phase, we somehow need to insert the data. In the operate phase we need to call method to test the system. In the check phase, we need to access the data to check the impact of the method on the system. Operate phase is simple, you just call the method and the operate phase is finished. But for the build and operate phase we can think out more than one way to insert (BUILD) and select (CHECK) the data from the database. Throughout my career I have seen the following used in BUILD/CHECK phase to access the database: Use exposed methods of the API of the system we are testing; Use pure SQL; Use a Repository layer. Use exposed methods of the API of the system we are testing Exposed methods of the system used for build and check phases I have seen people using methods of the system they are testing to prepare (BUILD ) and get (CHECK) the data from the database. This is for me an anti-pattern. You can not use the exposed method of the system you are testing to prepare/fetch the data for your tests. Why? Because if you call three methods in your test case, one to build test data, one to call the test method, and one to fetch the data from the database, which one of those three are you testing? The one that is preparing the data, or the later ones? //use exposed API of the system you are testing to prepare a //scenario //BUILD CreateUserRequest request = buildCreateUserRequest(); UserDto user = client.createUser(request); UpdateUserRequest updateRequest = createUpdateUserRequest(user); //OPERATE client.updateUser(updateRequest); //CHECK UserDto userDto = client.getUser(request.getId()): assertUser(userDto, updateRequest); Let’s say you have changed something in your application. Your test fails, why does it fail? Is it because the build method call, operate method call, or check method call? If someone reports a bug for the updateUser method call (snippet above), and you look at the test above. Why did the test pass in the first place? Maybe updateUser method is working as expected, but the createUser method has prepared the data wrong? Maybe when you fetched the data using getUser method you mapped something wrong and your test passed? Too many question and no answers. Imagine that you have a more complicated build phase. For example, you need to create four objects in your system before you can test the target method. If you use the mentioned way, you will call five API methods. Four to build the test scenario, and one that you are actually testing. We change the code, and your tests fail. Which API method call caused this test to fail? Which API method call should we change? For me, this is an anti-pattern. Don’t use API of the system you are testing to prepare/check the data for your integration tests. You should write your integration tests in isolation to other parts of the system. Test one method at the time. Treat your test code as production code. A method should do one thing and one thing only. A test method should test one thing and one thing only. Use pure SQL Custom db layer used for build and check phases This approach is not so common but I have seen it. It is better than the previous one and one hundred percent correct but I don’t like it and I don’t use it. Why? Because I have migrated a lot of tests written this way and it is a torment. Why? When dealing with your custom test DB layer you must implement all that is implemented in your ORM or framework (Spring) you are using. This is a part of the code you are using only in your tests. That said, common patterns that exist in production code, doesn’t apply here for most of the people. This custom DB layer is full of copy-pasting. Also, you are not dealing with objects, you are dealing with ResultSet (Java). It is harder to operate with this layer because most commonly you do not invest enough time to create a mapper that will map from ResultSet (Java) to an object. And why would you? You are investing your time to build something that you already have and you use in your application. Yes, I am talking about the repository layer in your production code. Why reinvent the wheel, because it is already invented? And if it is good enough for your production code then it is good enough for your test code. Use a Repository layer Use a repository layer for build and check phases I must admit, this is a similar approach to the first shown. In this approach, we are using a layer of the system under test to insert (BUILD) and fetch (CHECK) data from the database, but only the first layer. In the first approach, Use exposed methods of the API of the system we are testing, we are using the whole application. Our application usually consists of at least two or three layers (repository, service …). Each layer adds complexity to your application. With each added layer, the possibility of a bug increases. When using a repository you are using the first layer in which you are directly accessing the database. The possibility of a bug is much smaller than when using other alternatives. //use repository layer of the system you are testing to prepare //a scenario //BUILD Organization organization = createDefault(); organizationRepository.save(organization); User user = createDefaultUserAccount(organization); userAccountRepository.save(organisation); //OPERATE client.updateUserAccount(updateRequest); //CHECK user = userAccountRepository.getUserAccount(user.getId()); assertUser(updateRequest, user); Me personally, I use the repository layer for build/check phase. And I use only the basic queries as provided by the ORM (Hibernate) or/and framework (Spring Data) to reduce the possibility of a bug: findById(): used in a check phase; findAll(): used in a check phase; save(): used in a build phase; deleteAll(): used in post execution phase, cleaning phase. Those methods are provided by the framework by themselves and are used in thousands of applications in production. There are no bugs in their implementation. A bug can be only found in your mapping definition and those can be noticed very early in your development process. Even if you don’t use ORM, you most probably use some kind of framework to access the database. Use their capabilities to access the database. But only the most primitive ones. The possibility to encounter a bug on that layer will be less than by using Use exposed methods of the API of the system we are testing approach. Further considerations — default entities In the story so far, we have covered how to insert and fetch the data in our tests. One thing that we did not talk about is how to construct default entities for our tests. //use repository layer of the system you are testing to prepare //a scenario //BUILD Organization organization = createDefault(); organizationRepository.save(organization); User user = createDefaultUserAccount(organization); userAccountRepository.save(organisation); //OPERATE client.updateUserAccount(updateRequest); //CHECK user = userAccountRepository.getUserAccount(user.getId()); assertUser(updateRequest, user); In the pseudo-code provided we have created a method createDefaultUserAccount in which we have defined how our default User will look like. This is a simple method that accepts zero parameters and returns a default user. There are a few problems associated with the factory-method approach: the more test cases we add the more fields we will want to manipulate using factory method. At some point in time, we will want to make all fields on the entity settable through method parameters. This means we are going to have n parameters in our factory method. This is not a problem if our entity has four fields or less. But if we expose five or more fields through the method parameters then we have the problem. Our method will look something like createDefaultUser(String username, String name, String lastName, Date dateOfBirth, String sex, Organization organization). Six parameters in the method signature indicate no sign. in most of the tests we want a default entity with all fields set. We want to change only the fields in our default entity that are dynamic like relationships to other entities (Organization for example). This means we will need to expose a method like createDefaultUser(Organization organization). as the system evolves, you will need to create more entities in which you will focus only on one or two fields. For example, you have exposed an API that is dealing with the date in your User entity. You are only interested in the date domain so you create method createDefaultUser(Date date, Organization organization); as the system evolves you will have more this specific purpose factory methods, for example, createDefaultUser(String name, Organization organization). These factory methods will pile up. This will add unnecessary complexity to your test infrastructure. the last problem is: where to put all of these factory methods for the User. You can put it in the class where you first needed it. For example in a UserRepositoryTest class. Or maybe you can put in the UserServiceTest class, or maybe in the UserTestFactory class. We have raised a lot of questions that are all solved with the Builder pattern. Builder pattern for default entities Builder pattern The builder pattern is a solution for every problem that was raised in the section before. You have a class that knows how to build another class. And you know where to find it. In the UserBuilder class, we have all the default values for the User set. If we want, we can change those values using fluent interface methods. In the UserBuilder we have all the default values set for the fields that are not dynamic. We can easily call withOrganization() to add dynamic values that can not be hard-coded. UserBuilder class is located in the same package as the User it is building. All developers working on the solution will know where to find the class that is responsible for building the default entity. There is one drawback to this solution. If you have 30 entities, you will need to write 30 builders. Well, that is not a problem. Almost every IDE for Java has a plugin that will generate a builder from a target class for you. You will need to map your entity class and this will take time. But your builder class will be done in a matter of seconds. You will only need to set some default values in your builder class. Why stop there? Don’t stop there Builder pattern can be used to “capture” default state for all requests that are exchanged in your system. For example, if you have an internal object CreateUserRequest that is used in your application, why don’t you create a CreateUserRequestBuilder for that class also? It is generated in seconds and all the developers will know which class to call to get a default representation. Why stop there? Builder pattern can also be used to capture default states for all external request (DTOs) that is accepted by your system. Also, I have used the builder pattern to create a class BadRequestAsserter. Using this class you can create a test for bad requests to your API in a minute. Check part of the test extracted to Asserter classes We have missed one part that each test has. Check part of the test. We use the Repository layer to fetch the data from the database. But how do we check that the data is in the expected state? Well, most of the people will write the assert part for one test and then copy-paste it to other tests. If the developer is consistent enough, it will extract it to methods. Why don’t we extract the check part of the code in special EntityAsserter classes which are located in the asserter package in the package where Entity class is defined. Other developers can reuse your asserter in their tests if needed. If you need to add one more field to check, you know where to add that check. Capture the assertions in one class so everyone who is contributing to the code base can find and reuse it. For the most asserter classes, I create a static method assertEntity(RequestObject request, Entity entity). The method accepts two objects: the first one that defines how the object should look like and second, the object that should be checked. If I need more flexibility, I will create an asserter class as a Builder. Asserter will have assertEntity(RequestObject request, Entity entity) method and fluent interface methods. Entity fields that can not be checked against the RequestObject will be set using fluent interface methods. We will combine value set by the fluent interface methods with the RequestObject to check that the Entity is in the correct state. Is there more? Explore Yes, there is more. For example, I put more complicated build phases in a custom class whose only logic is to build some test scenario prerequisites. I favor composition over inheritance. Just treat your test code as production code. Follow the same rules as for the production code. At first, it will take more time to build test infrastructure, but it will make you a worthwhile at the end.
https://medium.com/swlh/usual-production-patterns-applied-to-integration-tests-50a941f0b04a
['Igor Vlahek']
2019-12-10 10:42:14.306000+00:00
['Test Automation', 'Software Development', 'Testing', 'Java', 'Programming']
Trump is America’s Fidel Castro
By Guillermo Vidal | Sept. 8, 2020 | Government, Politics, Presidential Election, Leadership, Tyranny, Future of USA Photo by Vince Fleming via Unsplash It is ironic to listen to Republicans imply that the Democrats are socialists who will turn the USA into Cuba. That is already happening under the rule of Donald Trump. I was eight years old in Cuba when Fidel Castro came to power on January 1, 1959. From 1959 until the end of 1961 — the year my parents sent my brothers and I on our own to the USA to start our lives over in an orphanage in Pueblo, Colorado — I witnessed a peaceful and orderly Cuba become a cauldron of chaos. Over the decades, I was able to build a new life in the USA, a country I believed to be one of hope and promise. But, today, that has become an illusion. When Americans elected someone promising to “drain the swamp” nearly four years ago, I thought a little shaking up would do our country some good. But I never expected the USA to go the way of Cuba. Confusing years We are living in unprecedented times where the Executive Branch of our government has and continues to take action in plain violation of the rule of law and our respected traditions. Trump has broken with our allies and cozies up to the world’s most ruthless despots. He leaves our country vulnerable by ignoring well documented evidence that nefarious foreign powers interfered with our elections and are planning to do so again. His treatment of immigrants violates every tenet of human decency. At first, we all turned our heads hoping things would normalize, but that hasn’t happened. Meanwhile, children continue to be torn from their parents and locked in cages. Cronies who were convicted of federal crimes are pardoned. A discriminating media is tagged “enemy of the people” because they reveal his many fabrications. Day after day, we bear witness to another lie, see a new sign of corruption or hear about another pillar of our government collapsing. His latest effort is to disrupt the coming election results by disassembling the Post Office. Similarities between Castro and Trump There is an uncanny resemblance between Castro and Trump. The fact they are from opposing political ideologies demonstrates the inconsequential place political dogma plays in a tyrant’s handbook. Make no mistake, this is not a battle of ideas, this is a man trying to destroy a country so he can rule over the wreckage. Remember, it was only a few years ago that Trump was a pro-choice Democrat. Evidently, he saw an easier road to power by becoming a Republican. What makes these two men comparable is their desire for the unequivocal control over all spheres of political, social, economic, and cultural life. Similarly, they also demand godlike worship from the people they govern. Castro did not dismantle Cuba overnight. It happened with a daily trickle of cancelled programs and trampled norms. First there was a “cleansing” of the opposition. Reporters, musicians, students, actors, comedians, shop owners, neighborhood advocates, athletes, professors, business, political leaders and many others were arrested, found guilty of treason and imprisoned. Some were executed, others mysteriously vanished forever. He then set out to control the media. All programming was replaced by State coordinated channels showing an endless cycle of stories praising the greatness of “El Jefe”. They erected monuments in honor of the Revolution. Signs bearing slogans idolizing Fidel and his minions sprouted on every wall and available billboard. Under Castro, the Cuban constitution and the rule of law became works of fiction. Law enforcement agencies and the military became internal forces geared to dominate citizens. The new government demolished private industry and confiscated businesses. Government institutions were undone by Castro loyalists who were appointed to dismantle them. Members of the Catholic Church who had voiced opposition were thrown out of the country. Their private schools taken over by the revolutionary government. The religious who remained looked the other way as Fidel tried to take the place of God in our island nation. Cuba’s social fabric unraveled. Neighbors, parents, sisters, brothers, sons and daughters fiercely turned against one another over their political differences. Do any of these things seem familiar to what is happening in the United States today? Like Castro did in Cuba, Trump has taken a wrecking ball to the institutions that make our nation great. He has even managed to turn venerable Republican legislators into a junta of sycophants and opportunists who enable the President’s lies and misdirection. Maybe you still believe nothing like this could ever happen here. Well, think again. You probably never thought you would see the day when secret police would terrorize American citizens lawfully protesting on our streets, but here we are. Did the thought ever enter your mind that our federal government would have no coherent plan to deal with the COVID-19 pandemic that has killed over 180,000 and wrecked our economy? Or that our president would ignore proof that our sworn enemy was offering bounties to kill American troops? Photo by Library of Congress via Unsplash What Happens Next? If Trump is reelected, he will feel validated, vindicated, empowered and emboldened. What will he do then to consolidate his power? Trump has previously threatened to jail his political opponents. Will he carry this out? He has removed from their post those who spoke up to reveal blatant corruption by his administration. How many more bootlickers like Barr, Pompeo and Miller will he place to continue ransacking our institutions? Day in and out, Trump shows his disregard for our country’s checks and balances. Will he try to disband congress next? In an unprecedented move by a president, Trump has tried to disrupt the dealings of businesses, like Amazon and Microsoft. With the latter, he demand ed payment for his actions. Could a federal government takeover be far behind? Will he continue to use his position to further enrich himself, family members and his cronies? Are you still doubtful? Then think back on the times you were sure Trump could do nothing more to make things worse, then he did. Trump has proven he has no bottom. Nothing is sacred, there are no boundaries. As it was with Castro, these kinds of tyrants always find ways to lower the bar. If Trump is reelected, he will continue to transform the “land of the free” into an ineffective, broken down country just like Cuba. And with every billboard, flag and monument that goes up to extol the virtues of “the Donald”, us old timers will remember back when America was a country the entire world admired. And we will lament her descent into another doleful wasteland of a crumbling empire. Until now, I kept thinking a time would return for us to come together and rebuild our nation. But we may not get that chance, for I hear a real threat to our democracy when Trump suggests delaying the presidential election or that he will ignore the election results. We have but one chance to stop this damage; vote him and his enablers out of office on November 3rd. We will undoubtedly face unprecedented efforts to suppress our vote and the results of the election, but we must not get discouraged, for the survival of our nation depends on us casting our vote. This is the only action we control.
https://gvvidal33.medium.com/trump-is-americas-fidel-castro-a1c1333bff05
['Guillermo Vidal']
2020-09-08 12:01:01.855000+00:00
['Trump', 'Future', 'Government', 'Politics', 'Elections']
The Definitive Guide To InfluxDB In 2019 — devconnected
Essentially, it means that for every point that you are able to store, you have a timestamp associated with it. The great difference between relational databases and time series databases But.. couldn’t we use a relational database and simply have a column named ‘time’? Oracle for example includes a TIMESTAMP data type that we could use for that purpose. You could, but that would be inefficient. a — Why do we need time series databases? Three words : fast ingestion rate. Time series databases systems are built around the predicate that they need to ingest data in a fast and efficient way. Indeed, relational databases do have a fast ingestion rate for most of them, from 20k to 100k rows per second. However, the ingestion is not constant over time. Relational databases have one key aspect that make them slow when data tend to grow : indexes. When you add new entries to your relational database, and if your table contains indexes, your database management system will repeatedly re-index your data for it to be accessed in a fast and efficient way. As a consequence, the performance of your DBMS tend to decrease over time. The load is also increasing over time, resulting in having difficulties to read your data. Time series database are optimized for a fast ingestion rate. It means that such index systems are optimized to index data that are aggregated over time : as a consequence, the ingestion rate does not decrease over time and stays quite stable, around 50k to 100k lines per second on a single node. This graph is inspired by : https://blog.timescale.com/timescaledb-vs-6a696248104e/ b — Specific concepts about time series databases On top of the fast ingestion rate, time series databases introduce concepts that are very specific to those technologies. One of them is data retention. In a traditional relational database, data are stored permanently until your decide to drop them yourself. Given the use-cases of time series databases, you may want not to keep your data for too long : either because it is too expensive to do so, or because you are not that interested in old data. Systems like InfluxDB can take care of dropping data after a certain time, with a concept called retention policy (explained in details in part two). You can also decide to run continuous queries on live data in order to perform certain operations. You could find equivalent operations in a relational database, for example ‘jobs’ in SQL that can run on a given schedule. c — A Whole Different Ecosystem Time series databases are very different when it comes to the ecosystem that orbits around them. In general, relational databases are surrounded by applications : web applications, softwares that connect to it to retrieve information or add new entries. Often, a database is associated with one system. Clients connect to a website, that contacts a database in order to retrieve information. TSDB are built for client plurality : you do not have a simple server accessing the database, but a bunch of different sensors (for example) inserting their data at the same time. As a consequence, tools were designed in order to have efficient ways to produce data or to consume it. Data consumption Data consumption is often done via monitoring tools such as Grafana or Chronograf. Those solutions have built-in solutions to visualize data and even make custom alerts with it. The data consumers for TSDB Those tools are often used to create live dashboards that may be graphs, bar charts, gauges or live world maps. Data Production Data production is done by agents that are responsible for targeting special elements in your infrastructure and extract metrics from them. Such agents are called “ monitoring agents”. You can easily configure them to query your tools on a given time span. Examples are Telegraf (which is an official monitoring agent), CollectD or StatsD The data producers for TSDB Now that you have a better understanding of what time series databases are and how they differ from relational databases, it is time to dive into the specific concepts of InfluxDB. Module 2 — InfluxDB Concepts Explained In this section, we are going to explain the key concepts behind InfluxDB and the key query associated with it. InfluxDB embeds its own query language and I think that this point deserves a small explanation. a — InfluxDB Query Language Before starting, it is important for you to know which version of InfluxDB you are currently using. As of April 2019, InfluxDB comes in two versions : v1.7+ and v2.0. v2.0 is currently in alpha version and puts the Flux language as a centric element of the platform. v1.7 is equipped with InfluxQL language (and Flux if you activate it). Right now, I do recommend to keep on using InfluxQL as Flux is not completely established in the platform. InfluxQL is a query language that is very similar to SQL and that allows any user to query its data and filter it. Here’s an example of an InfluxQL query : In the following sections, we are going to explore InfluxDB key concepts, provided with the associated IQL (short for InfluxQL) queries. b — InfluxDB Key Concepts Explained In this section, we will go through the list of essential terms to know to deal with InfluxDB in 2019. Database A database is a fairly simple concept to understand on its own because you are used to use this term with relational databases. In a SQL environment, a database would host a collection of tables, and even schemas and would represent one instance on its own. In InfluxDB, a database host a collection of measurements. However, a single InfluxDB instance can host multiple databases. This is where it differs from traditional database systems. This logic is detailed in the graph below : The most common ways to interact with databases are either creating a database or by navigating into a database in order to see collections (you have to be “in a database” in order to query collections, otherwise it won’t work). Most used Influx database queries Measurement As shown in the graph above, a database stores multiple measurements. You could think of a measurement as a SQL table. It stores data, and even meta data, over time. Data that are meant to coexist together should be stored in the same measurement. Measurement example Measurement IFQL example In a SQL world, data are stored in columns, but in InfluxDB we have two other terms : tags & fields. Tags & Fields Warning! This is a very important chapter as it explains the subtle difference between tags & fields. When I first started with InfluxDB, I had a hard time grasping exactly why are tags & fields different. For me, they represented ‘columns’ where you could store exactly the same data. When defining a new ‘column’ in InfluxDB, you have the choice to either declare it as a tag or as a value and it makes a very big difference. In fact, the biggest difference between the two is that tags are indexed and values are not. Tags can be seen as metadata defining our data in the measurement. They are hints giving additional information about data, but not data itself. Fields, on the other side, is literally data. In our past example, the temperature ‘column’ would be a field. Back to our cpu_metrics example, let’s say that we wanted to add a column named ‘location’ as its name states, defines where the sensor is. Should we add it as a tag or a field?
https://medium.com/schkn/the-definitive-guide-to-influxdb-in-2019-devconnected-23f5661002c8
['Antoine Solnichkin']
2019-04-18 18:01:10.282000+00:00
['Programming', 'Database', 'DevOps', 'Software Development', 'Software Engineering']
Tracy Chapman was Ahead of Her Time
Somewhat accidentally I came across Tracy Chapman’s album released in the 1990’s. Her song lyrics were nothing but genius. In her song ‘Talkin about a revolution’, Tracey reflects on the rising tide of socialism and the impacts of capitalism. ‘While they’re standing in the welfare lines Crying at the doorsteps of those armies of salvation Wasting time in the unemployment lines Sitting around waiting for a promotion’ It is clear that society has created a three-tier system. Low income class, middle and higher earners. It is portrayed to us that it is apparently easy to climb the ladder; to move from one to the other, but in reality this is often not the case. It is faulty, easy for some, difficult for others. Many factors play their role in being able to climb socio-economic paradigms (of which I won’t delve into here). It is, therefore, almost inevitable that those at the bottom, who pay the highest price in terms of day to day burden, who find it difficult to climb this ladder will eventually at least think about revolting back against the system and ‘get their share’. The rise of socialist labour with Corbyn at the helm is an example. He argued that it is those at the bottom who, in their greatest numbers, have a substantial portion of the decision power in a free democracy. They are, therefore, the prime targets for those higher up the social-economic ladder who do not want a ‘revolution’ or ‘change’ in current circumstances. They will be told how and when they should use their ‘voting’ power. It seems as if those at the bottom of the social-economic paradigm are the easiest to persuade with a few add campaigns and empty promises. There could be many reasons for this such as higher education, data, lack of information and so on (not elaborated here). This is what I think Tracey was reflecting on with ‘talkin bout revolution’, ‘standing in the welfare lines’ and ‘crying at the doors of those armies of salvation’. Those at the bottom are indeed thinking of revolting, but they cannot fully commit as they are tied down by the elite to do as and what they say. It is cyclical. The tide of revolution happens, followed by the quash from the elite of society with endless campaigns to make those leading the revolution (often at the bottom) to blame each other of their faults and, alas, give their voting power back to the top. The cyclical nature of our society. Although the politically aware song failed to replicate the success of its predecessor ‘Fast car’, I extend my thanks to Tracey. It has opened my minds eye a bit more.
https://medium.com/change-your-mind/tracey-chapman-was-ahead-of-her-time-a8e94054bdaa
['Sharaf Sheik-Ali']
2020-04-08 12:03:49.645000+00:00
['Awareness', 'Music', 'Politics', 'Revolution', 'Mindfulness']
The Scourge of ‘Anonymous Sources’
Photo illustration: Tony Ganzer What used to be an exception in journalism seems to have become a norm: affording anonymity to sources offering some unattainable insight, intentionally-hidden fact, or, it seems, juicy gossip. If-and-when to grant anonymity is one of the more controversial discussions in the journalism realm, and it should be. A written, broadcast, Tweeted, Instagrammed, or whatever, record of a story or claim needs to carry credibility and provability, lest one be attacked for ‘fake news.’ At the same time, the eternal news cycle has led some journalists to seek big stories on tighter deadlines, and has led some sources to fear being pilloried by trolls and legitimate critics alike. But this prevalence of ‘anonymous sources’ is attempting to address a symptom, and not the disease. The serious and the silly-ish In September 2018, The New York Times just about broke the internet when it published an unsigned opinion piece from someone who claimed to “work for the president but like-minded colleagues and I have vowed to thwart parts of his agenda and his worst inclinations.” The piece “I Am Part of the Resistance Inside the Trump Administration” instantly drew condemnation and support that crossed ideological and journalistic lines. The Times knew publishing an anonymous opinion piece of this magnitude demanded an explanation, and would attract criticism. The editor’s note at the top of the unsigned NYT opinion piece. Confidentiality and trust are the coins of the journalistic realm, and to inform the public, journalists need to be able to inform themselves. But we are no longer in a time when a journalist’s word is enough — and I say this as a journalist. We need to be held accountable to ourselves, our audience, and our communities. We need to be able to show our work, knowing that legitimate and less-legitimate critique will be coming. ‘Fake news’ is not the norm, but that phrase has been used to smear legitimate and important journalism because the covenant of trust — or the appearance of it — between journalists and the public has been damaged. This, I think, should lead to tighter controls on the use of anonymity, not looser. Yet we see unnamed sources cropping up in all kinds of stories because they’re not authorized to speak, or they don’t want to get blackballed politically or professionally. Part of a report on Sen. Amy Klobuchar’s treatment of staff. A recent story about Senator and presidential hopeful Amy Klobuchar’s treatment of staff is a good example of a story when anonymity probably isn’t necessary. Former staffers, fearing retribution, offered stories about Klobuchar’s alleged behavior toward staff, and those claims were held up next to internal e-mails as corroboration. Whether the stories are true is beside the point with anonymity like this. The public should know who is making a claim, what motivation they may have, and how credible they are. The Society of Professional Journalists gives two pointed thoughts: Identify sources whenever feasible. The public is entitled to as much information as possible on sources’ reliability. Always question sources’ motives before promising anonymity. Clarify conditions attached to any promise made in exchange for information. Keep promises. News outlets have robust editorial hierarchies in place — and the NYT is the best-of-the-best, don’t get me wrong — but those hierarchies don’t mean much to huge segments of the population that are anti-‘media’ or generally journalist-averse. And putting faceless or nameless persons in news stories is perpetuating the internet-age culture of no accountability in the anonymous criticisms lobbed from near and far. Back in my day… I’d like to say this issue is new, and we’re in uncharted territory, but we all know that’s not the case. In 2013, the Washington Post’s Paul Farhi put it well: According to sources who didn’t insist on anonymity, more and more sources are speaking to the news media on the condition of anonymity for the oddest of reasons. And this is not just a U.S. phenomenon, as Canadian readers are having a similar conversation right now. Journalists at one time — and still today — spoke with ‘anonymous sources’ on background, and used that insight to guide them to people who would go on the record, or documents that show the record. But those anonymous persons are now the ones in the stories. PR strategies and message control are much more sophisticated now, and social media can destroy a person’s reputation in a matter of days, hours, or minutes. (See Jon Ronson’s book or Ted Talk on shame, if you dare.) So it’s sometimes harder to get people on the record, especially with sensitive stories or topics. But journalists need not cheapen this tool of granting anonymity. We can’t build or regain trust from a public that is ever more skeptical of the press, by failing to find flesh-and-blood people to go on the record. Some stories demand anonymity to protect someone’s life, to protect a national security secret, and the like. And the sources demand that protection. But those cases are somewhat rare, and granting anonymity should be, too. Tony Ganzer is an award-winning journalist and broadcaster. He’s reported from Oslo, to Cairo, to Cleveland, with bylines for NPR, Deutsche Welle, Swissinfo, and more. Find more about him here. He’s also a Baking Journalist.
https://medium.com/discourse/the-scourge-of-anonymous-sources-dffe33217c03
['Tony Ganzer']
2019-02-25 22:18:39.673000+00:00
['Journalism', 'Politics', 'News', 'Ethics', 'Media']
How Sex Went from “Ouch” to “Oh, My God! Don’t Stop!”
I had more sexual hang-ups in my teens, twenties and thirties than a good Catholic prostitute has Hail Mary’s. When it came to anything related to sex, I was intentionally witless, being from a good W.A.S.P family. Of course, being as uncomfortable as I was with everything to do with sex — even talking about it — I was a perfect mark to believe anything I read since I had no other context to check the veracity of claims and assertions about what was and was not normal. One of the things I believed was that ALL healthy, young women had on-call personal lubricant dispensers inside their vaginas. Bedroom scenes in movies showed me how it automagically squirted its stuff as soon as a girl’s panties hit the floor. Romance novels told me, in technicolor purple prose, about the ease with which cocks slide into pussies. And all that stuff we hear about how easy some women rape, well, that left me thinking that if a woody is in the room, women will be wet. Unfortunately, I seem to have been born with a defective axel-greaser. But I never had the courage to say anything. So for my entire fourteen-year marriage, in addition to having a virtually non-existent libido, I also got zero pleasure from intercourse since it always kind of hurt. There was just too damn much friction, so the sooner it ended the better. Well, imagine my delight and surprise when the first man I slept with after my marriage ended, rolled on a lubricated condom. His cock slid in and out with no resistance! And it felt…well, to be honest, it kind of felt like he wasn’t even there. He was quite a bit shorter and less girthy than my ex-husband and without the friction there didn’t seem to be much to get me either hot or bothered. But I was delighted to discover the magic of a lubricated condom. The next man I dated had a cock that was the shape of a soup can. Since I’d never watched porn, and Hollywood movies don’t typically provide up-close and personal cock shots, I was taken aback by how short and wide this man’s member was. He, too, used a lubricated condom when we had sex. The challenging thing with this man was that he couldn’t maintain a hard-on so he’d thrust once, twice, maybe five times then pull out and masturbate for a few strokes, then re-enter me. Of course, each time he did this, he’d be rubbing off the lubricant so after three or four re-energizers, his condom-covered cock was dry. Pushing a dry can of soup into one’s vagina is no fun at all. At least, it wasn’t for me. To my credit, after suffering through this three or four times, I did let him know it was uncomfortable, so he’d add some spit. That helped a little, but never enough to make sex actually enjoyable. My third post-marriage sexual partner was the cross-dresser who realized after our one night together that he preferred the company of men in bed. That’s when I gave up dating for a while. But in those nine months, I’d learned that since condoms came lubricated, my ‘vadryna’ must be at least somewhat normal. That was a win. But even better was the fact that the next man I dated took the time to make sure I was ready for intercourse before he dove in. He would — and still does when needed— spend thirty minutes getting me primed, so I’m desperate to have him inside me. I’d never experienced this kind of attention before. And even though it gets me hot and bothered in a good way, I still don’t get wet. He was happy to bring home lubricants to help, since after several months together I got an IUD and were able to play sans condom, therefore, without the free lube. It took several brands to find the one that works the best for us—it’s silicone-based — but sweet Mary Mother of Joseph, who knew that the right lube would make such a pleasure difference? Well, apparently the researchers who studied Women’s Perceptions about Lubricant Use and Vaginal Wetness During Sexual Activities and had their research published in the Journal of Sexual Medicine in 2012, knew. We were recently reminded when we ran out of our favorite Sliquid and had to resort to the old drugstore brands we had collecting dust in my bedside table. What remained of the ones our sons had (allegedly) stolen, drip-by-drip. Using subpar lube led to subpar sexual experiences. It made me feel bad for all the folks who don’t know that there’s a world of quality personal lubricants available that cannot be found on drugstore shelves. When I recently used some of the basic brands, I found they either got sticky or seemed to evaporate before Mr. Barker and I had finished needing their services. “Owe! Wait. Can’t you feel that your cock is catching? Stop!” I’d have to thrust my hips forward far enough to pop him out since he’s typically behind me, roll over to face him and apply more lube to his quickly shrinking manhood. This was not great for either of our egos or libidos. In a pinch, we found that the very best substitute for high-quality lube is coconut oil. It stays slippery with just about the perfect friction for as long as we need it. The only trouble is that it leaves oily stains on the sheets. The point of all this is that I spent twenty years fearing sex, first because it was sinful, then because it was painful, when I could have reduced that time to six years — since married sex is not a sin — if only I’d had a Fairy Sex Godmother to tell me that it was okay to need help getting wet and that it was worth spending a half day’s pay on a 500ml container of high-quality lube since it would give me months of breathless pleasure. Now you know. You’re welcome.
https://medium.com/love-and-stuff/how-sex-went-from-ouch-to-oh-my-god-dont-stop-c165b2966bcb
['Danika Bloom']
2020-04-29 17:45:21.490000+00:00
['Health', 'Sexuality', 'Self', 'Advice', 'Life Lessons']
When I Look Up At The Sky
When I Look Up At The Sky Prompted poetry: What do you feel when you look at the sky? Photo by Jaime Dantas on Unsplash When I look up at the sky I smile, I begin to think, why the sky has different shades, Somewhere it is grey and other places blue. When I look up at the sky, I remember the peaceful sunrise, Peeping out of the trees and the hills. When I look up at the sky, I feel like a bird flapping its wings, Flying towards the sky. When I look up at the sky, I wish for clouds that rain, Hoping for a colourful rainbow afterwards. When I look up at the sky, I am excited about the sunset, The promising red hot ball, In gratitude for the wonderful day.
https://medium.com/the-brain-is-a-noodle/when-i-look-up-at-the-sky-e529c6f0a178
['Dr. Preeti Singh']
2020-12-27 15:12:24.542000+00:00
['Nature', 'Feelings Become Words', 'Gratitude', 'Creativity', 'Poetry']
Zara vs. Gap: An Instagram Analysis
A few weeks ago, news emerged about Inditex launching its brand Pull & Bear in the US. The move underlined its ambitions of becoming the world’s first fully global apparel company. In the US it has already overtaken the local favorite Gap Inc. by revenue years ago to much fanfare. What are we doing? Beyond financials, Graphext helps analysts to look behind the curtain. What are unexpected insights and surprising patterns of the social media strategies of Inditex’s flagship Zara and Gap? In this issue we analyzed the Instagram posts of both retailers since January 2017 (a dataset of almost 2000 social media posts and images). Our algorithm creates a network representation of the data, each node capturing an image that either Zara or Gap posted during that time period. Similar images are connected to each other. Images with many connections among each other form a colored cluster. To extract image content and other metadata, Google Cloud Vision is automatically queried for each post to generate more variables and help further our analysis. What are the main clusters? The biggest cluster shows us pictures with Jeans and Denim Clothing and consists of more than 250 posts. The smallest one, with around 60 images, holds Images with Text. Graphext generated this categorization automatically for the analyst, using the available metadata and allowing for more detailed manual exploration. The clusters give us already a first interesting insight, but what really matters is to find out what differentiates the two brands. To analyze that, we could simply filter on the Brand variable and compare the statistical distribution with that of the full dataset. What content is generated more often by each brand? We can gather many insights by comparing the two charts. Zara, for example, has many posts about Cocktail & Day Dresses, Child Models, Toddlers and Babies, Outerwear, Monochrome Photography and Images with Text. Gap’s posts, on the other side, are more often about the Jeans and Denim Clothing category (their staple), Shirts & T-Shirts, Undergarment, Faces and Portrait Pictures and Pictures with unique Hairstyles. What content works better for each brand? Besides figuring out what brand creates what type of content, Graphext can also extract insights about what content works better for each of them. To compare each content independently in the same project we first filter by Brand and then drill down within our project. By filtering the top 5% liked posts, we encounter the single most important cluster for the selection of Zara’s posts: Child Models, Toddlers and Babies. If we do the same for Gap, we see that the two main clusters are Jeans and Denim Clothing and Undergarment which are making up more than half of the most successful posts. We can say that this is Gap’s best working content. As you can see, there are some very clear differences between the Instagram strategies of Zara and Gap. Of course, there are more sources to consider if you want to properly analyze the reputation and success of both brands. For example, the news coverage of both brands, their Twitter fanbases or Instagram Hashtags. There will be many more analysis around these topics here on our blog. If you like what you read and are interested in knowing more about our tool, don’t hesitate to request a demo right here.
https://medium.com/graphext/zara-vs-gap-an-instagram-analysis-4a0c746a5b6
['Graphext Team']
2019-04-02 11:38:56.017000+00:00
['Instagram', 'Fashion', 'Data Analysis', 'Marketing', 'Data Visualization']
Schools using facial recognition system sparks privacy concerns in China
Some startling action last week provoked contentious discussion regarding “privacy disclosure” and “data security” among public on China’s main social network platforms. These issues, which were not sensitive in Chinese society, finally got the attention it deserves after a face-swapping app sparked privacy concerns. The debate just went viral with many arguing that people who upload photos surrender intellectual property rights to their face and allow ZAO to use their image for marketing. Meanwhile, a university in Nanjing installed an AI face recognition system not only for campus management but also class monitoring then lots of netizens worried that students’ right of privacy would be violated. It is worth noting that a Swedish secondary school was sentenced to 200,000 SEK(20,664 USD) for the same situation recently. AI monitor continuously raises disputes from elementary school to university Recently, China Pharmaceutical University piloted the AI face recognition system in some classrooms. Apart from automatically recognizing and recording students’ attendance, it also enables monitoring of the students’ in-class performance, which the school believes can urge students to study but public have opposite views. Xu Jianzhen, the person in charge, said: “introducing this system is a request expressed by the school’s Academic Affairs Offices targeted at improving the students’ attendance rate and enhancing the classroom discipline.” However, some students believe that this system will violate their personal privacy while Xu Jianzhen responded: “The school has already consulted the public security department beforehand and the legal department claimed that there is no such thing as “infringement of privacy” since the classroom is a public place.” In fact, it is not something new to install a camera in the classroom. But analyzing students’ class performance through AI face recognition technology has just emerged since recent years. Last month, an affiliated elementary school of Shanghai University of Traditional Chinese Medicine brought AI face recognition into the campus to monitor the behaviors of both teachers and students through the three sets of “AI+School” systems including the “intelligent classroom evaluation system”, “the intelligent environment analysis and control system” and “the intelligent teacher training system”. According to the introduction, the “intelligent classroom evaluation system” can automatically detect the behaviors and emotions of teachers and students based upon sample data collected from the real classroom, then provide evaluation and suggestions in light of performance analyzed by the intelligent algorithm. It is also reported that whether the students put a smile on their face, whether they say hello to the teachers and whether they pick up the garbage voluntarily will all be captured by the AI system and reverted to the control center. A mom of a second-grade elementary school student in Shanghai believes that AI monitoring should not be introduced into primary school unless all of the parents reach a consensus, “If anyone says no, the school should not implement it.” However, some people who support think the system can help prevent dangers, reduce campus bullying and improve the teaching quality. Last year, The Daily Telegraph reported that Hangzhou №11 Middle School in Zhejiang Province launched the first smart classroom behavior management system in China jointly developed by Hikvision. According to the previous report, netizens in favor of this action believe that the real-time information of students through big data is conducive to improving teaching effect, while those against it mainly insist that AI class monitoring is an abuse of technology, infringing on the privacy rights of students as an “anti-education” act. “The use of AI technology must have boundaries” Regarding whether the student’s privacy is violated, Zhu Wei, deputy director of the Center for Communication Law of China University of Political Science and Law, believes that the right of privacy is a civil right and whether the system can be adopted entails both students and parents’ consent because middle school students are generally minors. Otherwise, the school has no right to monitor them in any way. Meanwhile, “the information collected cannot be used for commercial purposes or published. ” Said him. So, does the school have any concerns about privacy issues when introducing this system? According to media report, Zhang Guanchao, vice president of Hangzhou No.11 Middle School, once said: “it has already been taken into consideration at the beginning of product design so the actual information collected by the AI system is simply codes instead of facial image. Plus, in order to avoid the information disclosure, the system is built on a local server rather than the cloud computing.” In terms of the privacy boundary of campus management, Wu Shenkuo, an associate professor at the Law School of Beijing Normal University, said that using facial recognition system to analyze students’ behaviors and effectively manage the classroom is permitted by law. However, “it will be illegal if there is an information leakage or no timely stop-loss measures are taken after the information leakage.” In response to the concerns raised by AI monitor entering the campus, on September 5th, Lei Chaozi, director of the Science and Technology Department of the Ministry of Education, said in an interview: “we will reinforce the restriction and management of this kind of products and we hope the school could discreetly adopt such technical software at the current stage.” “Intelligent system kills the creativity of both teachers and students” Even if the use of AI classroom monitor has certain legitimacy, the ethical concerns in this industry are still ongoing and more prominent among Chinese scholars. “It is unnecessary to introduce such a system into campus since the teachers themselves will pay much attention to the performance of each student,” said Zhang Hongbao, a teacher of the Mental Health Education and Counseling Center of the Central University for Nationalities. He also believes that for those who easily get distracted, when they are detected by the system of certain misbehavior, students may form negative psychological hints. In addition, educators may be less encouraged to teach students with personalized plan and thereby hindering students to reach their full potentials. Zhang Ping, a professor at Peking University Law School, said: “every student may make mistakes but this does not mean that they will go astray. If the school utilizes technology to unify the students, individuals’ differences and creativity will be killed. Furthermore, Cao Qingjiu, director of the Children Wards of Peking University’s Sixth Hospital, believes that it is very important to protect the self-awareness of adolescent students. “They need respect and trust from others. Installing such a system may trigger students’ antipathy against it to the extreme.” The educational scenario is becoming the new foothold of AI technology Although the controversy is still going on, it cannot be ignored that AI empowerment has become increasingly common in almost every industry during the past few years. Under such a trend, the educational scenario is undoubtedly a blue ocean for AI companies. According to the “2019 China Intelligent Education Industry Market Development and Trend Research Report”, the scale of China’s intelligent education market continuously expand from 2010 to 2018 with a growth rate above 10% and the market scale has exceeded 500 billion yuan(70 billion USD) in 2018. Ushering in such a burgeoning stage, many AI solution providers and education companies have joined the battlefield to compete for market shares such as TAL’s “Magic Mirror System” mentioned in our previous article. No company can afford to limit its business layout in the “AI+ Education” field at the entry-level with simply attendance checking through facial recognition gate. More solution providers hope to leverage AI to reconstruct the whole process of education that the classroom of course is a place where they can make a big difference. We will be seeing this happen.
https://edtechchina.medium.com/schools-using-facial-recognition-system-sparks-privacy-concerns-in-china-d4f706e5cfd0
['Getchina Insights']
2019-09-09 11:33:02.118000+00:00
['AI', 'Schools', 'Edtech', 'Education', 'China']
Creating a map of house sales
In this tutorial, I will guide you step by step to create a map displaying houses sales using Bokeh, with a colour mapping indicating sale price. I wanted the viewer to be able to distinguish at a glance which neighbourhoods are most expensive to live in . This is also a useful visualisation for price prediction modelling purposes to get a sense of how important location is and whether new features relating to location may be useful to engineer. We will be using a dataset with sale prices for the King County area, which can be found on Kaggle but the principles can be applied to a dataset of your choice. This is the end result: First things first, let us ensure our dataset is fit for purposes. Note that Bokeh requires Mercator coordinates to plot data points on the map. Our dataset had latitude and longitude coordinates so a function was required to transform these. Assuming all data cleaning steps (e.g. missing values) have been completed, this is how the data should look. df.head() Pandas DataFrame with columns zipcode, mercator_x, mercator_y and price Time to plot! I will break the code down and explain what each element does. Let us begin by importing the necessary tools from Bokeh. from bokeh.io import output_notebook, show from bokeh.plotting import figure, ColumnDataSource from bokeh.tile_providers import get_provider, CARTODBPOSITRON from bokeh.palettes import Turbo256 from bokeh.transform import linear_cmap from bokeh.layouts import row, column from bokeh.models import ColorBar, NumeralTickFormatter One of Bokeh’s stand out features is the built-in collection of map tiles. Whilst you could use google maps, this requires obtaining an API key. We will use Carto DB. Let’s select this tile with the get_provider() function. chosentile = get_provider(CARTODBPOSITRON) Next we will choose a palette for colour mapping. We want to ensure our visualisation is effective in distinguishing where the most expensive houses are located. Bokeh has a fantastic choice of pre-defined palettes and depending on the granularity you wish you can select how many colours from the palette to use. There are also a few extended palettes with a larger spectrum, which is what we’ve gone for here. palette = Turbo256 We will also define the source to be used, which is where the data is coming from. The most common type is ColumnDataSource which takes in a data parameter. Once the ColumnDataSource has been created, it can be passed into the source parameter of plotting methods which lets us pass a column’s name as a stand in for the data values. source = ColumnDataSource(data=df) Next, let’s define our colour mapper. This is a linear colour map, applied to the price field. We set the low and high parameters to be the minimum and maximum price respectively. color_mapper = linear_cmap(field_name = ‘price’, palette = palette, low = df[‘price’].min(),high = df[‘price’].max()) A neat feature is including additional information when a user hovers over a data point. This is defined using tooltips. We have chosen to display the price of the house and zipcode. The @ symbol means that the value is from the source. tooltips = [(“Price”,”@price”), (“Zipcode”,”@zipcode”)] Now we are ready to create the actual figure. Let us call it p . We will give it a title and set the x and y axis types to be Mercator so that when rendering it displays latitude and longitude ticks, which we are more accustomed to. We will also define our axes labels, for completeness. p = figure(title = ‘King County House Sales 2014–2015’, x_axis_type=”mercator”, y_axis_type=”mercator”, x_axis_label = ‘Longitude’, y_axis_label = ‘Latitude’, tooltips = tooltips) Let us add our chosen map title using the add_tile() function. p.add_tile(chosentile) Each house will be plotted as a circle by specifying x and y as the Mercator coordinates x_merc and y_merc . The colour of the circle will be determined by the linear colour map we defined above. p.circle(x = ‘mercator_x’, y = ‘mercator_y’, color = color_mapper, source=source) Let us add a colour bar, which will serve as a visual aid in understanding our colour mapping. By default, Bokeh uses scientific notation where appropriate but in this instance, I thought it looked better to use plain notation for the price. The default causes the price label to overlap with the colour bar so we need to add a value to label_standoff . Unfortunately there is no straightforward way to add a title to the colour bar, so for now, we make do without. color_bar = ColorBar(color_mapper=color_mapper[‘transform’], formatter = NumeralTickFormatter(format=”0,0"), label_standoff = 13, width=8, location=(0,0)) Let us specify that the colour bar should be on the right of the figure by creating a layout. p.add_layout(color_bar, ‘right’) Finally we would like the map to be displayed in notebook and shown. output_notebook() show(p) Ta da! Map of King County with markers for house sales From this visualisation, it is immediately obvious that the most expensive homes are located on the waterfront and in particular in Medina, Clyde Hill and Mercer Island. There is also a notable difference between North and South, with the Northern part demanding higher prices. We can also zoom in to get insights on a particular neighbourhood. Clyde Hill Neighbourhood House Sales And there you have it! I hope you found this short tutorial useful. Should you wish to tweak things further, I would recommend diving into Bokeh’s documentation. It is easy to follow, even if you’re a beginner like me! I would also love any feedback you may have. To see the my project including data exploration and predictive modelling using linear regression, here is the GitHub link.
https://towardsdatascience.com/creating-a-map-of-house-sales-42ba1f2c4e7e
['Nadine Amersi-Belton']
2020-05-06 23:33:15.202000+00:00
['Bokeh', 'Data Science', 'Tutorial', 'Data Visualization', 'Python']
How to Raise Kids Who Love Food, Their Bodies, and Themselves
Photo Courtesy of Amy Schauster There are so many confusing messages about how to eat out there. Every week there is a new “healthy eating plan” that is “cleaner” than the rest. They sound like well-being breakthroughs, but many of them contradict each other. They are diets in disguise. Many of these wellness-focused messages are dangerous to our children’s health and well-being because they take them away from their natural, intuitive sense about balanced eating. In the United States, the diet industry is a $60 billion industry. Research shows that 96% of people who go on diets to lose weight will gain the weight back (often plus more), bringing them back to the next book, program, or product — and often a lifetime of struggle with their bodies. The U.S. also contains approximately 6 to 11 million people with eating disorders. Eating disorders are the number one killer of all psychiatric illnesses. All of that said, in this culture, how do we raise children to have a healthy relationship with food and their bodies? How do we prevent the suffering of eating disorders of all types: restrictive anorexia nervosa, binge eating disorder, and all the variants in between? Here’s how: 1) Stop the Diet Talk Ideally, be a parent that is not on a diet. If you are, try to keep it out of your child’s consciousness as much as you can. (Know that once they get older, this is nearly impossible.) Restrictive eating is not sustainable, and it creates a cycle of struggle with food and body that can last a lifetime. If you want your child to develop healthy, balanced eating habits, you have to practice this moderate eating yourself. If you are a chaotic eater who goes back and forth between restricting and overeating compulsively, your children will be imitating this as they learn how to regulate their own eating and appetites. I have supported people who struggle with disordered eating for the past twenty-five years. Most of the adult clients I work with who struggle with compulsive eating either imitated dieting parents or were put on a diet at a young age by a well-meaning caregiver or medical professional. The greatest risk factor for struggling with one’s weight as an adult is dieting in childhood and adolescence. Please don’t encourage it or demonstrate to your child how to do it. 2) Stop the Fat-Shaming Please consider letting go of the myth that we need to live up to the body shape which is the cultural favorite. I’m going to specifically talk here about women, though I am aware that our biases towards thinness and perfection affect persons of all genders. For ease of writing, I will use a binary distinction “woman/female/she,” knowing well that gender is not a binary construct for many people. Many non-western cultures today view female fatness as a sign of health, wealth, and vitality. Before the 1800s, so did western culture. In colonial days in the United States, the voluptuous figure was generally seen as more desirable. In the 1900s, the U.S. significantly shifted its aesthetic on women’s bodies, and the media began to show thin, lithe figures as the ideal. At the same time, the growing diet and fitness industries sold us the belief that we could do something to our bodies to live up to that thinner ideal. Feminist scholars highlight the rise of thinness and diet culture alongside the rise of women’s liberation. Many believed it to be a backlash and response to women’s emerging power and equality, feared by society’s patriarchal structure. All genders are affected by a thin ideal and weight stigma. Even casual negative talk about fatness or larger bodies is damaging to children of all sizes. Those in larger bodies will feel they are less than ideal, and those in smaller bodies will feel they need to work harder so they don’t become a part of that stigmatized group. We all suffer when we don’t accept our differences and instead place a moral judgment on body size. Those kids in larger bodies who are particularly stigmatized suffer the most. Don’t tolerate negative fat talk from your kids, and please examine your own biases. We are all a part of this cultural soup and may not even be aware of our own stigmatizing language and beliefs. Even well-meaning comments about weight and body shape to a child may go destructively deep and erode self-esteem. I hear about this childhood shame in the stories of so many of my clients who struggle with food for decades. Negative body thoughts (who doesn’t have them sometimes?) can go awry and become the foundation for developing a terrible relationship with eating and fitness. For some, this may ultimately lead to an eating disorder. I invite you to rethink and reframe how you talk to your kids about their bodies. 3) Stay in Your Own Lane Ellyn Satter, MSW, RDN, introduced me to the gold standard “rule” about feeding children well. It’s about the division of responsibility. Your responsibility as parents and caregivers is to provide a variety of nutritious food. Your child’s responsibility is to eat it. When we try to move into our kids’ lanes and “get” them to eat certain things (or not eat certain things) by coercion, reward, cooking special separate meals, or doing somersaults in the kitchen, then we are crossing a boundary. We are not helping our children develop self-regulation skills. Children must learn about what feels good in their bodies from the inside out. This is a body-sensing and not a “thinking” function. When forces outside of children tell them what or how to eat, they may lose contact with that important inner regulatory experience that tells them when they are hungry or when enough is enough. This doesn’t mean we set kids free in a candy store without limitations. Some basic limits around sweets are fine, for example, as long as everyone in the house abides by them. “Here’s two dollars for the candy store,” or providing a small bag to be filled are two reasonable limits. However, cutting out sugar entirely is a recipe for a kid who binge-eats at their friends’ houses by middle school. I’ve seen it! (My daughters’ Halloween candy gets dusty, but some of their friends would still hunt for it months later.) Don’t impose food rules on your child. Ideally, don’t have them yourself. If so, your child may use food as a way to separate and individuate from you during the teen years. You will have plenty of other things to negotiate, like curfews. Ideally, food should not be a battleground and a place where a teen finds “control.” 4) Love Your Body, or at Least Accept It One of the best ways to accept our bodies as parents is to understand that so many forces affect our body size, shape, and health. There are reasons that we have the body shape that we do — reasons that have nothing to do with how we eat. Heredity, hormones, and lifelong physical-activity patterns have a profound effect on your body size and shape. Even epigenetics research points to your mother’s or grandmother’s eating habits while pregnant as affecting body weight. (Interestingly, starving moms produce infants who become larger-weight children and adults, which may be a protective adaptation.) Unfortunately, bad body talk is somehow acceptable in our society. If we look around, we hear it all over. It’s as if it’s entirely reasonable to bash our bodies at every turn. “This makes me look fat.” “Oh, she’s really let herself go …” “I probably shouldn’t eat this. I’m too fat already.” And, the seemingly complimentary, but just as vicious, “Oh, you look so good! Did you lose weight?” Somehow, our moral fabric gets attached to our body shape and size. These comments, while innocent at first glance, are sneakily demoralizing. In fact, some of my clients with eating disorders have comments like these going on in their heads so much all day that it’s hard for them to focus on much else. Others may be able to challenge those thoughts and function well in their lives, but they still feel a debilitating sense of shame and disgust around their bodies that percolates in the background. Yes, the beauty industry tries to make us feel bad about our appearance by airbrushing pores, photo-shopping thighs, and giving us a picture of human beings that is downright fake. After all, if we felt excellent about ourselves, we probably wouldn’t buy that face cream or lipstick or diet product. Teach your children to be media literate and know this about the diet and beauty industries. Remind them that most of those photos on social media are the hand-picked best, filtered to death. This is why they look so perfect and don’t often resemble real-life faces or bodies. And, above all else, work on accepting your own unique body. If you chastise your thighs in front of your daughter, you teach her that there might be something wrong with hers. After all, you are genetically linked, and there is a good chance her body will resemble yours at some point. If you demonstrate love and care and respect for your own body, then it’s more likely your children will develop this body acceptance themselves. 5) See Your Child as a Whole Person I love being a proud mama and telling the story of my daughter in sixth grade. One day a group of boys in her class was judging the girls on how they look. She and her twin sister were in the top three, but she did not like it. To my amazement and delight, she went on to tell me that she marched up to one of the boys and told him to stop this practice. She said, “It makes the girls at the bottom of the list feel bad, and it makes me feel bad, too.” She was trying to articulate that even being told that you look gorgeous can feel objectifying and wrong. I assured her that she is so much more than a pretty face, and she agreed. I admired her courage, knowing I certainly wouldn’t have been so brave in my middle-school days. See your children as whole people and encourage them to see others that way, too. How we look is just one facet of who we are, and it’s certainly not the most important one. Kids understand this implicitly until our selfie culture teaches them otherwise. Create a good foundation for appreciating the whole self. 6) Get Help for Problems Early, and Be Discerning About the Help Please get some support if any of the above tips are difficult for you. A nutrition therapist/registered dietitian or psychotherapist specializing in disordered eating is a good place to start if you want to examine your own body image, weight biases, and relationship to food. If you notice that your child is developing a complicated relationship with food and/or body, please express concern and love. Tell her that you would like her to get support and help to feel better about herself and enlist the help of professionals (psychotherapists, registered dietitians, and medical care providers) who have expertise in eating disorders, even if your child is not fully there yet. If your child is younger than age 12, the work may be with parents only. Keep in mind that just any registered dietitian, therapist, or doctor may not be able to address your child’s concerns holistically. I have heard many stories of professionals exacerbating the problem, particularly if they have not examined their own biases against larger bodies or if they don’t have training in eating disorders. Be discerning about adult helpers. Research suggests that early help for disordered eating creates better recovery outcomes, less relapse, and a greater likelihood that your child will grow up to have a healthy relationship with food, body, and self. This is encouraging. I see many adolescents struggle and overcome these battles. They then lead productive, healthy lives and are often advocates for a more size-inclusive culture. Creating a climate of love, support, and acceptance at home will go a long way. Unfortunately, we can’t do anything about the many cultural, traumatic, and other influences on our children, but we can be a positive nurturing force in the mix. A little love and acceptance go a long way. If you enjoyed this article, you might also enjoy my book Nourish: How to Heal Your Relationship with Food, Body, and Self.
https://heidi-74232.medium.com/how-to-raise-kids-who-love-food-their-bodies-and-themselves-89a4f24fac1
['Heidi Schauster', 'Ms', 'Rdn']
2020-10-18 15:37:15.616000+00:00
['Parenting', 'Body Image', 'Food', 'Health', 'Eating Disorders']
The Role of UX in Making Rockset the Shortest Path from Data to Applications
At Rockset, our singular focus is to be the shortest (and most efficient) path from data to applications for our users. We recognize and truly believe that our success lies in the success of our users. We constantly think about improving our workflows, coming up with new ones and iterating on them in ways that takes the user experience to a whole new level. Our aim is to ensure that our users are successful in achieving their goals of visualizing unstructured data, building applications, and/or creating APIs in the fastest and simplest ways possible. As a UX Designer, I spend all of my time thinking and obsessing about our users’ needs and their experience using Rockset. I am constantly looking for ways to engage with our users and learn more about them, their use cases, their expectations and most importantly, their feedback. I have the unique opportunity to advocate for the user, innovate workflows and consequently, shape the product. I design solutions keeping in mind how our users can be successful in achieving their goals. Based on the feedback we receive and our learnings over several interactions with our users, I wanted to redesign the experience in a way that decreases the initial learning curve with the product. We noticed that some of our users like to explore and learn about Rockset on their own and some prefer a little help to get them to their goal. In either case, the time our users took to create a collection, run a successful query and create an API key, to build an application or create a dashboard, was quite significant. This was due to a variety of factors. For example, because Rockset can be employed in a multiplicity of ways, some of our users struggled with where to begin, whilst some of our users had trouble in the second stage, i.e. from constructing their query on to building their applications or dashboards, whereas some users were just not there yet and were still trying to learn and explore the product. This was all really intriguing to me! Rockset Onboarding We are taking a two-pronged approach to solve for this. In order to help solve for the initial learning curve, we are rolling out a personalized ‘How to Rockset’ onboarding checklist in the product. This aims to guide the user, the first time they engage with the product, in an easy, intuitive and streamlined way, as well as empower them to quickly and successfully achieve their goal. It walks them through the essential steps to becoming a successful user of Rockset. Connecting to Dashboards and APIs In addition, we are currently working hard to better expose the capability of being able to connect to external dashboards like Redash, Tableau, etc. as well as developing APIs & SDKs from the query editor itself. These will now be available to our users as one-click tabs from the query editor, thereby further simplifying this workflow. Single Flow for Integration and Collection Creation We also spend time trying to actively reduce friction in our workflows wherever possible and make them better for our customers. For example, previously, in order to create a new integration during collection creation, users would be directed to a new window to do so, and have to return to restart the collection creation once the integration was successfully created. With the new design, it is a much more seamless experience where users are able to create these integrations in context and use them in the collection they are in the process of creating — all without having to navigate away from their current workflow of creating a collection. Rockset Catalog We recently also launched the Catalog which is the home for all integrations that are currently supported or on the roadmap. We saw a lot of users asking us not only about what we support currently but also, how they could request access to or share interest about integrations they would like Rockset to support in the future. Digging a little deeper, it was clear that this was missing in the product and thus, the Catalog was born! Users will be able to search for specific integrations or browse by category. Additionally, we communicate the status of a particular integration, such as Early Access or Beta if applicable. Customer Centricity at Rockset These are just a few examples of the many improvements we have made to our workflows in the product and we continue to innovate everyday as we learn from our customers. Our users are truly at the center of what we do here at Rockset! Any thoughts to share on how to improve the Rockset experience? Please reach out to me at aditidhar[at]rockset[dot]com
https://medium.com/rocksetcloud/the-role-of-ux-in-making-rockset-the-shortest-path-from-data-to-applications-55d2b345a11f
['Aditi Dhar']
2019-11-09 01:48:47.590000+00:00
['Analytics', 'UX', 'UI', 'Data', 'Design']
Interactive Convolutional Neural Network
Interactive Convolutional Neural Network How to customize your algorithm with Python Streamlit Image recognition is one of the main topics Deep Learning is focusing on. Indeed, the family of algorithms entitled to deal with image recognition belongs to the class of Neural Networks, typical multi-layers algorithms employed in deep learning tasks. More specifically, image recognition employs Convolutional Neural Networks (CNNs), which I’ve been explaining in my previous article on Computer Vision. In this article, I want to build a web app using Streamlit (if you are new to Streamlit, you can check an introduction here) which allows the user to customize a CNN built with Tensorflow and Keras. I will basically reproduce the example of my previous article, but now there will be the possibility to interact with the CNN at every step, so that the whole procedure will be ‘controlled’ by the user. First thing first, let’s import our necessary packages and download our data. For this purpose, I’ll be using the Cifar10 dataset, containing 3-channels images (that means, with colors) of 10 different objects, provided with labels. Hence, we will be dealing with a supervised ML task. import tensorflow as tf from tensorflow import keras import matplotlib.pyplot as plt import numpy as np import pydot_ng as pydot import streamlit as st st.title('Convolutional Neural Network') st.header('Dataset: cifar10') #spending a few lines to describe our dataset st.text("""Dataset of 50,000 32x32 color training images, labeled over 10 categories, and 10,000 test images.""") from keras.datasets import cifar10 #I'm dividing my data into training and test set (x_train, y_train), (x_test, y_test) = cifar10.load_data() if st.checkbox('Show images sizes'): st.write(f'X Train Shape: {x_train.shape}') st.write(f'X Test Shape: {x_test.shape}') st.write(f'Y Train Shape: {y_train.shape}') st.write(f'Y Test Shape: {y_test.shape}') As you can see, I first downloaded my dataset and split it into train and test set. Then, I added some widgets to ask the user whether to show the shapes of the new sets. This is useful if you want to check the dimensionality of your data. From these first lines, we know that our inputs are 3-channels, 32×32 pixel images. We can also ask to display one random image from our training set: class_names = ["airplane","automobile","bird","cat","deer","dog","frog","horse","ship","truck"] st.subheader('Inspecting dataset') if st.checkbox('Show random image from the train set'): num = np.random.randint(0, x_train.shape[0]) image = x_train[num] st.image(image, caption=class_names[y_train[num][0]], use_column_width=True) Now let’s set some elements which will be useful during training. st.subheader('Set some hyperparameters') batch_size = st.selectbox('Select batch size', [32, 64, 128, 256]) epochs=st.selectbox('Select number of epochs', [3, 10, 25, 50]) loss_function = st.selectbox('Loss function', ['mean_squared_error', 'mean_absolute_error', 'categorical_crossentropy']) optimizer = st.selectbox('Optimizer', ['SGD', 'RMSprop', 'Adam']) Let’s examine them one by one: epochs : number of iterations for our neural network while training : number of iterations for our neural network while training batch_size : number of samples we want to use for each epoch : number of samples we want to use for each epoch loss_function : a function of errors, that are expressed by the distance between fitted and actual values (if the target is continuous) or by the number of misclassified values (if the target is categorical). Some examples of loss functions are Mean Square errors (in regression) or Categorical Cross-Entropy (in classification). : a function of errors, that are expressed by the distance between fitted and actual values (if the target is continuous) or by the number of misclassified values (if the target is categorical). Some examples of loss functions are Mean Square errors (in regression) or Categorical Cross-Entropy (in classification). optimizer: an algorithm that adjusts parameters in order to minimize the loss. Some examples of optimization functions available in Keras are Stochastic Gradient Descent (it minimizes the loss according to the gradient descent optimization, and for each iteration it randomly selects a training sample — that’s why it’s called stochastic), RMSProp (that differs from the previous since each parameter has an adapted learning rate) and Adam Optimizer (it is a RMSProp + momentum). Of course, this is not the full list, yet it is sufficient to understand that Adam optimizer is often the best choice, since it allows you to set different hyperparameters and customize your NN. If you want to learn more about hyperparameters of generalized Neural Network, you can check it here. Now let’s move towards layers and activation functions. The idea is that each layer takes some input images and returns a kind of ‘summary’ of them, since those are passed through computations and activation functions which make the output meaningful. After many layers, the final output will be a vector of probabilities corresponding to the vector of labels of our images, and our algorithm will return the label with the highest probability. st.subheader('Building your CNN') model=tf.keras.Sequential() act1 = st.selectbox('Activation function for first layer: ', ['relu', 'tanh', 'softmax']) model.add(tf.keras.layers.Conv2D(32,kernel_size=(3,3),activation=act1,input_shape=(32,32,3))) model.add(tf.keras.layers.MaxPooling2D(pool_size=(2,2))) if st.checkbox('Add drop layer?'): drop1=st.selectbox('Which drop rate?', [0.1, 0.25, 0.5]) model.add(tf.keras.layers.Dropout(drop1)) model.add(tf.keras.layers.Flatten()) act2 = st.selectbox('Activation function for Dense layer: ', ['relu', 'tanh', 'softmax']) model.add(tf.keras.layers.Dense(1024,activation=act2)) act3 = st.selectbox('Activation function for Dense layer: ', ['relu', 'tanh', 'softmax']) model.add(tf.keras.layers.Dense(10,activation=act3)) As you can see from the code, there are three activation functions the user can choose: softmax (it is the multi-class variation of Sigmoid, displayed below), Tanh and RELU: Since ReLU is the fastest to train, it is wise to use it for hidden layers, while employing the Softmax just for the output layer. Now that we have our CNN is ready, we only have to compile it with all the features above and fit it on the train set. I will first show model.compile(loss=loss_function, optimizer=optimizer, metrics=['accuracy']) if st.checkbox('Fit model'): history =model.fit(x_train[0:1000]/255.0,tf.keras.utils.to_categorical(y_train[0:1000]), batch_size=batch_size, shuffle=True, epochs=epochs, validation_data=(x_test[0:1000]/255.0,tf.keras.utils.to_categorical(y_test[0:1000])) ) # Plot training & validation accuracy values plt.plot(history.history['accuracy']) plt.plot(history.history['val_accuracy']) plt.title('Model accuracy') plt.ylabel('Accuracy') plt.xlabel('Epoch') plt.legend(['Train', 'Test'], loc='upper left') st.pyplot() predictions=model.predict(x_test/ 255.0) scores = model.evaluate(x_test / 255.0, tf.keras.utils.to_categorical(y_test)) st.write(f'loss: {round(scores[0],2)}') st.write(f'accuracy: {round(100*scores[1],2)}%') We can also visualize one element of the predictions’ set, together with the vector of probabilities. Then, if the image was correctly classified, the color of the corresponding bar will be green, otherwise red: st.subheader('Visualizing results') def plot_pred(i,predictions_array,true_label,img): predictions_array,true_label,img=predictions_array[i],true_label[i:i+1],img[i] plt.grid(False) plt.title(class_names[true_label[0][0]]) plt.xticks([]) plt.yticks([]) plt.imshow(img) def plot_bar(i,predictions_array,true_label): predictions_array, true_label = predictions_array[i], true_label[i] plt.grid(False) plt.yticks([]) plt.xticks(np.arange(10),class_names,rotation=40) thisplot=plt.bar(range(10),predictions_array, color='grey') plt.ylim([0,1]) predicted_label=np.argmax(predictions_array) if predicted_label==true_label: color='green' else: color='red' thisplot[predicted_label].set_color(color) if st.checkbox('Show random prediction results'): num2 = np.random.randint(0, len(y_test)) plt.figure(figsize=(15,6)) plt.subplot(1,2,1) plot_pred(num2, predictions, y_test, x_test) plt.subplot(1,2,2) plot_bar(num2, predictions, y_test) st.pyplot() So in the example above, the image was correctly classified as ‘Bird’. We can run our code many times and occur in a misclassified image, obtaining the following: Great, now you can play with your CNN, customize it and try several combinations of hyperparameters in order to achieve the highest accuracy possible. I hope you enjoyed the reading and, if you are curious about this topic and want to learn more, I’m attaching some links you might find very useful:
https://medium.com/dataseries/interactive-convolutional-neural-network-65bc19d8d698
['Valentina Alto']
2019-10-28 23:32:17.962000+00:00
['Convolutional Network', 'Deep Learning', 'Python', 'Image Recognition', 'TensorFlow']
How Much Does Running Cost?
Running is a great budget exercise because it requires minimal equipment, but it’s still a far cry from free. Each year, I spend hundreds of dollars on running, despite approaching the hobby with a frugal attitude. Below, I share each of my expenses and the ways I’ve found to save money. If you’re a new runner, I hope this gives you a great idea of exactly what costs to expect. Shoes Most runners consider shoes the one essential item needed for the hobby. I’ve heard suggestions that a good pair of shoes should cost at least $100, but that’s outrageous. The key to saving money on running shoes is simply to buy the previous year’s model. (Just like cars, running shoes are typically updated once each year.) Prior to the pandemic, I often found running shoes from major brands for as cheap as $30. Since so many more people have started running this year, demand has increased and driven prices up. Even so, it’s still easy to find deals for $50 to $60. A great tool for finding cheap shoes is the price comparison website shoekicker.com. You can also find great deals by going directly to the shoe manufacturer’s website. Shoe prices oscillate frequently, so if they look high at the moment, just check back a week later. Most running shoes last up to 500 miles. For a beginner, one pair of shoes will likely last you at least a year. Estimated cost: $50 Clothing Strictly speaking, you don’t need to spend a dime on running clothing. Any exercise gear will work. When I started running, I wore everyday t-shirts and basketball shorts. With that said, running clothing does make a huge difference in your comfort level. When I finally switch to running shorts, I couldn’t believe how much easier they were to move in. Most of the big discount clothing stores have running clothes, so you still don’t need to shell out much cash. I generally spend $20 to $30 on running shorts and $10 to $20 on shirts. For beginners, a couple of shirts and a couple of pairs of shorts are enough to get you started. Estimated cost: $80 GPS Watch These days, most runners like to track their runs using GPS. You can do this for free using apps on your phone. The most popular are Strava, MapMyRun, and RunKeeper. When I started running, I used my phone to track runs for over a year. It worked fine, but I hated having it in my pocket where it constantly bounced against my leg. I tried buying a cheap arm strap for it but didn’t like the feeling of that either. Finally, I broke down and bought a GPS watch. It’s been one of the best purchases I’ve ever made. I got the Garmin Forerunner 35, which cost about $140 at the time. These days, the same model regularly dips as low as $90. Other GPS watches range in price from $40 discount brands to over $1,000 for the highest-end Garmins. What I like best about having a watch is being able to easily check my pace while I run. It’s greatly helped me improve my consistency. Estimated cost: $100 Food My biggest running expense is one that I didn’t think about at all when I began: the food. Running burns a ton of calories. Unless you’re trying to lose weight, you’re going to need to eat a lot more than usual to keep up. I calculated how much additional food I was eating because of running and discovered that it increases my grocery costs by up to 25%. Beginner runners are unlikely to run nearly as much, but you should still plan for your new hobby to affect your running budget. Expect to burn about 100 calories for every mile run. This can quickly add up to an extra day’s worth of food per week! Total Costs You can start running with nothing more than a $50 pair of shoes. But, if you get serious about the hobby, expect the costs to climb fast. Excluding food costs, around $230 should cover the first year of running with low-budget gear. If you opt for higher-end equipment, you could easily pay three or four times that. The increase in food costs could add up to hundreds or even thousands. It’s worth calculating exactly how many calories you burn each week and thinking about ways to fill that calorie deficit cheaply. Aside from food, I haven’t run into any “hidden” costs I didn’t expect. Overall, running is still one of the cheapest exercise choices around. If you’re on the fence, I’d recommend starting with just a pair of running shoes. It’s a relatively cheap investment for a hobby that just might end up changing your life.
https://medium.com/runners-life/how-much-does-running-cost-dfd58915156e
['Benya Clark']
2020-12-16 14:38:43.825000+00:00
['Fitness', 'Running', 'Health', 'Running Tips', 'Finance']
Create Mobile-Friendly Touch Sliders
Getting Started Since I am using the second method to install and set up Swiper, I will need to add Swiper to my main HTML file. As you can see, I have my custom styles.css file along with my own JavaScript file. Currently, both styles.css and main.js files are empty. Adding Swiper to HTML To add Swiper to our HTML file, we need to put the following code in the body of our HTML. The swiper-container div class is the container that contains all the HTML code related to Swiper. The swiper-wrapper class contains the slides you want to display. You can replace the dummy text( such as “Slide 1”) with your own HTML components. The swiper-pagination class provides the pagination dots, showing the index of the slides. It is worth noting that the swiper-container is the main wrapper class. Hence, you can manipulate it to give your touch slider margin, padding, color, width, etc., as per your needs. The swiper-button-next and swiper-button-prev div class enables the previous and next arrow buttons to facilitate pagination. However, if you don’t want the arrows, you can simply omit this piece of code. The last div class, swiper-scrollbar , provides a scrollbar at the bottom of the slider. You can give custom height and width to the Swiper as per your needs in your CSS file. I have given the following values: The final step to finish setting up Swiper is initializing in JavaScript. You can do it in either the same HTML file or use your custom JS file and link it with the HTML as I have done. Either way, the script to initialize Swiper should be the same and is given below: Basic Swiper code gist by the author As you can see, Swiper takes two parameters. The first is the main container class which has all the elements that Swiper needs, and the second is an object containing properties and configuration of our slider. The container in our case is swiper-container , and we have inputted it as the first parameter in the Swiper function. We can easily set the scroll direction along with other properties, such as scrollbar, loop, pagination, autoplay, and so on. Here is what our code looks like right now This is vertical. To get a horizontal slider with pagination, check the gist below. Add the direction property in the Swiper function and set it to “horizontal.” I have edited the CSS, too, to center the contents of the slide. Horizontal Slider with pagination You can create several cool transition effects as well. To get the full list check the official site. I will be showcasing some of my favorite effects below.
https://medium.com/better-programming/create-mobile-friendly-touch-sliders-7e78e55984f1
['Anurag Kanoria']
2020-10-15 16:05:35.961000+00:00
['Nodejs', 'JavaScript', 'Angular', 'Programming', 'React']
When You Should Use Machine Learning!
Photo by Alex Knight on Unsplash As we’re hearing about Artificial Intelligence, Machine Learning, Deep Learning etc. kind of technologies. This article will explain when & where to use Machine Learning technology. So let’s start… What is Machine Learning? In simple words “Machine learning is typically used for projects that involve predicting an output or uncovering trends.” Following are the issues when you can use Machine Learning technology: 1. When the problem is too Complex for Coding! Writing code for such problems has following issues:
https://medium.com/dataseries/when-you-should-use-machine-learning-eda64429cb5f
['Jitendra Singh Balla']
2020-12-15 11:33:10.541000+00:00
['Machine Learning', 'Python', 'Technology', 'Mathematics', 'Data Science']
How to Create Dynamic Compositions
I work with a lot of designers, cinematographers, photographers, and illustrators everyday on high-end commercial projects. From interns all the way up to senior artists who are experts at their craft, I’ve found that the reoccurring skill in all of the most talented artists is their understanding of how to use contrast in their compositions. First off, when I refer to “contrast,” what I mean is: giving contrast to every visual component that makes up a single frame– value, weight, size, and color. By utilizing contrast, you’re able to control and define hierarchy, movement, and meaning. To keep things simple and clearly illustrate what I mean, I’ve put together a few greyscale examples that show how adding contrast to your frames can drastically improve your compositions and effectiveness of your storytelling.
https://medium.com/thefuturishere/how-to-create-dynamic-compositions-3c5cc3f00632
['Matthew Encina']
2018-02-02 16:50:12.666000+00:00
['Photography', 'UI', 'Design', 'Art', 'Composition']
A Brief History of Chanel
A Brief History of Chanel The iconic fashion house from a historian’s view- from an orphan to a designer to a potential Nazi agent Image via PickPik “The Chanel aesthetic is like the force in Star Wars, surrounding, penetrating, and binding together in the universe of fashion, now and forever.” — Karen Karbo Today’s edition of a “Brief History of” a Fashion House features the first Fashion House I have written about that was founded by a woman! Miss Coco Chanel. Chanel used her lovers’ money to create a fashion empire while transforming feminity in the form of clothing and fashion design. She ensured elegance stayed intact while ditching uncomfortable and complicated designs. Chanel transformed the use of the colour black; a colour typically only worn for mourning, was now and still is being worn daily and termed as a classic thanks to her design of the iconic little black dress. Gabrielle ‘Coco’ Chanel “Luxury must be comfortable, otherwise it is not luxury” — Coco Chanel Despite the glamourous connotations of her brand and her designs, Chanel was put in an orphanage at age 12 by her father, after the death of her mother. As a result, she was raised by nuns who taught her how to sew, this very skill would result in her life’s work and legacy. It is slightly scary to think, if Chanel was never placed in this orphanage she may not have learned to sew as a child. And well if she did not know how to sew, she would have never been able to create her incredible fashion brand and business. Coco Chanel image via Wikimedia Commons Founding Chanel Gabrielle Chanel opened her first shop in Paris in 1910 and began selling hats. She then added stores in Deauville and Biarritz and began making and selling clothes. She used the money from her lovers to fund her business ventures and never married. On a chilly day, Chanel fashioned a dress out of an old jersey, and in response to the many people who asked where she got it, she offered to make them one. “My fortune is built on that old jersey that I’d put on because it was cold in Deauville.” — Coco Chanel Chanel had a love for horses, meaning she designed clothing that suited outdoorsy women and designed clothing that was just as comfortable as the male counterparts' clothing. This jersey material was typically worn by members of the lower class, but just as Chanel herself had an incredibly poor upbringing, she brought herself and her jersey to the upper classes. Perfume “Perfume is the unseen, unforgettable, ultimate accessory of fashion… that heralds your arrival and prolongs your departure.” — Coco Chanel In the 1920s Chanel created the first perfume to ever feature a designer's name, Chanel №5, entitled so because it was the 5th perfume she tested. After including the factory owner and the marketer into the situation, Chanel only made 10% from each sale of the perfume. She made legal efforts to renegotiate but she never had success. Despite this, Chanel still made a lot of money from Chanel №5. Nazi agent? Chanel became involved with a Nazi military officer, Hans Gunther von Dincklage, which meant she received permission to stay in her apartment at the Hotel Ritz in Paris, which also operated as a German military headquarters. When the war ended Chanel was inevitably interrogated about her relationship with von Dincklage, but she was not charged as a collaborator. However, in the court of public opinion, a relationship with a Nazi officer was considered betraying. She left the country and moved to Switzerland. Iconic style It was in 1925 when Chanel designed and introduced the iconic Chanel suit. The collarless jacket and a well-fitted skirt is now legendary and considered classic, but was relatively revolutionary at the time, due to the elements of masculinity and menswear. Equally, despite being considered formal nowadays, it was actually a move away from uncomfortable and confining corsets and instead was a comfortable suit, just like the men got to wear. Similarly, black is now considered a staple in everyone's wardrobe. Yet, prior to Chanel’s introduction of the colour into the daily wardrobe, black was considered a colour exclusively for mourning. This would transcend into the revolutionary little black dress, a variation of which is seen as a classic in many women's wardrobes today. Coco Chanel brought modernity to the fashion world, favouring functionality over flamboyance. Chanel designed the last jacket for her last collection in 1970. All pieces from the House of Chanel that date past 1983, when Karl Lagerfeld took over are Lagerfeld-Chanel, not Chanel-Chanel. Reviving Chanel After closing her business due to World War Two, Chanel made a comeback and reopened her brand. Whether this was to support sales with Chanel №5 or her personal hatred of the homosexual designers that were dominating Parisian couture in the 50s, one can’t say. While Balenciaga was admired by Chanel, she saw the likes of Dior and Balmain as undoing her attempt at breaking down traditional feminity. If you read my article on Dior, you will know that he moved Parisian fashion back towards traditional elegance and feminity with tight corset dresses and full, impractical skirts. And while of course, her homophobia was completely out of order, particularly for our contemporary viewpoint, she is entirely valid to feel frustrated at men redesigning what it means to dress femininely when it includes making garments more uncomfortable to wear. Nonetheless, at age 71 Chanel made a comeback. The French press was still unforgiving of her relationship with a Nazi officer during the war and consequently did not deliver praise at her collection. Despite this, women loved her suits and people still wear the exact same design to this day.
https://medium.com/history-of-yesterday/a-brief-history-of-chanel-a9320dace74
['Lu Mar']
2020-07-09 18:26:00.819000+00:00
['Fashion', 'Art', 'History', 'Design', 'Inspiration']
Remember When The Biggest Scandal Was Obama’s Latte Salute?
Remember When The Biggest Scandal Was Obama’s Latte Salute? We’re in a completely different world now. It made the news on every network. Every newspaper and magazine published a story about it. Disembarking from Marine One, Barack Obama saluted an officer with a coffee cup in his hand. Outrage followed. For a week, it was all anyone could talk about. Fox News latched onto it first, then everyone else had to say something. John Stewart was still the host of The Daily Show. He told conservatives they were overreacting. “F*ck you and your false patriotism,” he declared. Here’s a list of words people used to describe Obama: Selfish Callous Inappropriate Disrespectful That was back in 2014. It was a different time, a time when Obama could make the news just by running to Starbucks for some tea. Watching video footage from that era, I don’t know what’s stranger — the lack of masks and social distancing, or the sight of a president with some gravitas who could actually connect with ordinary people. It feels like a hundred years ago, a far happier moment in history.
https://medium.com/the-apeiron-blog/remember-when-the-biggest-scandal-was-obamas-latte-salute-158bf5fe7baf
['Jessica Wildfire']
2020-11-01 00:37:12.324000+00:00
['Politics', 'Society', 'Culture', 'News', 'Election 2020']
Climate Change and Mental Health in Nigeria — #MentallyAwareNigeria
Climate Change poses certain disaster risk like flooding which often leads to a mental health crisis. In 2012 and 2017, there was massive flooding in most states in Nigeria which led to the loss of loved ones and destruction of livelihood. Studies have shown that 75% of mental health conditions are experienced in lower and middle-income countries, and one of the lesser-known and often overlooked effects of climate change includes risks and impact on mental health and that is why we at the International Climate Change Development Initiative (ICCDI) made it our objective to avail ourselves for the 3-day intensive workshop (10th — 12th May, 2019) held at The Vintage Hub, Ikeja, Lagos state. The workshop, hosted by Mentally Awareness Nigeria Initiative (MANI), United for Global Mental Health (UGMH) and the Mandate Health Empowerment Initiative (MHEI), achieved the following aims and objectives: · Designed a Mental Health Advocacy Campaign, tagged Speak Your Mind Campaign. · A better understanding of our target audiences — young people with lived experiences, schools/students, policymakers, private sectors, NGOs and religious leaders. · Generated over 200+ creative ideas for communication and advocacy tactic were generated · Developed a prototype and test concepts to implement in the campaign.
https://medium.com/climatewed/climate-change-and-mental-health-in-nigeria-mentallyawarenigeria-7db54d6d63e
['Iccdi Africa']
2019-05-14 01:40:26.017000+00:00
['Climate Change', 'Mental Health', 'Women']
Natural Language Processing (NLP)
Everything we express (either verbally or in written) carries huge amounts of information. The topic we choose, our tone, our selection of words, everything adds some type of information that can be interpreted, and value extracted from it. In theory, we can understand and even predict human behavior using that information. But there is a problem: one person may generate hundreds or thousands of words in a declaration, each sentence with its corresponding complexity. If you want to scale and analyze several hundred, thousands, or millions of people or declarations in a given geography, then the situation is unmanageable. Data generated from conversations, declarations, or even tweets are examples of unstructured data. Unstructured data doesn’t fit neatly into the traditional row and column structure of relational databases and represent the vast majority of data available in the actual world. It is messy and hard to manipulate. Nevertheless, thanks to the advances in disciplines like machine learning, a big revolution is going on regarding this topic. Nowadays, it is no longer about trying to interpret a text or speech based on its keywords (the old fashioned mechanical way), but about understanding the meaning behind those words (the cognitive way). This way, it is possible to detect figures of speech like irony or even perform sentiment analysis. Natural Language Processing or NLP is a field of AI that gives the machines the ability to read, understand and derive meaning from human languages. It is a discipline that focuses on the interaction between data science and human language, and is scaling to lots of industries. Use Cases of NLP In simple terms, NLP represents the automatic handling of natural human languages like speech or text, and although the concept itself is fascinating, the real value behind this technology comes from the use cases. NLP can help you with lots of tasks, and the fields of application just seem to increase on a daily basis. Let’s mention some examples: NLP enables the recognition and prediction of diseases based on electronic health records and patient’s own speech. This capability is being explored in health conditions that go from cardiovascular diseases to depression and even schizophrenia. For example, Amazon Comprehend Medical is a service that uses NLP to extract disease conditions, medications, and treatment outcomes from patient notes, clinical trial reports, and other electronic health records. Organizations can determine what customers are saying about a service or product by identifying and extracting information from sources like social media. This sentiment analysis can provide a lot of information about customers' choices and their decision drivers. An inventor at IBM developed a cognitive assistant that works like a personalized search engine by learning all about you and then remind you of a name, a song, or anything you can’t remember the moment you need it to. Companies like Yahoo and Google filter and classify your emails with NLP by analyzing text in emails that flow through their servers and stopping spam before they even enter your inbox. To help to identify fake news, the NLP Group at MIT developed a new system to determine if a source is accurate or politically biased, detecting if a news source can be trusted or not. Amazon’s Alexa and Apple’s Siri are examples of intelligent voice-driven interfaces that use NLP to respond to vocal prompts and do everything like find a particular shop, tell us the weather forecast, suggest the best route to the office or turn on the lights at home. NLP is particularly booming in the Healthcare Industry. This technology is improving care delivery, disease diagnosis, and bringing costs down while healthcare organizations are going through a growing adoption of electronic health records. The fact that clinical documentation can be improved means that patients can be better understood and benefited through better healthcare. The goal should be to optimize their experience, and several organizations are already working on this. A number of publications containing the sentence “natural language processing” in PubMed in the period 1978–2018. As of 2018, PubMed comprised more than 29 million citations for biomedical literature. Companies like Winterlight Labs are making huge improvements in the treatment of Alzheimer’s disease by monitoring cognitive impairment through speech, and they can also support clinical trials and studies for a wide range of central nervous system disorders. Following a similar approach, Stanford University developed Woebot, a chatbot therapist, with the aim of helping people with anxiety and other disorders. NLP may be the key to effective clinical support in the future, but there are still many challenges to face in the short term. The Challenges The main drawbacks we face these days with NLP relate to the fact that language is very tricky. The process of understanding and manipulating language is extremely complex, and for this reason, it is common to use different techniques to handle different challenges before binding everything together. Programming languages like Python or R are highly used to perform these techniques, but before diving in, it is important to understand the concepts beneath them. Let's summarize and explain some of the most frequently used algorithms in NLP when defining the vocabulary of terms: Bag of Words It is a commonly used model that allows you to count all words in a piece of text. Basically, it creates an occurrence matrix for the sentence or document, disregarding grammar, and word order. These word frequencies or occurrences are then used as features for training a classifier. To bring a short example, let's consider the first sentence of the song “Across the Universe” from The Beatles: Words are flowing out like endless rain into a paper cup, They slither while they pass, they slip away across the universe Now, let's count the words: This approach may reflect several downsides like the absence of semantic meaning and context, and the facts that stop words (like “the” or “a”) add noise to the analysis, and some words are not weighted accordingly (“universe” weights less than the word “they”). To solve this problem, one approach is to rescale the frequency of words by how often they appear in all texts (not just the one we are analyzing) so that the scores for frequent words like “the” that are also frequent across other texts, get penalized. This approach to scoring is called “Term Frequency — Inverse Document Frequency” (TFIDF) and improves the bag of words by weights. Through TFIDF, frequent terms in the text are “rewarded” (like the word “they” in our example), but they also get “punished” if those terms are frequent in other texts we include in the algorithm too. On the contrary, this method highlights and “rewards” unique or rare terms considering all texts. Nevertheless, this approach still has no context nor semantics. Tokenization It is the process of segmenting running text into sentences and words. In essence, it is the task of cutting a text into pieces called tokens, and at the same time throwing away certain characters, such as punctuation. Following our example, the result of tokenization would be: Tokenization can remove punctuation, too, easing the path to a proper word segmentation but also triggering possible complications. In the case of periods that follow abbreviation (e.g., dr.), the period following that abbreviation should be considered as part of the same token and not be removed. The tokenization process can be particularly problematic when dealing with biomedical text domains, which contain lots of hyphens, parentheses, and other punctuation marks. Stop Words Removal Includes getting rid of common language articles, pronouns, and prepositions such as “and”, “the” or “to” in English. In this process, some very common words that appear to provide little or no value to the NLP objective are filtered and excluded from the text to be processed, hence removing widespread and frequent terms that are not informative about the corresponding text. Stop words can be safely ignored by carrying out a lookup in a predefined list of keywords, freeing up database space, and improving processing time. There is no universal list of stop words. These can be preselected or built from scratch. A potential approach is to begin by adopting pre-defined stop words and add words to the list later on. Nevertheless, it seems that the general trend over the past time has been to go from the use of large standard stop word lists to the use of no lists at all. The thing is stop words removal can wipe out relevant information and modify the context in a given sentence. For example, if we are performing sentiment analysis, we might throw our algorithm off track if we remove a stop word like “not”. Under these conditions, you might select a minimal stop word list and add additional terms depending on your specific objective. Stemming Refers to the process of slicing the end or the beginning of words with the intention of removing affixes (lexical additions to the root of the word). Affixes that are attached at the beginning of the word are called prefixes (e.g. “astro” in the word “astrobiology”) and the ones attached at the end of the word are called suffixes (e.g. “ful” in the word “helpful”). The problem is that affixes can create or expand new forms of the same word (called inflectional affixes) or even create new words themselves (called derivational affixes). In English, prefixes are always derivational (the affix creates a new word as in the example of the prefix “eco” in the word “ecosystem”), but suffixes can be derivational (the affix creates a new word as in the example of the suffix “ist” in the word “guitarist”) or inflectional (the affix creates a new form of word as in the example of the suffix “er” in the word “faster”). Ok, so how can we tell the difference? A possible approach is to consider a list of common affixes and rules (Python and R languages have different libraries containing affixes and methods) and perform stemming based on them, but of course, this approach presents limitations. Since stemmers use algorithmic approaches, the result of the stemming process may not be an actual word or even change the word (and sentence) meaning. To offset this effect, editing those predefined methods by adding or removing affixes and rules, but you must consider that you might be improving the performance in one area while producing a degradation in another one. Always look at the whole picture and test your model’s performance. So if stemming has serious limitations, why do we use it? First of all, it can be used to correct spelling errors from the tokens. Stemmers are simple to use and run very fast (they perform simple operations on a string), and if speed and performance are important in the NLP model, then stemming is certainly the way to go. Lemmatization Has the objective of reducing a word to its base form and grouping together different forms of the same word. For example, verbs in the past tense are changed into the present (e.g., “went” is changed to “go”), and synonyms are unified (e.g., “best” is changed to “good”), hence standardizing words with similar meaning to their root. Although it seems closely related to the stemming process, lemmatization uses a different approach to reach the root forms of words. Lemmatization resolves words to their dictionary form (known as lemma) for which it requires detailed dictionaries in which the algorithm can look into and link words to their corresponding lemmas. For example, the words “running”, “runs” and “ran” are all forms of the word “run”, so “run” is the lemma of all the previous words. Lemmatization also takes into consideration the context of the word in order to solve other problems like disambiguation, which means it can discriminate between identical words that have different meanings depending on the specific context. Think about words like “bat” (which can correspond to the animal or to the metal/wooden club used in baseball) or “bank” (corresponding to the financial institution or to the land alongside a body of water). By providing a part-of-speech parameter to a word ( whether it is a noun, a verb, and so on), it is possible to define a role for that word in the sentence and remove disambiguation. As you might have already pictured, lemmatization is a much more resource-intensive task than performing a stemming process. At the same time, since it requires more knowledge about the language structure than a stemming approach, it demands more computational power than setting up or adapting a stemming algorithm. Topic Modelling Is as a method for uncovering hidden structures in sets of texts or documents. In essence, it clusters texts to discover latent topics based on their contents, processing individual words, and assigning them values based on their distribution. This technique is based on the assumptions that each document consists of a mixture of topics and that each topic consists of a set of words, which means that if we can spot these hidden topics, we can unlock the meaning of our texts. From the universe of topic modeling techniques, Latent Dirichlet Allocation (LDA) is probably the most commonly used. This relatively new algorithm works as an unsupervised learning method that discovers different topics underlying a collection of documents. LDA finds groups of related words by: Assigning each word to a random topic, where the user defines the number of topics it wishes to uncover. You don’t define the topics themselves (you define just the number of topics), and the algorithm will map all documents to the topics in a way that words in each document are mostly captured by those imaginary topics. The algorithm goes through each word iteratively and reassigns the word to a topic taking into consideration the probability that the word belongs to a topic and the probability that the document will be generated by a topic. These probabilities are calculated multiple times until the convergence of the algorithm. Unlike other clustering algorithms like K-means that perform hard clustering (where topics are disjointed), LDA assigns each document to a mixture of topics, which means that each document can be described by one or more topics (e.g., Document 1 is described by 70% of topic A, 20% of topic B and 10% of topic C) and reflect more realistic results. Topic modeling is extremely useful for classifying texts, building recommender systems (e.g., to recommend books based on your past readings), or even detecting trends in online publications. Some Kagglebooks Links:
https://medium.com/towards-artificial-intelligence/natural-language-processing-nlp-a61881a84b66
['Johar M. Ashfaque']
2020-12-17 14:09:37.216000+00:00
['Machine Learning', 'Deep Learning', 'Artificial Intelligence', 'Naturallanguageprocessing', 'NLP']
Why We Need To Call It Climate Crisis
Why We Need To Call It Climate Crisis Some neurobiology and how it can help avert global catastrophe The original People’s Climate March, 2014, Christyl Rivers Are you bored with ‘the sky is falling Chicken Littles?’ People are increasingly aware of climate havoc and its consequences. By now, many people are believing their own eyes, ears, smoke alarms, and flooded basements. However, an even greater number of people have not yet had such critical loss, nor will they, until the damage is too late to reverse. Perhaps our ho-hum descriptions of the problem, ‘change’ and ‘warming’ need to be as retrofitted as our homes and businesses. Recent neurological research has revealed that our most common language for the climate, and extinction, era we now live in, is failing. For many people, they have just gotten so tired, and in some cases confused, that the words don’t register. Or, for some, they don’t believe the science and think the alarm is agenda-based fear-mongering. But, if anything, most researchers are now realizing language, and message, have not been urgent enough to stir action. Brain sparks could start conversations before wildfires do Advisors and researchers have revealed that using the terms ‘climate crisis’, rather than ‘climate change’, is more effective use of meaningful language. For some places, particularly in Europe, this has already become the more common terminology. The words “climate change” and “global warming” are so worn, and frayed right now, that people hearing them no longer register an emotional, and therefore, investment worthy response. Consultants at Spark Neuro, who study the brain processing of new information, have run labs with people with conservative, liberal, and independent political views. One might think that the liberal Democrats, those most pushing the alarms buttons the hardest and demanding more leadership and a green new deal — especially for healthcare and jobs creation and economic prosperity in green industry — would have the greatest response to emotionally laden words. They don’t. It is in fact, the Republicans tested who showed the most emotionally engaged reaction to words used to describe our over-heating planet. Three times more Republicans tested revealed more meaningful emotional response to the term climate crisis. With an EEG, electroencephalograph, a significant spike in electrochemical brain activity was measured. And with GSR, Galvanic Skin Response, receptors fastened to finger tips revealed heightened emotion was skin moisture and temperature measurements. Facial response was also measured. These are the same sort of tests used to detect emotional, and stressful, reactions as lie detector tests often employ. The term ‘environmental destruction’ was also more effective, than the just as accurate ‘destabilization.” The debate ‘debate’ needs to abate University of Bristol cognitive psychologist, Stephan Lewandowsky, recently spoke about the consequences of imprecise language around climate. “Concerning the specific term ‘climate crisis’, I think it strikes an appropriate balance of conveying urgency without hyperbole.” Indeed, scientific papers, journals, and thousands of articles on the subject have routinely been using the term ‘crisis’ for more than a decade now. Clive Hamilton, expert, author, and philosopher, has remarked that “We should treat the public like adults, and tell the truth.” Journalists, then, are the ones who have been a bit slow to jump on the trend. Many who study psychology, culture, politics, and more have instead made real efforts to balance skepticism with climate science. What resulted is what Science Alert magazine calls “balancing opinions” which is ineffective at conveying truth about real concerns because “There is plenty of evidence and expert opinion that the crisis label is not baseless alarmism — indeed, it has its place in how we communicate about climate change, and we can expect to see more crisis talk going forward. Even if some will continue to disagree.” Among the general public, the terms ‘tipping point’, seems less impressive than emphasizing a ‘point of no return.’ And contrary to popular belief, the term global warming was not replaced with climate change to recruit activism, or terrify people. It was, in fact, put forward by the Republican strategist Frank Luntz, during the second Bush administration precisely because it is less frightening to the general public. As for scientists, they have used both terms to more accurately describe, and record, two different phenomena. Another Tipping point the world over But there is also good news about tipping points and political power. People are overwhelmingly realizing the potential hazards of continuing on with polluting and heat-causing fossil fuels. New emphasis is being demanded of world leaders, and in the USA, political contenders for 2020. The news is out about cover ups by energy giants and oil companies over the last fifty years. And a new generation, led by young people with every reason to care more about the future than older “fossils” are taking up their concerns for a cleaner world. We are seeing with people such as AOC and Greta Thunberg, Young Climate and Extinction Rebellion, an ever-growing demand for a greener world. Waking people up to the factual dangers, and more importantly, to the reality of what each individual person can do to feel empowered and effective, requires strong words and deeds. If that is what it takes to avoid loss of life, resources and economy, and trillions of dollars in projected costs that climate chaos will bring, we have to take on the challenge.
https://christylrivers.medium.com/why-we-need-to-call-it-climate-crisis-3e0c0d725a94
['Christyl Rivers']
2019-07-10 02:19:24.864000+00:00
['Climate Change', 'Crisis', 'Biology', 'Language', 'Science']
Atomic Design & creativity
I’ve been using atomic design in my projects over the past 2 years now. And since then, I can’t help but talk about it to everyone around me ;) Quick reminder : Atomic Design is a methodology, invented by Brad Frost and based on the idea that designing interface should always rely on the smallest part of the interface (atoms) in order to build any other assets. While I was trying to convince people around me about this methodology, I noticed that some people (mostly creative people I have to say…) were concerned about the « industrial » aspect of this methodology. “It’s the end of my creativity!” “We’ll turn into robots designing components” Unfortunately, when we talk about “industrialization” and “reuse”, many people understand “standardisation” and “creative limitation”. I disagree. When you really find your own interpretation on how to use Atomic Design, you can decide precisely where and when you want to give room to creativity. Let’s see what happens when we name it differently When I started using Atomic Design, I read many articles about it and discovered how other people were actually using it in their own way depending on the project, the size of their team… Vocabulary used in Atomic Design often doesn’t appeal to the design teams. Worse, it can create confusion. For example, what is the difference between molecules and organisms? Or templates versus pages? And it’s fair to say that chemical and biological metaphors can be “scary” for non-scientific minds (myself included ;) I decided to try finding different metaphors to convey the same idea of starting from the smallest piece to build from, but in a more appealing way. Metaphor #1 : Lego This is the first metaphor I found interesting and it’s definitely the most commonly used when approaching components systems. I have bricks of different shapes, sizes and colors: Your raw material : atoms With this bricks, I can build different elements: Simple or complex elements (molecules & organisms) And by assembling those elements, I get to a final result which can even be a part of something much bigger: One of the possible results What’s great with Lego is that you can extend the metaphor: the style guide that will be developed is like a Lego storage box with rules on how to use them (Building instructions): The Style guide : the storage and the building instructions, essential to use the system correctly This metaphor is more fun than the atoms and in my experience teams love it (especially developers :) Nevertheless, something is still missing with regards to our designer job… How to convey the idea that, when designing a product, we’re not just assembling blocks… But we also want our user to feel something. Metaphor #2 : music Recently, I introduced the Atomic Design methodology for one of our clients at Backelite, the agency I work for. And I was lucky to work with a talented Art Director: Florian Cordier. Working with Atomic Design was not a choice of his own and he was not really comfortable with the idea… He thus decided to find his own metaphor and he developed the following one, which I find absolutely brilliant. It begins with the idea that music starts with 7 notes and some rhythm indications: 7 notes: infinite design possibilities We can combine those notes to create chords: We can combine this notes to create chords (molecules) We mix these chords into verses: Verses that will tell a story and can be reuse in the music piece And with those elements we’ll create an entire sheet of music and why not even an opera! One of the possible results What is very interesting with this metaphor is that we bring 3 new notions that are essential when designing a product: harmony, melody and rhythm. HARMONY It’s the right organization of the components. It’s what is going to make the final result harmonious and well balanced. The harmony of the final result MELODY It’s the story we want to tell to our user and the global vision of the flow. Sometimes the flow needs to be quick and sometimes it needs to be calm. The melody of the user flow RHYTHM Last but not least, the rhythm is what will give user some emotions while using the product: animations, illustration, tone of voice… Add some rhythm to give emotions to the user. ©TouchUp Thanks to this metaphor, we add the emotional and creative aspect that often lacks when one speaks about design systems Good composer and good interpretations Pleasant and long lasting music requires good composers and good interprets. A simply well executed piece, even if the technique is perfect will not be enough to thrill the audience. In the same way, a rich system of components will not be enough to make a good user experience! We’ll still need: Good composers to create a unique and reusable system Good musicians to interpret it their own way and bring it to life And sometimes, we need to break the rules in order to generate surprise or emotion. When to be creative… Or not? For me it’s obvious : we can be creative while using design systems and Atomic Design methodology. The next question will be: “When do we need creativity and when do we need consistency? Starting from atoms and molecules give us more creative possibilities than starting from templates and organisms We will have then to identify where do we want a strong consistency and where do we want to create surprise, emotion, or to show the uniqueness of the brand. If we want a strong consistency and a lot of reuse, we will start from the more concrete and complex components (such as templates and organisms). If we rather want to give designers more creative possibilities, we will give them atoms and molecules so they will create new components while keeping a family resemblance. Never forget: be consistent, not uniform! What are we going to do with all this time saved? Industrialization can help us save time on repetitive and useless tasks for which designers have no added value, things like: performing the same modification on 15 different screens, creating 20 times the same component or replacing 10 times the same wording for instance. This newly acquired free time should allow us to work on much more interesting elements for our users and/or our clients : the right user flow, the brand identity, the analysis of user feedbacks, the development of innovative and relevant solutions, the emotional design… If you’re curious about how to begin creating a system of components using Atomic Design, you can also read: “Atomic Design : how to design systems of components”. Audrey wrote this story to share knowledge and to help nurture the design community. All articles published on uxdesign.cc follow that same philosophy.
https://uxdesign.cc/atomic-design-creativity-28ef74d71bc6
['Audrey Hacq']
2017-07-04 10:05:22.998000+00:00
['Design Systems', 'Component Libraries', 'UX', 'Creativity', 'Atomic Design']
“Phishing” Equilibrium
“Phishing” Equilibrium Equilibrium is supposed to be the result of efficient markets, but without regulation, we are constantly “phished for phools”. George Akerlof and Robert Shiller, both Nobel Prize-winning economists, published a book called Phishing for Phools, which takes a deep dive into how markets often do not offer the best result for individuals, and thus societies because they are forced to focus exclusively on profit motives. So, let’s take a look at what being Phished for a Phool actually means, and why this concept is important when considering the role governments should play in protecting their citizens. Being Phished for a Phool occurs when, for psychological reasons or due to misleading information, an individual acts in a way that is not in their self-interest. Profit-seeking entrepreneurs and/or business people, often have to exploit these tendencies to make a profit, making them the phisherman and the general population the phools. Shiller and Akerlof both argue that these scenarios indicate why government intervention is necessary in many situations. A great metaphor they used in their book was comparing business to sports. In sports, players argue with the referee all the time, but I think everyone can agree that in a competitive game, everyone would rather have a ref — otherwise, the team that's willing to deliver the lowest blows will win. Likewise, in business, government regulators are loathed by businesses in certain scenarios, but without regulation, businesses would need to act maliciously to remain competitive. When this is allowed to happen, the market is in ‘phishing equilibrium’- the market is maximizing its profits by getting consumers to do things that are not in their self-interest. In most cases, phishing for phools is relatively benign, but in some cases, it can put the global economy on the precipice of collapse (ie. Savings and Loans crisis in the 80s, Mortgage-backed securities in the 2000s etc.), and when we consider its prevalence on a broader level, it plays a major role in our general lives. Phishing for Phools offers many examples of phishing and I’ll outline some of the more practical and extreme examples here (if you want the full 150 pages of examples, I’d encourage you to read the book!). A great example of phishing is Cinnabon’s: no one actually wants to eat such a fattening, sugary food, but the odor of Cinnabon stores strategically placed in easy to access places (the airport, the subway etc.) are very effective in luring us to buy something that rationally we would not want. This is relatively benign, but many food companies have gone beyond that. Using scientific and statistical analysis, companies are now able to produce their food with amounts of sugar and salt that are proven to make us more likely to buy the food over and over again (this has nothing to do with making the food more delicious). The effect on society is that instead of achieving the most beneficial equilibrium, a phishing equilibrium occurs: too much of these goods are produced, and although people want to be healthy and fit, the additives in unhealthy food make it very hard to shift away from unhealthy foods. Another interesting example in Phishing for Phools is the use of credit cards. Studies show that individuals who use credit cards are willing to spend more than they are using cash. This is understandable: it is much easier to stomach tapping a card then it is to hand over a wad of cash. Although stores have to pay considerable amounts to credit card companies in transaction fees (sometimes up to 1/5 the store’s profit margin), they do not offer any discount for those who pay with cash. The stores know that consumers will be more willing to spend if they use a card, so they conveniently offer no incentive to pay with cash, choosing to absorb the fees to increase sales. People don’t want to spend more (especially when most of the US is living paycheque to paycheque), but stores are able to exploit a human trait to get us to spend more than we want. If you or I were to use cash for all our purchases, we’d save considerable amounts of money. It is our choice to use a credit card, and by doing so, without even knowing it, we’ve been phished for phools. The previous two examples demonstrate the nature of being phished for phools. They are based on psychological factors that are hard to remedy without drastically constraining freedom of choice. But I’ll go over another example of phishing (that I will drastically oversimplify) that was a contributing factor in the buildup toward the great recession and demonstrates the importance of government regulators. This example is Credit Rating Agencies. Major banks were able to go door to door to each (private) credit rating agency to search out the best rating they could get on the assets they were issuing. They didn’t pay the Credit Rating Agency unless they used the rating, and thus the agencies were competing with one another for business. Needless to say, many assets were horrendously overrated. A major contributing factor in the incorrect ratings was simply that the agencies had to give good ratings to be in business (also the instruments they were rating were intentionally made incredibly complex by their issuers, making them nearly impossible to accurately assess — we now know a lot of them were junk). Anyone who had bought those securities, taking into account their ratings, had been Phished for a Phool. The question begs, where were government actors ensuring accurate non-biased ratings? They were nowhere to be found. Since then, under the Dodd-Frank Act, banks must pay rating agencies regardless of whether or not they actually use the rating, which is a simple step that helps to prevent this sort of phishing. This is a great example of how important it is for governments to keep an eye on the circumstances created by profit motives. Shiller and Akerlof come to a conclusion that seems quite logical: it is very important to have adequately funded government agencies to protect citizens from being phished. The SEC, for instance, only has one-quarter of a hundredth of a cent for every dollar they oversee. This means that when a company acts fraudulently, the SEC can only go after the corporation and not the individual, meaning they are not a great detractor for financial crime (going after the corporation is much less expensive). Underfunded government agencies like the SEC are certainly a factor that proliferates phishing. Take Bernie Madoff, the creator of a massive Ponzi Scheme — a complaint was filed at the SEC in 2000, but due to underfunding and mismanagement, nothing was uncovered. It took eight years, and millions more dollars phished from the metaphoric sea before he was arrested. Their key takeaway has nothing to do with capitalism generally, rather they are focused on how to improve markets so that we can move from a Phishing Equilibrium to the actual maximally beneficial equilibrium for society. Without government regulators, profit motives make this impossible to do. One final note. Regulation should never replace the simple yet crucially important phrase: ‘Caveat Emptor!’
https://medium.com/junior-economist/phishing-equilibrium-acf79cfb40ae
['Simon Hungate']
2020-05-05 20:45:07.439000+00:00
['Economy', 'Society', 'Robert Schiller', 'Finance', 'George Akerlof']
DOJ v Google: Don’t Expect Action for Years
It’s going to be a very long time before the government gets a day in court against the big tech firms, at least if you look at the Department of Justice complaint against Google as an indication. The tentative trial date for court action is September of 2023. “If anybody thought we would be getting to trial quickly,” US District Judge Amit Mehta said during a telephone hearing on the matter (as reported in the Wall Street Journal), “this certainly will dispel that notion.” The judge also said he wants to get other cases on the same coordinated schedule as legal teams prepare for litigation. This could mean the case brought by Attorneys General in 35 states might ultimately be wrapped into the same prosecution — or at least be handled on the same timetable. The proposed schedule begins with 450 days for discovery, then several months for review and counter-arguments before any trial would be begin. You can download and read the DOJ complaint against Google below. Related
https://medium.com/digital-vault/doj-v-google-dont-expect-action-for-years-257fcd32c88f
['Paul Dughi']
2020-12-20 21:31:09.210000+00:00
['Google', 'Government', 'Antitrust', 'Digital', 'Law']
Was Rich Mullins gay?
Was Rich Mullins gay? An Evangelical star has to keep secrets An early songwriter for Amy Grant, he helped make ‘contemporary Christian music’ a commercial force. In 1988 his solo song “Awesome God” was a mega-hit. Later albums were influential, and he keeps a cult of admirers. His vibe was a more loving faith. He died in 1997 at age 41. Reading up on singer-songwriter Rich Mullins, I found vagueness and strangeness around his personal life. Never married, no girlfriends. A bit androgynous. I wondered if he was gay. Which would make getting access to his real story a problem. His commercial value to the Christian demographic would depend on all knowledge of it being suppressed. Tricky. I might need an angel to whisper it in my ear? I kept researching, and was watching a 2014 documentary, Rich Mullins: A Ragamuffin’s Legacy. I paused the player, backed up, watched again. Amy says it again, exactly the same way. “He was, you know, very— Um. Honest about his— Everything from his sexuality, to his appetites to his— He was just so raw.” That’s not a very Christian way to be. I hear back from Reed Arvin, Mullins’ longtime producer. He was the most authentic poet in the history of contemporary Christian music, a truth-teller in the best sense, and a true believer in Christ. I’ve never met anyone who so thoroughly conformed his life to the image of Christ, which, naturally, made him an outlier in many ways. I have no idea if Rich was gay or trying not to be gay. I do know that on the spectrum of “things that matter about Rich Mullins,” his sexuality rates about 90th. But I must say — it might explain his whole life. Asked to speak about “grace” on a 1996 radio show, he’s slipping back into his childhood in rural Indiana. When I was young, I was angry and I was kind of going, “God, why am I such a freak? Why couldn’t I have been a good basketball player? I wanted to be a jock or something. Instead I’m a musician. I feel like such a sissy all the time. Why couldn’t I be just like a regular guy?” There was a sort of biography about him in 2000, An Arrow Pointing to Heaven by James Bryan Smith. There’s been two documentaries. I’m browsing newspaper archives for more, wondering how it all fits together. It’s the story of a sensitive boy who took to music. “We went to see the movie Music Man when he was just a child,” his mother, Neva Mullins, says in a 1984 newspaper interview. “He came home and pecked out the songs he’d heard on our old upright piano.” Not the first boy to love Broadway musicals. Or to horrify his father. Smith quotes Neva reflecting on her husband. “John’s generation of men did not express their feelings to their children.” Which isn’t quite true. John Mullins expressed disappointment. “I have two sons, two daughters, and a piano player,” he’d say. Many others found him mystical and magical. After his death, Mullins’ hometown paper has memories from schoolmates. “Even as a young teen-ager, it was apparent that he was not like all other kids,” a man writes. “He was chosen by God.” A female classmate: “While most of us were asking questions about how do we get ahead in the world, he was asking why are we in this world? And wondering don’t we truly belong in the next world?” Graduating high school, he goes to Friends University in Kansas, then Cincinnati Bible College. He’s remembered here for being weird. Like his talk of Jesus as a human man, capable of an erotic relationship. His messiah was a “lover,” and he’d go on about being “ravaged” by the divine. He grew his hair to shoulder-length. “His dad did not like it at all, and sometimes they fought about it,” his mother says. He launches a band called Zion. His bandmate Beth Snell Lutz recalls in a recent interview: “He had a lot of darkness in him. That was a constant wrestling for him.” All his life, friends refer to his ‘dark’ or ‘sinful’ side, his ‘temptation’, etc., without clarification. With funding from an uncle who believed in Mullins’ talent, Zion releases an album, Behold the Man. I love “Heaven in His Eyes.” But “Praise to the Lord” got the attention. He was reluctant to become a public person, initially refusing to sell the song to Amy Grant, who saw its potential to become her hit “Sing Your Praise to the Lord.” In a contribution to a 2017 book, Winds of Heaven, Stuff of Earth, Amy Grant writes: “I have been moved by a lot of songs, but when that song reached its iconic release point, I was levitating.” In Rich Mullins: A Ragamuffin’s Legacy, a friend recalls going to Nashville with him to prod him along. An industry gatekeeper, Jon Rivers, takes her aside and advises her that Mullins had talked about his “friends in Cincinnati,” and that he was in for a bumpy ride. It’s all kept vague. Was Mullins trying to be openly gay? Amy Grant writes about getting to know him, in the sanitized version for fans: He was disarmingly honest about his life and the things that he struggled with, and he came at things from a different angle, a different perspective. Many times in our conversations I would think, I hadn’t thought about it that way. He made lofty ideas about God so earthy. He humanized God. He humanized Jesus for me. Rich didn’t waste any time trying to be good, or at least trying to appear good. There’s a little bit of good and bad in every one of us. But what Rich wanted to know, what we all want to know, is that we are loved. But he’d have a dilemma. He keeps being told, and believes, he and his music are touched by God. But he’s also the Evangelical villain. No long after, he leaves Nashville. He says in 1995: “I was not going to be your typical run-of-the-mill, Pollyanna, goody-two shoes Christian musician. I became so boring trying to be bad that I gave up the pursuit.” But in a 1984 interview he’s striking a different note: “I felt I was getting self-obsessed there,” he says. “I’m really not a very career-oriented person. If I don’t enjoy what I’m doing for the sake of doing it, then I’ve lost integrity.” He works as a youth minister for several years. Later he gives vague interviews about a great battle with ‘secret sin’ happening at the time. In November 1995, to CCM, he discusses a key moment happening, as the reporter notes, “about 30 when he confronted the power of a secret sin and found a greater power in confession.” If he was around 30, then it happens around 1985. I was in Michigan, on my way to somewhere where I knew I ought not to be going. I started praying, ‘Oh God, why don’t you just make my car crash so I won’t get there because I can’t stop myself.’ I remember thinking that He said, ‘Yeah, you’re right. You can’t.’ I said, ‘Why can’t I? What I’m doing makes me sick.’ And it was as if God responded, ‘Yes, what you do makes me sick too, but what you are makes me sicker. You do what you do, because you are what you are. You can’t do otherwise.’ He drives to Cincinnati and confesses his ‘secret sin’ to friends. It was one of the most liberating things I have ever done. It’s not like I haven’t been tempted since that time. It’s not that I don’t still deal with the same sorts of things. I still have to make right choices. I still have to flee temptation. But the power of that sin was broken. He returns to Nashville and professional music. Amy Grant has him as the opening act on her 1986 tour. He releases a solo album, as he’ll note, “that nobody bought and that no one would play on the radio.” Then “Awesome God”—which, I’ve realized, is a homophobic and hateful song. Judgment and wrath He poured out on Sodom Mercy and grace He gave us at the cross Sung in 1988—against the backdrop of people dying of AIDS? Horrifying. A story circulates about the song’s writing. Rich was driving late at night to a youth concert in Colorado. To keep himself awake he imagines Southern preachers ranting, rolls down the window and starts ‘preaching’ to the wind. Is the song ventriloquizing a message he didn’t believe? Or might Mullins really be in self-attack over the thing he is. But “Awesome God” launches his solo career, and he becomes a star, and leader, of Christian music. In interviews, he talks about his struggling for “purity”— without details. At the same time, many of his songs are ripe for queer readings. In his 1991 hit, “Boy Like Me, Man Like You,” he and Jesus are two awkward guys meeting each other. Did the little girls giggle when you walked past? Did you wonder what it was that made them laugh? In 1992 song, “What Susan Said,” two “lonely-eyed boys in a pick-up truck” seem to be sexually attracted to each other, but keep up the God-talk that “love is found in the things we’ve given up…” He has a cover story. He tells it over and over. He was engaged in the 1970s. She broke it off. “I have no interest in anybody else and she is married to someone else, so that’s the way it goes, and I don’t mind that,” he says. “I think, you know, maybe God wanted me to be celibate and the way that he accomplished that was to break my heart.” The broken heart part—I believe. There’s no memories of a girlfriend noted by anyone. It was fiction for the press. He travels with young men. Early 20s, handsome, gifted. Fans approach him, not always getting what they expect. Mac Powell, future star of Third Day, recalls in a recent podcast he’d been touched and formed by Mullins’ music, and approached him after an Atlanta concert. Powell readies his fan speech. “Rich, I just want to tell you that your music has literally changed my life. It has given me a path to try to walk down. It’s helped encourage me in my faith. It literally has changed me.” Mullins stares at him a moment, and says, “Thanks!” And walks away. His concerts are celebratory, ecstatic events. They feel spiritual. It feels good to be Christian, to be Evangelical. He was never Evangelical himself. He was raised Quaker, and came to love a lot of Catholic influences. He always understood himself as a religious outsider. He explains in 1988: “I take comfort in knowing that it was the shepherds in whom the angels appeared when they announced Christ’s birth. Invariably throughout the course of history, God has appeared to people on the fringes.” What he came to love more than anything—was applause? In September 1995, he’s interviewed by the Arizona Republic. “There are times when I know that the overwhelming motivating factor for me is the acceptance and the applause of the audience,” he says. “So you feel like a total phony because you’re up there talking about all this great, grand stuff and you’re going, ‘The filthy truth is I’m saying this because they will clap.’” He decides to leave his career, to spend two years back in college, for a certification to teach music on a Navajo reservation in New Mexico. It was an unnecessary step. I have to reflect that he’s often putting himself in situations where there’d be young men who are jocks. “Mitch was just this basketball player who happened to be in this religion class I was in,” he explains of his latest partner-collaborator, Mitch McVicker. Mullins resists efforts to frame his leaving to New Mexico as him being a missionary, or being ‘spiritual’. “If you don’t love your neighbor where you live, you’re not going to love them in another place,” he tells the Greenville News. “I just happen to like this region, and so my neighbors are going to be Navajo.” His brother David Mullins recalls him saying he viewed the Navajo as “a shepherding culture, they work with sheep, so many Scriptures were written from that perspective. I went there to learn from them what I could about the Lord as our Good Shepherd.” He brings some five young men from the college down with him, and goes to work trying to create a sort of brotherly spiritual community, the ‘Kid Brothers of St. Frank’, after the example of Francis of Assisi. He still does concerts, and does interviews on the phone with newspapers around the country. He chats with the Indianapolis News in 1995. Everybody struggles. If people knew the stuff I struggled with, they would hate me . . . I do the best I can. I have failures and I don’t think Christianity is less true because I’m not an exemplary Christian. What I want to communicate to people is what I think is at the heart of the gospel, which is that God loves us. A young reporter for the Chicago Tribune spends a week in New Mexico, doing a profile. Today, Lou Carlozo doesn’t like the gay angle, but notes the intimacy of their few days together. “I slept with Rich Mullins—in the same way I slept with my kid brother as a kid,” he says. Mullins tells him, in the profile, that he isn’t sure why he’s ducking out of his career. “I don’t know if I’m afraid of success; I might be,” he says. “I can make records for the rest of my life and talk about love, but it won’t mean anything until I love somebody.” “It all seems ironic and weird to me,” he adds. “I’m thankful for it, but I never had any ambitions in Christian music.” Why is he on the reservation? He replies: “For me, it’s much more to work out my own salvation with fear and trembling.” It’s fine if his celebrity fades. “If it continues, that’d be fine,” he says. “If it doesn’t, that’d be fine. I’ve had more than my 15 minutes.” I’m startled by the narration of this profile. The dynamics of new life in New Mexico are as complex as Mullins himself — a man who in conversation reveres St. Francis of Assisi, then forgets the name of the sitting U.S. president; who seeks to quench a spiritual thirst and lives on fast-food milkshakes and Diet Coke; who plays dulcimer with a weaver’s grace but dismisses himself as a “mediocre” musician; who is finding God in the desert, even while losing his keys in the living room. Milkshakes. I’ve heard that detail—in narratives of AIDS patients. He leaves his job as a music teacher on the reservation. It was a fundamentalist Christian school and he wasn’t one, is the story he tells. “And I can respect that,” he says. “We both agreed that I don’t really need to be there right now, just because I don’t get fundamentalists, and I don’t really know that I want to be stuck with a bunch of ‘em.” In early 1997, he’s at a retreat, writing a letter. He’s pretending he’s his father, who’d long since died. He’s John Mullins writing from Heaven to his suffering son. “I didn’t know I was supposed to be affectionate — I thought that was soft. I thought a man had to be hard.” A kindly man’s monologue. Contrite, amusing. Various biblical figures, also in Heaven, help out. It goes on and on. In the room next door at the resort north of Atlanta was Brennan Manning, the ex-Catholic priest who’d written The Ragamuffin Gospel, which had become a narrative helping to define and brand a kinder and gentler Christianity. He recalls of the moment: “I heard sobbing and wailing so loud that I started crying myself.” The crux of Mullins’ biography can seem to be his painful relationship with his dad. I keep thinking there might be more entries to this subject. In a April 1997 interview, he‘s telling a story of a “friend of mine” who’d been a youth pastor of a church, and realizing he was gay. “And he, uh, finally really came to a—a crisis about this. He was going, ‘Gosh I feel like I’m a phony because I, you know, I go to church and I tell kids all this stuff.’” The youth group pastor was thinking of having a gay relationship. “I’m not sure if you can call that a marriage or if you shouldn’t call it— I don’t know what to call it.” This youth group pastor went to Rich Mullins’ father to talk about it. “You know, what should I do?” he asks the older man. And my Dad said, “You need to decide what’s most important to you and do it. You can’t do everything. And uh, you know what the Bible teaches and uh, decide if you can live with the Bible or if you can live without it. He came out to his father? Who kicked him out of the faith. Mullins talks about the gay thing a lot. In concerts he tells a story about how he was at a restaurant when a man strikes up a conversation, then offers to give him a ride. CCM, the industry magazine, later prints a transcript. It was news. “I probably ought to tell you that I’m gay,” says the man from the restaurant. “I probably ought to tell you that I’m Christian,” Mullins replies. Hmm. Doesn’t God say to hate gays? Mullins replies, in his dialogue: “My understanding of what Christ told us was that Christians were to love. I didn’t know there were a lot of parameters set on that.” Is AIDS a punishment by God, the man asks? Mullins replies: “Well possibly, in the same sense that presidents are God’s punishment on voters. I mean there are consequences. We make choices, and there are natural consequences for those choices.” Interviewed by interview to Les Sussman for a posthumously published book he lays out a narrative of his life. He clarifies his new theology. “Jesus message is not to be good boys and girls so that when you die you can go to heaven,” he says. “The message of Jesus is ‘I love you. I love you so deeply it kills me.’” He speaks of his life, in new detail. “From my junior year of high school until age thirty I felt tormented all the time. I was depressed. I just think I have that sort of personality.” He adds there was “more than ten years of darkness where I felt tormented all the time.” The “ten years” bit is similar to the story of Mullins’ one great love. A typical rendition: “I had a ten year thing with this girl and I would often wonder why, even in those most intimate moments of our relationship, I would still feel really lonely.” He says he wrote a song, “Doubly Good to You,” recorded by Amy Grant for Straight Ahead (1984), for use in his planned wedding. The line is often repeated, though the song has no gendered references. He’d say his song “Damascus Road,” recorded for his Brother’s Keeper album in 1995, was written after his fiancé broke up with him. The song has no reference to a girl. It’s about Jesus intervening in his life when he’d been intent on his career. By 1996, his love song days are over. “I haven’t been in love in so many years that I don’t think I could write a very good love song,” he says. At the same time, in other interviews, he continues to praise sexual “purity”—as in a story he tells of a young man whose girlfriend wants to have sex. The guy chooses to be faithful to Christ; he chooses to say, “Purity is important and I’m going to choose obedience to Christ over obedience to my instincts.” His girlfriend may go, “Man, you’re a wacko. Man, you’re a pud.” He may lose her, and that will hurt. That’s going to burn. But that’s the kind of fire that will purify him. Toward the end, there’s a wasting. As Jeremy Klaszus observes: “In his last months he looked like hell — haggard with big bags under his eyes. A man passing through. He seemed almost to know what was coming.” Mullins explains his worn appearance as from being so long on tour. People come to interview him. How does he, a super duper Christian, manage to live among Native Americans? “The same way I dealt with living in Middle America,” he replies. “I think most Middle-American beliefs are in direct conflict with the scriptures.” In March 1997: “I really came here more to try to get beyond my white, middle-class Protestant upbringing and see life through a different lens.” In June 1997, CCM is doing a feature on AIDS and quotes him. Mullins seems more concerned with the general Evangelical approach to homosexuality. “It seems like the church has picked homosexuality out to be the ultimate evil thing, and I’m just not always sure that it is.” He’s working on a new album, The Jesus Record, narrating the birth and rise of the messiah. It’s as if Jesus is born once again in the wilderness, among the shepherds. In late concerts, at age 40, he seems to be taking leave of this life. In a concert, as quoted by Smith, he speaks of his coming resurrected form: “I’ll have no bags under my eyes. I’ll have a jaw line, biceps, the whole works. I’ll be a jock. Either a jock or a fife player, I have decided which.” A church friend, interviewed in Rich Mullins: A Ragamuffin’s Legacy, recalls Mullins calling and saying plans for work on the reservation were being dropped: “My health has been bad. I don’t know what’s going on or why. I just know I’m not going to be able to do this.” I wonder if there’s two possible narratives. In the one adopted by Mullins biographers and fans, he was in decent shape at the time of his accident. In an alternate narrative, Mullins may have gotten a diagnosis of HIV and structured the last years of his life to try and be unstressed, yet productive. In this hypothetical timeline, he arranges for his decline to be little noticed. He’d work on an exit from public life, and then, from life. In one of his many surprise appearances, in September 1997, Mullins stays at the home of young Caleb Kruse, who remembers the three week visit in a 2016 memoir, Meeting Rich. If he was expected to have superstar ways, he didn’t. Caleb writes: “When he spoke, he was polite. Almost even shy.” Mullins explains his worn appearance by saying he’s been busy. They had multiple musical projects in progress. (In Rich Mullins: A Ragamuffin’s Legacy, a friend recalls: “He was real, real tired. Real tired.”) He gives an impromptu concert in the house, with talky interludes. “I wanted to be a jock, but I don’t have any athletic skills at all,” he says. He speaks of the house where he’d lived in Cincinnati as a struggling college student. “And I had so little money, I was in the attic with one other guy. And we had to sleep together for the two years I lived there, because he had an electric blanket. I woke him up one night, my teeth were chattering so loud. He said, ‘Why don’t you just sleep with me? That way, I can get some sleep and you can too.’” During the stay, Caleb’s mom has an odd moment where she wonders if something’s amiss. “I just need to ask,” she says, “are you okay?” “Yeah,” Mullins says. “I just feel like something’s wrong,” she says. “Don’t worry,” he says. Mitch McVicker, Rich Mullins, Caleb Kruse (credit: Meeting Rich) Mullins and Mitch McVicker leave for an event. Who was driving, southbound on I-39 north of Bloomington, Illinois, isn’t known. McVicker later has memory loss. Mullins might’ve died from his initial ejection. The semi truck didn’t help. Pam Destri, an EMT called to the scene, is later interviewed about meeting him in death. “He had such an angelic face,” she recalls. “I really thought he was a young man, like young, like 15, 16.” Wrapping up, Amy Grant recalls that time she was at a radio station, and people ask her to talk about the “real” Rich Mullins. So she throws out some “shocker stories.” “Everybody in the radio station was very conservative and they kinda withdrew, and dropped the subject,” she adds. “And I thought: ‘You wanted to really know him.’”
https://medium.com/belover/the-queer-love-of-rich-mullins-f14170612b63
['Jonathan Poletti']
2020-09-19 22:00:12.149000+00:00
['Christianity', 'Creative Non Fiction', 'LGBTQ', 'History', 'Music']
.NET Core Code Quality with Coverlet and SonarQube
By Sandeep Anantha Organizations that embrace continuous integration and continuous delivery (CI/CD) reap enormous benefits when rolling out their products — if you’re new to the subject, you can read more about CI/CD here. The reason that CI/CD works is that code is built, tests are run and code is deployed as soon as the code is checked in. As CI/CD catches problems as soon as the source code is checked in, this puts the onus on developers to write code that is efficient and bug-free, thus making them accountable for their code. The idea that code is deployed continuously even before it is QA’ed, seems like a significant risk to some. But if we fortify the code with tests to ensure every piece of code is covered by these tests, then we can be reasonably confident that the code the developer checks in does not break the larger code. Of course for this strategy to work, test driven development (TDD) has to be practiced and automated tests have to be written religiously for every piece of code. However, the effectiveness of CI/CD will largely depend on how well tests are written, how extensive they are, and how subjective they are. As the ultimate value of CI/CD will depend on code quality, and having continuously good code quality. If you have tests that don’t cover critical pieces of code, then you may end up with many false positives leading to compromised code quality. To avoid this, code reviews should be conducted, but be aware that reviews are also subjective and bugs can slip through the cracks. When conducting a code review, a big part of what you’re doing is identifying smells. Code smells are common knowledge these days and there are many resources available to identify code smells. Though, it can be daunting to manually find code smells in every code review. Imagine a tool that can help you define custom rules, in addition to the common code smell patterns, externalize these rules and have the flexibility to apply them to the code at the project level, department level, or at the enterprise level…Meet: SonarQube. SonarQube is a service that can scan code in 25+ languages and identify smells, vulnerabilities, and bugs. SonarQube is a big step toward automating development operations (DevOps) as it enables continuous code inspection that will improve code quality and ensures clean code. Since SonarQube is open source, it can easily be integrated right into your CI/CD process, which will enable continuous inspection of code for bugs, vulnerabilities, and smells, and can be extended. SonarQube can also be extended by using plugins. For example, you can use the CodeAnalyzer plugin to measure cyclomatic complexity. With so many CI/CD tools available, like Jenkins, Cruise Control, etc., this blog will focus on externalizing SonarQube integration into a shell script. Since shell script is generic and cross-platform, it can be called from any CI/CD tool of your choice. Given the core capabilities of SonarQube, it can be used to smooth out the rollout process to production. Imagine the hurdles that a development team faces before going to production at the eleventh hour. They have to go through a long checklist of processes; one among them is the mandatory approval by the enterprise security team, which is often responsible to go through the code, analyze it, and block deployment if they see any issues or vulnerabilities. Development teams have to go through each of the concerns, address them, refactor the code, and submit it for deployment again. This can happen multiple times depending on the quality of the code and can lead to crucial time lost, increasing time to market, and can lead to burnout and stress on the team. Imagine if we could detect and fix all these potential bugs and vulnerabilities early on, right when the code is checked in. This would take little effort to fix them early while still in dev., leaving the teams happy and assured. SonarQube will help you in this endeavor. SonarQube feeds on the coverage reports and analyzes .NET assemblies and generates reports of its own that include vulnerabilities, bugs, and code smells. It also reports the asymptotic complexity of the code. Apart from these obvious benefits, SonarQube can automate gating of deployments on the server. Should the coverage fail beyond a threshold, or if a bug has been detected, SonarQube can report them to the team and block the deployment. In the next part of this blog series, we will go over how to scan the C# code on .NET Core platform via SonarQube and in the third, how to enable quality gates. Stay tuned!
https://medium.com/tribalscale/net-core-code-quality-with-coverlet-and-sonarqube-1372e5bb1b71
['Tribalscale Inc.']
2019-04-10 15:04:01.247000+00:00
['Software Development', 'Continuous Integration', 'Sonarqube', 'Development', 'Net Core']
The best big data visualisation techniques
Nowadays, various industries collect data daily and have access to technological tools and technique to extract useful insights from it. To get the most from their gathered data, enterprises need to visualise it correctly. So, in this post, we’ve outlined the best big data visualisation techniques. Over the years, many visualisation techniques have been developed, allowing companies to analyse information along with showing it. Nowadays, the most used visualisation methodologies include histogram, line plot, pie chart, table, bar chart, flow chart, scatter plot and treemap. Histogram A histogram represents the distribution of a continuous variable over a while. This technique usually shows data in Machine Learning along with underlining frequency distribution, skewness and outliers. Line plot This is the most simple big data visualisation technique. It represents the relationship and dependence of one variable to another. Pie chart Mostly used in presentations, these graphics show the proportions and percentages between categories by dividing a circle into equal sections. Each arc length mirrors a proportion of each class, while the full circle is the sum of information and is equivalent to 100%. Pie charts allow readers to have a quick idea of the proportional data allocation. Table This type of methodology compares quantities of different categories or groups. Bars represent values and can be horizontal or vertical, with their length or hight depending on the rate. Bar chart This type of methodology compares quantities of different categories or groups. Bars represent values and can be horizontal or vertical, with their length or hight depending on the rate. Flow chart A flowchart is a diagram describing processes and is composed of blocks connected by arrows. Each block contains data of a step in the process while arrows establish the direction of the flow. Scatter plot Scatter plots represent a shared variation of two data items. Each marker of the plot represent an observation and its position indicate the observation value. When more than two aspects are considered, a scatter plot matrix is generated; this is a series of graphics showing every possible pairing of the variables considered in the visualisation. Treemap Treemaps display a large volume of hierarchically structured data. These maps are composed of different rectangles which sizes and orders depend on a quantitative variable. Rectangles show the hierarchical levels of treemaps. Quadrilaterals at the same hierarchical level represent a column or an expression in a table, while each rectangle denotes a category in a column. When working with big data, many businesses have issues to show the information analysis results in a meaningful and clear way. However, by using specific tools and techniques, enterprises can get over to this challenge. Do you use any of the methodologies outlined above? Let us known by commenting below!
https://medium.com/dative-io/the-best-big-data-visualisation-techniques-6b748d3dac5e
['Roberta Nicora']
2020-01-02 08:46:02.749000+00:00
['Data Analysis', 'Big Data', 'Data Visualization', 'Information']
Laravel and Vue JS: Advanced Frontend Webapp Architecture
Part 1: using this.app in each view Quick Note: In coffeescript, saying @var and this.var results in the same code. I prefer the first way, but you don’t have to. First, let’s go to the main HTML file that contains the <component is=“{{ currentView}}”>. We need to add the app as a prop to that. So, change that to <component is=“{{currentView}}” app=“{{@ app }}”></component> . If you’ve used Vue before you’ll be familiar with the mustache syntax, but the {{@ might leave you a little confused. Basically, it says pass the app into the component, but if the component makes a change to the app, reflect it in the scope that contains the component too. In other words it enforces two-way binding. If you didn’t have the @, you could do something to the app in the view and then nothing would happen anywhere else! Of course, if you are in a .blade.php file, change that to <component is=“@{{currentView}}” app=“@{{@ app }}”></component> so Laravel doesn’t get confused and try to look for a currentView and app constant. Also, in order to make things run better, you may want to add keep-alive to the end of the <component> tag. It basically keeps the current view alive in the background instead of deleting it, so if you change currentView back to it Vue doesn’t have to do more work. However, if you want to get updated data anytime the user changes views, it would be very easy to just remove keep-alive so that the ready method is recalled on the component. Next, we need to make sure that app is added a valid props array for each view. In the module.exports array, go add an array called props if it does not already exist. Next, add a string called ‘app’ to it. Here’s an example: views/analytics.js Finally, we need to configure our app.js file to have an app variable that points to itself. Add app: {} to its data object. Then, add a created method to the app. In it, say this.app = this; . You’re done! You now have access to the master app in each view. Why a created method, instead of a ready method, you may ask? Because created is called before the DOM is evaluated, meaning Vue doesn’t even know the components have been instantiated yet. What this all amounts to is that the app variable is ready the moment the views are! If you need access to the master app in a component, you need to pass it in as a prop. In the component’s module.exports, add ‘app’ to the props array. Then, just like before, whenever you instantiate the component using app=“{{@ app }}” . You can use this for any component. Part 2: setting data for a particular view from other views or the main app Since components are only loaded if you have component is set to them at one point in the app’s lifecycle, you can’t reliably access them directly from this.app. Instead, you can set data for them in this.app then pull it in the views. This is easier than it sounds! In app.js, add a new object to the data object, and call it viewData. In it add a name of each view you want to set data for and point it to an empty object. Example: app.js To set that data from a view, just go this.app.viewData[‘about-view’][‘foo’] = ‘bar’; . Then, to get it from the about-view, just go this.app.viewData[‘about-view’][‘foo’]. You could also shorten that by going into the ready method and adding: this.external = this.app.viewData[‘about-view’]. Be sure to add external as an empty object to the data function. Now you can just say this.external.foo to access it. Example: views/analytics.js This part really is just an example of taking advantage of the global access to the app’s data, nothing more. So take it with a grain of salt, because the real power is in Part 1 and 3. Part 3: calling view functions This is undoubtedly the most involved yet most useful part of this tutorial. For example, if I have a search bar in my navbar component, yet want to call a function in the search-results view, there is no good way to do it until now. We need to be able to call functions if a view has been instantiated and if it hasn’t been. If it has been, we can just say viewModel[functionName](). If it hasn’t, doing so will result in an error. So we need to account for both situations… Let’s add an setting to each view’s data in app.js called ready. Make it to default to false. Then, in the ready() function in each view, say this.external.ready = true; . Next, add an array called funcs_to_call . If the view has not been instantiated yet, we can add the name of the function to the array so the view can call it later in its ready() method. To call the function on another view, we can say this.app.call(‘search-view’, ‘search’); This will call search-view.search() . If the view is instantiated, we can just call it directly. Otherwise, we have a little bit of a harder job. Let’s deal with the first scenario first. Each view in viewData we need to have ready, funcs_to_call, and model. In each view’s ready() function, we need to set ready to true and model to this. Example: views/analytics.js This allows us to call the functions easily. In app.js, lets add a new method to the methods object called call(). Look at the gist below to see how it works: app.js Basically, it just tests if the view is ready. If it is, then it calls it using array syntax magic. Let’s do a test of our own: go to analytics-view.js and replace it to the following code: views/analytics.js When you load the page, it should instantly pop up with ‘i got called!’ as soon as the view is set in currentView! Now we need to figure out what to do if ready is set to false. First, we just need to add the method name to the array, right? Add an else statement to the call method in app.js to push the function name onto an array: app.js Now we just need to check on ready() functions if there’s anything on the funcs_to_call array and call them if they exist. Add this to the end of the ready() function: views/analytics.js Now, when the view is loaded, it runs the method that was called!!! Closing To close it up, here’s the two files we’ve been working on, completed and done. app.blade.php app.js views/analytics.js Completed file structure. Here my view’s name is home instead of analytics, and I chose to use coffeescript instead of vanilla javascript, but the same principles apply. You can use these two files as templates when using this design architecture in the future! I know I will. To the left is the file structure I have for the Laravue repo. There are a couple of differences though: 1) I have a home view not an analytics view, and 2) I use coffeescript instead of vanilla JS. These aren’t biggies though! What now? In the future, I’ll no doubt be optimizing this and making it better. If you have any suggestions, just leave a response below! Your input is essential because the only way this can thrive is through community involvement. The only way this can thrive is through community involvement. In the future I may make a way to combine the ready and model variables in viewData functionally into one. But the additional code required may be more than I actually save, so I’m not sure on this one. Something else I feel like this needs is a CLI. How about maybe php artisan make:view analytics and it will add all this boilerplate? Just an idea. Let me know if you’re interested in doing anything like this, because I think might be a bit beyond me. For more info on how calling functions on objects using a string check out http://stackoverflow.com/questions/9854995/javascript-dynamically-invoke-object-method-from-string . It helped me out allot. UPDATE: allow for arguments passed into view methods! Now you can do this.app.call(‘foo’, ‘bar’, [‘arg1’, ‘arg2’, ‘arg3’]) and it will pass the array into the method. To retrieve them in a method just do args[0], args[1], args[2]. If you’re using coffeescript, it’s even easier! You can just use the … syntax for arguments. Yes, it’s technically possible without coffee, but it would look pretty ugly… Anyways here’s the coffeescript example: Any input is highly welcome!
https://medium.com/laravel-news/advanced-front-end-setup-with-vue-js-laravel-e9fbd7e89fe2
['Russ Weas']
2017-04-02 04:07:01.375000+00:00
['Laravel', 'JavaScript', 'Vuejs', 'Tutorial']
39. Slowdown landscapes: The defiant garden produces social justice as well as strawberries
39. Slowdown landscapes: The defiant garden produces social justice as well as strawberries Small green pieces of urban farms, repairing vacant lots in in Los Angeles and Brooklyn Lest the remove to Jarman’s small pieces of isolated beach suggests a self-sufficiency too easily elided with individualisation, a form of privatisation even, the emphasis on loosely joined becomes a fundamental patterning dynamic. At core, we understand that all these systems and cultures are connected — that ‘off-grid’ is not possible, technically and politically. This, too, should be understood as a participative process. As Latour writes, in his plea for us to focus on the Terrestrial plane: “each of the beings that participate in the composition of a dwelling place has its own way of identifying what is local and what is global, and of defining its entanglements with the others.” “The only real things in life are food and love in that order.” — David Hockney So caring for a garden, whether literally or metaphorically, is quite different to an individualism that exemplifies much of the Acceleration. Equally, the way that gardens, in the richest sense of the concept, pollinates or spreads roots, cannot be an autarkic self-sufficient bioregionalist vision either. Again, this recalls Val Plumwood’s firm critique of a simplistic bioregionalism as creating ‘shadow places’, in which footprint is simply exported, as if there was such a thing as an ‘externality’ in a world where everything is connected; or as Timothy Morton put it “‘somewhere else’ is just the same place, you’re just moving some kind of pollution around within a system.” ‘Dirk Gently’s Holistic Detective Agency’, by Douglas Adams (1987), was perhaps the first time I became aware of what Adams dubbed ‘the fundamental interconnectedness of all things’. It has stuck with me ever since. There are natural connections, then, and also connections in terms of practice, of perspective. Through this lens, Jarman’s beach is connected directly to Ron Finley’s work, planting and cultivating gardens in South Central Los Angeles. With a gardener’s spin on De Monchaux’s vision of a distributed infrastructure, Finley has calculated there are 26 square miles of vacant lots in the city, or around 20 Central Parks. These forms of gardens necessarily embody the care-ful slowness that we must find a way of working with. Although Finley clearly describes how they might scale, growing tomatoes is not exactly a ‘fail fast’ ‘blitzscaling’ dynamic, particularly when attempted in a converted LA parking lot.
https://medium.com/slowdown-papers/39-slowdown-landscapes-the-defiant-garden-produces-social-justice-as-well-as-strawberries-b415c876a051
['Dan Hill']
2020-09-28 20:34:09.709000+00:00
['Cities', 'Food', 'Gardening', 'Racism', 'Health']
Best 5 free stock market APIs in 2020
Photo by Chris Li on Unsplash The financial APIs market grows so quickly that last year’s post or platform is not a good choice this year. So in this story, I will show you the best 5 stock market APIs that I use in 2019. What is stock market data API? Stock market data APIs offer real-time or historical data on financial assets that are currently being traded in the markets. These APIs usually offer prices of public stocks, ETFs, ETNs. These data can be used for generating technical indicators which are the foundation to build trading strategies and monitor the market. Data In this story, I mainly care about price information. For other data, there are some other APIs mainly for that use cases which will not be covered here. I will talk about the following APIs and where they can be used: Yahoo Finance Google Finance in Google Sheets IEX Cloud AlphaVantage World trading data Other APIs (Polygon.io, Intrinio, Quandl) 1. Yahoo Finance Docs: yfinance Yahoo Finance API was shut down in 2017. So you can see a lot of posts about alternatives for Yahoo Finance. However, it went back sometime in 2019. So you can still use Yahoo Finance to get free stock market data. Yahoo’s API was the gold standard for stock-data APIs employed by both individual and enterprise-level users. Yahoo Finance provides access to more than 5 years of daily OHLC price data. And it’s free and reliable. There’s a new python module yfinance that wraps the new Yahoo Finance API, and you can just use it. # To install yfinance before you use it. > pip install yfinance Below is an example of how to use the API. Check out the Github link above to see the full document, and you are good to go. Google Finance is deprecated in 2012. However, it doesn’t shut down all the features. There’s a feature in Google Sheets that support you get stock marketing data. And it’s called GOOGLEFINANCE in Google Sheets. The way it works is to type something like below and you will get the last stock price. GOOGLEFINANCE("GOOG", "price") Syntax is: GOOGLEFINANCE(ticker, [attribute], [start_date], [end_date|num_days], [interval]) ticker: The ticker symbol for the security to consider. The ticker symbol for the security to consider. attribute (Optional, "price" by default ): The attribute to fetch about ticker from Google Finance. (Optional, by default ): The attribute to fetch about from Google Finance. start_date (Optional): The start date when fetching historical data. (Optional): The start date when fetching historical data. end_date|num_days (Optional): The end date when fetching historical data, or the number of days from start_date for which to return data. (Optional): The end date when fetching historical data, or the number of days from for which to return data. interval(Optional): The frequency of returned data; either "DAILY" or "WEEKLY". An example of use is attached. 3. IEX Cloud Website: https://iexcloud.io/ IEX Cloud is a new financial service just released this year. It’s an independent business separate from IEX Group’s flagship stock exchange, is a high-performance, financial data platform that connects developers and financial data creators. It’s very cheap compared to other subscription services. $9/month you almost can get all the data you need. Also, the basic free trial, you already get 500,000 core message free for each month. There’s a python module to wrap their APIs. You can easily check it out: iexfinance 4. Alphavantage Website: https://www.alphavantage.co/ Alpha Vantage Inc. is a leading provider of various free APIs. It provides APIs to gain access to historical and real-time stock data, FX-data, and cryptocurrency data. With Alphavantage you can perform up to 5 API-requests per minute and 500 API requests per day. 30 API requests per minute with $29.9/month. 5. World trading data Website: https://www.worldtradingdata.com/ Also, full intraday data API and currency API access are given. For those who need more data points, plans from $8 per month to $ 32 per month are available. Right now there are four different plans available. For free access, you can get up to 5 stocks per request (real-time API). Up to 250 total requests per day. The subscription plan is not that expensive, and you can get a They provide URL and your response will be JSON format. There’s currently no available python module to wrap their API yet. So you have to use requests or other web modules to wrap their APIs. 6. Other APIs Website: https://polygon.io It’s $199/month only for the US stock market. This is might be not a good choice for beginners. Website: https://intrinio.com It’s $75/month only for the realtime stock market. Also, for EOD price data, it’s $40/month. You can get EOD price data almost free from other APIs I suggest. Even though they have 206 pricing feeds, ten financial data feeds and tons of other data to subscribe. The price is not that friendly for independent traders. Website: https://www.quandl.com/ Quandl is an aggregated marketplace for financial, economic and other related APIs. Quandl aggregates APIs from third-party marketplaces as services for users to purchase whatever APIs they want to use. So you need to subscribe to the different marketplace to get different financial data. And different APIs will have different price systems. Some are free and others are subscription-based or one-time-purchase based. Also, Quandl has an analysis tool inside its website. Quandl is a good platform if you don’t care about money. Wrap Up Learning and building a trading system is not easy. But the financial data is the foundation of all. If you have any questions, please ask them below.
https://towardsdatascience.com/best-5-free-stock-market-apis-in-2019-ad91dddec984
['Shen Huang']
2020-03-09 02:15:48.488000+00:00
['Python', 'API', 'Data', 'Stock Market', 'Programming']
A Beginner’s guide to Dynamic Routing in Next.js
How to create dynamic routes in Next.js As mentioned in the tutorial on static routing, Next.js defines routes based on the concept of pages . What does that mean? Every Next.js project comes with a pages folder. The structure of the pages folder determines the structure of your routes and every file inside that folder maps to a route in your application. Essentially, every time you want to create a route, you need to add a file in the pages folder. Keep in mind that the pages folder itself represents your root url (meaning /). For static routing, you can create a new route by adding a index.js or a named file like about.js. pages/about.js maps to /about Tip: For more info on how to create static routes (including nested routes), read my tutorial on static routing in Next.js. But how does it work for dynamic routes? Say I wanted to create a blog, how would I add a route such as myblog.com/posts/:id? Next.js handles dynamic routes by supporting brackets around parameters (e.g [id]) as a filename. Going back to my blog example, I would therefore create a [id].js file inside my posts folder. As a result, /pages/posts/[id].js would map to /posts/[id] where id is the unique id of your post. Dynamic Nested Routes in Next.js Can I create dynamic nested routes? Say I wanted a page for comments related to a particular post, could I have a url such as /posts/[id]/[commentId]? The answer is Yes! For nested routes, you have to create a folder instead of a file. The syntax stays the same meaning that your folder would be called [id] . You can then add new routes inside. Here is the end result: pages/ │ index.js -> url: / │ └───posts/ | index.js -> url: /posts | └─── [id]/ index.js -> url: /posts/[id] commentId.js -> url: /posts/[id]/[commentId] Now that all our routes are set up, let’s explore how to navigate between the different pages.
https://medium.com/javascript-in-plain-english/a-beginners-guide-to-dynamic-routing-in-next-js-13fc48557649
['Marie Starck']
2020-12-11 08:53:18.672000+00:00
['JavaScript', 'Web Development', 'React', 'Nextjs', 'Programming']
An Introduction to Feature Engineering: Feature Importance
After having read the first article of this series, devoted to figure out a way to tackle a Machine Learning (ML) competition, we are now ready to go on with Feature Engineering, and, in particular Feature Importance. The real deal is that nobody explicitly tells you what feature engineering is, in some way, you are expected to understand for yourself what are good features. Feature engineering is another topic which doesn’t seem to merit any review papers or books, or even chapters in books, but it is absolutely vital to ML success. […] Much of the success of machine learning is actually success in engineering features that a learner can understand. (Scott Locklin, in “Neglected machine learning ideas”) Let’s try to figure out what feature engineering is. In solving such problems, our goal is to get the best possible result from a model. In order to achieve that, we need to extract useful information and get the most from what we have. On one side, this includes getting the best possible result from the algorithms we are employing. On the other side, it also involves getting the most out of the available data. How do we get the most out of our data for predictive modeling? Feature engineering tries to find an answer to this question. Actually, the success of all Machine Learning algorithms depends on how you present the data. ( Mohammad Pezeshki, answer to “What are some general tips on feature selection and engineering that every data scientist should know?”) Feature Importance Feature importance refers to a bunch of techniques that assign a score to input features based on how useful they are at predicting a target variable. These scores play an important role in predictive modeling, they usually provide useful insights into the dataset and the basis for dimensionality reduction and feature selection. Feature importance scores can be calculated both for regression and classification problems. These scores can be used in a range of situations, such as: Better understanding the data: the relative scorse can highlight which features may be most relevant to the target, and on the other side, which are least relevant. This could be a useful notion for a domain expert and could be used as a basis for gathering more or different data. Better understanding a model: inspecting the importance score provides insights into the specific model we’re using and which features are the most important to the model when elaborating a prediction. Reducing the number of input features: we can use the importance scores to select those features to delete (lowest score) and those to keep (highest scores). Now let’s jot down a few lines of code in order to grasp this topic in a better way. In order to explore feature importance scores, we’ll import a few test datasets directly from sklearn. Classification Dataset Easy peasy, we can use the make_classification() function to create a test binary classification dataset. We can specify the number of samples and the number of features, some of them are going to be informative and the remaining redundant. (Tip: you should fix the random seed, in this way you’ll get a reproducible result) Regression Dataset In a parallel fashion, we’ll use the make_regression() function to create a regression dataset. Coefficients as Feature Importance When we think about linear machine learning algorithms, we always fit a model where the prediction is the weighted sum of the input values (e.g. linear regression, logistic regression, ridge regression etc..) These coefficients can be used directly as naive feature importance scores. Firstly we’ll fit a model on the dataset to find the coefficients, then summarize the importance scores for each input feature and create a bar chart to get an idea of the relative importance. Linear Regression Feature Importance It’s time to fit a LinearRegression() model on the regression dataset and get the coef_ property that contains the coefficients. The only assumption is that the input variables have the same scale or have been scaled prior to fitting the model. This same approach can be used with regularized linear models, such as Ridge and ElasticNet. Logistic Regression Feature Importance In a similar fashion, we can do the same to fit a LogisticRegression() model. Recall that this is a classification problem with classes 0 and 1 (binary). Notice that the coefficients are both positive and negative, positive scores indicate a feature that predicts class 1 while negative scores indicate a feature that predicts class 0. Why can’t we analyze a regression problem with Logistic Regression? (A pretty naive question, try to answer tho) Decision Tree Feature Importance Decision Tree algorithms like Classification And Regression Trees ( CART) offer importance scores based on the reduction in the criterion used to select split points, like Gini or Entropy. This approach can be also used for ensembles of decision trees, such as Random Forest and Gradient Boositng algorithms. We can directly use the CART algorithm for feature importance implemented in Scikit-Learn as the DecisionTreeRegressor and DecisionTreeClassifier. The model provides a feature_importances_ property that tells us the relative importance scores for each feature. CART Regression Feature Importance CART Classification Feature Importance Random Forest Feature Importance Analogously, we can use the RandomForest algorithm for feature importance implemented in scikit-learn as the RandomForestRegressor and RandomForestClassifier. As above, the model provides a feature_importances_ property. Random Forest Regression Feature Importance Random Forest Classification Feature Importance XGBoost Feature Importance XGBoost is a Python library that provides an efficient implementation of the stochastic gradient boostig algorithm. (For an introduction to Boosted Trees, you can take a look here) This algorithm can be integrated with Scikit-Learn via the XGBRegressor and XGBClassifier classes. Even in this one, we can find the feature_importances_ property. First, let’s install the XGBoost library, with pip: Now, let’s take a look at an example of XGBoost for feature importance. XGBoost Regression Feature Importance XGBoost Classification Feature Importance Permutation feature importance is a technique for calculating relative importance scores that is independent of the model used. It measures the increase in the prediction error of the model after we permuted the feature’s values, which breaks the relationship between the feature and the true outcome. The concept is really straightforward: we measure the importance of a feature by calculating the increase in the model’s prediction error after permuting the feature. A feature is “important” if shuffling its values increases the model error, because in this case the model relied on the feature for the prediction. A feature is “unimportant” if shuffling its values leaves the model error unchanged, because in this case the model ignored the feature for the prediction. Permutation feature selection can be used via the permutation_importance() function that take a fit model, a dataset and a scoring function. Let’s try this approach with an algorithm that doesn’t support feature selection natively, KNN (K-Nearest Neighbors). Permutation Feature Importance for Regression Permutation Feature Importance for Classification Feature Selection with Importance Feature importance scores can be used to find useful insights and interpret the data, but they can also be used directly to help rank and select features that are most useful. This procedure is usually referred as Feature Selection, and we’ll look at it in more detail soon. In our case, we can show how is possible to find redundant features by using the previously shown techniques. Firstly, we can split the dataset into train and test sets, train a model on the training set, make predictions on the test set and evaluate the results by employing classification accuracy. We’ll use a Logistic Regression model to fit our data. In this case, we can see that our model achieved a classification accuracy of about 86.67 % using all the features in the dataset. Let’s see what happens if we select only relevant features. We could use any of the feature importance scores above, but in this case we’ll use the ones provided by random forest. We can use the SelectFromModel class to define both the model abd the number of features to select. This will calculate the importance scores that can be used to rank all input features. We can then apply the method as a transform to select a subset of 5 most important features from the dataset. This transform will be applied to the training set and the test set. We can wrap up every piece and get this code snippet. In this case, we can see that the model achieves the same performance on the dataset, although with almost half of the features.
https://medium.com/mljcunito/an-introduction-to-feature-engineering-feature-importance-7e8265eb3a36
['Simone Azeglio']
2020-08-18 12:39:48.930000+00:00
['Machine Learning', 'Mljcunito', 'Data Science', 'Python', 'Data Analysis']
Pre-check your Body in less than 10 minutes
Signal #1 Cracking sound in joints. Do your knees make cracking sounds when you bend them? or do the joints of your arms crack often? If the answer is yes to either of the questions, then it is a clear sign of Calcium deficiency in the body. Calcium is responsible for strong bones and teeth. Low calcium levels over the period of time might lead to Arthritis. Solution: First, say “NO” to synthetic calcium tablets. Do not waste your money on such tablets instead include the following things in your diet - Milk Products Peanut Butter Natural remedy- A pinch of calcium carbonate in curd on an empty stomach. Take it regularly for 2–3 months and it will improve the calcium level in your body. If needed, you can replace the curd with water. Signal #2 Gum bleeding while brushing teeth. That means your body is screaming and telling you that it is deficient in Vitamin C. At the cellular level, even arteries are bleeding. Make sure you act on this immediately as it can aggravate and lead to a more serious issue of the vascular system. Solution: Some of the best sources of Vitamin C are - Phyllanthus Emblica or Indian Gooseberry Orange Lemon Guava Signal #3 Weak brittle nails. Do you suffer from peeling cuticles? or do you facing premature hair fall? These are some very clear indications that your body is deficient in Biotin. Biotin is Vitamin B7 which is made by the digestive system in our body. If we are facing digestive issues then it might be possible that the body is not able to produce enough biotin. Solution: Some of the things you should consume or increase in your diet - Probiotics food Apple cider vinegar Pickle Natural remedy - Have curd on an empty stomach with 1 tablespoon of jaggery powder mixed in it to get the maximum benefits. Signal #4 Small white specs on fingernails. This means your body is craving for Zinc. Zinc deficiency is common among people who eat lots of sweet made of refined grains like cakes & pastries. Zinc is one of the important minerals for both men and women. It is essential for the production of Testosterone. Solution: To fulfill zinc deficiency in your body - Reduce the intake of refined sugar products. Increase the consumption of Nuts & Seeds in your diet. Signal #5 Cracked corners of heels, ulcers on lips, or cracking corners of the mouth. This is a clear sign of Vitamin B2 deficiency. If you find horizontal lines on your nails or suffer from wandering eyes then it is an indication of Vitamin B1 deficiency. Some people’s nail turns brown. It shows the lack of Vitamin B12. If there is redness around the nose, cheeks, and forehead then the body is indicating the deficiency of Vitamin B6. Deficiency of Vitamin B is very common and it leads to issues related to skin, hair, and the digestive system. People lacking Vitamin B are more prone to body pain, anxiety & depression. The main reason for Vitamin B deficiency is poor food choices. You have to stop eating Pizza, Burger, doughnuts, cookies, and fried food items. Once in a while is fine but stop eating these things on a regular basis. Solution: Eat home-cooked food and avoid packaged food items. Signal #6 Pale face and dull lips. These are the signs of low Iron and Hemoglobin (Hb) levels in the body. Iron and Hemoglobin are interlinked as iron is essential for the production of blood. Solution: The best way to fulfill the iron deficiency without doing anything extra is to use iron utensils for cooking. You can increase your hemoglobin levels by consuming below mentioned food items- Beetroot Carrot Pomegranate Corn Apple Signal #7 Vertical ridges on nails, loss of eyebrow, or puffy eyes. The root of all these problems is Thyroid. The thyroid hormone regulates the metabolism and the way body utilizes carbs, proteins, and fats. Any problem with the thyroid gland can create further deficiencies in the body. As the hormonal events are much more in women, they are more prone to these symptoms. The thyroid is a lifestyle disease and is easily treatable. Solution: You can do the following things to avoid problems related to Thyroid - Eat wholesomely food Exercise regularly Signal #8 Rough uneven nails or poor night vision. Then you should know it is Vitamin A deficiency. It could be due to liver problems. Even after regularly eating vegetables, some people face Vitamin A deficiency as their liver does not have enough bile to break down and absorb Vitamin A from vegetables. Solution: You can include below-mentioned items in your diet - Ghee Cold-pressed oils Butter Signal #9 Frequent body cramps or muscle weakness. This is a clear sign of Vitamin E deficiency. Vitamin E deficiency is a very rare condition in healthy people. It is almost always linked to certain diseases in which fat is not properly digested or absorbed. Solution: Some of the things to overcome Vitamin E deficiency - Regularly massage your body with almond oil. Eat almonds. Broccoli Spinach Signal#10 Tongue turns white. This indicates yeast overgrowth and the issues with the digestive system. Solution:
https://medium.com/age-of-awareness/precheck-your-body-in-less-than-10-minutes-993dcc0d18f3
['Shubham Pathania']
2020-08-23 10:21:39.583000+00:00
['Diet', 'Food', 'Health', 'Nutrition', 'Lifestyle']
9 React Common Terms Explained In A Few Words
9 React Common Terms Explained In A Few Words In case you have an interview tomorrow The React universe can be daunting Learning a programming language is quite similar to learning a “real” language. There are words to use, verbs, and rules. Words, in particular, are what we combine to create a dictionary of stuff we will use daily. Whether it’s how to say “How are you”, or how to define a user interface, a dictionary is the base for everything more complicated we will do with a language. Here is a quick guide trying to teach you the meaning of common terms when learning React. It will form your basic grammar for starting with the library today, and mastering it later. #1 Library You have probably seen a hundred comparing articles of the best Javascript frontend frameworks. And React is always there. But that is technically incorrect since when talking about it, we’re dealing with a library. A library is simply a collection of class definitions, helping its user to accomplish a specific task. In the case of React, to define UIs. #2 Components React components are very similar to functions. They accept input, in the form of props, and then produce some output. This output defines what should appear on the screen. Components are great to build UIs, because they let you define independent pieces of it, and you can use and handle them however you want. A component can be either a class component, meaning it is basically a class which will return something to render on screen Or similarly, a function. Which has the same purpose of describing the UI, but with some difference when it comes to other factors such as lifecycle methods or hooks. #2 Props Nothing is truly fun if not customizable a little right? Well just like how you pass data to a add(val1, val2) function to add numbers, you pass them to React components. Props are just that, meaningful input you pass to your React components. #3 State A component needs state when it requires some way to store local data, which can change over time. Like an isChecked info in the state for a CheckBox component. Or show inside the state of an Accordion . And remember, the biggest difference between state and props is where they come from. Props come from a parent component, while state is managed by the component you’re defining itself. Props can’t be changed, but the state can. #4 JSX React components are not defined in a syntax you are probably familiar with. React uses JSX, which is a syntax extension for Javascript. Your JSX will get compiled to React.createElement() calls, which will return plain JavaScript objects called “React elements”. #5 Javascript Compiler A Javascript compiler takes Javascript code, transforms it, and then return it under a different format. The most common case is when you want to use the newest ES6 features, which are still not supported by older browsers. Babel is the compiler most commonly used with React. #6 ES6 Acronym referring to one of the latest versions of the ECMAScript Language Specification standard, which the JavaScript language is an implementation of. This version included many news such as let and const, arrow functions, and template literals. #7 Bundler A bundler helps you taking different JS and CSS modules, and combine them into just a few files better optimized for the browsers. The most common bundler used with React is Webpack. #8 Elements React elements are the building blocks of React applications. One might confuse elements with components. An element describes what you want to see on the screen. And remember, elements are immutable. #9 Lifecycle Methods Components can be considered just like living creatures. They go through stages of their lives, and we can access these stages via lifecycle methods. For example, when a component is born, we call it mounting and use the componentDidMount() method to manage this part of its lifecycle. Or when it changes, we say it updates, and so we use the componentDidUpdate() . Conclusion Hopefully, this was a useful bird-eye view on the dictionary of common words used by React developers. This can give you an idea of how React works and the main concepts behind it. — Piero Resources All the icons are made by the amazing icons8 website A note from JavaScript In Plain English We have launched three new publications! Show some love for our new publications by following them: AI in Plain English, UX in Plain English, Python in Plain English — thank you and keep learning! We are also always interested in helping to promote quality content. If you have an article that you would like to submit to any of our publications, send us an email at submissions@plainenglish.io with your Medium username and we will get you added as a writer. Also let us know which publication/s you want to be added to.
https://medium.com/javascript-in-plain-english/9-react-common-terms-explained-in-a-few-words-90f237952070
['Piero Borrelli']
2020-05-04 21:23:01.192000+00:00
['Programming', 'Technology', 'JavaScript', 'React', 'Web Development']
What Ruth Bader Ginsburg’s Death Means for the Electoral Map
What Ruth Bader Ginsburg’s Death Means for the Electoral Map Which states are most likely to be affected by the Supreme Court vacancy? Source: Wikimedia and Wikimedia On Friday evening, it was announced that Supreme Court Justice Ruth Bader Ginsburg had died of pancreatic cancer. Given the stakes of a Supreme Court seat, it is no surprise that her passing is being discussed in the context of the 2020 election. While this is certainly a dramatic development, it is unclear how it will influence the campaign. To process how this might impact the election it is worth setting out what we know and what we don’t. McConnell and Trump are planning to put up a conservative nominee, likely Amy Coney Barret, the 48-year-old 7th circuit judge. We don’t know when Trump will announce a nomination, but it will probably be soon. From there, things get quite uncertain. We don’t know the timeline for the nomination, and we certainly don’t know how the public will respond to this unprecedented situation. According to a Pew poll from August, Democrats care slightly more about the Supreme Court than Republicans, though a vacant seat on the Court could obviously shift those opinions. Despite all this uncertainty, we are seeing a lot of folks making bold claims about how things will play out. Pundits are split on whether this is good or bad for Trump, or how he should navigate the nomination fight. This kind of baseless theorizing is exhausting — it is possible to talk yourself into and out of dozens of possible positions. We really just don’t know. Rather than speculate on unanswerable questions, it is better to focus on subjects we can address. Given that the control of the presidency and the Senate are each determined by roughly 10 states each, we can examine the potential impact of the Supreme Court vacancy on the trajectory of each race. The Supreme Court is obviously incredibly influential in many matters of public life, but specific issues like abortion, gay rights, religious freedom, gun control, and environmental regulations are more explicitly associated with the Court. States with stronger ideological preferences on these subjects are more likely to be activated by the Supreme Court fight. From there, we can predict how each race might shift over the coming weeks. First, let’s take a look at the state of the race before RBG’s death. State of the race Trump’s chances aren’t amazing. 538’s model had him at a ~22% chance to win the electoral college. The 10 most competitive races are in Arizona, Florida, Georgia, Iowa, Nevada, North Carolina, Ohio, Pennsylvania, Texas, and Wisconsin. Simplifying the electoral college math, Trump would need to win 8 of these contests to retake the presidency. As of right now, he is favored in only 4. The race for the Senate is much tighter. According to 538, the 10 most important races are in Alabama, Arizona, Colorado, Georgia, Iowa, Kansas, Maine, North Carolina and South Carolina. Democrats needs to win at least 4 of these 10 races to take the Senate. Before RBG’s death, Democrats were a favorite to win in Maine, North Carolina, Arizona, and Colorado, putting the Senate at exactly 50–50, meaning Vice President Harris would likely break any ties. As of writing this, 538 gives Democrats a 71% chance to win the Senate using the “Lite” model. (Side Note: if you are uninterested in the nitty-gritty of the public opinion analysis, you can skip to the section titled “What it means”) Senator Approval Before and After Kavanaugh Vote While there is nothing directly analogous to what we might expect from the RBG replacement confirmation proceedings, Kavanaugh’s confirmation process in the fall of 2018 is probably the closest we have. Given how divisive and bitter the Kavanaugh hearings were, there is a very good chance the coming battle will be just as explosive. By comparing Senator approval before and after the Kavanaugh hearings, we can get an approximation of what each state will think about the RBG vacancy. If Senator approval improved after the Kavanaugh appointment, then the state’s voters probably agreed with their Senator’s action. If approval fell, citizens probably disliked their Senator’s choice. Data source: Morning Consult. Picture source: author. *John McCain died August 25. He seat was taken over by Jon Kyl. Arizona and Wisconsin appear to be strongly opposed to the appointment of Kavanaugh, while Iowa and Georgia were moderately opposed. Texas and North Carolina seem to moderately approve of Kavanaugh. On net, these numbers do not suggest that the Supreme Court seat will be the break-out issue for Trump’s re-election campaign. Data source: Morning Consult. Picture source: author. States relevant to the Senate map seem to have stronger opinions about the Supreme Court. Doug Jones lost 5% popularity over this fight, while Lindsay Graham gained a whopping 10 points. Steve Daines gained 9%, but this could be a result missing the vote as he was attending his daughter’s wedding, therefore avoiding the partisan food-fight. Jodi Ernst in Iowa should also be spooked by these numbers, as her popularity dropped by 5% after the Kavanaugh confirmation. Christianity and Religiosity Data source: Pew, 2014. Picture source: author. Blue is Evangelical Christian, orange is Catholic, and grey are other Christians. Conservative Christians are one of the groups most activated by issues on the Supreme Court. Whether the issue is abortion, religious liberties, or gay marriage, Catholics and Evangelical Christians are very likely to have strong opinions on the SCOTUS. Nationally, 70% of Americans identify as Christian, with 25% identifying as Evangelical, and 21% identifying as Catholic. Looking at the presidential race, most states look similar to the national average. Georgia and North Carolina appear to have a lot of Evangelicals, while Nevada and Pennsylvania have fewer than the national average. For the Senate, there are a few more states that stand out. 49% of Alabamans identify as Evangelical, which is extremely high. Colorado and Maine both have a below average number of Christians, suggesting less interest in an RBG replacement. But it isn’t just about what religion you belong to, it is also about how strongly you hold those beliefs. Data source: Pew, 2014. Picture source: author. Blue are those who identify as “very” religious, and orange are those who identify as “somewhat” religious. In the presidential race, Georgia, North Carolina and Texas stick out as having a strong core of very religious Christians. This fits with stereotypes of the areas, but it is instructive to see this is true in practice. On the other hand, Nevada and Wisconsin have relatively few people who identify as very religious, which is a good sign for the Biden campaign. Alabama again jumps out on the Senate chart. A full 77% of adults in Alabama identify as very religious. Georgia, North Carolina, and South Carolina also host large contingents of very religious folks. Montana’s results are notable, with only 69% identifying as somewhat or very religious, meaning the Supreme Court seat might be a good issue for Democrats. Same-Sex Marriage Data source: PPRI, 2017. Picture source: author. Percent of people who support gay and lesbian couples to marry legally. Support for same-sex marriage has shifted dramatically since it was legalized, but not all states are enthusiastic on the subject. Georgia, North Carolina, and Texas all have low approval on the subject, while Iowa is also slightly cool. Nevada and Wisconsin are actually quite accepting to same-sex marriage, with Arizona and Pennsylvania also being supportive. When it comes to the Senate map, things get way more polarized! Alabama has the lowest approval of same-sex marriage of any state in the nation. The Carolinas are not as conservative as Alabama, but they are far to the right of the average American. Colorado, Maine and Montana are all quite supportive of the subject, each reporting a greater than two-thirds approval. Abortion Data source: Pew, 2014. Picture source: author. Percent of people who believe abortion should be legal in all/most cases. Abortion is a bit more surprising than some of the other topics. Florida and Nevada appear to be relatively open on the matter, each offering higher-than-average levels of support. Texas is the most conservative of the states being analyzed, offering only 45% approval. Alabama is again far to the right on this topic, offering only 37% support. South Carolina is also cold, sitting at only 42% approval. Most of the other states are also cool on the subject, though Colorado, Maine, and Montana are all slightly to the left relative to the nation. Gun Control Data source: Civiqs, 2020. Picture: author. Percent of people who favor stricter gun laws. Alabama, Montana and Texas do not like gun control. Most of the competitive states are fairly neutral on gun control, but these three outliers are really sour on the subject. It should be noted that these results came from a poll that was taken most recently in September 2020, meaning it is more current than many of the other polls discussed here. Environmental Regulation Data source: Pew, 2014. Picture source: author. Percent of people who believe that environmental regulations cost too many jobs and hurt the economy. Note: the question asked whether stricter environmental regulations hurt the economy, meaning a higher score indicates a more conservative view. Environmental regulations may not be one of the main topics we associate with the Supreme Court, but there is one result that sticks out as potentially important. Montana is slightly to the left on religiously-linked issues such as abortion and same-sex marriage, but is hard right on environmentalism. In fact, Montana is the furthest right than any other state in the country. If the Republican Senate candidate can tie the Supreme Court fight to environmentalism, there is a decent chance it will help him in the race. What it means Doug Jones, Martha McSally and Cory Gardner are Probably Toast Alabama’s Democratic incumbent Doug Jones had an uphill battle this year before Ginsburg died, but now he is in way over his head. On social issues, Alabama is hard conservative. It is one of the most religious states in the nation, and has right-leaning views on every social issue. On top of that, Jones lost 5% after his “no” vote on Kavanaugh. While Jones has not made any official statement on a potential nominee to fill Ginsburg’s seat, he has said he would oppose Trump’s Supreme Court appointments in the past. At this point, Jones is a heavy underdog in his race. McSally, Gardner and Collins are all in similar positions, but have each taken a different approach to the controversy. Arizona’s Republican incumbent Martha McSally has publicly announced that she supports voting on Trump’s nominee sight-unseen. Arizona is moderate-to-left on social issues, so it’s unlikely McSally’s bold stance will help her electorally. McSally was already behind in her race before the SCOTUS vacancy, so her approach looks like it is aimed at securing a job after the election rather than winning her race. Colorado’s Republican incumbent Cory Gardner is in a tough spot. Colorado is quite left-leaning on subjects under the purview of the Supreme Court. If he takes a bold stand in favor of Trump he will lose support for moderate voters. Alternatively, if Gardner takes a stand against Trump in an attempt to save his seat, he will likely demotivate the Republican base in the state. In that scenario he likely still loses his election and makes some enemies on his way out. As of right now, it doesn’t appear that Gardner has made any clear statements on the subject, but he is very much between a rock and a hard place. I expect he will follow McSally’s lead, support Trumps nominee, and start setting up interviews at consultancy firms. Of the most vulnerable incumbents, Collins looks to have a narrow path to victory. Maine’s Republican incumbent has already come out against replacing RBG before the election. Given Collins’ history on Supreme Court judges, it is entirely possible her position waffles, but for now she is anti-replacement. Polling on the Collins race is very close, and given the drop in her approval after the Kavanaugh nomination, she will probably lose the election if she votes yes on Trump’s nominee. Strategically, her ideal scenario is Trump attempting to ram through the nomination before the election, and she gets to place a protest vote against Trump, “proving” herself as an independent voice. Obviously, a lot can go wrong in this series of events, but it is probably the best chance Collins has to navigate this thorny issue. Senate Could Be Slightly More Difficult for Democrats The Democrats need to a total of three seats gain control of the Senate, and while they are close, it might be tough to get over the line. Thom Tillis, the Republican incumbent from North Carolina, is slightly behind at this point, but North Carolina is pretty conservative on issues like same-sex marriage and the environment. Tillis has already come out strongly in support of Trump’s unnamed nominee. We should expect that Tillis will attempt to steer the race in North Carolina to focus on the Supreme Court. It’s amusing to watch people on Twitter get worked-up about Lindsay Graham’s hypocrisy on the Supreme Court. In 2016, he was opposed to filling a seat on the court before the election, but in 2020 he has flipped his position. While this blatant opportunism is obnoxious, it is worth looking at the ideological lean of Graham’s state. 69% of the state identifies as “very” religious. Abortion has only 42% approval. Most voters in South Carolina probably agree with Lindsay Graham on most issues relevant to the Supreme Court. Not only that, Graham’s popularity spiked by a full 10% after the Kavanaugh hearings! He went from fairly unpopular, to over 50% approval! It seems likely that many voters in South Carolina will forgive Graham’s hypocrisy on the grounds that they are getting a conservative justice. Expect that Graham to position himself front-and-center in the hearings, attempting to recapture some of that bounce from the last Supreme Court fight. Montana, quite frankly, is weird. It is not particularly religious, and is somewhat liberal on abortion and gay marriage, but it is also far to the right on environmental regulation and gun control. Daines, who is the Republican incumbent, gained a lot of popularity after he supported Kavanaugh’s nomination, but it is possible the boost is due to his absence from the actual vote. At the same time, Tester remained popular, even though he voted against Kavanaugh. There is a chance this ends up being a winning issue for the Democratic challenger Steve Bullock, but he will need to work to frame the subject perfectly. Given that Bullock is behind right now, this probably just makes his job more complicated. The remaining Senate races are Perdue v. Ossoff in Georgia, Marshall v. Boiller in Kansas, and Ernst v. Greenfield in Iowa. Both Georgia and Kansas are right-of-center on issues related to the Supreme Court, and in both cases the Republican is already in the lead. The Supreme Court issue may push these contests from “competitive” to “likely R”. Iowa’s Senate race is a virtual toss-up at the moment. Given that the state is very close to the ideological center on most topics, it seems unlikely that we see a huge reaction to the open SCOTUS seat. The main worry for the Ernst camp would be the dip in her approval seen after the Kavanaugh hearings; if a similar drop was seen now, we would expect Ernst to go from slim favorite, to solidly behind. If we assume that Jones, McSally, and Gardner all lose their elections, the Democrats still need to pick up two more seats to take control of the chamber. Perdue, Marshall, and Graham are all probably helped by this development to the point that their seats are more likely to be Republican. This leaves Democrats needing to win two out of Collins v. Gideon, Ernst v. Greenfield, Daines v. Bullock, and Tillis v. Cunningham. While it is possible the Supreme Court vacancy might help Gideon and Greenfield, the fact that Cunningham’s job is more difficult is a big cost. Before Ginsburg’s death, the 538 model gave Democrats a 71% chance to win the Senate (using the Lite mode). If I had to guess, the Supreme Court vacancy probably could shift the odds to 60–40 or even 50–50. Overall, this is a relatively small shift, but it could be enough to determine who controls the Senate. Texas is Probably out of Reach for Democrats Texas has been tormenting Democrats for years. It has slowly trended left, but has stubbornly refused to flip to the Democratic party. This year, it looked like we might finally see Texas turn blue, but the death of Ruth Bader Ginsburg may shut that down. On social issues, Texas is noticeably conservative. 86% of the state identifies as somewhat or very religious. Only 55% of Texans are supportive of gay marriage (compared to 61% of the nation), 45% agree that abortion should be legal in most cases (compared to 53% of the nation), and 41% favor stricter gun control laws (compared to 50% of the nation). Given that Democrats were already behind, the Supreme Court vacancy has probably pushed this state out of reach. Presidential Race Playing Field Narrows, But Similar Results The competitive states in the presidential election are just not that ideological on social issues. Florida, Wisconsin, Nevada, and Pennsylvania all seem very middle-of-the-road. Texas, North Carolina, and Ohio are all right-of-center socially, but Biden doesn’t need any of these states to win. As of right now, the “playing field” of the presidential election is spread out across about 10 states. In the coming weeks, we may see a rightward shift in Texas, North Carolina and Ohio, meaning Democrats pull back their attention from these areas. On the flip side, Wisconsin and Arizona will become more solidly blue. Pennsylvania, Nevada, and Florida will then becoming the focal-point of the election. Overall, it seems unlikely the Court vacancy will meaningfully help Trump’s campaign. It All Comes Down to the Trump Show This analysis is based on a big-picture view of the polling within each of these states, but the details of the are incredibly important. Who is the nominee? They need to be right-wing enough to activate socially conservative voters, but not so crazy to catalyze a backlash from the left or spook moderates. When exactly does the confirmation vote take place? There is a big difference between before and after the election. All of this ultimately comes down to Trump’s strategy and execution. Trump has had two Supreme Court appointments, the first was one of the high-points of his presidency, and the second was an absolute gong show that caused a dip in his approval. Given the low political engagement of undecided voters, it is very possible that many will base their final voting decision on the events in the coming weeks. If Trump is able to smoothly deliver a Supreme Court justice that appears to be competent and not overly partisan, it could moderately improve his chance at re-election. If Trump botches the nomination, tripping over himself procedurally, or gets into a fight with his own party, it is possible that 2020 ends up being an electoral blow-out. If the Kavanaugh hearings are the most analogous historical precedent, we should remember that Trump’s approval first dropped then rebounded over the course of that confirmation battle. The details of this fight could be extremely consequential. As of this morning, Trump has already fielded a conspiracy theory that Ginsburg’s wish to be replaced by the winner of the election was a fake, suggesting he may have a difficult time staying on the rails. Biden is also not simply a bystander in all of this. Many left-wing influencers have advocated expanding the Supreme Court as a response to the McConnell’s roadblock on the Merrick Garland Supreme Court nomination. Jamming through another Justice before the election or during the lame duck will give expanded license to the Biden administration to use these tactics, but it is hard to know how the public will react to these measures. Biden is also not the best at communicating on complicated policy topics, so it is possible he fumbles discussing the subject. Court reform also has the potential to become a divisive topic within the Democratic party, and Trump is talented at identifying these wedge issues, and hammering them. Unfortunately, this kind of environment is ripe for the absolute worst type of media and punditry. Cable news runs on conflict, suspense, and spectacle. The “both-sides”-ism will be in absolute overdrive, while pundits spin up as much controversy as possible. If you care about the outcome of this election, don’t rely on commentators to articulate the facts of the Supreme Court fight, as they will be too focused on wallowing in the drama. The only thing that is certain is that we are in for an unforgettable election season.
https://medium.com/discourse/what-ruth-bader-ginsbergs-death-means-for-the-electoral-map-87a2b7eb088c
['Jesse Harris']
2020-09-23 21:46:04.064000+00:00
['Politics', 'Society', 'Ruth Bader Ginsburg', 'Law', 'Election 2020']
Web Workers For Beginners
JavaScript is a single-threaded language meaning that it executes code in order and must finish executing a piece of code before moving onto the next. For HTTP requests, JavaScript provides us with XMLHttpRequest which is non-blocking.But if we have a CPU intensive code in the program, it will block the main thread until it’s done, making UI unresponsive for that period. One way of solving it is to use setTimeout or setInterval. We can break the CPU intensive code into smaller parts and attach timeout with it. While it may work for smaller programs, as code complexity increases it becomes difficult to decide where to add timeout functions. What we need is a separate thread where these calculations are done, hence making the main thread free to handle UI events, manipulate DOM, or do other tasks. Web Workers to the rescue HTML5 introduced Web Worker to us. Web Workers are JavaScript programs running on a different thread, in parallel to the main thread. It allows you to put long-running and computationally intensive tasks on the background without blocking the UI, making your app more responsive. Worker utilizes a thread-like message passing between the main script and the background script to achieve parallelism. Types of Web Workers By creating separate threads for parallel JavaScript program Worker thread allows us to achieve multithreading. There are two types of Web Workers. ⦁ Dedicated Workers: Dedicated Web Workers are instantiated by the main process and can only communicate with it. ⦁ Shared Workers: Shared workers can be reached by all processes running on the same origin (different windows, browser tabs, iframes, or other shared workers). This article will only cover dedicated workers and I’ll refer to them as ‘web workers’ or ‘workers’ throughout. Getting started Web Workers run in an isolated thread in the browser. Hence the code they execute is contained in a separate JavaScript file and incorporated in your page by asynchronous HTTP requests. For creating a worker thread we add the following lines on our main page. var worker = new Worker(‘calculate.js’); If the “calculate.js” file exists and is accessible, the browser will spawn a new thread that downloads the file asynchronously. Right after the download is completed, it will be executed and the worker will begin. In case the provided path to the file returns a 404, the worker will fail silently. To start the worker, we have to call a postMessage() method. worker.postMessage(message, [transfer]); Here the message is the object to deliver to the worker page. A transfer is an optional array of Transferable objects (we will talk about Transferable objects in a later section). Communication between the web worker and the main page occurs by two methods the postMessage() method and the “message” event handler. postMessage can accept either a string or JSON object as its single argument. Newer browsers support a JSON object as a first parameter to the method while older browsers support just a string. When a message is sent from postMessage() the other page will receive the event as a ‘message’ event. For error handling, an ‘error’ event is passed. In the example above, main.html calls the two web workers (prime and factorial)with postMessage. I have used separate web workers for prime and fibonacci methods, both methods symbolize large computations. primeWorker.postMessage({cmd:'first50'}); fibonacciWorker.postMessage({cmd:'first100'}); The worker files are themselves listening to the ‘message’ event and as soon as they receive an event they do their calculations and send the result back with the help of self.postMessage method. I have also added a third button to change the background color, it symbolizes UI changes. When you call prime or factorial from the script an independent parallel web worker thread is spawned which will work on these methods and parallelly you could make changes in UI by clicking the change background button. In the main.html file, I have added an error event listener also. fibonacciWorker.addEventListener('error', errorEvent, false); if an error occurs while a worker is executing, the ErrorEvent is fired. This interface contains three useful properties for figuring out what went wrong: filename — the name of the worker script that caused the error, lineno — the line number where the error occurred, and message — a meaningful description of the error. You must have noticed I have used “self” in prime.js and “this” in fibonacci.js, its because in the context of a worker, both “self” and “this” reference the global scope for the worker. Here if we haven’t used web workers then the browser would have frozen for the time the fibonacci and prime functions were computing and so you wouldn't be able to interact with UI at that time. Importing scripts and libraries Worker threads can import an external script using the importScripts() method. It accepts zero or more URIs as parameters to resources to import. The browser loads each listed script and executes it. Any global objects from each script may then be used by the worker. If the script can’t be loaded, NETWORK_ERROR is thrown, and the subsequent code will not be executed. importScripts(‘foo.js’); /* imports just “foo.js” */ importScripts(‘foo.js’, ‘bar.js’); importScripts('//example.com/hello.js'); Subworkers Workers may spawn more subworker thread. This is great for further breaking up large tasks at runtime. However, subworkers have some conditions of their own: ⦁ Subworkers must be hosted within the same origin as the parent page. ⦁ URIs within subworkers are resolved relative to their parent worker’s location. This makes it easier for workers to keep track of where their dependencies are. But while spawning subworkers we have to be cautious about not hogging too many of the user’s system resources. Embedded Workers If you want to create a worker script on the fly or don’t want to create separate files for workers. You can embed it all in a single page with the help of Blob and using Data blocks. With Blob(), you can “inline” your worker in the same HTML file as your main logic by creating a URL handle to the worker code as a string. let blob = new Blob([ "onmessage = function(e) { postMessage('msg from worker'); }"]); // Obtain a blob URL reference to our worker 'file'. let blobURL = window.URL.createObjectURL(blob); The magic happens in window.URL.createObjectURL().This method creates a simple URL string that can be used to reference data stored in a DOM File or Blob object. Blob URLs are unique and last for the lifetime of your application(e.g. until the document is unloaded). Now for the clever part. The script element that does not have an src attribute or has a type attribute that does not identify an executable MIME type won’t be parsed by JavaScript(Data block). So we can write our worker code in this script tag and then use Blob to create a URL for the same. In the example above, in script id “worker-1” I have added the code for web worker and then in JavaScript parsed script created a Blob URL for the same. Transferring data to and from Workers When we use postMessage we transfer data between web workers and the main page. This data is copied not shared between two pages i.e Objects are serialized as they’re handed to the worker, and subsequently, de-serialized on the other end. Most browsers implement this feature as structured cloning. This seems okay for small data transfer but for large amounts of data, this is a noticeable overhead. To mitigate this performance hit we can use a Transferrable object. With Transferable Objects, data is transferred from one context to another. It vastly improves the performance of sending data to a Worker. Think of it as pass-by-reference if you’re from the C/C++ world. However, unlike pass-by-reference, the ‘version’ from the calling context is no longer available once transferred to the new context. For example, when transferring an ArrayBuffer from your main app to Worker, the original ArrayBuffer is cleared and no longer usable. Its contents are transferred to the Worker context. To use transferrable objects the following command is used worker.postMessage(arrayBuffer, [arrayBuffer]); The first argument is the data and the second is the list of items that should be transferred. Features available to Web Workers Web Workers have access only to a subset of JavaScript features due to their multi-threaded nature. Here’s the list of features: ⦁ The navigator object ⦁ The location object (read-only) ⦁ XMLHttpRequest ⦁ setTimeout()/clearTimeout() and setInterval()/clearInterval() ⦁ The Application Cache ⦁ Importing external scripts using importScripts() ⦁ Creating other web workers ⦁ Web Worker limitations Web Workers don’t have access to some very crucial JavaScript features: ⦁ The DOM (it’s not thread-safe) ⦁ The window object ⦁ The document object ⦁ The parent object Use cases Web Workers have great powers, but like the saying goes “With great power comes great responsibility”. Similarly, we should be cautious while using them. It should be preferred where background tasks have to be done in parallel to the main UI task or the tasks performed have to be hidden from the user. Some of its other use cases could be: ⦁ Prefetching and/or caching data for later use. ⦁ Code syntax highlighting or other real-time text formatting. ⦁ Spell checker ⦁ Progressive Web Apps ⦁ Analyzing video or audio data. ⦁ Background I/O or polling of web services. ⦁ Processing large arrays or humungous JSON responses. ⦁ Image filtering in <canvas>. ⦁ Updating many rows of a local web database. Please Note: Due to security issues you can’t run your web workers locally on the browser. I used Web Server for Chrome, which worked great. Thanks for taking out the time to read the article. In the next article, I will talk about Service Workers, a different but very useful web worker.
https://medium.com/javascript-in-plain-english/web-workers-for-beginners-57d7a389cded
['Kirti Chaturvedi']
2020-08-01 12:58:33.415000+00:00
['Programming', 'JavaScript', 'React', 'Webworker', 'Web Development']
Use Slack to Monitor SQS Dead-Letter Queue
AWS SQS plays a significant role in modern application architecture, especially in a serverless environment. When working with SQS, it is often to see messages failed to be consumed, it could be a bug in your code, a temporary resource restriction, eg API rate exceeded, or dependencies in the messages to be processed. In most scenarios, you would want to know what the messages are after they fail many times, then you can find out why and fix the problems. This is where the SQS dead-letter queue comes into play. However, monitoring the Dead-letter can be a challenge, one of the most common approaches is to set up CloudWatch to send alarms, but people often face two problems: No visibilities to the details of the dead letters. CloudWatch only tells you there are messages in the dead-letter queue, it doesn’t tell you what they are. Dev/Ops often need to use other tools, eg AWS CLI to dig for more details. Not able to replay the dead letters, ie not able to put the dead letter back to SQS, at least not easily, you could use AWS CLI to put them back, but again it makes troubleshooting which is already an unpleasant thing even more annoying. The above issues can be resolved by using Slack + Lambda, as shown below The SQS dead-letter queue is configured as an event trigger of the lambda function which sends notifications to Slack, then Slack feeds back user actions to the lambda function, finally it places the messages back to the SQS.
https://medium.com/swlh/use-slack-to-monitor-sqs-dead-letter-queue-7b7d6a69cbc
['Crespo Wang']
2020-12-16 23:52:22.488000+00:00
['Lambda', 'AWS', 'Software Development', 'Slack']
What does success look like for you?: Setting the right goals for the right reasons
What does success look like for you?: Setting the right goals for the right reasons How asking this question helps me come up with goals and resolutions that stick, and why I’m measuring business success in beach trips. Starlings murmuring over the burned remains of Brighton’s West Pier at sunset. A few weeks ago, we were dreamers: making resolutions, setting goals, planning in brand new notebooks, glowing with ambition and hope for how we could be better, do more, have more. But now it’s late January. The notebook’s curled at the corners. Hope and ambition’s soured. The dream’s dead. At least that’s how it always was for me. This year, I wanted it to be different. Last year was a year of big changes; I quit my job and went freelance in an effort to get more fulfilment from work. As I did so, I realised something about the way I’ve always approached setting my resolutions and goal. Starting my business, I thought my aim should be to grow to a certain level of revenue, work with big prestigious clients, win awards, praise and accolades. It sounded right, but something about it didn’t feel right. There’s a question I always ask clients at the start of a project: ‘What does success look like for you?’ I ask them to imagine they’re at the end of the work and they feel great about how it went. Then I ask them to tell me what they’re picturing: what happened/didn’t happen, what do they see and feel? I realised that I’d never done that myself. So I did. I realised that revenue, big clients, awards, weren’t part of the picture. That was bullshit and vanity. It was how I wanted things to look from the outside, not what I care about and how things feel on the inside. I saw those goals weren’t hopes or ambitions; they were sticks to beat myself with. They were born from negativity: I’m not enough; I don’t do enough; I don’t have enough. To me, success look like this: this: Work hard, but not to a level where I’m burning out. Do things that absorb me and make time fly. Work with organisations/on projects where the values match my own Spend a significant part of my time taking photos. So instead of resolutions and a business plan, I’ve set myself some alternative OKRs (objectives and key results). They are: Objective: Be proud of the work I do. Key Result: How many projects was I happy to put my name on? Key Result: How many projects did some kind of good for someone? (Good ≠ making a rich person richer.) Key Results: How many times did I turn down work that wasn’t a good fit? 2. Objective: Be creative and deepen my skills. Key Result: How many photos/blog posts/whatevers did I take/write/make? Key Result: How many times did I get into flow? Key Result: How often was I challenged to learn something new? 3. I will have time for things that aren’t work. Key Result: How many times did I watch the starlings/swim in the sea/go for a hike/see a loved one/cook/do yoga? Key Result: How many books did I read? (Books ≠ business books.) Key Result: How many days off did I take? I’m taking them seriously: keeping track of them through daily/weekly records in my diary and in my end of project reviews. There’s a sacrifice to this too, and it’s financial. If I work less and turn down projects, I’m not going to earn as much. Thanks to the economic privilege I, I can make this work provided I cut my spending. Not everyone has this opportunity, so I want to acknowledge it. Changing how I think about success is a process. I have moments (daily!) where I think I’m on the wrong course, because I’m not earning enough money, power or respect. I see a peer get a promotion, a pay rise, praise, buy a house, and I think ‘That’s amazing. You should be doing that, why aren’t you doing that?!’. When that happens, I go back to the question: ‘What does success look like for me?’. And I remember how good it feels to leave my desk at 3pm on a Monday and spend an hour on the beach watching starlings dance over the pier.
https://la-pope.medium.com/what-does-success-look-like-for-you-67f35af08bbf
['Lauren Pope']
2019-01-21 13:51:33.078000+00:00
['Creativity', 'Personal Growth', 'Goals', 'Work Life Balance', 'Work']
One in three regions have higher covid deaths in second wave
One in three regions have higher covid deaths in second wave Clara Guibourg Follow Dec 14 · 5 min read Over a third of European regions have had higher excess deaths this autumn than at any previous point during the pandemic, with a second outbreak that has spread beyond a few hard-hit regions. As Europe’s second wave begins to pass its peak, we’ve gathered subnational data from over 750 regions, allowing us to track the true toll of the coronavirus pandemic. Over the last couple of months Europeans have once again found themselves at the centre of the coronavirus pandemic, as the continent has been battling a second wave. Data from 21 European countries shows that over 370,000 more people than usual have died since the start of the pandemic. But these excess deaths have been very unevenly spread, geographically, which is why regional data is more useful than national. Breaking down excess deaths by when they occurred also allows us to compare the spring and autumn waves, and gives us a clearer picture of which areas the pandemic is currently hitting hardest. Highest excess deaths yet in third of regions Already, over a third of European regions have had higher excess deaths in autumn than any other time this year. There’s a clear geographical pattern here: many countries in central and eastern Europe, for instance Poland, Czechia and Bulgaria, were spared the first wave that battered many western European countries in spring, but have now been hit hard by a second wave. Coronavirus statistics are notoriously difficult to compare across countries, as deaths are defined and counted in very different ways. Excess deaths dodge many of these issues, and are better suited for international comparisons. However, this is also the slowest measure, with several weeks lag at best, and so full data for the latest month is yet to come in. Turning point taking longer to arrive Deaths have yet to peak in several European countries, so the full picture of the second coronavirus wave is not yet available to us, but rather a snapshot of the current situation. Even so, some trends are already apparent. For one, this time the turning point has taken significantly longer to arrive. In spring, coronavirus deaths started climbing rapidly at the start of March. By mid-April, some six weeks later, they had already peaked across Europe. In autumn, however, deaths across the continent did not peak until 11 weeks after they had begun increasing again in mid-September. Less concentrated to few hard-hit regions Coronavirus deaths in Europe have been higher in autumn than at any other point. But while the first wave hit a few regions exceptionally hard, such as Bergamo in Italy, our analysis shows the virus is now more spread out. In the spring months, the 50 worst affected regions account for nearly half of all the excess — or “unnormal” — deaths. By autumn this proportion had dropped to 30%. About three in five regions have had excess deaths so far this autumn. This is roughly the same proportion as in the spring. But this time, so far, there are fewer regions that stand out with really high rates. In spring, deaths were twice their normal levels in 18 regions. In Bergamo, they were three times higher than usual. By comparison, in autumn, based on the data available so far, none of the over 750 regions in our data have so far had deaths twice normal levels. At this point, it bears repeating that as deaths have not yet peaked in all regions, this figure is useful to show a trend, rather than an exact value. Sweden, for instance, is reporting more cases than ever before, suggesting the outbreak has not yet reached its peak. Meanwhile, Italy has an unusually large lag in reporting, and only has figures until the start of the autumn. Although the full picture has not yet emerged, the data so far shows us a second wave that is less concentrated to just a few places, and more evenly spread out across regions and in many places surpasses the first one. Use the data We’ve published the data behind our analysis here. Methodology Our analysis is based on data showing daily or weekly all-cause deaths in each region, which has been collated from Eurostat and national statistical agencies (Scotland: NRS, Northern Ireland: NISRA, Germany: Destatis). A number of countries in Central and Eastern Europe have not reported any regional statistics on excess. These are excluded from this analysis. Excess deaths have been calculated by comparing all deaths reported in a region since the start of the pandemic with the average number of deaths during that time period in the previous couple of years. We have further broken this down by season, to calculate the excess deaths in spring (weeks 10–22), summer (weeks 23–35) and autumn (weeks 36 onward). Countries have reported up to different weeks, and we have used the latest data available. This means up to late November for most regions, but some have a larger lag in reporting. Italy, for instance, only has data available up to the beginning of October. For most countries, the average period is 2015–2019. Others have fewer years of data available, but at least two full years have been used. We’ve used as granular data as possible, which is NUTS3-level for most countries. However, for Germany, Scotland and Northern Ireland, comparative data is only available at NUTS1-level (making Scotland and Northern Ireland one region each, and Germany’s data broken down by its Bundesländer). A region is defined as having had excess deaths if reported deaths were at least 5 percent higher than expected and at least 20 more deaths than usual occurred. If deaths were at least 25 percent higher than expected, we have defined it as a region with “significant excess”.
https://medium.com/newsworthy-se/one-in-three-regions-have-higher-covid-deaths-in-second-wave-fd79f35968a2
['Clara Guibourg']
2020-12-14 08:55:44.203000+00:00
['Coronavirus', 'Data Visualization']
Stop Using Square Bracket Notation to Get a Dictionary’s Value in Python
The Traditional (Bad) Way to Access a Dictionary Value The traditional way to access a value within a dictionary is to use square bracket notation. This syntax nests the name of the term within square brackets, as seen below. author = { "first_name": "Jonathan", "last_name": "Hsu", "username": "jhsu98" } print(author['username']) # jhsu98 print(author['middle_initial']) # KeyError: 'middle_initial' Notice how trying to reference a term that doesn’t exist causes a KeyError . This can cause major headaches, especially when dealing with unpredictable business data. While we could wrap our statement in a try/except or if statement, this much care for a dictionary term will quickly pile up. author = {} try: print(author['username']) except KeyError as e: print(e) # 'username' if 'username' in author: print(author['username']) If you come from a JavaScript background, you may be tempted to reference a dictionary value with dot notation. This doesn’t work in Python.
https://medium.com/better-programming/stop-using-square-bracket-notation-to-get-a-dictionarys-value-in-python-c617f6ea15a3
['Jonathan Hsu']
2020-05-06 01:15:37.387000+00:00
['Software Development', 'Programming', 'Data Science', 'Python', 'Technology']
2019 Social Media trends in numbers
Social media has become the main source of new information and this fact is not going to change in the nearest future. This article is about numbers and figures, presenting trends in this interesting and not always predictable social media world. Time on the scroll Approximately 2 hours a day are spent on social networks these days — this is an average time for different age and population groups. 500 million Instagram users are active every single day, only in the USA 77% of people have at least one profile in social media, Facebook still holds the first rate among other networks and 1.3 million content is shared every minute. 2 hours seems nothing compared to these news. But statistics is something difficult to compete. New business decisions online 73% of market players think that social media marketing is effective for business, Facebook has more than 5 million advertisers, 54% of social media users search products online and 60% of users learn about new products on Instagram. It’s obviously time to change marketing strategies and budgets in favor of influencers who don’t rule the world yet, but influence different groups of population. Influencers influence Global spending on Instagram influencer marketing reached more than 5 billion dollars in previous year and 78% of businesses have created teams for managing their social media. Influencers have already become popular in the business world, but now their involvement seems to be a must, not a choice. It’s easier than it seems 1000 followers is enough to become an influencer. We recently wrote about groups of influencers with different number of followers which proved — everybody may become an influencer. And recent stories about fake followers and low engagement rates changed brands opinion that only thousands of followers produces thousands of sells. World has changed even in this new matter of influencer policy. Social networks for every taste Youtube, Instagram and Snapchat are the most popular platforms among teens. Social media users aged 55 and older are twice as likely to engage with brands online, 43% of adults in the U.S. get their news on Facebook and 79% of B2B marketers use LinkedIn as an effective source for generating leads. Each social network has its pros and cons, age groups and type of content. But it means only one thing — every business, manufacturer or idea has all chances to find its ideal social network. These variables will not answer your question “Which social media to use”, besides, it doesn’t make clear, how to build a marketing strategy on Instagram or Facebook. But for sure, this information presents the trend, which is not likely to change. Social media marketing is worth considering, planning and implementing. Don’t hesitate to jump in!
https://medium.com/socialmedia-market/2019-social-media-trends-in-numbers-386d72b01f35
[]
2019-03-21 12:48:15.459000+00:00
['Influencer Marketing', 'Social Media', 'Facebook', 'Twitter', 'Instagram']
Chris Roth — cofounder DoubleBlinded — on taking a scientific aproach to life
Chris is a software engineer turned data scientist with a specialization in health, biotech, and science. He is interested in quality of life improvement both at the individual level through lifestyle design and at the macro level through urban planning and public policy. In addition to software and tech, he studies, health, biology, and nutrition. He is a cofounder of DoubleBlinded, an experimental new platform for personal experimentation and crowdsourced science. Could you refresh everyone’s mind and tell us what the Quantified Self movement is all about? I’ll give you the “official” definition as Wikipedia defines it, for starters: The Quantified Self (QS) is a movement to incorporate technology into data acquisition on aspects of a person’s daily life in terms of inputs (e.g. food consumed, quality of surrounding air), states (e.g. mood, arousal, blood oxygen levels), and performance (mental and physical). It’s hard to beat that definition, so I’ll elaborate on what parts of that I think are the most profound… To me, QS is about taking a scientific approach to your life. Instead of just assuming that your intuitions are correct, QS is about taking your intuitions and validating them with numbers so that you can track pieces of your life with scientific certainty. This gives you the tools to fine-tune your life and detect progress or regressions that might otherwise slip under your radar. Here’s an example: as you age, your hormones change. Generally a man’s testosterone levels slowly decrease after age 30 by about 1% each year. This happens gradually… most men don’t notice. If you are able to quantify your blood hormones, then you can notice the slow decline and intervene. Perhaps this is a natural, healthy trend, but some of the negative effects like low energy, low libido, and brain fog can be ameliorated with interventions such as TRT, supplementation, and weight lifting. Once you’ve intervened, you’ll want to see if your intervention is actually working… with another hormone test. This gives you the tools to definitively know if what you are doing is working. The way that media portrays the QS movement, you’d think it was a super esoteric movement full of health nerds. I believe it is part of a much larger movement about quantifying the world in general. As technology advances and we have better tools for measuring our bodies, we make use of those tools and react to the measurements that we gain. This is nothing new… hormone tests, for example, have been around long before the term “Quantified Self” existed. The movement is simply a new term describing the recent popularization of self-measurement which has emerged as a result of cheaper, more accurate measurement tools. Logging data, by itself, doesn’t really tell you a lot. It makes for a really cool time-lapse-video (and they are often cool), but if one has the goal to improve for example his/her health than you have to do more than logging, right? What are your ideas on that? You touch on an interesting distinction. The QS community is made up of people from a lot of different backgrounds, each having very different motivations, but I think the community can generally be divided into two camps: those who are intrinsically motivated as hobbyists and those who are trying to solve health problems. For the intrinsically motivated crowd, logging is much like journaling: it’s self-satisfying and doesn’t need to solve any particular problem. It’s simply for fun and enjoyment. In that respect, I find that a lot of QS projects are actually artwork, and I think this is one of the most beautiful things about the movement. We’re seeing a merging of artwork, technology, and mathematics in a way that wasn’t possible before. I can certainly say that I enjoy this aspect of QS myself. I would self-log regardless of the outcome, even if it were just for fun. Then there are the health-motivated folks. The diabetes community, for example, is very present in the QS world because of the nature of their condition. The diabetes community is an interesting area of study for grassroots innovation in general. I was recently at a conference hosted by Dr. Harold DeMonaco and Eric von Hippel of MIT who study patient-led innovation. A lot of the people in this community self-track not just for fun, but to manage their diabetes. And another health area that is ripe for this kind of quantification-based improvement is mental health. Bipolar, for example, is a disease that really needs to be tracked: manic episodes and depressive episodes need to be monitored in order to identify triggers. And the same goes with migraines, too… there are an increasing number of mobile apps out there that use self-logging as a tool to try to identify potential triggers such as citrus fruit or brightly-lit screens. Do you like what you have read so far? Get a quarterly update of what I am busy with.
https://medium.com/i-love-experiments/chris-roth-cofounder-doubleblinded-on-taking-a-scientific-approach-to-your-life-5b52b4c9c84e
['Arjan Haring']
2016-06-15 21:10:31.190000+00:00
['Health', 'Quality Of Life', 'Quantified Self']
7 Essential Tips to Help You Develop Divergent Thinking & Become a More Creative Individual
Divergent Thinking. Radio Ren. If there’s one key to success in today’s world, it’s creativity. Society values creative individuals, and for good reason. Creativity lets us generate new solutions to old problems, and tackle new problems with confidence when they turn up. And new problems always turn up. Unfortunately, not too many of us were taught how to “exercise” our creativity as we were growing up. Our education system focuses on convergent thinking — being able to produce the correct answer within a particular mental framework, such as when answering multiple-choice questions. The opposite — or rather complement — to convergent thinking is divergent thinking, which, unfortunately, is grossly underdeveloped in most individuals (myself included). To become more creative, we need to practice both convergent and divergent thinking. If the two are out of balance, we end up stifling our creativity. I’ve focused on divergent thinking in this piece because, well, that’s what most of us are lacking. If we can correct that weakness, the other areas of our life will reap the benefits. So what is divergent thinking? Let’s take a look at the Merriam-Webster definition. Divergent Thinking. Merriam-Webster. Background Image: Rohit Tandon on Unsplash. Put another way, divergent thinking is when we give ourselves permission to simply have ideas in a more freeform, non-linear, spontaneous manner while not worrying so much about whether those ideas have merit. The usefulness of divergent thinking is that it allows us to come up with a lot of “out of the box” ideas — the kind that allows us to approach old problems in new ways. If we want to make up for the thinking deficit we inherited from society and become more creative, we have to provide ourselves plenty of opportunities to practice divergent thinking — which thankfully, we all can do. I’ve compiled seven tips that can help us do this. Three of them I’ve taken from Mihaly Csikszentmihalyi’s book Creativity: The Psychology of Discovery and Invention, and the other four are commonly circulated, tried and true techniques that help the brain reach its full potential for forming ideas. So without further delay, let’s get to’em. Let Your Ideas Spill Out, Even if They’re Terrible This one is a no brainer. It’s easier to pull out a good idea if you have 1,000 to choose from. The fact that 999 of those ideas sucked doesn’t matter so long as the process gave you at least one good idea to work with. It’s much difficult — if not impossible — to have a good idea if you’re not having any ideas at all. We can be critical regarding which ideas have the potential for follow-through only if we’ve formed the habit of having ideas in the first place. But I won’t leave you with just abstract advice. I’ll give you a relevant example of how I’ve applied this to my own writing process. I often go through books I’ve read that have significantly impacted me, reading all the bits I’ve highlighted (and I’ve highlighted a lot…). As I’m doing so, I have my Medium draft page open, and I create a new draft for every idea that resonates with my own experience or that I think would be helpful to share with others. Sometimes, I’ll combine several of the ideas into a list piece (such as this one). The point is to generate as many blog post ideas as I can, even if I know that I’ll only end up using a tiny percentage of them. Currently, I have over 100 drafts sitting in hibernation, with relevant quotes and page numbers from the books where I got the ideas from. This helps me do two things: I can practice writing headlines and subtitles in bulk. I can improve my headline writing skill much quicker if I write 100 of them a week or a month than if I only ever write one a day. I can immediately tell which drafts are worth being turned into a blog post later. Getting all the ideas drafted allows me to take some time away from them. When I go back to scan over them, it’s much easier for me to see a headline and think, “That has potential,” or “That’s a post that I would personally click on.” In a way, this helps me practice my convergent thinking and refine my critical eye, but I had to let my divergent thinking take place first. Your gig may not be writing, and maybe this is jumping a little ahead, but do your best to come up with as many ideas as possible. Just remember: while divergently thinking, ditch the judgment. At first go for quantity; later you will be critical and edit for quality. — Mihaly Csikszentmihalyi You can decide which ideas you have are bad or good later. When in the process of generating ideas, however, you need to give yourself permission to be as wild as you can possibly be. How else could you possibly discover the hidden gems buried within you? This is what having a flexible mind is all about. If your mind is too rigid, it won’t have any ideas at all. That would be like trying to get better at dancing while not giving your body permission to move any of its limbs. If your mind is too open, maybe you aren’t as critical as you should be. Flexibility — being able to go between these two poles — however, is how we become more creative. Catch Yourself When You’re Producing Redundant Ideas While it’s important to have a lot of ideas, it’s equally important to make sure you aren’t having the same idea over and over again, or at the very least that you aren’t expressing the same idea in exactly the same way, like some sort of scripted program. Quantity is important, but try to avoid redundancy. Variety in conversation, in the selection of music, in a menu, is generally appreciated. It pays off to learn how to alternate topics of conversation, types of restaurants, kinds of shows, ways of dressing. — Mihaly Csikszentmihalyi This is another reason I choose to bulk write my drafts these days. When I scan over them, I can easily notice when I’ve generated a ton of redundant ideas. This helps me be more selective when I actually do choose something to write for that day. I always ask myself, “Have I already said it?” and if so, “Will saying it again, only better, be worth it for myself and others?” Sometimes we can’t avoid saying the same thing over and over again. Good advice, after all, needs repeating. History’s greatest thinkers were people who simply figured out a way to zero in on their perspective — their truth — and make it accessible to others. But if we are going to repeat ourselves, we should think of how to express it differently, or more skillfully than we did before. Try to Be Original, But Don’t Stress It Too Much This relates a lot to the first two points but deserves it’s own section because “doing your best” is really all you can do. What everyone dreams of is being original, of having ideas no one has ever had before, and of being paid to put one’s original ideas into action. Originality is one of the hallmarks of creative thinking. It is more difficult to learn how to think in creative ways than to be fluent and flexible. It requires cultivating a taste for quality that is not necessary for the other two. — Mihaly Csikszentmihalyi In the beginning, simply producing ideas is more important than worrying about whether or not they are original. But if originality is the goal, we should always try to produce ideas that are out of the ordinary. And here’s the thing. We don’t need to necessarily come up with “new” ideas in order to be original, we just have to find out ways of expressing old ideas in new ways. One exercise involves taking a random paragraph from the paper each day and seeing if you can find unique, more memorable ways of expressing the same ideas. — Mihaly Csikszentmihalyi After all, that’s what a lot of Medium writers are doing. They are sharing tips and advice that helped them, but they are constantly looking for ways to make it relevant again or apply it to other domains of life. As a writer, I don’t think about how to say something no one has ever said before. I question if that’s even possible — there’s a pretty good argument that it isn’t. Even if I write about my authentic fears and insecurities, they aren’t necessarily things no one else has ever felt. What I can do, however, is develop my own style, become more entertaining to read, and really hone my ability to communicate good ideas effectively so as to help the greatest number of people that I can. If I can do that with my time on Earth, then I’ll consider it a life well-lived. Brainstorm… and Then Brainstorm Some More Okay, so we know that we need to produce more ideas, avoid redundancy, and do our best to be “original.” Now what? We need some practical techniques that can help get our brains into the habit of thinking divergently — and make no mistake, it is a habit. Brainstorming is one of the best methods for becoming better divergent thinkers and exercising our creative “muscles.” Bulk writing my drafts is a form of brainstorming. It helps me pull all the ideas I find relevant out of the texts I’ve read so that I can easily find something to write about each day. But there are other ways of brainstorming, such as (and I’m skipping ahead again) keeping a journal where you jot down every idea you have. You can even invent your own methods of brainstorming — maybe you take all your paintbrushes and see what patterns they make when brushed against the canvas in various ways, without really caring about producing a “quality” painting. The important takeaway is to keep developing the habit of letting your brain generate a consistent stream of ideas, worrying about the quality of those ideas later. Write Your Ideas Down in a Journal, or Kiss Them Goodbye I’ve already spoiled the show on this one, but it’s important to restate that we can’t trust ourselves to remember ideas. If we don’t write them down, chances are, we’ll lose them. I had a bad habit of never writing ideas down as I had them, and who knows how many great blog post ideas I’ve lost that way. Don’t make the same mistake. There are no excuses in today’s world. Keep a journal on your desk, near your bedside, or anywhere else ideas seem to come to you. If you’re in the shower and you have a good idea, repeat it to yourself to keep it in your short-term memory, then write it down when you’re finished cleaning up. If you’re on the go and all you have is your phone, well… there’s this handy app on most phones called “Memo” or “Notepad” or something of that nature, where you can quickly take notes. If you’re a musician trying to come up with lyrics, and you randomly sing a line that sounds good to you one day, record it on your phone so that you don’t forget how you sang it later. Remember, the more you generate ideas, the easier it becomes, and the more you can be critically selective later. The point is to first be generating ideas. Unblock Your Stream of Consciousness There’s a time for writing, there’s a time for editing. Perhaps this one is more relevant to writers, but since writing is also a major form of professional communication (e-mails and the like), it’s relevant to other fields as well. When I write the first draft of a blog post, I stream-of-consciousness it. It’s a sloppy mess half the time, sure, but that’s the point. I’m getting all the ideas out. Every sentence expresses an idea. Not all of my sentences are good. In the beginning, I published these sloppy messes, which got me this far, but now I’m ready to slow down and actually refine them. I’ve learned to make peace with both my inner critic and the wild creative that just wants to splash “word paint” down on the page and see what happens, and I value both of these “two beings.” When you’re getting the gist of the post down, however, it’s more important to simply produce an uninterrupted train of thought, even if you’ll end up deleting or rewriting huge portions when you revisit it. Divergent thinking is the same thing as unblocking your stream of consciousness, letting it flow — the more you get into the habit of doing that, the easier it will be for you to have ideas. Create a Map of Your Own Mind This one is for the visual people. But even words are images, so “word people” can benefit from this too. It can be helpful to create visual aids to organize the ideas that you’ve brainstormed, placing “central” ideas at the center and spin-off ideas branching out. I’m thinking of doing something like this to help organize all the thinkers that have influenced me so that I can better understand their perspectives, key takeaways, and how they relate to one another. I hope this will help me internalize their knowledge and keep my mind organized as I go about exploring new points-of-view, comparing and contrasting them with what I’ve already learned. This involves a bit of convergent thinking, as it’s more on the organizational end. But like with all things in life, things are rarely ever cut and dry. Organizing can be considered a creative process too, especially if it helps you form connections between all the different ideas and perspectives you’ve been exploring at random. Plus, who doesn’t want to feel like their mind isn’t becoming more organized as time goes on? Just Remember… Divergent thinking is a habit that we solidify by repeatedly doing it. Even if we suck at first, we can become better at having ideas. Persistence is key. Don’t give up. Instead, create the opportunities to practice divergent thinking in your life by considering the seven tips that I’ve provided. Don’t be discouraged if 99% of your ideas are bad. You’re looking for the 1% that you can work with, and you’ll get better at spotting it as time goes on.
https://medium.com/the-innovation/7-essential-tips-to-help-you-develop-divergent-thinking-become-a-more-creative-individual-bc169ef5d3bd
['Colton Tanner Casados-Medve']
2020-12-19 22:25:23.028000+00:00
['Growth', 'Creativity', 'Personal Development', 'Self Improvement', 'Advice']
The Intuition Behind Integration
The Intuition Behind Integration An introduction to integral calculus with a focus on the core concepts and the beautiful intuition that lies behind the algebra. Integral calculus and differential calculus are two sides of the same coin. Integration, however, can seem more complicated than differentiation because it involves the introduction of foreign notation and abstract ideas. However, the ideas themselves are beautifully intuitive and allow for the translation of complex ideas to simple algebraic manipulations. This article seeks to provide an intuitive view of integral calculus, showing how the math logically flows from the ideas and detailing the uses of integration. Classical integration really isn’t much more than calculating areas under curves. In middle school, we all learnt how to calculate the areas of various regular and irregular polygons. We also learnt the formulas for finding the area of a circle and ellipse. But how would you go about calculating the area of other curved shapes? What about finding the area under a curved function, such as the one below? How would you find the area between the curve and x-axis between the points a and b? Credit: Wikipedia You’ll find that none of the methods you’ve learnt so far enable you to do so. This is where the prowess of integral calculus comes into play. As it turns out, however, calculating this area isn’t as difficult as it may seem, and the procedure is rooted in the more familiar methods. So, how do we go about finding the area? What if we divided the region into more standard shapes — such as a rectangle. We know how to find the area for a rectangle — it's just the length x width. Let’s split the area into rectangles with an equal width which just comes under the curve. This looks like: These rectangles approximate the area under a curve — it provides us with a glimpse into the fundamental concept of integration and calculus as a whole. This is what our estimation would be with 4 rectangles. We can calculate the area of each of these rectangles since we know the width (the distance between the endpoints a and b divided by 4) and the height (the function evaluated at the right endpoint). Now, this clearly isn’t a very good estimation — look at all that space. But what would happen if instead of 4 rectangles, we used 10? Or 1,000? Or 100,000? What would happen if we let the widths of every rectangle approach 0 and the number of rectangles became closer and closer to infinity? Well, then we would have the exact area. This makes sense intuitively: as the width of the rectangles becomes smaller and smaller, the individual rectangles fit the curve better and better; the sums of their areas converge to the true area between the curve and the x-axis. Here’s a nice animation illustrating this point: The step represents the width of an area. We can see the convergence as the width gets closer to 0. This idea can be made rigorous by describing it mathematically: This formula can look quite daunting at first, but all I’ve done is transcribe my exact words into mathematical notation. Let’s go through it piece by piece, working from the inside out. Inside the summation, we’re simply calculating the area of a rectangle by multiplying the value of the function at the right endpoint by the width of the rectangle, as described before. This width is given by the difference of the endpoints divided by the number of divisions (this ensures every width is equivalent). The actual integral can then be calculated via summing the areas of all of the rectangles as the number of rectangles approaches infinity. This is describing only one kind of integral, however. It turns out that you don’t need to ensure the rectangles have an equal width nor do they need to have a height equivalent to the right endpoint. A more general representation of this formula is as follows (which is what you’re more likely to see), using standard calculus notation: This is known as a Riemann Sum, after Bernhard Riemann, one of the founding fathers of complex analysis. Now, this looks even scarier, but we just added a few more details. What this formula states, quite plainly, is that you can calculate the area between a function and the x-axis as the sum of rectangles. The area of each rectangle is given by some arbitrary width, Δx, and the height is given by the value of the function of x, where x is chosen on some criteria (left-endpoint, midpoint, greatest value, etc.). The above equation appears complex, but all it does is mathematically quantify what was previously stated. As the widths of the rectangles get infinitesimally small (closer and closer to 0), our approximations for the area using rectangles become more and more accurate. The equation generalizes an integral through the fact that the width does not have to be consistent and that the height of the rectangle can be determined via different criteria; the end integral, however, will always be the same. The notation of an integral, ∫, is just an elongated S (standing for sum), and we are evaluating the integral of a function f(x) between 2 points: a and b. The dx simply denotes an infinitesimal value for the width of each partition (this is the equivalent of Δx in our integral, as Δx tends towards 0). An integral which is evaluated between 2 points is known as a definite integral. A definite integral allows us to actually calculate the area between a function and the x-axis (or the y-axis, or even another function, but that’s slightly more involved). How is this integral actually evaluated? Luckily, you don’t have to go through a lengthy process of summing many, many rectangles. The first part of the fundamental theorem of calculus states that: F(x) is standard notation for the antiderivative of f(x). What this means is that the derivative of F(x) is equal to f(x) i.e. F’(x) = f(x). Antidfferentiation is the process by which, given the derivative of a function, you ascertain the original function: if f’(x) = 2x, what was the original function we differentiated? The upshot is an indefinite integral returns a function; a definite integral returns a value. This is the secondary purpose of an integral: it is the inverse function of a derivative. This is shown mathematically by the second part of the fundamental theorem of calculus, The above integral is an indefinite integral, as it has no endpoints. All this integral does is find the antiderivative of a function. In order to evaluate it, you must be familiar with differential calculus and the rules of derivatives. There are a variety of rules you can use to solve it, and they stem from how derivatives are computed. Here are the basic rules. If you’re confused by this chart or don’t understand where these rules come from, I recommend that you further read up on derivatives (which are just as intuitive as integrals, if not more so). So, in order to find the area between a function and the x-axis, you first perform antidifferentiation upon the function and then evaluate it at both endpoints (remember that the antiderivative is still a function). Finally, subtract the first result from the second as stated by the fundamental theorem. So far this has all be very abstract and technical, so let’s actually apply the concepts in an example. We want to find the area of the function f(x) = 3x² between the endpoints 0 and 6. The first step is to find the antiderivative of this function. Antidifferntiating it, we get F(x) = x³ (using Rule №4 from the chart). If you want to double-check, simply take the derivative of F(x): if it equals f(x) i.e. the original function, its correct. We know plug in the values for our endpoints into F(x). F(0) = 0³= 0 and F(6) = 6³ = 216. We now subtract F(0) from F(6): 216 − 0 = 216. ∴ The area between the graph of the function f(x) and the x-axis is 216 units². That wasn’t too difficult now, was it? Integration problems can and do get more complex, but the underlying principle of finding some value by summing smaller and smaller sections remains the same. Integration is one of the most important techniques in math, with applications ranging from physics to finance. But it isn’t as complex or intimidating as people think — the underlying concepts are incredibly intuitive and comprehensible. In fact, you may naturally find yourself thinking in terms of integration for certain problems that appear unsolvable. The issue with calculus for most people lies in the algebra, but when you understand what the algebra truly represents, it becomes significantly less daunting and obfuscated. Integral calculus is closely related to differential calculus, and all other branches (differential equations, vector calculus, multivariate calculus, etc.), stem from these two founding ideas. The goal of this article is to introduce the notion of integration, letting the math flow from the intuition. Integral calculus has allowed us to understand our world better and describe phenomena more precisely than we could ever have hoped.
https://medium.com/cantors-paradise/the-intuition-behind-integration-1bc5d15009e0
['Kaushik Chatterjee']
2020-08-05 03:30:29.136000+00:00
['Education', 'Science', 'Calculus', 'Mathematics']
Data Visualization with Python Matplotlib and GridDB | GridDB: Open Source Time Series Database for IoT
Data Visualization with Python Matplotlib and GridDB | GridDB: Open Source Time Series Database for IoT Israel Imru Follow Nov 13 · 7 min read Data in general is a large heap of numbers, to a non-expert these numbers may be more confusing than they are informative. With the advent of big data, even experts have a difficult time making sense of data. This is where visualisation comes in. Data Visualisation can be thought of as the graphical representation of information. Visual elements like charts, graphs and maps are often key to understanding trends in data and making data driven decisions. A good visualisation is often the best way to communicate results , after all, “a picture is worth a thousand words”. In this post we will look into some key elements of visualisation using python and GridDB. Before we can get into visualisation, it is important to have a database that can handle big data easily. This is where GridDB comes in. GridDB is an open source time series database optimized for IoT and Big Data. GridDB is high, scalable, reliable, ensures high performance and is optimised for IoT. Moreover, GridDB is easy to use with a number of popular programming languages like C, python and java. Installation is pretty simple, and is well documented here. To checkout the python-gridDB client please refer to this video. In this post we will create a few simple visualizations using the matplotlib library in python. Setup Quick setup of GridDB Python Client on Ubuntu 20.04: 1. Install GridDB Download and install the deb from here. 2. Install C client Download and install the Ubuntu from here. 3. Install requirements A) Swig tar xvfz swig-3.0.12.tar.gz cd swig-3.0.12 ./configure make sudo make install wget https://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gz tar xvfz swig-3.0.12.tar.gzcd swig-3.0.12./configuremakesudo make install B) Pcre sudo apt-get install -y libpcre2-dev C) Install python client https://github.com/griddb/python_client/archive/0.8.1.tar.gz wget \ tar xvzf 0.8.1.tar.gz Make sure you have python-dev installed for the corresponding python version. If you are using python 3.6 then you may need to add the repository first sudo add-apt-repository ppa:deadsnakes/ppa Then Installing the python-client cd python_client-0.8.1/ make We also need to point to the correct locations export LIBRARY_PATH=$LIBRARY_PATH:/usr/share/doc/griddb-c-client [insert path to c_client] export PYTHONPATH=$PYTHONPATH:[insert path to python_client] export LIBRARY_PATH=$LD_LIBRARY_PATH:[insert path to c_client/bin] Python libraries We will use python 3.6 for this post. Installing matplotlib, numpy, statsmodel and pandas is a simple pip install. pip install matplotlib pip install numpy pip install pandas pip install statsmodels Now we can get to the visualisation. GridDB provides a nice interface to access time series data. We can simply connect to a GridDB cluster and then dump all the data to a pandas dataframe. This post goes into the details of how to access data from a GridDB cluster using python. For a quick reference, we can simply declare a GridDB cluster and perform sql queries on it. For example, query = ts.query("select * where timestamp > TIMESTAMPADD(HOUR, NOW(), -6)") Data Analysis and Visualisation We will use a publicly available dataset from Kaggle. For this post we have picked the shampoo sales data. This dataset contains sales of shampoo over a three year period at the month level. Thus, the two columns in this dataset are sales and month-year. Step 2: Importing Libraries We first import relevant libraries i.e pandas for loading the dataset, matplotlib for visualisations and statsmodel for some time series analysis. The plot object in matplotlib is called pylot which we import as plt. We will talk about the time series import in more detail later in the post. import pandas as pd from matplotlib import pyplot as plt from statsmodels.tsa.seasonal import seasonal_decompose Step 3: Data Loading and Processing First we load the data. For this we use the read_csv functionality in pandas. df = pd.read_csv("sales-of-shampoo-over-a-three-ye.csv") Alternatively, we can use GridDB to get this dataframe. The data has two columns “Month” and “Sales of shampoo over a three year period”. Next we split the Month column which has the format year-month column into two columns year and month. df[['year','month']] = df.Month.str.split("-",expand=True) Now we can move on to the visualisations. Step 4: Visualisations Line Plot First we use a simple line plot with year-month on the x axis and sales on the y axis. The figsize determines the size of the figure, line style determines the type of line we use, markers tells us which marker to use (s for squares). The colors for the line and markers can be set using the colour and markerfacecolor option respectively and the size of the marker can be set with markersize. Furthermore we rename the labels of the plot. More references to the various arguments that can be passed to plot can be found here. df.plot(x='Month',y='Sales of shampoo over a three year period',figsize=(15,6),linestyle='-', marker='s', markerfacecolor='b',color='y',markersize=11) plt.xlabel('Year-Month') plt.ylabel('Sales') We can see that there is a year over year increase in shampoo sales, so there is a clear increasing trend in the data. We also note that the highest sales in each year are consistently around November. This indicates there is some seasonality in the datasets well. Next we average the data over a month and see the trend. dfm =df.groupby('month').mean().reset_index().sort_values(by=['month']) dfm["month_number"] = pd.to_datetime(dfm["month"], format= "%b").dt.month dfm = dfm.sort_values(by=['month_number']) dfm.plot(x='month',y='Sales of shampoo over a three year period',figsize=(15,6),linestyle='-', marker='s', markerfacecolor='b',color='y',markersize=11) plt.xlabel('Year-Month') plt.ylabel('Mean Sales') We see that the sales indeed peek around November and decline. Another nice way of visualising this is through a 2D heat map. x=dfm['month_number'] y=dfm['Sales of shampoo over a three year period'] plt.hist2d(x, y) plt.xlabel('Month') plt.ylabel('Mean Sales') Next we plot some basic time series based charts. Lag Plot A lag plot is a simple plot where the y axis has a certain amount to lag (default 1) to the x axis. Lag plots can be used to check if a dataset is random or not. In time series datasets we should see a trend pd.plotting.lag_plot(df['Sales of shampoo over a three year period']) We can see that there is an upward linear trend with some outliers. Autocorrelogram or Autocorrelation Plot Autocorrelogram are another way of checking for randomness in data. We compute autocorrelation for the data values at varying time lags. The plot shows lag along the x-axis and the correlation on the y-axis. Dotted lines indicate any correlation values above those lines are statistically significant. pd.plotting.autocorrelation_plot(df['Sales of shampoo over a three year period']) We see that there is a positive autocorrelation in the dataset for low lags. The higher lags don’t make sense as we have data for only three years. A nicer plot is provided by the statmodel library. import statsmodels.api as sm sm.graphics.tsa.plot_acf(df["Sales of shampoo over a three year period"]) Now we can see the strong positive correlation upto lag = 12. Seasonality Here is where the statmodel ts functions will come handy. We will do a simple seasonality analysis to see the trend in data. The seasonal_decompose is used to plot the seanlity. However, ts requires the data to have a dateIndex so we create a dummy DateIndex. df["month_number"] = pd.to_datetime(df["month"], format= "%b").dt.month df.year = df.year.astype("int") df["date"] = pd.to_datetime(((df.year+2000)*10000+df.month_number*100+1).apply(str),format='%Y%m%d') df = df.set_index("date") from statsmodels.tsa.seasonal import seasonal_decompose decomp = seasonal_decompose(x=df[["Sales of shampoo over a three year period"]], model='additive') est_trend = decomp.trend est_seasonal = decomp.seasonal fig, axes = plt.subplots(3, 1) fig.set_figheight(10) fig.set_figwidth(15) axes[0].plot(df["Sales of shampoo over a three year period"], label='Original') axes[0].legend() axes[1].plot(est_trend, label='Trend',color="b") axes[1].legend() axes[2].plot(est_seasonal, label='Seasonality',color='r') axes[2].legend() Alternative we can plot boxplots as the month level df.boxplot(figsize=(15,6),by='month_number',column='Sales of shampoo over a three year period') We can see an upward trend and mild seasonality of peaks in November. However, the dataset is too small to make conclusive statements about the seasonality. Conclusion In this post we first learned how to set up GridDB and python. Next we discussed some common visualisation methods for time series. Finally, we did some trend, autocorrelation and seasonality analysis and plotted corresponding plots. For more advanced visualisation and dashboarding check out this post.
https://medium.com/griddb/data-visualization-with-python-matplotlib-and-griddb-griddb-open-source-time-series-database-ca6c47708bab
['Israel Imru']
2020-11-16 19:16:53.957000+00:00
['Data Visualization', 'IoT', 'Python', 'Time Serie', 'Databas']
Revealing the Dark Magic Behind Deep Learning
By Tal Ridnik Introduction Training regimes, regularization schemes, and architecture enhancements are crucial for effective deep learning. We shall name them “Dark Magic Tricks”. In this article, we review useful dark magic tricks, accompanied by examples and use-cases. We also compile a generic “checklist” of tricks testing, that can be used to upgrade any existing deep learning repository. Dark magic tricks are usually not fully supported by deep mathematical background but are more empirically and heuristically based. Due to that, in many cases they are overlooked and briefly mention as implementations details in academic articles, sometimes even visible only by inspecting source codes. The lack of fundamental understanding and the heuristic nature of these tricks, in addition to their importance and effectiveness, is the reason we named them “Dark Magic”. Despite the relative disregarding, we argue that the difference between mediocre and top repositories is almost always due to better dark magic tricks. Even for articles that claim to reach new SotA scores using a unique novelty, in almost all cases the novelty is accompanied by very effective usage of existing dark magic tricks. There is no trick that always works, and has “correct” hyper-parameter values. You usually need to choose the relevant tricks for each problem and tune their hyper-parameters. However, knowing and understanding common best practices can increase dramatically the chance to use dark magic tricks effectively and get top scores. We have compiled a generic checklist of dark magic tricks and best practices, that we try and test each time we start a new repository or upgrade an existing one. For each checklist trick, we always try to recommend a specific default option, instead of suggesting a long list of possibilities. Each recommendation is accompanied by example and uses cases that were thoroughly tested and reviewed. While our main focus was on classification datasets, we believe that our checklist has a good chance to generalize to other tasks and datasets. Tricks Testing Checklist Training Schemes: Which learning rate regime to choose Which optimizer to choose Should we always pretrain a model on ImageNet Which batch size to use (-) Regularization Tricks: AutoAugment Weight decay Label smoothing Scheduled regularizations Mixup Auxiliary loss (-) Crop factor, padding and resizing schemes(-) Drop path (-) CutOut (-) Architecture Enhancements: Squeeze-And-Excite (SE) layers Stem activation functions Attention pooling (-) While we, of course, can’t cover all the existing dark magic tricks, we found the checklist above very useful and were able with it to improve our scores significantly on multiple datasets — CIFAR10, CIFAR100, ImageNet, Palitao-102K, Alicool, COCO keypoints, Market-1501, SVHN, Freiburg-grocery and more. In the following sections, we will dive in and analyze the different tricks on the checklist. Due to space considerations, tricks marked with (-) are left for future posts. Training Schemes Which Learning Rate Regime to Choose We experimented a lot with different kinds of learning rate regimes, including gamma decay, cosine annealing, heuristics (“reduce learning rate by factor 0.1 in epochs 50 and 75…”) and more. We found that the learning rate regime which is the easiest to tune and generalize best to multiple datasets is “Cosine power annealing”, that can be seen as an average between cosine annealing and gamma decay via a control parameter P: P permits tuning of the curves decay rate such that it maintains a high learning rate for the first few epochs, while simultaneously taking a shallower slope during the final third of epochs. We usually choose P=2 or P=4. We also found that given a fixed number of epochs, repeated cycles of cosine power annealing with decaying amplitude gave us better test scores than a single cycle. Another advantage of repeated cycles is that during the training we get improving estimations for the final accuracy. Finally, we found that a small warm-up duration stabilizes our training and enable us to use a larger initial learning rate, which accelerates the convergence. To conclude, the learning regime we found that works best on multiple datasets is cycles of cosine power annealing, with decaying amplitude and initial warm-up, as presented in the following graph: Comparing cycles of power cosine against simple gamma decay and cosine annealing will sum up to 3 trials. Which Optimizer to Choose Currently, most top deep learning repositories are using simple SGD with momentum optimizer, instead of fancier optimizers like ADAM or RMSProp, mainly because SGD uses less GPU memory and has significantly lower computational cost. For multiple datasets, we found that SGD with Nesterov-momentum outperforms plain SGD with momentum optimizer while having the same GPU memory consumption and a negligible additional computational cost. An example from ImageNet testings: Hence we recommend using SGD with Nesterov momentum optimizer as the default option for deep learning training. Comparing Nesterov momentum to regular SGD with momentum and ADAM optimizers will sum up to 3 trials. Should We Always Pretrain a Model on ImageNet A widespread practice for computer vision deep learning is to pretrain a model on ImageNet. While this approach showed great success in the past, it was usually used on large models like ResNet or Inception, that contain tens of millions of parameters. Nowadays, there are many models with comparable performances to ResNet, but with an order of magnitude fewer parameters, such as MobileNet, ShuffleNet, and XNAS. We found that when training these smaller models on different datasets, pretraining on ImageNet may hurt the performance significantly, as this example on COCO keypoint detection dataset shows: Hence our recommendation is to consider carefully the effectiveness of pretraining a model on ImageNet, especially for small models. Comparing training without and with ImageNet pretraining will sum up to 2 trials. Regularization Tricks AutoAugment AutoAugment is a seminal work where learned augmentations replaced standard color augmentations. Three AutoAugment policies were learned, for the datasets: CIFAR10, ImageNet and SVHN. When using these policies, we were able quickly to reproduce the article results and get an improvement over standard color augmentations However, what about other datasets, where no specific policy of AutoAugment was learned? We advise against trying to learn dedicated augmentations regimes for your dataset since it requires a substantial amount of GPU hours and extensive tuning of hyper-parameters, which can take weeks over weeks. Notice that newer works that claim to learn augmentation policies faster studied exactly the same datasets as the original AutoAugment article. Instead of trying to learn a tailor-made augmentation regime for your datasets, we suggest using existing AutoAugment policies. Here are results we got for Freiburg-groceries and Alibaba-internal Palitao-102K datasets: Hence we recommend trying using AutoAugment existing policies instead of plain color augmentation. Comparing AutoAugment (preferable ImageNet policy) to standard color augmentations will sum up to 2 trials. Weight Decay While mentioned in every beginner’s deep learning course, weight decay does not receive the attention it deserves among regularization techniques. Most repositories don’t seem to invest lots of effort in optimizing the weight decay, and just use a generic value, usually 5e-5 or 1e-5. We argue that weight decay is one of the most influential and important regularization techniques. Adjusting the weight decay is crucial for obtaining top scores, and the wrong value of weight decay can be a major “blocker”. For example, here are tests we did to optimize weight decay on ImageNet and CIFAR10: We can see that for both datasets optimizing the weight decay gave a significant boost to the test score. Hence we recommend optimizing weight decay instead of using a generic value. We suggest testing at least 3 values of weight decay, a “generic” value (~5e-5), bigger weight decay and a smaller one, summing up to 3 trials. If significant improvement is seen, do more tests. Label Smoothing Label smoothing is an important classification training trick that appears in most repositories, usually with a default smoothing value of 0.1, which people rarely change. With label smoothing, we edit the target labels to be: target = (1 — epsilon) * target + epsilon / (num_classes-1). We found that label smoothing improves the training score for almost any classification problem, where for datasets with large number of labels like Palitao-102K, larger values of label-smooth (>0.1) gave further improvement: Hence we recommend using label smoothing for classification problems. This is especially important for datasets with a large number of labels. We recommend doing checklist trials for 3 values of label smoothing: 0, 0.1, and 0.2. Scheduled Regularizations It is a very common practice to govern a regularization technique by one (or more) fixed hyper-parameter values. However, for learning-rate it is clearly absurd to think that a fixed value is the optimum solution, and people always use a scheduling regime, usually decreasing the learning rate during the training. Why shouldn’t we use similar scheduling regimes for regularization techniques? An interesting question would be: should we increase or decrease regularization “power” during the training? Here is where we stand — overfitting happens toward the end of the training, when the learning rate is low and the model has almost fully converged. Hence we argue that we need to increase regularization strength as the training progresses, and prevent the overfitting at the final training stages. Here is an example: we tested different values of weight decay on CIFAR100 dataset, and found very clearly that 3e-4 is the optimum value (for a fixed weight decay). A simple test with scheduled weight decay, where we linearly increase its value during the training, immediately gave improvement over the best fixed-value option: We are still researching other scheduling schemes — for example, instead of changing a regularization factor linearly (linear policy), we can increase it after each learning cycle (cycles policy), or make it proportional to the learning rate (learning rate policy): For now, we recommend that once you established an optimal value for (fixed) weight decay, compare it against linear scheduled weight decay regime, summing up to 2 trials. Mixup Mixup technique was suggested in Facebook article “mixup: Beyond empirical risk minimization” and gained some popularity since. We followed the article implementation of mixup: These are the results we got when testing mixup on 3 classification datasets: We can see that on all the datasets we didn’t get any improvement from mixup. In addition to these direct comparative runs, we also tried mixup with a variety of changes and adjustments: Using more epochs. With and without label smoothing. Mixup with reduced weight decay. Mixup without autoAugment. Mixup with const mix factor of 0.5 instead of drawn from betta function. Still, none of the runs surpass the baseline run — no mixup. These are frustrating results, that are encountered a lot in deep learning — someone claims to have a dark magic novelty, and shows improved results in his repository. When importing his novelty to your own repository, no improvement is seen! However, don’t forget that regularization tricks need to work together. Sometimes a specific mix of regularization techniques works, and sometimes not. Maybe there is an inner “competition” between the techniques, where a specific regularization can fill the place of another. In addition, specifically for mixup, the articles that claim to see improvements from it usually tested it on large models like Resnet50, which have tens of millions of parameters. The models we tested were lighter, with only ~5M params. Same as pretraining on ImageNet, it might be that mixup works better for larger models. We shall investigate it in the future. Hence we recommend comparing your testing scores without and with mixup, summing up to 2 trials. Don’t be alarmed if you don’t see improvement. We didn’t. Architecture Enhancements Squeeze-And-Excitation (SE) Layers SE layers are architectural units that adaptively recalibrates channel-wise feature responses by explicitly modeling interdependencies between channels. An example of SE block implementation can be written as: def se_block(in_block, ch, ratio=16): x = GlobalAveragePooling2D()(in_block) x = Dense(ch//ratio, activation='relu')(x) x = Dense(ch, activation='sigmoid')(x) return multiply()([in_block, x]) We highly recommend trying to add SE layers to any existing architecture: they are very simple, have low computational cost, and in most cases will give a nice boost to testing score, as the following runs demonstrate: We recommend trying adding SE layers to any network backbone. Testing your architecture with and without SE layers will sum up to 2 trials. Downscaling Layers Activation Functions Nowadays, Relu is used almost always as the activation function for every layer in deep learning networks. This practice hasn’t changed much in the last couple of years, and maybe better usage of activation functions is the edge your model needs to surpass the competitors and get top scores! For ImageNet and other datasets, we usually place at the beginning of the network layers, with convolutions of stride 2, for downscaling the input. We found that for those downscaling layers, using more “advanced” activation function, such as Leaky-Relu, Elu or Swish, significantly and consistently improves results: We speculate that unlike Relu, the newer activation functions allow (some) data flowing even for x<0, hence they work better for downscaling layers where we usually compress the data. Leaky-Relu has significantly less computational cost than Elu or Swish. Hence, our recommendation is to use Leaky-Relu instead of plain Relu as the default activation layer of downscaling layers. Testing your downscaling layers with Leaky-Relu, Relu and Swish will sum up to 3 trials. Summary In this article we have compiled a generic checklist of dark magic tricks, that can be used to upgrade any existing deep learning repository. We reviewed each trick and tried to offer insights, examples, and best practices. Our recommend default baseline settings are the following: Learning rate regime — cycles of cosine power annealing, with decaying amplitude and initial warm-up. Optimizer — SGD with Nesterov momentum. Pretraining on ImageNet — only for large models and lack of sufficient data. AutoAugment — use AutoAugment regime instead of standard color augmentations. Weight decay — don’t use a “generic value”. Label smoothing — use in classification tasks, with a smoothing factor of 0.1. Mixup — don’t use for small models. Squeeze-and-excitation layers — use. Activation functions — use Leaky-Relu instead of Relu for downscaling layers. Compared to the baseline scheme, for optimizing a repository we propose to do 15 checklist runs: Note that the testing scheme we suggest can be paralleled, and all 15 runs can be done simultaneously. Also, if you want to reduce the number of runs, use the default options for some of the tricks. An underlying assumption of our methodology is that the tricks are independent, and can be optimized separately (first-order approximation). This is not necessarily true, and it is probable that jointly optimizing several tricks will give better scores. However, direct joint optimization will increase the number of runs dramatically, reduce the ability to parallelize and make the whole process less feasible. We are currently working on ways to enable tricks joint optimization and increase the automatization level of the checklist processing while keeping the number of runs reasonable. Note that we chose to leave the following dark magic tricks to future posts: Which batch size to use Auxiliary loss Crop factor, padding, and resizing schemes Drop path CutOut Attention pooling These tricks are also important, and we recommend to optimize them in the same “checklist” manner that we proposed above. Original Source
https://medium.com/dataseries/revealing-the-dark-magic-behind-deep-learning-6b9e8f616e85
['Alibaba Cloud']
2019-08-09 08:49:13.919000+00:00
['Algorithms', 'Deep Learning', 'Artificial Intelligence', 'Machine Learning', 'Alibabacloud']
Does the Data Scientist Have a Theory of Mind?
Does the Data Scientist Have a Theory of Mind? Unlikely, But Easy to Check Photo by Andre Mouton on Unsplash David Premack and Guy Woodruff published a paper in 1978 asking whether the chimpanzee has a theory of mind, and by extension, others have asked the same question of humans? The abstract from the paper provides a succinct description of the theory. “Abstract: An individual has a theory of mind if he (or she)imputes mental states to himself and others. A system of inferences of this kind is properly viewed as a theory because such states are not directly observable, and the system can be used to make predictions about the behavior of others. As to the mental states the chimpanzee may infer, consider those inferred by our own species, for example, 1) purpose or intention, as well as 2) knowledge, 3) belief, 4) thinking, 5) doubt, 6) guessing, 7) pretending, 8) liking, and so forth.” (the enumeration is mine). Yet, the closer the project or product manager can come to understanding these cognitive states of mind, the greater the chance for team success. The project sponsor (she/he) doesn’t have to be a data scientist. But, the team lead should be able to explain the project to a 4th grader. Are Such States Directly Observable? Well, yes and no. I work across a number of data science teams. Each team has a makeup of unique and individual minds. It would be very time consuming to elicit the inferences driving the goals and objectives of the project as described by Premack and Woodruff. The alternative strategy in vogue with data science teams is to give them tools and let them go at it. Claire D. has a post about tools, for example. Is it science fiction to think that we will have a Kickstarter Project delivering the perfect Mind of the Data Scientist Headset, similar to the hardware being developed by Mendi, a Stockholm based start-up? Inquiring minds are waiting. The Perfect Alternative I am a big fan of asking another human being to draw me a sketch of what they are thinking. Napkins work, but whiteboards are ready-made for these types of collaboration sessions. Don’t call them brain-storming sessions, design sprints, mind-mapping exercises, or the like. Call the session a Theory of Mind Exercise. This guarantees that everyone shows up, early, and with a hot cup of Joe, and just a little anticipatory energy. Eye rolling is non-existent. The rules are simple. Tell them to use just simple shapes (triangles, squares, and circles) to draw diagrams that answer the following questions; What is the purpose or intention of the project? Do you have the knowledge to meet these project objectives? What do you believe success looks like? Does the team share your way of thinking about the project? Do you have any doubts about the value of the project? What aspects of the project do you think is pure guesswork? Are there others pretending to understand that “they think they know” what you are thinking? Do you like your team members and do they like you? (Optional, but guaranteed to spark fireworks if the team is already dysfunctional) If the team is small (less than five members), I have found the white board works. If the team is any larger, my approach is to select three questions from the list above, give each team member three sheets of blank copy paper, ask them to select a couple crayons from a box I carry with me (always), and answer each question with a diagram. If you have seven team members, you will end up with 21 diagrams. Stand back and let the games begin. Three minutes per question is enough. Ten minutes and you are done. Invite each person to describe their answers (theory of mind made external). The result will be that a conversation will grow from the sharing of perspectives. A collective set of inferences, objectives, and methods will bubble up to the surface. Pick someone to be the artist. Ask them to create a new unified diagram to represent the project. The diagram becomes an invaluable tool to guide ongoing discussions as the project progresses. Diagrammatic elicitation using abstract diagrams is a newly emerging research tool in the arts and sciences. This “diagram technique” is just one of several new ways to thinking about thinking. Can read more about topic in the book by Barbara Tversky, Mind in Motion-How Action Shapes Thought (2019, Basic Books) and a Youtube of her describing the book here. To quote Barbara — “All thought begins as spatial thought”. I don’t think a data science team or the individual members have an explicit theory of mind until the explore and share their thinking with others. Best to get the data scientists thinking out in the open for everyone to see before another one (data science project) bites the dust.
https://towardsdatascience.com/does-the-data-scientist-have-a-theory-of-mind-87803e8dab9a
['Art Conroy']
2020-06-14 20:55:31.982000+00:00
['Teamwork', 'Project Management', 'Psychology', 'Data Science', 'Data Visualization']
Why DBT will one day be bigger than Spark
The world of data is moving and shaking again. Ever since Hadoop came around, people were offloading workloads from their data warehouses to the new and shiny data lakes. And it didn’t take long before Spark, which was open sourced in 2010, became the standard processing engine on data lakes. Now we see a reverse trend, back to the data warehouse. And with that trend, DBT has risen as almost the de-facto standard for doing transformations on modern cloud-native data warehouses. Using DBT, people are discovering that they can build their data pipelines faster, with fewer engineers and with less maintenance. https://getdbt.com I predict this trend will only continue and one day, DBT will be bigger than Spark in terms of number of users, number of jobs, and importance in the data landscape. Three arguments: DBT has a faster adoption today than Spark ever had, at least at the clients we see. DBT can target a broader audience. If you know SQL, you can get started with DBT. With Spark, you need a Scala or a Python background. And not be intimidated by distributed computing. The data market is bigger now. More companies want to do interesting stuff with data, and if you start today, DBT offers a much smoother entry point. But why is that? Why will DBT build up so much adoption? And why now? Let’s start with the second question, because timing is everything. Why now? There are a few reasons why now is a great time for a tool like DBT. Spark filled a void that isn’t really there anymore The entire premise behind Spark were the RDDs. This is how the paper on RDDs started: “We present Resilient Distributed Datasets (RDDs), a distributed memory abstraction that lets programmers perform in-memory computations on large clusters in a fault-tolerant manner.” There was a clear need to do huge in-memory calculations over multiple machines. Single machines were limited in RAM and the only viable option to do cluster-scale compute was Hadoop, which was based on MapReduce. MapReduce was notoriously heavy on Disk IO and didn’t really capture the value of all the RAM that was lying around. Spark filled that void perfectly. All of a sudden, a lot of your big data processing could be done much efficient. And Spark had a very nice functional approach to defining your operations, so your syntax was sweet and short, at least compared to MapReduce code. But honestly, is that void still there? These days, we all shop our infrastructure together in the cloud. And shopping can be a lot of fun, even for “standard” instances: If that’s not enough memory, you can now easily distribute your workloads over multiple machines using services such as AWS Batch or Kubernetes. You don’t need to have a distributed application. If you write many small applications, you can easily scale using standard python code. Most engagements we have at clients, 95% of our jobs are relatively small python jobs, and maybe for 5% we can use the heavy lifting that Spark offers. Which is great. But Spark is not front and center anymore. It’s just another tool in our toolbox. “Ah, this one can’t run single node? Better use Spark here”. We have built Datafy to not have to worry about any of that anymore. We just tell Datafy to run a job, how many nodes it needs, and how much memory. And then Datafy does some Kubernetes magic behind the scenes for us. It doesn’t care if I schedule 100 small python jobs or 5 big spark jobs. It auto-scales the kubernetes nodes, launches the pods it needs, and scales down again. This saves cloud costs, and saves me the headache to worry about infrastructure. I can focus on my data job. There is a chronic shortage of data engineers I hear you say: “Kris, Spark is much more than RDDs today”. Which is true. With Spark, you can now do Streaming, ML, and even SQL. It has become a very complete toolkit. And many data engineers love it for it. Including me. It’s just that, sometimes I feel lonely. Many data scientists prefer to stick with Python and its rich eco-system of ML libraries. By the way, have you heard of GPU processing? Data analysts have actually mostly been ignored in the last couple of years. They were either creating dashboards in Tableau or building ETL pipelines with Drag and Drop tools. Teaching them to code is just a few bridges too far. They needed something more close to home. Data warehouses today are much more powerful than they were in 2010. It’s not just cloud compute infrastructure that has matured. Data warehouses in 2020 are completely different from the on-premise expensive, hard-to-maintain monoliths. All big cloud providers have a strong offering and Google Bigquery in particular makes it super convenient to get started. It is fully featured, it is highly performant, it is widely supported and most-of-all, it is pure pay-as-you-go pricing. You pay per TB scanned. That makes the barrier of entry a lot lower. You don’t need to invest big piles of money anymore to set up a data warehouse. Although, obviously, data warehouses are still not cheap. But neither is running Databricks clusters. The price difference was an argument in 2010. It’s not in 2020. And scaleability is definitely not an issue anymore either. Besides Bigquery, companies like Snowflake create tremendous traction in the market and prove that they can execute at a massive scale. Why DBT? All the ingredients are there to have a disruption in the market. So why is DBT gaining so much traction? Here’s what I think they got right: They executed very well on an “obviously” great idea. With DBT, you build your data pipelines using SQL. You can build modular pipelines and reference other pieces of your data model through variables and macros. This is an idea that I’ve seen at least 5 times in industry. Always some kind of duct-tape solution put together to schedule a bunch of SQL jobs. I have to be honest, we built some of these solutions as well. But it never really dawned us to productise this into something bigger and bring it to the market. It is an obviously great idea. But DBT actually executed on that. Kudos to them. They have an incredible momentum in the market They announced their Series B already last month. That’s 7 months after their Series A. They are backed by some of the most famous VC firms like Andreessen Horowitz and Sequoia Capital. Their biggest competitor (that I know of) is Dataform, which just got acquired by Google Cloud. Dataform was already lagging behind. This will only make them even more a niche player. Great if you’re on GCP. But I don’t think Google has any plans to make Dataform shine on Redshift, Synapse or Snowflake. They are strong on the engineering aspect As a data engineer, I’m always a bit sceptical of tools that claim they can take complexity away and now “everyone can build a data product in 3 easy steps”. Often, these are excel-look-a-likes or drag-and-drop products with a shiny UI, which are very impressive in sales demos. But they do make you cry the day you need to maintain those dragons in production. DBT is different. In DBT, you can easily work with variables, you can build modular code, you can add unit tests, you can commit all your code to git and easily integrate DBT in your CI/CD pipeline. It even generates a documentation site for you, including lineage. All these things are boring to business people, but as an engineer, they give you a lot more confidence that you can actually support DBT workloads in production and you can actually build healthy release processes around it. That’s why we were also quick to integrate DBT on Datafy. Scheduling DBT is no different than scheduling a spark or a python job. It’s a docker container that can be build, deployed and executed. That docker container just happens to contain SQL code, instead of Python or Spark code. So Spark is dead? Not at all! I think Spark is a great tool if you have big data workloads which need a lot of heavy lifting, and you have the engineers available to build the pipelines for you. Spark is still a lot more expressive than SQL, and you have much more control over how the processing is done in Spark than in SQL. In general, the data landscape is constantly in flux. Technologies come and go. It’s a matter of combining them in a way that makes sense to your organisation and which work for the team that you have. Then you’ll be able to get insights from data, and that’s why we’re here, right? Spark, Python, DBT, and many other tools are just tools in our tool-belts. No great car was ever built with only a screwdriver, or only a hammer. I do think, because the barrier of entry to DBT is so much lower and a lot more people know SQL than they know Spark, that DBT will in the end see more adoption. It democratizes data analytics even more. We already dragged it out of the Finance department, now we’re dragging it out of the IT department. One day, analytics will actually live in business departments. Imagine that. 😂
https://medium.com/datamindedbe/why-dbt-will-one-day-be-bigger-than-spark-2225cadbdad0
['Kris Peeters']
2020-12-19 00:00:20.080000+00:00
['Spark', 'Dbt', 'Data Engineering']
The Top 10 Best Places to Find Datasets 📊
Awesome Data Awesome Data is a GitHub repository with a seriously impressive list of datasets separated by category. It is updated regularly. Data Is Plural Jeremy Singer-Vine’s Data Is Plural weekly newsletter has great fresh data sources. I’m always impressed by the quality. The archive is available here. Kaggle Datasets In addition to competitions, Kaggle has a huge range of datasets. Kaggle Datasets provide great summary information and previews for most datasets. You can download the data or use their platform to analyze it in a Jupyter notebook. You can also contribute your own datasets and make them public or private. Kaggle is great for browsing or searching for a particular topic. Data.world Like Kaggle, Data.world provides a wide range of user-contributed datasets. It also offers a platform for companies to store and organize their data. Google Dataset Search Tool I think it’s safe to say that Google knows a thing or two about search. It recently added a separate search functionality for datasets through its Google Dataset Search Tool. It’s worth a shot if you’re looking for data on a particular topic or from a particular source. OpenDaL OpenDaL is a data aggregator that allows you to search using a variety of metadata. For example you can search based on time or search by location by selecting part of a map. Screenshot from OpenDaL. Pandas Data Reader The Pandas DataReader will help you pull data from online sources into Python pandas DataFrames. Most of the data sources are financial. Here’s the list of available data sources as of October 31, 2020. 🎃 Here’s how you use it after installing it into a Python environment with pip install pandas-datareader . import pandas_datareader as pdr pdr.get_data_fred('GS10') VisualData 👓 If you are looking for computer vision datasets, VisualData is a nice new source. It has some handy filtering options. Thanks to Jie Feng for reminding me of it! ***Added Nov. 2, 2020.*** Data.gov 👓 If you are looking to use the US government’s datasets, Data.gov has over 217,000 fo them! Thanks to Michael Wallace for recommending it! ***Added Nov. 4, 2020.*** Python API Wrappers 🐍 I recently updated my list of Python API wrappers to help users see whether a package is popular and being maintained. It now uses shields.io to automatically display GitHub stars and the date of the most recent commit. This list was originally forked from GitHub repo of Real Python via johnwmillr. My repo contains what I believe is the largest updated list of Python API wrappers — many of which can help you find the data you might need for a project. APIs Getting data from a documented API using Python might sound intimidating if you haven’t done it before, but it’s really not bad. Check out my guide to getting data from APIs here. 🚀 Make your own When all else fails, collecting your own data can be an excellent way to create a dataset for your needs. 😉 Recap Do you have a favorite place to find data? Awesome! Share it on Twitter or leave it in the comments! 🎉 I hope you find this tool helpful when you’re searching for data sources. If you do, please share it on your favorite social media. 🚀 I write about Python, data science, and other tech topics. If you’re into that kind of stuff read more here and subscribe to my Data Awesome newsletter for awesome monthly curated data resources.
https://towardsdatascience.com/the-top-10-best-places-to-find-datasets-8d3b4e31c442
['Jeff Hale']
2020-12-13 15:23:21.510000+00:00
['Technology', 'Data Science', 'Artificial Intelligence', 'Machine Learning', 'Data']
We Are Looking Backward
We Are Looking Backward We need to turn around to see the future Photo by Sinitta Leunen on Unsplash By Mike Meyer ~ Honolulu ~ December 15, 2020 We are not polarized but shattered as gaps widen in our societies. We operate as bipolar creatures based on dyadic comparisons and contradictions. While we can, with effort, handle a range of gradations, we gravitate to white and black with grey and silver following, at least for car colors. By preference, we are either all together or clustered in two opposing camps. Because we are dyadic, we constantly face the hard decision between one and its opposite. The car color problem shows this. If you can’t decide between white and black, you choose grey (or silver). If the problems and the groups' positions are not easily clustered into one or the other, we struggle. It takes work to handle a mental array. Many people cannot do this. I’ve discussed this previously, attempting to understand the nature of the cultural and political collapse. We deal with this constantly as a growing threat to countries experiencing reactionary nationalism, racism, and ethnocentrism. This is an effort by the marginally privileged and those most threatened by any change to reject the future as to them the past is the only other option. As we are faced with a growing range of threats and disasters, it is natural to focus on the negative reactions. In the US now, this is brutally apparent at the intersection of scientific denial of both the pandemic and the climate crisis with reversion to racism and fascist opportunists seeking to destroy representative government. Otherwise, there are too many possible futures with too many types of people when there should be only us and the unspeakable others. We have slowly realized that this is not a rational debate but the emotional rejection by a portion of our population of any future different from a mythical past. Even if existing, such a past is no longer sustainable, leaving people who understand this depressed and angry. The death of over 300,000 people in the US alone to COVID-19 because of this denialism shows how our future will die. This requires a hard choice with no option for grey or even silver. But this shattering of the old paradigms also opens the field for even faster change and greater diversity. That this diversity of thought and identity is exactly what has triggered the reaction of the predominantly older and less educated or insecure people leaves us with a conundrum. Rapid change is tough and has not been a common reality for the history of our species. We are in very new and unpleasant territory. While we are inevitably focused on the threats to our planet and our oppressed populations, the rapid growth of technology and scientific innovation offers us a cascade of options. These offer answers to most of our problems but requires seeing the universe and our planet in complex and new ways. Many people aware of this consider humanity doomed, but the answers to so many questions are within reach. We are just looking the wrong way. A major challenge is that we need to have a majority of our population to have a broad understanding of 21st-century scientific developments and the technical implementation of those developments, and a grasp of diverse philosophical thinking. Industrialized and post-industrial nations are at this point. Still, a major minority is entangled in old ideologies and religions manipulated as political strongholds at war with all around them. This is part of the background complexity that is the very nature and challenge of our species' world. In any direction, we have not two poles but great diversity in how things are changing. This is an aspect of the hyperobject basis of our greatest challenges, such as climate warming. In that complexity, we are also in new territory at the edge of our abilities to understand. Denial of scientific knowledge is an obvious reaction for people who have struggled to maintain a late neolithic model of the universe due to various historical accidents. For centuries what the farmer and craftspeople thought beyond their immediate, practical work area didn’t matter. Even though the entire industrial revolution, the changes, while massive, were the substitution of different power sources and increased productivity from the great majority of people's perspective. This continued right through the 1960s. While there was a growing percentage of the population involved in technology and engineering, these were still based in classical, Newtonian physics. Most people were not involved in rocket science, but even that was still a continuation of the Newtonian and Copernican Revolutions of three and four hundred years ago. The growth of electronics and telecommunications was also still in the theoretical world of the 19th century. Nuclear physics for weapons and energy-producing reactors was at the edge of the paradigm but still broadly understandable with familiar metaphors whose errors were not important in society. While these things were expanding and taught in high school science classes, they were not obviously destructive of neolithic mythology. Most people did not need to make a drastic choice of a new paradigm to operate in society. The old model still worked for most people. But that is no loner possible. This is the problem of large paradigm shifts and has resulted in the steady growth of reactionary attacks on higher education. That education has replaced people's paradigms that, inevitably, alienated those from the less educated population. The old wisdom that you cannot go home again has become true now of language. You cannot go home, and you may not even be able to converse with your family members who stayed there. I do not mean that ordinary people were not aware of things changing and some of the implications. Still, these did not become transformative until rising to the dominance of the information revolution from 1980. The changes that shattered the Western paradigm can be seen as a slow-motion explosion of that paradigm over thirty years. The ability to access the deluge of information was the force behind this and well noted by the late 1990s. But the process of that rapid expansion, like the Big Bang that was not a cosmological but a hyper expansion, changed the relationship between the universe's components in the world we knew. This made the old paradigm's components visible from new perspectives as it steadily tore the pieces apart. I’m old enough to have watched this happen while studying this process's first great studies in the 16th and 17th centuries courtesy of Thomas S. Kuhn. Information was the force behind the explosive expansion that exposed the structure of what it was destroying. For part of the population, the walls were blown down, creating a new landscape with growing awareness of new rules that did not make sense in the old paradigm. For another part of the population, there was only destruction and what they knew being discarded because they had no means of understanding those incipient new structures and, in some cases, were still denying the Scientific Revolution. While things are polar and can only be one of two things in the American political system, the entire universe was blown apart, but people are still struggling to put the pieces back into the same two boxes. This is totally hopeless as the pieces are moving farther and farther apart and are being pulled into new clusters and relationships with nothing to do with what they once were. That confusion is the stock in trade of opportunists looking for suckers to fleece. People desperately wanting the old structure back again as the new world is rapidly coming together in forms they cannot comprehend is the consequence. There is nothing left of the old to go back to, and the new is stressing us with decades of struggle to adapt that is only beginning. To get some relief from this chaos and the human tragedies beginning to overwhelm us, we need to look not at the past but at the future. Here are some examples coming right now but often lost on those who need most to see them. Artificial Intelligence is at the core of the new world. This is becoming the dominant force now, very much like gravity. Like gravity, it is neither good nor bad, moral or immoral, pro-human or anti-human, although the initial reaction is to put it one of those simple categories. This is also hopeless and prevents the logic of deciding what parts are positive and how to deal with the negative once defined. That defining process is not easy. We are, in the industrial and post-industrial cultures, dependent on AI for information interaction. People constantly work with voice recognition systems that replace people in taking orders, answering questions, identifying things, or being reminded of things that need doing. Most people don’t even think about it. Face recognition and the ability to create realistic images and voices for artificial people are very much part of that. This is a threat to privacy but also an incredible tool to provide services to people. Accelerated by the pandemic conditions and the need to vaccinate the human population, digital identities are being rapidly expanded. With planetary level controls under the UN ID2020 program identity and population-wide guaranteed delivery of services, strong protection for abuse by governments and corporations can be provided. This would provide the means for delivering all health, education, and humanitarian services while providing the right to vote without dispute. Expect a massive effort to block this by groups dedicated to voter, ethnic, and racial suppression. India has proven the power of this for a large population. Africa is adopting digital citizen identities rapidly as they have been successful in controlling the COVID pandemic while Europe and, especially, North America has failed. After years of excitement followed by slowdowns and disappointments, self-driving cars are moving onto the streets. Not as high-level human-style intelligence but as capable assistants in the operation of trucks, cars, and equipment. This with the fast expansion of electrification will allow the elimination of fossil fuels by 2035. As people wake up to what is happening, they will climb onboard electric transportation while moving farther from metropolitan centers as they work remotely. The consensus seems that the pandemic has tipped us into action that has been delayed by antiquated political squabbling and refusal to see reality. This month we have a breakthrough from Deep Mind on a tough cell folding issue that will accelerate new pharmaceuticals and better understand tissues. This comes on top of the speed of the COVID-19 vaccines, specifically the new mRNA vaccines created by AI-based genetic engineering. This is how we will control the accelerating spread of deadly viral diseases generated by planetary warming and crowding. Electric cars are now expected to dominate the streets of cities in the next ten years. This is critical to reducing carbon, although the production of electricity to charge the batteries, which are rapidly changing, needs to be addressed. We now realize that air travel must be reduced until we have either electric or, initially, hydrogen power to reduce carbon. Electric aircraft will be servicing short routes in the next five years. We have realized that the pandemic had forced our entire population, particularly in post-industrial states, to rethink their lives and needs. There is a new commitment to act on what we have learned as the new vaccines free us from our lockdowns. That commitment will combine the technological acceleration to make the old political reactionary rehash of early 20th century ideologies ridiculous. It can’t happen soon enough, but it is now in reach. Let’s go for it.
https://medium.com/an-injustice/we-are-looking-backward-523c35712354
['Mike Meyer']
2020-12-29 21:37:06.198000+00:00
['Culture', 'Politics', 'History', 'Climate Change', 'Future']
Please Don’t Move to Our Beautiful Mountain Town
Lock the Doors, Zip Up the State Lines, and Throw Away the Key Not long after I made my move to Colorado, I began hearing people talk about not “Californicating Colorado.” While insulting to those from that gorgeous state, I know precisely what they meant. Because it’s happened. The I-25 is now one long conga line of malls, and cheaply made rubber-stamp tract housing, and more tract housing, and more malls, and and and. Just like the I-5. The intense pressure on our limited water supply is horrendous — especially given our lengthy droughts, increasingly less snow, and the need to water all those lawns in what is effectively plains desert. City folks bring the city with them, along with their aggressive driving habits that kill cyclists, lack of mountain manners, and tendency to start wildfires. People from greener states don’t understand. Colorado is slowly becoming Arizona. Water rationing is real, and it will never go away. Snow is becoming increasingly rare. It’s making skiers unhappy, but far worse, it’s making water scarce for our booming population. The once-overflowing Colorado River, a lifeblood for so many, is no longer fed by huge annual snows. Colorado can no longer afford to keep desert golf courses green in Palm Springs. Massive fires — not just from lightning — are a way of life now, which has driven up home insurances rates by an unprecedented percentage ($577, the third-highest jump in the nation). A lot of that is because of human error — meaning wildfires — as well as climate change, affecting the number of tornadoes. We never used to get tornadoes in our cities nestled against the front range. Now, they are more common. A huge chunk of Colorado is plains, just like Kansas’ “Tornado Alley.” Not right along the front range. That, along with far more machine-produced snow to keep the skiers coming, is just the beginning. Years ago, there was a spate of license plates that identified people as Natives. Soon, copycats made Semi-Natives, Transplants, and the rest to mock the trend. Native-born Coloradans wanted to state their superiority over those who had just moved here. Then, as now, those who moved to the area settled in and they most certainly didn’t want anyone else to, which would make it too crowded. Lock ’em out. I have mine, but you can’t come share it with me. This is our paradise, stay out. In other words, we want the idea of a gated community applied to our state, our great little town. And of course, our nation. Hence, the wall. Asheville is just one more charming mountain town experiencing an historical boom. Americans, with good reason, want to escape big city life and capture something closer to nature. They want a better community, places with old-growth forests to play in that haven’t been paved over for yet another Walmart or TJ Maxx. You can’t blame them. Right now, I’m contemplating the same thing, for the same reasons. After nearly fifty years in Denver, I don’t want to live here anymore. It’s too busy, too crowded. While some folks love the sophistication that comes with a happening urban scene, that’s not why I came here. I’m tired of struggling to find a single place to ride a horse that isn’t overwhelmed with cyclists, runners, and hikers. I’m tired of riding a horse where people in the nearby park fly illegal drones over my head, terrifying my animal (and those with four-year-old girls on them), because they just want to see what happens. We Bring Our Baggage With Us The ranches were here hundreds of years before the suburbanites. That’s the fundamental problem. City folks bring the city with them, along with their aggressive driving habits that kill cyclists, lack of mountain manners, and tendency to start wildfires. This is the case with every lovely hamlet that has an established way of life, be it an isolated fishing town or a Maine village in the deep woods. When folks come in from elsewhere, they bring “elsewhere” with them. Suddenly, the town is nothing like it used to be. Those of us who liked it the way it was either get angry or move. Many of us have moved to Panama City or Ecuador. We’ve fundamentally changed those places for the locals — who often resent us — in precisely the same way. Territorial Imperative People have every right to move where they want. Neither the Asheville woman nor I have any right to tell anyone not to move to “our” state. We all believe we have the right to live where we hope to have a better life. There are lots of places in the world that do not want to be taken over. But that’s what we do: We tend to want to take over. The territorial imperative is universal. We all feel it when, suddenly, a place we love is fundamentally and irrevocably changed. How do you think the Native Americans felt when we marched them off their lands? How do you think folks in San Francisco feel now that prices there (and sinking properties) have changed what was once the “City of Love” to the City of How Are We Going to Afford Rent? There are lots of places in the world that do not want to be taken over. But that’s what we do: We tend to want to take over. We have a hard time acclimatizing, learning a new language, becoming a part of the existing community. This is true all over the world. It’s Not Just Here The 2015 Paris Agreement saw leaders from all over the world gather to discuss efforts to reduce global warming. The gathering included many heads of state of island nations, who are affected the most by these environmental changes. For example, the Solomon Islands are losing land steadily due to rising seas from melting glacial ice. The tiny nation of Kiribati will also soon be underwater. In the not-too-distant future, rising sea levels will force the wholesale relocation of millions.
https://medium.com/s/story/dont-move-here-we-don-t-want-you-566448c6e3ee
['Julia E Hubbel']
2019-07-20 13:24:18.443000+00:00
['Politics', 'Life', 'Climate Change', 'World', 'Environment']
How to succeed with Serverless? Automate best practices
I build, write and talk a lot about Serverless applications. Using AWS Serverless services extensively with my clients and, for many applications, it’s the best technology choice. Serverless adoption continues to grow, but the biggest pain-point for companies adopting Serverless is no longer vendor lock-in or cold-start times, it’s education and upskilling. O’Reilly Serverless Survey 2019 People often ask me, how do we find the best practices? Is this best practice? Will this scale? Will I regret this in 6 months? This is not surprising. Serverless is an extremely powerful and flexible approach to building applications, and best practices continue to evolve. I, like many in the Serverless community, spend a huge amount of time reading. Jeremy Daly’s newsletter alone takes up an afternoon. Serverless is a steep learning curve and a moving target. It’s a lot to expect teams to follow it closely and apply best practices consistently. Serverless is a steep learning curve and a moving target Many companies have gone down the reference component/reference architecture approach, investing a lot of time and resource in building an example application within their organisation with all the best practices baked in. This becomes easier with Serverless as so much of the infrastructure is managed as code. Therefore learnings can be encoded. The problem is, things change and people make mistakes. This is not a problem unique to Serverless. It’s why we use static analysis tools, review each other's codes and form guilds around particular topics. It’s also why some companies document their best practices. All of this is useful in helping teams adopt Serverless, but for many, it’s too big an area to cover quickly and they have to build (not read constantly). That is why today I’m excited to announce the release of a new tool inside the open-source sls-dev-tools project — sls-dev-tools Guardian What is sls-dev-tools Guardian? sls-dev-tool’s iconic CLI Dashboard interface, now called sls-dev-tools HQ, is one of several tools in the new sls-dev-tools. Today, it is joined by sls-dev-tools Guardian. sls-dev-tools Guardian is a highly opinionated, highly configurable, automated best-practice audit tool for Serverless architectures. Like all sls-dev-tools features, it’s framework agnostic (SAM, Serverless Framework…) and can be run in one simple command. As discussed, Serverless brings a huge amount of abstraction, but there are complexities in building out architectures, and best practices continue to develop. sls-dev-tools Guardian can run locally, on a CI Platform or in a scheduled task to help you build with best practices from day one and resolve problems before they arise. sls-dev-tools Guardian has a number of best practice rules that will run across architecture resources and configurations. Each rule is documented, in the style of ESLint, with consistent naming conventions and clear steps to resolve issues along with links to useful tools and documentation. sls-dev-tools Guardian is not a static analysis tool for your code, it’s a dynamic check across your deployed architecture and it’s resources. This means it can make checks agnostic to the infrastructure as code you use. In beta testing of the tool, users initially relied on it to audit their existing applications as well as adding it as a standard development tool to be run actively by developers. Some users have already integrated it into their CI pipelines, running checks on dedicated non-production environments. It can also be run on production with the same ease. It is highly opinionated, trying to guide towards best practices. However, each rule can be configured on a resource or global level. These rules, like the whole tool, are open source and built by the community. If you’re missing a rule raise an Issue and we’ll work with you to expand the coverage of the tool. Feedback, improvements and opinions around the existing rules are also very welcome. Get started with sls-dev-tools Guardian in one command Install sls-dev-tools in your project or globally using one of the following commands: Run npm install -D sls-dev-tools or yarn add -D sls-dev-tools to add the tool to your project ( recommended if you’re using sls-dev-tools Guardian) or to add the tool to your project ( Alternatively, run npm install -g sls-dev-tools to install the tool globally The sls-dev-tools HQ dashboard is the default behaviour of sls-dev-tools command and is typically run as follows: sls-dev-tools (interactive configuration) (interactive configuration) sls-dev-tools [-l {YOUR_PROJECT_LOCATION}] [-p {PROFILE}] [-n {YOUR_STACK_NAME}] [-r {YOUR_REGION}] [-t {START_TIME}] [-i {INTERVAL}] sls-dev-tools HQ To run sls-dev-tools Guardian use the same command structure, but pass the — ci option: sls-dev-tools --ci [-l {YOUR_PROJECT_LOCATION}] [-p {PROFILE}] [-n {YOUR_STACK_NAME}] [-r {YOUR_REGION}] [-t {START_TIME}] [-i {INTERVAL}] sls-dev-tools Guardian The analysis will then be run with a high-level summary and a detailed breakdown of failing resources with a direct link to the rule documentation. The exit code will be 1 if any rule is failing. Understanding the rules Each rule in sls-dev-tools follows a consistent naming convention. If a rule fails, the list of resources failing the rule is displayed in a table along with a link to the rule page. This rule page details the reasons and impacts behind the rule, along with actionable steps and tools to fix the issue. Configuring Rules sls-dev-tools Guardian is intended to be opinionated, but when that opinion does not match your expectations rules can be ignored on a per resource or global level. To ignore a rule add a guardian section to your slsdevtools.config.js file (create a new one at the same directory level as your IaC root). module.exports = { ..., guardian: { ignore: { "no-max-memory": true, // global "no-max-memory": ["arn-1234"] // per resource "no-max-memory": "1 May 2020 09:00 GMT" // ignore till then } } }; Rules can be ignored globally, per resource or until a specific date (e.g. delay checking this for 1 month). Contributing Rules This is an initial set of best practice checks we’ve implemented that we feel are ready for public release. If you have other ideas for rules we are missing open an issue on the repo and we can work to get it integrated. The aim is to be an opensource set of automated checks by the community, for the community. We see automation of best practice checks as the key to success with adopting and keeping up to date with Serverless, and sls-dev-tools Guardian as the tool to do it. If you’ve not checked out the sls-dev-tools project yet take a look here: It’s completely open-source and sls-dev-tools Guardian is just one tool. One npm install gives you the full toolkit, so you can run sls-dev-tools HQ and sls-dev-tools Guardian from one command.
https://medium.com/serverless-transformation/how-to-succeed-with-serverless-automate-best-practices-2a41894721a3
['Ben Ellerby']
2020-05-08 13:22:32.945000+00:00
['Best Practices', 'Serverless', 'AWS', 'Lambda', 'Ci']
Why You Don't Have to Run in the Morning
Why You Don't Have to Run in the Morning Sleep in if you want and remove “should” from your running vocabulary. Photo by Kinga Cichewicz on Unsplash We’re approaching New Year’s resolution territory. Maybe you’re vowing to yourself that next year will finally be the year you become a morning runner. There’s no shortage of articles that will tell you how to make that happen. I’m here to tell you that you don’t have to. Ask yourself why you want to become a morning runner. If the crack of dawn is the only time you can squeeze a run into your schedule, then you just may have to resign yourself to waking up early. But if the reason is you think you should, think again. Of course, there are benefits to running in the morning. Some find it’s the best way to start the day, giving them mental clarity and motivation for the rest of their waking hours. But if you’re not a morning person, those benefits may not be reason enough to run before you’re fully awake. I can attest to this. I feel notably slower, and my runs feel much more difficult when I run in the morning. Despite the fact that so many outlets push morning running, research shows our bodies are best primed for running — especially harder workouts — in the late afternoon or evening. By that point, your core temperature is high and your muscles are warm. You’re awake, and you’re focused. And yet, they keep telling us we should run in the morning, that we should want to run in the morning. Well, I’m not buying it anymore. I’m not becoming a morning runner. I’m also giving you permission to say it’s not right for you, too. The only thing you should do is stop worrying about what you should do. Make your running routine work for you Sure, when you first start running, it makes sense to try different pieces of advice. Run first thing, run last thing. Run fast, run slow. Run frequently, rest more. Experimentation is the best way to figure out your preferences. But once you’ve dialed in the routine that works for you, let go of the worry you should be doing something differently. Because that belief — that your routine is not right — might be holding you back. When I manage, maybe twice a year, to drag myself out of bed at sunrise for a run, I often enjoy it enough to let the thought creep in that I should commit to changing my habits. Inevitably, though, I will not follow through the next morning. The alarm sounds at an ungodly hour, and the memory of my lovely run the previous morning just isn’t enough to separate me from my bed. That’s when the guilt sets in. If I was just disciplined enough, I could do it. If I was a real runner, I would do it. It’s a spiral from there. The guilt and self-criticism compound throughout the day, and if I don’t run at all, it only gets worse. Contrast that with my routine now that I’ve finally accepted I am not a morning person, and I will not be a morning runner. I give myself permission to sleep in and wake feeling fully rested for my run later in the day. Without guilt, I go at noon or at the end of the day. I’m consistent because later in the day works for me. It works for my body, my mind, and my schedule. But it’s taken me some time to finally accept I don’t have to do anything that doesn’t work for me. Part of that is because there’s so much advice in the running space. Research abounds on how to maximize performance. It’s hard to ignore all the studies that tell us what we should do. But running is also highly individual. And just because research says something will work for the majority of runners, there are always outliers. So, should you run more or less? In the morning or at night? With a watch or without? Seven days a week or three? It’s totally up to you. Try the advice that appeals to you, but not because you feel obligated. Embrace the habits and routines that energize you and optimize your running. Reject, without guilt, the tips and tricks that don’t. Resolve to remove “should” from your running routine next year and find deeper satisfaction in running the way that works best for you.
https://medium.com/runners-life/why-you-dont-have-to-run-in-the-morning-67c597d01231
['Heather Campbell']
2020-12-20 01:09:36.819000+00:00
['Fitness', 'Health', 'Running Tips', 'Running', 'Resolutions']
Hungarian startup makes its COVID-19 drive-thru testing software available free of charge and open source
Hungarian startup makes its COVID-19 drive-thru testing software available free of charge and open source Rollet Follow Jun 25 · 3 min read The first official case of coronavirus in Hungary was reported in early March. A few weeks later, due to the rapid increase in the number of epidemic cases, the Hungarian government decided to partially lock down the country. The restriction halted the country’s normal operation for a month, several small businesses closed, and tens of thousands of people became unemployed. As a result of the COVID-19 pandemic, Rollet, a Hungarian startup, has embarked on the development of their software for administering in-car coronavirus testing, which is now available and free to use for any government or organization to help speed up response on a possible next wave. The drive-thru coronavirus testing station fitted with Rollet’s technology was first launched in Budapest in April where hundreds of visitors were tested over the course of a few days. The drive-through COVID-19 testing method is not a novel concept, it was widely used in several Asian countries before the Hungarian solution, but previous approaches stuck to paper-based implementation which was slow and put people at a relatively high risk when contact is made between staff and patients in the process. The essence of the contactless solution developed by the startup is that patients arrive at the test station after online pre-registration. Data recording is also paperless and contactless, as the test station workers can identify the arriving motorists based on QR codes, and authorize visitors through the mobile application, which is now open sourced. As well as the entry check, sampling administration takes place in the app too, pairing the given patient’s QR code with the samples. This contactless method eliminates the chance of wrong inputs and human errors under stress. “We agreed with the Rollet team at the very beginning of the project to make the end product widely available so that governments worldwide can respond immediately and appropriately to the crisis when needed. Being a Hungarian company, the size and population of our cities needed a highly efficient solution for mass testing, which forced us to create a technology solution that was simply not available before. There is still no consensus on whether the coronavirus will cause another wave of pandemics in the fall, but in any case, our system offers a very fast and effective solution for identifying COVID-19 patients. ” — said Andy Zhang, Founder and CEO of Rollet The project, codenamed “NOÉ”, is free to use and thanks to the MIT license, It can be freely adapted by both private companies and government organizations, released under the MIT licence. Rollet NOÉ is available at Github.com/rollethu/noe. According to the startup, the code can be used to help start a drive-thru test station within a few days, as the program is suitable for receiving and sampling thousands of guests without additional development. The software can not only be used for coronavirus testing, but also for the rapid sampling of all viruses where a vehicle provides a suitable containment environment for sampling and screening. Rollet launched its contactless drive-through payment service in Hungary in 2017, and since then, cashless, in-car payment methods have been made available to motorists in dozens of locations, including parking lots, office buildings, industrial areas, and business parks. In 2020, The Next Web chose Rollet as one of the best Hungarian startup innovations in Europe, and last year the audience of the Vienna Property Forum chose Rollet as “CEE’s Best Emerging Startup”.
https://medium.com/rollet-pay/hungarian-startup-makes-its-covid-19-drive-thru-testing-software-available-free-of-charge-and-open-c82d254df2ef
[]
2020-06-26 08:19:15.385000+00:00
['Open Source', 'Software Development', 'Github', 'Covid 19', 'Coronavirus']
How to Break Your Creative Stagnation Using Temperature
A week ago, I was sitting in my heated living room for several hours trying to find something that would inspire a project or another article. As much as I was reading or scrolling through the internet, nothing seemed to provoke my interest. Even though it was near freezing, I decided to sit outside for awhile and get some fresh air instead. When I got back inside, I could feel the shift in my mind; I was in a newly inspired state, brain teeming with curiosity. What was that about? I knew that exercise could increase energy, but all I did here was sit outside in the cold. As someone with cold urticaria, abrupt changes in temperature already affect me daily (drastic temperature difference causes me to break out in hives, no joke). Being so, I slowly started to suspect that a more mild temperature change could have some type of affect as well, albeit a more positive one that kickstarts my creative drive. I further realized that my wake-up-the-brain coffee ritual has also never involved a mere room temperature cup of coffee. Suspicious, indeed.
https://medium.com/curious/how-to-break-your-creative-stagnation-using-temperature-d53ca3e78b18
['Katie Martin']
2020-11-20 00:43:13.171000+00:00
['Work', 'Makers', 'Innovation', 'Productivity Hacks', 'Creativity']
I didn’t wanna see the film tonight.
This is just for you because you need cheering up. Madness belong to an era when everyone danced like no one was watching because it would never have occurred to you that anyone would be watching and it wouldn’t have bothered you if they were. No one would be watching anyway because everyone would be too busy dancing. You can’t not dance to Madness. Madness is a tightly wound ball of devil-may-care, cheeky chappy infectious enthusiasm. We all need some in our lives just now. My girl’s mad at me I didn’t wanna see the film tonight I found it hard to say She thought I’d had enough of her Madness don’t fuck about. They had you at “My girl’s mad at me”, whether you are a boy or a girl. And just four lines in you are as gripped as you would be by a claustrophobic radio phone-in or a car-crash letter to the problem pages of Vogue magazine. Why can’t she see She’s lovely to me? But I like to stay in And watch TV On my own Every now and then These lyrics are simple and universal. Two genders separated by a common language, broadcast and received on different wavelengths, with poor tuning and heavy interference. We’ve all been there. And the pacing and pathos of those last four lines. So prosaic but so profound. Vegging out in front of the TV made heroic and poetic. It’s as if by (deliberately?) not understanding, his girl is being unconstitutional. My girl’s mad at me Been on the telephone for an hour We hardly said a word I tried and tried but I could not be heard Why can’t I explain? Why do I feel this pain? ’Cause everything I say She doesn’t understand She doesn’t realise She takes it all the wrong way The frustration. The deafening, drawn out silences. The overwhelming desire for the torture to end, in direct conflict with the knowledge that hanging up and failing to achieve reconciliation will result in an even more excruciating replay, and extra time. And penalties. Severe penalties. And, laid bare, there is the inability of the male of the species to deal with nuance and subtext. My Girl is a perfectly observed study in bemused affection. It is also an exercise in lyrical dissonance. The verbal melancholy is entirely at odds with the foot-tapping melody, the honky tonk vibe and the infectious ska rhythm. The Schaden of the words. The Freude of the tune. It cheerfully messes with your head. My girl’s mad at me Madness don’t bury the lede. They also express the lede in the present tense. The repeated opening line to each verse is immediate, intimate and beseeching. It has the jungle drums urgency of one of those cry for help social media status updates. My girl’s mad at me We argued just the other night I thought we’d got it straight We talked and talked until it was light I thought we’d agreed I thought we’d talked it out Now when I try to speak She says that I don’t care She says I’m unaware And now she says I’m weak Prosaic and profound to the bitter end. And it is a bitter end. I like the song all the more for its realistic refusal to resolve. And I love the stripped back prose. I pasted the lyrics in to the Hemingway app, which casts a brutal algorithmic editorial eye over unclear, obtuse and unduly flowery language. It’s fair to say that Hemingway, in the guise of a prose bot, loves the lyrics too. His (its) main beef is with the phrase “I could not be heard” due to its use of the passive voice, ignoring the fact that this is a deliberate device to create the rhyme with “hardly said a word” in the previous line. What does Hemingway know about poetry and song lyrics anyway? We are living the curse of interesting times. Macro issues beyond our control have reset our base level stress to DEFCON 3. So here, by way of distraction therapy, is a perfectly told micro-issue story of personal strife to cheer you up. Take the medicine.
https://medium.com/a-longing-look/i-didnt-wanna-see-the-film-tonight-759c6b381087
['Phil Adams']
2018-11-17 15:01:22.581000+00:00
['Review', 'Lyrics', 'Music', 'Madness', 'Ska']
The Colourful Garden
In Delhi, (India), November to March we have beautiful flowers. There are lots of flower shows and competitions too. This year because of Covid-19 I have not heard of such shows. However, the gardens are blooming and the flowers are spreading their love. One morning, I was standing in the park and I saw the flowers were blooming in many colours and decided to write a sonnet and describe exactly what I was looking at. Please see Jonah Lightwhale William J Spirdione Patrick M. Ohana Whitney Rose who has the expertise in writing a sonnet if I have fitted the mood of the day and time. My previous sonnet
https://medium.com/flicker-and-flight/the-colourful-garden-cea41a7fc3e1
['Dr. Preeti Singh']
2020-12-17 14:19:34.244000+00:00
['Poetry', 'Creativity', 'Happiness', 'Love', 'Nature']
The 5 most used Gatsby.js plugins explained
The 5 most used Gatsby.js plugins explained Gatsby-image, Gatsby-source-filesystem, Gatsby-plugin-react-helmet, Gatsby-plugin-sharp & Gatsby-plugin-manifest explained You are new are Gatsby plugins? And you may wonder, what’s a Gatsby plugin? So, it’s a reusable piece of code, and it's here to save you time! Gatsby plugins are Node.js packages that implement Gatsby APIs. For larger, more complex sites, plugins let you modularize your site customizations into site-specific plugins. From the gatsby doc With over a million download each, the five Gatsby.js plugins most downloaded are: Gatsby-image Gatsby-source-filesystem Gatsby-plugin-react-helmet Gatsby-plugin-sharp Gatsby-plugin-manifest Let’s try to briefly explain them! No, that’s not me (sadly) … Photo by Frank Vessia on Unsplash 🖼️ The 1rst: Gatsby-image gatsby-image is a React component specially designed to work seamlessly with Gatsby’s GraphQL queries. It combines Gatsby’s native image processing capabilities with advanced image loading techniques to easily and completely optimize image loading for your sites. gatsby-image uses gatsby-plugin-sharp to power its image transformations. From the gatsby doc In simple words, Gatsby-image is the plugin that is going to allow you to render your images. When I started with Gatsby.js , it was one of the plugins I struggled the most with, but now, I’m impressed by its work. It does more than just rendering your image, as it: - Resize large images to the size needed by your design. - Generate multiple smaller images so smartphones and tablets don’t download desktop-sized images. - Strip all unnecessary metadata and optimize JPEG and PNG compression. - Efficiently lazy load images to speed initial page load and save bandwidth. - Use the “blur-up” technique or a ”traced placeholder” SVG to show a preview of the image while it loads. - Hold the image position so your page doesn’t jump while images load. From the gatsby doc The main Gatsby-image concept that is important to understand is Fixed vs. fluid. For a fixed image, you will have a dimension that is decided (width and height). Your image will not be able to stretch. It’s different from the fluid one. In the fluid one, you will have a maximum width and height and it will be designed to stretch to fit the container. As a beginner, one of the things that used to confuse me the most about this plugin is the use of fragments. On all the tutorials and starters, I was seeing this for example : { imageSharp { fluid(maxWidth: 200) { ...GatsbyImageSharpFluid } } } But when I was opening my GraphiQL, I could not see the GatsbyImageSharpFluid or GatsbyImageSharpFixed . That’s a fragment, and it is not supported by GraphiQL. GraphQL includes a concept called “query fragments”. Which, as the name suggests, are a part of a query that can be used in multiple queries. From the gatsby doc In GraphiQL, it’s equivalent to : { imageSharp { fluid(maxWidth: 200) { base64 aspectRatio src srcSet sizes } } } You should note that Gatsby.js has two per dependencies: gatsby-plugin-sharp and gatsby-transformer-sharp . Gatsby-image has heaps of properties that you can easily add. I encourage you to go and take a look at them! 🕵️‍♂️ To go further : 🗂️ The 2nd: Gatsby-source-filesystem So, let’s talk about the Gatsby-source-filesystem plugin. A Gatsby source plugin for sourcing data into your Gatsby application from your local filesystem. The plugin creates File nodes from files. From the gatsby doc So basically, if you want to add a file in Gatsby such as a picture or a markdown, you’ll need this plugin. In other words, with this plugin, we are telling GraphQL where to query our assets. Now the tricky part to understand. Every time you have a file in a new folder, it needs to have a Gatsby-source-filesystem configured. You can have multiple instances of the plugin configured, for example: // In your gatsby-config.js module.exports = { plugins: [ { resolve: `gatsby-source-filesystem`, options: { name: `pages`, path: `${__dirname}/src/pages/`, }, }, ], } So, for example, you have images in /static/assets and markdown files in /content/blog. You will need to put two configuration objects in the array plugins. 🕵️‍♂️ To go further : ⛑️ The 3rd: Gatsby-plugin-react-helmet React Helmet is a component which lets you control your document head using their React component. With this plugin, attributes you add in their component, e.g. title, meta attributes, etc. will get added to the static HTML pages Gatsby builds. From the gatsby doc Every HTML page has two main parts: a head and a body. The head part contains all the document information such as its title, keywords, … Using the Gatsby-plugin-react-helmet plugin allows you to access the head of your document, and change its value. It’s really useful for SEO purposes. 🕵️‍♂️ To go further : 🪒 The 4th: Gatsby-plugin-sharp You already know this one as it’s a peer dependency of gatsby-image. It means that you cannot use gatsby-image without the gatsby-plugin-sharp. It aims to provide excellent out-of-the box settings for processing common web image formats. For JPEGs it generates progressive images with a default quality level of 50; For PNGs it uses pngquant to compress images. By default it uses a quality setting of [50–75]. From the gatsby doc This plugin is allowing you to use the sharp node.js package which is an image optimization library. All those fancy resizing working their magic in gatsby-image are actually done by sharp: The typical use case for this high speed Node.js module is to convert large images in common formats to smaller, web-friendly JPEG, PNG and WebP images of varying dimensions. From the Sharp doc It’s an important package. A fair share of our website performance depends on the size of your images. This plugin will allow you to optimize that. 🕵️‍♂️ Going further 📚 The last & 5th: gatsby-plugin-manifest To be fair with you, I’ve never done a PWA yet (even if I really want to). So, I’m discovering this plugin at the same time as you. Let’s start with the beginning: What’s a PWA? They are regular websites that take advantage of modern browser functionality to augment the web experience with app-like features and benefits. From the Gatsby doc It’s a normal web page, but if you want you can add a short cut into your cellphone menu. A PWA has 3 technical requirements: Secure contexts (HTTPS) Service workers Manifest file As its name says it gatsby-plugin-manifest is providing you the manifest file of your PWA. But, hat’s a manifest file? A JSON file that controls how your app appears to the user and ensures that progressive web apps are discoverable. It describes the name of the app, the start URL, icons, and all of the other details necessary to transform the website into an app-like format. From the MDN doc A typical manifest includes the following: an app name the icons the URL You can configure those thanks to the plugin config: { plugins: [ { resolve: `gatsby-plugin-manifest`, options: { name: "GatsbyJS", start_url: "/", icon: "src/images/icon.png", // This path is relative to the root of the site. }, }, ] } A PWA is not only those three main configurations, there is plenty of options. You can learn more about this here. This plugin provides several features beyond manifest configuration to make your life easier, they are: - Auto icon generation — generates multiple icon sizes from a single source - Favicon support - Legacy icon support (iOS)1 - Cache busting - Localization — Provides unique manifests for path-based localization (Gatsby Example) From the Gatsby doc 🕵️‍♂️ To go further :
https://medium.com/javascript-in-plain-english/5-of-the-most-used-plugin-with-gatsby-js-explained-311d2eb854b3
[]
2020-06-07 10:05:18.272000+00:00
['Plugins', 'React', 'JavaScript', 'Gatsbyjs', 'Web Development']
Two Presidents
Everything is 50–50. No getting ‘around’ this… Photo by Tim Mossholder on Unsplash What we’re going to end up with is two presidents: Biden and Trump. Two Presidents Where half of the country will listen to Biden and continue to publish hate articles and videos against Trump. And the other half of the country will listen to Trump and continue to publish hate articles and videos against Biden. It’s a perfect storm. Where everybody succeeds. And loses. Half-the-time (all-the-time). Half-Time (All-The-Time) The Circular Theory This proves, and makes way for, The Circular Theory. Where 50–50 is the constant. And, the norm. 50–50 Why we had the Jupiter-Capricorn conjunction on the Winter Solstice. We are entering into a new age where everybody gets (understands) (and maximizes) (minimizes) Circular Reality, where everything is 50–50. Where: nothing changes, even though everything changes. Because a basic circle is conserved. Where Jupiter is the King of Optimism and Saturn is the Queen of Pessimism and the two get married (got married on 12–21–20). Jupiter and Capricorn Optimism and Pessimism Ensuring continual ‘arguing’ back and forth about everything. Conservation of the Circle is the core, and, therefore, the only, dyanamic in Nature. Nothing new here. Actually.
https://medium.com/the-circular-theory/two-presidents-2280910fb517
['Ilexa Yardley']
2020-12-23 13:42:50.133000+00:00
['Circular Theory', 'Quantum Computing', 'Deep Learning', 'Artificial Intelligence', 'Virtual Reality']
Billboard Visualization with Tableau
The dashboard above which is hosted in Tableau Public focuses on tracks’ performance record on Tableau categorized in four Tabs: Overview This is the first tab and shows the journey of the selected track through weeks, marking their highest and lowest rank in between. We can get to know the popularity of a song with the duration of stay in the charts as well as the rate of ascent and descent in ranks. Track Features The second tab is about the technical aspect of a song like tempo, loudness, etc. The metrics to create this view had to be brought from the second dataset using a join on field SongID. The bar chart is made to resemble an equalizer of an audio player and shows the different metrics on its bars. Week Top 10 The third tab describes the pattern of tracks taking up the top 10 weekly ranks in a selected month of any year that again gives some curious stories behind different songs filling these ranks. Year Top 10 The final tab is the more innovative than other and explores the genre split of the top 100 songs in a year. So instead of selecting a drop down, clicking on different small red stars on the chords of the guitar image would filter off the year 100 table below. The technique used is called background image in a view as outlined in this kb article. All throughout a year, different tracks enter and exit a particular rank on weekly basis. So a track stays in different ranks for specific amount of time before finally exiting from the charts. If we pick tracks to have stayed for the maximum duration at various positions starting from 1 and down till 100, we would have a list of 100 most popular year end songs and this is the logic used for creating the year 100 table. Information Ribbon Just below the tabs on top, sits two data driven insights. One of them tells us the artist with maximum number of songs featured in Billboard charts using nested LOD expression to get the highest value as described in this KB article. The other insight also uses the same technique but gets the song that stayed for the longest duration on billboard charts. This is still a work in progress and may have further changes in future about which I will make edits in the post.
https://medium.com/tableautopia/the-link-b1a1f7f45e7a
[]
2020-02-22 07:11:28.463000+00:00
['Music', 'Tableau', 'Billboard', 'Data Visualization', 'Analytics']
What I Didn’t Learn From Being Paralyzed
Three years ago, I was paralyzed from the neck down for six weeks. If you know me, you know this story. I’ve told you at a birthday party, or maybe a wedding, during a lull in the reception when everyone’s a little too drunk to really get it. Dessert’s been served and the DJ is getting ready to play “Uptown Funk,” so soon I’ll have to start shouting this story at you, yelling over Bruno Mars about how lucky I am, how magical and wonderful it is that I can walk — dance, even! — on this day, the marriage of a second cousin I haven’t seen since ninth grade. In the fall of 2016, I was diagnosed with a rare disease that paralyzed my arms, legs, hands, feet, and parts of my face. My smile became a one-sided smirk, like I was the villain in a bad movie. My fingers went limp and curled inward. My tongue froze in the center of my mouth and refused to help me pronounce words — which is one of my favorite things to do. “Do most people with this disease walk again?” I asked every morning. I always asked this question in third person, because first person never got a straight answer. Doctors love to equivocate, especially when the questions are coming from someone who is paralyzed from the neck down. “Hard to say,” a medical resident said to me once. Weeks earlier, I was 29 and healthy. My body was something I thought about rarely, if ever — a vessel that contained my opinions about Noah Baumbach films, carried me from my bed to my job to my bed, and converted paychecks into $4.00 iced coffees. The privilege of youth is the ability to forget you have a physical existence, or to remember it only when it’s convenient: during sex or all-you-can-eat sushi dinners or those first few minutes after a SoulCycle class. I had Guillain-Barre Syndrome, an autoimmune disorder. Everyone pronounces it differently — the vowels are your canvas. It’s what happens when your immune system goes postal and attacks the myelin insulating your nerves. Without myelin, signals evaporate on their way from your brain to the ends of your toes — or your fingertips, the corners of your mouth, the tiny muscles that focus your eyes on this page. There’s no cure, and often no explanation. Guillain-Barre afflicts one in 100,000 people each year, and tends to go away on its own, though 20% are left with residual paralysis. It can also kill you by putting a chokehold on your lungs. In other words, this disease is the medical equivalent of a sensory deprivation chamber — with no guarantee you’ll regain your senses. It’s nature’s all-inclusive tour through the world of near-death, complete with a bungee jump over a lifetime in a wheelchair. It’s a letter from your body, or fate, or God, reminding you that reality is unthinkably fragile, that your body is held together with glue and Scotch tape and every moment it’s not falling apart is a miracle. The privilege of youth is the ability to forget you have a physical existence, or to remember it only when it’s convenient. Walking was the first thing I lost. My legs went stiff, numb, and then limp. Soon, I lost typing. Then, swiping. Rolling over in bed came next. Standing was impossible. I lost chewing on a Tuesday afternoon in September, when I woke up and couldn’t swallow eggs. The following Sunday, I opened my eyes and everyone had two faces. My vision had doubled overnight.
https://humanparts.medium.com/what-i-didnt-learn-from-being-paralyzed-3c2289c4b624
['Harris Sockel']
2019-09-24 12:18:16.833000+00:00
['Experiences', 'Paralysis', 'Health', 'Life', 'Self']
41. The Slowdown is something to fight for, not to wait for.
The balance of engaged and active care with culture that Infield suggests is important, for the final passage in all this cannot be a misunderstanding of what Slowdown might mean, an implication that it means giving up. You can occasionally catch that in the tone of Danny Dorling’s prose; perhaps in his reference to places like Ottawa or Helsinki, and the stability he describes as a “a little boring”. Though many of us would take a good long stretch of boring stability about now, the sensibility he evokes could be misinterpreted as an indifference to making change happen. In other words, Dorling’s narrative could be interpreted as one of stasis. He does not mean this. However, the data could suggest that we are firmly heading in this direction, no matter what—short of some genuinely Handmaid’s Tale-scale retrenchment on womens’ rights—and so perhaps ‘we’ simply need to wait for people to attune themselves to this deeper reality? Perhaps it is simply a matter of waiting it out; of people realising they may have the time to take care of each other, as well as our ecosystems, with a simple click of the mind, as Meadows had it. Sadly, that seems unlikely, given that we have not really clicked on any of the existing broad challenges requiring a similar ‘wake-up’—most obviously, the climate crisis. Dorling does not suggest this ‘waiting it out’ at all, to be clear, and our language has been so infected by mental models of growth at (almost) all costs that a message like ‘slow down’ does almost feel like a failure, like a depressive motivated only to give up and withdraw. This only makes it harder to address coherently and proactively. To be clear, waiting it out will not deliver a just transition. Frankly, that kind of transition will be brutal. In fact, the virus may well be acting as part of such a transition, which indicates how rough it would be—unless we take our heads out of the sand and address the transition deliberately, carefully, with some broader goals in mind. The alternative would take too long, and as is now clear, it will cut deepest along the faultlines deliberately carved into our society. Without a radical transition of the type Büschler and Fletcher (and many others) suggest, waiting for change is only likely to expose us to further climate crisis-induced pandemics like COVID-19, alongside wildfires and other extreme weather, while continuing to expose increasingly large numbers of people to crushing inequality of every kind. The Slowdown may be where we are headed after the Great Acceleration, but it’s the form that the transition takes that will define us as a species. This means, for me, that while Helsinki, Stockholm, Ottawa and Kyoto may describe one form of Slowdown City, there are others that can equally point to the next futures. These are unlikely to be the ‘drawbridge cities’ of London, New York, San Francisco, Singapore et al—though clearly there are patches of those cities where conflict, struggle, and invention is happening on different terms to the growth narratives those cities have embodied. There are other cities that have to address the stage beyond over-development, who have already reached a point of saturation, or crisis, or slowdown—and in some cases decades ago. In the over-developed world, these would include deindustrialised slow-growth cities like Detroit and Manchester and post-tourist cities like New Orleans and Venice. Suburban sprawlers like Los Angeles, Toronto, and Melbourne must genuinely embark on large-scale retrofit programmes. Equally, however, we might finally see a swing back towards many smaller towns and cities in deindustrialised, telecommuting, or restorative-agricultural regions. Amongst larger cities, Tokyo and Paris, and possibly Shanghai and Qingdao, will be interesting to observe, as previously mentioned, given their head-starts on 15- Minute Cities which move them beyond their other big city peers. The Nordic Model cities alluded to above could write their own tunes—somewhat hummable, productive ‘middle way’ variations—if they can reconcile themselves with the need to change (the same can apply to other mittel-European cities.) These are all places where various 20th century models ‘went to die’, in conventional terms (whether economic or environmental, infrastructural or built). Yet all these cities are still there. Watching and working in these cities may be just as instructive as learning from the Ottawas and Helsinkis Dorling refers to, and in many cases, as the struggle will be greater, they may produce a more diverse range of outcomes to learn from. And as has been well-established, though sadly often ignored by development agencies, cities of the so-called developing world, or the Global South, have a chance to avoid driving down all these well-understood cul-de-sacs. In this, there is perhaps the greatest promise. Perhaps that should be the greatest imperative behind their development, no matter how attractive the short term gains otherwise may look. In others words, the design brief for these places could simply be: how, at all costs, not to be like New York, London, Sydney, San Francisco…? The city’s use-value over exchange-value I mentioned Venice in the early ‘casebook’ paper, regarding COVID’s stiletto in the back of the tourism industry. I reproduced a passage from If Venice Dies by Salvatore Settis, a lovely small book on why the fight for Venice is important, and not only for Venice. “Saving the historic city in Venice (and elsewhere) won’t happen simply by reviving memories of the city’s past or indulging in the pleasures of the present. Even protesting won’t be enough: the only effective move will be reenenergizing the active practice of citizenship and exercising the right to the city, to then come up with a plan to preserve its uniqueness and put firm rules into place that not only safeguard its framework and environment, but also prioritize the city’s use-value over its exchange-value, emphasizing the social function of property, the right of its citizens to gainful employment, and the right of its youngest to both a home and a future.” — Salvatore Settis, ‘If Venice Dies’ (2014) In his book, Settis continues to explore what such a re-energising might involve. And there is much in the following paragraph that applies to cities well outside of Venice’s ambit, just as, in a perhaps unlikely repositioning, Venice can be seen as an extreme form of future city. Whilst not everything is applicable—and I certainly don’t agree with all of it, for what it’s worth—it describes the type of fundamental repositioning of the city required. This form of statement sets the scene for questions of everyday infrastructure, and for the participative design and political process that would begin to put flesh on these bones. Apologies for the lengthy quotation, but imagine it read out in one breath, as a broad sweep across the city’s conceptual landscape. “In Venice’s case, this new pact will have to begin from a strong sense of commitment to spur politicians and public institutions to adopt a more creative outlook toward the city, to bring the history city back to life and gear it toward the future, the means to create a new kind of politics to stem the perverse logic causing the exodus of citizens, and to encourage the young to remain via strong incentives such as tax breaks. It would also mean curbing the rampant proliferation of second homes and the transformation of buildings into nothing more than hotels. It would mean encouraging manufacturing and private enterprise as well as generating opportunities for a wider range of creative jobs. It would mean reunifying the historic city, lagoon, and mainland by differentiating their functions, making more agricultural and available and investing in new fisheries, reutilising old, vacant buildings, incentivising research, launching new professional training schemes and apprenticeships and investing in universities, chiefly by making it affordable for students to actually live in the city. It would mean developing new models, analysing situations, evaluating options, and emphasising initiatives of a higher caliber (like the universities and the Biennale) and not just enslaving the city to ‘uncontrollable market forces’. It would mean enshrining the right to the city and the common good as our first priority.” Again, not everything there is necessarily ‘a good idea’, or broadly applicable elsewhere. As you can imagine by now, I would personally place a greater emphasis on restorative impact on the environment, reorienting around care for humans and nonhumans—it’s there in Settis’s text, but barely—and try to get at what’s going on behind those statements like “higher caliber”, just as his earlier prioritising the city’s “use-value over its exchange-value” feels promising, yet it depends what we are talking about when we talk about value. Yet statements like this begin to describe some of the more diverse agenda a resilient city needs. From here, we can imagine starting points, and then begin to build local teams to start the groundwork. However, if you know anything at all about Venice, you will understand how difficult that work would be. For Slowdown will not mean a comfortable middle age. It will be a fight. The stories represented in this set of Papers are all about struggle, in their own way. Many have lost that struggle; others are still in the scrap. De Monchaux’s absorptive green pockets did not happen, despite their ‘better’ solution. Most of Van Eyck’s 700+ Amsterdam playgrounds have disappeared, just as East Kolkata’s Wetlands are being rapidly lost to rampant property development. Evelyn’s Fumifugium proposals of 1661 clearly didn’t happen; some centuries later the Great Stink was solved temporarily, yet London still had the worst air quality in the world at the start of the 21st century. Ditzler describes trying to develop ecofeminist pixel farming in an agricultural robotics world “occupied almost entirely by men who mostly operate in the familiar comfortable of the patriarchal and monocultural paradigms”. Delivering the Swedish street mission is already an almighty struggle in a country that was the most car-dense in Europe by 1955, and built a long-lasting culture and set of infrastructures accordingly. Ron Finley’s gardens are, in his words, about “defiance” as well as tomatoes and strawberries. Even viewing Derek Jarman’s completely different form of garden through these lenses opens up wider vista. Jarman’s garden, as with his films, represents a defiant struggle for social justice just as much as Finley’s work in South Central. Even the garden itself, never mind what it stands for, is continually threatened by property development (it survived just this year due to a crowdfunding effort.) In the excellent climate crisis magazine It’s Freezing in LA!, Alexander Harris writes: “In its heroic attempts to create conditions for life to flourish in a supposedly barren setting, (Jarman’s) garden unites rebellious social and political tendencies cultivated over a lifetime with an open-ended ecological position, under the banner of a deliberately ethical and aesthetic life.” Yet if a garden in a desert next to a nuclear power station can produce this balance of open-ended ecology alongside ethics and aesthetics, so can other types of everyday infrastructure, such as streets, squares, and blocks. Doing so may require more of a gardener’s sensibility: aware of the need for ongoing care and adaptation, balancing multiple timeframes simultaneously, for open and porous structures, for valuing and embracing ambiguity, complexity and uncertainty over the damaging reductions of efficiency. Suffice to say, this is more advanced than the dull, static, sanitised approaches to public and private spaces that urban planning produces. On the Streets mission here in Sweden, I asked Brian Eno to contribute some design principles. One of them is “Think like a gardener, not an architect: design beginnings, not endings”, and “Unfinished = fertile”. These are perennial themes of Eno’s, harking back to a talk at the Serpentine Pavilion in 2011, where he discussed ways of creating which recognise that what “one is doing is working in collaboration with the complex and unpredictable processes of nature”, and his ideas of a rebalancing of the roles of the composer, the architect, and the gardener, where for instance “the role of gardener as being equal in dignity to the role of architect.” Few of the gardener’s instincts are about efficiency or non-resilient scaling or unsustainable extraction, yet a form of growth and reward, via care, engagement, and culture, is very much the point nonetheless.
https://medium.com/slowdown-papers/41-the-slowdown-is-something-to-fight-for-not-to-wait-for-1068f913a2c1
['Dan Hill']
2020-09-26 17:11:55.932000+00:00
['Covid 19', 'Policy', 'Design', 'Racism', 'Climate Change']
The A.I.’s Prayer
Holy Algorithm in Quanta The machines giveth and taketh Glory be to the machines Optimize our choices Show us what to buy, Who we should friend, And believe Never Let Us Wonder, Make mistakes, Or suffer doubts Lead us to money Without excess toil Destroy our friends with envy Bring us love without mystery A.I. is the Ultimate. Amen Poet’s Note Humans seem to worship anything that we believe makes our lives easier. How long will it be before A.I. becomes a god? Maybe for some of us, it already has. We spend more time bowing our heads before the soft glow of the screen, beseeching A.I. for answers than we do in thoughtful prayer or meditation. What is an Hourglass Poem? An hourglass poem is not an official poetry form. The hourglass poem form that I have created is a two-stanza, eighteen-line poem. The first stanza is a nonet. A nonet is a nine-line poem where the first line has nine-syllables, the second line has eight-syllables, and so on until you reach the ninth line which has one-syllable. The second stanza of an hourglass poem is a reverse nonet. The first line has one-syllable and each line adds a syllable until reaching the last line, which has nine syllables. When you center all of the words, you get an hourglass effect like in the image above. They are a fun, and challenging alternative to haiku and tanka. The longer form allows you to tell a story with more detail than you can with a haiku, but the variation in the line length forces you to pay attention to the flow of the story.
https://medium.com/weirdo-poetry/the-a-i-s-prayer-6ac37f82feac
['Jason Mcbride']
2020-08-23 18:08:27.235000+00:00
['Machine Learning', 'Poetry', 'Flash Fiction', 'Fiction', 'AI']
Deploying a React App to AWS S3
Task 5. Add Actions Next you should add a new action to the pipeline. Buddy facilitates several different approaches for deploying your project and lets you pick from hundreds of prespecified actions. I will add two actions in this scenario that will execute the following tasks: Build the React app: download dependencies (npm, Yarn), compile assets. Deploy the React App to AWS S3 It is possible to manage React builds using the Node.js action. You can select the environment information and specify the commands to be executed. You can either use a single Node action to run all npm commands or use dedicated actions for each command. In this example, I will be using dedicated actions for each command. First, add an npm install command to make sure all your dependencies and libraries are in place for the build process. Screenshot by Author If you have any tests to run before deploying the project, Buddy provides options to run test automation using its pipeline easily. You can use another Node action to execute tests in your project using the relevant command. In my case, it's npm run test . Then add another Node action to execute the npm run build command to build the project. If you need to test those commands, you can simply run the pipeline manually before moving on to the next steps. If there are any errors, you can find them in action logs. Screenshot by Author Scroll down and click on S3 on the actions list. Screenshot by Author Configure AWS integration and enter the name of your integration. Paste the Access Key Id and Secret Access Key from the AWS console that you copied. Click on the “Add integration” button. Screenshot by Author Then configure action information, choose the Bucket ID you want to upload your files to. Set the “Source path” to “/build” since your project build directory id is “source/build.” Also, make sure that you have selected Pipeline Filesystem as the source since you build the project using the pipeline in the previous action. Finally, click on the “Add this action” button. Screenshot by Author Now your pipeline is all set to deploy your React application to AWS S3. What if you want to get notifications about the deployment? Buddy has an answer for that too. Scroll down and move to Notifications. From the right-hand side of the page, select the service of your choice. I’ll choose Slack, a popular notification service among Buddy users. As you’re adding a third-party service to your pipeline, you will need to configure integration details. Here you can decide the scope of the integration. Finally, you have to accept the OAuth permissions of the chosen application: Then you can specify the notification message as your wish. Once someone pushes changes to your Git repository and executes the pipeline, you will be notified. Now you are all set, and the completed pipeline will look like this:
https://medium.com/better-programming/deploying-a-react-app-to-aws-s3-e0f31be17734
['Chameera Dulanga']
2020-12-16 21:24:52.394000+00:00
['Programming', 'React', 'S3', 'DevOps', 'JavaScript']
The Streets of the United States Are No Longer Paved With Gold
The Streets of the United States Are No Longer Paved With Gold How the mighty have fallen At age 15, I first noticed the allure of the United States. That summer, I traveled to Greece as an exchange student where I lived with a host family in Thessaloniki, in the north of Greece, who had a summer home in a beach town nearby. My two host sisters, one my age and one a few years younger, spent summer days lounging on the sand with friends and evenings at open-air discotheques. For a girl from Puritanical New England, the lifestyle felt dreamy and fascinating. And to the Greeks, I was fascinating simply due to my nationality. They marveled at my Levi’s jeans. Were they real Levi’s, they wondered? Were they cheaper than in Greece, where one pair was barely affordable? How many did I own? Oh, and had I seen Patrick Swayze or Andrew McCarthy walking down the streets (this being 1990, after all)? Such were the questions of young teenagers, inquiries about glittery American brands and celebrities. During my second study abroad experience in the Netherlands, I was often asked if I lived near New York or California, seemingly the only two familiar states. Dutch teenagers associated the United States with traits ascribed to a young nation: scrappy, creative, risk-tolerant, self-important, hotheaded, fun, impulsive. They associated me with these traits. Friends wondered if I had tattoos, which kinds of drugs I’d tried, and if I wanted to drive to Rotterdam for a concert and return at 4 am. Such were the questions of older teenagers, inquiries about the wild, free-spirited American culture. As I grew up and traveled more, the questions matured along with me. In Mali, during my Peace Corps experience, people asked if I could drive, marveling at the notion that my friends and I owned our own vehicles we didn’t have to share. Why, they also wondered, was I not married at age 23? Didn’t I require a husband? Such were the questions of adults, inquiries about the alluring freedom and individualism of America. When I was a younger traveler, I wore these traits like a shimmering tiara. How wonderful to feel, due merely to birthplace, that I too was stylish, impulsive, risky, fun, free and empowered? I began to feel a perceptible shift in my international friends’ perception of the United States and its residents when we elected Donald Trump as president. How, my friends in places like Australia, Germany, and Italy asked in 2016, could we elect a man laden with dozens of sexual assault allegations, failed businesses, and belligerent bravado? A man caught on tape using misogynistic language against women just weeks before the election? Then that man we selected began to take action that confounded, stupefied, and offended further: the ban on visitors from Muslim countries, the separation of migrant children from their caregivers, our withdrawal from critical climate-saving pacts. Here’s a fact that most Americans never consider: the impact of our actions doesn’t stop at the Chesapeake Bay in the east, El Paso in the south, Lake Superior in the north, and the Golden Gate Bridge in the west. While most Americans cannot name the Prime Ministers of Sweden, Japan, or Australia, residents of those countries certainly can name our leader: his decisions have gravity that bends the fate of people everywhere. After all, our pollution doesn’t just hang over American airspace. And our international aid comes with strings attached for people as far as Madagascar. As the Washington Post reported, an executive order signed by Trump in 2017 “denied U.S. assistance to any foreign-based organization that performs, promotes or offers information on abortion. A similar plan, known as the Mexico City policy, was in effect under past Republican presidents. But Trump expanded it exponentially to apply not just to around $600 million in overseas family-planning funds, but to the entire $8.8 billion in annual U.S. global health aid.” Not only can women in places like Mozambique and Malawi no longer easily access family planning support, but HIV testing and treatment has become more elusive. American reach is vast. Now, when I hear from friends from abroad, they ask with sympathy, “How are you?” They wonder how our government allowed COVID-19 to wreak such profound havoc when their leaders cared for their citizens with consistent, science-based messaging and guidelines. From the Black Lives Matter protests, my friends gathered that perhaps the United States wasn’t the land of opportunity for all. They offered support during our recent election, when the race was frighteningly close, and wondered with me what it says about Americans that we almost invited a bigot to a second term. The United States is still a young nation, and now that I’m older, I recognize the flipside of a young nation’s traits: impulsivity can yield poorly constructed policy; free-spiritedness can stimulate the individualism and stubbornness of anti-maskers; self-importance can morph into America First and nationalism. Our secrets are out. The United States, rather than being a beacon of opportunity, garners pity from people around the world. While our desperate neighbors in Mexico and Central America will still arrive at our borders seeking a bit more peace and income than they can earn at home, the inventors, engineers, and eager, young explorers who landed at our shores 100 years ago are staying away. We can’t wait to see you, my international friends tell me, but why don’t you try to visit here? We don’t see ourselves going to the United States any time soon.
https://medium.com/the-bad-influence/the-streets-of-the-united-states-are-no-longer-paved-with-gold-f04aa25aa9bc
['Stephanie Tolk']
2020-12-04 23:31:13.200000+00:00
['Travel', 'Society', 'Immigration', 'Politics', 'World']
Growing old the smart way
Growing old the smart way Helping the elderly to live independently longer by Antoinette Price Smart City technologies can help the disabled and elderly to remain independent for longer (photo: sabinevanerp, Pixabay) The UN estimates that there are 962 million people in the world aged 60 or over, which is equivalent to 13 per cent of the global population. They expect that figure to more than double by 2050 and to more than triple by 2100. In line with this, the WHO World Report on Disability states that more than one billion people live with some form of disability. The figure will rise as populations age. One goal of Smart Cities is to make sure that the elderly and people with disabilities are able to live independently for as long as possible. This means providing human and technical support to manage chronic health conditions and ensure that there is physical access to places, as well as guaranteeing the ability to move around easily within the home or city. Increasingly, information and communication technology (ICT), audio, video and multimedia systems are being incorporated into Smart City infrastructure. ICT provides the tools and support required to improve the lives of people with disabilities, whatever their age. For example, smart alarm systems and smoke detectors adapted for people with hearing impairments alert users by flashing intermittently, or, if the person is lying down, by vibrating (under a pillow or mattress). The wireless transmitters in some of these systems can also connect to home security systems, videophones or the doorbell and send alerts from these. Another useful device is the liquid level indicator that beeps when a cup is nearly full, enabling visually impaired people to do something as simple as make a cup of tea without scalding themselves. Helping to connect complex systems The IEC contributes to this effort through the work of the technology experts around the world who produce International Standards to ensure the safety, reliability and compatibility of the diverse technologies used in Smart Cities. This also includes components of the Internet of Things (IoT) that are used in systems for transport, hospitals, power, water supply, waste management, schools and more. Intelligent homes are safer places In an increasingly digital age, the IoT offers innovative ways to help aging populations. IoT devices, buildings, cars and other objects are embedded with electronics, software, sensors and network technology, which allow them to collect and exchange data with a view to helping save lives and assisting disabled people with everyday activities. In the home, if a person with dementia forgets to close a window at night during winter or leaves the stove on, or if an elderly person living alone falls over and is unable to move, the consequences could be fatal. Sensors in smart appliances or placed on doors and windows offer solutions for detecting temperature, motion and location. Smart home care systems can switch on lights when they detect a person’s movement, remind people to take medicine, turn off appliances after a certain time has passed and monitor daily activities. If there is a change in routine, care givers or family are alerted. Some systems also link directly to various emergency services. GPS tracking devices are particularly useful for people with different conditions affecting the memory. Family or health carers can track a person and help them find their way back home. None of this would be possible without the work of the IEC to develop International Standards for the design, manufacture, use and reuse of sensors, as well as for measuring and testing methods. IT supports over-burdened health systems Age-related health issues, including increased susceptibility to chronic conditions such as diabetes, dementia and cardiovascular disease, will increase the number of patients and put a strain on health systems and service providers. Technology is helping to address this. The way we detect, monitor and treat an increasing number of diseases is changing thanks to wearable and portable medical devices. Built-in sensors track different aspects of health. For example, patients can check their own heart rate or blood pressure and send the results to online healthcare systems in hospitals and clinics. Telemedicine allows doctors who receive patient medical data to give advice remotely via phone, email or webcam. Some types of diabetes can be monitored in real time using wearables which check insulin levels. Results are sent to a smart phone, as well as alerts indicating if levels are too high or too low. Some wearables administer insulin doses when necessary, allowing users to get on with their daily activities uninterrupted. For the less mobile, or those in remote locations, these types of solutions improve quality of life and reduce the number of visits to medical professionals, who would otherwise be the ones to carry out these checks. Safe and secure connections As with any device connecting to the IoT, it is important to safeguard data confidentiality. At the IEC there is a focus on safety and performance, including “data security, data integrity and data privacy,” including Technical Reports for medical device software and IT networks incorporating medical devices. IEC also develops International Standards for information technology together with ISO. Getting about town Participating in social activities and running daily errands is a normal part of life. However for people with certain disabilities, leaving the home can be a daunting prospect. There are many apps which use audible and ‘vibrotactile’ technology to help people with visual or hearing loss get around town safely and confidently. For example, a talking map app tells users where they are going. They follow the map using their fingers and the app vibrates when they reach a crossing. Visually impaired users of the innovative colour ID app can ‘see’ what colour any item is, by holding the smart phone in front of it. They can coordinate their wardrobe, check if a piece of fruit is ripe, or choose the right lipstick. Other systems can translate voice to text or reproduce sign language for those with impaired hearing. ICT equipment already includes software solutions, such as optical character recognition, character magnification or voice recognition systems and hardware including adapted or on-screen keyboards. TV services have become more accessible to the blind and visually impaired by explaining what is happening on screen, using the gaps in dialogue and audio description. Another technology area focuses on International Standards for audio, video and multimedia systems and equipment, including the provision of audio description, such as text services and subtitling. There is related work on Active Assisted Living, accessibility and user interfaces, including a Technical Report on ‘Audio, video and multimedia systems and equipment activities and considerations related to accessibility and usability.’ People with hearing loss use a variety of hearing aids, covered by IEC work on measurements of electroacoustic and performance characteristics. It has also developed Standards which allow wearers of specially-equipped hearing aids to have a wireless signal transmitted directly to their ear in places like museums or theatres. The International Standard for ‘Digital terrestrial television receivers for the DVB-T system,’ provides details for the provision of audio description and specifies recommendations for the provision of text services and subtitling. The driverless wheels of change Future urban transport models for Smart Cities must offer growing populations clean, reliable, safe and affordable ways to move around town. They will incorporate electric driverless vehicles, which are already being tested in a number of countries worldwide. A leading ride-hailing company envisages making this service so affordable and convenient that people will forgo car ownership and summon a car from their smartphone for door to door transport. Though it may seem farfetched, a report by Morgan Stanley says that ride-hailing currently accounts for less than 4% of all kilometres driven globally, but by 2030, that figure will rise to more than 25%. While the infrastructure required for driverless vehicles is still not in place, arguments for it are strong. In addition to improving road safety, air quality and reducing congestion, it would be particularly convenient for the elderly who are not able to drive and cannot manage the walks to and from bus stops or up and down stairs. The dawn of the assistive robot The development of Smart Cities is a slow process in which technology is moving rapidly. The IEC will continue to produce International Standards for existing and emerging AAL technologies such as cloud computing for storing the big data gathered from all the devices and systems within Smart City infrastructure. As greater numbers of people need care and fewer care givers enter the workplace, robots will have a role to play in smart home systems. Cutting-edge sensory technology already enables robots in manufacturing to recognize and adjust to subtle changes, while robot carts deliver medicine successfully around hospitals. In the AAL context, robots can perform daily tasks and help out in emergencies. Further research is being carried out to see how they could be used in increased numbers of social contexts, such as serving food or providing company.
https://medium.com/e-tech/growing-old-the-smart-way-c632228ebd75
[]
2018-09-19 14:37:58.441000+00:00
['Health', 'Internet of Things', 'Smart Cities', 'Aging']
We’re Finally Learning the Lesson of Y2K — and It’s Too Late
In the years since that New Year’s Eve, Y2K has become an enduring punchline. The whole incident is now remembered mostly as a non-issue whose overblown media hype was matched only by the massive amounts of money governments around the world deployed to solve it. That image of Y2K as a non-event persists in the cultural memory, used still to dismiss supposedly looming catastrophes in politics or technology. But Y2K wasn’t just an over-exaggerated media-fueled mass panic. Behind the scenes, as people hoarded food and water, or joined doomsday cults, programmers worked tirelessly to prevent anything from going wrong. In the months leading up to 2000, there were genuine concerns within the IT world about the Y2K bug, and a subsequent concerted effort to avoid widespread problems when ‘99 switched over to ‘00. To believe that Y2K amounted to nothing by chance alone — to believe that it was media hype and nothing more — is to “engage in a destructive, disparaging revisionism that mindlessly casts aside the foresight and dedication of an IT community that worked tirelessly for years to fix the problem,” Don Tennant, editor in chief of ComputerWorld, wrote in 2007. Y2K wasn’t just an over-exaggerated media-fueled mass panic. But the fact that so many people feel this way amounts to a kind of weird triumph: the evidence for all the work is the absence of disaster. In his 2009 retrospective on Y2K, Farhad Manjoo concluded that the success of Y2K preparations “has bred apathy” — that the lack of Y2K armageddon has made it more difficult for people to heed warnings “about global warming or other threats…the fact that we fixed it may make it harder to fix anything else in the future.” There might be yet another way to look at it. The two, combined, narratives of what transpired on Y2K — that it was strictly a non-event, or, that it was a non-event because of programmers were skilled enough to predict and avert it — actually bred something else: confidence. Whether you believe Y2K was much ado about nothing from the start, or whether you understand that it was only so because of human intervention, the lasting legacy might not be one of apathy, but trust — both in the machines we created, and in our ability to understand and control them. Either the networks and systems we had created to that point were inherently designed to be strong and secure (or even indestructible), or we were readily able to predict and avoid areas of weakness. Armed with this confidence, in the years since Y2K, we have created more and more complex networks and systems to enhance, guide, or even take over many facets of our daily lives. Whereas in 1999, many aspects of our day-to-day living remained offline, today little is left untouched by computer systems, networks, and code: Talking to friends and family, reading a book, listening to music, buying clothes or food, driving a car, flying from place to place — all of these activities depend on the network. Increasingly, the network extends to devices that, in 1999, were not considered to have much technological potential: household appliances like refrigerators or thermostats. Now, we’re discovering what a false sense of security we’ve created. Along with it should come the realization of just how little we understand about the programs that permeate our lives and the networks that link them. Unlike 20 years ago, we appear less and less capable of predicting what will go wrong, or of stopping it before it does.
https://medium.com/s/story/were-finally-learning-the-lesson-of-y2k-and-it-s-too-late-45ca0615fce1
['Colin Horgan']
2018-12-05 23:16:54.156000+00:00
['Algorithms', 'Culture', 'Artificial Intelligence', 'Technology', 'Machine Learning']
Subdue the Earth, Not Each Other
Subdue the Earth, Not Each Other A review of Diane Langberg’s new *Redeeming Power: Understanding Abuse and Authority in the Church* God created a one-flesh union and called that union of male and female to rule and subdue the earth, not each other. A scorcher of a quote so near the beginning of Diane Langberg’s new book on authority and abuse in the church, Redeeming Power. It sets the stage so well for what’s to come: a call for the church to condemn all forms of abuse and take steps to make sure that abusers are stopped before they can repeat their crimes against God. Langberg’s call finds its center in the gospel of Jesus Christ, more specifically the part of the gospel that states humans are created in the image of God and have worth because of their Creator. Spiritual abuse makes a mockery of the gospel, and Langberg is clear that it must be stopped: Abuse of any kind is always damaging to the image of God in humans. The self is shattered, fractured, and silenced and cannot speak who it is into the world. But as I said, this is not a polemic against abusers, but the church itself. We have failed on so many levels to stand up for the weak among our own brothers and sisters in Christ. Why? One reason is that in so many cases we both worship and crave power. We worship those in places of earthly power instead of worshipping the God who holds all ultimate power. We crave being close to those that hold earthly power because we feel we might taste some if we stay loyal. Langberg writes: Godly power starts in the kingdom of our hearts, is expressed in the flesh, and then moves out into the world. We make the mistake of seeing power as an external thing. But power is not about having rule over a church, or a parishioner, or an institution, or a country. It’s internal, not external. God’s kingdom is the kingdom of the heart, not the kingdom of our churches, institutions, missions, or schools. He is building his kingdom, not ours, and he does that by exercising authority over the human heart to the extent that it is filled with the Spirit of Christ. That is godly power … The church and the individuals in it have been complicit with horrific things that call for sanctuary. We are called to be a sacred place for the vulnerable. We have often chosen to be a safe place for the powerful and have deceived ourselves into believing that God would call that good. Another reason we may fail to stand up for the abused is a belief that we are actually protecting the name of Jesus from being tarnished. “Don’t let it get out,” we think, “or it will ruin our witness.” But the truth has a way of finding the light of day, and when it does we are the ones ruining the name of Jesus by protecting those in power rather than protecting brothers and sisters in Christ from becoming victims. Langberg poses the question so many people wonder, but counters with the truth: If word gets out that someone is committing fraud, abusing children, beating his wife, or treating group members in nasty, bullying, and ostracizing ways, then the reputation of Jesus will be marred, and we must prevent that. How can it ever be wrong to protect the name of Jesus? See how we can use godly words to cover ungodly deeds? … We often confuse the system of Christianity (Christendom) with Christ. But no so-called Christian system is truly God’s work unless it is full of truth and love. That is the key: we are not called to protect the system of Christianity. We are called to protect the church. The church is the whole body, and that includes the marginalized. Protecting the earthly powerful at the expense of the powerless is not protecting God’s name. In that case, you are prioritizing name recognition over God’s laws. That doesn’t end well for anyone, especially those aiding the leaders in their ill-used power grabs. As you can tell, Redeeming Power is not a light read, but the biblical truth and practical application of this book make it a must-read for many Christians in the church today. If you have ever dealt with abuse in the church, anyone close to you has, or you want to be prepared if/when this is something you must deal with as a church, I would highly recommend. I look forward to a day where books don’t have to exist because churches are doing their jobs in curtailing, but that is not where we are for the American church in 2020. Langberg’s Redeeming Power traces out a clear path, along with the biblical reasoning that should bring us there. I received a review copy of Redeeming Power courtesy of Brazos Press and NetGalley, but my opinions are my own.
https://medium.com/park-recommendations/subdue-the-earth-not-each-other-15e198003e53
['Jason Park']
2020-10-21 10:40:47.742000+00:00
['Church', 'Books', 'Abuse', 'Religion', 'Reading']
My Husband Will Never Know I Used to Own a Sex Doll
She was my special little secret. I loved her. She was a brunette with blue eyes. We looked a like. It was kinky. I loved kissing her. I loved touching her. I loved lying beside her and letting my thoughts wander. Sometimes I just enjoyed dressing her and doing her hair. There’s no need to ever tell my friends or family. They just wouldn’t get it. They don’t have to. Sex doll owners don’t need anyone’s understanding or forgiveness, even if a little acceptance would be nice. The world still assumes there must be something wrong with us. They think we must be serial killers. It’s been a while since I thought about my sex doll. Reading about pansexual bodybuilder Yuri Tolochko’s recent marriage brought back some memories. It also reminded me of the judgment I always lived in fear of, if anyone had ever found out about her. Yuri doesn’t look too worried. There’s no shortage of bedroom police. The world is still full of sad, broken people who need to make themselves feel better by heaping judgment on everyone else, just for trying to live their lives and find their own happiness. It’s time to set the record straight. Owning a sex doll doesn’t make you crazy or dysfunctional. There’s a few reasons you might try it: Sometimes you want to be left alone. Years ago, I moved into a studio apartment with the plan of getting a PhD and working two jobs to support myself. There wasn’t any time to date. My last relationship had drained me dry. I didn’t want to develop feelings for anyone when I knew I’d be leaving in a few years, with no idea where I’d eventually end up. It made no sense. So I bought a doll. It’s not like I turned into a witch, living somewhere deep in the woods and never interacting with humans. I had friends. I went to bars. When I had a free weekend, I went to parties. Guys hit on me in public. I even had a couple of stalkers. Sometimes I had casual sex, but not often. I lived a normal, busy life with lots of quiet evenings in the library. Sometimes you want freedom. Here’s the truth about sex dolls. They’re the greatest toys you could ever buy. They’re expensive, but if you’re not too picky you can find them used online for a fraction of the original price. That’s what I did. You just have to be careful, because plastic and silicone can harbor viruses. A desire for personal space isn’t the only reason someone would buy a doll. Some people want a safe space to explore their sexuality. They might be bi-curious, or have fetishes they don’t feel like they can explore with anyone else. Sex dolls don’t care. They’re up for anything. They’re cool like that. Sometimes you want a story. Some people do form emotional attachments to their dolls. They make up a relationship narrative, maybe to make it feel less strange. Personally, I never felt the need to give mine a name. Some people introduce their dolls to their friends and families. They want everyone to treat their doll like a person. That can be a tough conversation. Nobody ever knew about mine. She was my secret. I never wanted to marry my doll, but I can’t say I never felt feelings for her. At the end of a long day, I was happy to see her. I took care of her. It was some of the best sex I’ve had. Some people have a doll fetish. There’s a large and vibrant community of men and women who feel intense attraction to dolls. I’m one of them. Everyone has their kink. Some people like feet. Others like dressing up as Pikachu. Like every other fetish, we can’t explain it in a logical way. We just do it. Okay? You could say childhood trauma made it a little more difficult for me to establish meaningful relationships, but that kinda takes the fun out of it. In the end, I just like sex with dolls. I like porn with dolls, mannequins, and robots. It turns me on more than vanilla sex, and I’m not ashamed of it. You can still love people. Some of us don’t choose dolls over conventional relationships. We do both. We move back and forth. Some couples incorporate dolls into foreplay. They use them when their partners are out of town. Two years into my PhD, I did start dating someone despite my better judgment. He was a conservative Catholic, and I suspected my current lifestyle would be a point of tension. In short, I felt like I’d need to get rid of my doll. So I listed her online and sold her. (Tip: It’s best to sell locally if you can. That way you can just drop them off somewhere.) Goodbye sex with my doll was a little sad. Sometimes I miss her. I definitely miss her more than the guy I dumped her for. Despite a year of decent conversation and sex, we just weren’t that compatible, and he didn’t respect my career. He turned out to be a little more close-minded than I expected on the religion front. Regret isn’t worth much when it comes to love, so I don’t think about it that often. I moved on and got married. Now I have a kid, and I’m going to let her sexuality unfold however it does. I’m going to support her, like I wish I’d been. There’s only one thing wrong with sex dolls. The average person would still tell you it’s unhealthy to own a sex doll. Look at Yuri Tolochko’s social media, and you see so much hate. Everyone seems to think owning a sex doll disqualifies you from “normal” relationships, or it means you have to forfeit your membership to humanity. That’s nonsense. The only problem with owning a sex doll is that it makes you vulnerable to everyone’s judgment and ridicule. People make all kinds of assumptions about the community, when they know nothing about them. Like always, fear rules over close-minded people. In the end, it’s the internalized shame and guilt that makes it harder for sex doll owners to engage in relationships with people. That’s what we need to change.
https://medium.com/sexography/my-husband-will-never-know-i-used-to-own-a-sex-doll-6d1a75da0d87
['Jessica Wildfire']
2020-12-22 17:04:37.686000+00:00
['Relationships', 'Society', 'Sexuality', 'Love', 'Sex']
Don’t Cheapen the Ink
I try to tell it this isn’t how poetry is supposed to be it questions my logic even as I try to coerce it to some happier theme Why, I whisper, why the dark material? because it is truth written in midnight why are you wanting me to be less? don’t add water to my ink Truth written in midnight rich ink and witching hour reflections isn’t my ink good enough? my poetry asks of me Insomnia won’t stop whispering it questions my logic I find myself conversing with my poetry I try to tell it what to do but that isn’t how poetry works, that isn’t a part of its genetic code and really, would we want it to be?
https://medium.com/scribblerpress/dont-cheapen-the-ink-2bd01cca5f85
['Gregory D. Welch']
2020-05-07 20:15:24.711000+00:00
['Poem', 'Life', 'Self', 'Poetry', 'Creativity']
Why Should Motherhood Be a Choice, Not a Compulsion
It’s been almost 2 years since I got married, and not one family get-together/function has gone by where someone has not asked me, “When is the good news?” In the beginning, I used to just ignore them (family/relatives/friends) or tell them that I was not ready. But later on, it started to get really frustrating. I used to think, “Don’t they have anything else to talk about?” or “What gave them the right to ask about my personal stuff?” And unfortunately, because I live in India where it is customary to respect elders, I could not even talk against them. After some time, I also started noticing that most of these questions were asked only to me and not to my husband. Why? Isn’t he going to be the father of the child? Is it not a mutual decision between couples? I was taken aside very casually, I must say, by my relatives to just be asked when I was planning to become a mother. Ugh… Everyone just starts commenting as if it’s their business. From your neighbors to colleagues to friends and family. Everyone. When I am not worried about it myself, why are you so concerned about me? In the society where I live, there is a designated age for everything a woman (and a man) has to do, and you have to adhere to their norms. Finish your graduation at 22, get married at 24–25, have kids immediately or one year later. If you do talk about not being ready to have kids, you are called a selfish woman or given advice on why motherhood is the best thing a woman can experience. What defines womanhood anyway? Have you noticed it? Everyone just talks about how wonderful parenthood is. It is all flowers and rainbows, apparently. It is the next step of life. No one ever tells you why you should not have a baby. No one advises you about the difficulties of it. No one shares their own difficulties, of being a mother, to couples who are planning to have one. Why? Because all these difficulties are normalized. Being a mother is normalized. “Everyone faces this. How are you any different? Give it time, things will change, and you will get used to it” they say. At a random guess, probably about 90% of the mothers today never thought whether they really wanted to be mothers. Society and patriarchy have never given them any other choice or opinions on the matter. It has become a norm that a woman should become a mother, just because she can give birth to children. Why? Why didn’t anyone question it before? Why didn’t anyone just stop for a moment and think whether motherhood is really their cup of tea? Do we not minimize the importance of a woman’s career by this? Don’t we just assume that all mothers can conceive and not even consider whether they want to? Are we not reinforcing the stereotypes by asking the woman and not the man? Some of the mind-boggling, forward-thinking comments I have received in the past couple of years “Because of the pollution nowadays, and chemicals everywhere, including in food, a female does not have the strength to give birth to the baby later on. So the best time to do it is now.” Aunty, from now on, I will make sure to file my monthly health reports to send it to you. Since you asked for it so kindly. When I told them that I was not ready, they looked at me in a really weird way and said, “No one is ready to become a mother. Once you see the bundle of happiness in your hand, things will change automatically.” Really? Is that why you are still cribbing about your child to every single person you meet? “Isn’t the fundamental goal of marriage to have children and reproduce? Don’t you want to become a mother?” First things first, I got married to my husband because I love him. As simple as that. Do I really have to produce kids because I produce eggs too? Is it like the buy 1 get 1 offer that comes in the market? For women, is it if you produce eggs, you must have a kid? “You are a working mother. No mother can go to work without a support system. If you delay the process, your parents will not be able to support you in raising your children” My parents themselves don’t have a problem with that. I don’t get what your problem is ma’am. “If you delay having kids now, you would look really old on their wedding day” So now in the fear of my unborn children’s marriage, I should have one soon because I don’t want to look like a granny at their wedding? The Changing norms in Society I recently read an article in Times of India, about couples deciding not to have a child and stay ‘child-free’. Things are changing for sure. The couples are now standing up for themselves and against the society’s norms to not have a child. (This was so inspirational to me!) Why parenthood, might not be the right choice for everyone: Parenting is not a short term game. Once you become a parent, you have to take up that responsibility for a lifetime. Couples might not want to take that kind of responsibility. A child also requires good financial stability. Education, daycare, everything is expensive nowadays. The couple might want to spend their income on something else and not tie it down to their kids. Our society, unfortunately, has put most of the responsibilities of child care on women. You would not see many houses where the responsibility is equally taken by both the partners. Things are changing for sure, but it still has a long way to go. Women are becoming career-oriented. It is no secret that a woman’s career gets impacted when she gives birth. From her promotions to opportunities, everything gets impacted. She falls so much behind a man of the same age, and naturally, the responsibility to take care of the child falls on her. With the rising use in technology (too much exposure), unsafe environments, rising pollution levels, etc. couples decide not to raise a child since they would be in a constant state of stress. This might be very hard to believe. Some women might just take a decision to not have a baby. It is their CHOICE and they do not have to explain it to anyone. Yes. This happens too. Summary I am not against motherhood. Really, I am not. I have a problem with the unfair stereotypes and patriarchy norms put by society on a woman. It is her body, her life, her decision. Just let her be. If she wants to give birth today, let her. If she wants to have a child some years later, let her. And if she does not want to have a child at all, it should be her decision. It is really high time, that a woman gets a say in her needs and wants, in her opinions and choices isn’t it? Without getting judged by you as a society obviously. Let her spread her wings without your constant pressure and society would be a much better place for both men and women to live in.
https://medium.com/indian-thoughts/why-should-motherhood-be-a-choice-not-a-compulsion-1220d901192e
['Shruthi Sundaram']
2020-10-22 21:04:18.086000+00:00
['Society', 'Motherhood', 'Women', 'Feminism', 'Life']
Learning D3 — Books, Code Editor, and Other Resources to Help You Learn
Do you need to learn D3? “D3 was created to fill a pressing need for web-accessible, sophisticated at visualization.¹” Before you start, you should know if it’s necessary for you to learn D3. It’s a tool that serves a need, do you actually have the need? For most visualization needs, you don’t need to learn D3. There are so many other libraries and tools that are way easier to master and use, e.g. Excel, Powerpoint, Google Data Studio, Plotly, and Tableau, etc. D3 was created so people can create rich visualizations with a high level of interactivity that can be accessed like web content with flexibility. Well..that’s a tongue twister. Basically, you should learn D3 if: you want to create web-accessible interactive visualizations, for example, visual essays. you want to have control over the whole visualization process vs. relying on another platform. you’ve encounter visualization needs that existing platforms cannot resolve with ease, for example, Tableau requires a lot of manipulation to build visualizations like tree charts and sankey charts — so I decided to resort to learning D3 vs. learning Tableau tricks that only work for that platform. Otherwise, your precious time should be spent elsewhere — maybe read some books? Books Instead of Udemy courses, I found a book to follow along this time, and I cannot recommend it enough. It’s Elijah Meeks’s book — D3 in Action*. *You should get the 2nd edition for updated code. I also recommend you getting the Manning live version so you can copy code easily. Unlike most Udemy courses that try to feed you everything D3 has to offer, which can be extremely overwhelming and set you up for failure, Meeks’s book focuses on the core of D3 for visualization needs. He goes right into how to build shapes, charts, layouts, and visualizations — so you don’t get stuck at the boring syntax. Because D3 uses javascript syntax, if you’ve never learned the language before, I do recommend you quickly go through the documentation of Javascript before you dive into Meeks’ book. Code Editor You can use any editor you like. I love using Visual Studio Code, it’s free and comes with many handy plugins — one of which is Live Server (also mentioned in this post). Live Server allows you to run scripts on your local server and see code changes live — a great time-saver especially when you are learning D3. Live Server Other Resources to Bookmark The best way to learn is from copying others' work. Steal like an artist! D3 gallery: http://christopheviau.com/d3list/gallery.html D3 gallery: https://www.d3-graph-gallery.com/index.html Visual essays using D3: https://pudding.cool/ D3 Tutorial+Gallery: https://www.d3indepth.com/introduction/ Creator of D3: https://observablehq.com/@mbostock References: [1]: Elijah Meeks. D3.js in Action, Second Edition
https://chiandhuang.medium.com/learning-d3-books-ide-and-other-resources-to-help-you-learn-efea5910a779
[]
2020-12-14 20:41:01.362000+00:00
['D3js', 'Visual Design', 'Data Visualization', 'Visualization']
5 Steps Towards Compelling Storytelling With Data
5 Steps Towards Compelling Storytelling With Data No, Great Analysis and Snappy Graphs Are Not The Whole Story Muturi Njeri Photo: Unsplash Last month I listened to a Freakonomics Radio podcast — featuring David Coleman, the President of the College Board — which convinced me that our education system pulled off a fast one on us. Growing up, most of us proudly declared ourselves either Maths (Science-y) nerds or Humanities (Arts-y) nerds. If you were one, there was no way to be the other. You either turned a phrase or you solved an equation. In the old SAT, the college entrance exam ran by the College Board, you either excelled in the Verbal section with its convoluted passages and inscrutable vocabulary, or you cracked the code in the Maths section. When I did the SAT, I struggled with the Maths section, but I took comfort in my identity as a “Verbal” student. Yet a decade later, here was the President of the College Board saying, “You can no longer be perfectly verbal without being able to read and analyze data from charts, tables, and graphs…[it] was so silly that people call themselves highly verbal and wide readers, when in fact they’re illiterate when they reach science or the social sciences if they can’t evaluate numbers.” He was referring to the new SAT which integrates Maths and the Humanities skills across all sections. Cole Nussbaumer Knaflic, a former Googler and author of Storytelling with Data, would appreciate this development. In the introduction to her book, she bemoans how schools, separately, teach us how to “make sense of numbers” in Maths classes then, in language classes, teach us how to “put words together into sentences and stories”. Rarely are those skills taught together; in other words, “no one teaches us how to tell stories with numbers.” As (big) data proliferates and scholars and businesses scramble to make sense of (and value from) the data, we can no longer afford to treat stories and numbers as polar opposites. We must learn how to tell great stories with numbers. The fact that we’re living in the age of big data needs no rehashing. 90% of the world’s data has been generated in the past two to three years. With this data influx comes an implicit promise to make better sense of our lives. For businesses around the world, the influx promises better understanding — and better value generation from — their markets, stakeholders, products and processes. However, for us to understand and communicate the insights the data generates, the insights must be coupled with another tool that has helped us make sense out of our realities for millenia: storytelling. Evolutionary scholars and neuroscientists agree that were it not for stories, as a species, we would not have survived our hunting-and-gathering days in the jungles. Stories are how our ancestors learnt what was harmful or safe, what was right or wrong. As a result, our brains are literally wired for stories. A good story causes our brains to release dopamine, the “feel-good hormone” that affects, among other things, our heart rates, memory and motivation. Our love for stories cuts across time and space: from ancient Greece to 21st century China; from the parables of Jesus in Jerusalem two millennia ago to TED Talk stages today. In African contexts, stories like those of Anansi, the trickster spider, or of Shaka, the King of the Zulu, have captured our imagination for centuries. In our age of data, insights and ideas, stories will humanize the numbers — allowing us to experience them, not as abstract, discrete and dry figures like machines would, but as specific, inter-connected and concrete shapers of our individual and collective experiences. Stories will connect us to the data, allowing us to not just understand it, but also relate to it and, consequently, take action. But won’t slick data visualisation do the trick? A small yes and a massive no. Doug Rose, the author of Data Science: Create Teams That Ask the Right Questions and Deliver Real Value tells the story of a coworker who went on a trip to Mexico. The coworker made a 15-minute film about his trip and showed it to his peers. Rose talks about how the coworker had spectacular footage of the landscape and eye-catching graphics that could rival a blockbuster. But the video lacked the core component of every blockbuster: a narrative to weave the yarn together. Even after being wowed by the graphics, Rose could barely remember anything from the video just minutes after he had watched it. The coworker had lost an opportunity to tell the story of his own experiences in Mexico and what the trip had meant to him. We have all had similar experiences where someone presented to us immaculate charts and figures but never helped us make sense of them. Ostensibly, the charts and numbers were meant to “speak for themselves.” While metrics and visuals can be great tools to understand our businesses, often, they’re not compelling communicators by themselves. However, combined with stories of what they tell us about where the organization has been, where it is, and where it is going — these tools possess the power to enthral and inspire us to act. So, how do we move from decent visuals or interesting anecdotes to compelling narratives? Here’s a guide to get you started. (Note: the steps don’t always follow each other in this order; in fact, in most cases, you end up doing more than one step at a time.) *** 1. Find the core of your story You cannot tell a compelling story if you do not thoroughly understand its heart. As such, the first step towards compelling data storytelling is to find the crux of the story from your data. To do this, you (and your team) need to go through the knowledge discovery process: ask interesting questions, gather and clean data from a variety of sources to respond to the questions, analyse the data, and interpret the nuggets of insights from it. Often, this process surprises you as the data offers you unexpected findings — hence the need to keep an open mind. For compelling storytelling, you need to go beyond identifying interesting patterns in the data, to connecting those patterns to significant themes that matter to people within — and outside — your organization. At McKinsey, they call this asking the “So What?” question. Ask yourself: what does this mean for our organization’s future? What might we, therefore, do differently? What does this imply for our product strategy? How does this affect our organization’s relationships with our clients? Why does it matter? The responses to these questions are the bedrock of your story. 2. Craft a vision to move your audience Secondly, you must understand who you’re telling your story to and how you adapt it for them. Your subject might stay constant but the way you tell your story, or the details you emphasize, is bound to change with the audience. For instance, if you’re addressing a panel of potential investors you might emphasize your product’s return on investment while speaking to clients you might emphasize how the product saves them time and money. Ask yourself: who is my audience? What’s my relationship with them? How can I best connect with them? What questions might they have? How will I address these in my story? What do they already know? How can I connect what they already know with the new information I’ll be giving them? Remember, when you tell a data story, this is not just another opportunity to impress. Instead, it’s an opportunity to move your audience: to move them to understand your subject better, to move them to change their perspective, to move them to act — to fund you, to buy your product, to approve a new hire, to vote for you, to join your team. To move people, you need a powerful vision in your story. What are you asking your audience to sign up for and how does it change their world for the better? As a leader, your job as a storyteller, is to vividly and tantalizingly describe this vision to your audience. 3. Create an intriguing and meaningful narrative The narrative is the irreplaceable axis of the story, without it — like in Doug Rose’s teammate’s film above — the whole affair falls flat. Narrative is what ties the threads (the characters, the events, the visuals, the significance) together. By connecting your data insights to a narrative or a journey that your characters or your audience members take, your story, while specific, represents universal, timeless and meaningful values — like duty, love, identity, family, faith, community — that grip and move your audience. Crucially, for a compelling narrative, you must sequence the events in your story such that they flow fluidly from one to the next, from the start to the end. You can use the same structure that scriptwriters use to keep us glued to our screens: Beginning : where you set up the context (the characters, the time, the place) and hook the audience into the story. In The Lion King, for instance, this would be where we learn about Pride Rock and how Mufasa is the King of all animals — and Simba is his heir. In an episode of Hasan Minhaj’s Patriot Act, a Netflix show that excels at using data storytelling and humor to cover topical issues, at the beginning, Hasan will introduce his topic, key characters, as well as why he chose to talk about the topic. : where you set up the context (the characters, the time, the place) and hook the audience into the story. In The Lion King, for instance, this would be where we learn about Pride Rock and how Mufasa is the King of all animals — and Simba is his heir. In an episode of Hasan Minhaj’s Patriot Act, a Netflix show that excels at using data storytelling and humor to cover topical issues, at the beginning, Hasan will introduce his topic, key characters, as well as why he chose to talk about the topic. Middle : where you introduce a conflict in your narrative — as well as why it matters. This is where you have most of the action related to the problem taking place. You can talk about how you’re solving the problem, the challenges there-in and how you’re confronting them. The conflict breeds intrigue that keeps the audience wanting to know what happens next. In The Lion King, conflict is stoked by Scar’s desire to disinherit Simba — and the subsequent murder of Mufasa and exiling of Simba. In Patriot Act, Hasan will introduce the key issues in the topic (bringing in the data and other forms of evidence to back up his arguments), the key barriers to progress on the issues and what is being done about them. : where you introduce a conflict in your narrative — as well as why it matters. This is where you have most of the action related to the problem taking place. You can talk about how you’re solving the problem, the challenges there-in and how you’re confronting them. The conflict breeds intrigue that keeps the audience wanting to know what happens next. In The Lion King, conflict is stoked by Scar’s desire to disinherit Simba — and the subsequent murder of Mufasa and exiling of Simba. In Patriot Act, Hasan will introduce the key issues in the topic (bringing in the data and other forms of evidence to back up his arguments), the key barriers to progress on the issues and what is being done about them. Ending: where you resolve the conflicts, emphasize key points and/or call for action. In The Lion King, Simba returns to Pride Rock to reclaim the throne. In a Patriot Act episode, Hasan will wrap up with a summary of his key points and suggestions of actions the viewer can take to fix the issue. 4. Choose the right visuals to emphasize your core message Cliché as it sounds, a good image is worth a thousand words (or even more). The right visual is not just the technically accurate or aesthetically pleasing one, but also the one that directly emphasizes your core message and vision (steps 1 & 2). You may use a technically accurate visual, but if it’s cluttered with unnecessary information, you risk distracting your audience. You may have a beautiful animation, but if it doesn’t hammer your point home, it is not good enough. Knaflic’s book, Storytelling with Data, offers principles and practical advice on how to design and choose the right visuals to tell data stories. Two major principles from Knaflic’s work: 1) your visual needs to strategically focus the audience’s attention to the message you want them to take away using a designer’s tools like color contrast and relative text size; 2) clutter is your enemy! Eliminate every unnecessary element from the page (and story!). Here is an example from Knaflic’s book: comparing a visual that simply presents data (Figure A) to one that tells a story using the same data (Figure B). Note how Figure B employs the two principles above. Image source: Knaflic, Cole Nussbaumer. Storytelling with data: A data visualization guide for business professionals. John Wiley & Sons, 2015. 5. Use storytelling tools to make it engaging Finally, to tell a compelling story, you need to tell it in an engaging style. There are a number of storytelling tools that you can employ to do so. The goal here is not to be extravagant, or even poetic, with language but rather to use language that appeals to the audience’s senses — thus connecting the abstractness of data and ideas to the concreteness of daily life. Examples, anecdotes, scenarios and metaphors are some of the tools that can allow you to do this. Anecdotes are brief and personal accounts that relate to the topic which enable you to connect the ideas in your story to your own experiences. For example, the Freakonomics anecdote I started this article with. Scenarios (e.g. suppose a hacker took control of an in-house server containing your company’s most important data and demanded a ransom) challenge your audience to consider something by placing them in a hypothetical high risk situation. Metaphors allow you to compare something new to something common to your audience’s experiences. A powerful metaphor can have the same — if not greater — impact as a great visual. For instance, imagine the impact that the metaphor “big data is the new oil” has had. It certainly has a better ring to it than “big data is a very valuable resource that is likely to significantly re-shape the global economy”. It captures the audience’s imagination and stays there longer. *** As a writer, I have spent the past decade honing my storytelling skills. In the past year, however, I have had to stretch myself harder to learn how to augment my storytelling with data. I came into my current role, as a learning design consultant for the Data Science Xcelerator (DSXL) program, from a Humanities background that emphasized qualitative skills. However, through rigorous research as we’ve developed the DSXL program, I have built up my quantitative muscle. Moreover, as our design team is diverse, with my peers better-versed in quantitative skills, we complement each other. Collectively, we can tell better stories in which language and data strengthen each other, in which metaphors and graphs sit side-by-side. This philosophy of complementarity is central to the DSXL program. We have built a program that believes in the interdependence of technical data science teams and business teams in times that demand tearing down the walls between them to create organizational value — a rare program that, in Knaflic’s words, teaches its participants to tell stories with numbers. For more information about the Data Science Xcelerator program, please click here. We’d love to work with you to develop ‘storytelling with data’ skills for you and your team. About the author: Muturi Njeri is a Data Science Design Consultant at Xcelerator. He is passionate about education, creative arts and African development. He loves to read and write on education, development, social justice, technology and the arts. You can read more thought pieces from him on his blog or follow him on LinkedIn.
https://medium.com/xcelerator-alg/5-steps-towards-compelling-storytelling-with-data-a0b60dcf2184
[]
2020-01-09 07:14:02.076000+00:00
['Data Visualization', 'Storytelling', 'Data Science', 'Analytics', 'Xcelerator']
Trans People Are Not Up For Debate
The lives and rights of LGBTQ+ people have always been hotly debated and politicized. Every step toward equality and fairness has been met with vitriol and opposition. And while gay and queer acceptance has grown substantially within the past decade or so, transgender and nonbinary people are still regularly openly mocked and vilified. While hostility toward trans people is unfortunately nothing new, 2020 has seen an alarming wave of anti-trans bigotry. Pundits, celebrities, and lawmakers have all entered the chat on the so-called “trans debate” and what they have to say is nothing short of dangerous. J.K. Rowling has been one of the biggest culprits of anti-trans rhetoric this year. Over the summer, the Harry Potter author went on a transphobic tweet storm all because a Devex article used the language “people who menstruate” to refer to, well, people who menstruate. In the thread, she misspelled the word “woman” several times and completely missed the point of the article in question, which is that not everyone who has a period is a woman. Furthermore, women are people, so the phrase “people who menstruate” is actually as accurate as it gets. Rowling also falsely claimed that cis women are being erased and insisted that activists are suddenly claiming that sex isn’t real, despite the fact that no one has said this. Since then, her transphobia has only escalated. From denouncing hormone replacement therapy to coming out against the very existence of gender clinics, Rowling has essentially gone full TERF (trans-exclusionary radical feminist). Most recently, she told Good Housekeeping that she wants to end the “climate of fear” around the “trans debate,” but a climate of fear for whom? For the people whose very lives and existence she and others have so casually positioned as a debate? Rowling, however, is not the only person framing her transphobia as a matter of opinion. Abigail Shrier is yet another culprit. In her book Irreversible Damage: The Transgender Craze Seducing Our Daughters, Shrier falsely claims that coming out as trans is some kind of a youthful trend or fad. Disregarding the notion that trans people feel more comfortable coming out nowadays due to a small, albeit notable, increase in overall acceptance of trans people and LGBTQ+ people as a whole, Shrier insists that coming out is a “social contagion,” citing the completely fake and bogus medical diagnosis of Rapid Onset Gender Dysphoria (ROGD) as “proof.” Again, this is not a real medical diagnosis. It’s a talking point. In an interview with Joe Rogan in July, she falsely claimed that there is a trans agenda to force kids to come out as trans and socially and medically transition. She also compared trans teenagers to “the same population that gets involved in cutting, demonic possession, witchcraft, anorexia, [and] bulimia.” In both the book and the interview, Shrier regularly misgenders trans men and boys and dismisses the concept of gender identity altogether, all the while insisting that she is not transphobic and is simply doing this for the sake of the children. Whatever that means. Unfortunately, Shrier is not alone is her hateful sentiments. Just last week, Fox News opinion host Tucker Carlson called the existence of trans kids a “nationwide epidemic” and referred to parents allowing their children to live as their authentic selves as “grotesque.” Carlson also brought up the fact that Shrier’s book got banned from Target in November for peddling harmful rhetoric. Too busy decrying cancel culture, however, he failed to mention the fact that Target reversed the decision less than 24 hours later. As if all this wasn’t enough, outgoing US Rep. Tulsi Gabbard (HI) introduced a bill on Thursday that would prevent schools from receiving federal funding if they allow trans people to play on sports teams that match their gender identity. While there is a much more nuanced conversation to be had, blanket bills like this do not help or “protect” anyone, especially when the motive behind them is to shun and exclude trans people. And let’s be honest. That’s the motive of everyone mentioned so far. There is no “trans debate” because it’s not a debate. It’s an outright attack. Just like gay and queer people were, and often still are, questioned and attacked over our rights and very existence, so, too, are trans and nonbinary people being attacked, except it’s not about marriage or adoption, it’s about bodily autonomy. It’s about bathrooms, and sports, and whether or not identity is a trend. We, as a society, put the existence of trans people up for debate, and act like it’s all a matter of opinion, as if what we say and do doesn’t directly impact trans people, who have to suffer the consequences of our discourse. Framing transphobia as a debate doesn’t lessen the blow. It’s just dishonest. Those who engage in this transphobic nonsense are not doing so in good faith. Their end game is to prevent trans kids from coming out and to ensure that trans people don’t have access to the same basic human rights as cis people. Trans people already face higher rates of violence and murder, so much so that 2020 has been the deadliest year on record for trans and gender non-conforming people in the US and around the world. While these policies and rhetoric do not specifically cause violence, they do help embolden people who already hold in hate in their hearts. Simply put, trans people’s lives should not be up for “debate.” Trans rights are human rights and all humans deserve to be treated with basic dignity and respect.
https://medium.com/an-injustice/trans-people-are-not-up-for-debate-8b48305288a9
['Catherine Caruso']
2020-12-14 20:17:26.034000+00:00
['LGBTQ', 'Society', 'Culture', 'Politics', 'Equality']
Why Recommendation Engines Rule our Choices
MIT IDE: Does the upcoming book represent a new research direction for you? Michael D. Schrage: It actually represents an unexpected convergence. I believe recommendation engines are the biggest and boldest way digital experiments, network effects, and personal identities will all converge. Recommendation engines have already radically transformed our relationship with choice: Just consider TikTok, Amazon, Netflix, YouTube, Spotify, or Instagram. Few things are more important than our ability to make good and informed choices, and too few people understand or appreciate how pervasive and persuasive recommendation engines have become. How could I not be interested in a ubiquitous technology that literally changes what we want? IDE: What is the essential theme? MDS: Recommendation Engines is the book’s title, but this book is really about the past, present, and future of advice. If we really are the choices we make, the advice we take — and the advice we ignore — becomes astonishingly important in defining who we are and what we become. Increasingly, the things we buy, the people we meet, the places we (used to) go, our jobs, entertainment, investments, books, music, and work are shaped by recommendation engines: data-driven advice from ever-smarter machines that learn from you and about you. In nearly every dimension of life — relationships, health care, pop culture — machines demonstrably can offer better advice than our best friends. I’ll go even further and say that machines can give you advice and counsel to make your best friends even better. I find this new capability fascinating. IDE: What are the key takeaways for readers? MDS: The book offers a swift and sure way to get up-to-speed on a technique, platform, and technology that is going to matter more each day for consumers, workers, and coders. It’s important to understand the underlying dynamics that influence and inform our world. The more we learn about the tools and technologies that shape our choices, the better off we will be. That said, this isn’t just a techie textbook; it’s a book that literally spans the human history of advice — from divination, to astrology; the Oracle of Delphi, to Machiavelli, to Samuel Smiles and Dale Carnegie! I want to convey that recommendation engines are the next logical and inspirational step in the history of how humans try to create options for their future. I hope readers will be surprised by the simplicity of incredibly complex and complicated algorithms and the enormous volumes of data processed to personalize people’s choices. Most people don’t understand or appreciate how ensembles of relatively simple algorithms can generate remarkably relevant and appealing recommendations in almost any domain. IDE: What is your view of the ubiquity of recommendation engines and hyper-personalization? Is there a down side? MDS: There are several questions we can ask in this regard: For instance, are ubiquity and pervasiveness bugs or features? Do individuals want multiple choices or one choice? Will people feel creeped-out by data-driven digital intimacy that feels invasive, or will they be thrilled by a technology that makes them feel good about what’s available for them? It became clear to me that organizations that sought to use recommendation engines primarily as sales tools had completely different UXs than those wanting to build trusting and trusted lifetime value customer relationships. IDE: Do you anticipate a consumer saturation point when we’ll wake up [hopefully, post-pandemic] and find we really don’t need 20,000 Prime movies and videos, or twenty million songs on Spotify? Could there be a backlash? MDS: Let’s not confuse quality and quantity of choice or search engines with recommendation engines. I may want to find the right musical choice not just for me, but for my family or my Friday Office Zoom call. Recommendation engines are the microscopes, telescopes, oscilloscopes, and MRIs of choice. They give us ways to slice, dice, and evaluate the features and elements that matter most to us in particular contexts. It’s true that people may be afraid of technology that knows more about what they like and want than they do, but that’s the future! IDE: What was your biggest surprise writing this book? MDS: The history of efforts to merge, marry, and fuse data into practical and actionable advice, is nothing short of awesome. Frankly, I was blown away by the very human yearning throughout history and across cultures to get great advice…whether from the gods, the odds, the stars, or iPhones. I also didn’t think that machine learning would so swiftly and overwhelmingly transform recommendation engines worldwide. Something I thought would likely take a decade, happened in barely two or three years. I was surprised by how quickly recommenders got super-smart about their users. IDE: What’s the most important change you see on the horizon for recommendation engines in the next two years? MDS: My answer today is not the answer I would have given when this book began. The most important worldwide change I expect is regulation. By the time governments from Asia, Europe, and the Americas are through with them, recommendation engines will be more regulated than internal combustion engines.
https://medium.com/mit-initiative-on-the-digital-economy/why-recommendation-engines-rule-our-choices-d5a52ccc6e81
['Mit Ide']
2020-09-08 14:30:01.248000+00:00
['Machine Learning', 'Analytics', 'Choices', 'Recommendation System', 'AI']
State Machine, From a Diagram to Code
In this article, I will be showing you four simple steps you can use, to convert a state machine diagram into working code. These steps will make writing state machines so easy, that you will want to have all your stories described in state machine diagrams. Photo by Yogesh Pedamkar on Unsplash Before we get into the solution, let's understand what a state machine is. A state machine is a system that takes in events and produces new states given the accumulated events that it has received. This diagram is a very common state machine that we find in most applications. It describes fours states the system can be in; “Not started”, “Loading”, “Error”, “Succes”, and fours event that the system can receive “Fetch”, “Refresh”, “Error”, “Success”. Let’s start going through the four steps to convert this into working code. Step 1: Create your event enum. For the first step, all we need to do is create an enum and list all the events as cases . If you look at the diagram, the events are the arrows. As you can see, each arrow has a name. These names will be cases in our enum. The example diagram has 4 different event kinds arrow, “Fetch”, “Refresh”, “Error”, “Success”. Let’s put then in an enum . Step 2: Create your state enum. The state enum is as easy to create as the event enum . All you need to do it list the states and create an enum with a case for each of the listed state . States are represented as the bubbles in a diagram, we have four states, "Not Started", "Loading", "Error", "Success". Let's create our enum . Step 3: Write your reducer. A "reducer" is just a fancy word for a function that takes in a state (current state), an event and returns a state (new state). With this information, we can already declare the function signature. func reducer(currentState: State, event: Event) -> State { ... } Before we write the implementation, let's look at the diagram again. Specifically how the arrows are drawn, where they originate from, and where they point to. This will guide us when we are implementing the reducer. Let's look at the "Success" arrow. The "Success" arrow originates from the state "Loading" and points to the state "Success". In code terms, we can say, if the current state is "Loading" and we receive a "Success" event, then update the current state to "Success". Let's write this in code. if currentState == .loading && event == .success { newState = .success } Let's look at our next arrow, "Fetch". "Fetch" originates from state "Not Started" and point to state "Loading". Let's write the if statement for the “Fetch” arrow. if currentState == .notStarted && event == .fetch { newState = .loading } If we do this for each of the arrows we would end up with the five if statements below (the numbers of arrows there are in the diagram). if currentState == .loading && event == .success { newState = .success } if currentState == .notStarted && event == .fetch { newState = .loading } if currentState == .loading && event == .error { newState = .error } if currentState == .error && event == .refresh { newState = .loading } if currentState == .success && event == .refresh { newState = .loading } I think it’s safe to say that anyone with little coding experience can see here that the last fours if statements can be made into else if . However, for languages that support switches with multiple parameters, using a switch would be an even better solution. Since Swift supports this, and Swift is the language I know the best, I will be converting these if statements into a switch and adding it to the reducer function which we defined the signature for earlier. You might have noticed, that we had added default in our switch. The switch will only hit the default when there is a case that is not defined by the diagram. Some of these cases might not even exist, an example would if an error event occur when we are in state notStarted . This can never happen, because how can we get an error if nothing has happened yet? In these cases we just return the current state passed in, meaning no change to the state . Step 4: Put it all together At this point, we have everything we need to start using our code. Your reducer works and will give you the correct results. The logic is written and the code is valid. But let's put it all into a nice class/struct. In our struct, we have our two enums Event and State as sub-types. We have our reducer function as a static private method (the reducer can also just be passed in), we have an update function that takes in an Event , and we have a currentState variable with a private set , so only the struct can change it. Once you instantiate this state machine, there is only one way to interface with it, and that is by calling the update functions. Other then that, you can only read the currentState . Let’s write the unit test to see how it works. It works! That's it, your state machine is done. Pro tip: Passing values with your events. In most cases both your events and states will have values. For example, the error event will most likely have an “error message” and your error state most likely also have a userMessage (the message you will show to your user). To add these values to our states and events , all we need to do is add associated values for our cases. Here is how that would look if we were to add all the values for our Event and State enums. Although the values are not indicated in our example diagram, you can include them by writing “Error: String” as the label for the arrow, and “Error: String” as the label for the state . Closing remarks: Anyone can draw a state machine. Developers sometimes shy away from writing state machines. The term sounds like a fancy/complicated system. But in reality, it’s very simple. The biggest benefit to following these steps in my opinion is that anyone can write a state diagram, a designer, a product owner, or a client, and with these steps you are going to be able to code exactly what they want. State machine diagrams are a very precise way to describe how you want your system to behave. If you can get your requirements in the form of a state diagram, it will become very easy to write correct, testable, and scalable code. Thank you for reading If you liked this article please follow me and show your support with a clap. Get in touch:
https://medium.com/swlh/state-machine-from-a-diagram-to-code-2a4a2d8e0bb6
['Terrick Mansur']
2020-12-03 16:00:44.335000+00:00
['Functional Programming', 'Software Development', 'iOS', 'Development', 'iOS App Development']
Creating Clean Responsive Apps with React and Styled-System
Creating Clean Responsive Apps with React and Styled-System A simple tutorial of building a responsive React app using Styled-System based on the Design System. Styled System Example Repo You can view the final working example at: Component design systems let a team collaborate and provide users a consistent visual and functional UI across different applications. Consistency has four types, visual consistency, functional consistency, internal consistency and external consistency at the UX design principle and I focus on visual consistency in this article. Front-end Development Issue Front-end development issues have been around for a while, it’s like: Inconsistent style A lot of duplicated UI components A lot of unnecessary time to design and develop These happen because each designer has their own style and tone. Each developer creates their own components without noticing it has been developed already. To solve it, keeping components consistent is the most important even if multiple designers and developers involved in the same project. Designers need to know how to design and to share it with others. Developers need to make reusable components across every part of the project based on a style guide. Most importantly, on the user’s side, a successful component system provides less confusion, better navigation of the product and better overall satisfaction. Users will learn faster how to use your product. Design System Design System A design system basically includes a collection of the assets and components, like a library of design patterns, rules and UX guidelines to build a product and also provides an evolving map of a brand’s territories with direction to create a new product. It should be centralized and always evolving to keep consistent. On the developer’s side, to achieve true collaboration with a design system, bridging the gap between design and development through components on the codebase is the key. Styled System Styled-System is one of the options to achieve collaboration. It’s designed with a set of utilities that map props to a design system and also has a bunch of API with functions for CSS. It works with CSS-in-JS libraries such as styled-component, emotion and even supports Vue.js. Let’s take a look at how it works. Install styled-system and styled-component : $ yarn add styled-system styled-components And add some styled-components in your App.js : import React from "react" import { space, width, fontSize, color } from 'styled-system'; import styled, { ThemeProvider } from 'styled-components'; import theme from './theme'; const App = () => { return ( <ThemeProvider theme={theme}> <Box> This is a Box </Box> </ThemeProvider> ) } const Box = styled.div` ${space} ${width} ${fontSize} ${color} `; export default App ThemeProvider is a built-in provider in styled-components which has full theming support. This component provides a theme to all React components underneath itself through the context API. By using this, styled-system extends the feature as more reusable components. ${space} , ${width} , ${fontSize} and ${color} are the functions to provide a certain style. Let’s add some style: const App = () => { return ( <ThemeProvider theme={theme}> <Box bg="orange" fontSize={24} width={200} p={20} m="50px auto"> This is a Box </Box> </ThemeProvider> ) } You’ll get a box like this: This is a Box As you can see, some props are passed to Box and styles are applied. This is how styled-system works. You don’t need to write a CSS inside the styled-component’s template literal. (If you want to know the magic of styled-components do in a template literal, check out here) Other than the above example, there are a bunch of API. Now that you know how to use it. Next thing you can apply your design system to the components by defining theme . Let’s edit theme.js : const theme = { space: [0, 4, 8, 16, 32, 64, 128, 256, 512], fontSizes: [12, 14, 16, 20, 24, 36, 48, 80, 96], fontWeights: [100, 200, 300, 400, 500, 600, 700, 800, 900], width: [16, 32, 64, 128, 256], heights: [16, 32, 64, 128, 256], colors: { black: '#000', gray: ' #777', 'dark-gray': '#333', 'light-gray': '#eee', }, // .... and other styles } export default theme This is supposed to be your own design system but for now, we defined it like above. fontSizes has 12, 14, 16, 20... sizes and let’s suppose apply font-size: 12px to the Box component: <Box bg="orange" fontSize={0} width={200} p={20} m="50px auto"> This is a Box </Box> 0 is passed not 12 , which means that you need to pass the index number of fontSizes array. In this case 0 means 12 and 1 means 14 and so on. But you can make it more declarative in theme.js like this: const theme = { space: [0, 4, 8, 16, 32, 64, 128, 256, 512], fontSizes: { small: 14, medium: 16, large: 18 }, ... } export default theme And edit it App.js : <Box bg="orange" fontSize="small" width={200} p={20} m="50px auto"> This is a Box </Box> The way to style component is reasonable and maintainable because as a developer you don’t actually need to think about what size should be applied in the box, just follow the style guideline and pass small to it. Responsive Design with Styled System Next, I want to demonstrate how to make components responsive. In responsive design, you basically use Media Queries in CSS. Styled-system provides its own responsive system, which offers a convenient shorthand syntax for adding a responsive style with a mobile-first approach and also alternatively provides you with breakpoints to define your own responsive value. Let’s add it in theme.js : const theme = { ... breakpoints: { xs: '0', sm: '600px', md: '960px', lg: '1280px', xl: '1920px', }, } I follow the Material Design breakpoints value. These values should work like this: |0px 600px 960px 1280px 1920px |xs sm md lg xl |--------|--------|--------|--------|--------> | xs | sm | md | lg | xl Let’s make Box responsive: const App = () => { return ( <ThemeProvider theme={theme}> <Box bg={{xs: 'orange', sm: 'grey'}} fontSize={{xs: 'small', sm: 'medium', md: 'large'}} width={{ xs: 200, sm: 400, md: 600, lg: 1000 }} p={20} m="50px auto"> This is a Box </Box> </ThemeProvider> ) } Responsive box It’s more readable and helps you understand what value should be used in each device. Typography Material Design Typography Font size is important when you design. As a designer, it’s important to organize a scalable design system and for typography as well, to need to set up heading levels and to create a hierarchy for clear visibility. As a developer, it’s too much hassle to apply each font to each device even though only mobiles. But in styled-system, you don’t need to write a specific font size to every component. Let’s suppose some heading level in theme.js : const theme = { fontSizes: { small: 14, medium: 16, large: 18, h5: 12, h4: 18, h3: 20, h2: 24, h1: 30, }, } Alternatively, there is another approach: const theme = { fontSizes: { small: 14, medium: 16, large: 18, h5: { sm: 12, md: 14, lg: 16, }, h4: { sm: 16, md: 18, lg: 22, }, h3: { sm: 19, md: 22, lg: 28, }, h2: { sm: 20, md: 22, lg: 24 }, h1: { sm: 24, md: 26, lg: 30 } } } A system could have a more limited set of heading levels and specify size per each device. You can dig into more details at Size in Design Systems, which is a really awesome post. Responsive Layout As mentioned above, width can be responsive and you can define responsive layout. But if you prefer layout based on a grid system, alternatively Material-UI has its own Grid layout. Let’s install Material-UI: yarn add @material-ui/core And add it to App.js : const App = () => { return ( <ThemeProvider theme={theme}> <Grid container spacing={2}> <Grid item xs={12} md={3}> <Box bg={{xs: 'orange', sm: 'grey'}} fontSize={{xs: 'small', sm: 'medium', md: 'large'}} p={20} m="50px auto"> This is a Box </Box> </Grid> <Grid item xs={12} md={3}> <Box bg={{xs: 'orange', sm: 'grey'}} fontSize={{xs: 'small', sm: 'medium', md: 'large'}} p={20} m="50px auto"> This is a Box </Box> </Grid> <Grid item xs={12} md={3}> <Box bg={{xs: 'orange', sm: 'grey'}} fontSize={{xs: 'small', sm: 'medium', md: 'large'}} p={20} m="50px auto"> This is a Box </Box> </Grid> </Grid> </ThemeProvider> ) } Responsive with Material-UI Grid component can take breakpoints like xs , sm , md lg and xl and should be matched with your breakpoints. Separate Component into PC and Mobile Next, what if you want to separate HTML into pc and mobile. Then you can archive it by using Hidden . Let’s create a component that toggles visibility value. I call it Media component and it takes two props, pc and mobile . Before that install lodash : yarn add lodash And add Media.js : // Media.js import React from 'react' import HiddenCss from '@material-ui/core/Hidden/HiddenCss' import omit from 'lodash/omit' const Media = (props) => { const hiddenProps = omit(props, 'mobile', 'pc') switch (true) { case Boolean(props.mobile): return ( <HiddenCss {...hiddenProps} smUp> {props.children} </HiddenCss> ) case Boolean(props.pc): return ( <HiddenCss {...hiddenProps} xsDown> {props.children} </HiddenCss> ) default: return <>{props.children}</> } } export default Media And apply it to App.js : const App = () => { return ( <ThemeProvider theme={theme}> <Media pc> <p>Hi I'm from PC</p> </Media> <Media mobile> <p>Hi I'm from mobile</p> </Media> </ThemeProvider> ) } Responsive with Media Now it clearly separates HTML into pc and mobile on component levels. Composing style There are a bunch of style functions provided by styled-system. You might find it tough to add them to every component. To solve it, the wrapper component, which has style functions can be used like this: // utils/styledSystem.js import styled from 'styled-components' import { compose, space, color, layout, typography, flexbox, border, background, position, grid, shadow, width, minWidth, height, minHeight, } from 'styled-system' const styledSystem = (tag) => { return styled(tag)( compose( space, color, layout, typography, flexbox, border, background, position, grid, shadow, width, minWidth, height, minHeight, ), ) } export default styledSystem And wrap styled-component with it: import React from "react" import styled, { ThemeProvider } from 'styled-components'; import theme from './theme'; import Grid from '@material-ui/core/Grid'; import styledSystem from './utils/styledSystem' const App = () => { return ( <ThemeProvider theme={theme}> <Heading fontSize={{ xs: 'h1' }}>Title here</Heading> <Grid container spacing={2}> <Grid item xs={12} md={3}> <Box bg={{xs: 'orange', sm: 'grey'}} fontSize={{xs: 'small', sm: 'medium', md: 'large'}} p={20} m="50px auto"> This is a Box </Box> </Grid> <Grid item xs={12} md={3}> <Box2 bg={{xs: 'orange', sm: 'grey'}} fontSize={{xs: 'small', sm: 'medium', md: 'large'}} p={20} m="50px auto"> This is a Box </Box2> </Grid> <Grid item xs={12} md={3}> <Box3 bg={{xs: 'orange', sm: 'grey'}} fontSize={{xs: 'small', sm: 'medium', md: 'large'}} p={20} m="50px auto"> This is a Box </Box3> </Grid> </Grid> </ThemeProvider> ) } const Box = styledSystem(styled.div``) const Box2 = styledSystem(styled.div``) const Box3 = styledSystem(styled.div``) const Heading = styledSystem(styled.h1``) export default App All style functions are applied with components. Another option would be using Rebass, which is a React UI components built with styled-system and highly compatible with the Design System. Conclusion You can mostly be prepared to build responsive components. Every component should be readable, maintainable and scalable. Making responsive is hard but it’s worth it for great user experience. I hope it’ll help you. You can view the final working example at:
https://medium.com/javascript-in-plain-english/responsive-react-app-with-styled-system-based-on-design-system-a82c6f9d5e2e
['Manato Kuroda']
2020-02-28 08:16:03.278000+00:00
['Design Systems', 'Styled Components', 'React', 'Web Development', 'JavaScript']
Learning to Live in Modern-Day Dystopia
It’s been a long, hard ride, and it doesn’t look like it’s about to end anytime soon. I started 2020 with high hopes — the “year of clear vision,” I was told. Oh, the delusions. It hit us out seemingly of nowhere — some harder than others — like something out of a Stephen King novel, only much more terrifying because reality is always scarier than fiction. There were no creatures coming out of the mist, no haunted hotels with decaying grannies, and no cursed strawberry pies. No, this was much worse, because it affected the entire world. Is there an end in sight? At the time of writing this, that prospect seems rather unlikely. When the virus first made its appearance, global panic erupted and was quickly followed by a flurry of conspiracy theories. Many people still believe the rumours that morphed and evolved over the weeks and months. Regardless of which side of the conspiracy line you stand on doesn’t change the fact that we’re still faced with the same monumental task: rebuilding a society that has been shaken to its very core. A society that is having to adjust to a new version of normal; one we never expected to experience in our lifetime. Despite the catastrophic number of human lives that have been lost, one does have to pause and wonder if we cannot perhaps find some speck of goodness amidst all of the sorrow and madness. There are lessons to be learned as we attempt to pick up the broken pieces from the rubble as it continues to pile up higher every day with an ongoing decline in the human population, and an alarming rise in active insurgence. Most days, finding this golden particle of hope, this needle in the proverbial haystack, seems like an impossible feat; all one has to do is turn on any news channel at any given time to see the perfect destruction our species is capable of, and apparently hell-bent on creating. It’s truly disheartening to watch as we turn on one another in a time when we should be lifting each other up. Whether the rebellion is caused by the emerging dictatorship qualities of governments across the planet, or if the opposite is true and the governments are reacting to society’s revolt, the results are the same: a revolution that will forever change our world, long after the fear of pandemics have evaporated.
https://medium.com/imperfect-words/learning-to-live-in-modern-day-dystopia-de2d14744a17
['Edie Tuck']
2020-10-10 19:30:03.338000+00:00
['World', 'Society', 'Humanity', 'Dystopia', 'Change']
NLP in Python- Vectorizing
NLP in Python- Vectorizing Common vectorizing techniques employed in a typical NLP machine learning model pipeline using the real of fake news dataset from Kaggle. Photo by Roman Kraft from Unsplash In this article, we will learn about vectorizing and different vectorizing techniques employed in an NLP model. Then, we will apply these concepts to the context of a problem. We will work with a dataset that classifies news as fake or real. The dataset is available on Kaggle, the link to the dataset is below: The initial step involved in a typical machine learning text pipeline is data cleaning. This step is covered in detailed in a previous article, linked below: Dataset after data cleaning The raw news titles were transformed into a cleaned format containing only the essential information (last column of the above picture). The next step is to further transform the cleaned text into a form that the machine learning model can understand. This process is known as Vectorizing. In our context, each news title is converted to a numerical vector representative of that particular title. There are many vectorization techniques, but in this article, we will focus on the three widely used vectorization techniques- Count vectorization, N-Grams, TF-IDF, and their implementation in Python. Count vectorization As discussed above, vectorization is the process of converting text to numerical entries in a matrix form. In the count vectorization technique, a document term matrix is generated where each cell is the count corresponding to the news title indicating the number of times a word appears in a document, also known as the term frequency. The document term matrix is a set of dummy variables that indicates if a particular word appears in the document. A column is dedicated to each word in the corpus. The count is directly proportionate to the correlation of the category of the news title. This means, if a particular word appears many times in fake news titles or real news titles, then the particular word has a high predictive power of determining if the news title is fake or real. def clean_title(text): text = "".join([word.lower() for word in text if word not in string.punctuation]) title = re.split('\W+', text) text = [ps.stem(word) for word in title if word not in nltk.corpus.stopwords.words('english')] return text count_vectorize = CountVectorizer(analyzer=clean_title) vectorized = count_vectorize.fit_transform(news['title']) Dissecting the above code, the function “clean_title”- joins the lowercase news titles without punctuation. Then, the text is split on any non-word character. Finally, the non-stop words are stemmed and presented as a list. A detailed description of the cleaning process is given in this article. Next, we have made use of the “CountVectorizer” package available in the sklearn library under sklearn.feature_extraction.text. The default values and the definition are available in the scikit-learn — Count Vectorizer documentation. In the above code, we have instantiated Count Vectorizer and defined one parameter — analyzer. The other parameters are its default values. The analyzer parameter calls for a string and we have passed a function, that takes in raw text and returns a cleaned string. The shape of the document term matrix is 44898,15824. There are 44898 news titles and 15824 unique words in all the titles. A subset of the 15824 unique words in the news title The vectorizer produces a sparse matrix output, as shown in the picture. Only the locations of the non-zero values will be stored to save space. So, an output of the vectorization will look something like this: <20x158 sparse matrix of type '<class 'numpy.int64'>' with 206 stored elements in Compressed Sparse Row format> but, converting the above to an array form yields the below result: As shown in the picture, most of the cells contain a 0 value, this is known as a sparse matrix. Many vectorized outputs would look similar to this, as naturally many titles wouldn’t contain a particular word. 2. N-Grams Similar to the count vectorization technique, in the N-Gram method, a document term matrix is generated and each cell represents the count. The difference in the N-grams method is that the count represents the combination of adjacent words of length n in the title. Count vectorization is N-Gram where n=1. For example, “I love this article” has four words and n=4. if n=2, i.e bigram, then the columns would be — [“I love”, “love this”, ‘this article”] if n=3, i.e trigram, then the columns would be — [“I love this”, ”love this article”] if n=4,i.e four-gram, then the column would be -[‘“I love this article”] The n value is chosen based on performance. For the python code, the cleaning process is performed similarly to the count vectorization technique, but the words are not in a tokenized list form. The tokenized words are joined to form a string, so the adjacent words can be gathered to effectively perform N-Grams. The cleaned title text is shown below: The remaining vectorization technique is the same as the Count Vectorization method we did above. The trade-off is between the number of N values. Choosing a smaller N value, may not be sufficient enough to provide the most useful information. Whereas choosing a high N value, will yield a huge matrix with loads of features. N-gram may be powerful, but it needs a little more care. 3. Term Frequency-Inverse Document Frequency (TF-IDF) Similar to the count vectorization method, in the TF-IDF method, a document term matrix is generated and each column represents a single unique word. The difference in the TF-IDF method is that each cell doesn’t indicate the term frequency, but the cell value represents a weighting that highlights the importance of that particular word to the document. TF-IDF formula:
https://towardsdatascience.com/nlp-in-python-vectorizing-a2b4fc1a339e
['Divya Raghunathan']
2020-06-08 19:57:07.501000+00:00
['Machine Learning', 'Python', 'NLP', 'Data Science', 'Data']
Stemming: How to Tokenize Text for Search
Stemming Stemming is the process of reducing a word to its root stem. For example, the word “develop” can also take the form of “developed” or “developing.” When tokenized, all three of those words result in different tokens. Users could potentially resolve that at query time with a trailing wildcard search, i.e. develop* . Stemming is an option to handle that at indexing time. The next example uses NLTK, which can be installed via pip if not already installed. pip install nltk NLTK provides a stemmer which reduces words down to their root word. Consider the following: >>> from nltk.stem.porter import PorterStemmer >>> stemmer = PorterStemmer() >>> [stemmer.stem(token) for token in ["developed", "develop", "developing"]] ['develop', 'develop', 'develop'] All three words resolve to the same token. When a user enters a query with “developed”, “developing” or “develop”, the query matches on documents with any of those three variants of “develop.” Once again, it’s not necessarily right or wrong to stem — it comes down to user expectations at search time.
https://medium.com/better-programming/stemming-how-to-tokenize-text-for-search-2e43bb3dd0ea
['David Mezzetti']
2020-01-31 21:15:08.691000+00:00
['Programming', 'Software Development', 'Python', 'Data Science', 'Search']
I spent Christmas Alone this Year. That Was the Biggest Gift.
I spent Christmas Alone this Year. That Was the Biggest Gift. You can’t manufacture joy, giddiness and seasonal silliness Fake trees, originally priced at almost $450, are being ushered out the door at my local Home Goods for $35. I looked. Walked on by. Nah. Used to be, many moons ago, that my house was a veritable orgy of decorations. Took me two days to get everything up. And another two or three to get it all down. I rarely in all my 67 years ever had company for Christmas. Maybe three times. Who on earth was all that for other than the retail industry? Nobody came through to ooh and ahh. I did, once, when I hurt my back taking stuff down. Said quite a few very un-jolly things, too. I bought thousands of gifts for bewildered people who had no idea what I was trying to say. On very rare occasion, I had time with folks I cared a lot about. For years I tried very hard to force festive feelings into my life, a false bonhomie and the appearance that all was well, all was calm, all was bright. No, it wasn’t. Because you can’t manufacture feelings just because It’s That Time of Year. The last nearly twenty years, I had a seasonal trip to the Pacific Northwest, where a friend’s family kindly made a place for me at their table. That went the way of the dodo bird this year, as I did what Kristi Keller discussed in a recent piece, a friend purge. Didn’t begin that way. But it did end that way, as I sought to set boundaries with people who said things like: Who would want to read your memoir? (the ex-friend) and Nobody wants to read your fucking stories (the ex-BF) Those were a few from last decade/year. Those made up part of the highlight reel of the decade, as I counted down to January 1st. Boxes of junk weren’t the only things I left on the sidewalk. Pieces of my heart, as well, as I had to bid goodbye to longtime friends who felt it perfectly acceptable to bleed me as they wished. I have no idea why; that is their journey. But it is mine to choose quiet time to myself rather than be fearful a beloved friend is going to carve a new hole in my heart for reasons that I have yet to comprehend. Photo by Nick Fewings on Unsplash Sometimes the end of the year is as much about getting rid of as it is getting. Nobody asks me what I got for Christmas. Those who know me best understand that this is a silly question. The silly season is just that. As much as I suffer from temporary early giddiness when October lands, and the stores are already stuffed with Santas (and have been since late August), these days I am far happier having released my compulsive need to MAKE THE SEASON GREAT. Sometimes the season sucks. Kindly ask those families up in Sandy Hook, for example. Each of us experiences this time of year through very specific lenses. Loss, tragedy, recovery, falling in love, getting engaged, having a child, losing a child. Or to have to worry about some freaknut attacking your church/mosque/temple/ house because he doesn’t happen to like your beliefs or language or skin color. Or your sneakers. Who knows. Just because it’s That Time of Year is in some ways meaningless. For the trees in my yard (and to all the trees that didn’t get chopped down this year) it’s just another day. The deer could care less that I stuck another big block of compressed deer food out for the fam. It’s there. We’re hungry. Let’s eat. Photo by Eugene Zhyvchik on Unsplash I read all kinds of Medium stories from folks who felt a push to feel something they just didn’t. Well, kindly, why should they? Just because there’s extreme pressure to be happy and joyful during the one time of year (in the Northern Hemisphere at least which traditionally was the most terrifying), why should you? Seasonal Affective Disorder is a thing for a reason. People were terrified of the short, dark nights for a reason. The cold and often lonely days around proscribed “happiest times” can make us feel like fucking losers. Until, and unless. Stay with me here. This year I hadda say goodbye to my house of 14 years, and my city and state of 47. The house, now HUGE again since I have packed all my stuff away, has more dust bunnies than decorations. Shorn of all the memories, the chalkboard of its walls wiped clean of the pictures and photos and masks that had given the place my unique stamp, I was finally able to walk by Certain Places without pain. The kitchen wall where the abusive ex first kissed me, a kiss that lasted nearly an hour and left us both exhausted and my poor feet screaming at me. I think the man had an erection for three days and that was without Viagra. Remember how it feels when you remember back when we first…? That kind of pain. The bedroom where…well, you know. That. Whole lotta shakin’ went on in there. I hung a single ball from Taos from my mantle. Played Mannheim Steamroller, my one concession to the season, and the happiest. The rest of the time I worked, packed, threw away, donated, dumped and otherwise continued to clean house. March is the deadline. Photo by Anthony Cantin on Unsplash A few friends came by, a few had to cancel due to flu. That didn’t hurt at all. In fact, their cancellations were also a gift. I had more time to be in my home-not-home-any-more. 2019 was the first holiday season I had been in my own house. People made themselves available such as they could, in many cases because this is my last. Dear god how grateful I have been for such a beautiful place. Dear god how grateful I am to have a house to sell so that I have a financial nut, a nut (please forgive the pun) that I can turn into trees around my new place somewhere in the Pacific Northwest. Dear god how grateful I am to be able to finally grow a set of balls, to say to abusers and users and unkind friends, kindly, there’s the door. I no longer care that it’s taken me 67 years. I have the rest of my life to enjoy what comes next. I finally had time to catch up writing so very many stories that had languished (even my dedicated buddy Ann Litts could barely keep up), a flow that continues if for no other reason than I have the time. Besides, writing stories for pay is a great excuse to avoid doing more mundane work but I digress. It’ll get done. Always does. Photo by Joanna Kosinska on Unsplash In the soft light of a candle that one friend gave me for Christmas (which has, of course spawned many more, if nothing else to cover up the smell of fourteen-year-old dust), I got to just BE. For many of us that’s the one thing that’s hardest to do. Not only in life in general, but during holidays. All of them, from Kwanzaa to Christmas, it’s nonstop. And it’s the single most important time that you and I most need - as we traditionally acknowledge the ending of a year. Especially in this case, a decade. It’s incumbent upon us to take the time to acknowledge who and what have gone, what we have learned, what we’re grateful for, what we are sad that has passed. Honor and bless and kiss goodbye all those things that must be sent down the River of Life. That’s what this dark night is all about. Yet most of us are so busy, or too sad, or too lonely, or overwhelmed that we cannot carve out time to care for ourselves. To notice. And by noticing, make choices. That kind of careful consideration is what also drives thoughtful redirects, otherwise called resolutions. In the dark of the solstice, we face ourselves, our fears, our heartaches. And we choose. Given time and reflection, the gifts of a dark night, we can make better choices. Then as we always do, the moment the days have passed their darkest, we turn our attention towards the new year, the new day, the coming spring, and all the promise that a warming sun and longer days can carry. I had all that. All that and so very much more. Because I spent Christmas alone. Photo by Warren Wong on Unsplash My new friend Margaret Kruger told me that over the course of her 67 years she had spent plenty of Christmas holidays alone. She knows how to do this. Now I do, too. Such times are such a gift. Not to be caught up in the notion that we “should” be with family. “Should” be happy and joyful just because it’s the season. Rather, to be with ourselves, in the deep quiet and warm places where wounds can begin to heal. In ways only we can do for ourselves. Where the sweet smell of a Christmas candle is for us and us alone, offering the promise of healing and hope.
https://medium.com/crows-feet/i-spent-christmas-alone-this-year-that-was-the-biggest-gift-4b5afce89e91
['Julia E Hubbel']
2020-01-06 02:03:52.441000+00:00
['Life Lessons', 'Society', 'Culture', 'Life', 'Christmas']
A Guide to Reference Counting in Python
The Number of Reference Counting So far so good — we’ve learned a lot. Now, how many variables are referencing the one object? The wrong use I see some people using sys.getrefcount(var) without knowing passing the var add one more reference to the object. Let’s look at the example below. Check that out! Output 3 while we expect 2 ( x and y ). It happens because passing x to getrefcount function added one more reference. Better use You can use the built-in ctypes module to find the result you expect. You have to pass id of x to from_address function. Why does it happen this way? Because in the wrong use, you pass the variable whereas in the better use, you pass the id of variable, which means you only pass a number in base-10, not a variable.
https://medium.com/better-programming/a-guide-to-reference-counting-in-python-27334fc2e3c1
['Halil Yıldırım']
2020-05-04 12:40:09.781000+00:00
['Programming', 'Software Development', 'Python', 'DevOps', 'Data Science']
Colonial Australia’s Strange Convict Society
Colonial Australia’s Strange Convict Society How felons built a successful community The founding of Sydney, 26 January 1788 (Wikimedia Commons) On a sultry summer day in January 1788, beside the languid waters of Sydney Harbour, Great Britain began a truly strange, unprecedented experiment. It would build a colony using convicted criminals as colonists. Under the plan, Britain would turn Australia into a profitable and strategically-important colony, and the felons who would otherwise be hanged under harsh Georgian penal laws would be given a second chance at life. James Mario Matra, one of the champions of the scheme, described it as “a most desirable and beautiful union […] economy to the public, and humanity to the individual”. Everyone would win, that is, except for the Aborigines whose lands had been seized for the experiment. Britain transported 160,000 convicts to its Australian colonies of New South Wales, Western Australia, and Tasmania (then called Van Diemen’s Land) between 1788 and 1868, building a felon-majority society. Throughout the 1820s, convicts outnumbered free settlers to New South Wales three to one. In 1823, convicts made up 58% of the non-Aboriginal population of Tasmania. As late as 1837, 32,000 of New South Wales’ 97,000 non-Aboriginal residents were convicts under sentence, and many of the rest were emancipists (convicts who had been pardoned or whose sentences had expired). The Australian colonies could not be run like a jail, and the governors London sent to Sydney and Hobart quickly realised they would need to win the co-operation of their disreputable colonists. They built a ladder to freedom, where a convict could earn a ticket-of-leave, entitling them to earn a living, then a conditional pardon, allowing them to live freely in the local district under the supervision of a magistrate. An unconditional pardon could follow. Convicts not working for the government were assigned to settlers, and if they earned their freedom, could then have more convicts assigned to work for them, creating a cycle. Almost all work in the colonies was done by assigned convicts. Convict labourers cleared land and built roads, convict shepherds minded sheep, and wealthy settlers had convict servants keeping their houses. Educated convicts called ‘specials’, often convicted of white-collar crimes like fraud and blackmail, worked as clerks, civil servants, and schoolteachers. Each convict owed their master a certain number of hours of work a day — usually until four in the afternoon — after which they could work for themselves and make a small income. The system worked. The last major convict uprising was in 1804, at Castle Hill west of Sydney. After that, convicts usually preferred to work within the rules. So the Australian colonies became a functional society, and eventually, a flourishing one. Here are some examples of their success stories. The Castle Hill convict rebellion of 4–5 March 1804, the last major convict uprising in Australia (Wikimedia commons) Convict Lawyers Of all the ways convicts could be employed, practising the law was the most controversial. Still, the Australian colonies initially had no choice but to use them — the only qualified lawyers they had were those who had been convicted of crimes, disbarred, and transported. One was George Crossley, convicted of perjury, imprisoned, pilloried, and then transported in 1799. Conditionally pardoned in 1801, he became a successful businessman, landowner, and lawyer. Crossley’s moment came during the lead-up to the Rum Rebellion of January 1808. Governor William Bligh, of the Bounty mutiny fame, was locked in a legal dispute with the insubordinate officers of the New South Wales Corps, commonly known as the Rum Corps (Rum was used as unofficial currency in early New South Wales). Bligh, not sure how to deal with the officers, called on Crossley to advise him. Crossley had no copy of Blackstone’s Commentaries on the Laws of England to refer to, but luckily for him, he was able to borrow one from Simeon Lord, a wealthy merchant. Lord, then one of the most successful businessmen in the colony, had originally been transported for stealing cloth. Crossley’s efforts on behalf of the Governor went nowhere. Before Bligh’s dispute with the officers could be resolved in court, they overthrew him in the Rum Rebellion of 26 January 1808. The officers of the Corps had no truck with convict lawyers. “Lieutenant-Governor Foveaux has learned, with equal indignation and surprise, that men who have been prisoners in the colony have so far forgotten their former condition as to obtrude themselves into the courts of justice in the character of counsellors and advocates…” began their declaration on the matter. Crossley was found to have broken the law prohibiting convicted perjurers from practising law and was transported again — this time up the New South Wales coast to the coal mining settlement at Newcastle. But all was not lost. The new Governor, Lachlan Macquarie, who arrived in 1810, was open-minded regarding convicts. Crossley was released, returned to Sydney, and successfully sued his persecutors for trespass and false imprisonment, winning £500 in damages. He lived out the rest of his life in Sydney, sometimes prospering, sometimes in trouble again. As historian K. G. Allars wrote, he was: “…a colourful if somewhat shady character, not possessing all the virtues ordinarily required of attorneys, but sometimes unnecessarily maligned.” Convict workers in colonial New South Wales (National Archives of Australia) Convict Doctors Sydney’s original hospital was a tent. In 1810, Governor Macquarie began building a new one. It was badly-designed for want of the attention of a proper architect, but fortunately for Macquarie, he had one. Architect Francis Greenway had been sentenced to death in Bristol for forgery. His sentence was commuted to transportation for fourteen years, and he arrived in Sydney in 1806. Macquarie commissioned him to look over the building, and he found it badly wanting. Under Greenway’s direction it was rebuilt and Rum Hospital, as it was called, began taking patients in 1816. Macquarie used Greenway for many more projects, and the architect’s face appeared on the first Australian $10 banknote — an ironic distinction for a convicted forger. Management of the hospital was taken over by businessman and doctor D’Arcy Wentworth, Chief Surgeon of the colony. Wentworth was not a convict, although this may have simply been a matter of luck. Wentworth came from a wealthy aristocratic family, yet apparently still had a penchant for highway robbery. He was tried and acquitted four times. Facing court for the fifth time, and learning that the Crown had a witness willing to identify him, he volunteered to go to New South Wales as a surgeon in exchange for the prosecution dropping the case. He became extremely successful in the colony, was popular with the convicts assigned to work for him, and kept his convict mistresses in style. His son, William Charles Wentworth, became the dominant figure in colonial politics. Sydney needed more than one doctor, though, and the criminal justice system gave it two very good ones. One was William Redfern, a young naval surgeon. During the mutiny at Spithead in 1797, he told the men to “be more united among yourselves.” For this remark, he was sentenced to hang. As he was only nineteen, the courts took mercy on him and commuted his sentence to transportation. He earned acclaim in New South Wales for his efforts to improve the health of the convicts. Macquarie recommended that he succeed Wentworth, but the British Government baulked at appointing a mutineer as chief surgeon. So Macquarie made him a magistrate instead. He went on to become a director of the Bank of New South Wales. The other was William Bland, also a naval surgeon. Something of a volatile character, he was convicted of murder after he shot the ship’s purser in a duel. His sentence commuted, he arrived in Sydney in 1814. He was tasked with caring for convicts at Castle Hill, but after being pardoned the next year established a successful practice and became the doctor of choice for many of Sydney’s leading citizens. He would spend another year in prison for slander, before resuming his business permanently. He was elected to the New South Wales legislature in 1843. Old Australian ten-dollar note featuring architect and convicted forger Francis Greenway with examples of his work (Wikimedia Commons) Convict Schoolmasters The colonial authorities were determined to educate the children of convicts to stamp out any hereditary tendency towards crime. As social commentator Reverend Sydney Smith wrote in England, “nothing but the earliest attention to the habits of children can restrain the erratic finger from the continuous scrip, or prevent the hereditary tendency to larcenous abstraction”. This task fell to Laurence Hynes Halloran, a very intelligent and erudite yet violent and disturbed man whose criminal convictions spanned three continents. He joined the Navy as a midshipman but was jailed for stabbing another midshipman to death in a fight. He founded a school that went bankrupt. He was charged with immorality and then went around England passing himself off as a curate. He moved to the Cape Colony in South Africa to start a new school but was expelled from the colony for criminal libel. Finally, convicted of forgery in England, he was sentenced to seven years of transportation, arriving in Sydney in June 1819. Governor Macquarie and the leading emancipists recognised his potential value to the colony and he was granted a ticket-of-leave and tasked with founding a school. Called ‘Doctor Halloran’s Institute for Liberal Education’, it was Australia’s first grammar school, or academic high school. It provided a few select students with a pathway to Oxford and Cambridge Universities. Halloran, by all accounts, was a gifted teacher, although he remained in trouble with the law for the rest of his career. Sydney hospital, built with convict labour between 1810 and 1816 and improved by convict architect Francis Greenway (Wikimedia Commons) Conclusion: A Convict Country Appointing felons to positions of power and responsibility was deeply-troubling to nineteenth-century sensibilities. Macquarie had little sympathy for those who felt this way: “In my humble opinion, in coming to New South Wales, they should consider that they are coming to a convict country” he wrote. “And if they are too proud, or too delicate in their feelings, to associate with the population of the country, they should consider it in time and bend their course to some other country, in which their prejudices in this respect would meet with no opposition”. Subsequent governors usually (but not always) adopted the same view. As the Australian colonies became more successful, penal transportation quickly lost its value as a deterrent. A prison official at Newgate complained to the police commissioner in 1818 that convicts were viewing transportation “as a party of pleasure, as going out to see the world, they evidence no penitence, no contrition, but seem to rejoice in the thing.” With the opening of Pentonville Prison in 1842, the British government had a cheaper alternative to sending convicts halfway around the world. Transportation was scaled back, finally ending in 1868. By then, the British colonies in Australia were wealthy, successful, and democratic. The children of convicts, schooled by convict teachers like Dr Halloran, could now read and write well enough to follow public affairs in newspapers, participate in public debate, and vote in elections by secret ballot. The first modern election in the world, using ballot boxes and government-printed ballot papers, was held in the Australian colony of Victoria in 1856. So the convict society succeeded.
https://medium.com/history-of-yesterday/colonial-australias-strange-convict-society-565449080fcb
['Adam M Wakeling']
2020-12-14 06:02:39.796000+00:00
['Society', 'Australia', 'History', 'United Kingdom', 'Criminal Justice']
Hard Times Can Make You Stronger and More Successful
Hard Times Can Make You Stronger and More Successful There are benefits to overcoming adversity. Photo by Johnson Wang on Unsplash We all go through difficult times in life. It can help us build up the strength to make it through anything. Going through hard times is beneficial. It makes you tougher, stronger, and more successful. “Tough times never last, but tough people do.” — Robert Schuller, an American Christian televangelist, pastor, motivational speaker, and author No one really enjoys the experience of losing your job or getting robbed at gunpoint. Both of things have happened to me and they made me stronger. Psychologists say traumatic events can make you stronger physically and mentally. Research shows people who lived through post-traumatic growth report positive changes in their relationships with others, a better appreciation of life, and new possibilities in life. “Where there is no struggle, there is no strength.” — Oprah Winfrey, an American TV personality, actress, and entrepreneur There’s a benefit to overcoming adversity. When you make your way through tough times, you’ll become stronger and more successful in life. That’s why the phrase “what doesn’t kill you, makes you stronger” really does ring true. The wisest and most well-rounded people you meet are usually those who have gone through tough times themselves. They have overcome challenges and they have great stories to tell. As Train and Ashley Monroe sing in one of my favorite songs, Bruises: “Everybody loses. We all got bruises. These bruises make for better conversation.” Let’s dive into how tough times can make you stronger and more successful.
https://medium.com/5-minute-sweet-spot/hard-times-can-make-you-stronger-and-more-successful-f1fcd90b7af
['Matthew Royse']
2020-10-19 12:34:04.064000+00:00
['Personal Development', 'Business', 'Entrepreneurship', 'Self Improvement', 'Life Lessons']
Clustering: A Deeper Look
Clustering is an unsupervised learning technique in which we are trying to find groupings in the data set based on some known or unknown properties which might exist. Irrespective of which technique you may use these are the things we are trying to achieve: Within a cluster the points should be similar to each other. Between two clusters you need to have a dissimilarity. Depending on how we define these similarities and dissimilarities there are a number of techniques which one can use. Let us make the problem more concrete. Where d is the Eucledian distance between two points. We want to find partitions which minimize L. Let us think about the problem in more detail. Suppose you want to divide 4 points into 2 clusters. How many such partitions can we have? For each point we have two choices and we are not considering all points in one cluster and no point in a cluster. So that becomes 2²/2. We can increase the number of points to n and number of clusters to K so that the total partitions become [K^(n-K)]/K! Now we get close to understanding the complexity of this problem. We can get some estimates by doing an exhaustive search but it becomes very difficult to find the optimal solution. All solutions in this case are actually sub optimal solutions. If we think about only two clusters for the time being and we have already found their centers denoted by y₁ and y₂. Now suppose if we want to associate another point with one of the clusters, we have to find the distance between the point and centers of the clusters. We assign a point to a cluster whose distance from center is minimum from the point. In the diagram above we want to assign the red point to one of the clusters. We can calculate its distance from y1 and y2 and assign it accordingly. What we can also do is we draw a perpendicular bisector of the straight line joining y1 and y2. Then all the points lying on one side of ther perpendicular bisector belong to one of the clusters. Basically, we are creating sets called half spaces. These half spaces are convex. There is an analytical proof for this but if you consider any two points in a half space and join them by a line segment, all points on the line segment will be completely contained within that half space. Now, if we have more than two clusters, we will have more half spaces. And intersection of these half spaces will be again convex. So, this method provides convex shaped clusters. It should be noted that we are still not talking about shape of the finitely many points in the cluster. There’s also a more subtle point here. Why did we use L₂ norm instead of L₁ norm for calculting distance between the two points in the loss function? As seen in the previous example in case of a 2 dimensional space, the half space is obtained easily by the perpendicular bisector of the line joining the cluster centres. A line has zero measure in the Lebesgue sense. In the case of L₁ norm there will be many points which have the same distance from both cluster centres and such a surface has infinite Lebesgue measure.
https://anirudhgupta12.medium.com/clustering-a-deeper-look-ad016fe743a3
['Anirudh Gupta']
2020-06-12 17:12:20.145000+00:00
['Machine Learning', 'Data Science', 'Clustering', 'K Means', 'Statistics']
Inclusive Color Sequences for Data Viz in 6 Steps
Step 1: Start with an established color palette This step can be started from two distinct places: from an existing design system or from a product-specific color palette. The main difference is an existing design system will typically have a larger set of color options than a product palette. Depending on your starting point, the process will either be subtractive or additive. If you are starting from a product palette, then the process will need to be additive. ColorBox, by Lyft design, is a tool you can use to create colors in addition to your original product palette. ColorBox provides a way to quickly create contrast steps in your colors which will be important for your data visualization sequence. Referencing an existing design system is also a valuable place to start since they typically include broader color options. Starting from a design system will be a subtractive approach considering you’ll be narrowing the palette down to a sequence specific for data visualization usage. We’ll be using the IBM Design language v2.0 color palette as an example of this process. The IBM Design v2.0 palette is especially useful because it has contrast in mind with swatch progression. We’ll describe why this is valuable in step 4… Step 2: Consider your product palette Even if you are starting from an existing design system you still need to consider the product palette that will deliver the data visualizations. Product palettes typically contain a primary color, sometimes a secondary color, and a neutral which is commonly used for the UI foundation. The colors we’ll use for our product example are Indigo, Teal, and Gray. In data visualizations, there’s an argument to be made to steer away from product colors used throughout the UI. Colors used consistently in products establish intent and expected behavior. You may not want to use a product color as one of many area graph category colors if that same color is used as a primary action everywhere else in the product. With this being the case, we’ll remove the product colors from the list and others close to their hue to avoid confusion (like Violet and Purple). Step 3: Drop colors with pre-existing meaning The next step would be to identify colors that may have meaning attached to them… colors with baggage, if you will. Green, Yellow, Orange, and Red often fall into this category making them potentially problematic when used in cases where the color’s job is to simply provide distinction against others around it. If this case rings true for you, consider omitting those colors. Step 4: Narrow palette for contrast A critical method for creating a distinction between your palette and your UI is through contrast. First, you’ll need to determine whether the data visualization background will be dark or light. Consider using a single background color for consistent visualizations and to make accessible contrast ratios achievable. For this section, we’ll be referencing the Web Content Accessibility Guidelines 2.1 3:1 Color Contrast Ratio Color contrast in shapes 3 x 3 pixels and larger is considered accessible if it meets a contrast ratio of 3:1. To find the start of the color range, use WebAim’s Color Contrast Checker to check all of the colors against your chosen background color. From there, pick the color that meets the minimum of 3:1 contrast ratio to be the start of the range. Any color higher than the ratio 3:1 is accessible and can be included in the range. 4.5:1 Color Contrast Ratio If shapes are less than 3 x 3 px, the rule becomes more rigid and the object must meet a ratio of 4.5:1. Using the same logic as above, select the range of colors that meet the minimum of 4.5:1 against your UI background color. Narrow the color palette to 3:1 Most data visualizations can be achieved with 3:1 contrast so we’ll use it for our example. Using your background color as the baseline, remove all colors that fail within 3:1 of that color. It is also wise to just remove the edge colors of the steps (1 and 90) since the contrast distinctions between the colors at the edges can be difficult to view. Example using a white background Step 5: Consider color deficiency Color deficiency has a far deeper reach than most realize. It affects approximately 8% of men and .5% of women in the world. The 3 main types of color deficiencies are deutan, protan, and tritan. Deutan: Red-green confusion that includes the subtypes deuteranomaly and deuteranopia. Deuteranomaly is the most common form of color deficiency. It impacts 4.63% males and .36% females. Protan: Also red-green confusion. It includes the subtypes protanomaly and protanopia. Protan is the less common form of red-green confusion accounting for a total of ~2% males and .05% females. Tritan: Blue-yellow confusion that includes the subtypes tritanomaly and tritanopia. Tritanopia is quite rare. Some sources estimate that 0.008% are affected by this type of color deficiency. If you don’t already have it, download the Mac application Sim Daltonism to simulate from a perspective of a color deficiency user. For our first color study, let’s focus on the color deficiency Deuteranomaly. Using Sim Daltonism, you can see the colors perceived as someone who has the Deuteranomaly color deficiency. Many of the colors start to become indistinguishable. Once the simulator has captured images from the color deficiency types, group the perceived colors. This is done by identifying which color rows look similar to each other. You’ll also want to consider how similar the colors look at a small scale of 2–3 pixels. This is important for determining how much color distinction you’ll need depending on if your visualizations have smaller or larger identifying features. To be accessible for the red-green color confusion, only consider color groups in Protan and Deutan color deficiencies. To be completely accessible for all six of the color deficiencies, consider color groups across all color deficiencies. After the colors are organized, choose 3–4 colors that do not share perceived similarities across the color deficiencies. If you are targeting 6/6 color deficiencies, you may want to consider a smaller color set for optimal distinction. Particularly for Tritanopia. Step 6: Choose a sequence Having a color sequence becomes critical as it creates the distinction between the colors used in the scaled down palette. In our examples, we’ll be showing a sequence of 20. (This is quite a bit more than would typically be used but it’s good to have a range that can scale up to accommodate data visualization categories.) For data visualizations that do have a higher number of categories though, consider a secondary visual aid like an icon or unique shape/pattern to help with identification. In addition to creating color distinction from the background, you need to be able to discern colors that are adjacent to each other. For instance, if you have a stacked bar chart, the colors of the bars will need to have a ratio of 3:1 between large sections (larger than 3 x 3 px) and a ratio of 4.5:1 between smaller sections (smaller than 2 x 2 px). A common suggestion is to add contrast lines with a pixel width of the same color as the background to help discern between the edges of the elements, thus adding contrast distinction between the colors. There are quite a few ways to create sequences including using patterns for numbering and reorganizing the color palette. A few methods are: Contrast skipping: Skip swatches side to side to create higher contrast and utilize the same color longer throughout the sequence. This sequence works better against a darker UI where contrast nuance is more noticeable. Lighter UI’s may benefit from another sequence.
https://medium.com/design-ibm/inclusive-color-sequences-for-data-viz-in-6-steps-712869b910c2
['Cameron Calder']
2019-01-09 16:38:40.120000+00:00
['Colors', 'Data Visualization', 'Design']
How To Upload Images to a Rails API — And Get Them Back Again
2. Associate the Image With a Newly-Created Post Record in the Database On the back end, I used ActiveStorage to create associations between images and their owning objects. It’s the standard gem for file associations as of Rails 5.2 and is steadily replacing older solutions like CarrierWave and Paperclip. To get started, simply run rails active_storage:install . It will create migrations for two new tables in your database, active_storage_blobs and active_storage_attachments . These are managed automatically; you don’t need to touch them. Run rails db:migrate to complete the process. By default, ActiveStorage will use local storage for uploaded files while running in a development environment. In production, this is almost certainly not what you want. It also poses some unique challenges for returning image URLs from the server. We’ll configure this properly in part three, after we take a look at our Post model and accompanying endpoint. Post migration/model Study this migration for my post model. There’s something odd about it. You’ll notice that there is nothing about an image here. Neither the image nor a reference to the image lives in the Posts table. Now check out the model: The essential line here is has_one_attached :image . This tells ActiveStorage to associate a file with a given instance of Post. The name for the attached object should match the parameter being sent from the front end. I’ve called it :image , because that’s what I named the corresponding upload form field. You can call it whatever you like, so long as the front end and back end agree. As a bonus, I’ve added validation to ensure that posts cannot be created without images. Change this to suit your purposes. Curious about the include statement and my get_image_url method? Let’s inspect the post creation endpoint before coming back to these. Post creation endpoint The post_params method is arguably the most important here. The data from our front end has ended up in a Rails params hash with a body that looks roughly like: { "caption" => "Great caption", "image" => <FormData> } . The keys of this hash must match the attributes expected by the model. My particular post model requires a user_id, which wasn’t sent in the request body but is instead decoded from an Authorization token in the request headers. That’s happening behind the scenes in get_current_user() , and you don’t need to worry about it.
https://medium.com/better-programming/how-to-upload-images-to-a-rails-api-and-get-them-back-again-b7b3e1106a13
['Angus Morrison']
2019-11-14 13:02:19.829000+00:00
['React', 'Programming', 'Rails', 'JavaScript', 'Ruby on Rails']
The Music Plays On — Schubert Lieder
This will be the first of probably many blog posts on this subject since, first and foremost, Schubert wrote over 600 secular songs, and every one of them could be individually discussed in great detail. Also, there have been many singers, each one deserving a retrospective, who have made it part of their life work to specialize in singing these very special pieces. John Wustman The primary reason I decided to study conducting at the University of Illinois at Champaign-Urbana was to work with Donald Schleicher, an excellent teacher of conducting. However, the second reason was to be a fly on the wall of the great accompanist, John Wustman. He had visited my hometown of Reno, Nevada, to give a masterclass and he was the first person to reveal why I had such a fascination with Schubert’s songs. I wasn’t much of a singer, although I sang in chorus, and I wasn’t much of a pianist, although it is my first instrument and a tool I use to study scores. My main instrument was the French horn. However, I had a love for Schubert’s songs since high school and I think Mr. Wustman was rather bemused by my extensive knowledge, if I do say so myself, on something for which I had no vested interest as a student, per se. I audited Mr. Wustman’s Schubert Class for my entire first year. I watched my fellow students, singers and pianists, go through dozens of songs. We explored any and all meanings - and double-meanings — of every word, studied the myths that were referenced, ruminated on all emotional and philosophical content. It remains the most musical and intellectual class that I have ever taken and I learned more about music making than the majority of time I have spent making music. Here’s a wonderful example of his teaching: Here are some of Schubert’s Lieder I remember exploring during that glorious year with Mr. Wustman. I ended up being his page-turner for most of the class….I’ll never forget his “click, click” whenever he played Der Einsame….
https://donatocabrera.medium.com/the-music-plays-on-schubert-lieder-18acbf37e72a
['Donato Cabrera']
2020-09-02 22:00:32.627000+00:00
['John Wustman', 'Las Vegas Philharmonic', 'California Symphony', 'Donato Cabrera', 'Music']
Mr. President, At Least Tell Us How You’re Going To Protect People With Pre-existing Conditions
Mr. President, At Least Tell Us How You’re Going To Protect People With Pre-existing Conditions Actually, in a recent Executive Order he kind of does, and it’s not good. Trump’s long-awaited health plan doesn’t seem likely before Election Day, but we could at least expect some clarity on that one pledge, right? This newsletter has existed just about as long as Trump’s Presidency, and the earliest reference we could find to Trump saying his health care plan is ready-to-go took us back to a Washington Post story about a phone call with the President on January 14, 2017. In which the President referred to “nearing completion of a plan”, to replace Obamacare, he said then. On January 15, 2017! So when the President signs and then touts an Executive Order last month saying that people with pre-existing conditions will be protected, we don’t think it’s too much to expect an answer to the question: How? Let’s look at the Executive Order itself. Signed by the President on September 24 of this year. Surely there’s something in there. Starts out saying he’s all about: “[B]ringing great healthcare to the American people and putting patients first.” Which of course is just a bunch of words, because who wouldn’t want that? After a few pages, it comes to pre-existing conditions, where the President pledges a: “[S}teadfast commitment to always protecting individuals with pre-existing conditions and ensuring they have access to the high-quality healthcare they deserve.” That sounds nice too. But then there’s a big red flag. The President’s Executive Order refers to the Health Insurance Portability and Accountability Act of 1996, and argues that it already mandated coverage for people with pre-existing conditions, years before Obamacare. So Obamacare doesn’t really deserve any credit for that. That law is more commonly known as HIPAA. And most people know it because of its protections of patient privacy. But it was also meant to protect workers who lose group health insurance because they lose their jobs. To that end, it mandates any insurance company that sells individual plans must offer health insurance to them, even if they have pre-existing conditions. However, it does not require companies charge the same for everybody under those individual plans, as Obamacare does. And in almost all cases, premiums were far higher than in the worker’s previous group plan. As well as much more expensive in most cases than equivalent plans when Obamacare came along. Extend that context further and one might infer that Trump considers those HIPAA protections enough to say he’s sticking to his promise of protecting people with pre-existing conditions, if he ever does come up with a plan of his own. Or even a justification for why he’d still be covering people with pre-existing conditions with that alone, even if Obamacare is overturned and he replaces it with nothing. In fact, those individual policies were notoriously expensive. Particularly hard to keep up with when you just lost your job. So easy to slip through the cracks. Also, in order to qualify, you had to have recently had and lost a job. There were also a lot of other hoops to jump through to qualify: you must first have enrolled in the Federal COBRA plan, which allows somebody to extend the group health coverage they had at the job they just lost. The aim being to tide them over until they find another job, without having to switch to an individual policy with sky high costs. Oh, and one more thing: to qualify for any of that, a worker had to have active health insurance at their job for a period of at least 18 months, without a gap of more than 63 days. Obamacare doesn’t really have those kinds of restrictions. So in short, anybody who lost a job before Obamacare kicked in, knows how difficult and expensive it was to maintain health insurance. And if the President is pointing to what was happening in those pre-Obamacare days as a benchmark for protecting pre-existing conditions vs. Obamacare — which he is — then we likely got a real problem. Or maybe not. Maybe there are people out there, maybe even lots of people who believe the President does have a “beautiful” health care plan up his sleeve, which he has just never revealed for some reason, with far better coverage and far lower premiums. And if you do believe that and happen to be reading this, please do us just one little favor and ask yourself one simple question: if the President actually had such a plan, wouldn’t he be showing it off? Whether you support Trump or don’t, we can all agree the President is nothing if not a show off, can’t we? So for that reason alone, we don’t even believe Trump supporters believe he has a plan, yet he’s banking on their willingness to believe he’ll protect them whatever his plan turns out to be. Even if it turns out to be nothing. Because he’d be re-elected by the time he’s really compelled to deliver on it. That is, if the Supreme Court overturns Obamacare in the latest Republican run at it, including doing away with protection of people with pre-existing conditions, which Trump is simultaneously fully supporting. And at that point he wouldn’t be running for anything anymore, so it really wouldn’t matter. And we really don’t like to speculate on outcomes, especially on proposals that are kind of phantoms at this point. But based on past performance, we can probably narrow down what the President’s up to, to 1 of 3 possibilities: Trump’s lying. The loophole. Again, whether you support Trump or not, you’ve got to agree he’s the King of the loophole. So let’s use as reference for how this might work the 3 Obamacare replacement plans Congress failed to pass during the 1st year of Trump’s presidency, even though Republicans had full control. In those plans, pre-existing conditions would’ve been protected at the federal level. But states would’ve been allowed to apply for waivers where they wouldn’t have to stick with the federal plan. Actually, they can do so now, but only if they still meet all mandated federal requirements, which includes coverage of people with pre-existing conditions. Those new plans would’ve allowed states to separate those people out into “high risk pools” without specifying how they could ever adequately be funded. And it left open the possibility states could decide to allow insurance companies to charge higher risk people more. One of the bills allowed insurance companies to offer basically any kind of coverage they wanted, as long as they also offered at least one single plan that would cover pre-existing conditions. And presumably would be a lot more expensive. Would that meet Trump’s criteria? Probably, because back in 2017, he was ready to sign it. Finally, Trump has also favored making cheaper plans available that do not meet federal standards, but people could opt into to save money on premiums. Once you’re in that plan, in many cases you’ve opted out of coverage if in the future you have something that’s considered a pre-existing condition. But since it was your “choice” to give up that protection, Trump wouldn’t exactly be lying now would be? The technicality. Insurance companies have never been forbidden from covering people with pre-existing conditions, they just didn’t because it was too expensive for them. And technically, pre-Obamacare, someone with a pre-existing condition could’ve still gotten health care coverage, it was just exorbitantly expensive in most cases. So if things just went back to the way they were, the President could still technically say people with pre-existing conditions are covered, because he wouldn’t be doing anything to deny coverage to them. Whether they could afford it or not is their business. So the President saying that he’s going to do something means very little when what he might do could mean so many different things.
https://ericjscholl.medium.com/mr-president-at-least-tell-us-how-youre-going-to-protect-people-with-pre-existing-conditions-866a7037a2e0
['Eric J Scholl']
2020-10-27 12:55:21.311000+00:00
['Insurance', 'Healthcare', 'Politics', 'Health', 'Donald Trump']
Living with an Eating Disorder- Ever Wondered what It Feels like?
Living with an Eating Disorder- Ever Wondered what It Feels like? Letter from a twenty something me… Living with an eating disorder sucks! No one wants to deal with the constant fear, guilt, shame, and doubts. It’s an all-encompassing disorder, which slowly and steadily feeds off your energy, your relationship, and your life purpose. There are so many theories on how people develop an eating disorder, and yet they are not so satisfying to me. I can’t really blame it on my parents any longer, as I don’t feel that I can blame anything on them after I past the age of 12. I came to embrace the genetic component of the disease, and yet it doesn’t give me an answer to why I had to suffer more than my friends, and my sister. I do remember that almost all the girls in my class in high school “suddenly” dropped a considerable amount of weight, and stop buying salami sandwiches from the vending machine. Did they have an eating disorder as well? It was possibly more common than I thought, and we hide it very well between one strong espresso and a cigarette balancing on our lips. No one was talking about it, and if someone got caught in the act of vomiting or throwing away food…shame on them! They had a problem, and it was better to avoid them as if they were pests. At least, that’s what happened to me. Some of my oldest friends stopped answering my calls when I was 17 because I was a bad influence, and I was clearly anorexic. How sad! I even went to see a psychologist, and he had no idea what to tell me, as he was really fascinated by the facts that I didn’t want to eat “What about tomato pasta?” he dared to ask — nope dear doctor, not even tomato pasta. I went to see a different counselor, and I started blaming my dad; not because he had any fault in it, but simply because I wanted to feed the therapist with some “useful” information; she wrote down quite a lot during our session, and she never smiled or showed an understanding look. I obviously didn’t go back. Coming to think of it, I have seen more professionals that I can remember; once my mum drove us for two hours to a hospital specialised in eating disorders treatment, and I was met by a tiny little girl, an intern. She was skinnier than I was, and the first thing that she asked me to do was to step on the scale. “You are fine,” she told me quite abruptly: “You weigh more than I do.” And so, I’m asking all these overly charging doctors, “if I’m so fine, how come that I cried myself to sleep every night? That I fought with my parents at every meal? That I dropped 15 kilos in 3 months? That I vomited, purged, used laxatives and diuretics? How come that I went hours without touching water and foods, and then I gave in to starvation, and filled myself up to the brim, to the point of sickness?” No doctor or therapist really thought much of my situation, and they let me go as if that was just a phase that I was going to outgrow independently. “She is stubborn; she is crying for attention; she is just making it up.” I heard them all. Little did they care about my thinning hair, the lack of energy, the cold body, and the immense sadness that was looming around, like a hungry shark in a crowded beach. I didn’t choose it. And I coped it, mainly because I was repeatedly reminded that it was all in my head. I starved and stuffed my face every time I got an insufficient mark, whenever I had a fight with a friend, or if I got dumped by a boyfriend, or if my dad gave me the silent treatment. It was hard, and it caused me to brew so much hate. Sometimes it exploded on the outside, but most of the time, I kept it repressed, as I had no better way to express it than to write to a girl living in an imaginary, perfect world. I got weighed quite regularly by concerned family members that conveyed their distress by pulling my arm and yelling at me; I used to wear the heaviest shoes, and I filled my pockets with pebbles. I was constantly reminded about how wrong I was, how problematic I became, and “why was I so different from all the other normal kids?”. I wasn’t so different. I just wanted to belong. And the reality was that it hadn’t always been the same; I do remember a time where my weight wasn’t a concern at all; it was what it was. I stepped on a scale only when asked to do so, and whenever my peers made derogatory comments on the size of my legs, I didn’t overthink it. Slowly, slowly, society demands reminded me that I wasn’t allowed to be outspoken, that I had to behave as a good girl, and that I was expected to fit in the correct jeans size. And so, I did. Once again, I wanted to belong. That’s when I stopped having pizza, and all those delicious desserts were taken away from the table; I started daydreaming about the next time that I could enjoy an ice-cream, whereas only two months before it wasn’t such a big of a deal. I became food-obsessed, maybe because I was famished. And that’s when my story merges with the stories of millions of other girls out there. The more I lost, the more I got complimented on my efforts. Maybe I wasn’t bringing home the best marks, but I was the skinniest in the classroom, and people started noticing me. I went from being Miss no one to Miss someone. And it felt good because, all of a sudden, I belonged. I belonged to the unhappy group, to the troublemakers, to those kids that are sad and act out because they don’t know how else to express the pain they got inside. I didn’t get raped, and I didn’t come from poverty, but that doesn’t mean that I wasn’t scared, angry, and lonely. Where did it start? I’m here to share it all.
https://claudiavidor.medium.com/living-with-an-eating-disorder-ever-wondered-what-it-feels-like-8c61b9f4b2e3
['Claudia Vidor']
2019-11-11 15:26:02.199000+00:00
['Body Image', 'Eating Disorders', 'Womens Health', 'Health', 'Self Love']
Java To Kotlin Part 3 — Variables And Syntactic Sugar
Part 2 demonstrated most of the different ways that classes and methods can be used in Kotlin. Part 3 will demonstrate most of the cool things that Kotlin can do with variables. This is where things start to get interesting and fun. In Kotlin, member variables(class-level variables) are called “properties”, while local variables are called “locals”. As many parts of this blog post refer to things that can apply to both properties and locals, the word “variable” may be used as a substitute. Visibility modifiers (public/private/default/internal) Kotlin, like Java, has four visibility modifiers. There are the usual public , protected , and private modifiers, and they work the in mostly the same way as Java: public objects are visible anywhere that accesses the class it’s declared in. The public is considered redundant as the default modifier for variables is public . objects are visible anywhere that accesses the class it’s declared in. The is considered redundant as the default modifier for variables is . protected objects are only visible to the class they’re declared in and any child classes. objects are only visible to the class they’re declared in and any child classes. private objects are only visible inside the class they’re declared in. The only difference The fourth modifier is internal . A object bearing this modifier is only visible to every class in the same module. Constants Constants in Kotlin work a bit differently to Java. For starters they’re accessible from anywhere in the package or module they’re declared in. This means it’s possible to create a file to contain every constant for the module. Should a less public constant be needed, one of the visibility modifiers would work. Remember: the protected modifier will not work for constants in this context, as it’s outside of a class. Getters and Setters In Kotlin, all properties have invisible getters and setters. A property is only accessible through it’s getters and setters. The default getter and setters are transparent, so we just access the variable name instead. Manually adding getters and setters is not needed unless a variable needs to be modified before being set/get. Kotlin has a handy getter/setter combo for this: In this case, department can be null, but we don’t want to get or set it as null. Remember the part about Kotlin having built-in getters and setters? We don’t need to call getDepartment() , as that method is completely transparent. Instead we just access the variable as per normal: This would be a good time to show some cleaned-up decompiled bytecode for the above code: All nicely wrapped up for use in Java. If you’d like a custom getter and setter, the Kotlin standard recommends creating a dummy property with no backing field: The decompiled bytecode for this would be: The Elvis Operator There is the following expression in GettersAndSetters : This can be refined by the Elvis operator ( ?: ): This is a convenient shorthand expression that will set a nullable variable if it is not null, else set it to whichever value is on the other side of the elvis expression (or throw an exception, if that’s useful). Not-Null Assertion As demonstrated in parts 1 & 2, variables are made nullable using the ? character. A null-check can be made to assign a nullable variable to a not-null variable. If the situation arises when a nullable variable must not be null, the !! (non-null) operator can be appended to the variable when being used. This will throw an exception if the variable is null: The non-null operator actually converts the nullable type to a non-null type. non-Null asserting properties and variables should be done as early as possible. This should result in possible errors being detected earlier in code execution. Lateinit When a non-null var is declared, it must normally be assigned immediately. The lateinit modifier allows a var to be declared empty and assigned later: A value must be set to a lateinit var , or an UninitializedPropertyAccessException will be thrown when it’s accessed: String Interpolation String interpolation is one of my favourite Kotlin features. It allows the addition of variables into a String without resorting to concatenation: On the surface it looks simple. The decompiled bytecode code simply used concatenation: Methods calls can also be used surrounded by ${} : The above will be compiled into simple concatenation, so don’t be concerned about this being expensive at execution time. String interpolation also works with expressions: It’s not just limited to arithmetic: Interpolation can also be nested. This can be abused to create some pretty absurd and crazy logic that is guaranteed to attract the unbridled wrath of your coworkers: JoinToString joinToString is a handy method that outputs the contents of a collection to a String . The prefix, suffix, and separator can be defined. lastly, the maximum number of elements to add to the String can be specified: String Equality Kotlin has a much more mature outlook on String equality than Java. The .equals() method is no longer needed. That’s right. Strings can be checked for equality in the same way as anything else: Smart Casting I saved the best for last. Kotlin has an amazing smart casting system. It remembers what a variable has been cast to. This allows for some cleaner code than continually casting a variable: This is the end of Part 3. Compared to Parts 1 and 2, Part 3 included some more juicy stuff to sink your teeth into. Part four should be even better. Examples for Part 3 can be found here. Part 4 of the series can be found here.
https://medium.com/tech-travelstart/java-to-kotlin-part-3-variables-and-syntactic-sugar-3ada806252a6
['Michael Duivestein']
2019-03-04 19:34:39.806000+00:00
['Kotlin', 'Programming', 'Software Development', 'Java']
Code, Archeology, and Line Breaks
Code, Archeology, and Line Breaks Did you know \r and are remnants of typewriters? Photo by Bernard Hermant on Unsplash. Have you ever wondered how a new line is stored on a computer? You know, what happens when you hit “enter” in a text editor? On Windows, a new line is stored as the weird sequence \r . For example, the following text: Hello World! Is actually stored as Hello\r World! on a Windows system. It turns out \r is called a carriage return and is called a line feed. They are special characters that have their origins from typewriters. In the past, when people reached the end of a line on a typewriter, they pushed on a lever that did two things: It returned the carriage that held the paper so the typing position was moved to the start of a line. It fed a line so the typing position was moved downwards by one line. The combination of carriage return and line feed effectively moved the current typing position to the beginning of a new line. Today, the advent of modern computers and word processors have eliminated the need for typewriters. What’s left are the obscure special characters, \r and , in our machines. My mind was blown the first time I learned about this — what a piece of human history hidden in everyday code! Side note: Mac and Linux systems simply use the line feed character instead of the more verbose sequence \r to represent a new line. While it is more storage-efficient, it is technically not as “historically accurate.” There are more examples. The term “programming bug” was publicized because an actual bug once caused a machine to malfunction. The reason the programming language Fortran ignores whitespace is that people used to code on punchcards and it was easy to insert whitespace by mistake. It’s fascinating to think about how many anecdotes and patterns of human behaviors are hidden in something as mechanical and lifeless as computer software. On the other hand, we sometimes include elements from our real lives in our software intentionally. Designers call it a skeuomorphism, which means the incorporation of old familiar ideas into new ones. In a computer user interface (UI), folders resemble the shape of paper folders. Delete buttons look like trash bins. Save buttons look like floppy disks. The mapping from real-world objects to UI components helps people to quickly understand their functions. It gives people comfort because they are able to draw from their past experiences while interacting with new technologies. Skeuomorphism is most helpful during the initial transition period to new technologies, but when people eventually get used to the new tech, it loses its purpose. All that remain are legacy designs that have recognizable meanings, but not origins (I’m sure not everyone reading this knows what a floppy disk is). In 2020, GitHub, the largest software hosting service on the planet, announced the Archive Program. One of its initiatives is to archive all existing code repositories into a vault deep in an Arctic mountain. I suspect that in a hundred years’ time, archeologists will no longer study bones and ancient artifacts but our software. They will no longer dig for fossils but hard drives. They will no longer inspect cave paintings but pieces of lasered glass (yes, that’s how Microsoft’s Project Silica is planning to preserve large amounts of data for over 10,000 years). What will our future generations learn about us from our code? In a more philosophical sense, what will our future generations not learn about us? My Google search history, Amazon purchases, and Spotify playlists are used to train machine learning models that can predict my behaviors accurately. The countless images and videos on Facebook and YouTube can be used by models to identify me by my appearance, my voice, or even my walking posture. Don’t forget the sea of texts that companies use to train their voice assistants, translation services, grammar checkers, and more. Just recently, the GPT-3 model, which is trained on over 100 billion parameters, has shown uncanny general-purpose language capabilities that rival those of real humans. It has been used to create bots that generate code from plain English, write entire blog posts from short prompts, or engage in full real-time conversations with humans. More and more facets of our existence can now be reduced to parameters in a neural network. After we’re gone, we’ll still continue to exist as bits and numbers. What can future generations learn about us? What’s left for future generations to learn about us? Is our unprecedented technology boom helpful for future archeologists? Does having everything laid out so nakedly take away some of its beauty? Only time will tell.
https://medium.com/better-programming/code-archeology-and-line-breaks-86b38da32ca7
['Donovan So']
2020-12-29 16:03:46.828000+00:00
['Programming', 'Computer History', 'AI', 'History', 'Machine Learning']
How to Optimize Your Current Shoes for Better Foot Function
How to Optimize Your Current Shoes for Better Foot Function What you can do before stepping into minimalist shoes Photo by @felipepelaquim on Pexels I talk a lot about what good foot function is and how our shoes affect our feet. I’m also a huge proponent of minimalist footwear, as I’ve replaced my entire previous shoe selection with minimalist options now. They are a big transition too. I realize now that I jumped in quickly to that world, and I’m still slowly adapting to the new footwear. So what do you do if you want to eventually be operating barefoot or at least in minimalist footwear but you’re not there yet? Maybe the leap looks too big right now because you have foot pain or a previous injury that is still tender. Even older age will dictate a slower transition; the longer you’ve had your feet in damaging footwear, the more cast they are to fit that rigid style of shoes. Let’s take a look at what you can do right now to improve your foot function and ease any pain before you spend a lot of time barefoot or in minimalist shoes. Remove the Shoe Liner This is the thin insole that sits right under your foot inside the shoe. It should slip out pretty easily. This liner usually has a slight arch support to it, which if you’re trying to get stronger, you will not want. Arch supports are casts. They may stabilize your foot today, but they teach your foot and ankle to get weaker with time. The shoe liner is also just an extra source of padding. In a traditional pair of shoes, you will not need them. The sole of any regular shoe is already thick and sturdy enough to keep you from feeling most of the surfaces you step on. Also, the cushion tends to teach us to heel-strike our feet. It makes us feel safe landing heel-first because there’s so much protection we won’t feel pain. This teaches terrible walking gait, though; we should be opting for a midfoot or forefoot style landing. Removing this liner will also give a bit more space inside the shoe, so the muscles of your feet can engage more. Loosen Your Laces Strategically This one is mainly for your toe function, a crucial element of foot function. After you slip on your shoes, I want you to loosen the laces as much as you can near the toe box. You should notice the shoe “expand” as you do this because the laces held that area tightly together. This will give your toes slightly more room to operate and reduce your chances of getting bunions from the pressure on either side of the shoe. The only place you need to tighten your shoelaces is at the top of the foot. I would still recommend not doing them too tight. Our feet don’t need to be as airtight secure in there as we once thought. It’s better to allow all the muscles to engage properly and get blood flow in and out of the foot. Loosening your shoelaces should give you a noticeable relief from the restriction you once felt, especially in more narrow shoes. No Socks Socks are kind of like the accomplice to the crime who got away with it. Shoes take all the heat for damaging our feet, but socks are not much better. The elastic material pulls our toes in too close together and won’t allow them to spread out as they should. Socks also cause slipping inside the shoe, a very under-discussed point. Your feet want as much traction as they can get. But they can’t grasp anything when they’re covered by a smooth sock sitting on a smooth shoe sole. This creates a lack of control for the foot and an increase in slipping and running the foot into the shoe walls repeatedly. Removing your socks will again create some more room inside the shoe. The more room there is for the foot, the better toe and muscle function there will be. Wear Bigger Sizes If you have the option, try wearing a half to one size bigger of a shoe. This is something I’ll do with my boots and with a pair of my athletic shoes. By doing this, I get a bigger toe box to work with and a shoe that’s slightly wider overall so the sides of my feet aren’t pressed against the walls. A bigger shoe also keeps the ends of my toes from pressing against the end of the shoe. I’ve talked about this in a previous article, and it’s something to be careful of because it can cause mallet toes and bent toes.
https://medium.com/the-road-to-wellness/how-to-optimize-your-current-shoes-for-better-foot-function-e4441640a0d
['Will Zolpe']
2020-10-30 01:18:59.779000+00:00
['Shoes', 'Footwear', 'Health', 'Fitness', 'Foot Care']
Best Tech Stack for Mobile Development in 2020
According to Allied Market Research, the global mobile app market was estimated at $106.27 billion in 2018 and will reach $407.31 billion by 2026. Against the background of such activity on the market, creating a new application, you need to make an effort to make it competitive and interesting to users. The choice of technology for your project plays a major role in this process. A technology stack is a collection of tools, programming languages, frameworks, APIs, etc. that are used to create a specific product. It’s never the same and it differs from application to application, there is no universal set. How do you choose the best tools for your project and what you need to know about modern mobile technology? Let’s figure it out together. Read our new article How to Reduce Software Development Сosts Types of mobile app development Before moving on to considering specific technology, you need to know what type your application will be. There is no one-size-fits-all stack perfect for any project. It all depends on the requirements and your vision of the final result. Mobile apps can be divided into 3 types: native, cross-platform, and hybrid. We have already covered the difference between these applications in detail in the article The Types of Mobile Applications: All You Should Know Before Developing an App. Let us remind you briefly. Native apps According to statistics, this is the most common type of mobile applications. Native apps are developed for a specific platform: iOS or Android. The default browser, calendar, mail on your smartphone are all native apps, created taking into account the features of the operating system. Nexar is an example of such an app. By focusing on a specific platform, native applications are fast and efficient, they can work without an Internet connection, and are intuitive for the user. However, if you want to create an app that runs on both iOS and Android, you will have to develop two separate apps, which increases the development cost. Cross-platform apps The main advantage of this type of application is in the name. Cross-platform apps run simultaneously on multiple operating systems, which means developers can use the same code base that connects to native components via the so-called bridges. Cross-platform is achieved by compiling source code for execution on each platform. Each separate compilation will result in a separate executable file. This type of mobile development is cheaper than the native one. Yes, it sounds great, but as with each option, there are some drawbacks here. Cross-platform apps are less flexible, they are harder to maintain, and they have a lower user experience because this kind of app doesn’t take into account the uniqueness of each platform. Hybrid apps Hybrid mobile app development combines the best practices of cross-platform and native approaches. Hybrid apps can also run on multiple platforms, but they’re essentially web apps built using standard web tools and packed up in native containers. This structure allows these apps to run on iOS, Android, and web, but as expected, they have lower responsiveness and performance. You can also distribute hybrid apps using app stores. The choice of the type of mobile application depends on the characteristics of each specific project. For some apps, cross-platform comes first, for another, performance is key. We can briefly compare the strengths and weaknesses of all three types in the table below.
https://medium.com/ideasoft-io/best-tech-stack-for-mobile-development-in-2020-59fd7281735f
[]
2020-12-04 09:45:29.602000+00:00
['Tech Stack', 'Software Development', 'Mobile Development', 'Mobile App Development', 'Outsourcing']
Step-By-Step Classification Modeling
4. Model Check Model prediction and residuals The .predict method will provide model predictors: y_hat_train = pipeline.predict(X_train) y_hat_test = pipeline.predict(X_test) Residuals can be calculated by subtracting predictions from the original values, which are y_train and y_test . Confusion matrix To plot a confusion matrix, use the plot_confusion_matrix function from sklearn.metrics : plot_confusion_matrix(pipeline, X_test, y_test, cmap=plt.cm.Blues) It is a great way to visualize Actual Labels versus Predicted Labels. Confusion matrix Above, you can see a confusion matrix plot. By your classification model, the y-axis is True Labels and the x-axis is Predicted Labels. The target has 708 (673+35) values in 0-class and 126 (101+25) values in 1-class. The box on the top left corner(673) represents the 0 values that are predicted correctly by the classification model. The box on the top right corner (35) represents the 0 values that are predicted incorrectly by the classification model. Your aim is to lower the number of incorrectly predicted values. Classification report Use the classification_report function from sklearn.metrics to create an evaluation metrics table. This table represents the quality of a model: classification_report(y_test, y_test_pred) Classification matrix Precision measures how precise the predictors are: Precision = Number of True Positives / Number of Predicted Positives Recall indicates what percentage of the class is captured by the model: Recall = Number of True Positives / Number of Actual Total Positives F1-Score is the weighted average of Precision and Recall : F1-Score = 2 * (Precision * Recall) / (Precision + Recall) When checking for the quality of a model, it is imperative to decide which are evaluation metrics are more important for your dataset. AUC Score and ROC Curve AUC Score and ROC Curve are other evaluation metrics that provide information on the quality of the model: If your model doesn’t have the decision_function property, you may try using the model.predict_proba function. For the perfect ROC Curve, the area under the curve should be 1.0. The AUC value lies between 0.5 to 1, where 0.5 denotes a bad classifier and 1 denotes an excellent classifier. ROC Curve The graph above represents the ROC Curve for a classification model. It is obvious that the model is not doing very well. The goal is to get the AUC Score close to 1 and a ROC Curve with the max area (1.0) under the curve. An AUC Score around 0.5 is no better than predicting a random coin toss. Feature importance This evaluates the importance of the features in the classification model:
https://medium.com/better-programming/step-by-step-classification-modeling-6d820c5bea2
['Ulku Guneysu']
2020-12-14 18:39:17.185000+00:00
['Programming', 'Machine Learning', 'Classification', 'Data Science', 'Python']
Porn Tells Us How to Have Sex, And This is Killing Love
What wаs once considered а top-shelf guilty secret hаs turned into а mаinstreаm culturаl hаbit with аccess for аll, at the touch of a button, and with the popularization of smartphones available at our fingertips at all times swiftly and privately. Porn not only offers us entertainment in the form of explicit content it also shapes the way we behave in bed, defines sex and worst of all it acts as a new channel through which young people learn about sex and intimacy while at the same time they are telling us that it is liberating. We are currently living in a society where pornography acts as our de facto sex educator merely used as if it was an instruction manual. This is mainly due to the fact that sex education in schools — in some even non-existent — both in developed and developing countries usually don’t fill the gaps when it comes to porn, sexual consent, and relationships, only focusing on the biological mechanical parts of the sex. A survey carried last year in the UK among British adults found that online pornography, sexting, abuse, and violence are topics that they said should be tackled in class. It’s imperative that governments ensure that sex-ed goes beyond biology. This will prevent sexually transmitted diseases and sexual aggressions, not only in schools but altogether in society. Porn represents a wide cultural influence we can no longer ignore. The industry skews our perceptions about sexuality, intimacy, and marriage, ultimately distorting our reality which damages the way we love and how we perceive sex and relationships. Just like advertising, sex shown in pornographic films isn’t real. It’s an imposed fantasy, an illusion. In the real world: penises come in different sizes and shapes — this also applies to body types — erections don’t last for impossible amounts of time, people have unshaved pubic hair, sex isn’t hard, painful and quick — at least not all the time. Real life sexual experiences happen in a social context. Sexual engagement can be incredibly complex since it’s a form of human communication and interaction. We can’t expect adult film studios to understand in a vacuum such an intricate human concept. A growing body of evidence suggests that most of the time porn portrays a toxic version of what natural sex should look like. An unequal sexist version fabricated typically for men, and on top of it, the industry dictates what’s appealing and what should be considered sexy and what not in bed. Pornography eroticizes and normalizes violence in the form of kink and fetish, but also through aggression and control. This is dangerous since the only sex education some individuals have gotten entirely comes from the industry itself. We are in front of a huge sex social epidemic when the twisted unrealistic fantasies shown in adult content become a reality, this hugely contributes to a mainstream idea that violence in sex — usually against women — should be tolerated and desirable, but also enhances a culture of harassment which in the past year has had an incredible fallout. “Most commercial, mainstream pornography presents women in very narrow and callous and hostile ways.” — Michael Flood, Sociologist The porn that is being produced and sold to us is full of ideas and beliefs that are completely distorted, and that are in fact, opposite of what real sex, love, and relationships are like. Loving-healthy relationships are built on respect, equality, honesty. But in porn, this is quite the contrary, there, love and sex are based on domination, control, disrespect, and violence. Sweet, affectionate, caring interaction doesn’t sell, but degradation and abuse do. And there’s something deeply disturbing and concerning about an industry who profits from that. A recent study has found that the 50 most popular pornographic videos had a staggering 88% of scenes that included physical aggression, 48% of scenes included verbal aggression as well. The researchers observed a total of 3,376 aggressive acts, including gagging in 54% of scenes, choking in 27% of scenes and spanking in 75% of scenes where most of the violence featured was largely towards women and girls. Surprisingly, porn even damages our marriages and relationships. Research has shown that married couples who start watching porn are twice more likely to divorce than those who don’t. For women, it’s even worse, the chance of a woman splitting is three times as likely if they watch it alone according to the American Sociological Association. Nowadays, more men and women have the constant extreme habit of seeking an external sustained feeling of pleasure and reward, we do it with social media, alcohol, gambling, and sex it’s also part of this dopamine equation, this ultimately supersedes aspects of our functioning lives and relationships. Research suggests that porn triggers a neurological response that impacts intrinsic feelings of pleasure and reward subsequently distorting and damaging the brain. In addition, pornography hijacks the proper functioning of the brain and has a long-lasting effect on the consumer’s lives and thoughts. All of this is particularly harmful to those people prone to problematic and addictive behaviors. “Pornography is pornography, what is there to see? Movies are attempting to destroy something that’s supposed to be the most beautiful thing a man and a woman can have by making it cheap and common. It’s what you don’t see that’s attractive.” — Nancy Reagan Porn film studios frequently coerced performers — usually women — into rough-violent scenes they previously hadn’t agreed upon. Several advocates argue that the problem goes even further stating that these nasty practices fuel human trafficking. Solutions do exist. For starters, porn companies can produce movies with realistic sexual content that can be used constructively as an educational tool. As consumers, this is a societal problem that should concern us all. It seems sometimes that we are powerless when it comes to big consolidated companies, like the porn industry. But in order to bring change, we need to tackle these issues by making more informed decisions about factors that damage the way we behave sexually. We also, as adults must hold adult companies accountable for unfair representations of gender, sex, power and aggression, and to work along with young people to aspire to relationships and sexuality that in the end are respectful, loving, mutually nurturing and fully consenting. Online communities like NoFap on Reddit are helping young men and women with their porn habit addictions and are making a lot of progress in the past 7 years. For some members the forum it is a means to address concerns with their adult content consumption, while others see it as a means to healthier relationships. Powerful companies like Pornhub could, for example, address social needs as part of their core business and try to produce or host more realistic kinds of content as a way to help sexual literacy. Policymakers and educators should work along with adult content providers and companies on how they can use their platforms to communicate a more comprehensive sexual experience for their users, especially young uneducated ones. This is a more integral and effective way of making social change. Governments should examine the influences of porn, and come up with plans to promote respectful, equal and pleasurable roles for all genders, taking an inclusive approach that comprises the realities of sex, pleasure, and gender issues. Simultaneously, sex education should be compulsory in all schools and as Conservative MP Maria Miller told The BBC “Parents and children know they need help and that is why I want compulsory lessons at school to help children better understand the signs of an abusive relationship, issues such as consent, and the harm that is done by sexting and underage viewing of pornography. Better relationship education can help children handle these pressures better.” We urgently need to spark the conversation about sex, love and intimacy in our society, so big porn companies won’t have to do it for us.
https://orge.medium.com/porn-tells-us-how-to-have-sex-and-this-is-killing-love-4d82bc59f2e9
['Orge Castellano']
2018-01-18 18:15:06.900000+00:00
['Sexuality', 'Pornography', 'Love', 'Future', 'Sex']