fabiochiu/medium-articles huggingface dataset:
How Should We Determine the Ordering of Our Microservices?
By: Edward Huang
Tags: Distributed Systems, Software Development, Programming, Microservices, Architecture

How Should We Determine the Ordering of Our Microservices?

Photo by the author.

Microservice architecture can help teams develop applications asynchronously. Teams can deploy their code base, creating a faster iteration and development process overall. However, with flexibility, there also comes complexity in developing distributed systems. Many of our assumptions in a single system don’t work in a distributed system, and we need to reevaluate how we approach our design in distributed systems.

One example of this is time ordering. I recently wondered how you can ensure the services you created are in the right order.

Imagine you created an event-driven architecture with two microservices: a Product service and Order service.

The Product service will be responsible for managing products, and Order services are reliable for managing orders. The Product service can emit a CreateEvent and UpdateEvent , and based on the event, the Order service consumes the messages through a queue and updates its local data store.

How do you ensure that CreateEvent can always be before the UpdateEvent ?

One simple solution is having the subscriber do a check. If product A doesn’t exist, we can push the value again to the queue, assuming that the CreateEvent is out of order.

However, if the subscriber received two UpdateEvents on the same product out of order, that will cause a problem.

We might think that we can create a timestamp on each event, and based on that timestamp, we can determine whether or not to do an update on the time. However, this approach might not be correct either.
I love the “Java is Dying” headlines and articles
By: Huba Albu
Tags: Java, Software Engineering, Software Development, Programming, Microservices

Often people are afraid of features, frameworks or libraries instead of focusing what is important: how to be a developer. Having principles and character, some silly thing, like a programming language is singled out as a fault of missing out on great benefits. If one would ask around developer what does, a simple thing as, unit, functional and integration test mean the answers would vary a lot. IFF we, as developers and other professionals, can’t align what does it mean to be a developer and how to behave and how to write code, it is way too early to say if a language is doomed or not.

