teleren/devto huggingface dataset:
Day 839 : Each Night
Tags: hiphop, code, coding, lifelongdev
Published: 2023-11-21 22:55:34

_liner notes_:
- Professional : Had a couple of meetings. Followed up with some folks to help answer a question from the community. Reviewed some pull requests. Submitted my expenses for this month. Spoke with a teammate about a project that they are working on. Pretty full day. Got some things crossed off on my todo list.

- Personal : Last night, I updated my travel site https://dwane.in with last bit of photos and videos I took. After that I think I pretty much passed out because I don't remember anything else. haha.

![View from a mountain in Cape Aya, Crimea looking down at the coast at sunset](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlmhhn4vtdjslfnhgb24.jpg)

Going to eat dinner. Go through some tracks for the radio show. Start back working on my next side project. Hoping to have something that I can do a small launch in the new year. Just do a little each night. Will probably try to get to bed early so I can try and fix my sleep. Maybe catch up on some anime.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube z6mECfnrRrY %}
XRP Price Prediction
Published: 2023-11-21 22:46:20

The XRP price has dropped by 2% in the past 24 hours, with its move to $0.613876 also representing a 6% drop in the past week.

Yet XRP remains up by 18.5% in the last 30 days and by 74% in the past year, with the market’s gradual recovery in 2023 – and positive outcomes in the Ripple-SEC case – helping to push the altcoin along.

The coin has also gained some extra publicity by association this week, after XRP supporters piggybacked on a widely viewed tweet from Elon Musk.

And with further market rallies likely as 2023 draws to a close, XRP could see further gains very soon.
AWS SSO Aliases you need to have
Tags: aws, iam, cloud
Published: 2023-11-21 22:34:17

Hey kid.. yeah you..  Are you tired of adding `--profile <something>` to every CLI command? Stop doing that. You can use these easy aliases to set a "context" for your CLI to use until you clear it or change it really easily. 

Make sure you have your `~/.aws/config` file configured properly for AWS SSO [](link). Then go to your shell's "rc" file (eg. `.bashrc` or `.zshrc`) and add the following:


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


Now you can quickly hop back and forth between different accounts and not type out extra stuff. 

Is it not working? Run that `awsclear` alias you just made and get rid of that dumb `.aws/credentials` file. It's almost 2024 and you don't need long lived keys anymore! (at least comment it all out while you test)

Note: Make sure you know what account you are in at all times by getting into the habit running the alias for that account when you aren't sure.
Optimization of log loss
Tags: probability, machinelearning
Published: 2023-11-21 22:08:37

Let's think of a scene where to win you need 7 H and 3 T in 10 times of tosses. And, three are 3 different coins has different possibilities of having H and T. Which coin has the probability of winning?  

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yz701kgc4q27w5ahutjv.png)
Surely, number 1 wins!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ecqitxjzqamcxwxy0xa4.png)
Let's see how we can solve this,

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fpog1eaelabvqxkhyx0h.png)
This can be used using the chain rule, But then it will be lengthy. So, using the log function on g(p)(the chances of winning) is the wisest decision. Then finding the derivative of the log loss will give the correct answer.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mfjcxhgec651f0wh2dno.png)
So what is the log loss?
According to a data scientist, log-loss is indicative of how close the prediction probability is to the corresponding actual/true value (0 or 1 in the case of binary classification). The more the predicted probability diverges from the actual value, the higher the log-loss value.

The relationship of log loss with ml is shown below-

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v83lhtbjpg4iwxsskw5t.png)
Here, we minimize the log loss and get that the optimal p is 0.7.
:D
Static hosting - pros and cons
Published: 2023-11-21 22:06:39

