teleren/devto huggingface dataset:
Docker และ Containerization 101 หน้าตาประมาณไหนนะ
Tags: docker, containerization
Published: 2022-08-27 14:22:34

Source Code เมื่อพัฒนามากขึ้น จำเป็นต้องมี Environment ที่เหมาะสมเพื่อให้ทำงานได้ เช่น เวอร์ชั่นของ library, สิทธิของโปรแกรม, รวมถึงเรื่องอื่นๆ ทำให้หลายๆ ครั้งเราอาจจะพบกับปัญหาการทำงานร่วมกันภายในทีม เนื่องจาก Souce Code รันได้จากเครื่อง A อาจจะใช้ไม่ได้กับเครื่อง B เป็นต้น

## Containerization
![Containerization Architecture](https://www.docker.com/wp-content/uploads/2021/11/docker-containerized-appliction-blue-border_2.png)
 เกิดมาเพื่อแก้ไขปัญหาดังกล่าว โดยดึงศักยภาพบางส่วนของ Virtualization มาใช้ แต่ทำให้ขนาดเล็กลง และใช้งานได้ง่ายขึ้นเพื่อการ Automation 

## Docker
![Docker Architecture](https://docs.docker.com/engine/images/architecture.svg)
คือ Containerization ตัวหนึ่งที่ทำหน้าที่จำรอง environment ที่เหมาะสมให้กับ Souce Code เพื่อใช้งาน โดยตัว Docker นั้นมีโครงสร้างพื้นฐานประกอบไปด้วย 4 ส่วน ได้แก่

![Docker Image & Container](https://miro.medium.com/max/1400/0*D4DUZT7y-JD2qyWP.png)
**1) Docker Image** ทำหน้าที่เป็นส่วนเก็บชุดคำสั่งสำหรับการจำรอง environment ที่เหมาะสม ซึ่งเกิดจากการลง build รายละเอียดคำสั่งจาก Dockerfile

**2) Docker Container** คือตัว docker image ที่ถูกนำมาเปิดใช้งาน จำรอง environment บน docker host เช่น เรามี image ที่ทำหน้าที่เป็น nginx web server เมื่อเรา build image ตัวดังกล่าว เราจะได้ container หนึ่งตัวมาใช้งานบนเครื่อง

![Docker Daemon](https://nickjanetakis.com/assets/blog/dockers-architecture-6c296cdac053f794eabed5ddda5c04ba7110c746687a0e8b88ba6df919415175.jpg)

**3) Docker Host & Docker Daemon** คือส่วนของเครื่องที่ติดตั้ง Docker เอาไว้ โดยตัว Deamon คือ core กลางสำคัญสำหรับการรับคำสั่งต่างๆ จากนักพัฒนา เช่น docker build, docker pull, docker run เป็นต้น

![Docker Registry](https://miro.medium.com/max/748/1*OvIY-LZD4Y-edFTI8J5ZrQ.jpeg)
**4) Docker Registry** คือส่วนที่เก็บและกระจาย docker image ที่ได้จากนักพัฒนาหรือองค์กรต่างๆ ซึ่งโดยปกติเมื่อสร้าง image เสร็จบน local environment และอยากให้คนในทีมได้ใช้ image ตัวดังกล่าว จะต้องนำมาเก็บไว้บน registry

Reference & Credit:
- image:
- https://docs.docker.com/engine/images/architecture.svg
- https://www.docker.com/wp-content/uploads/2021/11/docker-containerized-appliction-blue-border_2.png
- https://miro.medium.com/max/1400/0*D4DUZT7y-JD2qyWP.png
- https://miro.medium.com/max/748/1*OvIY-LZD4Y-edFTI8J5ZrQ.jpeg
- https://nickjanetakis.com/assets/blog/dockers-architecture-6c296cdac053f794eabed5ddda5c04ba7110c746687a0e8b88ba6df919415175.jpg
You’ve got to start with the customer experience and work backward to the technology – Steve Jobs
Tags: uncategorized
Published: 2022-08-27 16:36:36

---
title: You’ve got to start with the customer experience and work backward to the technology – Steve Jobs
published: true
date: 2022-08-27 13:54:48 UTC
tags: Uncategorized
canonical_url: https://davidloor.com/2022/08/27/youve-got-to-start-with-the-customer-experience-and-work-backward-to-the-technology/
---

![You’ve got to start with the customer experience and work backward to the technology – Steve Jobs](https://i0.wp.com/davidloor.com/wp-content/uploads/2022/08/pexels-photo-6956182.jpeg?resize=800%2C1200&ssl=1)

This post is just a reminder for myself in the future when I start a new technology project. The focus should be in the Customer Experience. Understanding the customers’ needs, the problems that they are facing at the moment, and only then determine the best tools that will be used to implement the solution.

<iframe loading="lazy" title="Steve Jobs Insult Response - Highest Quality" width="800" height="600" src="https://www.youtube.com/embed/oeqPrUmVz-o?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

> _ **You’ve got to start with the customer experience and work backward to the technology.** You can’t start with the technology then try to figure out where to sell it._
> 
> <cite>Steve Jobs</cite>
Machine Learning: The Right Approach
Tags: machinelearning, python, datascience, idea
Published: 2022-08-27 13:43:00

As a Machine Learning enthusiast, I have always Googled about how to learn ML the right way, but in the actual sense , there is no general way to approach Machine Learning apart from taking insight into data to solve future problems.

Despite the fact that there is no general way, some ways can be easier, for example using Scikit-Learn pre-built algorithms is easier than trying to create those algorithms from scratch.

So,however you plan on learning Machine Learning , always have in mind that the goal is to solve data related problems and not create fancy models. 

Happy Learning.. 💙
Need little guidence/help 🔆
Published: 2022-08-27 13:41:44

Hello There,

I am using a react-calendar-library for plotting some events.  Everything is working fine but the issue is I have to press f12 or change window size so that the events can render on the calendar. 

**Here's the before pressing f12 image**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j0q8md31jhohn9angpem.png)

**Here's the after pressing f12 image**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/imwe0g6p38vktckxudr2.png)
Set Mismatch
Tags: leetcode, python
Published: 2022-08-27 13:21:00

You have a set of integers s, which originally contains all the numbers from 1 to n. Unfortunately, due to some error, one of the numbers in s got duplicated to another number in the set, which results in repetition of one number and loss of another number.

You are given an integer array nums representing the data status of this set after the error.

Find the number that occurs twice and the number that is missing and return them in the form of an array.



```py

from collections import Counter

class Solution(object):
    def findErrorNums(self, nums):
        """
        :type nums: List[int]
        :rtype: List[int]
        """
        
        def findMissing(ns):
            for i in range(1, len(ns) + 1):
                if i not in ns:
                    return i
        
        
        c = Counter(nums).items()
        res = 0 
        
        for k, v in c:
            if v == 2:
                res = k
                break 
        
        return [res, findMissing(nums)]
            
            
        



```
I'm Hiring a DevOps/SRE Engineer!
Tags: hiring, devops, kubernetes
Published: 2022-08-27 13:20:32



## tl;dr 
- [Site Reliability Engineer Job Posting](https://recruit.hirebridge.com/v3/CareerCenter/v2/details.aspx?cid=7880&jid=582253&locvalue=1023&request_id=412722&fbclid=IwAR2f_1jmo7VrX8g-u5wq3YP31Vt0SDRwiQYcYOO6_xFicUvQHMWfFb1hS_M)
- Looking for a senior level, someone who can own projects after onboarding 
- Primary cloud provider is GCP.  Also have a small AWS footprint
- Kubernetes
- We're remote-first + international (some geographic restrictions may apply) 


## The Pitch
The time has come yet again for me to add another engineer to one of my teams!  I'm looking for a senior-level Site Reliability Engineer to join Kazoo + WorkTango!  If you have experience with DevOps, GCP, Kubernetes, and Terraform, I want to hear from you!  See the job posting link for full details of the role and responsibilities.  

Kazoo + WorkTango is a private-equity backed B2B SaaS business providing Employee Engagement, Employee Listening, and Performance Management tools to businesses.  Our company is remote-first and has an international workforce, so don't feel discouraged if you don't live near one of our physical locations.  

I've been with the company for 8 years now (fun fact: I have the most tenure here of anyone) and speak to many different aspects of this business.  If you have questions as you consider applying, let me know!
Why You Should Learn About Pytorch?
Tags: machinelearning, deeplearning, datascience, python
Published: 2022-08-27 13:17:40

Pytorch is a powerful open source deep learning framework that is quickly gaining popularity among researchers and developers. While it may be initially daunting to learn, the benefits of using Pytorch are vast. In this post, we will discuss some of the key advantages of Pytorch

As machine learning becomes more and more popular, there is a growing demand for tools that can help developers create sophisticated models. Pytorch is one such tool that has gained popularity in recent years. Pytorch is a powerful open source library that provides all the necessary building blocks for creating neural networks. It also has a rich ecosystem of supporting libraries that make it easy to train and deploy machine learning models. In addition, Pytorch is highly extensible and can be used on a variety of platforms. As a result, it is an excellent choice for anyone looking to get started with machine learning.

Deep learning is a rapidly evolving field of machine learning that is providing new insights into a variety of complex problems such as image classification, natural language processing, and predictive analytics. Pytorch is a popular open-source deep learning framework that is designed to be easy to use and flexible. Here are 10 reasons why you should learn Pytorch for deep learning:

Pytorch is easy to use and understand, making it a great choice for beginners.
Pytorch is highly customizable, allowing you to design custom architectures for your specific needs.
Pytorch has excellent documentation, providing clear and concise examples for each function.
Pytorch is well supported by the community, with many helpful discussions and tutorials available online.
Pytorch is efficient, both in terms of computation time and memory usage.
Pytorch is compatible with a variety of different hardware platforms, making it easy to deploy your models on different devices.
Pytorch offers strong support for data parallelism, making it easy to train large models on multiple GPUs.
Pytorch integrates seamlessly with other popular software packages such as TensorFlow and Keras.
9.Pytorch allows for dynamic computation graphs, which can be useful for certain types of models such as recurrent neural networks (RNNs).
10.Pytorch's development team includes many well-known experts in the field of deep learning, ensuring that the framework stays up-to-date with the latest advancements in the field.
Conclusion paragraph: In conclusion, learning PyTorch will benefit you in the long run. The framework is being rapidly adopted by major companies and has a growing community of developers. It provides great flexibility and speed for deep learning applications. While there are some challenges to overcome when learning PyTorch, they are outweighed by the benefits of the framework. If you want to be at the forefront of deep learning development, then you should start learning PyTorch today!

If you want to stay in touch with me consider subscribing to my [newsletter](https://poetryandphilosophy.substack.com)
Strive for a minimum required state in a React component
Tags: react, javascript, webdev, beginners
Published: 2022-08-27 12:51:00

Keep a component state as minimal as possible and avoid unnecessary state synchronization .

🚫 **Before refactoring** - _b_ is a redundant state which should be sync:
```js
export default function App() {
  const [a, setA] = useState(1);
  const [b, setB] = useState(1);

  function updateA(x) {
    setA(x);
  };
  
  function updateB() {
    setB(1 + a);
  };
  
  useEffect(() => {
    updateB()
  },[a])


  return (
    <div>
      <button onClick={() => updateA(a+1)}>Click</button>
        <p>a: {a}</p>
        <p>b: {b}</p>
    </div>
)
};
```

✅ **After refactoring** - _a_ is a minimum sufficient state and just derive _b_ from it:
```js
export default function App() {
  const [a, setA] = useState(1);

  function updateA(x) {
    setA(x);
  };

  function updateB() {
    return a+1
  };

  return (
    <div>
      <button onClick={() => updateA(a+1)}>Click</button>
      <p>a: {a}</p>
      <p>b: {updateB()}</p>
    </div>
  )
};
```
Scaling HTTP request with responses
Tags: backend, scalability
Published: 2022-08-27 11:47:13

I'm trying to understand how to be able to scale requests which need.
We have a REST API backend hosted in AWS ECS instances, and of course we can scale-up horizontally when needed.
The question is how to deal with peaks, or an increase in requests while the scale-up is in progress without losing any requests.
I found many posts about using queues, but mainly for jobs that are fire & forget.
I assume handling scale for HTTP requests where a response to the client is required is a very common issue.
Examples include a user trying to get or update info about himself (`GET /user` or `POST /user`). These requests need to return information or sometimes an error code (e.g. data is invalid / DB data conflict occurred).
Of course we can use caching to reduce the processing time for a request, but still that doesn't eliminate the ability to handle a sudden increase in requests.
Using queues for this case means that the backend should queue the request and then after the request is handled, needs to wait for it to be processed and return a result / error code to the blocking client.
Meaning handling these types of requests asynchonously.
While technically it may be possible, this complicates the implementation, and I'm wondering if I'm missing anything simpler.

What is the best practice for this?
Introduction to Python for Data Engineering
Tags: python, datascience, beginners, codenewbie
Published: 2022-08-27 11:33:00

Welcome to the official trailer of python for data engineering.
Let's get started!

<u>What is data engineering?</u>
Data Engineering is a field that focuses on creating data pipelines which makes it possible to take huge data amounts and translate into insights.


<u>Data Engineering vs. Data science vs. Data analytics</u>

 

- Data Engineering focuses on building of systems so as to enable data collection.

- Data science is the field that uses statistics and programming skills to extract information from data.

- Data analytics involves examining data sets so as to make meaningful conclusions.

Data engineers,data scientists and data analysts work in tandem;data engineers create data pipelines which are then used by data scientists to analyse the given data set which is finally used by a data analyst to make sense of the given data.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p3jzfkvoinvj3padj8n0.png)


<u>What is Python?</u>
Python is a popular programming language that is versatile in nature.

<u>Why is Python preferred in data engineering?</u>
It is suitable in the data engineering field since it's easy to use and also easy to learn.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zmsjzvp4sbrdw5io8xs8.png)


<u>How is Python used in Data Engineering?</u>
Python is used in Data Engineering for various purposes such as coding an ETL framework,API interaction, building data pipelines, automation.
The following packages are useful in data engineering;
Pandas
pygrametl
petl
Beautiful Soup
SciPy

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/to2mqcv4sstujepq98hu.png)


<u>How to learn python efficiently for data engineering.</u> 

- Start by researching on what to cover during the learning process.

- Plan the topics in order and how you plan to learn them.

- Identify the resources you'd like to use when learning, the resources that maybe handy include; 

a)freecodecamp

b)Datacamp;
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1b0c1l3srsxx9pxcm4a9.jpeg)

