teleren/devto huggingface dataset:
Code Smell 243 - Concatenated Properties
Published: 2024-03-15 14:51:26

*You join independent information*

> TL;DR: Don't mix ortoghonal behavior

# Problems

- Maintainability

- Error Prone

- Performance Penalties

- [Premature optimization](https://dev.to/mcsee/code-smell-20-premature-optimization-4moe)

- [The principle of least astonishment](https://en.wikipedia.org/wiki/Principle_of_least_astonishment) principle violation

- [Bijection](https://dev.to/mcsee/the-one-and-only-software-design-principle-3086) Violation

- Duplication of Logic on breaking the attributes

- [Coupling](https://dev.to/mcsee/coupling-the-one-and-only-software-design-problem-2pd7)

# Solutions

1. Break Orthogonal behavior and properties

# Context

Parsing data is always a problem, where joining elements is much easier than breaking them.

If you use a separator to break the attributes, you need to make sure the separator does not belong to the domain, and you should escape it.

If you map your data to relational databases, search queries will be more difficult and less performant for concatenated attributes

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/ed66e002ac7cf031d7256b7529a1624d)
```javascript
class Point {
    constructor(coordString) {
        this.coordString = coordString;
    }

    x() {
        const coords = this.coordString.split(',');
        if (coords.length !== 2) {
            throw new Error('Invalid coordinate string format');
        }
        return parseFloat(coords[0]);
    }

    y() {
        const coords = this.coordString.split(',');
        if (coords.length !== 2) {
            throw new Error('Invalid coordinate string format');
        }
        return parseFloat(coords[1]);
    }
}
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/7a5cb375b631c683845d61095b0d9ded)
```javascript
class Point {
    constructor(x, y) {
        this.x = x;
        this.y = y;
    }
}
```

# Detection

[X] Semi-Automatic 

This is a semantic smell, but you can find suspicious concatenation actions on peer reviews. 

# Tags

- Coupling

# Level

[X] Beginner 

# AI Assistants

AI Assistants don't usually suggest this kind of premature optimization of bad rules

# Conclusion

Don't mix unrelated things since breaking things is always harder than having them separated.

# Relations

{% post https://dev.to/mcsee/code-smell-20-premature-optimization-4moe %}

# Disclaimer

Code Smells are my [opinion](https://dev.to/mcsee/i-wrote-more-than-90-articles-on-2021-here-is-what-i-learned-1n3a).

# Credits

Photo by [Tomas Sobek](https://unsplash.com/@tomas_nz) on [Unsplash](https://unsplash.com/photos/photo-of-red-and-blue-zippers-nVqNmnAWz3A)
    
* * *

>Design is choosing how you will fail.

_Ron Fein_

{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}
CSTB FESTIVAL IN MOSCOW
Published: 2024-03-15 14:42:05


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

On February 29, the CSTB PRO.MEDIA media forum was held in Moscow, where the presenters and speakers revealed many interesting and really important issues.

In addition to well-known conferences, there was a business program, the 15th national award “Big Number” and the 3rd festival

The date of February 29th became the content day for children and teenagers. In one of the main halls there was a speech dedicated to the production and production of animated content, where the industrial aspect was considered.

Many issues in this area were discussed at the meeting, such as:
How to make an animated blockbuster? How to achieve a balance between cost optimization and high quality art project? Where can I get specialists for the industry?
Some of the leading experts in this field tried to answer these questions:
Yulia Osetinskaya, a representative of Soyuzmultfilm, who told the success story of the company; Sergey Demchev, founder of magic factory animation, who talked about the difficulties of working in animation and creating his own artificial intelligence, and many others!

In particular, the conference raised such topics as:
The importance of domestic images and heroes.
Prospects for the development of domestic software.
And the components of the success of films and animated series for children of different age groups.

And the day before, the issue of artificial intelligence in the production of content was discussed. The following topics were raised: Localization of technologies and proprietary developments for measuring and analyzing media consumption in Russia; replacement of Western technologies and tools; demand for Eastern content; interactive advertising market in 2024.
React componentes
Published: 2024-03-15 14:40:19

I am on the page https://react.dev/learn.
I download this script:
function MyButton() {
   return (
     <button>
       I'm a button
     </button>
   );
}

export default function MyApp() {
   return (
     <div>
       <h1>Welcome to my app</h1>
       <MyButton />
     </div>
   );
}
and the word export default is changed to let app =
Do you have any idea ?
AI Translation: Azure AI Translate everything you need to know
Published: 2024-03-15 14:40:03

Are you ready to break down language barriers and unlock a world of possibilities? Look no further! Our comprehensive blog, "AI Translation: Azure AI Translate - Everything You Need to Know Step by Step Guide," is your gateway to mastering the transformative power of Azure's cutting-edge translation technology.

In today's interconnected world, effective communication is key. Whether you're a business professional expanding globally, a student exploring new cultures, or simply someone eager to connect with people from all walks of life, Azure AI Translate has got you covered.

Our step-by-step guide leaves no stone unturned as we delve into the intricacies of Azure AI Translate. From understanding the underlying principles to practical application in real-world scenarios, we provide clear explanations and hands-on examples to ensure you grasp each concept with confidence.

Discover how Azure AI Translate seamlessly translates text, speech, and even images with astonishing accuracy and speed. Learn how to integrate this powerful tool into your applications, websites, and everyday interactions to enhance user experience and drive innovation.

But that's not all! Gain insights into advanced features, best practices, and tips from industry experts to truly unleash the full potential of Azure AI Translate.

Don't let language barriers hold you back. Join us on this exciting journey to AI translation mastery and empower yourself to connect, communicate, and collaborate on a global scale.

Visit " https://www.ecfdata.com/azure-ai-translate-everything-you-need-to-know/ " 
Contact us: +1(702) 780-7900
Embark on your transformational AI journey with Azure AI Translate!
What Do You Wish You'd Known Before Becoming A Manager?
Tags: discuss, career
Published: 2024-03-15 14:37:53

What surprising or unexpected lessons about managing people do you wish you had known before stepping into a managerial role? Share your insights and experiences with the community!
<br>
Follow the DEVteam for more discussions and online camaraderie! {% embed https://dev.to/devteam %}
How to connect Ipython with own frontend?
Tags: python, ipython, jupyter, opensource
Published: 2024-03-15 14:27:55

I am a college student working on a project to create a Python playground website where users can write and run Python code. I am using the Ace code editor for the frontend, and I believe I need to use IPython in the backend to provide a Python environment for users to execute their code.

However, I am unsure about how to proceed with integrating IPython into my website. Specifically, I need guidance on how to communicate with the IPython kernel and frontend. Additionally, I would like to set up isolated environments for each user using Docker, but I'm not sure how to implement this.

Also, I think the Jupyter client can be an easy way to communicate with Kernal.
Portfolio
Tags: webdev, portfolio, github
Published: 2024-03-15 14:27:21

Just launched my portfolio website v1.0.0(Stable) on GitHub! 🌟 I'd love to hear your thoughts and feedback. Check it out and let's connect!

Website Link: https://prassamin.github.io/portfolio/


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mc4cstt47qb1ry31jlu7.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7vyqhevwougkc2mrjby7.png)
squeeze to remove chars from string.
Tags: c, learning
Published: 2024-03-15 14:09:48

https://www.learntosolveit.com/ is a companion website to learn C programming using K&R book using modern tools. This post discusses exercises and topics from the book.

```c
/**
 * Exercise 2.4
 *
 * Let us write a version of squeeze(s1,s2) that deletes each
 * character in the string 1 that matches any character in the string s2.
 * Utilize user defined function mgetline to input the strings.
 * Don't use any standard library string manipulation function.
 *
 **/

#include <stdio.h>

#define MAXLINE 1000

int mgetline(char s[], int lim);

void squeeze(char s1[], const char s2[]);

int main(void) {
    char s1[MAXLINE], s2[MAXLINE];
    mgetline(s1, MAXLINE);
    mgetline(s2, MAXLINE);

    squeeze(s1, s2);

    printf("\n%s\n", s1);

    return 0;
}

int mgetline(char s[], int lim) {
    int i, c;

    for (i = 0; i < lim - 1 && (c = getchar()) != EOF && c != '\n'; ++i)
        s[i] = c;

    if (c == '\n')
        s[i++] = c;

    s[i] = '\0';

    return i;
}

void squeeze(char s1[], const char s2[]) {
    int i, j, k;
    k = 0;

    for (i = 0; s1[i] != '\0'; ++i) {
        for (j = 0; (s1[i] != s2[j]) && s2[j] != '\0'; ++j)
            ;
        if (s2[j] == '\0')
            s1[k++] = s1[i];
    }

    s1[k] = '\0';
}

```

Follow the visual explanation of this program in this post - https://www.learntosolveit.com/cprogramming/chapter2/ex_2.4_squeezess
Sage AI: Reshaping the Future of Creation and Content Distribution
Published: 2024-03-15 14:09:03

In the tide of the digital era, Sage AI, with its revolutionary platform, is not just exploring the fusion of AI and blockchain at the forefront of technology but also playing a pivotal role in reshaping the ecosystem of creation and distribution. By providing an inclusive and innovative platform, Sage AI establishes a new connection between creators and content consumers, making content creation, copyright protection, and value circulation unprecedentedly simple, transparent, and efficient.

The core philosophy behind Sage AI is to leverage AI technology and the decentralized nature of blockchain to build a self-evolving ecosystem. This philosophy is reflected not only in providing high-quality AI creation tools but also in creating a platform where all participants — whether creators, investors, or ordinary users — can receive fair benefits.
**
Creation: Unlimited Possibilities**

Sage AI offers users a variety of creative tools, from text to images, and then to videos, through its AI algorithms. These tools not only lower the technical barriers to creation, enabling everyone to become a creator but also, through AI’s deep learning capabilities, continuously learn and adapt to users’ creative styles, providing personalized creation suggestions. This stimulates users’ creativity, promoting diversity and quality in creative content.

**Distribution: Transparent and Efficient**

In the Web3 content sharing community built by Sage AI, all creative works are registered for copyright and value circulation through blockchain technology. This means that the entire process from creation to distribution of each work is transparent, allowing copyright owners to clearly track each use of their works, ensuring they receive due compensation. Moreover, with smart contracts, Sage AI can automatically execute copyright agreements, including authorized use, citation, and revenue distribution, greatly improving the efficiency and security of distribution.

**Reshaping the Ecosystem: Fair Value Circulation**

The vision of Sage AI is not just to create a technological platform but to reshape the entire creation and distribution ecosystem, establishing a fair mechanism for value circulation. In this ecosystem, the boundaries between creators, consumers, and investors become blurred; everyone can be a creator, a consumer, or even an investor. Through Sage AI, everyone’s contributions can be fairly evaluated and rewarded, promoting the robust growth of a healthy, continuously developing creative community.

Sage AI will continue to optimize AI creation tools, improving the quality and efficiency of content creation, and will explore more creation and content distribution models through continuous innovation, bringing users richer experiences and fairer revenue distribution methods. Under the drive of Sage AI, the future ecosystem of creation and distribution will be more diverse, open, and fair, allowing everyone to find their stage in this digital age.
How to Maximize the Benefits of Superior CBD Gummies Canada for Better Enhancement
Published: 2024-03-15 14:05:46

Shop Now:- https://topcaremart.com/superior-cbd-gummies-ca-offer/  

Product Name :- Superior CBD Gummies Canada

Main Benefits:- Better Enhancement, Official Store And Price

Composition:- Natural Organic Compound

Side-Effects:- NA

Rating:- ⭐⭐⭐⭐⭐

Availability:- Online

Where to Buy:- Official Website – {Buy Now Here — Click Here}

Superior CBD Gummies Canada:-   

The risk of heart attack or stroke (especially for those with current cardiac issues) is significant, so it is important to evaluate whether the male enhancement supplements that you are using are compatible with any other medicinal drugs you're taking. Interactions among those products and prescription and over-the-counter drugs will be harmful. Thus, exercise warning is paramount in your protection.

Facebook:- https://www.facebook.com/CanadaSuperiorCBDGummies 
Official Blogs:-
https://sites.google.com/view/the-superior-cbd-gummies-ca/ 
https://www.facebook.com/Get.SuperiorCBDGummiesCa/ 
https://www.linkedin.com/events/superiorcbdgummiescanadareviews7173900642263003137/ 
https://sites.google.com/view/the-superior-cbd-gummies-ca/ 
https://in.pinterest.com/pin/1115626138931311495 
https://teeshopper.in/products/Superior-CBD-Gummies-Canada-Reviews-Reduces-Pain-Stress-Anxiety-Price 
https://sketchfab.com/3d-models/superior-cbd-gummies-canada-reviews-cc004b626d7e420594b53fa8623adf4f 
https://superior-cbd-gummies-canada-reviews-2.jimdosite.com/ 
https://solo.to/rebektmis 
https://cms1.publuu.com/flipbook-maker/977134 
https://flipbooklets.com/pdfflipbooklets/superior-cbd-gummies-canada-4#page1 
https://anyflip.com/xldue/ztlz 
https://online.fliphtml5.com/dpchg/vvpt/#p=1 
https://issuu.com/rebektmis/docs/superior_cbd_gummies_canada 
https://www.quanshotit.com/group/quanshotit-group/discussion/a27baa51-4a97-4985-aea4-0c17dcc1999c 
https://www.irvac.org/group/mysite-200-group/discussion/55212f81-99bf-4800-973d-74a53ce04ecd 
https://gamma.app/docs/Superior-CBD-Gummies-Canada-Reviews-Are-They-Legitimate-Or-Truste-xdx07pfhiid7wmi?mode=doc 
https://superiorcbdgummiescanadabuy.mystrikingly.com/
How to Write a Proposal for GSoC | Tips, Mistakes to Avoid | GSoC 2024 | Complete Guide
Tags: opensource, gsoc, techtalks
Published: 2024-03-15 13:54:19

Advice for People Applying for GSoC:
- How to write a proposal for GSoC that gets selected: Tips, Mistakes to Avoid
- Communication Best Practices
- How to get selected in Google Summer of Code as an Open Source Contributor
- How to Get a Head Start

## [Detailed Guide](https://youtu.be/tRODv9S_Lq4)
Godrej Woodscapes Floor Plan
Published: 2024-03-15 09:13:39

A brand-new residential high-rise project called [Godrej Woodscapes](https://www.godrejwoodscape.info) can be found in Whitefield, East Bangalore's busy Budigere Cross neighborhood. The project features fifteen enormous buildings with amazing 2, 3, and 4.5 BHK apartments. Here, every space is utilized effectively to give purchasers their ideal residences. The open areas, gardens, and foliage on the property might soothe the buyer's senses. The project features four units on one level, each with a varied size and price range to accommodate the needs of all purchasers. 2,400 flats total—15 buildings with 39 stories apiece—make up the project. [Godrej Woodscapes Master Plan](https://www.godrejwoodscape.info/master-plan.html) units are all centered around Vaastu and are all designed to make better use of available space. Every unit will have ventilation, natural light, and privacy.
How to translate the Laravel password reset email
Tags: php, laravel
Published: 2024-03-15 13:42:42

---
title: How to translate the Laravel password reset email
published: true
description: 
tags: PHP, Laravel
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-03-15 11:19 +0000
---

Laravel offers a very convenient default email to reset your password (via Laravel Breeze).
If you're building an application targetted at another language than English, you'll need to customize it.
I'm sharing an example, since the way to do this isn't always obvious.

## Preparation

If you didn't do this yet, change the locale setting in config > app.php.
This will affect what translations Laravel looks for.

## How to

In resources > lang, create a new file like nl.json (change nl by your language).
In that json, you can map the text from the password reset email to a translated version.

## Dutch translation

To get you started, here is a Dutch example:
```json
{
    "Hello!": "Hallo",
    "Reset Password Notification": "Wachtwoord reset",
    "You are receiving this email because we received a password reset request for your account.": "Je krijgt deze email na een verzoek om je wachtwoord opnieuw in te stellen.",
    "Reset Password": "Reset wachtwoord",
    "This password reset link will expire in :count minutes.": "De link blijft :count minuten geldig.",
    "Regards": "Groeten",
    "If you did not request a password reset, no further action is required.": "Als je deze aanvraag niet zelf hebt gedaan, mag je deze mail negeren.",
    "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Als de \":actionText\" knop niet werkt, kan je ook deze link copy-pasten: ",
    "All rights reserved.": "Alle rechten voorbehouden."
}
```

Hope this saves you some time!
When do you focus on making your code maintainable?
Tags: discuss, webdev, programming, productivity
Published: 2024-03-15 13:42:09

My team and I have been discussing an interesting question: when in your process do you focus on making code maintainable?

For context, this started with a discussion about how developers (particularly junior developers) can get better at writing maintainable code.

My company, Curricular, creates challenges for up-and-coming developers to practice their skills, including code reviews. We see lots of portfolio projects and capstone projects from bootcamps. Almost every project that we review has issues that impact maintainability, like vague variable/class/method names, or violations of principles like DRY or separation of concerns.

Obviously, when starting out, maintenance isn't as high a priority as just getting something to work, or meeting a deadline for school/bootcamp. But part of making the leap to professional developer is shipping code that you and/or others can work with in the future.

We've been dissecting our own processes to share when code starts to become more maintainable. For some, it's only through refactoring - at first it's really about getting things to work and then rewriting to optimize / subtract. For others, it starts when defining the problem - they're thinking about extensibility and future use cases right away.

My feeling is that a lot of this comes with practice. The more practice you get, and the more feedback you get from code reviews, the better your code becomes earlier in the process. But the same is true with refactoring - the more you do it, the better you get at it.

What techniques do you use to keep your code maintainable? And how much of your code's maintainability comes through refactoring vs. through your ingrained practices?
What is Hyperswitch
Tags: payments, programming, opensource, discuss
Published: 2024-03-15 13:23:07

As your business expands, it's essential to have a payment infrastructure that can handle larger transaction volumes and support local and alternate payment methods required by newer geographies.

[![What is Hyperswitch youtube video](https://img.youtube.com/vi/tBgd9sfrf1w/0.jpg)](https://youtu.be/tBgd9sfrf1w)

A single payment processor might not fulfil your requirements, so you must integrate additional payment processors. But here's the catch: integrating additional payment processors involves a lot of dev effort, which makes it costly and time-consuming.

This is where a payment orchestrator like Hyperswitch comes in. A payment orchestrator pre-integrates multiple payment processors so that businesses don't have to go through the tedious integration process.

A payment orchestrator allows businesses to:
- Reduce dev efforts
- Increase conversion rates
- Optimize processing fees
- Reduce dependency on a single processor
- Customize checkout experience

---

Embark on an enlightening journey through the intricate world of payments. These blogs are your compass to navigate the complexities of the payment galaxy. 

As developers, we create a lot of value through the applications we build. Payments are the means to capture some of that value for ourselves. Surprisingly, the effort to set up a payments stack is often exaggerated. This is what we aim to solve at Hyperswitch by building a free and open payments switch. If you resonate with this vision, you can join the movement to help build an open payments ecosystem!

![contributors](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vwbphgvpyilq2h1546h9.png)

**Learn more about how you can set up your own payments stack in minutes with [Hyperswitch](https://docs.hyperswitch.io/about-hyperswitch/readme)**

---

- Want to contribute? Check out some of our [good first issues here.](https://github.com/juspay/hyperswitch/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
- Try Hyperswitch. [Get your API keys here.](https://app.hyperswitch.io/)
Happy reading!