teleren/devto huggingface dataset:
Top Featured CodeNewbie Posts (8/17/23)
Tags: codenewbie, beginners
Published: 2023-08-17 20:07:45

---
title: Top Featured CodeNewbie Posts (8/17/23)
published: true
description: A round up of the most-read and most-loved contributions from the CodeNewbie community this past week
series: TopCN
tags: codenewbie, beginners,
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fzyga2chi0ucp09mzj9j.jpg
---
_Every other week, we'll round up the CodeNewbie tag's top posts based on traffic, engagement, and a hint of editorial curation. Hope you enjoy!_ 

### How to Communicate Better in Open Source

OSS collaboration requires good communication, synchronously and asynchronously. Here's @adiatiayu to share how to effectively communicate with your peers remotely. 

{% embed https://dev.to/adiatiayu/how-to-communicate-better-in-open-source-3hdj %}


### Vacation Coding Amnesia

Taking a long break without a structured coding plan can leave you feeling completely out of touch with the programming languages you have mastered. Take these tips from @klc to prevent a similar fate!

{% embed https://dev.to/klc/vacation-coding-amnesia-d11 %}


### Getting started with Express.JS (JavaScript)

In this post, @dumebii breaks down what servers are, how Express works in JavaScript, and how you can use it to configure your first server. 

{% embed https://dev.to/dumebii/getting-started-with-express-javascript-5142 %}

### Backend Error Handling: Practical Tips from a Startup CTO

In this blog, @ctrlaltvictoria shares some practical tips and best practices on error handling and logging that she has picked up, alongside examples from her experiences. 

{% embed https://dev.to/ctrlaltvictoria/backend-error-handling-practical-tips-from-a-startup-cto-h6 %}

### How do Companies Make Money in Open Source?

Honestly, in more ways than you would think! @fernandezbaptiste shows that just because your project is open source, that doesn't mean it can't be monetized.

{% embed https://dev.to/quine/how-do-companies-make-money-in-open-source-15fp %}


### Demystifying JavaScript Promises: A Newbie's Guide

@rohitnimangre breaks down JavaScript promises step by step, making it easy for you to understand and utilize this powerful feature in your code.

{% embed https://dev.to/rohitnimangre/demystifying-javascript-promises-a-newbies-guide-ol0 %}


### My Relationship with Coding (so far...)

When you're deep in your career, you're going to want to look back at those things that really inspired you going into it. Thank you to @adgholson for sharing a personal story about their journey into programming! 

{% embed https://dev.to/adgholson/my-relationship-with-coding-so-far-53d2 %}


_That's it for our top CodeNewbie posts for this week! Follow the [CodeNewbie Team on DEV](https://dev.to/codenewbieteam) for more content and discussions... and be sure to keep an eye on this series in the future - you just might be in it!_
Caesar Cypher
Tags: cypher, python, cleancoding, security
Published: 2023-08-17 19:47:13

¡Hola a todos! 👋 Con la aspiración de mejorar mis habilidades en Python y compartir mis proyectos con la comunidad, he creado una implementación simple pero poderosa del Cifrado César. 🐍💻 Siempre me ha fascinado el arte de la encriptación y la desencriptación, y este proyecto permite a los usuarios encriptar o desencriptar mensajes usando la técnica del Cifrado César.

🔒 El Cifrado César es un clásico cifrado de sustitución que reemplaza cada letra en el texto por otra letra desplazada por un valor fijo. ¡Es una forma divertida de aprender sobre algoritmos criptográficos mientras mejoramos nuestras habilidades de codificación!

✨ He utilizado mi experiencia en Python para hacer que el código sea limpio, modular y eficiente. El programa permite a los usuarios elegir entre encriptar o desencriptar, especificar el valor del desplazamiento y recibir el mensaje transformado.

🌟 ¡Busco comentarios de otros expertos en la comunidad! Por favor, compartan sus opiniones sobre cómo puedo optimizar el código, mejorar la experiencia del usuario o aumentar las medidas de seguridad. ¡Sus valiosos conocimientos y sugerencias serán muy apreciados! 🚀


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8iy08wzaehe8pxr0fwre.png)
Tips to back to university for IT students
Tags: beginners, programming, university, softwareengineering
Published: 2023-08-17 19:25:30

Link al post en español: [Post en LinkedIn](https://www.linkedin.com/posts/manueljesus00_tips-backtouniversity-university-activity-7098021908561969152-1ol4?utm_source=share&utm_medium=member_desktop)

Good afternoon community.

In a month we practically return to the university classrooms and, in my case, with joy and sadness as it is already my last year in the degree of computer engineering. All this time has brought me a series of lessons that have made me get to where I am and, taking advantage of the final stretch of the summer, I bring you a small review of everything I've learned and I consider vital for students from first year of engineering.



1. Explore different areas: Computing is a broad field, so much so that the ACM in its latest Computing Curricula (2020) talks about 7 disciplines (without focusing) in the field of computing. Therefore, the ideal is to take advantage of the break periods to investigate a little of what is beyond the degree you are doing or even go a little deeper.



2. Put the focus on the fundamentals: Computer science, like everything else, has a foundation and fundamentals. Sometimes it may seem that subjects related to the fundamentals of programming or computer science can be boring, but they are vital when it comes to understanding any development language.



3. Create/participate in small projects: Take every opportunity both in class and outside to create small code projects to gain practice and, if you combine it with code sharing platforms such as Github or Gitlab you can create a portfolio where companies can see firsthand how your way of reasoning and approaching a problem is.



4. Create networks of contacts: We are in the midst of digitalization. Take advantage of everything you can to make yourself known both in general or specific social networks (such as LinkedIn) or through events organized at the university or in communities.



5. Participate in clubs and communities: In these types of spaces you can learn about a specific topic in addition to meeting people with whom you share interests. Some communities that I recommend are those of WordPress, Microsoft or Google, among others. Being communities focused on a specific technology they can help you with some technical questions you may have or project implementations.



6. Acquire soft skills: Okay, our profession makes us spend most of our time at a computer creating or modifying code but remember that, when it comes to work, you will need to work in a team or you will have to defend projects. Therefore, it is important to work on your social skills to be more fluent when it comes to interacting in any environment.



These are some of the things that I have learned during my first years of my career and that I am sure will be useful to someone else, but now I ask you, what is something that you have learned in your career or in your job that you think is important for others to know?



See you in the comments 👋👋
RandomSparkles
Tags: codepen, javascript, animation, sparkling
Published: 2023-08-17 19:21:21

<p>This pen uses JavaScript to draw random spots by setting the "d" attribute of the SVG path element to a set of random points, switching the M and L options to create space between the lines.</p>

<p>It also engages the SVG circle element, animating created circles to move to random positions, grow and shrink repeatedly, and eventually disappear after ten seconds.</p>

{% codepen https://codepen.io/Dani_X/pen/oNQPNPV %}
Godot at Gamescom 2023
Tags: godot, gamedev, gamescom, beginners
Published: 2023-08-17 19:09:08

Just want to make a quick shoutout that Godot will be having their first booth at Gamescom 2023, thanks to Ramatak & W4Games donations for the booth.

{% twitter 1692215009974104221 %}

### Where
Koelnmesse, Messepl. 1, 50679 Köln, Germany ([map](https://www.openstreetmap.org/?mlat=50.94590&mlon=6.98034map%3D16%2F50.9441%2F6.9798#map=16/50.9455/6.9805&layers=N))

### When?
- August 23rd, 2023. Wednesday 13:00 - 19:00
- August 24th, 2023. Thursday 10:00 - 20:00
- August 25th, 2023. Friday 10:00 - 20:00

### Which Location?
Godot booth in the Business Area, Hall 2.2, Stand C-042. Check the map below: 

![godot gamescom 2023](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fyb7hee8gdrgodb4gkx4.png)

___

For those who don't know about Gamescom, it is a trade fair for video games held annually at the Koelnmesse in Cologne, North Rhine-Westphalia. It is the world’s largest gaming event (measured by exhibition space and number of visitors), with 370,000 visitors and 1037 exhibitors from 56 countries attending the show in 2018.

For more details, please check the official announcement [page](https://godotengine.org/article/godot-at-gamescom-2023/).
PostgreSQL - History and Common Use cases
Tags: discuss, postgressql, database, programming
Published: 2023-08-17 19:07:11

In this article I will tell you about:

1. What is PostgreSQL? 
2. History of PostgreSQL?
3. Common use cases of PostgreSQL

So let's get started with first question.

**What is PostgreSQL?**
PostgreSQL is an advanced open-source relational database system that supports both relational (SQL) and non-relational (JSON) queries. It is one of the highly stable database as it was build more than 20 years ago and it is backed by the open-source community. 
It is used as a primary database not just for the web applications but also mobile and analytics applications too.

So this was a little introduction of the PostgreSQL.
Now let's look at the history of PostgreSQL.

**History** 
PostgreSQL originally named as POSTGRES was started in 1986 at Berkeley Computer Science Department, University of California.
The name POSTGRES was in reference to the Ingres that is also a database developed in Berkeley. POSTGRES main goal was to add features needed to support multiple datatypes.
It was renamed to PostgreSQL in 1996 to show it's support for the SQL.
Did you know that it was originally designed to run on UNIX-like programs only. But as the time passed, it was evolved to run on various platforms like macOS, Windows and Solaris.

Now let's dive into some of the use cases of the PostgreSQL also known as Postgres.

**Common use cases**
1. Robust database:
It is used as primary back-end database because of it's robustness to power dynamic websites and web applications.

2. General purpose:
It is used in large number of organizations and startups to support their real life  products and applications.

3. Geospatial database: 
It can help in storing, indexing and querying the geographical data with the PostGIS extensions for the geographic information system.

**Languages it support**
It supports almost all the popular languages such as Python, Java, JavaScript, C/C++, Ruby, Go, Perl and Tcl.
This Week's Undiscovered (8/17/23)
Tags: spotlight
Published: 2023-08-17 18:51:43

---
title: This Week's Undiscovered (8/17/23)
published: true
description: A curated selection of posts published within the last week that are just waiting to be discovered.
tags: spotlight
series: This Week Undiscovered
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/toiq286x75hefzypiiiy.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-07-27 22:02 +0000
---

Welcome back to **This Week's Undiscovered**, a curated selection of amazing posts published within the last week that are just waiting to be discovered.

The goal is to shed light on hidden gems within DEV's community that haven't yet received the attention they may deserve 🌱

Hope you enjoy it!

{% embed https://dev.to/dwayne/useful-chompers-lo5 %}

In this post, @dwayne teaches you about useful chompers, not defined in elm/parser, that can help you in the lexical analysis stage of your parser.



{% embed https://dev.to/adevnadia/fantastic-closures-and-how-to-find-them-in-react-3fpc %}

Closures in JavaScript must be one of the most terrifying features of the language, but @adevnadia breaks it down for you in this post. Read on or watch in video format!



{% embed https://dev.to/baduit/port-a-project-from-c-to-rust-25l0 %}

Here are some insights from a project that @baduit was working on as a way to learn Rust. It might give you a better look into the differences between C++ and Rust and how to port your project from one to the other. 



{% embed https://dev.to/creatures-dev/getting-started-with-css-nesting-1b1k %}

CSS nesting used to only be possible in preprocessors like Sass and Less, but now it's built-in to native CSS and all modern browsers should support it after August 29th! Let's find out more about it with @creatures-dev.



{% embed https://dev.to/aws/a-look-at-airflowctl-a-tool-to-help-developers-manage-apache-airflow-projects-5eke %}

Here's @094459's first impressions of airflowctl, a command-line tool for managing Apache Airflow™ projects, making it super easy to get up and running. 



{% embed https://dev.to/eevajonnapanula/more-accessible-graphs-with-jetpack-compose-part-3-differentiating-without-color-3lgo %}

Anytime you're trying to get your data across, ensuring it's accessible will help your audience get the most out of it. Check out @eevajonnapanula's series to help you to build more accessible graphs with Jetpack Compose.




Let us know if we missed anything; share your predictions for the next top talent in the comments!

<a href="https://www.freepik.com/free-photo/golden-number-one-with-gold-crown-top-floor-champion-winner-yellow-background-by-3d-render_25829004.htm#query=spotlight%20on%20a%201&position=38&from_view=search&track=ais">Image by DilokaStudio</a> on Freepik
The Rogue React Component
Published: 2023-08-17 18:43:02

### The Issue at Hand

Let's dive right in: imagine (or try to :wink:) you're having a nice afternoon writing a code snippet that employs an external component we'll conveniently call `RogueComp`:

```jsx
const MyComp = ({ someVariableProp }) => {
  return (
    <>
    ... Some markup
      <RogueComp someProp={someVariableProp} /> 
    ...
    </>
  );
};
```

You start testing, everything seems fine, but alas, the `RogueComp` has taken matters into its own hands and decided to disregard any changes in the props. The likely cause? `RogueComp` probably uses `someProp` to set up its internal state, which means it's unresponsive to any subsequent prop changes.

Here's a simplified view of what's probably happening under the hood:

```jsx
const RogueComp = ({ someProp }) => {
  const [someState, setSomeState] = useState(someProp);

  return <p>{someState}</p>;
};
```

Before you start pointing fingers, I'm not the one responsible for this mischievous component!

### The Fred Flintstone Solution

Unable to make it work right, you devise a clever plan: grab our stick and smash `RogueComp` to the ground and then bring it back to life.

You concoct the following strategy:

```jsx
const MyComp = ({ someVariableProp }) => {
+  const [invalid, setInvalid] = useState(false);
+
+  const invalidate = () => {
+    setInvalid(true);
+    setTimeout(() => setInvalid(false));
+  };
+
+  useEffect(() => {
+    invalidate();
+  }, [someVariableProp]);

  return (
    <>
    ... Some markup
+      {!invalid ? 
        <RogueComp someProp={someVariableProp} /> 
+        : null
+      }
    ...
    </>
  );
};
```

Voila! It works like a charm, saving the day. Yaba-daba-dooo!

... Not so fast.

A surprise hitch appears – `RogueComponent` acquired quantum powers and every time `someProp` changes, it briefly disappears. Why? Because it's not smoothly rendered in one go.

### The Right Approach

Hold tight, because there's another way out: the mighty **React's** `key` prop comes to the rescue. Yup, `key` is not just an obscure list's concept. Think of it as a signal to React that a particular section of the DOM needs a complete overhaul. Here's the gist from the [React docs](https://react.dev/reference/react/useState#resetting-state-with-a-key):

> You can reset a component’s state by passing a different key to a component. (...) When the key changes, React re-creates the (...) component (and all of its children) from scratch, so its state gets reset.

Let's tackle this head-on:

```jsx
const MyComp = ({ someVariableProp }) => {
+  const freshKey = useMemo(() => `${Math.random()}`, [someVariableProp]);

  return (
    <>
    ... Some markup
-      <RogueComp someProp={someVariableProp}
+      <RogueComp key={freshKey} someProp={someVariableProp} />
    ...
    </>
  );
};
```

See how this solution is not just smoother and simpler, but also eradicates the pesky flickering issue? No more awkward gaps in the rendering process.

Another job well done! :smile:
Help - How to run npm builds using docker?
Tags: help, docker, npm, react
Published: 2023-08-17 18:41:15

## Hello 👋

I want to run `npm run build` scripts using a `Dockerfile/docker-compose.yml` file and get the build output on my host file system. Is there any way I can achieve this?

Basically, what I'm looking for is to run a single command, like

```bash
docker-compose up

# OR

docker build -t my-builder . && docker run my-builder

# or maybe even a shell script
```

which would spin up a container, run the `npm build` script inside the container, and with the help of either a volume or bind mount (or some other concept I'm not aware of 😅) put the build output on a specified directory on the host file system.

Any help would be greatly appreciated 🙏.

Thanks!!
Day2/100- Overcoming Challenges and keeping the Promis
Published: 2023-08-17 18:28:11


Hello everyone,

I'm checking in to share my Day 2 update on this coding journey. 🌟

Today wasn't quite like the first day. I spent the entire day outdoors, and by the time I got back home, I'll admit, coding was the last thing on my mind. But here's the thing: I made a commitment to myself, and I believe in the power of keeping promises.

Despite the tiredness and the temptation to skip it, I sat down and got to work. I tackled a few problems on HackerRank, and I'm genuinely proud of myself for pushing through. It's moments like these that remind me of the strength of determination.

It's okay to have days that feel a bit tougher, but what matters is that we show up and keep moving forward. Every small victory, like not giving up, is worth celebrating.

Let's keep the motivation high and continue to support each other through the ups and downs of this journey. Feel free to share your own experiences and triumphs in the comments below.

Stay resilient,
Sivaraghavi UR
The Journey of Building a PLV8 Image for PostgreSQL Across Platforms
Tags: plv8, lowcode, github, postgressql
Published: 2023-08-17 18:20:43

Hey folks! Today, I want to share a story. It's a story of challenge, perseverance, and ultimately, triumph. It's the story of how we built our own PLV8 image for PostgreSQL.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7bk57bzu24eaqzvbewg9.png)
You see, we were tired of the complexities and limitations of the existing PLV8 build process. It was like trying to fit a square peg in a round hole. So, we decided to take matters into our own hands and build our own PLV8 image.
The journey wasn't easy. We faced obstacles, setbacks, and moments of doubt. But with every challenge, we learned something new, and with every setback, we came back stronger.
The result? A PLV8 image that works seamlessly across different platforms. It's like a Swiss Army knife for PostgreSQL developers, ready to tackle any challenge that comes its way.
Want to learn more about our journey and the technical details? Visit our [GitHub repository](https://github.com/sibedge-llc/plv8-dockerfiles) and if you appreciate our work, please give us a star. Your support means a lot to us!

And [download our Image from dockerhub.](https://hub.docker.com/r/sibedge/postgres-plv8)
Git Merge vs. Git Rebase: Choosing the Right Path for Your Workflow
Tags: git, codenewbie, github, softwaredevelopment
Published: 2023-08-17 18:20:40


**Introduction:**
Git, the powerful version control system, offers two distinct methods to integrate changes from one branch into another: `git merge` and `git rebase`. While both commands achieve the same goal, they take different routes to get there. In this blog post, we'll demystify the magic behind `git rebase` and provide a clear comparison with its counterpart, `git merge`.

**Conceptual Overview:**
At the core, both `git merge` and `git rebase` tackle the challenge of merging changes from one branch into another. However, they employ contrasting strategies to achieve this. 

**The Merge Option:**
`git merge` is the simplest choice. By executing `git merge main` while on your feature branch, you create a new "merge commit" that combines the histories of both branches. This approach maintains the original branches and is a non-destructive operation. However, frequent merges can clutter the feature branch's history with extraneous merge commits, making it less comprehensible.

**The Rebase Option:**
Enter `git rebase`. Executing `git rebase main` on your feature branch moves the entire branch to start from the tip of the main branch. Instead of creating merge commits, rebase rewrites the history by crafting new commits for each original commit. This results in a linear and cleaner project history, making it easier to navigate using commands like `git log`.

**Interactive Rebasing:**
A powerful aspect of rebase is interactive rebasing. By running `git rebase -i main`, you gain complete control over your branch's commit history. This helps clean up messy histories and consolidate commits. This control isn't possible with `git merge`.


**When to Choose Which:**
- **Choose Merge:** Opt for `git merge` when you want a straightforward integration that doesn't alter commit history significantly. This is especially useful when collaborating with a team.
- **Choose Rebase:** Go for `git rebase` when you want a cleaner, linear history that's easy to understand and navigate. Use interactive rebasing to tidy up commits before merging.

**Conclusion:**
In the Git world, both `git merge` and `git rebase` have their merits. While `git merge` maintains existing branches and preserves context, `git rebase` offers a cleaner and more linear history. Your choice depends on the balance between these advantages and your project's specific needs. By understanding the differences and considering your workflow, you can harness the power of both commands effectively. Happy branching!
99 Bottles of OOP
Tags: books
Published: 2023-08-17 18:11:29

**Chapter 1**

Cyclomatic Complexity - Thomas J. McCabe

Optimize for understandability, not changeability, and patiently tolerating duplication if doing so will help reveal the underlying abstraction.

ABC Metric

* Assignments - count of variable assignments

* Branches - count of branches

* Conditions - count conditional logic

**Chapter 2**

TDD - Kent Beck

How can achieve code Simplicity with TDD?

* Red - Write a test

* Green - Make it run

* Refactor - Make it right

Tests are not the place for abstractions—they are the place for concretions.

**Chapter 3**

SOLID - Michael Feathers & Robert Martin

Open/Closed - "open for extension and closed for modification"

“Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure." - Martin Fowler

* Flocking Rules

**Chapter 4**

To Be Continued