teleren/devto huggingface dataset:
Oracle Tuxedo queues illustrated
Tags: tuxedo, oracle, queues
Published: 2021-11-01 21:48:02

---
title: Oracle Tuxedo queues illustrated
published: true
date: 2020-10-06 00:00:00 UTC
tags: tuxedo,oracle,queues
canonical_url: http://aivarsk.com/2020/10/06/tuxedo-queues/
---

[I did investigate `tpacall()` before](https://dev.to/aivarsk/oracle-tuxedo-internals-blocking-tpacall-347d-temp-slug-117753) and you can find more details there.

But this time I had to prepare internal presentation so I developed a small Tuxedo app for simulation and scripts for visualizing the results.

Just 2 Tuxedo servers, one calling the other, and a client program injecting the events. The application can process 10 events per second, 20 events per second are sent to the application, 100 events in total. If everything goes well application should be able to handle 100 events in 10 seconds.

So here we can see how Tuxedo application behaves when queues are big enough and application can buffer excess messages:

![Unlimited queues](http://aivarsk.com/public/tuxedo-unlimited-queues.gif)

However, it goes south when queues are too small to buffer excess messages:

![Limited queues](http://aivarsk.com/public/tuxedo-limited-queues.gif)

Processing time increases significantly. As I wrote before, it is due to how timeout is implemented using system calls that have no concept of timeout. The algorithm is:

- Try to put the message in the queue in non-blocking mode of `msgsnd()`
- If it fails, try to put message header (file-transfer) in the queue in non-blocking mode of `msgsnd()`
- If it fails, sleep for 1 second (!)
- Try to put message header (file-transfer) in the queue in non-blocking mode of `msgsnd()`
- If it fails, sleep for 1 second (!)
- Try to put message header (file-transfer) in the queue in non-blocking mode of `msgsnd()`
- If it fails, sleep for 1 second (!)
- …
- Continue until either `msgsnd()` succeeds or blocking timeout occurs.

We can verify it by having small queues but disabling the blocking timeout by using `tpacall(..., TPNOTIME)`:

![Limited queues](http://aivarsk.com/public/tuxedo-limited-queues-notime.gif)

If you want your application to run smoothly, increase your queues, and consider using `TPNOTIME` where possible.
Import considered harmful
Tags: typescript, cleancode, solid
Published: 2020-10-05 23:52:15

The `import` (and `require`) statement is incredibly powerful. Being able to separate out code into multiple files and packages has allowed the TypeScript (and JavaScript) ecosystem to flourish. But... It's a two edged sword. Our code tends to over use it (I certainly was and I expect you are as well). This over use is leading to lower code quality and harder to maintain code bases.

I have come to believe that use of the `import` keyword to bring in concrete classes and function should be considered harmful.

Using the `import` statement to access classes and functions from another file couples these files together tightly. Coupling code together is always a risk, code that is coupled together **has** to change together. Decoupling code into components that have one reason to change is a key element ensuring that your code adheres to the Single Responsibility Principle (code should have one reason to change) and the Open Closed Principle (Classes/Functions should be open for extension but closed for modification). Use of `import` to bring code from one file into another file breaks both of these principles.

Seemingly contradictory is that keeping code in a single file and failing to split it out into individual files also violates the Single Responsibility and Open Closed Principles. Which means that the `import` keyword is required and important. What is key is how it should be used. It should be used sparingly and intentionally.

My preference is to use it at a high level near to where the application is initialised or a request is handled. From this point the imported code can be used to instantiate classes, and curry functions. These can than be composed together, passing in functionality that may have otherwise been accessed using this `import` keyword. This composition creates testable, extendable, components. Adjusting the functionality of these components is now a matter of changing what is passed into the component rather than modifying the code of the component.

TypeScript has made composition easier from a developer experience point of view than it was using standard JavaScript. TypeScript has given us the ability to know and enforce the structure of the code that is passed into a function by having that function depend explicitly on an interface or type definition. This makes it easier to open functions for extension by decomposing code into smaller child functions and extracting them into their own files.

Using the `import` keyword to bring in classes, functions and objects will bind your code together in a way that will lead to it being harder to maintain. To ensure that code is more maintainable restrict the use of `import` for classes, objects, and functions to one place. Using `import` to depend on types and interfaces throughout the code is encouraged.
How to make a Calendar with Vanilla JS
Tags: javascript, github, webdev
Published: 2020-10-05 23:36:42

<p>This calendar only covers the months and days in a given year, that means it does not next to the next or previous year. But if you understand this code properly you can continue it.</p>
<p>Get access to full source code on GitHub using the link below</p>
<p><strong><a href="https://github.com/Elijah-trillionz/Vanilla-JS-calendar">How to make a calendar with vanilla JavaScript</a></strong></p>
[PT-BR] 6 métodos de console de javascript
Tags: javascript, typescript, braziliandevs
Published: 2020-10-05 23:13:55

Nessa ultima semana, resolvi escrever meu 1º artigo sobre tecnologia, fui impulsionado pelo amigo JP o "Brabo", que no dia 30/09 escreveu seu 1º artigo sobre tecnologia, com titulo: Primeiros passos com o Nunjucks! muito bom diga-se de passagem, segue o link https://dev.to/jpbrab0/nunjucks-template-engine-1k30...

Escolhi um tema fácil, mas que passa meio que desapercebido no meio dos devs.

Talvez assim como eu, você já conheça algum método de console do javascript, a aposto que é o console.log hahahaha, mas por incrível que pareça, ele não é o único, existem vários outros métodos, pelas minhas contagens tem pelo menos uns 21 kkkkk, sim 21, são eles | assert(), clear(), count(), countReset(), dir(), dirxml(), error(), group(), groupCollapsed(), groupEnd(), info(), log(), profile(), profileEnd(), table(), time(), timeEnd(), timeLog(), timeStamp(), trace(), warn() |, mas nesse artigo eu quero apresentar apenas 6.

Antes de tudo precisamos aprender o que é o "console": O console é basicamente um objeto, e como todo objeto ele tem diversos métodos associados a ele, vamos pra lista dos 6:


1 - console.log, o mais conhecido e usado pelos devs, ele é utilizado para a emissão de informações de registro em geral. Você pode utilizar substituição de string e outros argumentos com este método.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/taucgxmnv8fiff3nw7aw.png)


2 - console.error, como o nome já diz, o método grava uma mensagem de erro no console, simples assim😉.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3w2s3bil2b9adsab7urd.jpg)


3 - console.assert, esse método emite uma mensagem e traça a sequência de operações até o primeiro argumento for falso, se a afirmação é verdadeira, nada acontece.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/eijw15r5d95rptz0angh.jpg)


4 - console.count(), esse método exibe o número de vezes em que a chamada count() em particular foi invocada. Essa função recebe um argumento opcional label.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1kjzsh9zrqzcckwx7yyn.png)


