teleren/devto huggingface dataset:
Getting back to coding - 2 weeks later
Tags: beginners, motivation, learning, codenewbie
Published: 2023-10-04 08:45:09

I can't believe but 2 weeks have passed already and they have not been the easiest. Despite my partner falling ill and some - as they call it - challenges at my regular 9-5, I did manage to continue learning.

The pomodoro technique definitely proofed itself worth it. I kept following the Freecodecamp learning paths and discovered [The Odin Project](https://www.theodinproject.com/) - more on that later.

My conclusion of the last weeks: I do enjoy the comfort of freedcodecamp telling me exactly what to do. However, starting my own project seems terrifying although I'm capable. As for most people it's difficult, I assume, to take off the training wheels.

**The Odin Project** somehow took away this kind of anxiety though. With the curriculum being structured and offering all information + additional resources I can continue learning but do need to use my logical thinking more actively.

_I need to come up with the solution and use the knowledge I have.
I need to look up things in documentations/ stackoverflow.
I need to think ahead and make decisions but also question my decisions._

Especially the last part is what elevated my learning. Now I'm recapping more effectively and ask myself **'Can I explain this concept to somebody else?'**. Because if I can explain it, it means I understood and if there are certain things I can't explain, I just identified a gap in my knowledge.

Lastly, engaging in channels where other people ask questions about their code is also a great way for me to learn. Taking a look and asking myself 'How would I approach this?', 'What's the cause?' and if I come up with a solution 'How can I explain this to the person asking?'.
I hate making dashboards #1
Tags: data, dataculture, analytics, discuss
Published: 2023-10-04 08:34:59

Don't get me wrong. I appreciate visual materials, I think that automatisation of repetitive tasks is a must and I strongly recommend you to cover your production servers with all kinds of monitors.

But making dashboards for top management was my most hateful job as a product analyst. And I can tell you exactly what's wrong with it, and how you can navigate through it, if you absolutely have to.

## Problem 1: It's not what it looks like
Let's say that we want to see how many users we get every day. What can be easier, right? It's just all unique users' ids from daily log. Or is it?

Well, not quite. What about those people who don't allow cookies' usage and they don't have an id? What about those people who have some security add-ons installed in their browser, who have multiple different ids throughout a day? What about bots? Search engine robots? People with browser, that downloads all the tabs in background at every restart?

So, you make workarounds for that issues, you filter out UserAgents for search engines, you filter out too frequent requests for bots, etc. The resulting chart doesn't show the number of users, it shows the next best thing — estimation for that number.

The thing about data is that it never stays the same (unlike your shipped code). Maybe there is a release of new GDPR guidelines, maybe an intern dropped a line of code which was assigning an id to a user. One way or another, the day would come when the data changes and your chart immediately gets messed up.


## How to deal with it
- Stick to the most unambiguous values that you can find. It's fine to make chart of the "number of successful billing transactions" or "number of clicks on an ad banner".
- Keep all calculations for the charts as simple as possible. Remember that every additional level of logic that you add to your code, would double the trouble in a long run
- You don't have to stick to the data available at the moment. Talk to the dev team, come up with extra events to log, which will help you to avoid unnecessary complexity in your algorithm.
- When there's no way to avoid having the gap between log events and high-level data to show on a chart, make it very clear, that it's not some magical "true value". That it's an estimation, and it will inevitably get messed up. Not because you didn't see it coming, but because the management asked for too abstract of a value, that doesn't have an unambiguous representation in logs. 

What's problem #2? We'll talk about it next time.
Flutter Documentation Clone Project: A New Learning Adventure Begins!
Tags: flutter, beginners, programming, tutorial
Published: 2023-10-04 08:30:00

Hey, Flutter community! 🚀

I am excited to share some thrilling news with you all today. I am embarking on a new journey, one that's bound to make learning Flutter even more exciting and accessible. I am in the process of creating a clone of the official Flutter documentation website using Flutter Web, and I can't wait to give you a sneak peek into what's coming.

The Vision
As a Flutter enthusiast, I've always admired the official Flutter documentation for its clarity and comprehensiveness. However, I wanted to take this a step further by creating a Flutter documentation clone that's not just informative but also interactive and user-friendly. Here's what you can expect:

1. Interactive Code Examples
I am going to make sure that learning Flutter becomes more hands-on. The clone will feature interactive code examples that you can experiment with right on the website. No need to switch back and forth between the documentation and your code editor!

2. User-Friendly Interface
The clone's user interface will be designed to make navigation a breeze. I want you to easily find what you're looking for and enjoy browsing through the documentation.

3. Community Collaboration
I believe that the Flutter community is a valuable resource, and I want this project to reflect that. I'll be open to contributions, suggestions, and feedback from fellow Flutter enthusiasts like you. Together, we can create something truly amazing.

Why Clone the Documentation?
You might wonder why I'm creating a clone of the official documentation when it already exists. Well, the idea is to provide an alternative that enhances the learning experience. The official documentation is fantastic, but offering a different perspective, interactivity, and community involvement can be incredibly beneficial.

What's Next?
I am currently in the development phase and working hard to bring this project to life. I can't wait to share it with you all and see how it helps you in your Flutter journey.

Stay tuned for updates! I'll be announcing the project's launch date soon, and I hope you'll join me on this exciting adventure. Don't forget to share this news with your fellow Flutter developers. Let's make learning Flutter even more awesome together!

Until then, happy coding, and stay Flutter-tastic! 🚀📚

Note: Keep an eye out for more details in the coming days.
Video: https://youtu.be/ocTsQcL-UjI
Why do we need Modelstate.Clear() on postback and what would happen if you don't use it - .Net
Published: 2023-10-04 08:19:07

The ModelState object represents the state of the model and its validation. It contains a collection of name and value pairs for each entry submitted in a form, as well as a collection of error messages for each entry that failed validation.

## Here's why and when you might need ModelState.Clear():

**Retaining Old Values:** When you return a view after a POST action, the values that were posted are bound to the view. This means if you've made changes to the model in your action method after the POST, those changes might not be reflected in the view because the posted values take precedence. By calling ModelState.Clear(), you're clearing the old values and errors, ensuring that the view will display the current state of the model.

**Avoiding Validation Issues:** If you've made changes to the model in your action method and you want to return the view without re-validating the model, you might run into issues where the ModelState still contains validation errors from the initial POST. Clearing the ModelState ensures that these old validation errors don't interfere with the rendering of the view.

**Redirecting to a Different Action:** If you're redirecting to a different action after a POST (using the Post-Redirect-Get pattern), you typically don't need to clear the ModelState because a new GET request will be initiated, and the ModelState will be fresh. However, if you're returning a view directly after a POST without a redirect, that's when you might run into the issues mentioned above.

## What would happen if you don't use it?

**Stale Data:** As mentioned, if you modify the model in your POST action and then return a view without redirecting, the view might display the old, posted values instead of the updated values from the model.

**Validation Errors Persist:** If there were validation errors during the POST, and you've corrected them in the action but haven't cleared the ModelState, the view might still display the old validation errors.

**Confusion:** If you're not aware of the behaviour of ModelState and how it retains old values and errors, it can lead to confusion and unexpected behaviour in your application.

## Conclusion
While you don't always need to use ModelState.Clear(), it's a useful method to know about and can help avoid certain issues when returning views directly after a POST action.
Werkzeug Import Error - Python
Published: 2023-10-04 08:04:59

We got the below error all of a sudden from the already working Flask api code yesterday. Looks like there was some changes in dependent Werkzeug  library.

Mentioning the version of Werkzeug  in requirements.txt fixed the issue.

`Werkzeug==2.3.7`

References:
https://stackoverflow.com/questions/77213053/importerror-cannot-import-name-url-quote-from-werkzeug-urls
Whole Nutrition
Published: 2023-10-04 07:54:48

Whole Nutrition is a vegan plant-based protein supplement brand.
We are a fitness and lifestyle brand. Our motto is to simplify the nutritional needs with innovation and minimal impact to the environment.
**[Official Website](https://www.wholenutrition.in/)**

Address: A-571, A Block, Sector 46, Noida, Uttar Pradesh 

Mail: Contact@wholeNutrition.in

Contact Number: 9886638352

**[Facebook](https://www.facebook.com/wholenutrition01)**

**[Instagram](https://www.instagram.com/wholenutritionofficial/)**
Converting codes from CJS to ESM
Published: 2023-10-04 07:46:00

I'm trying to wrap my head around ECMAScript Modules (ESM) and CommonJS (CJS). I understand that the way forward is to **_use ESM as much as possible_** because ESM is supported on both browsers and Node while CJS is supported only on Node.

Jotting down how to convert my codes from CJS to ESM. This is based on Typescript. 

The files that need to be changed are:

## package.json

```
  "type": "module"
```

## tsconfig.json

```
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",                       
    "moduleResolution": "Node",
    "declaration": true,
    "esModuleInterop": true, 
    ....
  },
  "ts-node": {
    "esm": true
  }
```

(Or simply conveniently install Sindre's [tsconfig.json](https://github.com/sindresorhus/tsconfig))

## (My source codes)

When importing relative dependencies, add ".js" to the filename, for example:

```
import { sayHello } from './mylib/util.js';
```

(Yes, even though my source code is located in util.ts, the Typescript server should be able to help by suggesting ".js")

### Further Reading

- Ref 1: https://stackoverflow.com/questions/71463698/why-we-need-nodenext-typescript-compiler-option-when-we-have-esnext
- Ref 2: https://www.typescriptlang.org/docs/handbook/esm-node.html
- Ref 3: https://github.com/sindresorhus/tsconfig
Publishing my Typescript package to npm
Published: 2023-10-04 07:33:53

(Managed to get one working here: https://www.npmjs.com/package/api-gateway-direct-dynamodb)

Documenting the steps to publish a Typescript project to npm.

Check that `tsconfig.json` is emitting declaration files:

```
    "declaration": true, 
    "outDir": "./dist",
``` 

Compiles all Typescript source files and generates type declarations files:

```
rm -rf ./dist
npx tsc
```

Check that `./dist` contains the compiled **.js** and **.d.ts** files.

Edit `package.json` to inform users' compilers on where to find the type declarations:

```
  "main": "dist/index.js",
  "types": "dist/index.d.ts",
```

_This next step is optional, which is to test the library locally before publishing. Create another empty project and try to installing the library:_

```
npm install path/to/my-package
```

Finally, publish the library:

```
npm publish
```

(For subsequent republishing, we would also need to increment the version number in **package.json**.

Ref: https://medium.com/cameron-nokes/the-30-second-guide-to-publishing-a-typescript-package-to-npm-89d93ff7bccd
Best Medical Device service management software - Service CRM
Tags: medical, crm, software
Published: 2023-10-04 07:33:26

Medical Device service management software, also known as Service CRM, offers numerous benefits to healthcare organizations. This innovative software solution helps streamline the management of medical devices throughout their lifecycle, from acquisition to maintenance and retirement. By centralizing data and automating various processes, Service CRM enables healthcare providers to effectively track equipment usage, monitor maintenance schedules, and ensure regulatory compliance. Additionally, **[Medical Device service management software](https://www.servicecrmindia.com/medical-equipment-maintenance-software.html)** facilitates seamless communication among different departments, enabling timely service requests and efficient problem resolution.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b68lyihs0eee4rd5esd5.jpg)
Best After Sales Service Management Software - Service CRM
Tags: crm, sales, software
Published: 2023-10-04 07:30:23

After Sales Service Management Software is a valuable tool for businesses looking to enhance their customer service and support. With **[After Sales Service Management Software](https://www.servicecrmindia.com/after-sales-service-management-software.html)**, companies can effectively manage and optimize their after-sales service operations, ensuring that customer needs are met in a timely and efficient manner. By streamlining processes and automating tasks, ASM helps businesses improve productivity and reduce operational costs. Additionally, After Sales Service Management Software provides valuable insights and analytics that allow companies to make data-driven decisions and improve overall customer satisfaction.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/606erlt15a4iqvekgwl3.jpg)
Clearing Postman DNS cache
Published: 2023-10-04 07:29:54

Postman apparently defers to the underlying OS for DNS lookup cache.

Hence in order to clear Postman DNS cache, we need to clear the underlying OS's cache.

This can be done on MacOS:

```
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
```

Ref: https://mackeeper.com/blog/flush-dns-cache-on-mac/
Excellence Defined: Navigating Dissertations with Proofreader Services
Tags: dissertation, proofreading, thesisediting
Published: 2023-10-04 07:29:50


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/upjxt1v8tlvgzr1jbsp7.png)
To know more visit [myAcademia.zone](https://myacademia.zone/guides/plagiarism-citation-tips/user-review-top-dissertation-editing-proofreading-services)
Best AMC Service Management Software - Service CRM
Tags: amc, crm, software
Published: 2023-10-04 07:27:42

AMC Service Management Software offers a comprehensive solution for managing various aspects of service operations. By integrating multiple functionalities such as Service CRM, ticketing, scheduling, and reporting, this software streamlines the service management process and enhances overall efficiency. Organizations can benefit from **[AMC Service Management Software](https://www.servicecrmindia.com/amc-management-software.html)** in several ways. Firstly, it enables better customer relationship management by providing a centralized platform to store and access customer information, communication history, and service requests.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t5adhhdhgjzhretmc6ek.jpg)
Field Service Management Software Called Service CRM
Tags: software, crm
Published: 2023-10-04 07:23:52

Field Service Management Software, also known as Service CRM, is a powerful tool that helps streamline and automate various tasks related to field service operations. This software is specifically designed to assist businesses in managing their workforce, scheduling appointments, tracking work orders, and providing real-time updates to both field technicians and customers. With its comprehensive features and user-friendly interface, Service CRM makes it easier for businesses to improve their efficiency, enhance customer satisfaction, and ultimately boost their bottom line. Whether it's managing service requests, monitoring inventory, or generating insightful reports, **[Field Service Management Software](https://www.servicecrmindia.com/field-service-management-software.html)** Service CRM is a game-changer for companies operating in the field service industry.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojue9ahdvw8jt3k6yq97.jpg)
How To Create Your Own Cryptocurrency Exchange Platform
Published: 2023-10-04 07:07:01

LBM Solutions, a reputable­ **[crypto exchange development company](https://lbmsolutions.in/how-to-create-your-own-cryptocurrency-exchange-platform/?utm_source=Google&utm_medium=seo&utm_campaign=Nitin&utm_id=1
)**, can help you transform your cryptocurrency aspirations into reality. Our comprehensive guide, "Building Your Cryptocurrency Exchange Platform," captures the essence of your success. We offer expe­rt insights and strategies covering audie­nce profiling, cutting-edge se­curity measures, and a range of cryptocurre­ncy services including see­d blocks, P2P exchanges, secure­ cold wallets, and spot trading. Embark on a journey to financial free­dom in the thriving cryptocurrency industry by joining LBM Solutions.
Unlocking the Power of Multi-Core CPUs: Supercharge Your Node.js App with Clustering!
Tags: javascript, node, webdev, programming
Published: 2023-10-04 07:00:40

Node.js is known for its single-threaded, non-blocking I/O model, making it an excellent choice for building scalable and high-performance web applications. However, when it comes to leveraging the full potential of multi-core processors, Node.js developers often face a challenge. This is where clustering comes into play. In this blog post, we’ll explore clustering in Node.js and how it can help achieve load balancing for improved performance.
Discover the Full Article - [Click Here!](https://medium.com/@probir-sarkar/unlocking-the-power-of-multi-core-cpus-supercharge-your-node-js-app-with-clustering-c4b4ec5ec94b)
Hosting Apps For Free With Github Actions 🤯🚀
Tags: devops, tutorial, githubactions, beginners
Published: 2023-10-04 06:54:14

When I first found out that I could host my Apps for **free** on GitHub actions my mind was completely blown 🤯

Let's learn how scheduled workflows can reduce your cloud hosting bill to **$0**

![funny gif haher](https://media.giphy.com/media/uj8JYrjroFGYmn82Ab/giphy.gif)

## Setup

I don't want to waste your time - this only works if your app does not need to run 24/7, but rather on a fixed schedule. If your app is based on data that you need to scrape daily, or if you want to send an automated good morning message to your girlfriend, this would work perfectly! Not that I recommend automating your relationship 🫠

For this example, we are going to automate an old tool of mine that scrapes data from a news site. In the [repository](https://github.com/Code42Cate/daily-report) you will find a very simple NodeJS (v18) script that has a few dependencies and a single build step. If you want to run it, you run `npm install`, `npm run build`, and finally `npm run start`. It will then scrape data, summarize it, send me a message on telegram, and finally stop. Since this script is summarizing news for me I want it to run every morning. With these requirements, we can build our [GitHub Action workflow](https://github.com/Code42Cate/daily-report/blob/main/.github/workflows/daily-run.yml):

```yaml

name: Daily Report

on:
  schedule:
    - cron: "0 6 * * *" # Use a tool like www.cronmaker.com
  workflow_dispatch: # Enable manual trigger

jobs:
  build-and-start:
    runs-on: ubuntu-latest # Base Image
    steps:
      - uses: actions/checkout@v3 # Get code from repo
      - uses: actions/setup-node@v3 # Install Node.JS
        with:
          node-version: 18.x # Use any major version 18
      - run: npm install # Install dependencies
      - run: npm run build # Compile Code

      - run: npm run start # Start Code
        env: # Runtime secrets are defined in Repository Settings
          GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
          GOOGLE_PROJECT_ID: ${{ secrets.GOOGLE_PROJECT_ID }}
          TELEGRAM_API_KEY: ${{ secrets.TELEGRAM_API_KEY }}
          TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
```

If you have done everything correctly, GitHub will now execute this workflow every day. You will see the results and logs in your repository [here](https://github.com/Code42Cate/daily-report/actions/workflows/daily-run.yml)

My workflow has been running for over 314 at this point!
![GitHub Actions Result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hrnos39pbzf1exree2w9.png)

## Conclusion

That was pretty awesome, right? You can of course do this for your own programs and even use completely different languages or setups. If you need any help with setting it up for yourself, please let me know in the comments! Always happy to help :)


PS: Do you want to host your long running Docker apps for cheap? Check out [Sliplane!](https://sliplane.io?utm_source=githubactionshost) (I'm the Co-Founder 🤫)