Pros and cons [continued](https://dev.to/cfried/is-it-worth-keeping-your-css-dry-pros-and-cons-27pf)!

Today, static hosting:

**Pros of static hosting**

* Performance:
  * Fast loading times: Static websites consist of pre-built files that do not require server-side processing. This leads to faster loading times as there is no need to generate pages dynamically for each user request.
  * Scalability: Static sites can handle high traffic loads more efficiently because they can be easily cached and distributed on Content Delivery Networks (CDNs), reducing the load on the hosting server.
* Simplicity and security:
  * Simplicity: Static sites are simpler to set up and maintain compared to dynamic sites. There is no need for server-side scripting languages or databases, making the development and deployment process more straightforward.
  * Security: Since there is no server-side processing, the attack surface is reduced. Static sites are less susceptible to certain types of security vulnerabilities, such as SQL injection or server-side script exploits.
* Cost-effectiveness:
  * Lower infrastructure costs: Hosting static websites is often more cost-effective as they can be served from simple, low-cost hosting solutions or even directly from cloud storage services. There is no need for expensive server infrastructure to handle dynamic content generation.
  * Reduced maintenance costs: With fewer moving parts and dependencies, maintenance becomes simpler, and the risk of unexpected issues is lower, reducing ongoing operational costs.

**Cons of static hosting**

* Limited interactivity:
  * Dynamic content challenges: Static sites are not well-suited for applications that require real-time or dynamic content updates. Implementing features such as user authentication, personalized content, or real-time collaboration can be challenging without server-side processing.
  * Complex forms: Forms that require complex processing or interaction may need additional solutions, such as JavaScript and APIs, making the development process more intricate.
* Content management challenges:
  * Manual updates: Content updates often require manual changes to the HTML or markdown files, making it less convenient for non-technical users to manage content compared to dynamic Content Management Systems (CMS).
  * Version control: Keeping track of changes and managing version control for static sites, especially in collaborative environments, may require additional tools and workflows.
* Scalability limitations:
  * Limited dynamic scaling: While static sites can scale well for static content, scaling for dynamic content or handling a large number of concurrent users might be challenging without additional server-side processing.
  * Complexity for large sites: Managing a large number of static files and assets, especially for websites with extensive content, can become complex, requiring efficient organization and build processes.

(Disclaimer: I got a little help by Chat GPT.)

What do you think? What would you add (or remove)?
Top 10 ways to become a great programmer
Tags: programmers, programming, coding, webdev
Published: 2023-11-21 21:53:15

Becoming a great programmer takes time, dedication, and continuous learning. Here are the Top 10 ways to become a great programmer:

1. **Mastering a Programming Language**: Choose a language that aligns with your career goals and dedicate time to master it. Focus on understanding its syntax, libraries, and best practices.

2. **Problem-Solving Skills**: Practice solving various programming challenges and algorithmic problems to improve your problem-solving abilities.

3. **Understanding Data Structures and Algorithms**: Learn and understand common data structures like arrays, linked lists, trees, and algorithms such as sorting and searching.

4. **Version Control Systems**: Become proficient in using version control systems like Git, which are essential for collaboration and managing codebases.

5. **Continuous Learning**: Stay updated with the latest trends, tools, and technologies in the programming world.

6. **Work on Real Projects**: Apply your programming skills to real-world projects, whether it's building your own applications or contributing to open-source projects.

7. **Code Readability and Maintainability**: Focus on writing clean, well-structured, and maintainable code that is easy to understand and modify.

8. **Testing and Debugging**: Learn how to write effective unit tests and how to debug and troubleshoot code efficiently.

9. **Soft Skills**: Develop good communication and collaboration skills, as well as the ability to work well in a team.

10. **Specialize and Contribute**: Consider specializing in a particular area of programming or technology, and contribute to the community through knowledge sharing and mentorship.

Determining the "best" way among these 10 depends on individual preferences, career goals, and the specific context. However, mastering a programming language and continuously learning about the latest trends and technologies could be considered foundational skills that pave the way for expertise in other areas.  

#programming #coding #softwaredevelopment #webdevelopment #codinglife #programmers #developercommunity #codingisfun #learntocode #coderslife
INTERFACES
Published: 2023-11-21 21:51:27

Interfaces in TypeScript play a crucial role in defining the structure of objects and classes, ensuring that they adhere to specific contracts and facilitating code reuse. This article will explore various aspects of interfaces, including their methods, parameters, reopening, extension, and multiple interface implementations.

## Introduction to Interfaces
Interfaces serve a purpose similar to type aliases but with a distinct syntax. They enable the creation of reusable types that describe the shape of objects.

```
interface Human {
  name: string;
}

```

## Interface Methods
Interface methods in TypeScript are used to define the structure of an object or class that must implement specific methods. They provide a way to establish contracts, ensuring adherence to a predefined structure.


```
interface Communication {
  greetings(): string;
}

```
In the above example, the Communication interface declares a single method, greetings, which accepts zero arguments and returns a string. An alternative syntax using arrow functions is also valid:


```
interface Communication {
  greetings:() => string;
}

```

## Interface Method parameters: 
Interfaces can accept parameters in method declarations, offering flexibility in defining the required structure:
Example:

```
interface Product {
  name: string;
  price: number;
  applyDiscount(amount: number): void;
}

const shoes: Product = {
  name: "Maggi",
  price: 50,
  applyDiscount(amount: number) {
    const newPrice = this.price * ( 1 - amount);
    this.price = newPrice;
return this.price
  }
};


```

## Reopening Interfaces
Reopening interfaces involves adding more properties to an interface after its initial declaration:

```
Interface Dog{
name: string,
age: number,
}

interface Dog{
breed:string,
bark():string,
}

const police:Dog = {
name:"Police",
age: 0.5,
breed: "Shepherd",
bark() {
return "WOOF!"
}
}

```

## Extending Interface
To avoid repetition and declare an interface with the exact properties of a previous one, the extends keyword can be used:

```
Interface Dog{
name: string,
age: number,
}

interface Dog{
breed:string,
bark():string,
}

interface ServiceDog extends Dog{
job: "drug sniffer" | "bomb" | "guide"
}

const chewy: ServiceDog = {
name: "Chewy",
age: 2.5,
breed: "Lab",
bark() {
return "Woof!"
},
job: "bomb"
```

## Multiple Interfaces
Interfaces can extend multiple interfaces, enabling the combination of their properties:
Example:

```
interface Person{
name: string
}

interface Employee {
readonly Id : number,
email : string
}

interface Engineer extends Person, Employee{
level: string,
languages: string[]
}

const chinwe:Engineer = {
name: "Chinwe",
Id: 123897,
email:"clarefausty@gmail.com",
level: "senior",
languages: ["JS", "TypeScript"]
}
```

In summary, TypeScript interfaces provide a powerful mechanism for defining and structuring code, promoting maintainability and code reuse through contracts and well-defined structures.
How could AI influence our evolution? 🧠🤖
Tags: discuss, ai, evolution
Published: 2023-11-21 21:32:08


I've always been fascinated by evolution, human evolution in particular. But more precisely, how the things we do and the behaviours we have today could affect our evolution. 

In the last few days, I've been thinking about AI (*how strange...*). Not only AI but how AI could affect our evolution.

Seeing as AI is taking over at a rapid pace, and we use it more and more, even for trivial things. We might get to a point where AI can do so many things for us, that we'll stop needing to do them as often, or at all. 

This popped a question in my head. **What are some things AI could do, that would lead to humans losing some part of their behaviours/intelligence/abilities/... as a part of evolution?**

All of this, of course, at a time when AI is truly useful, integrated and can completely remove the need to do certain things. 

Maybe we become dumber, as there's not much need to think as hard anymore, why would you, if you can just ask good old AI!


Or let's say that we get to a point, where some tyrannical leadership rules the world and forces all newborns to have AI implanted into their brains...

By having the AI integrated from birth, humans might lose the need for the ability to reason, as AI will do it for them. Or maybe AI is so good at remembering images, sound, texts, etc... that we don't need to learn to do those things, and over time, humans might become incapable of doing them without the implanted chip.

Possibilities are endless really, so what do you think?
Amazon S3 Basics: What You Need to Know
Tags: programming, aws, braziliandevs, devops
Published: 2023-11-21 21:01:56

I recently started studying Amazon Web Services, beginning with S3, and I want to share more about this amazing service with you.


## Understanding the Meaning of S3

The meaning of S3 is Simple Storage Service or Amazon Simple Storage Service (and in truth, it's really too simple to use).

## What Is S3?

S3 is a service designed for storing your digital objects. But what do we mean by 'objects' when talking about S3? According to AWS documentation, 'objects' refer to everything you upload to your S3 bucket. This includes images, documents, or any other content you wish to store.


## How many things can I do using S3?

S3 is not just for saving and downloading files. There is a wide range of tasks you can accomplish with S3:

- Upload objects
- Implement version control for objects
- Store backups and logs
- Host websites with only static files


## Conclusion

When explaining S3 to a non-developer, I would describe Amazon S3 as an 'online folder' for storing your files and logs, as well as hosting websites.


If you like this content, follow me on my [social media](https://bento.me/cmsdev).

<img src="https://media.giphy.com/media/xULW8v7LtZrgcaGvC0/giphy.gif" alt="thank you dog" />
The True Price of My Open Source Journey
Tags: webdev, developer, productivity, opensource
Published: 2023-11-21 19:56:44

Ever wondered what it costs to be an Open Source Software (OSS) developer? I decided to break down my monthly expenses to give you a glimpse into the financial side of my passion for OSS. While I don't do it for the money, sharing this information might help those considering a similar path.

## Monthly Expenditure Overview

### Tools I Invest In

1. **GitHub Pro: $4 USD/month**
   - Essential for managing numerous repos with added features and higher limits.

2. **DockerHub Pro: $5 USD/month**
   - Pro features assist in larger projects with vulnerability scanning and image inspections.

3. **Dedicated Servers: $65 USD/month**
   - Playground for development and hosting production-grade projects, like my [Valheim project](https://github.com/mbround18/valheim-docker).

4. **IDE (IntelliJ): $249 USD/year**
   - Unbeatable integrations for efficient development.

5. **Dbeaver: $23 USD/month**
   - The go-to IDE for databases in my opinion.

6. **Cloud Services (AWS/Azure/Google Cloud/B2 Backblaze): $27 USD/month**
   - Covers backups, static sites, databases, and more.

**Yearly Cost: $1,737 USD**

### Cost-Free Tools

1. **Open Source Tools**
   - Utilizing free and powerful tools like K8sLens, croc, kubectl, curl, bind-tools (including dig, nc), grep, aria2, terraform, rclone, and many more.

## Not Calculated but Still Costs

1. **Time Investment**
   - Spending an average of 20 hours per week on OSS development.

2. **Living Expenses**
   - Utilities, housing, and daily sustenance.

3. **Education**
   - Investing time and money into a Bachelor's and Master's in STEM fields.

4. **Hardware and Technology**
   - Continuous investment in equipment for development.

## Why Share This?

While I'm not in it for the money, the true cost of my OSS journey involves much more than what's reflected in these numbers. It's a labor of love, a commitment of time, and a dedication to personal and professional growth. If you're considering the OSS path, remember, the most valuable contributions often go beyond the balance sheet.
Introduction to Java Programming
Tags: webdev, programming, beginners, java
Published: 2023-11-21 19:53:34

Welcome to the exciting world of Java programming! If you're eager to write your first Java code, you're in the right place. Before diving into the code, let's set up our development environment.

**Setting Up the Environment**
You need a place to write your code, and while you can use a simple text editor like Notepad, using an Integrated Development Environment (IDE) offers a more powerful development experience. Popular Java IDEs include:

Netbeans

Eclipse

Visual Studio Code

IntelliJ

Choose one that suits your preferences, as each comes with its unique features for coding, running, compiling, and debugging Java programs.

**Java Development Kit (JDK)**
To run Java code on your chosen IDE, you'll need the Java Development Kit (JDK). The JDK is a comprehensive software development kit for building Java applications. It includes:

**Java Runtime Environment (JRE)**: Executes Java programs.

**Interpreter/Loader (java)**:Interprets and loads Java bytecode.

**Compiler (javac)**: Translates Java source code into bytecode.

**Archiver (jar)**: Packages compiled Java code into JAR files.

**Documentation Generator (javadoc)**: Creates documentation from Java source code.

Ensure you have the latest JDK version by checking the official Oracle or OpenJDK website. While new features are added with each release (Java 21 being the latest at the time of writing), Java maintains backward compatibility. The basic language features remain consistent across versions.

**JDK Versions and Long-Term Support (LTS)**
Not all JDK versions receive Long-Term Support. Some notable versions with LTS include Java SE 8, 11, and 17. These versions receive extended support and updates, ensuring stability for critical applications.

As you embark on your Java journey, remember that Java is a versatile language, and your skills will stay relevant even as new versions emerge.

Now, let's write some Java code and explore the endless possibilities of this powerful programming language. Happy coding!
Release project with npm
Tags: opensource, beginners, npm
Published: 2023-11-21 19:47:53

In this blog, I will be releasing my `til_tracker` project with [npm](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry)

**Process for creating a release**
1. Create an account for [npm](https://www.npmjs.com/).
2. Ensure you have `package.json` file in the root directory.
3. Add/Update `README.md` file go give full instructions on how to your code.
4. [Tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) your release, using `npm version 1.0.0 -m "Release v1.0.0"`
5. Push the new tag to GitHub, using `git push origin main --tags`
6. Enter `npm login` in the terminal to log in to npm first.
7. Use `npm publish --access public` for final release.
8. Now, you can run `npm i til_tracker`.
https://www.npmjs.com/package/til_tracker

**Automate Release Process with GitHub Actions**
Following `cd.yml` was implemented to automate a new release whenever a new tag is pushed to the main branch.

```typescript
// .github/workflows/cd.yml

name: cd

on:
  push:
    tags:
      - 'v**'

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v3

      - name: Setup .npmrc file to publish to npm
        uses: actions/setup-node@v1
        with:
          node-version: '20.x'
          registry-url: 'https://registry.npmjs.org'

      - name: Install node dependencies
        run: npm ci

      - name: Build
        run: npm run build

      - name: Publish to npm
        run: npm publish --access public
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
```

_*NOTE: you need to set up an access token from [npm](https://www.npmjs.com/). Click your profile, and you will see "Access Tokens". Copy the access token and paste the token in GitHub Settings/Secrets, as `NPM_TOKEN`._

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

**Workflow Result**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2p9f0if1jjkagv4j17q2.png)

**Installation Guide**
1. Run `npm i til_tracker` in the terminal
2. Run `cd node_modules/til_tracker` to go to the root directory of the `til_tracker`
3. Install `ts-node` if your current project does not have one
4. Now you can use the `til_tracker`

**User Testing**
It was noted that the documentation lacked information on certain prerequisites essential for executing `til_tracker`. Specifically, the current documentation omitted two crucial steps: the requirement of `ts-node` as a prerequisite and the necessity for the user to navigate to the root directory of `til_tracker` in `node_modules` to enable the use of `til_tracker`. So, adjustments were made to the `README.md` file to incorporate these details. Following these changes, the instructions in the `README.md` file became more user-friendly, allowing my reviewer to use it without any issues.

You can find the complete `README.md` file in here: [README.md](https://github.com/avelynhc/til_tracker/blob/main/README.md)