* Esse 2 últimos, iremos aplicá-los juntos.

5 - console.time, esse método inicia um cronômetro na visualização do console e permite cronometrar certas operações em seu código para fins de teste.

6 - console.timeEnd, já esse método interrompe o temporizador que foi anteriormente iniciado por na chamada do console.time().

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xmlml70hp1e0k315ears.png)


Tentei nesse artigo mostrar apenas 6 métodos de uma lista vasta, espero ter ajudado alguém que assim como eu está ainda engatinhando nessa área..
Diz ai o que você achou, o feedback é importante, vou tentar escrever 1 artigo por mês.

Se quiser me encontrar nas redes sociais, segue os links, me mande lá o que vocề achou...
https://twitter.com/PabloGomesDev
https://www.instagram.com/pablo___gomes/?hl=pt-br
https://www.linkedin.com/in/pablo-r-gomes/
https://www.facebook.com/pablo.joserocha.7/

Forte abraço

Referencias: 
https://developer.mozilla.org/pt-BR/
https://www.w3schools.com/default.asp
Sea Anemone
Tags: flatiron, newbie, justthebeginning, justkeepswimming
Published: 2020-10-05 22:56:54

As part of my bootcamp assignments we are writing a blog post about why we decided to study Software Engineering.  So here is a rambling, slightly morose and possibly illogical post with my thoughts on this.

So I had my first child fairly young after years of not really having set a clear path for my future.  So that basically set one for me - I was a single mother.  And honestly, I loved it.  But that also meant finding a job that could support us regardless of how much I enjoyed the work.  

Jump forward to 2 months ago.  Still at the same company.  Still don't really love my job but I am pretty good at it (I should be after almost 20 years!).  But now I have older kids, a husband and maybe a chance to find an actual career - like be a real person!  So I start seriously considering what I enjoy, what I want to do.  I throw out a few things because they just don't seem right.  

