teleren/devto huggingface dataset:
Bump up the number of files your system can monitor for changes
Tags: linux, programming, tools
Published: 2019-11-18 12:49:40

---
title: Bump up the number of files your system can monitor for changes
published: true
description: Make sure the number of files your system can monitor for filesystem changes is adequate for your project
tags: [linux, programming, tools]
canonical_url: https://abhnv.dev/blog/2019-11-19-inotify-limit/
---
Have you ever been working on a project and realized that project is not being hot-reloaded or re-compiled when you save or have auto-save enabled.

I almost always run into this issue after I have set up a new development environment. It seems like the system just stops monitoring for files. I have only encountered this issue on Linux systems though. Never on Windows or macOS.

After a bit of googling, I found out that the default limit of file watchers count, that Linux systems allow to monitor for filesystem changes is very low. 8192 to be exact. I know that it is very reasonable for a normal user. But not for a development use case. Our workspace's file count is usually upwards of 8192. JavaScript projects? Even more so.

The most common way, applications like VSCode or IntelliJ IDEs monitor filesystem changes on Linux, is `inotify`. We can query the current limit by running
```bash
$ cat /proc/sys/fs/inotify/max_user_watches
```
If you see a value in thousands, this is your problem. Fortunately, it's very trivial to fix. No kernel compilation needed. 😋

This limit configuration can be set by changing the value of `fs.inotify.max_user_watches` in `/etc/sysctl.conf`. You can put it to any number you want but I think ~65000 is a good enough limit. I set it to 65536 because Base 2!

You can do this using:
```bash
$ echo fs.inotify.max_user_watches=65536 | sudo tee -a /etc/sysctl.conf
# Then reload the new configuration values
$ sudo sysctl -p
```
And that's it.

If you just want to set it temporarily, just run
```bash
$ sudo sysctl fs.inotify.max_user_watches=65536
$ sudo sysctl -p
```
You can also put it in your `/etc/profile` so it will run on every restart. But I feel `/etc/sysctl.conf` is the better way.
Software Engineer/ Manager Interview Questions
Published: 2019-11-18 12:37:20

Software development is a new stream in business management and most of the products are customized as per client’s requirements. In today’s ever-changing, rapidly evolving Information technology market, prime importance is given to management skills of the "Software manager" as the techniques and development experience of one product can be absolutely opposite or irrelevant to one another. In other words, we can say the findings of one product may not be useful to others at all and to survive the cut-throat competition in this ever-evolving software scenario, constant upgradations of skill-set, updating to the latest technology, modules are the only way out to survive.
 
Software project management is an art and discipline of planning and supervising software projects. Time, cost and quality are considered the basic parameters in Software management. Organizations have become very selective in hiring the best talent pool for Software management of their organizations in order to deliver quality products at a restrained budget, with profits, and on-time delivery. A Software engineering manager closely monitors the development process, and executes various plans, arranges necessary and adequate resources, maintains communication amongst all team members in order to address issues of cost, budget, resources, time, and quality and customer satisfaction.

A <a href="https://codersera.com/blog/complete-guide-on-sdlc/">successful Software engineering manager</a> is always tested on these three parameters of time, cost and quality delivered which get affected due to several internal and external factors. Software project management comprises of a number of activities, which contains planning of the project, deciding the scope of the software product, estimation of cost in various terms, scheduling of tasks and events, and resource management.

Here are a few  key essential questions which needed to be asked to any Software manager before hiring:

1. What are your Project Estimation Techniques?

2. What are your most successful projects so far?

3. What were the cost estimations for your last project?

4. What is your Project Scheduling Techniques?

5. What are the IT policies/ laws to comply with new IT standards?

6. What is Risk Management?

7. What are your Communication/ Conflict management strategies?

8. What is the Scope Management?

9. What are the training programs for the employees?

For more details about this, you can read this <a href="https://codersera.com/blog/9-essential-software-management-interview-questions/">article</a>
Remote Work, Mental Health and Neurodiversity
Tags: career, remote, mentalhealth, discuss
Published: 2019-11-18 11:55:01

