teleren/devto huggingface dataset:
Proxies
Tags: proxy, systems, systemdesign, architecture
Published: 2022-11-10 12:20:10

Proxy is the word we hear a lot. In the English dictionary, it means a substitute — providing the power of authority to act like the one. In the computing world, a proxy means a middleman between a client and a server. A client originates a request which is received by the middleman who then transfers it to a server for the data and then goes to the middleman again before the client receives it. The middleman here is a proxy.

The proxy servers are very useful when you design a system. The principle of VPNs is based on proxy. When you use a proxy, it can sometimes mask the identity of a client which leads to having the IP address of the proxy in the server instead of the originating client itself. We might have experienced this in this while we access the restricted data or try to download things via torrent.

When we use the word proxy, we usually mean ‘forward proxy’. It is the proxy that acts on the behalf of the client while the interaction between the client and the server is made. This is different than the ‘reverse proxy’ which acts on the behalf of the server. The data flow or the diagram — all look the same.

```
Client ⬅️➡️ Proxy ⬅️➡️ Server
```

But how do distinguish between ‘forward proxy’ and ‘reverse proxy’?

If the server is unknown about the client’s request and its response traveling via the proxy, it’s a forward proxy. But, if the client is unknown about the request and response via the proxy, it’s a reverse proxy. This makes the whole ideology behind the proxy sneaky.

## Conclusion

When you are up for designing a system, proxies might be a life savior. Especially, the reverse proxies. It can act like a gatekeeper or a screener or a load-balancer or an all-around assistant. If you don’t want your main server handling some minor tasks, it might be passed on to the proxies.

So, it is important to understand the reason for the existence of the proxies while also knowing what they do.