When my son brings up coding as an option I think - no way.  In fact, the first question I asked him was "Do you think I'm smart enough for that?" to which he rolled his eyes.  So he helps me get started learning - I write a program to help me catalog my movies.  I love it.  It's like problem solving.  This is perfect! 
 
The name of the post is a song by Jets to Brazil.  So it's a dark and beautiful song and Blake Schwarzenbach writes these lyrics that are so powerful.  Now, I am totally biased.  Jawbreaker was my favorite band and its unlikely I wouldn't like anything Blake writes... regardless, this song in particular speaks to me during this time because this was the most difficult decision I have ever made.  My success in this program is not only about me.  My entire family is putting life on hold to allow me to have this opportunity.  

Also, I had to leave a job I was comfortable in and extremely knowledgeable at to pursue something new and not exactly guaranteed.  So the lyrics, especially the last verse are everything I feel.  This really is the first day of my second life.  And when he says, "You can even keep the name, it never suited me" I feel like he's saying - I'm moving on to a different place, who I was before isn't who I am anymore and not really who I was meant to be.  

So hopefully this is where I am meant to be.
Adjacent Selector in CSS
Tags: codepen
Published: 2020-10-05 22:42:14

<p>The CSS adjacent sibling selector is used to select the adjacent sibling of an element. It is used to select only those elements which immediately follow the first selector.</p>
__NOTE:__ This selector will only work on child elements. 
#simple but powerful