---
title: Remote Work, Mental Health and Neurodiversity
published: true
description: Remote work, when well supported, allows introverts and all sorts of neurodivergent folks to feel safe for expressing themselves better and at their own pace.
tags: career, remote, mental health, discuss
---

We often talk about remote work as a perk to make working more comfortable and convenient, but there are important aspects that are often ignored in this conversation. Accessibility and inclusion are, to me, the most relevant ones. 

{% twitter 1194602246027333632 %}

Sometimes, I might require more mental space to navigate the world. It happens when my mental footprint in that particular day is higher than usual, with accumulating thoughts or too many things to do. It's like walking around with a big backpack: totally doable and sometimes necessary, but it kinda sucks in packed places and when you have to take something out of it in a hurry. It also makes you more tired than usual.

![the backpack illustration](https://thepracticaldev.s3.amazonaws.com/i/ylzrb972xyqt37ayjdww.jpg)

We're all different and wired in different ways; there's a bunch of brilliant people out there who will never be able to perform at their best capacity unless they're given access to the tools and space to effectively harvest what's on their hearts and minds.

Remote work, when well supported, allows introverts and all sorts of [neurodivergent](https://en.wikipedia.org/wiki/Neurodiversity) folks to feel safe for expressing themselves better and at their own pace, thanks to asynchronous communication. Good processes and documentation are an essential part of all this. And although I recognize going remote might not be the best option for everyone, in my case it has really improved my mental health, productivity and overall enjoyment of life / work balance.

In the context of team work, it should only matter that if this is how someone performs better, and if you want their best work, you should make the effort to provide them with the mental space they need. 

Meetings are still a pain point that can be greatly softened out by giving people enough time to prepare. That means no last-minute meetings, and no meetings without a previous shared agenda, for instance. Surprise "everyone will each share something" moments are a no-no to me personally, I understand the motivation behind it, but it can be anxiety inducing for some folks.

As an introvert, I think nothing changed my career the same way as going remote did, and that's why I am so eager to support the idea of making remote the new normal. There will come a day when we look back and we can't understand why people in IT jobs were required to go to an office  to type letters there, when they could be typing letters at home.

Have you got any thoughts about remote work as a tool for accessibility and for supporting neurodiversity? Please share in the comments :)
Dark/Light Theme
Tags: html, css, javascript
Published: 2019-11-18 11:22:02

I have used [this post's code](https://dev.to/ananyaneogi/create-a-dark-light-mode-switch-with-css-variables-34l8), but at first trying, my site was dark theme but I couldn't switch to default (light). After, I couldn't switch to dark. But other sites, it was worked. **WHAT THE F... CODE!**
Makers Pre-Course - Week 1
Tags: irb, commandline
Published: 2019-11-18 10:54:20

I have just finished the first week of the pre-course for the Makers Academy.

It started out with some reading material about command line functions, going on to explore github features and optimisation. To say it was like reading a foreign language initially was an understatement. I was staring at commands on a screen which returned memories of being 5 years old trying to navigate MS-DOS on my old man's state of the art pc (at the time anyway...).

After i battled the initial overwhelming feeling, i pushed forward and was amazed at how the information quickly stuck, and before long i could navigate, create and delete a range of files and functions, zipping through my computer files and searching for very specific entires at my own will.

The next step shocked me more, git. what on earth was a git? And why does it have a github? I guess i never really thought about the ability to back up your work, work remotely, and collaborate on projects with others. After reading about the principals and uses of this, it quickly became clear this was something i would need heavily for the course at Makers, and also my career as a developer. I pushed through setting up an SSH key to my remote repo, and managed to push and pull my files back and forth between my local repo and my shiny new remote repo.  

All of this new knowledge was then put to the test with the first weeks challenge - The command line mystery. This was a surprisingly cool test to see if you could search, create and decipher files that were downloaded from the remote repo, and then push them back and forth with all the correct information necessary to reach the next step. This was a great experience to put all i had learnt into practise.

I relaxed the rest of the weekend and reflected on what i had learnt, and how after only a week i had already succeeded in learning something i never knew existed a week ago!

Today i am meeting some of my cohort students which i am excited about, and we will attend a lecture on the Github topics to hopefully further reinforce the learnings of last week. After that it looks to be more Ruby based challenges for the next two weeks.

Wish me luck!
How to use HTML5 Geolocation API
Tags: html, javascript
Published: 2019-11-18 10:40:18

Geolocation API is used to retrieve the user's location. Since this can compromise privacy, the user first needs to click 'Allow' on the particular application to use their location.

<h2>Browser Support</h2>
The HTML5 Geolocation API is supported by most of today's moderns browsers. As of Chrome 50, the application needs to be hosted through HTTPS, if the URL is not secured the Geolocation API will not work.
<img src="https://i.ibb.co/56Y314P/g1.png" alt="g1" border="0">

<h2>How to use</h2>
Here is the list of what you need to do to use this API:
-Check if Geolocation API is supported in your browser
-If supported then run getCurrentPosition() method, if not show the message
-If the getCurrentPosition() is successful, it returns a coordinate object 
-The showPosition() function outputs the Latitude and Longitude and calls showMap() with the parameters. 

<img src="https://i.ibb.co/VCsfFkh/g2.png" alt="g2" border="0">

In the showMap() method we call function to show users position on the map, in our case we are using OpenStreetMap to make application <a href="https://www.whatcountyamiin.net/">what county am i in</a>

<img src="https://i.ibb.co/Qjycn0H/g3.png" alt="g3" border="0">

You can use Google Maps instead. This is easy to use API to show the user's position, however, you can use some Back-End library if you run any Back-End code.

Check our tutorial on how to print <a href="https://dev.to/pashaliski/how-to-print-html-page-using-flying-saucer-java-g60">HTML to PDF</a>.
How to pimp easily your ssh client config
Tags: ssh, bash
Published: 2019-11-18 13:18:06

---
title: How to pimp easily your ssh client config
published: true
date: 2019-11-18 10:24:13 UTC
tags: ssh, bash
canonical_url: https://daniele.tech/2019/11/how-to-pimp-easily-your-ssh-client-config/
---

SSH is one of the tool for every sysadmin or developer and is important to master at best. Right now I am using few settings that improved my daily life with my servers.

The post [How to pimp easily your ssh client config](https://daniele.tech/2019/11/how-to-pimp-easily-your-ssh-client-config/) appeared first on [Daniele Mte90 Scasciafratte](https://daniele.tech/eng).
5 things you may may want to know before an Event Sourcing project
Tags: eventsourcing, cqrs, slides, techtalks
Published: 2019-11-18 10:18:57

I recenlty spoke at the [Google DevFestVeneto 2019](https://devfestvenice.com/), in Venice last saturday.

Here are my slides: I'll follow with a more detailed writeup of my experiences. Enjoy!

{% slideshare 7USJsaZrCFUXWj %}
Chrome Extension that turns your "New Tab" into a note taking tool
Tags: productivity, google, chrome, javascript
Published: 2019-11-18 10:16:38

---
title: Chrome Extension that turns your "New Tab" into a note taking tool
published: true
description: 
tags: 
- productivity
- google
- chrome
- javascript
---

# Before

I am opening TextEdit, many times. Creating a new file, or maintaining one. All that just because of **writing down some notes or text to copy.** Need to save the file, sometimes forget to. I need to open the file. Need to switch between Chrome and TextEdit (or OneNote, you name it).

Sounds like enough of extra work for you? This is something I was trying to solve. So here it is.


# Now

I have made a new **Google Chrome Extension** that makes copying multiple texts between pages so much easier, or writing down notes, todos, ideas. Every edit is autosaved and can be seen in other Chrome windows as well!

The name of the extension is **My Notes**. And what it does? It turns your **"New Tab"** into **a note taking tool!**

### Some points

- Great for Notes, Todos, sharing text (Copy/Paste)

- It works immediately after you open a "New Tab"

- Every edit and paste is saved (and waiting for you once you come back)

- It is Synchronized across every Chrome window you have open


## How it looks

![My Notes](https://thepracticaldev.s3.amazonaws.com/i/doffvqt8mg3nvflbp87e.png)


## Where to get it

https://chrome.google.com/webstore/detail/my-notes/lkeeogfaiembcblonahillacpaabmiop


## Final words

I hope you will find this tool useful and it helps you be more productive.
If you have any suggestions, do not hesitate to send them.
Thank you!
Mistake #3 - Not thinking about alternatives
Tags: mistakes, programmer, developer, beginners
Published: 2019-11-18 10:03:06

It's been few weeks since a new post was published in the series of learning from mistakes. In the first two posts, we went through what could go wrong if you jump into coding without understanding the problem statement and start making too many assumptions.

The next thing on the list is a very common mistake that even experienced programmers make—and that is—not thinking about alternative solutions.

![there was an image here](https://upload.wikimedia.org/wikipedia/commons/5/56/Wafer_Lock_Try-Out_Keys.jpg)

Once you have a clear understanding about the problem statement, you start designing a solution around it. I've seen that quite often, programmers start implementing the first solution they derived for the problem. I've to admit, I've been into this category for initial years in my career, until one day where I had to fill in design document template where there was section titled—rejected alternatives—and that helped me understand that I am doing something wrong.

![there was an image here](https://storage.needpix.com/rsynced_images/arrows-3438163_1280.png)

Thinking about alternative solutions enables you to reduce the chances that you may fail to notice something important—as you will be thinking about different options in the given context, and asking questions to get more details. It also helps you figure out what is important to the end user. For example, in some cases—UI design is less important for end of day batch jobs, but focus needs to be on performance of processing data.

It could also help you avoid reinventing the wheel and you may just need to integrate with some existing component, it all depends on the context though. My point here is to try thinking about alternative solutions, ask questions, talk to people who are experienced in that domain— be it a technical or functional.

It also helps your stakeholders understand why the solution you are proposing is best fit as compared to other alternatives.

{% youtube sBqAk_fvKx8 %}

Have you been making any of these mistakes?
The window, the mirror, and how a little bit of introspection can go a long way
Tags: career, leadership, management
Published: 2019-11-18 09:59:57

---
title: The window, the mirror, and how a little bit of introspection can go a long way
published: true
description: Managing development teams and improving morale.
tags: career, leadership, management
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ygheyax1mzreqe2kjqzb.jpg
---

Picture this:

*Your team deployed the company's flagship project just 2 hours before the investor meeting. Now the demo's started - no more last-minute changes are possible. The only thing piercing the silence is the steady drip-drip of a leaky faucet on the floor above. Everyone is trying their best to eavesdrop in on the conversation going on in the conference room, where the CEO is demonstrating the project to the group of investors.*

*"Oops - that wasn't supposed to happen."*

Your heart sinks. The demo just went horribly wrong. As the team lead, you know that this whole thing was ultimately your responsibility.

Now in this moment, you can do one of two things:

1. **You can blame it on Jerry.** Yes, it must be Jerry's fault! In fact, we have clear evidence that Jerry wrote the code that ended up breaking. Yes, it must be Jerry's fault! (Note: *poor Jerry is a metaphor for literally anyone else on your team.*)
2. **You can take the blame and handle it gracefully.** Either way, the company has lost a huge opportunity, and as the team lead you are responsible for the project. Best not to let the resentment and guilt seep any further down.

You decide to go with option 2.

*"Yes, it was me. I should've had the foresight to include additional testing as part of our last sprint, and I failed to do that. I'm sorry."*

*Your team sits in silence as the CEO continues to rant for what seemed like an eternity.*

In the next sprint the following Monday, just as you were about to speak, Jerry interjects:

*"I just wanted to say thanks for taking the blame on behalf of the team. I know that it was my code that broke, and I apologise. I've already added that issue as a bug onto our issues board."*

Others in the team chime in too:

*"Yeah, what you did was really brave and totally undeserved."*

*"Thanks for sticking up for us."*

Imagine a window and a mirror on the wall in front of you.

When something goes wrong, a bad leader would look out the window and blame the people out there - their own team, staff from other teams, third parties - anyone but themselves. However, a good leader would look into the mirror and try to identify their own problems, and how they improve.

When something goes right, a bad leader would look into the mirror and praise themselves - their leadership skills, their technical prowess, their networking ability. On the other hand, a good leader would look out the window, and share the praise amongst the team.

> "Individual commitment to a group effort - that is what makes a team work, a company work, a society work, a civilization work."
>
> – **Vince Lombardi**

Thanks for reading! What do you guys think?
How to get into an app container manually in Cloud Foundry with Garden-Containerd Backend
Tags: cloudfoundry, docker, cloud, bosh
Published: 2019-11-18 09:54:26

##Summary

A method to get into a container on the Diego Cell

##Purpose

The requirement is to be able to access the application container in Cloud Foundry in scenarios where cf ssh  would not be possible. Main reasons being troubleshooting inside the container. This write-up describes the procedures for the same. The original article for containers based on garden-runc is provided below.

##Procedure

* Obtain the app `process-guid`

```
cf curl /v2/apps/$(cf app <app-name> --guid)| jq -r '.metadata.guid + "-" + .entity.version'
```

* Obtain the hosts in which the app is running. Choose one of the I

```
cf curl v2/apps/$(cf app <app-name> --guid)/stats | grep host
```

* Login to the bosh director.

* Identify the cell/VM Instance name associated to the IP
* SSH into the VM
```
bosh -e <environment> -d <deployment> ssh <Instance-Name>
diego-cell/8cbe944d-d0cc-4158-802e-59426506faf7:~$ sudo -i
diego-cell/8cbe944d-d0cc-4158-802e-59426506faf7:~#
```
* Obtain the "instance_guid"   for the process-guid from step 1
```
cfdot actual-lrp-groups | grep d7c18647-9560-4327-8bcc-b7ab1ecdf295-2d6ebf81-7857-46d8-8bdc-f958795abf86
```
* Attach into the container using ctr  (containerd client) 
```
export containerid=<Instance_Guid_>
/var/vcap/packages/containerd/bin/ctr -a /var/vcap/sys/run/containerd/containerd.sock -n garden tasks exec --exec-id my-shell --tty $containerd /bin/bash
root@9b5900f2-34f3-4317-63bb-863c:/#
```
* You will now be in the container.
How to install Django on Windows machine
Tags: django, windows, python, scoop
Published: 2019-11-18 09:18:29

The easiest way to install Django on a Windows machine (fully Windows installation, not using WSL) is to use the _scoop_ package manager (https://github.com/lukesampson/scoop). 
Scoop is VERY useful when developing on Windows, it has a huge library of packages, I highly recommend trying it out.

---

## Install Python

```
scoop install python
```

check if python installed correctly
```
python --version
```

## Pip

_pip_ is a package manager for Python (https://pip.pypa.io/en/stable/)
(*note: scoop python installation installs pip by default*)

## Install virtualenv and virtualenvwrapper

_virtualenv_ and _virtualenvwrapper_ (https://virtualenv.pypa.io/en/stable/) provide a dedicated environment for each Python (and therefore Django) project you create. 

It is _not_ mandatory, but is very useful and will save you time in the future. 

```
pip install virtualenvwrapper-win
```

Create a virtual environment for your project:

```
mkvirtualenv myproject
```

The virtual environment will be activated automatically and you’ll see “(myproject)” next to the command prompt to designate that. If you start a new command prompt, you’ll need to activate the environment again using:

```
workon myproject
```

## Install Django

Django can be installed easily using pip within your virtual environment.

In the command prompt, ensure your virtual environment is active (`workon myproject`), and execute the following command

```
pip install django
```

This will download and install the latest Django release.

Verify your Django installation by executing
```
django-admin --version
```