teleren/devto huggingface dataset:
Introducing a Go version of Kredis ("Keyed Redis") from the Rails ecosystem
Published: 2024-01-06 23:25:47

[Kredis](https://github.com/rails/kredis), from the Rails ecosystem, is a valuable library that encourages a more object-oriented approach when interacting with various data structures and types on Redis. I've previously used Kredis for scenarios like caching a set of available times in an appointment booking app, or employing the hash type to track daily API usage.

In a bid to gain a deeper understanding of Go, generics, and the intricacies of the Redis package, I recently translated this fantastic Ruby library to Go. Overall, I'm quite happy with the end result. Go is just object-oriented enough to appreciate the benefits this package can bring to practical examples in your Go code. This package could be especially useful if you are connecting Go and Ruby services via Redis.

Here's a brief example of how to use the `Set` [type](https://github.com/mjc-gh/kredis-go#set):

```go
t := time.Now()
times := []time.Time{t, t.Add(1 * time.Hour), t.Add(2 * time.Hour), t.Add(3 * time.Hour)}

set, _ := kredis.NewTimeSet("times")
set.Add(times...)
members, _ := set.Members()

fmt.Println(set.Includes(t)) // true
fmt.Println(set.Includes(t.Add(4 * time.Hour))) // false
fmt.Printf("%d %v\n", set.Size(), members)
// 4 [2024-01-05 02:00:00 +0000 UTC ...]

sample := make([]time.Time, 2)
n, _ := set.Sample(sample)

fmt.Printf("n = %d %v\n", n, sample) // random sample of 2 members
```

Documentation for all available types can be found in the [README](https://github.com/mjc-gh/kredis-go) as well as the docs [Go package docs v0.0.1-alpha1](https://pkg.go.dev/github.com/mjc-gh/kredis-go@v0.0.1-alpha1).

PRs and enhancement suggestions are more than welcomed! Kredis is excellent for temporary data storage use cases, as most types support expiration. Let me know in the comments if you find this package useful 💞
Task - 5
Published: 2024-01-08 17:22:55

Q1. Write as many test cases as you can for a given scenario using Excel sheet. The Excel sheet should include the following columns:
 Ans - Check the below for test case

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

Q2. Write the key points on Test Scenario, Test Case, Test Strategy and Plan, Test Summary Report.

- Test Scenario:
A test scenario is a high-level description of the functionality or feature to be tested.
It outlines the overall objective of testing a specific feature or functionality.

- Test Case:
Unique identifier for each test case (e.g., TC-1, TC-2).
A detailed description of the test case, including the steps to be executed.

- Test Strategy and Plan:
Clearly states the overall goal and purpose of the testing effort.

- Test Summary Report:
That provides a summary of the testing activities and their outcomes. It is usually created at the end of the testing phase or project and serves as a formal record of testing results
Nova Horizon | Next Group Experience
Published: 2024-01-08 17:22:16

Next is a provider of IT and software development solutions and consultancy services. We assist organizations and companies in enhancing business performance and boosting their competitiveness.

We provide comprehensive web, application, and software development services that cater to diverse business needs, ranging from IT strategy consultancy to the complete development of scalable solutions.

We offer an Elastic-OnDemand managed public cloud solution, providing computing, storage, networking, databases, containers, data analysis tools, artificial intelligence and project management.
Generate Fishing Emojis with Ease Using Simplified AI Emoji Maker Online |
Tags: techtalks
Published: 2024-01-08 17:03:49

Experience the magic of **[fishing emojis](https://simplified.com/ai-emoji-maker/fishing)** with Simplified AI Emoji Maker Online. Express your love for fishing and make your conversations more engaging with these visually captivating emojis. Let the magic of fishing emojis enhance your fishing stories and experiences!
Check this out
Published: 2024-01-08 17:00:47

## **Fund - raiser decentralized app (INCOMPLETE)**

Try this app using this link: [App-link](fundraiser-d-app.vercel.app)

GitHub repository link : [Link](https://github.com/AbdurRohit/Fundraiser-dApp)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/liu7jbfwneiyuqq3zebc.png)
This is my first blog about awazly
Tags: webdev, astro, wordpress, seo
Published: 2024-01-08 16:51:41

I am happy to share that i have just build five websites with astorjs about home cleaning services which are the following 
1. [شركة عزل اسطح وسباكة بمكة ](https://al-tasmim.com)
2. [شركة عزل اسطح وخزانات بمسقط عمان](https://azlzone.com) 
3. [شركة عزل اسطح ولحام خزانات بمكة](https://awazly.com) 
4. [شركة عزل اسطح وخزانات بالكويت ](https://shelid.com)
5. [شركة تمديد الغاز المركزي بمكة والرياض والدمام والطائف ](https://emdadelgaz.com)
 and i have build them,to be a better version from the following wordpress website 
[ترميم وصيانة مباني بمكة 
](https://al-tasmim.com)Thanks!
Repository Environments: Remote and Development in Git
Published: 2024-01-08 16:37:56

There are two main repository environments:

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

Remote environment and development environment.
The remote environment is where changes made to the computer are sent to a remote environment, and will be able to be shared.

The development environment is where the local machine is. This environment is made up of three parts: Working directory, Staging area and Local repository.
To take a remote repository and run it locally, use the command:

`git clone - https://github.com/user_name/directory.git
`
Copying is done in two places, in the Working directory e no Local Repository. Why git is version distribution control.
The local repository is a literal copy of the remote repository, the only difference is that it is not shared.
Another thing that the command git clone does, is to create a folder that will contain this copy.

When a file is created, it is only present in your working directory, to see what is happening in the working directory, use the command:git status, that will tell you which branch you are working on.

After creating a file, it is placed in the staging area, this means that all changes that will be committed to the remote repository.

To send the changes to the staging area, use the command:

`git add -file_name
`
To commit these changes to the local repository, use the command

`git commit -m “message”
`
> [To write good commit messages](https://cbea.ms/git-commit/)

To share your changes, and send them to the remote repo, use the command:

`git push
`
Push sends only the changes, so it is very efficient network use.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/my7dovvzkpbcsqmvdrw8.png)
The proper use of these commands, plus the habit of writing clear and informative commit messages, contributes to an understandable history and facilitates collaboration in software development projects.
Looking for alternatives to Airplane.dev?
Tags: appdev, lowcode, javascript, frontend
Published: 2024-01-08 16:24:26

### <b>Airplane.dev closing down operations </b>

<span style="font-weight: 400;">The recent news of Airplane.dev shutting down its operations has sent shockwaves through the developer community. </span>

<span style="font-weight: 400;">What adds an extra layer of disappointment is the realization that a significant portion of Airplane.dev's customer base comprises small to mid-sized businesses, each with fewer than 50 employees. These businesses, already operating on frugal systems and navigating with limited resources, now find themselves unexpectedly grounded.</span>

<span style="font-weight: 400;">With Airplane.dev closing its doors, these small businesses are left in the lurch, facing the daunting challenge of migrating their operations to a new platform; this can be particularly challenging for organizations with modest budgets and tight-knit teams.</span>

## <b>[DronaHQ - a bootstrapped alternative to Airplane.dev](https://www.dronahq.com/?utm_source=airplane-dev-alt)</b>

<span style="font-weight: 400;">As a bootstrapped platform with over 15 years of experience, that has weathered its fair share of industry shifts, at DronaHQ we recognize the struggles faced by these small businesses. </span>

<span style="font-weight: 400;">We understand the intricacies of rebuilding tools and apps, and our team is committed to making this transition as smooth and painless as possible for you.</span>

<span style="font-weight: 400;">We want to assure Airplane.dev customers that DronaHQ is here to help. </span>
<ol>
 	<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Connect with us on priority to evaluate your needs</span></li>
 	<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Avail dedicated engineering support to help you migrate Airplane.dev applications to DronaHQ</span></li>
 	<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Choose suitable pricing plan that aligns with your business use case (Usage-based, user-based, or developer-only pricing) </span></li>
</ol>
**Write to us <a href="https://www.dronahq.com/airplane-alternative/#form?utm_source=airplane-dev-alt">here</a>** or email <strong><span style="text-decoration: underline;">gayatri@dronahq.com</span></strong>

<span style="font-weight: 400;">Compare Airplane.dev Alternatives: </span><a href="https://www.dronahq.com/compare-retool-vs-dronahq-vs-appsmith/"><span style="font-weight: 400;">Retool vs Appsmith vs DronaHQ</span></a>
Digital Marketing For Hotels
Published: 2024-01-08 16:22:19

In the era of technology and connectivity, the hospitality industry, particularly [hotels](https://medium.com/@nugen354/digital-marketing-for-hotels-8e30b991e909), is witnessing a paradigm shift in marketing strategies. Digital marketing has become an indispensable tool for hoteliers looking to enhance their brand presence, engage with their target audience, and ultimately drive bookings. This comprehensive guide explores the key components of an effective digital marketing strategy tailored specifically for hotels.
Mastering Digital Marketing Strategies for Real Estate Success
Published: 2024-01-08 16:20:30

[Real estate ](https://nugenx.in/2023/12/14/mastering-digital-marketing-strategies-for-real-estate-success/)is inherently visual. Leverage high-quality images, virtual tours, and videos to showcase properties. Investing in professional photography and videography pays off, capturing attention and conveying the true essence of each listing. Utilize drone footage for aerial views and 360-degree virtual tours to immerse potential buyers in a property experience from the comfort of their screens.
JavaScript Pipeline Operator
Tags: programming, javascript, beginners
Published: 2024-01-08 16:17:04

The **JavaScript Pipeline Operator** ( |> ) is used to pipe the value of an expression into a function.

This operator makes chained functions more readable.

This function is called the ( |> ) operator and whatever value is used on the pipeline operator is passed as an argument to the function.

The functions are placed in the order in which they operate on the argument.

👉 **Syntax**

expression |> function

👉 **Using the Pipeline Operator**

As the Pipeline Operator is an experimental feature and is currently in the stage 1 proposal, there is no support for currently available browsers. Therefore, is also not included in Node. However, we can use Babel (JavaScript Compiler) to use it.

**Steps:**

➖ Make sure that Node.js is installed.

➖ Create a directory on our desktop (pipeline-operator), and within that directory create a JavaScript file (main.js).

➖ Navigate to the directory and initialize a **package.json** file that contains relevant information about the project and its dependencies:

```bash
npm init
```

➖ Install Babel in order to use the operator. A pipeline operator is not currently part of JavaScript language, babel is used to compile the code so that it can be understood by Node.

```bash
npm install @babel/cli @babel/core @babel/plugin-proposal-pipeline-operator 
```

To direct Babel about the compilation of the code properly, a file named **.babelrc** is created with the following lines:

```json
{
  "plugins": 
  [
      [
          "@babel/plugin-proposal-pipeline-operator",
          {
              "proposal": "minimal"
          }    
      ]
  ]
}
```

➖ Add a start script to the **package.json** file which will run babel:

```json
"start": "babel main.js --out-file output.js && node output.js"
```

➖ Run the code:

```bash
npm start
```

👉 **Example**

```javasript
const step = 5;

function add(x) {
  return x + step;
}

function subtract(x) {
  return x - step;
}

10 |> subtract |> add |> subtract |> add |> console.log;
```

[Stackblitz Demo](https://stackblitz.com/edit/stackblitz-starters-fl4gvm?embed=1&file=index.js)

---

I hope you found it useful. Thanks for reading. 🙏

Let's get connected! You can find me on:
- **Medium:** https://medium.com/@nhannguyendevjs/
- **Dev**: https://dev.to/nhannguyendevjs/
- **Hashnode**: [https://nhannguyen.hashnode.dev](https://nhannguyen.hashnode.dev/)/
- **Linkedin:** https://www.linkedin.com/in/nhannguyendevjs/
- **X (formerly Twitter)**: https://twitter.com/nhannguyendevjs/
- **Buy Me a Coffee:** https://www.buymeacoffee.com/nhannguyen/
Fun and Easily Update NPM Dependencies with npm-check-updates
Published: 2024-01-09 12:31:58

---
title: Fun and Easily Update NPM Dependencies with npm-check-updates
published: true
date: 2024-01-08 16:12:29 UTC
tags: 
canonical_url: https://www.danywalls.com/fun-and-easily-update-npm-dependencies-with-npm-check-updates
---

Today, I was trying to update multiple projects, but didn't want to struggle with compatibility issues or potential breaks. I found an amazing package, `[npm-check-updates](https://www.npmjs.com/package/npm-check-updates)`.

It helps to find package updates and versions, and also shows which ones are compatible or come with breaking changes.

## Using ncu

First, install with ``npm i -g npm-check-updates``, then run it in the project. It will find the versions and show which are compatible or indicate breaking changes in red.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1704725036859/6c18630d-9b99-4b2d-b973-dc20a9fd4fb8.png)

After completing the process, update the package.json by running `ncu -u`, or you can install the updates with `ncu i`.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1704725103242/7529ccab-5c4f-4fba-8d09-8ce58d015cad.png)

Perhaps you want to upgrade to a specific version and have more control over which version to choose. In that case, run `ncu --interactive --format group`.

Example:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1704725240806/9372feec-9aae-4929-af34-3b833b08fb6c.png)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1704725370059/524130b5-fd7d-4f37-802e-1709d7e3fbfd.png)

I find it incredibly useful! You can use it in any project. Learn more about it on the official GitHub page.

- [https://www.npmjs.com/package/npm-check-updates](https://www.npmjs.com/package/npm-check-updates)
Before you modify the domain model and break production, be careful
Published: 2024-01-08 15:57:25


Evolving a complex and stratified domain model takes quite some energy: due to a considerable amount of legacy developments, you cannot just light heartedly change your classes and hope for good.

Our backend specialist Rohit will break it down for us a little, giving some practical explanation plus code snippets! See the story [here](https://sharesquare-engineering.medium.com/data-driven-feature-development-unveiling-the-hidden-consequences-of-code-changes-518ee34de625).
Learning JavaScript 2024
Tags: javascript, webdev, programming
Published: 2024-01-08 15:53:58

In the mid of December-2023, I started learning JavaScript from the very basic (vanilla JavaScript). After spending some amount of time on Udemy Courses, I felt bored and lack of practice.

Then going to the DEV community post, I came through one of the best JavaScript RoadMap Tutorial which is this -


[JavaScript - The Complete Guide](https://www.showwcase.com/roadmap/7/javascript-the-complete-guide).


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


One of the best thing about this Roadmap is that this is very interactive and since each section is well divided into chunks, you can go through it at your own pace.

Mostly importantly this is not video tutorial so you won't have the fear to complete the entire lecture of 20 mins or so and then try your hands-on, you can jump right on.
My Suggestion would be to try directly on another tab using the Chrome Dev Tool Console. You will speed in no time.

Lastly, this course only covers what you need to know in order to start your JS Developer Journey and get your hands on the keyboard as quickly as possible. Even if face difficulty understanding a certain concepts (say- Promises) you can go through his video lecture on Youtube(but I feel you won't need those).

Thanks to author - **Tapas Adhikary** for designing this awesome roadmap.
Odoo : Choosing Between `related` and `compute` Attributes in Odoo Models
Tags: odoo
Published: 2024-01-08 15:47:15


In Odoo, when defining fields in a model, you often need to establish relationships between fields in the same model or related models. Two common attributes used for this purpose are `related` and `compute`. Let's explore when and how to use these attributes, and when not to use them based on your requirements.

## `related` Attribute:

### When to Use:

-   **Direct Field Mapping:**
    
    -   Use `related` when the value of a field in your model can be directly fetched from another field, either within the same model or in a related model.
    
-   `sales_person_id = fields.Many2one(related='res.users', string='Salesperson', store=True)` 
    
-   **No Custom Computation:**
    
    -   Use `related` when there's no need for custom computation or logic to determine the value of the field. It provides a straightforward way to link fields.

### Example:

`class ProjectTask(models.Model):
    _name = 'project.task'
    
    # Use related when sales_person_id can be directly fetched from res.users
    sales_person_id = fields.Many2one(related='res.users', string='Salesperson', store=True)` 

## `compute` Attribute:

### When to Use:

-   **Custom Computation:**
    
    -   Use `compute` when the value of a field needs to be dynamically computed based on custom logic, other fields, or conditions.

-   `sales_person_id = fields.Many2one('res.users', string='Salesperson', compute='_compute_sales_person_id', store=True)` 
    
-   **Dependency on Other Fields:**
    
    -   Use `compute` when the value depends on other fields, and you want the field to be automatically recomputed when the dependent fields change.

### Example:


`class ProjectTask(models.Model):
    _name = 'project.task'
    
    # Use compute when custom logic is needed to determine sales_person_id
 @api.depends('some_dependency_field')
    def _compute_sales_person_id(self):
        for task in self:
            task.sales_person_id = some_function_to_determine_sales_person_id(task.some_dependency_field)
    sales_person_id = fields.Many2one('res.users', string='Salesperson', compute='_compute_sales_person_id', store=True)` 

## When Not to Use:

-   **Avoid Redundancy:**
    -   Avoid using both `related` and `compute` in the same field definition unless necessary. If you use `related`, it assumes direct field mapping, and adding a `compute` method might lead to redundant computations.



`# Avoid this unless necessary
sales_person_id = fields.Many2one(related='res.users', string='Salesperson', compute='_compute_sales_person_id', store=True)` 

## Conclusion:

Choosing between `related` and `compute` depends on the nature of the data and the logic involved. Use `related` for direct field mapping without custom computation and `compute` when dynamic calculations or custom logic are needed.

By understanding the distinctions between these attributes, you can make informed decisions when designing your Odoo models.
Babylon.js Browser MMO - DevLog #6 - Global chat
Tags: gamedev, babylonjs, mmo, indie
Published: 2024-01-08 15:41:03

Hello!
Is anybody reading this? I hope so :) But to be honest, chances are small :P 
Game is speeding up, last time I displayed another players and this time players gained possibility to talk with each other in the global chat.
Implementation is really simple, I'm still prototyping but hope You'll like it :)
Best regards!

Check video if You're interested
{% youtube TNa6ERDhOL8 %}
When Not To Use Python
Published: 2024-01-08 15:18:14

Python is useful in some specific situations:
- Scripting
- Wrangling data
- Large number of ML libraries with Python bindings to underlying C/C++

It is a terrible choice for backend web services in enterprise environments across a team.

Hypothetically it's a good fit for startups that need to quickly hack together a minimum viable product.  The problem is that all too often there is no time to rewrite it as the company grows.  Python's design does not discourage bad habits and in fact promotes some of the bad habits.

Problems with Python:
- Significant whitespace
- Slow
- Dynamic typing
- Async is an afterthought
- Python 2 to Python 3, broken APIs, essentially a new language
- Installation and environment is a headache:
  - Installs globally to system
  - 
- Global variables
- Mutable by default
- Implicit export (everything is exported)
- Imports/namespacing
- Heavily leans into object oriented code
- Allows shadowing and overwriting, and variable declarations don't use a keyword.  This might seem like a good feature at first because it's less typing, but it's actually terrible when working in a large complex codebase. Example:  I write 'data = xyz', but elsewhere in the code there exists 'data = abc', I will have no idea that I just overrode a variable.
OneTrust Cookie Banner Language Change in Angular
Tags: angular, javascript, programming, beginners
Published: 2024-01-08 15:07:59

Learn how to dynamically change the language of the OneTrust cookie banner in your Angular application using JavaScript methods. Utilize Angular functionalities to modify the language settings of the OneTrust cookie banner based on user preferences. This solution guides you through the process, including accessing OneTrust's API or configuration settings, implementing language change logic, and ensuring proper initialization within your Angular components or services. For updated instructions, refer to the latest OneTrust documentation or contact their support for specific guidance tailored to your OneTrust version.
Code available at [https://dgihost.com/index.php/2024/01/08/change-the-language-of-the-onetrust-cookie-banner-in-your-angular/](https://dgihost.com/index.php/2024/01/08/change-the-language-of-the-onetrust-cookie-banner-in-your-angular/)