c)Sololearn

d)Codeacademy 

e)learnpython.org

f)W3school

g)Pytutorial

h)Udacity

i)Udemy

- Afterwards ensure to try and tackle projects using what you've learned either on a daily or weekly basis.

- Lastly, consistency is very vital as you start your journey, let consistency be your drive.

I hope this article has been helpful and that it has provided a pathway to dive into the world of data engineering.
Sitemaps - An Untold Story #shorts
Tags: programming, javascript, webdev, tutorial
Published: 2022-08-27 10:56:27

Sitemaps tell the search engines how many and what all pages are available on your site 

For example, your website will have blog page, checkout page, home page, about page and by adding them in sitemaps XML we made it easy for google search engine to read these pages and rank them accordingly, hence improving the SEO.

[Sitemaps - An Untold Story]
(https://youtube.com/shorts/hqLt7RBnPbA)

Conclusion
Until next time, have a good day.

Keep developing!!
Our website [iHateReading](www.ihatereading.in) || [Youtube](https://www.youtube.com/channel/UC6I-Tz6QwYbJpoIK7l0NtXA) || [Twitter](https://twitter.com/treyvijay)
Quick look at Supabase, best Firebase's alternative
Tags: supabase, javascript, tutorial, beginners
Published: 2022-08-27 09:58:23

{% embed https://www.youtube.com/watch?v=YN32uVqAXw8 %}

## What is Supabase?

In 2011, Google launched Firebase, a software platform designed to help developers create and deploy apps. In 2020, the industry was met with an introduction to Supabase, an open-source alternative to Firebase which offered many of the same features.

Supabase markets itself as a direct replacement for Firebase, providing similar services and enabling you to pick and choose which ones you need. But is it the perfect solution for web development? Here's an introduction to Supabase to help you decide.

Supabase's core features include database, authentication, file storage and auto-generated APIs. In other words, Supabase promises to offer everything you need to build a mobile app. For example, Supabase offers real-time data synchronization between your database and mobile devices.

## Supabase vs Firebase?

While Supabase is still in its infancy and has not yet received the years of support and updates that Google's Firebase has, the Supabase team strives to be just as good as, if not better than, Firebase.

The fact that Supabase is still relatively new should be taken into account because it has not reached the same level of popularity or support as Firebase.

It provides all of the backend services you need to build a product, including payment processing and customer support. You can use it completely, or just the services you require.

In this video, I'll quickly look at how to setup a supabase app with Vue.js

Links:

Github repo - https://github.com/zernonia/supabase-vue-3
Full guide - https://supabase.com/docs/guides/with-vue-3
How to solve: Too many redirects website error after adding SSL(lets encrypt) to nginx server?
Tags: nginx, cloudflare, ssl, letsencrypt
Published: 2022-08-27 09:56:27

So after adding lets encrypt on my server using certbot, i was asked if all HTTP traffic should be redirected to HTTPS. I gladly said yes and i was happy about my decision. Unfortunately When i checked the website again, it wasn't working, displaying a `too many redirects error`. What had i done wrong? and What's the solution?

Turns out the solution is to change the SSL/TSL to full(strict) in the cloudflare dashboard and that did the trick. Also if no ssl is setup on the server, its can only work if the SSL/TLS mode is set to flexible.
That's it. Hope it helped

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r40zi9hcpywfwt2wrkew.png)
[Redis Hackathon] Koochikok (URL Shortener)
Tags: redishackathon, node, javascript, redis
Published: 2022-08-27 09:28:45

### Overview of My Submission
this project is a URL shortener that uses Redis as its primary database and MongoDB as a secondary database


### Submission Category: 
Wacky Wildcards


### Language Used
Node.js


### Link to Code

{% embed https://github.com/mhmda-83/koochikok %}

### Additional Resources / Info


![Architecture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b08mj24s7fspzs47hhnc.jpg)

- - - 


* _Check out [Redis OM](https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries), client libraries for working with Redis as a multi-model database._
* _Use [RedisInsight](https://redis.info/redisinsight) to visualize your data in Redis._
* _Sign up for a [free Redis database](https://redis.info/try-free-dev-to)._
What Is a Database?
Tags: database, datatypes
Published: 2022-08-27 09:07:19

---
title: What Is a Database?
published: true
description: Let's take a closer look at definition of a database.
tags: #databases #datatypes
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---
This article describes in simple terms what databases are, their advantages and disadvantages, and also discusses the types of data that are used when working with databases - https://blog.devart.com/what-is-a-database.html
How to accept payments on first launch of your saas startup?
Tags: discuss, startup, question, saas
Published: 2022-08-27 09:07:02

Hi all,

I want to create a subscription based saas platform which allows users to do something and then they have to pay a monthly fee, and I want to impose a pay wall on MVP so that all users we'll have will be paying users. I'm planning on using https://www.chargify.com because it seems easy to use and integrate with.

However, I'm blocked by one thing, that is the payment solutions I've seen always require business registration and other government related documents which I won't have on MVP because I don't think I can register for a company that early in the product's life time.

Reason I wanted to have a pay wall on MVP is because I want to get investors early on, say after 6 months, and I want it to be included in the pitch deck that the platform has `n` paying users and has `n` monthly revenue since MVP. I just think it will be easier to convince investors to invest when we have those kinds of metrics.

I haven't completed building the product. Though I am still going to deploy to production even if it turns out that I won't be able to add a pay wall immediately, perhaps I'll find another way to get paying users on MVP, or maybe push through even though I can't get paying users immediately, I'll figure out a way to convince investors.

I would really appreciate it if anyone here can give insight into how I can do this, should I register for a corporation before launch?