teleren/devto huggingface dataset:
Write Singleton in JavaScript
Tags: node, javascript
Published: 2020-01-15 14:22:58

####Def : Ensure a class has only one instance and provide a global point of access to it.

#####Example
```js

var shoppingCart = (function(){
    var items= [];
    function createinstance(){
        return {
            getItems : function(){
                return items;
            },
            addItems : function(item){
                items.push(item);
            }
        }
    }

    return {
        GetInstance : function(){
            return createinstance();
        }

    }
})();
```

###Adding items to Shopping Cart

```js
shoppingCart.GetInstance().addItems("one");

shoppingCart.GetInstance().addItems("two");
```

###Get the items from Shopping Cart

```js
console.log(shoppingCart.GetInstance().getItems());
```
What Open Source libraries would you like to have?
Tags: discuss, opensource, php, javascript
Published: 2020-01-15 14:11:15

---
title: "What Open Source libraries would you like to have?"
published: true
description: "Help us prioritize releasing our code as open source by indicating what you could use"
tags: discuss, opensource, php, javascript
---

At Moxio we already have some of our code as open source on GitHub, but we've identified over 25 other parts of our codebase (mainly PHP and Javascript) that we would like to make freely available as open source. That's a lot, and it would take quite some time to release them all.

We can really use your help to set priorities. Just open [this form](https://docs.google.com/forms/d/e/1FAIpQLSf3Z6eLoUSoTw1YqomAGuBiOnwLkeftiqgOfUT90u3UDKiOnA/viewform) and check all components that you could use and would like to see as open source (takes less than 2 minutes). Feel free to spread the link among your fellow developers; the more voices we hear the more useful code we can release.
Serverless Cron Jobs & Scheduled Events with AWS Lambda
Tags: aws, serverless, webdev, devops
Published: 2020-01-15 13:47:38

---
title: Serverless Cron Jobs & Scheduled Events with AWS Lambda
published: true
description: How to create cron jobs and scheduled events with AWS Lambda
tags: aws, serverless, webdev, devops
---

Have you ever wondered how you would schedule something like a cron job or scheduled event when working with a serverless application?

This is one of the most asked questions I get when teaching serverless application development. In this video, you'll learn how to quickly add a scheduled event or cron job to an existing Lambda function, and if you've not deployed a function yet, you'll also learn how to do so using AWS Amplify.
Infinite trial ? a.k.a. WinRar style trail.
Tags: fun, jokes
Published: 2020-01-15 13:13:08

After mentioning https://plugins.jetbrains.com/plugin/13607-merge-request-integration-ce--code-review-for-gitlab
to a college he noticed the nice "trial" text.

Even the rest of the text is a bit funny ;P 

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/uwtbnahjyuj5ycpayvlu.png)
My 2020 plan
Tags: mentalhealth
Published: 2020-01-15 13:06:18

# The 2020 plan

At the beginning of 2019 I set about creating a list of all the things I wanted to learn. It was huge! I was kidding my self if I thoughtI was ever going to be able to do all the things I had written down. 

Obviously life happened, events occurred that I could not have planned for and my long list remained largely unfinished. I think I probably "completed" about 3 of the 10 tasks I had set myself. That is not to say that I failed in 2019. Far from it. But where I directed my time had to shift. I interviewed for and got a new job, something I was not planning on and something that consumed an awful lot of my time. But it was worth the input and sacrificing some of the tasks I had set at the beginning of the year.

## Whats in store for 2020

2020 is already shaping up to be a good year. I am 5 weeks into my new role, which I love. We have already recorded the first episode of Salted Bytes and I have a new plan in place. 

This year, I am gonna be more realistic. I am gonna concentrate on few things in the hope that I will be able to finish. But if I don't, then that is also OK.

### Salted Bytes

We are planning on stepping things up a gear in 2020. The plan is to record 2 episodes a month and to try and get more guests (if you fancy coming on the show please get in touch). I am also planning on trying to write 2 articles a month. These will be as varied as ever but will still center around the software industry.

### Health

In the last year I have been using the mornings before work to swat up on my current interests. But this year  I am going to use this time to exercise a little self care. It is all to easy to neglect your physical and mental health and this takes its tole. 

So this year I will be exercising, doing yoga and practising a little mindfulness in the hope that an increase in mental and physical health will help me become a better engineer.

### Programming

