teleren/devto huggingface dataset:
Java abstact class vs Interface
Tags: java, learning, interview, programming
Published: 2023-11-04 15:20:26

##Lets see how Abstract classes and Interfaces differs,

- Abstract classes supports both abstract(methods without definition) and non-abstract methods.
- Interface supports only abstract method, then multiple Default and Static methods.
- Interface supports multiple inheritance by implementing multiple interfaces.
- Abstract class doesn't provide support for multiple inheritance.
- Interface can't provide implementation of abstract class.
- Abstract class can provide implementation of interface by defining their methods.
- Abstract class can extend other java class and implement multiple interfaces.
- Interface only extends other interfaces only.
Code snippet to programmatically order any Amazon product from your terminal
Tags: ecommercedevelopment, programming, webdev, tutorial
Published: 2023-11-04 15:17:29

Building in eCom is hard - giants have built it with closed systems in mind. 

That changes today.

A few lines of code - that's all it takes to order anything from Amazon.

👉 [Walk-through guide to test out programmatic shopping](https://rye.com/blog/order-amazon-from-your-terminal)
Code Smell 230 - Schrödinger Code
Tags: webdev, beginners, programming, tutorial
Published: 2023-11-04 14:53:33

*Your code is dead and alive*

> TL;DR: Look carefully for race conditions

# Problems

- Principle of Least Surprise violation

- [Race Conditions](https://en.wikipedia.org/wiki/Race_condition)

# Solutions

1.  Avoid race conditions 

2. Avoid global variables

3. Use proper [synchronization](https://en.wikipedia.org/wiki/Semaphore_(programming))

# Context

Schrödinger code is code that can be in two different states at the same time, but the state of the code is not determined until it is executed. 

This can happen when the code contains a race condition, or when the code depends on the state of a global variable that can be changed by other threads or processes.

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/b55ffb2e174db3880e40a162405d8fd1)
```python
import threading

cats_alive = 0

def thread_1():
  cats_alive += 1

def thread_2():
  cats_alive -= 1

if cats_alive > 0:
  feedThem()

# The value of cats_alive is indeterminate, 
# so the code can be in either of the two states:
#
# 1. cats_alive > 0 and feedThem() is called.
# 2. cats_alive <= 0 and feedThem() is not called.

```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/d147d5084dc7c0680f4ff01c10cce152)
```python
import threading

lock = threading.Lock()
cats_alive = 0

def thread_1():
  with lock:
    cats_alive += 1

def thread_2():
  with lock:
    cats_alive -= 1

if cats_alive > 0:
  feedThem()

# With the lock, the two threads cannot access 
# the `cats_alive` variable at the same time.
# This means that the value of `cats_alive` is always determined, 
# and the program will not exhibit Schrödinger code behavior.

```

# Detection

[X] Manual

Make code reviews on concurrent code

# Tags

- Concurrency

- Globals

# Conclusion

To avoid Schrödinger code, avoid race conditions and avoid depending on the state of global variables that can be changed by other threads or processes.

If you need to use a global variable in your code, ensure it is correctly synchronized.

# Relations

{% post https://dev.to/mcsee/code-smell-198-hidden-assumptions-32i3 %}

{% post https://dev.to/mcsee/code-smell-32-singletons-1ka %}

{% post https://dev.to/mcsee/code-smell-60-global-classes-3o9m %}

# 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 [Yerlin Matu](https://unsplash.com/@yerlinmatu) on [Unsplash](https://unsplash.com/photos/shallow-focus-photography-of-white-and-brown-cat-GtwiBmtJvaU)  
  
* * *

> The last thing you wanted any programmer to do is mess with internal state

_Alan Kay_
 
{% 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 %}
10 Melhores Aplicativos VPN Gratuitos para iPhone
Tags: dicas, iphone, vpn
Published: 2023-11-06 20:13:18

---
title: 10 Melhores Aplicativos VPN Gratuitos para iPhone
published: true
date: 2023-11-04 14:49:41 UTC
tags: DICAS,Dicas,Iphone,VPN
canonical_url: https://astronautsdevelopers.com/10-melhores-aplicativos-vpn-gratuitos-para-iphone/
---

Com a crescente preocupação com a segurança e privacidade online, o uso de uma VPN (Rede Virtual Privada) tornou-se essencial para proteger nossos dados enquanto navegamos na internet. Se você é um usuário de iPhone em busca das melhores opções de aplicativos VPN gratuitos, está no lugar certo. Neste artigo, apresentaremos uma lista dos 10...

https://astronautsdevelopers.com/10-melhores-aplicativos-vpn-gratuitos-para-iphone/
Letting Go of One Project to Pursue a Better One
Tags: learning, writing, watercooler
Published: 2023-11-04 14:37:19

Hi, M!

## Hello Again, Cold World!

Back at it with "**Hello Cold World!**" as I'm here typing in my room, AC on (no pun intended). For those of you new here, these posts are where I get real with myself, both technically and mentally. The series name? It's a nod to that Paramore song.

## Letting Go of One Project

So, I stumbled upon this project in the Data Science Community on LinkedIn named [Mercury](https://runmercury.com/). It's this slick tool that transforms notebooks into web apps instantly. At first, it seemed promising, but it fell short as a portfolio platform, which was my main goal. It ran smoothly locally, but deploying to their cloud was a different story—debugging became a Herculean task. I even tried shifting it to Azure as a container web app, wrestling with Docker on my laptop, but no dice. After a day spent in debugging purgatory, I waved the white flag on Mercury. It's cool, just not what I need right now. My focus is locking down a data analyst role, and building an app solo just isn't in the cards—I need to invest time elsewhere. For now, I'm diving into their docs, contributing what I can to grasp it better and understand the open-source scene.

## Pursue a Better One

I'm redirecting my efforts toward mastering Metabase and Amundsen for my Data Analyst path. Plus, there's a final project for my multi-platform Flutter course looming over me. Penning this post is like patting myself on the back for the coding strides I've made.

## Message from M

> Hit the pavement for a morning stroll now and then, aim for 10-15 minutes. It's like a shot of espresso for the spirit to kick off the day. - M
Oracle Cloud Infrastructure 2023 AI Foundations Associate (1Z0-1122-23)
Tags: oracle, oraclecloud, oci, ai
Published: 2023-11-04 14:28:07

New feather added in #MyCloudDiary :: https://lnkd.in/dHAMiTcH ..



I have some exciting news to share! I have just uploaded a comprehensive practice test for the 1Z0-1122-23 Oracle Cloud Infrastructure 2023 AI Foundations Associate certification, on Udemy.



You can search 1Z0-1122-23 OCI 2023 AI Foundation Trial



This practice test is designed to help aspiring candidates like us prepare for the exam with confidence. It covers all the essential topics and provides realistic questions to simulate the actual exam experience. Whether you're aiming to become certified or simply want to strengthen your understanding of AI within the OCI environment, this practice test can be a valuable resource. Feel free to check it out and let me know your thoughts.



Certification Name - Oracle Cloud Infrastructure 2023 AI Foundations Associate (1Z0-1122-23)



Certification Link :: https://brm-certification.oracle.com/apex/f?p=1111:6:14885428904220:::::#xd_co_f=YTY0MjMyMGItM2ZjZC00NDQyLTg0MTktZTJlMzFhZDAzOThh~



Please like ,share and subscribe below #channelpartners on

#YouTube :: https://lnkd.in/d2zATThK

#GitHub :: https://lnkd.in/dHAMiTcH

#Hashnode :: https://lnkd.in/d_gtGxuS

#Twitter :: https://lnkd.in/e5ZY5j-x

#DevCodeCommunityTLV :: https://lnkd.in/duMEcSnc

#Tealfeed :: https://lnkd.in/eTyp-Xe4

#Medium :: https://lnkd.in/dpEzM8GU



CC- Adding my leaders and colleagues to share achievement::

Mahesh Bhosale Swapneel Doshi Girish Chhabra Luis Méndez Osvaldo Cantu Jason Chance Anji Reddy Venumula Susan Cutinha Murli Reddy EUR ING Ioannis Kolaxis MSc Sabahat Siddiqui Amit Batra, PMP® Rajeev Choudhary Mukul Sharma Dr. Ritu Anand Farhad Sayeed Pritish Kumar Anand Sitaraman Abhishek Saxena Kumar Amitesh Pawan Kumar Chadha Vijay Bijjargi



Education for Cloud Leaders :: Dan Rey Denise Reed Lamoreaux Sjoukje Zaal Deepak Rajendran Kasam Shaikh - Microsoft [Azure] AI MVP ☁ 🇮🇳 Yujun Liang ⎈☁️🌎 Yongkang ⎈ ☁️ HE Walter Lee Assoc. Prof. Dr. Eleni Meletiadou, SFHEA, UTF, MCIPD, CMBE,MIE Expert Dahnesh Dilkhush Nikkia Carter



#mvpbuzz #mct #devops #cloud #software #community #oraclecloud #oci #oraclecertified  #awscommunitybuilders #dataanalytics #share #microsoft #like #github #dataanalysis #kubernetes #kubernetesservices #kubernetescluster #azure #aws #complexity #amazon #google #leadershipbyexample #IAmRemarkable #architecturelovers #architect #education #k8s Tata Consultancy Services #cybersecSecurity #security #power #leaders #cybersecurity #mvpbuzz #mvp #mvps #mct #powerbiexperience #IAmRemarkable #ArtificialIntelligence Embassy of the Republic of Latvia to the United Kingdom of Great Britain and Northern Ireland 

#oracle #oraclecertified #oraclecloudinfrastructure #oraclecloudinfrastructureai

#FirstAIcertification

#ai 

#aicertification 

#aicertified
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4gbh9qoe9nk3p9l96ayj.png)
How to Fine Tune LLMs Using DeepSpeed Without OOM Issues
Tags: deepspeed, llm, tuning, oom
Published: 2023-11-04 14:01:23

DeepSpeed is a blazingly fast deep learning training platform that allows users to train models on multiple GPUs with ease. One of the things that sets DeepSpeed apart from other platforms is its ability to fine tune LLMs without OOM (out-of-memory) issues. In this post, we'll show you how to take advantage of DeepSpeed's LLM fine tuning capabilities without running into OOM problems.

The first thing you need to do is install DeepSpeed. You can find instructions for doing so [here](https://deepspeed.readthedocs.io/en/latest/Installation.html). Once DeepSpeed is installed, you need to configure it for your environment. The DeepSpeed documentation includes detailed instructions for doing so.

Once DeepSpeed is installed and configured, you can begin fine tuning your LLMs. The process is fairly straightforward:

1. Load the data you want to use for training into DeepSpeed's DataLoader.

2. Instantiate a DeepSpeedLLMFineTuner instance.

3. Call the DeepSpeedLLMFineTuner.tune() method, passing in the DataLoader and the desired parameters for tuning.

4. Wait for the tuning process to complete.

That's all there is to it! DeepSpeed makes it easy to fine tune your LLMs without having to worry about OOM issues.
The Moth in the Machine: Unraveling the Mythical Origin of ‘Debugging’
Tags: debugging, bug, gracehopper
Published: 2023-11-04 14:21:56

In the dynamic world of computer science, terms and jargon evolve, often carrying stories that root them in the annals of history. One such term, universally recognized by programmers and tech enthusiasts alike, is “debugging.” At its core, debugging is the meticulous process of finding and resolving defects or problems within a computer program. But have you ever stopped to wonder where this peculiar term originated?

The story takes us back to a summer evening in 1947 at Harvard University. Nestled within the walls of the Computation Laboratory was the electromechanical behemoth known as the Mark II computer. As World War II had concluded just a couple of years prior, the Mark II was at the forefront of technological advancement, representing the cutting edge of computing capabilities of its time.

But one day, the Mark II faltered. Its operations were halted, not by a software glitch, not by an operator error, but by a tiny creature of the night — a moth. This unsuspecting insect had made its way into the machine, getting trapped in one of the computer’s relays. As the team scurried to figure out the source of the problem, they stumbled upon the moth, which had become an inadvertent roadblock to their computations.

Grace Hopper, an indomitable force in the world of computer science and a key figure in the development of the COBOL programming language, was among the team working on the Mark II that fateful day. With a hint of amusement and perhaps a dash of irony, she attached the moth to the computer’s logbook. Documenting the incident, she wrote they were “debugging” the system.

It’s essential to note that the term “bug,” used to denote a flaw or imperfection, predates this incident. References to “bugs” in machinery can be traced back even to the 19th century. However, this particular event at Harvard, with its tangible and quite literal “bug,” offered a delightful and graphic representation of the term. It’s no surprise that the story, enhanced by Hopper’s stature in the computing world, became legendary in tech circles.

Today, as software engineers spend countless hours debugging their intricate code, it’s both humorous and humbling to remember that one of the earliest instances of “debugging” involved a real insect and a team of pioneering computer scientists. The next time you find yourself entrenched in debugging, consider the moth, Grace Hopper, and the rich tapestry of stories that underpin the evolution of technology.
¿Cómo liderar de manera positiva ?
Tags: learning, leadership, growth, notes
Published: 2023-11-04 14:18:33

Las habilidades blandas son tan importantes como las técnicas para un buen desempeño profesional. Una de esas grandes habilidades es el liderazgo, que es la capacidad de influir en otros para lograr objetivos.

---

## Liderazgo

Liderar empieza desde uno mismo hacia otras personas, es un camino que inicia desde el interior hacia el exterior y por eso, primero debemos desarrollar habilidades y valores para llegar a ser lideres que influyan de manera positiva. Las siguientes recomendaciones ayudan a tomar de mejor manera ese camino.

## Primera impresión

La apariencia física forma parte de la impresión de los demás. Una buena higiene personal acompañada de vestuario adecuado y un buen lenguaje corporal, ayuda a lograr objetivos como destacar en entrevistas de trabajo ó cerrar una venta.

Estar consciente de las emociones propias, ser tu mismo y escuchar activamente a las personas también hacen parte de causar una excelente impresión con el comportamiento.

## El arte de la conversasión y el trato con los demás

Un buen trato con los demás sin criticar ni invadir, demostrar interés y aprecio real por los demás, y usar la persuasión para convencer genera mayor confianza en los demás. La conversacion se compone de saber escuchar con preguntas que otra persona se interesa en responder y de hacer que otros se sientan importantes hablando de interes en común. Algunas recomendaciones para dominar el arte de la conversación:

Mantenerse presente en la conversación.

No ser dogmático.

Usar preguntas abiertas.

Decir claramente cuando un tema es desconocido.

No contar experiencias negativas similares.

No ser repetitivo.

Evitar demasiados detalles.

Ser breve.

## Empatía, integridad y liderazgo

La empatía es escuchar activamente, comprender y ser asertivo, preguntar sobre qué escucha, qué ve, qué hace, qué dice y qué siente el otro. Hay varios tipos de empatía según la labor de cada persona. Por ejemplo, la empatía cognitiva está ligada a grandes líderes, la empatía emocional a los maestros y la empatía social a personas voluntarias.

## Resolucion de conflictos

Los conflictos tienen solución practicando los siguientes hábitos:

Hábito 1: Evitar los conflictos.

Hábito 2: Impedir que desacuerdos se conviertan en conflictos.

Hábito 3: Reconocer errores propios.

Hábito 4: Escuchar más que hablar.

Hábito 5: Analizar el conflicto.

Al final que es liderazgo positivo?

El liderazgo no sólo es delegar tareas a un equipo de trabajo, se trata de habilidades comunicativas para influir de manera positiva en las personas para lograr objetivos y cumplir con proyectos de manera satisfactoria.

Es una habilidad que no sólo se debe desarrollar a nivel profesional sino personal, porque primero debemos aprender a liderar a nosotros mismos. Significa la consciencia de emociones propias para lograr empatía con otros.

Publicado en: [The Bucket of Notes](https://thebucketofnotes.hashnode.dev/como-liderar-de-manera-positiva)
Custom queries AndroidManifest Pada Expo
Tags: reactnative, expo, mobile, android
Published: 2023-11-04 14:11:45

## Pendahuluan

Kenapa saya ingin membuat custom queries pada android AndroidManifest? saat membuat fitur share ke instagram stories saya mengalami kendala saat user klik share yang terbuka bukan instagram stories tapi aplikasi lain.   

setelah melempar pertanyaan ke forum. ada yang menyarankan menambahkan custom `queries` seperti pada `AndroidManifest.xml`. 

```
  <queries>
      <!-- Specific apps you share to -->
      <package android:name="com.instagram.android" />
      <intent>
        <action android:name="android.intent.action.SEND"/>
      </intent>
    </queries>
```
masalahnya saat build menggunakan server `expo` code di atas tidak ikut dibuild karena file `android` yang ada di local computer tidak ikut di submit ke dalam server `expo`. 

## Solusi

Solusi yang saya temukan adalah dengan menambahakan code expo config plugins agar saat di build di server expo `queries` ikut tergenerate.

```
const { withAndroidManifest } = require('@expo/config-plugins');

const withAndroidQueries = config => {
  return withAndroidManifest(config, config => {
    config.modResults.manifest.queries = [
      {
        package: [
          {
            $: { 'android:name': 'com.instagram.android' },
          },
        ],
        intent: [
          {
            action: [{ $: { 'android:name': 'android.intent.action.SEND' } }],
          },
        ],
      },
    ];

    return config;
  });
};

module.exports = withAndroidQueries;
```

jika ingin mengecek apakah file `queries` tergenerate di dalam `AndroidManifest.xml` coba run :
```
npx expo prebuild
```
lalu cek di dalam file `AndroidManifest.xml` apakah sudah ada code seperti dibawah :

```
  <queries>
      <!-- Specific apps you share to -->
      <package android:name="com.instagram.android" />
      <intent>
        <action android:name="android.intent.action.SEND"/>
      </intent>
    </queries>
```

## Penutup
Jika kamu memiliki saran atau cara yang lain `feel free to comment`
Amazon Security Lake is now generally available
Published: 2023-11-04 13:16:10

Today we are thrilled to announce the general availability of Amazon Security Lake, first announced in a preview release at 2022 re:Invent. Security Lake centralizes security data from Amazon Web Services (AWS) environments, [software as a service](https://stellarcyber.ai/mssps/soc-as-a-service/) (SaaS) providers, on-premises, and cloud sources into a purpose-built data lake that is stored in your AWS account. With Open Cybersecurity Schema Framework (OCSF) support, the service normalizes and combines security data from AWS and a broad range of security data sources. This helps provide your team of analysts and security engineers with broad visibility to investigate and respond to security events, which can facilitate timely responses and helps to improve your security across multicloud and hybrid environments.

[Amazon Security Lake is now generally available](https://aws.amazon.com/blogs/security/amazon-security-lake-is-now-generally-available/)
Newsletter Repost - OpenLampTech issue #103
Tags: webdev, php, mysql, programming
Published: 2023-11-04 13:00:46

WooCommerce rebrands as Woo | Does PHP suck | Drupal Schema UI | Positive MariaDB news. OpenLampTech is a media and content source for PHP, MySQL, and the LAMP stack.

---

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

---
Thank you for reading **OpenLampTech**. If you are not yet subscribed, join the community today with [a free subscription and start receiving all the great content](openlamptech.substack.com).
21. Saturday hard work (Day 19)
Published: 2023-11-04 12:41:14

Hey there, fellow coders! Today was an exciting day for me, as I embarked on a mission to study code, and boy, did I achieve my goal. I dedicated a solid 11 hours to my coding journey. Let's take a look at what I accomplished today!

**1. Live Lecture (4 hours)**

I started my day with a 4-hour live lecture, which served as the final touch-up for a practice website our tutor had been working on in recent classes. It was an informative session that helped me gain a deeper understanding of web development.

**2. Deployment on Netlify**

In the lecture, we tackled the task of deploying a website on Netlify. It was an essential step to see one's work in action on the web. To see one's HTML/CSS successfully up and running was exciting!

**3. Studying SCSS**

I spent some quality time studying SCSS (Sassy CSS), which is a powerful extension of CSS. It was a bit challenging but incredibly rewarding, as I learned how to make my stylesheets more efficient and organized.

**4. Portfolio Website Assignment**

The highlight of my day was starting work on my portfolio website assignment. Here's what I accomplished for this project:

- Created a Sitemap using Draw.io: Planning out the structure of my website is a crucial step in the web development process, and Draw.io helped me visualize it.

- Designed a simple wireframe diagram using Figma: This wireframe acted as a blueprint for the visual layout of my website.

- Developed pages on Visual Studio Code (VS Code): I created various pages, including the Index, About, Contact, Experience, Skills, and Blog pages. Each one is a vital component of my portfolio.

- Maintained a GitHub Repository: I set up a repository on GitHub for my project, complete with a Readme.md file. It's essential to have version control and documentation for a coding project.

However, I did run into a minor hiccup. I accidentally pushed my CSS and CSS.map files, along with my index.html and the pages, to GitHub. This wasn't the best practice, as these files should have been placed in a .gitignore file within my VS Code, which would prevent them from being included in the repository. Unfortunately, once they're pushed, they can't be ignored anymore. Lesson learned!

As I write this blog article, it's currently 11:30 PM, and it's time for me to call it a day and get some rest. Tomorrow, I'm planning to dive back into my coding journey with a target of at least 10 hours of study. Stay tuned for more updates on my coding adventures!