{% embed https://github.com/Pragya2056/System-Design-Concepts %}

**_I hope this article was helpful to you._**

**_Please don’t forget to follow me!!!_**

**_Any kind of feedback or comment is welcome!!!_**

**_Thank you for your time and support!!!!_**

**_Keep Reading!! Keep Learning!!!_**
My journey to CTO
Tags: webdev, watercooler, javascript, beginners
Published: 2022-11-10 11:50:33

So some people have posted few comments on my last post on becoming a CTO, one of the main things to come out of that was 'context', how did I get here etc. So I thought it was a good idea to give you a quick brief timeline

- Started development in my free time circa 1995
- My parents told me this computer thing wouldn't make it so became a Print and Media operator in 1998
- The computer thing did take off so self taught HTML and CSS 2008
- Got my first junior job in 2010 working six months for free
- Sometime around 2012 I started to learn PHP after finishing JavaScript
-  Made mid level developer by 2015 
-  Senior developer by 2018 - at this point I was learning Vue and Laravel more
-  2022 I retrained in Python and Made CTO

That gives you some idea as to how I got where I am. The thing is I'm still not sure I'm ready for the roll and the other thing and this is a big one, am I ready to pretty much stop coding? This will be something we will touch on in the coming posts.

The response to the lats post was awesome and I hope in the coming posts you folks stick around and see what and how this works out.
Finished! Frontend Mentor Challenge - Tech News Page
Tags: webdev, beginners, css, devjournal
Published: 2022-11-10 11:44:39

Dear diary,

I made another thing. This thing is looking pretty good! CSS makes you want to pull out your hair sometimes, but once you figure it out, it is the dopamine hit we all want from our work and hobbies.

This is my third challenge moving up the skill ladder of frontend development. Once I learn a bit more javascript, I will tackle a challenge incorporating that.

Check it out!
https://www.frontendmentor.io/solutions/tech-news-page-using-bs5-and-no-js-Or7moOX-cZ
https://github.com/Azulio123/news-homepage-main
https://azulio123.github.io/news-homepage-main/
How to increase your opportunities in the IT field
Tags: webdev, programming, productivity, devops
Published: 2022-11-10 11:10:17

If you are studying and still haven't gotten an opportunity to put your knowledge into practice, you need to look for ways to open doors. After all, what you can't do is wait for the opportunity to appear. Right?

Get involved in college projects.
You know those volunteer projects, which are often not part of the required college curriculum? It can be monitoring, a project that aims to develop something for the faculty itself, study groups, scientific initiation projects.

All of these are good examples of activities that have a lot to contribute to your education and can be done while you are in college.

There are several benefits to participating in these projects. You put into practice what you saw in the classroom, work as a team, improve your communication, help you discover new skills that you didn't know until then, help you develop a better resourcefulness to deal with adverse situations, it can provide the development of new ideas and of course having a good network.

Try trying on smaller deals.
You have no problem starting on smaller projects, whether it's a micro-enterprise in your city or a start-up.

It's worth the experience and learning.

Another tip is to improve projects for smaller companies, a website or an app, for example. But be careful with the approach, you can say you did a case study and explain the points you improved.

Undertake!
If you apply for the vacancies, but so far no opportunity has arisen, it is worth keeping a preparation in parallel.

When many people are unable to enter the job market, they end up looking for opportunities to work for themselves, where they may end up having their own business.

One of the ways to do this is to put into practice that personal project that was stopped. Use this free time to develop, be it some product or service that makes you gain experience and of course an income.

Demand for good development professionals is on the rise. So use your knowledge with the best you have and offer your work on platforms and companies.

You can turn an idea into an app, or if you like games and you're more interested in that, you can create one and turn it into a business.

It's not easy, but it's not impossible either. You just have to try.
Is there a hiring freeze at all of the FAANG and MANGA companies?
Tags: career, news, webdev
Published: 2022-11-10 11:07:29


Biggest [startup layoffs](https://layoffs.fyi/) since COVID-19...

## 1. Meta

13% of its workforce

## 2. Getir

14% of its workforce

## 3. Booking.com

25% of its workforce

## 4. Twitter

50% of its workforce

## 5. Uber

14% of its workforce.

## 6. Better.com

33% of its workforce.

## 7. Uber

13% of its workforce.

## 8. Peloton

20% of its workforce.

## 9. Groupon

44% of its workforce.

## 10. Byju's 

5% of its workforce.
Merge Intervals
Published: 2022-11-10 11:00:25

## Instructions
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.

## Approach

1. Sort the input by starttime to have an ascending list for comparison.

2. Iterate through sorted intervals and if start of a given interval is less than or equal to the most recent end time stored in the result list then,update the previous end time(ie most recent end time in the result list) based on the max of current prevEnd and end of current interval.

3. If condition is not met append interval to result.

## Implementation

```python
def merge(self, intervals: List[List[int]]) -> List[List[int]]:
        
        intervals.sort()
        
        result = [intervals[0]]
        
        for start,end in intervals[1:]:
            
            prevEnd = result[-1][1]
            
            if start <= prevEnd:
                result[-1][1] =  max(prevEnd,end)
            else:
                result.append([start,end])
        return result
```

Happy coding !!
integrated Windows authentication
Tags: tomcat, beginners
Published: 2022-11-10 10:51:05

Hi guy's,
I am a newbie with Tomcat and maybe someone can answer this question.
We have DomainA and DomainB and there is a 2 way trust between these 2 domains. I have installed an app that use Tomcat on the DomainB with integrated Windows authentication. Now when user in the DomainB access the tomacat app they get loged in without any login prompt from tomcat app but user from DomainA getting a login prompt from the tomcat app.

we have already add the url to the tomcat app to the tursted and intranet of the browser but still get the login prompt.

any suggestions to resolve this issue?

Thanks
Fav Editor : NEOVIM 🔥
Tags: neovim, vim
Published: 2022-11-10 10:49:47

## Introduction
Hello 🖐

There are tons of text editors that are used for coding nowadays. Amongst those editors, my favourite editor is NeoVim.

How I ended up using NeoVim?

<hr />

## My Editor Journey
When I first joined College, I started off as Visual Studio User since I had to learn C/C++. (~~I was required to use it~~). Plus, I needed to take basic linux course, and that was when I was first introduced to VIM.

However, I could not understand at all why it was one of the most popular editor in the world. It was extremely difficult to get used to the keymaps(especially, h, j, k, l). Well... I could not even save and close the editor window.

<img width="100%" src="https://media.giphy.com/media/TfGEwezf656w6aOAAP/giphy.gif" />

Later, I installed Visual Studio Code when I began to take WEB course. I loved VS Code because I liked the light-feeling of VS Code. Also, it had so many extensions to help boost my productivity. Most importantly, I did not have to memorize all the keymaps!

<img width="100%" src="https://media.giphy.com/media/NEvPzZ8bd1V4Y/giphy.gif"/>

About a year ago, I was killing the time on youtube. Suddenly, I found a clip that the author was developing using NeoVim. The clip was from [Takuya](https://www.youtube.com/c/devaslife):

{% embed https://www.youtube.com/embed/bSMZgXzC9AA %}

It blew my mind!!! It looked so cool and I wanted to try it out. Since then, I am in love with NeoVIM 🔥

<hr />
## Dotfiles
I have uploaded my neovim config files on my github.
It is almost same as the neovim config of [Takuya](https://www.youtube.com/c/devaslife)'s. Nonetheless, if you would like to check out my config, here it is: {% embed https://github.com/tonylee221b/dotfiles %}
<hr />
## What is your fav editor?
- Vim
- Neovim
- VS Code <br />
...

What is your fav?
How to Manage email accounts from application without using exec()?
Published: 2022-11-10 10:45:08

Hi,
I am developing an email server using Postfix and Dovecot. There is an interface to create, edit & delete the email accounts from the application (Angular & GO). I have found that I can do the same using os.exec function in Go, but felt that it is not good approach to use exec() function. So I want to know is there any other way to handle it? Like any other apis/packages available in any languages which communicate with email server to manage the email accounts.
Writing custom HTML in Joget
Published: 2022-11-10 10:33:23

Joget can support writing some custom CSS, HTML and Javacript by using `userview` and `Classic HTML Menu`.


Let's begin by this example to of source code to add
```
<HTML>
<head>
<style>
.main {
   background: orange;
}
</style>
</head>
<body>
<div class="main">Hello I am main div </div>
</body>
</HTML>
<script>
console.log("Javascript works here")
</script>
```
Below there are screenshots to help get to the [link](http://153.125.137.54:8080/jw/web/console/app/SCT002000/2/userview/builder/SCT002001) 
as Brain Works Group staff use the credentials you have 
then create new `UserView`

- Click on this icon on bottom left side
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qhvdtpfcdc6wpcu6vbal.png)
- Click on Forms & UI
- Click on UserView 
- Add new or use existing userviews 
- Add new classic HTML Menu

- Click on edit icon i.e: look for encircled icon

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


- Write source code click `Next button` then hit `Save button` then load by clicking `Preview button` to see webpage created 

I can conclude that We went through steps to create webpage using custom source code and I believe you can do the same.

Happy coding
C++ 3-dars
Published: 2022-11-10 10:20:28

###Assalomu aleykum bugun biz o'zgaruvchilar,`cin` funksiyasi va ma'lumotlar turlari bilan tanishamiz. 

C++ o'zgaruvchilar birin bir qiymatni o'z ichiga saqlaydigan xossaga ega.
O'zgaruchilarga qiymat saqlashini yo'llari ko'p va biz hozir 1 ta usulini ko'ramiz.

```cpp
#include <iostream>

using namespace std;

int main(){
              
                       //1-usul                 

    int a; //Biz bu yerda o'zgaruvchini e'lon qildik.
    a = 5; // Bu yerda esa unga qiymat berdik.
    
    cout << a; //Bu yerda consol bizga 5 qiymatini qaytaradi.

                       //2-usul

    int b = 6; //Biz bu yerda o'zgaruvchini e'lon qilib unga 6 qiymatini saqladik
    cout << b;

    return 0;
}
```

Endi biz `cin` funksiyasi bilan tanishamiz. `cin` funksiyasini bajaradigan ishi foydalanuvchidan birir bir qiymat kiritishin so'raydi va o'sha qiymatni o'zgaruvchilarga saqlaydi.

```cpp
#include <iostream>

using namespace std;

int main(){

    int a; //Biz bu yerda o'zgaruvchin e'lon qildik.
    cin >> a;//Bu yerda esa foydalanuvchidan unga qiymat kiritishini so'radik
    cout << a;//Bu yerda esa foydalanuvchi kiritgan qiymatni chiqardik.

    return 0;

}
```

####Ma'lumotlar turlari :

#####int- 123 yoki -123 kabi o'nliksiz butun sonlarni (butun sonlarni) saqlaydi.
#####double- 19,99 yoki -19,99 kabi o'nlikli suzuvchi nuqtali raqamlarni saqlaydi.
#####char- "a" yoki "B" kabi bitta belgilarni saqlaydi. Char qiymatlari bitta tirnoq bilan o'ralgan.
#####string- "Salom dunyo" kabi matnni saqlaydi. Satr qiymatlari qo'sh tirnoq bilan o'ralgan.
#####bool- qiymatlarni ikkita holat bilan saqlaydi: rost yoki noto'g'ri.

Biz o'zgaruvhi e'lon qilganimizda u qanday turdaligin aytishimiz kerak va faqatgina o'sha turdagi ma'lumotni saqlashimiz kerak boshqa turdagi ma'lumotni saqlasak xatolik beradi.

```cpp
#include <iostream>

using namespace std;

int main(){

    // ma'lumot_turi o'zgaruvchi_nomi ; 
    int a;//Bu yerda ma'lumot turi int nomi esa a
    string b;//Bu yerda ma'lumot turi string nomi esa b
    a=5;
    b="Salom dunyo";
    
    cout << a << endl;
    cout << b;
    
    

    return 0;
}
```

> @dawroun
3 things you have to get used to when learning Rust
Tags: rust, beginners
Published: 2022-11-10 10:18:11

I've been using Rust for over half a year now. It's an amazing technology. Nevertheless, there are some things that keep tripping me up. The following are the three things that come to mind:

1. *If statements have no parentheses*

        if language=="Rust" {
          println!("Don't use parentheses!");
        }

    As I frequently switch back and forth still with TypeScript and 
    Kotlin, I keep having to get used to not typing parentheses for the expression of if statements. And then, when I've been doing 
    Rust long enough, I have to get used to adding them again when 
    switching back to TS/Kotlin 😫.

2. *`async` code still needs careful attention*
A big benefit of Rust is that it has the speed of non-garbage collected languages like C/C++ but still has the same memory safety as Java/Python/Go and others. Concurrent programming is also safe; the compiler makes it nearly impossible to create a race condition.
If you start writing `async` code, this safety is also not fully there. We ran into issues where an accidentally long-running task was scheduled like
`tokio::spawn(async || sync_function_that_sometimes_runs_long())`, and when a couple too many of these tasks got executed, they blocked all tokio functionality from running at all.
The fix is to run these tasks with `tokio::spawn_blocking`, but you have to think of that yourself; the compiler doesn't check this for you.

3. *Your target/ dir needs to be occasionally cleaned up*
Rust fills the `target` dir with intermediate results, and this directory grows very big quickly. (Multiple GBs for a trivial project, and after more time working on a project, it can easily become 20GB).
My VSCode sometimes stops monitoring files in my workspace because the target dir is so big. (This can be fixed by adding `target` to the `files.watcherExclude` setting, see [this documentation page for more information](https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc)).
Even with VSCode ignoring `target`, it's still a good idea to clean occasionally. Otherwise, you might run out of disk space if you have more than a handful of Rust projects!

What do you think are the biggest gotchas with Rust?
Generate a Flask APP and Go LIVE - Material Kit Design
Tags: generator, flask, material, appseed
Published: 2022-11-10 10:15:46

---
title: Generate a Flask APP and Go LIVE - Material Kit Design
published: true
description: This video explains how to use tools to generate full-stack apps in no time on top of Flask and Material Design. Generated code is saved on GitHub (MIT License).
tags: generator, flask, material, appseed
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kbpb9noxs3xk1rndbhru.png
canonical_url: https://blog.appseed.us/generate-flask-app-and-go-live-material-kit/
---
Hello Coders!
 
This video explains [how to generate](https://appseed.us/generator/material-kit/) and deploy a simple starter powered by **Flask** on top of **Material Kit**, a pixel-perfect design from `Creative-Tim`. The source code generated during the demonstration can be found on GitHub (MIT license). *Thank you!*

> 🚀 [App Generator](https://appseed.us/generator/material-kit/) - the `free tool` used to build the project 

![Generate a Flask APP and Go LIVE - Material Kit Design](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3oqpa6mivg0z7kzgakk.jpg) 

The video material includes the steps to Go LIVE on Render using an [open-source deployer](https://github.com/app-generator/deploy-automation-render) written in `Python`. Here is the command that pushes the product into production:

```bash
$ python deployer.py flask https://github.com/app-generator/flask-deploy-on-render-mkit 
```

In the above CMD, the deployer script is called with flask sub-command using the generated REPO as input.

{% embed https://www.youtube.com/watch?v=E0-8PEGJcPc %}

---

> The **source code** generated during the demonstration

{% embed https://github.com/app-generator/flask-deploy-on-render-mkit %}

---

> **Thanks for reading!** For more resources, please access:

- 🚀 Free [support](https://appseed.us/support/) provided by `AppSeed` (email & Discord)
- 👉 More [free apps](https://appseed.us/apps/open-source/) crafted in Flask, Django, and [React](https://appseed.us/apps/react/)
Some nice laws to consider in your "coding philosophy"
Tags: programming, architecture
Published: 2022-11-10 10:07:38


### Hofstadter's law
> It always takes longer than you expect, even when you take into account Hofstadter's Law.

You better keep in mind that all of your estimates may be wrong to some extends.
Avoid spending too much time to refine those estimate again and again, don't take them for granted.

### Linus' law
> given enough eyeballs, all bugs are shallow.

This one invites you to maximise the amount of peoples checking code through methods like pair programming, code reviews, etc.
The more time you spend to write and to refactor some code samples, the more you're biased on its behavior, and your vision of it become narrower.
  
### Murphy's law
> Anything that can go wrong will go wrong.

This one is well known, but easy to miss too.
Maximise your testing efforts through unit tests, integration tests, try to use TDD for guidance.

Try to test as close as possible to the runtime conditions. For example uses TestContainers instead of H2 for database integration test, this way you'll be able to test against the target stack the soonest in your pipeline.
If you use a database migration tool like Flyway or Liquibase, with TestContainers it can be part of your test too.

### Postel's law, or the robustness principle
> be conservative in what you do, be liberal in what you accept from others.

This law suggests that the network may contains malevolent entities which could send anything unexpected to your application. 
It invites you to never trust the input, and to be strict regarding the data you send.
Which is better in MongoDB
Tags: webdev, javascript, beginners, programming
Published: 2022-11-10 10:07:20

Which is better in MongoDB to use when saving documents ?


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

## Save

```javascript

const data = { "name": "Jerry", "password": "#343@" };

const newUser = new User(data);

const result = await newUser.save()

```

## Create

```javascript

const result = await User.create({
  "name": "Jerry", "password": "#343@"
})

```

<a href="https://www.buymeacoffee.com/ifeanyichima" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>


**Thank you, please follow me**

[![HTML](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://linkedin.com/ifeanyi-thankgod-chima)&nbsp;[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/masterifeanyi)
neovim: server mode
Published: 2022-11-10 10:05:35

personnal note

Impressing neovim feature!

[source SOF](https://vi.stackexchange.com/questions/5348/how-can-i-use-servername-and-remote-in-neovim) (see Martin Tournoij's answer)

within neovim: `:call serverstart('/tmp/nvim-remote')`
(`:h serverstart`)

and then merely from a python environment
```python
import neovim
nvim = neovim.attach('socket', path='/tmp/nvim-remote')
nvim.command(':echom hello from client')
nvim.command(':echom "hello from client"')
nvim.command(':%s/foo/bar/g')
nvim.command(':e some_file') # can prove useful!!
```

Practical use case: when navigating in ANY terminal (or tmux) write a function that sends opened files to a single running neovim instance instead of spreading opened vim instances all around
like [neovim remote](https://github.com/mhinz/neovim-remote) does, but works for any terminal