Software is a tough one. I just want to learn everything! It's all so interesting but I will be taking some learnings from last year, I think it is far too difficult to plan a years worth of learning and exploration. Stuff changes so fast and my interests and where I need to concentrate time does too. So I am going to approach it in a different way. I will only be looking 3 months ahead in the hope that this is more maintainable. I still a rough idea of what I want to learn but I a realistic in the knowledge that this will change.

Here are a few things that I will be concentrating on:

* Getting better at the stuff I already know.
* Application security.
* Making stuff - Hardware and software.


Thats it! A start contrast from last years plan but one that I feel is more achievable and one that is less likely to make me feel like I have failed. What do you have have in store for 2020. 


# Thanks for reading 🙏

If there is anything I have missed, or if there is a better way to do something then please let me know.
Check out our software focused podcast - [Salted Bytes](https://open.spotify.com/show/7IdlgpiDfYcOdCn57mPLvH?si=X1ArfHvqQXSOAfc1h7Y_Eg)
Daily Developer Jokes - Wednesday, Jan 15, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-01-15 13:00:11

---
title: "Daily Developer Jokes - Wednesday, Jan 15, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Wednesday%2C%20Jan%2015%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258bb6df5f.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ What did the spider do on the computer?

___A:___ Made a website!
 -->
The only two values a and b in JavaScript that is a === b, but operation using them give different results
Tags: javascript
Published: 2020-01-15 12:39:26

This is the quiz for today...

a === b gives true
yet if you use them for the same operation, they give different results.

What are they?

The answer is...

Scroll down to see it...

Or do you want more times to think about it.

It is not a trick question.

...

...

...

And the answer is

    const a = 0, b = -0;
 
    console.log(a === b);   // gives true

but  `1 / a` and `1 / b` give different results. 

The first one is `Infinity`. The second one is `-Infinity`.

The results are not just different, but *very* different.
Web Developer Checklist
Tags: webdev, productivity, git
Published: 2020-01-15 12:26:55

*Note: This post considers that you have some background knowledge about web development ecosystem, also some common terminologies used in the web community*

1. First, set up a strong git process. Two fixed branches master(prod) and develop and other closable features and release branches. You can refer for a more detailed explanation in this [link](https://nvie.com/posts/a-successful-git-branching-model/).

2. Nicely broken down tasks according to the business requirement and priority and use a platform like JIRA/Trello/Asana to manage it.

3. Building and maintaining proper design templates using tools like InVision/Zeplin/Figma for UI standards.

4. One-step build, test and deploy probably using Jenkins. Refer Point 2 in [Joel Test](https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-steps-to-better-code/)

5. Tests should include unit tests, integration tests, and end-to-end tests. Possibly automate testing cross-browser. Make sure your build fails if any important tests fail. Also, do take care of implementation details while testing your code refer to this [link](https://kentcdodds.com/blog/testing-implementation-details) for more.

6. The codebase should be properly formated which can be done through Linters using recommended linting rules like Airbnb or Prettier.

7. Setting up web servers, if its an SPA, set it up using s3. If not then set it up behind a load balancer. 

8. Setup error reports using tools like Sentry to capture errors happening at the user's end. Setup notifiers on email/slack to notify if something went wrong.

9. Use tracking tools to track user activity. Later can be used to study user behavior and maybe change UX accordingly. Examples: Google Analytics, Clevertap, etc.

10. Automate using the Lighthouse tool to get scores on app performance and study the impact of new features on those scores each time a production deploy happens. [More info](https://developers.google.com/web/tools/lighthouse/)

11. Start with code splitting from the word go to avoid any hassle later. [More info](https://developers.google.com/web/fundamentals/performance/optimizing-javascript/code-splitting/)

12. To avoid Dev, Staging and Prod environment mismatch and all the problems that come with it, use Docker and club it with better tools like AWS ECS to manage docker clusters. [More Info](https://medium.com/boltops/gentle-introduction-to-how-aws-ecs-works-with-example-tutorial-cea3d27ce63d)

## Conclusion

I may have missed something that you may have learned through experience and I would like you to put it down in the comments down below. Do leave compliments too if you liked it. :)
Gitflow vs Github flow?
Tags: git, gitflow, githubflow
Published: 2020-01-15 12:18:56

---
title: Gitflow vs Github flow?
published: true
tags: git,gitflow,githubflow
---
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/rd24bz1je720ayen8y8j.jpg)

Which one would you choose and why?

For me, choosing one or the other depending on the team development style rather than enforcing part of your organization process. Do you agree with:-) or what is your criteria choosing one over the other :-)
how do i find the nextgoog the nextweb etc
Tags: futurology, nextgoog, nextweb
Published: 2020-01-15 12:14:43

im probably late to the game but ive just discovered producthunt where you can find the nextgoog the nextweb etc

today i discovered these for the first time

https://www.producthunt.com/posts/gitlab-pages
https://www.producthunt.com/posts/truepush-free-push-notifications

and if you signin YOU can upvote your favorite nextgoog nextweb item
Laravel 6 : Building a REST API with Lumen
Tags: laravel, lumen, restapi
Published: 2020-01-15 11:49:08

Introducing Lumen from Laravel
Lumen is a new project from Laravel creator Taylor Otwell. It's a "micro-framework", meaning it's a smaller, faster, leaner version of a full web application framework. PHP has two other popular micro-frameworks, Slim and Silex.

Lumen has the same foundation as Laravel, and many of the same components. But Lumen is built for microservices, not so much for user-facing applications although it can be used for anything. 

Though this tutorial is about Lumen, a simple understanding of how Laravel works is all you need to follow along. You can check the git repository from here Rest api with lumen

https://www.codechief.org/article/laravel-6-building-a-rest-api-with-lumen
Boost Note v0.1.4
Tags: programming, showdev, boostnote
Published: 2020-01-15 06:16:53

---
title: Boost Note v0.1.4
published: true
description: 
tags: programming, showdev, boostnote
---

![cover](https://miro.medium.com/max/2938/1*OUHi8FqZtZ212941kmhZ8w.png)

Boost Note is an intuitive and stylish markdown editor for the developers. v0.1.4 has been released 🎉

- Website: https://boostnote.io/
- GitHub repository: https://github.com/BoostIO/BoostNote.next

---

- Improve Side Naviagtor UX [#257](https://github.com/BoostIO/BoostNote.next/issues/257)
  - Discard global All Notes
  - Add All Notes for each storage
  - Storage and Tag Nav Item is folded when they are clicked
  - Show New Note button on All Notes page
- Fix delete shortcut key [#274](https://github.com/BoostIO/BoostNote.next/issues/274)
- Add “Restore” context menu for trashed note item [#290](https://github.com/BoostIO/BoostNote.next/issues/290)
- Switch edit mode right after creating a new note [#285](https://github.com/BoostIO/BoostNote.next/issues/285)
- Fix preview image [#282](https://github.com/BoostIO/BoostNote.next/issues/282)
- Fix “check for updates” menu for Linux app [#293](https://github.com/BoostIO/BoostNote.next/issues/293)
- Show app version on About tab in Preferences [#292](https://github.com/BoostIO/BoostNote.next/issues/292)
- Fix NoteDetail button layout for Firefox users [#291](https://github.com/BoostIO/BoostNote.next/issues/291)
- Stop adding duplicated tags [#286](https://github.com/BoostIO/BoostNote.next/issues/286)
- Fix no storage label [#275](https://github.com/BoostIO/BoostNote.next/issues/275)
- Show message box when deleting
- Fix default window size [#256](https://github.com/BoostIO/BoostNote.next/issues/256)
- Add Brazilian Portuguese translation [#228](https://github.com/BoostIO/BoostNote.next/issues/228)
- Add Korean translation [#228](https://github.com/BoostIO/BoostNote.next/issues/228)
- Add Mandarin Chinese translation [#259](https://github.com/BoostIO/BoostNote.next/issues/259)
- Fix Japanese translation [#261](https://github.com/BoostIO/BoostNote.next/issues/261)
#CodepenChallenge Full Page Nav
Tags: codepen, css, html, design
Published: 2020-01-15 11:26:14

<p>A concept design of full page navigation, full of typography, and using icons as large images. I haven't used neither Javascript codes, nor a CSS preprocessors here.</p>

{% codepen https://codepen.io/takaneichinose/pen/GRgGzBW %}
How to start a podcast?
Tags: podcast, gettingstarted, howto
Published: 2020-01-15 11:23:24



As i started a podcast last week with a friend, i want to share my learnings and how we roll our podcast.

## Create a concept
In the first place we thought a short bullet list with our contents would be enough, luckily for our first episode we created a detailed bulletlist with the topics we wanted to talk about. It helped us a lot to focus on the topics and gave the whole podcast some structure. So we would advice to do so yourself :)

## Choose a podcast hosting platform
To get your podcast to your listeners you need to host your podcast somewhere. You can do so yourself, but we think it doesn't make sense if someone can do it for us. We use Anchor as our podcast hosting platform. It's free and super easy to use. So far we're happy with them and everything works as expected.

## Recording Setup
We record remote. This might seem harder than recording in one location, but it's totally fine. We use a ZOOM meeting to connect us. We've choosen ZOOM because you can record seperate audio tracks for each speaker. That makes it easier in the post production if for example one speaker talks louder than the other one. We do not use this feature right now, but we might take on guests and then in makes the whole process easier. So we thought it's better to get the process right in the first place. Right now we record locally with Quicktime on Mac OS (not sure on Windows) and use the ZOOM recording as a backup solution.

## Gear
My friend uses an Auna Mic 900B and i use a Shure MV88+. Even though the microphone from your phone would be good enough we opted in for a microphone you can plug into your computer. The Auna microphone starts at 50€ on Amazon sometimes and the Shure is definitely a little more expensive. What we found out is that the Auna lacks support for audio monitoring out of the box. This makes it harder to "hear" problems right away. Ontop of that you need headphones, otherwise soundquality will be bad. Any pair of spare headphones you have should be good enough. Make sure your microphone gain is correct, being too loud or too quiet will become a problem in the postproduction. So some testing might be necessary.

## Postproduction / Cutting Tool
We use Garageband, if you're a Windows user you might take a look at Audacity. Both options are free. Here we put together both audio recordings and cut it a little bit. Than we check that the audio tracks are in sync. That's it, nothing special to mention here. Last step is to export the file and upload it to your podcast hosting platform.


That's how we do it. We took a lot of time evaluating different tools and reading about how to start a podcast. It all boils down to: think about it and get started. Of course better gear produces better sound quality, but remember content > sound. The first episodes might be a bit rough, so as everything in life it needs some practice. 

Have a great day! Thanks for reading :) And if you have question about starting a podcast just contact me, i'm happy to help!
devto images
Published: 2020-01-15 11:22:03

the devto posting docs say you can add images using pling square brackets 
```
![Alt text of image](put-link-to-image-here)
```
which is fine if you have a (free) [cloudinary](https://cloudinary.com/invites/lpov9zyyucivvxsnalc5/ewvwdmx8c1msv9xxpk5e) account 
```
![Alt text of image](https://res.cloudinary.com/osde8info/image/upload/v1579086721/winbug_ni34sw.png
)
```
but where do the images uploaded by the PIC icon appear ? or do i need to file a devto bug ?
Harvard's Computer Science Intro (CS50): Here's How to Earn a Free Certificate
Tags: news, computerscience, beginners, codenewbie
Published: 2020-01-15 10:34:43

With over 1.5M enrollments on edX, [CS50, Harvard’s Introduction to Computer Science](https://www.classcentral.com/course/edx-cs50-s-introduction-to-computer-science-442), is one of the world’s most popular MOOCs and an [all-time, top-100 online course on Class Central](https://www.classcentral.com/collection/top-free-online-courses).


Having taken the course myself a few years ago, I can’t say I’m surprised: the course is excellent. It has dedicated instructors, excellent production values, and its content is refreshed annually. Most notably, the course will continue to offer a free certificate of completion in 2020.

# New Curriculum

Taught by [David J. Malan](https://en.wikipedia.org/wiki/David_J._Malan) and filmed in Harvard’s Sanders Theater, CS50’s 2020 video lessons bring new content and more demos. Problem sets have been updated to include:

* [Analyzing a movie database](https://cs50.harvard.edu/x/2020/psets/7/movies/) (IMBb) using SQL.
* [Applying “Instagram-like” filters](https://cs50.harvard.edu/x/2020/psets/4/filter/more/) to bitmap images.
* [Simulating electoral systems](https://cs50.harvard.edu/x/2020/psets/3/tideman/) — likely a nod to the upcoming US elections.

In addition, CS50 now offers specialization tracks, allowing students to dedicate the last few weeks of course to one of three subjects:

* [Web Development](https://cs50.harvard.edu/x/2020/tracks/web/)
* [Game Development](https://cs50.harvard.edu/x/2020/tracks/games/)
* Mobile Development — either [Android](https://cs50.harvard.edu/x/2020/tracks/mobile/android/) or [iOS](https://cs50.harvard.edu/x/2020/tracks/mobile/ios/)

These tracks borrow from some of [CS50’s follow-up courses](https://www.classcentral.com/report/harvard-cs50-new-courses/) introduced in 2018.

Like in previous years, CS50 culminates in an open-ended [software project ](https://cs50.harvard.edu/x/2020/project/) that asks students to put into practice what they learned in the course.

# Free Certificate

Since its launch, CS50 has maintained a firm stance toward openness. In 2020, the course will remain entirely free, including its [certificate of completion](https://cs50.harvard.edu/x/2020/certificate/). This is how the free certificate looks:

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/2pbngn2wmic0mzimksjc.png)
*CS50 Free Course Certificate*

Note, however, that the free certificate does not include identity verification. Students may instead choose to pay $90 for a [verified certificate](https://www.edx.org/verified-certificate) on edX. Or they may pay $1840 to $2840 to take the course through [Harvard Extension School](https://www.extension.harvard.edu/course-catalog/courses/intensive-introduction-to-computer-science/24107), in which case they’ll have access to a formal transcript and earn academic credit upon completion of the course.
Segurança na internet: quase sempre a culpa é sua!
Tags: security, web, password, key
Published: 2020-01-15 10:10:09

Basta fazermos uma simples pesquisa no Google sobre segurança para descobrirmos que 2019 foi um ano repleto de “invasões por hackers"

## **Mas será que a culpa é dos hackers mesmo?**

Pois bem, eu acredito que a maioria dos casos tem mais a ver com o descuido dos usuários do quê com os serviços propriamente dito.

Mais de duas décadas de internet e as pessoas ainda insistem em utilizar senhas como: 123456; password; admin; 654321; senha123.

Minha sugestão para 2020 é que além da indispensável **autenticação em dois fatores**, você utilize **senhas diferentes** para cada serviço da internet.

> Calma, eu sei que isso parece muito difícil e chato de fazer, mas hoje vou te ensinar uma técnica simples que venho utilizando a vários anos e que por “mérito dela” jamais tive um serviço da internet invadido.

A técnica consiste na criação de uma senha mestre e com base nela as demais.

O mais bacana é que você pode ter 30 senhas diferentes e mesmo assim só precisar decorar uma delas, [**a senha mestre**].

***

## **Vamos lá!**

1. CRIE UMA SENHA MESTRE”
Ex.: universo | fiona | california
==> `universo`

2. UTILIZE O NOME DO SERVIÇO PARA CRIAR UM INCREMENTO
Ex.: Instagram
==> `gram`
*Aqui você pode fazer como preferir, desde quê, utilize o mesmo padrão para todos os serviços. (Neste caso eu utilizei os 4 últimos caracteres presentes no nome do serviço)*

3. SOME O INCREMENTO A SENHA MESTRE (Esse é o segredo)
==> `universo + gram`
*Você pode incrementar tanto antes quanto depois da senha mestre.*

4. ACRESCENTE UM OU MAIS CARÁCTERES DE SUA PREFERÊNCIA
Ex.: #!*%$@
==> `universo + gram + #!`
*Também precisa ser padrão para todas as suas senhas.*

5. E ENTÃO TEMOS NOSSA SENHA SUPER SEGURA
==> `universogram#!`

Repita o processo para todos os serviços mantendo sempre a senha mestre e o(s) caracteres especiais.
==> `universobook#!`
==> `universomail#!`
==> `universoitter#!`

***

### **Simples, não é mesmo!**

> *Mas claro, essa técnica por si só não garante que seus serviços da internet não sejam invadidos, é preciso bem mais que isso, inclusive, como já mencionado acima, é indispensável que você ative a verificação em duas etapas em todos os serviços que ofereçam essa possibilidade, sendo assim, você adiciona mais uma camada de segurança aos seus twitts, e-mails, mensagens de whatsapp, etc.*

Se tiver alguma dúvida quanto a implementação da verificação em duas etapas em seus serviços da internet, me procure que te auxilio.😉

Obrigado por ler este artigo!

[Saiba mais sobre autenticação em dois fatores](https://www.kaspersky.com.br/blog/o-que-e-a-autenticacao-de-dois-fatores-e-como-usa-la/3226/)