teleren/devto huggingface dataset:
Why beeing 'privacy friendly' is not enough.
Tags: ux, watercooler, privacy, webdev
Published: 2020-07-07 10:46:39

Read the full version of this article on the [Offen blog.](https://www.offen.dev/blog/privacy-friendly-and-fair-web/)

Terms such as 'privacy-first', 'privacy-focused' or 'privacy friendly' have been frequently used in the field of web analytics for some time now. They appear on landing pages, in blog posts and readme files. Alternative projects such as Matomo, Simple Analytics, Plausible or GoatCounter are no exception. But **what do all these 'privacy' terms actually mean?**

The impression arises that developers use these terms primarily to describe technical features. There is the 'we do not use cookies' approach as well as the 'essential cookies only' solution. Others would like to let you know that they 'do not sell your data' or that their application is 'GDPR compliant'. Operators are given the feeling that they are doing something really great for their users. Annoying banners are eliminated, data is not passed on to third parties and also the 'GDPR problem' is solved. What more could you ask for?

Well, all these 'privacy friendly' approaches are **an improvement, but not enough to create a significantly better web.** Often the necessary level of fairness is missing. Users still cannot access their data, not to mention delete it. So they are still unaware of their situation and the latent distrust towards web operators remains. A problem that GDPR addresses explicitly under the headline 'Rights of the data subject'.

This is why we are developing [Offen.](https://www.offen.dev/) A fair and open **web analytics tool that treats operators and users equally.** Usage data is only collected after opt-in. If users choose to opt-in, they have full access to their data and can delete it. The collected data is presented to the user with detailed explanations of its meaning. At the same time, operators can gain valuable insights without violating the privacy of their users. 

By the way, Offen is now in beta phase. [Please take a look and give it a try.](https://www.offen.dev/try-demo/)

It is time to go one step further. We want to build a web that is finally **privacy friendly and fair.** Are you as enthusiastic about this as we are? Drop us a [tweet](https://twitter.com/hioffen) or email and feel invited to work together to drive this idea forward.
Building Todo App Actions and Reducers with Redux - Part 2
Tags: redux, react, beginners, tutorial
Published: 2020-07-07 10:54:44

In my last blog, I wrote about actions and reducers to `AddTodo` and `ToggleTodo`. Today I'll write about Visibility Filters. i.e., to show All, Active, and Completed todos.

Check Part 1 here
{% link https://dev.to/aneeqakhan/todo-app-actions-and-reducers-in-redux-part-1-pnf %}

##Scenarios
Let's dive into it. I want to show todos upon these three filters
- Show All todos
- Active todos
- Completed todos

##Action
First, define the action like this
```javascript
const setVisibiltyFilter = filter => {
  return {
    type: "SET_VISIBILTY_FILTER",
    filter: filter
  };
};
```
It'll take any of the above-mentioned filter types and pass it to the reducer to set visibility state.

##Reducer
Now its time to write `TodoReducer`
```javascript
const initialState = {
  todos: [],
  visibilityFilter: "SHOW_ALL"
};

const TodoReducer = (state = initialState, action) => {
  switch (action.type) {
    case "SET_VISIBILTY_FILTER":
      return action.filter;
    default:
      return state;
  }
};
```
It will set filter value passed it in action to `visibilityFilter` and its default value is `SHOW_ALL`.


Now to show selected filter todos on screen, I defined these three filters in `getVisibleTodos` reducer, its getting todos state in props from component and returning filtered todos.
```javascript
const getVisibleTodos = (todos, filter) => {
  switch (filter) {
    case "SHOW_ALL":
      return todos;
    case "SHOW_COMPLETED":
      return todos.filter(t => t.completed);
    case "SHOW_ACTIVE":
      return todos.filter(t => !t.completed);
  }
};
```


I map the `getVisibleTodos` to the component props like this and its returning todos list to component.
```javascript
const mapStateToTodoListProps = state => {
  return {
    todos: getVisibleTodos(state.todos, state.visibilityFilter)
  };
};
```

##Execution
You can check and run the app below.
{% codesandbox 920woynjn4 %}
Which is better, Python or C++?
Tags: python
Published: 2020-07-07 10:44:28

{% youtube TRa4wjYdIJ8 %}

[Learn Python Programming](https://gumroad.com/l/dcsp)

Between Python and C++ you can't answer which is better because programming languages are like tools. So that's like asking what's better a pen or a pencil?

If you want to develop high level apps, like <a href="https://pythonbasics.org/what-is-flask-python/">web apps</a>, <a href="https://pythonspot.com/game-development-with-pygame/">video games</a>, <a href="https://pythonpyqt.com/">desktop apps</a>, <a href="https://pythonprogramminglanguage.com/what-is-machine-learning/">machine learning</a> or <a href="https://python-commandments.org/current-date-and-time-in-python/">basic scripting</a> then you can go for Python

If you want to do <a href="https://en.wikipedia.org/wiki/Hobbyist_operating_system_development">operating system development</a> or electronics programming, you can use for C.

So it depends on the application domain. So for C is more low level stuff, and Python is more what the end user touches.
GraphQL better than REST?
Tags: graphql, opensource, beginners, todayilearned
Published: 2020-07-07 10:43:28

Well, after working with GraphQL for some time now I have understood quite well how amazing the tool is and the beauty of fetching the data. It's better than REST if you don't know already read my article here! :star_struck:

###:small_orange_diamond: REST Overview 
- A REST API is an architectural standard for network-based software.
- RESTful web services allow to access and manipulate the web resources using a predefined set of stateless operations like GET, POST, PUT, and DELETE. 
- The implementation of the client and server is independent of each other and does not affect each other's functionality. 
- One advantage of using REST is, it's scalable. The architecture decouples client and server which allows developers to scale products and applications indefinitely without much difficulty. 
- REST-based API requires multiple round trips. For example, if you wanted to retrieve data from two or more different endpoints, you’d have to send two or more separate requests to the REST API each time.
- Using REST also arises over-fetching and under-fetching. For example, you need to display a list of twitter users with their names and followers. But you receive a JSON data structure with the user data having user’s name, tweets, email and, address.

###:small_orange_diamond: GraphQL Overview
- GraphQL is a query language, a specification, and a set of tools that operates over a single endpoint using HTTP. 
- It has been to optimize for performance and flexibility. It provides detailed insight into the data that’s requested on the backend.  
- GraphQL uses a strong type system to define the capabilities of an API. All the types that are exposed in an API are written down in a schema using the GraphQL Schema Definition Language (SDL). 
- The GraphQL schema serves as the path between the client and the server to define how a client can access the data.
- GraphQL overcomes the problems of REST over-fetching and under-fetching in a smooth manner.
- It enables rapid product development and a large open source community to work with.

Some big firms that use GraphQL :

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/bu6ldyzqpouh19k3qgal.png)

###:small_orange_diamond: Conclusion
Both REST and GraphQL are unique ways to design how an API will function and how applications will receive data from it. While REST had significantly simplified the work of developers with its standardized approach, it does have a few drawbacks. GraphQL, with its queries, schemas, and resolvers offers more flexibility, moreover, GraphQL can offer better performance. Analyze your application, data, and performance requirements, so that you can choose appropriately.


Thanks for Reading. Happy Learning! :heart:
4 Amazing Tricks to Get the Most Out Of Your Team

Tags: productivity, webdev, career, management
Published: 2020-07-07 10:40:26

In my article “Remote Team: The Top Secret to Good Communication”, I discussed how to manage communication within a remote team. But, an important focus of communication should be CULTURE. 

In Tony Hsieh book “Delivering Happiness”, Tony talks about what makes people happy. And he lists just four items;

i.	Perceived growth, 
ii.	Perceived control, 
iii.	Connectedness, and 
iv.	Higher purpose. 

Simple as that. Want a performing team? Want a happy team? Deliver on all four. The first two can easily be solved by having a fair and accurate work tracking system with clear goals and deliverables... and by having a solid approach to learning and how you encourage it inside your organization. 

The third one, you handle by creating the virtual water cooler, but also try to have some face time as well. Have weekly video calls where you maybe talk about work for 30 minutes and just socialize the rest of the call. And depending on your location, have at least a yearly event where you all meet up and review, plan, and have fun. 

In fact, most organizations that work remotely share that they have such in-person events once or twice a year and that it has become essential to their growth. 

And the last requirement for team happiness is solved from the synergy of all your actions by having clear goals, delivering on your promises, having an open communication system, fair reviews, and acknowledgement. 

Simply said, actively defining and maintaining your culture. Or as Gary Vaynerchuk says it, culture is simple; 

•	The thing you wish you were doing, 
•	The things you're saying that you're doing, and 
•	The things you actually do. 

So make sure there is consistency and alignment between your mission, your actions, and your processes and policies... if you want your team to embrace the culture. 

And I'll remind you the benefits here;
•	Increased motivation, 
•	Increased performance, 
•	Loyalty, and 
•	A healthy work environment. 

And culture has become more important than ever. If you managed a team before, you know for sure how damaging the departure of key member is... and how difficult it is to keep good people in such a competitive market. 

Good organizational culture motivates and keeps the best hands.
Which database is suitable for Python Flask?
Tags: python
Published: 2020-07-07 10:36:49

{% youtube IOAphgHHEiw %}

[Learn Flask, Python Web Development](https://gumroad.com/l/IMzBy)

Flask is a micro framework, this means you can develop your app but you're not forced into a certain architecture like <a href="https://pythonprogramminglanguage.com/python-flask-vs-django/">django does</a>. 

So you can use any database system like <a href="https://pythonbasics.org/flask-sqlite/">sqlite</a>, <a href="https://python-commandments.org/python-mysql-tutorial/">mysql</a> or even an <a href="https://pythonspot.com/orm-with-sqlalchemy/">object relational manager</a>, but you don't have to. You are free to create your own app design, you can even chose not to use a database at all.

You can add any Python modules to your Python Flask web app!
在 ESP32 上以 MicroPython 使用 RFID-RC522 模組
Tags: esp32, micropython, rfid, rc522
Published: 2020-07-07 10:31:53

使用 ESP8266 撰寫 MicroPython 使用 RFID-RC522 模組時, 通常會載入 [mfrc522 程式庫](https://github.com/wendlers/micropython-mfrc522), 不過如果將這個程式庫直接用在 ESP32 上的 MicroPython, 會得到如下的錯誤：

```python
RuntimeError: Unsupported platform
```
這是因為這個程式庫內會排除他不認得的開發板, 如果要用在 ESP32 上, 就必須修改原始程式庫中 [mfrc522.py](https://github.com/wendlers/micropython-mfrc522/blob/master/mfrc522.py) 的第 32 行, 讓它可以認得 ESP32：

```python
        elif board == 'esp8266' or board == 'esp32':
```
其餘程式都不需要修改, 將此檔案上傳到 ESP32 後, 就可以撰寫 MicroPython 程式使用 RFID-RC522 模組了, 例如：

```python
from machine import Pin
import mfrc522, time

rfid = mfrc522.MFRC522(
    18, # SCLK
    23, # MOSI
    19, # MISO
    21, # RST
    15  # SDA (CS)
)

led = Pin(2, Pin.OUT)

while True:

    led.value(0)  # 搜尋卡片之前先關閉 LED
    stat, tag_type = rfid.request(rfid.REQIDL)  # 搜尋 RFID 卡片
    
    if stat == rfid.OK:  # 找到卡片
        stat, raw_uid = rfid.anticoll()  # 讀取 RFID 卡號
        if stat == rfid.OK:
            led.value(1)  # 讀到卡號後點亮 LED
            
            # 將卡號由 2 進位格式轉換為 16 進位的字串
            id = "%02X%02X%02X%02X" % (raw_uid[0], raw_uid[1],
                                       raw_uid[2], raw_uid[3])
            print("偵測到卡號：", id)
            
            time.sleep(0.5)  # 暫停一下, 避免 LED 太快熄滅看不到
```
只要是可用來輸出訊號的腳位都可以當成 SPI 通訊的腳位。
Activate CSS Overview Tab in Chrome 💻
Tags: css, webdev, productivity, tutorial
Published: 2020-07-07 10:31:52

---
title: Activate CSS Overview Tab in Chrome 💻
published: true
description: Learn how to activate a new experimental feature in Chrome, "CSS Overview".
tags: css, webdev, productivity, tutorial

---
There's a cool new feature in Chrome. It's in the "experimental" features so it's still in development. 

{% youtube T05MBbDz5FU%}

Steps to activate it you: 
* Open the dev tools - `Command+Option+I` on Mac & `Control+Shift+I` on Windows.
* Click the settings button (it looks like a big cog). 
* Click the "Experiments" tab.
* Check the "CSS Overview" option. ✅
* Close the menu (and you may need to reopen the dev tools).
* Check out a shiny new "CSS Overview" tab.

Now to use it all you have to do is click "Capture Overview" to get the overview of any page.


I hope this tip helped and until the next one, happy coding! 💜

---

[Follow me on Twitter](https://twitter.com/nialljoemaher)

Subscribe on [Codú Community](https://www.youtube.com/c/Cod%C3%BACommunity)
Post Makers - Week 16
Tags: jobhunt, interview, techtest, juniordev
Published: 2020-07-07 10:30:26

Another week has passed and now 4 months have elapsed since graduating...although this week ended on a slight different note!

It seems that someone heard my rants from last weeks post and I was lucky enough to have two interviews! The first was for a Fintech company, and after speaking to the recruiter (and bonding over our love of food) I was out forward to the technical round which I will elaborate more on next week once I have received it! 

The second interview was for an exciting start up in a SaaS company. The company has great reviews, the team seem super young and motivated and the prospect looks like a great long term option! I'm trying not to get too ahead of myself and just keep calm and take each step as it comes. After 4 months of nothing, 2 in the last week seems like a dream!

Other than that, I have been spending time searching more about React and the 'proper' layout and composition of components, and when to use hooks ect...it's a great learning curve as I am tweaking the famed covid project with these changes, adding a router, reducing the amount of prop drilling and adding tests!

More to follow on the interviews next week!

As always stay safe,

David
How to build websites with Python
Tags: python
Published: 2020-07-07 10:30:01

{% youtube u_JOjfArkhQ %}

[Learn Flask, Python Web Development](https://gumroad.com/l/IMzBy)

This explains how to build Python web apps, how to deploy it, how to do routing, templates etc. This will really improve your Python skills.

A module that lets you do that is the Flask module. Large companies are using Python Flask in order to create their web apps, so you don't have to worry about scale to much. You can use it to build a web app or an <a href="https://pythonbasics.org/flask-rest-api/">API</a>

If you want to make <a href="https://pythonprogramminglanguage.com/python-flask-tutorial/">websites</a> or <a href="https://pythonspot.com/flask-web-app-with-python/">web apps</a> with Python you can with Flask.
3 persons you should be nice with to feel better
Published: 2020-07-07 01:50:07

There are 3 extremely important persons in everyone's life that you should be nice with: past self, current self and future self.

## Past self

Past self is the one easiest one to be discontent with. They forgot something important, they go to sleep at 4 am when you need to wake up at 8 am next day, they said something embarrassing and it haunts you till today. We all have something that past self did wrong and feel [anger](https://en.wikipedia.org/wiki/Anger) or [remorse](https://en.wikipedia.org/wiki/Remorse) about that. 

But don't forget that past self definitely made something you still remember with slight smile: that one time they gave the perfect presentation, huge task that they managed to do in record time and everybody was shocked and plainly million of micro-achievements like brewing an amazing cup of coffee on that Wednesday in July.

Past self has its good and bad times and we tend to remember bad times more often and overthink how they should've acted and how they were so naive. But that is not healthy to circle around something that happened. Look at past self, check how you feel now about that now and make a mental note how you should handle a similar situation. Be nice to past self and let it go.

## Current self

Current self is a mediator between past self and future self and is always present with you. It is easy to ignore them and continue doing whatever you were doing, while you should be listening to current self all the time. When current self suddenly wants a cup of hot tea then you should just go and make it.

Don't test patience of current self, every time they are ignored they will take it personally. Ignoring desires of current self is destructive and can lead to [frustration](https://en.wikipedia.org/wiki/Frustration). Answering to their desires is a healthy habit to feel better.

But, you shouldn't do whatever current self wants. Sometimes they have irrational desires which should be filtered with a good reason why you shouldn't eat a soup with a knife. Be nice to current self and respond to its desires timely.

## Future self

Future self is the most mysterious of them. You can never tell what they want, what they know and what is happening in their life. But they will carry all the troubles current self has and you should work together with them to improve life of future self.

An every task you have right now will be either finished or postponed by current self. Some tasks should be done by current self but it is getting postponed indefinitely. Such tasks most probably give you certain level of [anxiety](https://en.wikipedia.org/wiki/Anxiety) and will do every time you postpone it again and again. Just throw away this yogurt cup that is sitting on your desk since morning and reply to a message on a phone. Be nice to future self and finish minuscule tasks ASAP and plan other ones properly.
Augmented Reality Market: Integration of Artificial intelligence in AR to Augur Well for the Market 
Tags: beginners
Published: 2020-07-07 10:24:27

The growing application of AR in various industries for monitoring and training purposes will bolster the healthy growth of the market during the forecast period. AR can enhance the effectiveness of training, especially for complicated or rare tasks, besides reducing the overall cost. Therefore, organizations around the world are utilizing AR to educate and train employees with its immersive solutions, and interactive training environment. For instance, the US Department of Agriculture’s (USDA’s) Food Safety and Inspection Service (FSIS) have started the implementation of digital reality, which includes AR and VR for training programs. 
For More Info@ https://www.fortunebusinessinsights.com/augmented-reality-ar-market-102553
How to debug a Flask app?
Tags: python
Published: 2020-07-07 10:23:24

{% youtube BRZYR6nbd2o %}

[Learn Flask, Python Web Development](https://gumroad.com/l/IMzBy)

If you want to debug your Python Flask app, that's easy to do. So what you want to do is, in your app object add the parameter debug is true. 

    app.run(debug=True)

The  app then outputs a lot more data.  All of the data is shown in the terminal.

For more Python debugging, you can reference this article https://pythonspot.com/python-debugging/
What keyboard do you use?
Tags: webdev, discuss, productivity
Published: 2020-07-07 10:21:02

---
title: What keyboard do you use?
published: true
description: 
tags: webdev, discuss, productivity
//cover_image: https://direct_url_to_image.jpg
---
Laptop user here, looking for solid keyboard options to upgrade.
What keyboard do you use and why did you choose the particular model?
How I can invoke locally my lambda using API Gateway Websocket $connect and $disconnect routes so I can debug them?
Tags: help, aws, lambda, websockets
Published: 2020-07-07 10:09:11

I need your help with this:

{% stackoverflow 62772813 %}

I try to run locallym an aws lambda that is triggered via API Gateway's websocket. Based upon this: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-start-api.html I tried to run it locally without a success.
What is Python Flask?
Tags: python
Published: 2020-07-07 10:05:58

{% youtube A07Fwy4nYHA %}

Learn Flask: https://gumroad.com/l/IMzBy

If you want to make web apps in Python, like a SaaS. You can. There are several frameworks to chose from like Tornado, web2py, Django and Flask. Flask is a module (framework) for Python. You can use this module to build your web apps. 

You can link any web url to a Python function, and the output of that Python function is shown to you in the browser.  You can output strings, but you can also output <a href="https://pythonbasics.org/flask-tutorial-templates/">templates</a>. Data can be added to a template, and show in a nice format. Flask uses the <a href="https://pythonspot.com/jinja2-template-engine/">Jinja2</a> template engine.

Flask gives you a lot of freedom in terms of designing your app. You can just load the Flask module and add any other modules you want. Unike <a href="https://pythonprogramminglanguage.com/python-flask-vs-django/">Django</a> that forces you to use an <a href="https://pythonspot.com/orm-with-sqlalchemy/">ORM</a> etc. Flask lets you add what you want, so you are free to add a database, orm (or not) etc.
Automatic switching Dark/Light Mode
Tags: css, webdev
Published: 2020-07-07 10:01:31

Much has been said about switching the dark/light mode of a web page, but let's try switching themes automatically, depending on the selected theme in the operating system.

Let's start by defining the basic styles: 
```css
:root {
  --text-color: black;
  --body-bg: white;
}

body {
  background-color: var(--body-bg);
  color: var(--text-color);
}
```
Now we are adding the **preferences-color-scheme** media function to define the system theme. And according to the chosen theme we will change the root-variables:
```css
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: white;
    --body-bg: black;
  }
}
```
Now when the user changes the system theme to black, we get white text on a black background.

We can also define values for a light theme using the "light" value.

[Support](https://caniuse.com/#search=prefers-color-scheme) for this method is not yet 100%, some browsers are still lagging behind progress. Therefore, do not rush to remove the button to switch themes. But nothing prevents you from using this magic right now.

Happy coding!

Sources for reading:
[Using CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties)
[prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
Some Developers are required.
Published: 2020-07-07 09:36:45

We have created a group to build a product as Tick-tok, Facebook , Twitter or Instagram.But, Unique.We need someone whose have little experience on Golang, Python ( Backend) ,React, React Native (Frontend) with Postgresql.So,If you wanna to join with us then go head and text on whatsapp +91 6370343601.