{% codepen https://codepen.io/fahadkhanpakistan/pen/OJXLgdL %}
Schrems 2 – EU-US Privacy Shield Ruled Invalid
Published: 2020-10-05 22:38:35

This post advises Auth0 customers who process EU personal data of the likely immediate effects of the Schrems 2 decision on their use of the Auth0 Platform.
[Read more...](https://auth0.com/blog/schrems-2-eu-us-privacy-shield-ruled-invalid/?utm_source=newsletter&utm_medium=sc&utm_campaign=eu-us-privacy
)
Development Collaboration is Complete Bullshit
Tags: productivity
Published: 2020-10-05 22:11:58


* Developers are not ok with spending hours talking about out what to do next week
* Daily standups are rarely actually useful
* Backlogs are where things go to do die
* Notifications and "responsiveness" are the modern equivalent to a dog leash
* Video meetings with children running around are comically painful
* Three people can agree on a meeting time, if two of them are dead
* We're still dealing with "core hours" when nobody's life is that simple
* Only estimating ahead of time doesn't even work for bathroom remodeling
* Project management tools give managers what they want but not what they need
* Engineers are judged on adherence to process instead of outcomes

**What’s needed is a collaboration style that gives developers a seat at the table, without gluing them to their chair.**
Triggering a deploy in Netlify automatically when updating content in Strapi.
Tags: strapi, netlify, deployments, webhooks
Published: 2020-10-05 22:04:48

I still need to write an article about hosting [my portfolio](https://chriswray.dev). It is hosted for free. That article is coming, I promise!

But, in the meantime, I was so blown away with how easy it is to automatically deploy a static website in Netlify + Strapi that I had to share.

Netlify offers a feature called "[Build hooks](https://docs.netlify.com/configure-builds/build-hooks/)". 

These are unique URLs that you can configure for your application to trigger deployments automatically whenever a post request is made to that endpoint. 

**And with Strapi, build hooks are incredibly easy to integrate.**

First, go to the Netlify Deployment Settings in your project, and find the area for Build hooks. 

There, you will have an option to create a new build hook. Give it a memorable name, and click save.

![Adding a build hook in Netlify](https://dev-to-uploads.s3.amazonaws.com/i/zc00n096vr971ck9s5wr.jpg)

Then, copy the URL that is configured for that build hook.

Once that is done, You will want to add the build hook as a webhook in the Strapi Admin panel.

You can do this by going to "Settings > Webhooks" within Strapi.

Once you are in the Webhooks panel, add a new webhook for the URL that you just configured in Netlify. 

![Strapi webhook panel](https://dev-to-uploads.s3.amazonaws.com/i/mz988tzvuzqk91nbk98t.jpg)
<figcaption>You will want to add the appropriate URL and configure the settings to your liking.</figcaption>

Paste the URL that you copied from Netlify into the URL field, give the webhook a memorable name, and choose the appropriate settings for when you want to publish your changes automatically!

_**Isn't that cool?**_

Once you save your changes, go ahead and try updating some content on your site and see the wonder!
Join Us Live Tomorrow for All about Edge DevTools!
Tags: webdev, webperf, css, javascript
Published: 2020-10-05 22:03:52

As a "full-stack" developer who's more comfortable on the backend, I've always struggled to debug the web when faced with tricky CSS, JavaScript that isn't behaving, and page elements that don't render like they're supposed to.

---

### Want to learn how to investigate and debug web-based issues in the browser along with me? 

📺 Tune in Oct 6th at 9am PDT on [twitch.tv/microsoftdeveloper](https://twitch.tv/microsoftdeveloper)

---

I'll be using the DevTools built into Microsoft Edge browser, a new cross-platform Chromium-based web browser.

Joining me will be Rachel Simone Weil, a Product Manager for Edge DevTools who'll walk me through investigating different scenarios like CSS problems, rendering issues, device emulation, and much more.

Watch the live stream to learn along with me and ask questions in chat from Edge DevTools engineers Brandon Goddard, Brian Cui, Jose Leal Chapa, and Patrick Brosset.

Want to learn more?
- [Read the docs](https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium)
- Follow the [EdgeDev Tools team](https://twitter.com/edgedevtools/) on Twitter
- Read the [team blog](https://blogs.windows.com/msedgedev/)

---

<sub>
Credits:
<a href='https://www.freepik.com/vectors/banner'>Banner vector created by freepik - www.freepik.com</a>
</sub>
Can't push to GitHub "Refusing to allow an OAuth App to create or update workflow without workflow scope"
Tags: git, github, githubactions
Published: 2021-03-30 21:19:40

---
title: Can't push to GitHub "Refusing to allow an OAuth App to create or update workflow without workflow scope"
published: true
date: 2020-10-05 21:42:30 UTC
tags: git,github,GitHubActions
canonical_url: https://jessehouwing.net/cannot-push-to-github-without-workflow-scope/
---

 ![Can't push to GitHub](https://jessehouwing.net/content/images/2020/10/3533744942_e178368d2d_o.jpg)

When you do try to push your changes, you'll be greeted by the following error message:

```
![Remote Rejected] main -> main (refusig to allow an OAuth App to 
create or update workflow `...` without `worflow` scope)
```

![Can't push to GitHub](https://jessehouwing.net/content/images/2020/10/MicrosoftTeams-image.png)

The error is caused by me trying to push a set of commits to my repo that include a new GitHub Action Workflow. My OAuth token has been generated by the Git Credential Manager for Windows.

A dirty workaround is to generate a new token from the GiHub Developer Settings menu and paste that into your Windows Credential Manager:

![Can't push to GitHub](https://jessehouwing.net/content/images/2020/10/image.png)<figcaption>Generate new token</figcaption>

![Can't push to GitHub](https://jessehouwing.net/content/images/2020/10/image-1.png)<figcaption>Update the credential in your Windows settings</figcaption>

This will work for a while, until the Git Credential Manager for Windows refreshes your token it seems, as the scope is revoked after some time.

A better solution is to get rid of the "old" Git Credential Manager for Windows and switch to [Git Credential Manager Core](https://github.com/microsoft/Git-Credential-Manager-Core). The new, cross platform, credential manager for Git, which will actually request the right scopes, doesn't seem to rely on IE11 and supports 2FA properly.

After installing that and deleting the stored credential in the Windows Credential Store, I can now push my Github workflows without issues.

Photo used under Creative Commons: [Jordan Morningstar](https://www.flickr.com/photos/morningstarphoto/3533744942).
How to edit the contents of a git commit
Tags: howto, edit, git, commit
Published: 2020-10-05 21:09:50

When you type `change git commit` or similar keywords in a search engine,
you find many answers explaning how to rewrite a commit *message*,
but not how to actually modify the *contents* of the commit.

This post quickly explains how to do that.

<!--more-->

Lets begin by listing our commits:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8w1slkagd0x0vqo08rux.png)

<small>
In this screenshot I use my `gl` alias which expands to:

```bash
git log --pretty=format:'%C(yellow)%h %Cgreen%ad %Cblue%an%Cgreen%d %Creset%s' --date=short --graph
```

</small>

Here I want to modify the contents of the third commit,
`feat: Refactor and add features`, because I mistakenly
committed modifications to the changelog
which I didn't want.

So I run an interactive git rebase down to this commit
by running:

```bash
git rebase -i HEAD~3
```

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/iu6b2q1hqr4y3kj1oddd.png)

This command launches your git editor (vim here)
to tell git what to do. Here we tell git to stop
right after the commit we want to modify:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/cxthrcgn0225sj2a1ge6.png)

We save and quit this temporary file (with `:wq`),
and git tells us that it stopped at the desired commit:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8hkwao268zi5s4ngq9mv.png)

<small>
Don't pay attention to the commit SHA:
I took the screenshot afterwards so they don't match :smile:
</small>

Now you can start modifying, adding or deleting files!

In my case I wanted to remove wrong sections in `CHANGELOG.md`,
as well as remove conflict-resolution lines in `pyproject.toml`.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hw9596ituefkhlfudlaz.png)

<small>
In this screenshot I use my `gs` alias
which expands to `git status -sb`.
</small> 

All you have to do now is to amend the current commit
(the one at which we stopped, the one we wanted to modify):

```bash
git commit -a --amend --no-edit
# --no-edit because we don't want to edit the message
```

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/m7j7gotblgsw7pwaozai.png)

And finally, let git finish the interactive rebase:

```bash
git rebase --continue
```

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/nuh77mwzazaws4gbpxla.png)

Done!
Day 231: Waiting
Tags: hiphop, code, coding, lifelongdev
Published: 2020-10-05 21:07:17

_liner notes_:
- Saturday : My co-host wasn't able to make it this week, but we had a few people in the chat. We had some really good discussions.Now that I have the solar panels on the roof of my van, I did the radio show from a park. I wanted to see how it would withstand the load of my equipment. It worked really well. The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show episode image of the Florida Agricultural and Mechanical University's seal with the words Oct 3rd 2020 It is what it is](https://dev-to-uploads.s3.amazonaws.com/i/6y6v65mgkn9gt84mosub.jpg)

- Sunday : It's been pretty cloudy that past couple of days so my battery was pretty low. Drove to my folks place to plug in to top off. Did some post radio show promo work, worked on a demo app for work. Other than that, pretty much relaxed and watched "The Walking Dead" shows.

- Professional : Had a meeting with my manager to finalize our Q4 planning. Going to be pretty busy. Also had our all hands meeting. Also, met with some other team members for a project. Then just pretty much worked on adding some features to a Web Component I built.

- Personal : So, there were some wet spots in my vans carpet and I wasn't sure where it was coming from. I moved the water bottles that were there, still got wet. I thought maybe it was coming my fridges drain plug, so I put a towel over it. Then I moved a couple of other containers of water I had that were close to the area. Looks like it was those containers. I'm still going to buy like a basin for something for my fridge so that it can catch any condensation from the bottles. Just glad it looks like everything is fine now.

![The lush mountains of The Coromandel in New Zealand at sunset](https://dev-to-uploads.s3.amazonaws.com/i/bo06qtx6plktuiy2p7xg.png)

Going to see if I can finally add the chat and ask a question sections to my application. Been kind of slacking on it. Not sure what I've been waiting on. Before that though, I want to edit the recording of the radio show and submit it to the station, so I can get that out of the way early. Think that's it.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube BOIDFcVxgdo %}
Why should we use Docker and Kubernetes instead using Heroku, for Django?
Tags: beginners, discuss, docker, kubernetes
Published: 2020-10-05 21:01:01

Currently I'm developing my website using Django and Heroku.
But I want to upgrade by using React for my front end.
I know react would give me great benefits for front end, I understand the benefits.

I've seen recommendation that using Docker and Kubernetes with Django will be good than using Heroku. I still don't understand why.

I'm new to these things.
Can anyone here please refer to me such links or explanations about "Why should we use Docker and Kubernetes with Django?"
I believe that using Heroku too much will cost high with scale that goes up really fast.

I need some kind of enlightment of Docker and Kubernetes uses with Django.

Where are the points that those things connected.

For example React, React is for front end part. so Django can be full on the back end. Data Integration using Restful API.
React replaced Django templates using components.

How about Docker and Kubernetes with Django, compared to Heroku with Django?

Thanks