Of course, there are arguments and trends, but without having the whole infrastructure, what Java is, it is silly to say that Java is dying. Lets see how Kotlin, Clojure, etc (https://en.wikipedia.org/wiki/Category:JVM_programming_languages) are having a say in this. For me, the future is not Java even though I’ve been writing java code for the majority of the last decade, but the JVM.

I do not wish to write a full-blown article about what the future holds for

Java, but I disagree Java is Dying.
Complete Golang Microservice example
By: Suraj Batuwana
Tags: API, Golang, Microservices, Api Development

I started to learn about golang some time ago and just thought to share some of the things I learned with the community.

Why Go

Go has a native concurrency model that is unlike most popular programming languages. Instead of locking variables to share memory, Golang allows you to communicate the value stored in your variable from one thread to another.

Go belongs comes from C family, but it is much more better than C/C++, I thing Go has barrowed some features from java script but its better than java script as well.

Go code normally compiles in to a single native binary, which basically makes deploying an application written in Go as easy as copying the application file to the destination server. (that is build on windows and deploy on windows)

What are the available frameworks for Go microservices

Like java has Springboot there is no real go to frameworks in Golang to build microservices but it has many.

Database Schema

Following database schema is using the develop microservice. Idea is to have multiple tables and couple of end points to handle complex scenarios. In this example we will use mysql

Start Developing Microservice

In this tutorial I am using labstack, but you can try the same with different frameworks

Step 1

This is the basic step, writing the main func which can start your first micro service. check the github for the complete example.

Step 2

As this is going to be a complete example we need to start working from the back end, how we connect to database. As familiar design pattern we externalize the database credentials in to a property file

Step 3

This step will tell you how to load properties to you go application

Create suitable data structures as below

load the configurations

configFilepath := strings.TrimRight(config, "/") + "/server.config.json"

Step 4

Create database connection and models

Create database connection, Here I have used ORM framework named GORM. Please check other ORM frameworks for golang https://reposhub.com/go/orm

Data Model, so there are 3 main data models

Step 5

This will write all the DAO which write and read from the database for user and task tables. Check my github for other implementations

Step 6

This will write api handlers r controllers for you

Sample create user handler is show below

Step 7

Connect handlers to main func is the last step

I have included a POSTMAN collection https://www.getpostman.com/collections/cc9b1cf91bbef21a2871

So you may get chance to test my API

Please find the complete source code here.
Tears of My Secret Place (Poem)
By: Favour Olumese
Tags: Need Help, Pray, Addiction, Jesus Helps, Sin

It is the darkest

Of nights, tears flow down

My eyes,

And Lord, you know

What they mean;

You know more than I do.

Deep down,

I truly want to change,

But….

Lord, I am tired;

Tired of saying, “I will stop… this year”,

And do worse than the previous.

My spiritual life, O Lord,

Is in a state

I can’t even comment about it.

Beyond this poem,

Lord, I come again

To say, “Lord help me, I am tired.”

“Woe is me!”, cried Prophet Isaiah;

Same is me, O God,

If I am not saved from this path.

Please, heal me, O Lord,

And I shall be healed;

Save me and I shall be saved;

For thou art my hope.

Tears of My Secret Place
I Can Only Imagine
By: Kathy Gerstorff
Tags: Movies, Life Lessons, Music, Addiction, Personal Growth

The Song You Know, The Story You Don’t — Movie Review and Insights

Photo by Mitchell Hartley on Unsplash

I am baffled by the low ratings of the movie I Can Only Imagine by “professional” critics, especially when I see a 91% positive audience rating and glowing reviews on Rotten Tomatoes.

I can’t think of a more relatable movie than this one. One of a troubled childhood with music, writing, and faith to see you through the tough times. I lived that life! I know it is real.

I love movies that make you curious to want to know more. I remember when the song I Can Only Imagine came out and started to get air play on pop and country music radio stations. I didn’t give a second thought about it being a Christian song that was crossing genres. I had no idea how popular it became. I had no idea that the writer of the song and his band went on to have 21 more #1 hits!

I thought Dennis Quaid‘s performance in the movie was amazing and deserved an award. It made me wonder what he is up to, so I did a Google search where I discovered his band The Sharks. I had no idea he is also a musician. I was even more pleasantly surprised when he and his band came to our community Concerts in the Park to perform!
A Toast to Victorious Gregorius
Tags: Addiction, Healing, Poetry

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
How I Kicked My Gambling Addiction
By: Jokūbas Sireikis
Tags: Lifestyle, Mental Health, Addiction, Self, Gambling

Jackpots and how they got me

A million different factors made me particularly susceptible to gambling. But, there was one outlier. As someone who had suffered from binge eating, I was also a victim of instant gratification. There aren’t many things apart from slot machines that can give you a shot of dopamine in seconds.

(Photo by DEAR on Unsplash)

The same high that people get from going to McDonald’s, I got from spinning the reels. Eating healthy on a long-term basis requires delayed gratification. Just like saying no to a donut won’t make you instantly fit, refusing to gamble once won’t make you automatically rich. Frankly, life’s a marathon, not a sprint.

Another problem that almost all gamblers have is the propensity to experience boredom. Unlike most activities, gambling never gets boring. It delivers intermittent reinforcements and the constant possibility of increasing the stakes. While you could try to find other, pocket-friendly avenues that are just as exciting, this may not be the best approach.
A TV Rant
By: Frank Ontario
Tags: Addiction, Television, Rant

Capturing “Reality”

A box simulates reality.

We crave more of it.

Distraction anybody? Over here, over here — distractions for sale. We’ll make you pay for it all. And you’ll want more to fuck yourself up even more: now and later — ad infinitum.

The government leased the airwaves to the Mainstream Media or MSM when there were only 3 broadcast networks: CBS, NBC and ABC with the caveat of providing 30 minutes of network news every evening. Later came PBS.

Broadcast meant it was free to the public.

HOLD ON wait a minute, what about commercials? So here we are watching “free tv” and getting enslaved by commercials, so not free.

Then comes cable. A foolish idea I thought, why pay twice for a free broadcast service? But we did and the phrase rang out from the people “thousands of channels and nothing to watch”.

Before Streaming (TV) the pabulum of “nothing to watch” filled the majority of screens:

· Westerns and Cop shows

· Sit Coms

· Game shows

· Rom Coms

· Dramas so called — Doctors, Lawyers, etc.

· News magazines

· Soap Operas (day) and later night or primetime

· Cartoons

· Adventure shows

· Kid shows

· Movies

· Documentaries

· Science shows

· Sports

And later:

· Reality tv

· Celebrity reality tv

· Stand-up Comedy

And now streaming, and for a little extra money- no commercials. And yet — “thousands of shows and nothing to watch”.

Wow and Binging

Let’s face it we’re fucked. Free broadcast television with commercials — pay for it. Cable charge for it and commercials pay for it. Streaming television on devices and computers a double triple shot: buy a computer or smart phone pay for it, get a ISP or cell phone network pay for it, and fucking commercials on YouTube and in some streaming platforms pay for it, pay extra for commercial free. What’s so fucking free about that?

And who needs more distraction? Well it’s the opiate of the peoples. Welcome to free prison.

______________________________________________________

And a nod to Alan Watts
Nope. The implications of this article are wrong.
By: Kevin Teman
Tags: Addiction, Sugar

Nope. The implications of this article are wrong. It would be more accurate if it was diving into addiction, rather than pointing a finger at sugar.

I personally eat sugar all the time, love my fruit juice. I am in great health and I experience highs from sugar and they work for me. How is that possible? The body is adaptive. I noticed you said you drank several cups of coffee. I think the problem here is addiction, sugar is the vehicle for the underlying issue causing you to seek the highs. It’s pretty simple. Highs take you away from problems. More problems you have, the more likely you are to write articles like this.
Thank you for writing and sharing this!
By: Karmen Jurela
Tags: Sobriety, Recovery, Why, Addiction, Obsessions

Thank you for writing and sharing this!

I am completely with you about the reasons for the addiction: Knowing the reasons will not necessarily end the addictive behavior.

Only ending the addictive behavior ends it.

I am sure, it is helpful to look into the reasons for the addiction regarding your overall healing, after you have found your routines and pleasures without addictive behaviors. Dive into it, dry.

Trying everything at the same time will probably even worsen the results and cement the addiction.
Cocaine / Aprazolam
Tags: Healthcare, Drugs, Google, Health, Addiction

Cocaine is a powerfully addictive stimulant drug. For thousands of years, people in South America have chewed and ingested coca leaves (Erythroxylon coca), the source of cocaine, for their stimulant effects.1,2 The purified chemical, cocaine hydrochloride, was isolated from the plant more than 100 years ago. In the early 1900s, purified cocaine was the main active ingredient in many tonics and elixirs developed to treat a wide variety of illnesses and was even an ingredient in the early formulations of Coca-Cola®. Before the development of synthetic local anesthetic, surgeons used cocaine to block pain.1 However, research has since shown that cocaine is a powerfully addictive substance that can alter brain structure and function if used repeatedly.

we available

aprazolam

alpha apvp

4mmc

ketamine

fentanyl

heroin

Website:https://researchchemicalstore.net/

Email:sales@researchchemicalstore.net

Wickr:docsking

Skype: Research Chemicals
Cocaine / Aprazolam
Tags: Drugs, Europe, Google, Addiction, Bitcoin

cocaine is a powerfully addictive stimulant drug. For thousands of years, people in South America have chewed and ingested coca leaves (Erythroxylon coca), the source of cocaine, for their stimulant effects.1,2 The purified chemical, cocaine hydrochloride, was isolated from the plant more than 100 years ago. In the early 1900s, purified cocaine was the main active ingredient in many tonics and elixirs developed to treat a wide variety of illnesses and was even an ingredient in the early formulations of Coca-Cola®. Before the development of synthetic local anesthetic, surgeons used cocaine to block pain.1 However, research has since shown that cocaine is a powerfully addictive substance that can alter brain structure and function if used repeatedly.

we available

aprazolam

alpha apvp

4mmc

ketamine

fentanyl

heroin

Website:https://researchchemicalstore.net/

Email:sales@researchchemicalstore.net

Wickr:docsking

Skype: Research Chemicals
Cocaine / Aprazolam
Tags: Marketing, Drugs, Google, Addiction, Sales

Cocaine is a powerfully addictive stimulant drug. For thousands of years, people in South America have chewed and ingested coca leaves (Erythroxylon coca), the source of cocaine, for their stimulant effects.1,2 The purified chemical, cocaine hydrochloride, was isolated from the plant more than 100 years ago. In the early 1900s, purified cocaine was the main active ingredient in many tonics and elixirs developed to treat a wide variety of illnesses and was even an ingredient in the early formulations of Coca-Cola®. Before the development of synthetic local anesthetic, surgeons used cocaine to block pain.1 However, research has since shown that cocaine is a powerfully addictive substance that can alter brain structure and function if used repeatedly.

we available

aprazolam

alpha apvp

4mmc

ketamine

fentanyl

heroin

Website:https://researchchemicalstore.net/

Email:sales@researchchemicalstore.net

Wickr:docsking

Skype: Research Chemicals
You had me until the second to last paragraph…refusal to take minor precautions signifying…
By: Samantha Waters
Tags: Recovery, Addiction, Addiction Recovery, Addiction Treatment

You had me until the second to last paragraph…refusal to take minor precautions signifying unwellness??? Quite a jump. So many other “things” relate to the horrible life of addiction and all those involved than assuming a correlation to a mask. I do appreciate your knowledge and perspective of your journey. I am currently trying to make peace with my son’s drastic downslide. It’s a horrible eye- opening daily struggle & affects 20–30 other people at minimum. I believe we all need to work together to help combat it before it wipes out an entire generation. One way is to help dissolve the stigma by not arguing about who’s fault it is or whether it’s a disease only delays solutions. Also, along those lines, no one should decide whos “worthy” of being saved because of their “Initial” choice. Pain is pain. It’s a dark, dark world for the addict and the family.
Broken Spirit Rise
Tags: Awakening, Depression, Lamentation, Christianity, Addiction

All around me voices seem low. I feel trapped inside my thoughts with no safe place to go.

I have a God who loves me but I feel forsaken. I had a pure and beautiful soul that was taken.

I stretch out my thoughts and realize that I can’t exist. In an underworld of dark thoughts while pounding my shaking fist.

I know that I am surviving but its been so long since. I was fully alive when my soul was cleaned and rinsed.

My tattered soul can take any more. I am lost. I am lost.

Help me oh Lord to shake this aching in my soul. I need your help to gain my strength and show me which way to go.

I know you can save me, I know you don’t hate me, I know that you love me, into your grace please shove me. I cast my eyes up above me, I’ve had enough of the suffering.

Today Christ was born, the dividing veil was torn, let me become like my good Lord, pay this cost I cannot afford.

Rise Jesus above my heart, make the places light that were cast in dark, I’d rather be Holy and set apart, Keep me racing back towards the start.

I need you. I need you. I need you. I need you. I need you.
The Struggle is Real. I thought I was beyond this.
By: M.X. Christopher
Tags: Mental Health, Addiction, Self, Gambling, Mental Illness

The Struggle is Real

myself

I thought I had overcome my addiction to gambling. For a few weeks there was little to no desire to gamble. I even told my gamblers anonymous group that I didn’t think I needed them anymore.

They laughed. They called me foolish.

That’s alright. I’ll show you, I thought.

I’m never going to gamble again.

Forget trading. Forget poker. Scratch offs, no way.

I had figured it out. I will work on my hobbies. My passions.

I’ll just write everyday. And play my guitar.

Gambling was so 2020.

I was ready to move on.

Only, the moment I feel depressed, or hopeless, my mind goes to, making a bet.

For me, it’s not about the money. It’s about being in action. It’s about the escape. I don’t need to bet a whole lot, but you can bet if I lose my initial deposit, I will be buying in again.

I would definitely be chasing my losses. That’s something that I’ve proven over time.

In that way, losses can add up quickly. Soon, I have barely enough to pay bills. I’ll usually leave myself with just enough room, to squeak by.

I’ll be broke.

I could’ve spent the money on myself, or on loved ones. Instead I gambled it away.

So, what’s going on right now?

I’m fighting the urge to gamble low stakes online poker. You know, grind up my account in a couple weeks and keep increasing stakes until I’m playing with the big boys again.

Once again, it’s not about the money. It’s about the action, and the escape.

Whenever I win, it’s never enough.

Whenever I win, it’s simply more ammunition for the next bet.

Higher stakes. And still higher stakes. Until, I inevitably lose it all.

Then I’ll start again.

But this time, I aim to not even gamble. I am not going to go through with it. I could. It’s so easy.

Instant deposit. Instant action.

But I won’t.

I will continue writing. I will pick up my guitar again.

Yes, I am depressed. But I have been depressed before, and I have overcome.

And I know, where gambling leads. It leads to even deeper depression, and suicidal thoughts. It leads to risky behavior. It leads to destruction. It leads to death.

I will not step through that door.

I will choose life.

I will seek to enjoy my life. And be content with what I have.

I wrote this article to clear my mind, and get clear about not gambling. If you’ve taken the time to read the is article, thank you, and I hope it helped you.
+91–809945424 husband wife divorce problem solution baba ji usa
By: Mk Ji
Tags: Addiction

in I Do See Color
Merry Sober Christmas
By: Michael Patanella
Tags: Life Lessons, Christmas, Holidays, Addiction, Life

So I have had many sober Christmas times, and I have also had many self destructive active addict Christmas times. I have learned that the holiday season seems to amplify both sides of the spectrum. It can make sobriety seem so much more special than ever. It can also amplify the dark hellish nature of being stuck in active addiction.

Now being 41 years old, I have had many more sober Christmas seasons than active drug using Christmas times. However those handful of dark holiday times totally amplify themselves.

What I mean is, one Christmas and New Years season that consists of active addiction, can overpower and totally erase the beauty, and spirituality of a holiday in recovery. Besides that, the ability to make a come back from a Christmas in addiction can be so close to impossible, that its chances of slim to none.

Loved ones are so hurt when a holiday season is filled with a relative in chaotic addiction, that all the special moments of the meaning of the season, can be so blanketed and smothered.

Although they say that getting clean, and living in Sobriety must be about the addict, or else it will never work, I don’t necessarily agree with that 100%. It is almost 100% of the case, but not totally.

Getting clean for oneself is obviously the best route to take. However I have learned, and as I have evolved in addiction and sobriety it is my strong opinion based on experience, that if we are getting clean for a loved one(s), we are doing it more, than just for them.

Being sober can heal the hearts of loved ones. If I am living a sober lifestyle that is helping a loved one heal as well, than I am absolutely, doing it for myself. Making someone special in our lives learn to trust us again, and believe in us again, is one of the most healing things we can do for not only them, but for us as well.

So getting back to Christmas time, I have the plan that can be one hell of a difference maker in my life and the lives around me. I have destroyed some past holiday seasons. Literally for any human being that crossed my path, including my own. I have disappointed all who loved me, I disappointed myself, and of all people, I also disappointed God.

In order to remain stabilized in my own recovery (and at times sanity) I am heading into this Christmas in the same sober state that I have been in for the year. The gift I want to give everyone is not only my sobriety. I don’t want to pay the ultimate sacrifice by overdosing on the same garbage that is killing seemingly everyone in this country that touches it.

This isn’t a self righteous, “hey look at how great I’m doing” type of memoir. This is simply a positive message to remind the world, and anyone suffering, that a sober Christmas is absolutely the greatest gift you can give to yourself.

When you are that good to yourself, and you respect yourself for the person that God created, you can than experience feelings that really are true happiness.
I’m spending Christmas morning with the Apple helpline guy.
By: Stephanie Gruner Buckley
Tags: iPhone, Christmas, Technology, Addiction, Customer Service

I’m spending Christmas morning with the Apple helpline guy. After writing about my daughter’s iPhone addiction, I got blasted by tech lovers: I shouldn’t belittle my daughter’s Apple love; I should share in her enthusiasm and steer her toward more creative tech pursuits. So when her grandparents were at a loss over what to buy their grandchild for Christmas, I — at a loss myself — suggested an iPad and an Apple Pencil. I asked my husband’s goddaughter (a grad student in video game design) for more advice. She recommended art app Procreate. But tech is never simple, at least not for luddites like me. I set up the device, but couldn’t buy the app. Something went wrong. So here I sit, alone, on hold, as the iPad updates, and the support service person has gone eerily silent. Ho Ho Ho!
I have been struggling with a particular kind of addiction.
By: Marco Iorio
Tags: Spirituality, Growth, Addiction, Masculinity, Mindfulness

I have been struggling with a particular kind of addiction. I seek comfort and inspiration in hearing other people’s struggles that are not commonly discussed. Knowing that people are trying to overcome a difficult struggle gives me motivation to believe in myself, believing in my goals, and believing in the possibility of overcoming my struggle. Feel free to talk about your urges, emotions, and struggles. THIS IS A JUDGEMENT-FREE SPACE !!! Everyone is struggling in some way so let’s help each other
Drug use: Activating Body and Killing The Soul
By: Muhammad Arsalan
Tags: Harmful, Drugs, Addiction

Photo: medicine.net

The night was chilling as it usually is in winters in mid-December. I was on my way back home. Held captive by depressing thoughts, I saw, from the corner of my eye, a body curled up on the roadside. It looked like a heap of garbage; torn and ragged clothes with tatters were hanging loose from it like dead limbs. I pulled the brakes and my car came to a sudden halt. I reversed. As the car inched towards the body I realised that it was pretty alive, contrary to what I had thought. Its eyes were wide open and blinking at the lights, but there was no life in them. They were dark and hollow.

I could do nothing. It was not in my hands to make the condition of that individual better by any means. Besides, he was not the first person I had seen lying numb and half-dead on the pavements: I see them every day, staggering around the megacity like some filthy, unwanted and isolated creatures from another world.

Drugs are not just about activating the body or making it go numb. It is about killing the soul. And that doesn’t happen overnight. You first start taking these substances which, at first, give you desired results and an escapade from realities that are hard to live. But then the thing starts taking its toll on you. You rely heavily on it. You seek it every day. You can’t live without and it eventually becomes a staple in your daily life. The effect drugs have on your life is immeasurable.

People use drugs for various reasons. The main reason for substance use is, of course, escape. People find it hard to cope with their life once it becomes too problematic, and they seek ways they can relax and have a temporary departure from reality. But what they don’t understand is that this temporary departure begins to take more and more of their time, and they rely heavily on it without even thinking how they could walk out of it. Just like other cases, it takes a toll on their health and emotional state and what happens next profoundly affects their lives.

Another reason for drug use is recreational purposes. Drugs are popular with teens and young adults who are curious about knowing how they could feel different from their real life or how these substances can transport them to another world. Drugs are common at schools these days, let alone universities, where children try these harmful substances and get addicted to them. These young individuals have higher risks of developing severe addictions which can turn them into people who will grow up be insensitive and dehumanised.

What that night has taught me is that this curse is far stronger than one could think, and will not be rooted out unless heavy work is done. It involves challenging the societal, political and economic structures. The numb man I saw lying on the pavement, which looked like a heap of garbage to me, showed me the real destruction drugs are causing to us.
‘Another Round’ Teaches Us a Lesson About Midlife Crisis and Alcoholism
By: Akos Peterbencze
Tags: Alcoholism, Movies, Mental Health, Addiction, Culture

Hungary is ranked eighth on the list of countries by alcohol consumption per capita. Not many countries beat us when it comes to drinking. It’s something that is engraved in our nation’s consciousness.

I was insanely young (13) when I first got drunk on New Year’s Eve. Although, if I consider the public morals and the regulations in my country, it wasn’t that surprising. The general opinion is that drugs are wrong, but no one cares if you have a drink. People encourage you everywhere you go. Smoking a joint is evil, but if you drink yourself to death, that’s acceptable by our moral compass. It isn’t illegal, so it’s fine as far as we’re concerned. The legal drinking age is eighteen in Hungary. In Germany, it’s sixteen. How about that?

My dad’s best friend died of alcoholism, and my uncle is a recovering alcoholic. I’ve been told by a mental health professional that I have a tendency to develop any kind of addiction, including alcoholism. It’s in my genes.

The “good thing” about starting drinking at an early age, though, is that it only takes about ten-fifteen years until you face the repercussions. High blood pressure, reflux, IBS, the list goes on. I’m not saying that all of those problems come from alcohol abuse because I don’t know for sure, but I do know that booze makes them worse.

When I was young, irresponsible, and self-destructive, I didn’t treat my body as a temple but more like a weekend house for parties. I thought I was indestructible because regardless of how much I drank, my body recovered quickly. The hangover was a distant relative, and we haven’t seen each other often.

When you’re just a teen, alcohol makes everything more fun. It gives you an invisible cape of coolness. You don’t drink because you’re sad, you drink to enjoy yourself more. That’s not alcoholism, that’s just youth. It only becomes dangerous when you realize you can’t stop because you don’t want to stop. Being loose, entertaining, and easy-going is attractive if you’re at an age when impressions are the only currency you value.

Being middle-aged and blind drunk isn’t so appealing, though. It just makes you seem sad and out of control. And as an adult, there is nothing less charming than being a sad sack of crap who spirals out of control every night because he can’t miss one round in the local pub.
Make 2021 the Year You Choose Recovery
By: Cassi Schmigotzki
Tags: Addictionrecovery, Addiction

If you or someone you love is struggling with addiction of any kind, you will understand just how frightening it can be. You often feel as though you do not have control over what is happening to you. It can also mean that you are incredibly isolated and feel distant from those who love you. However, it is important to remember that you are not your addiction. You are strong, brave, and loved. You can and will recover.

With a new year around the corner, you can begin to think about starting on a clean slate. Here are three things to remember as you start your journey.

You are loved.

As mentioned previously, addiction can be very isolating. This is because addiction often makes you push people away, especially if you don’t want them to see you at your worst. Sometimes, it feels as though people have turned their back on you, too.

However, it is important to remember that there are people out there that love and care for you, no matter what you may have been through. Whenever you are ready to reach out, know that there are ways of rebuilding broken relationships. Start slowly. Reach out to old friends. They’re probably already waiting for the call.

You can do this.

When you try to quit, your addiction will tell you that it is not possible. It will make you feel as though recovery is not on the table for you, that you will always need to turn back to it when things get tough. However, this is not true. Recovery is possible. But it is hard work. You have to be willing to make a real change.

Though you may want to do this alone, you will probably need additional help and support. Reach out to your friends and family, attend therapy and support groups, or consider entering a treatment facility, such as a rehabilitation center.

Right now, ‘rehab’ may seem terrifying. By entering rehab, you are acknowledging that you have a problem — which requires a lot of self-acceptance. It seems very final, and therefore not something you want to get on board with right away. However, entering rehab is an excellent step toward recovery. It means you are putting yourself before your addiction. You will be surrounded by other people on a similar journey who can offer you support and guidance along the way.

You may also not want to attend rehab as you are worried about the associated costs. Thankfully, there are many different ways of paying for addiction treatment. For example, you may be able to cover the cost of your treatment with your insurance or find a way to pay back in small, manageable installments.

Don’t give up.

Recovery is not easy. It will be difficult. There will be times when you feel like giving up. However, it is important that you do not give up — no matter how long and winding the road ahead may seem. It will all be worth it in the end, and there are better, brighter times ahead for you.
so it is currently 2:35 am and im just another teenager stuck on sumthing getting zero sleep tmrw…
By: Juan Gonzalez
Tags: Life, Addiction, Depression, Teenagers

so it is currently 2:35 am and im just another teenager stuck on sumthing getting zero sleep tmrw is christmas and i prolly won’t be sober bc i have joth mommy and daddy issues :(
It all starts with understanding your story
By: Dr. Rachel Kallemwhitman
Tags: Memoir, Mental Health, Addiction, Mental Illness, Bipolar

After 35 years of keeping secrets, psychosis made me speak. Who knew a suicide attempt would save my life?

I think it started with a diagnosis and a palm full of pills. Or maybe it started with the long, cold walk to the bridge thinking of nothing but failing to fly. Or with my little hand wrapped in his cigarette stained fingers. I know it got worse with every frat house fuck, with every pound I sacrificed to my jealous skeleton, with every drug that cradled and rattled my brain, with every red cut I carved into my skin, and with every dumb, dangerous idea that my illness made brilliant. I remember the nights driving with my eyes closed because I was too divine to crash and buying eight George Forman Grills as a sound investment for my future. I remember furiously believing in God and swapping secrets with Mother Teresa, Princess Diana, and Jesus. And that leaves me, a mentally ill Jewish atheist who got lost and found in labels, trauma, addiction, and psychosis.

Over the years I’ve asked myself, what made me crazy? But maybe the question I should have been asking was: do I want to get better?

After 35 years of addiction to my bipolar disorder I’ve finally accepted that while I’ll never know the cause of my illness, I do know the ending.

I’ll be ok.

For more of my story please read my memoir “Instability in Six Colors”
What’s Behind the Rise in Benzodiazepine Abuse and Addiction?
By: Sam Woolfe
Tags: Drugs, Mental Health, Addiction, Anxiety, Mental Illness

Benzodiazepine medications are traditionally prescribed for the treatment of anxiety disorders, such as generalised anxiety disorder (GAD), post-traumatic stress disorder (PTSD), and social anxiety disorder (SAD), but people may also find them useful for the treatment of other mental health conditions, as well as insomnia. While incredibly helpful at times, especially for people with the most severe symptoms, benzodiazepines like diazepam (Valium) and alprazolam (Xanax) can be highly addictive. Many people find the withdrawals from benzodiazepines much harder to deal than those of opioids, including heroin.

Continue reading…
Databases with Python SqlAlchemy
By: Sainadh Cherukumalli
Tags: Postgresql, Python3, Sql, Data, Database

SQLAlchemy

SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.

It provides a full suite of well known enterprise-level persistence patterns, designed for efficient and high-performing database access, adapted into a simple and Pythonic domain language.

SQL databases behave less like object collections the more size and performance start to matter; object collections behave less like tables and rows the more abstraction starts to matter. SQLAlchemy aims to accommodate both of these principles.

In this blog we connect to the relational database, create a table using python.

First we need to install SqlAlchemy below is command to install.

pip install sqlalchemy

Creating a table

For creating a table we need to know for which purpose we creating it and what are the data points necessary to be collected and stored. We take the example of a group of students attending a tech talk. We collect name, registration number and their group.

from sqlalchemy import create_engine, MetaData, Table, Column, Integer, String

engine = create_engine(‘sqlite:////home/varshan/Documents/auto_ml/db.sqlite’, echo = True)

meta = MetaData() students = Table(

‘students’, meta,

Column(‘name’, String(50)),

Column(‘reg_no’, Integer, primary_key = True),

Column(‘group_name’, String(50)),

)

meta.create_all(engine)

Here create_engine is a function, helps us to connect with database.

Format for connecting to any database is

dialect+driver://username:password@host:port/database

dialect is database name and driver is the library used for connecting the database. Username and password for authentication, IP address for connecting and database is the database name. Refer here.

Example you want to connect to a postgresql database with no driver.

postgresql://sai:123456@localhost:8290/student

here 8290 is the port number.

In the above code I am connecting to a sqlite base in my system.

Table function takes all the required information about the table we want to create.

In Column mention the column name and type of data to be entered.

meta will create a table in the database with no data.

In the next blog we enter the data to database and do some queries.

If you face any problem and having any query comment below.
So far I have implemented workarounds or done post-processing with pandas.
By: David Sf
Tags: Programming, Python, Data Science, Sql

So far I have implemented workarounds or done post-processing with pandas. As always, I am just a little surprised this database functions exist.

I don’t know though ig my dwh implements them.

Thank you for the article!
Introduction to SQL Indexes : A Simple guide
Tags: Indexing, System, Database Design, Database, Sql

Indexes are special data structures associated with tables or views that help speed up the query. SQL Server provides two types of indexes: clustered index and non-clustered index.

In this article, you will learn the basics about indexes.

Imagine you have an sql table having 100–1000 rows of data. Querying the data would be very fast as there are less number of rows. What if we have a million rows. Now what? Would it take the same time to query the data? If not what can we do to reduce the retrieval time?

These are some of the questions that are very important when using a database in general. SQL Server provides a dedicated structure to speed up retrieval of rows from a table called an index.

The questions arises, what does an index do which reduces the retrieval time.

To simply put it, it creates a dictionary of the index-key along with their reference. Whenever the user queries the database which matches the index, it looks up the dictionary and finds the reference to the row(s) and then returns them.

There are mainly 2 different types of indexes which you can use.

Non-clustered Index

Clustered index

A clustered index stores data rows in a sorted structure based on its key values. Each table has only one clustered index because data rows can be only sorted in one order. The table that has a clustered index is called a clustered table. A clustered index organizes data using a B-tree which enables searches, inserts, updates, and deletes in logarithmic time. When you create a table with a primary key, SQL Server automatically creates a corresponding clustered index based on columns included in the primary key. Clustered indexes store pointers to blocks not data.

A non-clustered index is similar to the index page of a book. The index page of a book consists of a chapter name and page number, if you want to read any topic or chapter then you can directly go to that page by using index of that book. No need to go through each and every page of a book. Similarly the data is stored in one place, and index is stored in another place. Since, the data and non-clustered index is stored separately, you can have multiple non-clustered index in a table. Non-clustered indexes store both value and a pointer to actual row that holds data.

Note :-

Indexes sound fun and easy, but they can cause a lot of havoc and unexpected behaviours in your system. You need to carefully decide the index to optimize your reads and not have an impact on your writes.

Cheers!!
SQL Fundamentals
By: Jatin Malhotra
Tags: Sql For Data Science, Structured Data, Sql, Oracle Sql

In today’s data-driven world. It becomes essential to be equipped with the skills and tools required to work with data. SQL is one of the essential and fundamentals skills being used in the industry by data scientists, data analysts, data engineering, software engineers, and researchers.

In other world, data resides in a database or a data warehouse, and if it's structured data then SQL becomes inevitable.
A Simple Database Design with MySQL Workbench Part 1.
Tags: Database Design, Workbench, Sql

Entity Relations Diagram

Here we created one using MySQL Workbench “Reverse engineer” tool:

ERD of our database.

We have 4 main tables:

“carer” table contains details of each Adult responsible for a child.

table contains details of each Adult responsible for a child. “child” table contains details for each child.

table contains details for each child. “activity” table contains details for each activity.

table contains details for each activity. “weekday” table containing days names and IDs.

There are a few constrains to take in consideration:

Each child can be associated with more than one responsible person, but a child cannot enroll in the activities without a carer.

Each adult can be carer for one or more children.

A child is assumed to partecipate in activities on a pattern attendance such that she attend every week on the same days.

A child can participate to more than one activity and any activity can be attended by more than one child.

In the ER model we represent entities and the reletionship between them. In the diagram entities are represented by the rectangles and the relationship by the lines connecting them.

There are 3 types of relationtiships:

One-to-one : is rarely used since we could just rapresent this kind of relationship in a single table.

: is rarely used since we could just rapresent this kind of relationship in a single table. One-to-many : is used when entries of one table can be associated with more than one entry of another table (i.e. one child can only be associated with one adult but any adult can be associated with more than one child).

: is used when entries of one table can be associated with more than one entry of another table (i.e. one child can only be associated with one adult but any adult can be associated with more than one child). Many-to-many: is used when each entry of two associated tables can be related to one or more entries of the other. (i.e. each child can attend one or more activity and one activity can accomodate one or more children).

One-to-many relationship.

Here we see how this relationship are represented in the diagram. The single line with two horizontal dashes reperesent a single relation, the one on the bottom resambling a crow foot represent many relations. Altogether this line represent a one-to-many reletionship.

Many-to-many relationships need an extra table to be represented in our design. This is accomplished by creating “link tables”. As the name says this tables work like a “bridge” between two or more tables. We created 3 entities for this purpose:
SSMS İÇİN ÜRETKENLİK ARTIRAN 30 BİLGİ
By: Zeynep Topçu
Tags: Sql Server, Sql, Üretkenlik

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Talend Stitch tools load data to Azure SQL Data Warehouse
Tags: Talend, Ict, Warehouse, Data, Sql

Easing move to cloud

This tooling is an example of growth in extract, load and transform (ELT) approaches that complement or replace traditional extract, transform and load methods of data preparation.

Dylan Baker

“Historically, you would have transformed the data before loading it into the data warehouse,” said Dylan Baker, principal at London-based DBAnalytics and a user of the Stitch software. “You did that because storage and compute in the data warehouse were expensive, and you wanted to do that work before the data got there.”

Reduced cost and new tooling for cloud data warehouses now make it more feasible to dump data into the data warehouse for quicker analytical iterations, and tools like Stitch play a role in handling that data more efficiently, Baker said.

In Baker’s practice, the data sources going into the cloud data warehouses are diverse, including Shopify, HubSpot and Salesforce data. JSON is a commonly used format, but in-house proprietary formats are also used.

Baker has used AWS and its Amazon Redshift system, as well as BigQuery on Google Cloud Platform, for cloud data warehousing. While he hasn’t employed Microsoft Azure or Azure SQL Data Warehouse thus far, he said customers he works with see Azure cloud capabilities becoming more popular and catching up to the Redshift franchise.

Baker said tools like Stitch help make it easier and more economical to set up and manage data warehouse analytics for businesses of various sizes.
SQL TRIGGERS
By: Melek Laçin
Tags: Microsoft Sql Server, Trigger, Sql, Mssql

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
How to Include Headers for SSMS SQL Query Exports
By: Lily Colman-Goff
Tags: Analytics, Technology, Programming, Data Science, Sql

How to Include Headers for SSMS SQL Exports

Photo by Jonas Jacobsson on Unsplash

It’s not often I need to export records from a SQL query. Every time I have done (up until today), I have done the export and then had to manually add in the column headers.

As exporting from SSMS is not a frequent task I am required to undertake, it hasn’t bothered me too much. I was unsure how I could make this change to SSMS settings as I had not taken the time to look into it — SSMS is not something I use particularly regularly as I generally tend to run SQL queries using the Python library SQLAlchemy.

It is close to Christmas and having started to wind down, I finally took the plunge to find out how to add the setting. I recommend you act straight away if you need to update it, otherwise in the new year you’ll still be adding headings manually!

Step 1:

Select Tools > Options

Photo source: Author

Step 2:

Navigate to Query Results > SQL Server > Results to Grid then select ‘Include column headers when copying or saving the results’

Step 3:

Restart SSMS

Gain Access to Expert View — Subscribe to DDI Intel