teleren/devto huggingface dataset:
How To Quickly Generate An Express App Skeleton And Then Edit It
Tags: javascript, express, 100daysofcode, codenewbie
Published: 2019-09-23 02:00:54

---
title: How To Quickly Generate An Express App Skeleton And Then Edit It
published: true
description: Use the Express Application Generator to generate a skeleton then edit index.js to modify output on browser
tags: Javascript, ExpressJS, 100daysofcode, codenewbie
---


- First you must install the express-generator by typing:
**npm install -g express-generator**

- Next run the following command to create an express app with the *ejs* engine:
**express --view=ejs kikucare**
*kikucare* is the name of the app we're creating. 

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/eo91x5c0t6krkz076p49.jpg)

- Go into the newly created app folder by typing:
**cd kikucare/**

- Install all dependencies by typing:
**npm install**

- Next start the app by typing the command:
**DEBUG=kikucare:* npm start**

- You can now view the app on the browser by going to the address **http://localhost:3000/**.

- You'll see the following:
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/9640t51q387njffz5j0u.jpg)

####Let's make a simple change to what's displayed on the browser!

- We'll edit the file **index.js** from the folder **routes**.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/6nag10xijr3uemtd0a42.jpg)

- Modify line number 6 by replacing the *title* from 'Express' to 'Kikucare'
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/imzh5388pp88gqbyczhy.jpg)

- Output:
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/okgk1paf67xxnr1wqbk0.jpg)
Let's abuse the if statement!
Tags: cleancode, badpattern, rant
Published: 2019-09-05 08:40:44

---
title: Let's abuse the if statement!
published: true
description: How to abuse the if statement, recipe #1
tags: clean code, bad pattern, rant
---

Some context (ultimately unnecessary for the gist, but I have to vent):

Today was one of those mornings... I casually take a look at a pull request I commented on yesterday. My comment was countered with a dubious explanation and the pull request merged.

I commented on this code:

```
if (someThing) {
    doStuff();
} else if (someOtherThing && yetAnotherThing) {
    doStuff();
}
```

No, not a typo - both execution blocks have the same line of code.

My comment was simply a code snippet of the proposed improvement:

```
if (
    someThing ||
    (someOtherThing && yetAnotherThing)
) {
    doStuff();
}
```

This is equivalent.

The line-breaks in the expression block are intentional as the 2nd OR member is a bit long. I even added brackets around it although operator priority makes them superfluous.

The author's rebuttal of my proposal was that the `if-else-if` form was more readable so he'll stick to that one.

More readable?

## *Really?*

Here is a transcript of my thought process when reading that code:

> `if (someThing)` ok, memorised that we're in this execution branch now

> `doStuff();` ok, were doing stuff when there's some thing

> `else if` oh crap, this has to be simplified

> `(someOtherThing && yetAnotherThing)` argh, grrr, I'll skip reading through the expression and come back to it later, lets see whats in the block

> `doStuff();` ... wait, lets read that again

> `doStuff();` that looks like ... the previous `if` block? lets look at *that* one *again*

> `doStuff();` is that ... the same method call?

## It's elementary!

Then I stop and ponder things a bit. Now I'm in Sherlock Holmes mode. This is a puzzle. An enigma. The author's code is actually *code*, as in - encrypted information.

I lose time on figuring out that this is actually *a pattern*. The author uses `if-else-if` instead of `if-A-or-B`. Wow, I figured it out! How cool! Its so cute that such a simple syntax can be used so creatively.

Then I remember we're not playing games on who can write more clever code. We are building software for money, in a team. As in - more than one of us. That means code must be written with *readability* in mind.

## Don't sweat the small stuff

You might say that the difference is tiny and this is nitpicking.

I disagree.

Using `if-else-if` so counter-intuitively that it's only understandable by the author (who grew accustomed to it) is extremely counter-productive.

In effect, the author is generating a cumulative cost for the company. Every time someone (other than the author) works with that code they will:

- spend more time to understand it
- have a bigger chance to *misunderstand* it and add bugs to the code

I agree there's some coding patterns/conventions/habits that are really neither here nor there, but this is not one of them.

This one is plainly bad. Avoid at all costs! (There are no costs, just avoid it.)
Semana accesible en Women Who Code Buenos Aires
Tags: a11y, inclusion
Published: 2019-09-23 00:59:16

Durante el mes de agosto tuvimos el orgullo de organizar tres eventos relacionados a la accesibilidad en plataformas web.

  

## Tech talks:

El 29/08 realizamos dos charlas técnicas en las oficinas de [Accenture](https://www.accenture.com/ar-es).  

En ‘Introducción a a11y’, [Leonardo Graterol](https://twitter.com/pankas87) nos contó un poco sobre las bases de la web accesible, los distintos tipos de necesidades según las capacidades de cada persona y como empezar a encarar el desarrollo desde un lugar más empático para que pueda ser utilizado por cualquier persona , sin importar su nivel de habilidades físicas, cognitivas o sensoriales.

  

En ‘Llevá la Accesibilidad a tu empresa’, [Daniela Belvedere](https://twitter.com/StepxAndxGo_)  y [Co Yáñez Calderón](https://twitter.com/co_constanza) nos contaron algunos problemas típicos que se encuentran las empresas a la hora de aplicar la Ley 26.653 de accesibilidad de la información en las páginas web. En un enfoque muy llevado a la realidad mostraron métricas que pueden servirle a la gerencia para empezar a generar compromiso y aplicar la accesibilidad en su producto.

  

___

  

## Workshops

Complementamos la información teórica con dos workshops prácticos orientados a públicos diferentes.

  
El primero fue realizado en las oficinas de [Acámica](https://www.acamica.com/), de la mano de [Susana Pallero](https://twitter.com/PeroSincera), Quality y Accessibility Manager.

Durante el evento, las asistentes tuvieron la oportunidad de aprender de forma práctica a crear estrategias utilizando herramientas manuales y automatizadas para el análisis y testing de Accesibilidad para garantizar la implementación de la normativa WCAG 2.1 nivel AA de acuerdo a los standards publicados por el World Wide Web Consortium.

___


El segundo workshop fue dictado por Leo Graterol, y la temática fue la misma, pero enfocada específicamente a desarrolladoras. Durante el evento se revisaron buenas prácticas de accesibilidad que se pueden tomar a la hora de encarar un proyecto, demostrando las enormes mejoras que se producen en la experiencia de los usuarios con discapacidades al crear sitios accesibles.


Les dejamos a continuación las slides de la charla inicial

{% slideshare uluQ1q8pY6sMeu %}
Trying BSD
Tags: beginners, podcast
Published: 2019-09-23 00:57:08

- I've installed __trueOS__ in my desktop and freeBSD in a hypervisor in my lappy. I've decided to learn it for fun.
- Suggest me some *techtalks* and *podcasts* about BSDs.

* FreeBSD have a great resource [here](https://www.freebsdfoundation.org/freebsd/how-to-guides/).

found this in wikiQuotes:
>> Linux users think Abraham was ordered to sacrifice Linus as a burnt offering, GNU users think Abraham was ordered to sacrifice Stallman as a burnt offering. Linux users believe in the holy trinity of GNU/Linux/NvidiaBlobs, BSD users believe in the one and only UNIX. Linux users are fine with Tux toys and stickers, BSD users believe in no graven images. Linux users are subdivided into those that argue about interpretations of freedom and whether the establishment is corrupt, BSD users are subdivided according to which BSD is the true descendant of UNIX(pbuh). - kestasjk, Slashdot User - Slashdot Article
Connecting to Azure SQL Database
Tags: azure, azuresqldatabase
Published: 2019-09-22 23:56:29

In this [tutorial](https://github.com/patricksameerajayalath/AzureTutorials/blob/master/Connecting%20to%20Azure%20SQL%20Database.pdf) I’m going to show how to:

•	Connect to SQL Server Database through Query Editor on Azure Portal
•	Configure Firewall Rules
•	Run SQL Queries on Query Editor
•	Connect to SQL Database through SQL Server Management Studio
•	Add Virtual Network to SQL Server Firewall Rules
•	Set Azure Active Directory Admin


![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/vyfpr8tar3btg7u83iq9.jpg)

You can find the PDF version of this tutorial [here](https://github.com/patricksameerajayalath/AzureTutorials/blob/master/Connecting%20to%20Azure%20SQL%20Database.pdf).

You can find all my Azure/.Net tutorials [here](https://dev.to/patricksameerajayalath).

Enjoy !!
I think they are a great tools !!!
Tags: detectiteasy, wapplyzer, beginners
Published: 2019-09-22 22:57:41

https://wappalyzer.com/

I think, it is a great tool (plugin_in) to discover the technologies used on websites.

And Detect It Easy http://ntinfo.biz/index.html 
Also useful tool to check programming language for desktop Applications

If you know another please tell me
Iterative Fibonacci in C++
Published: 2019-09-22 22:19:07

The Fibonacci sequence is a series of numbers that are made with the last two numbers. It looks something like this: 
`0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89... and so on to infinity` You can see that starting from the first 1, 1 + 1 will make 2 then 2 + 1 will make 3. This is the pattern we'll use to create our program that will display the sequence. But before we do that, let's ask the user for a number so that we don't end up with an infinite loop! That number will determine how many times we'll iterate through our sequence. The expected outcome for both should look like this:
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/3o7x5sm3l79y9r1766wl.png)

We're going to set the first 2 numbers, 0 and 1 so that we have some starting numbers to add together. Also, create a variable that will hold the fib sequence number.
`int num1 = 0, num2 = 1, nextNum = 0;`
After we ask the user how many numbers they want in the sequence, we will use a for loop that starts at 1 and check if the number they inputed is either 1 or 2 since the first two numbers in the sequence are 0 and 1 which does not have two previous numbers.
`for (int i = 1; i <= num; i++) {
        if (i == 1) {
            cout << num1 << " ";
            continue;
        }
        if (i == 2) {
            cout << num2 << " ";
            continue;
        }
}`
If the number is anything else, we will then use the pattern mentioned earlier. 
`nextNum = num1 + num2;
 num1 = num2;
 num2 = nextNum;
 cout << nextNum << " ";` 
nextNum will hold the sum of the previous two numbers. num1 will now equal the next number in the sequence and num2 will equal the current sum. So let's say the user wanted to see 4 fib sequence numbers. The program will loop 4 times and display num1 which is currently 0 and num2 which is currently 1. When i is greater than 2, nextNum will be the sum of 0 + 1. Now num1 will be 1 and num2 will be 1. For the 4th loop, the previous numbers that will be added for next num will be the sum of 1 + 1. Though we don't use it in this case, num1 will be set to 1 and num2 to 2 so that it will be ready for the next iteration.
And that's all for iterative fibonacci! The codes that were used for the program is down below. 
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ps19hggmlczduuqeg2pm.png)
What Business Does a Dev Have in Business?
Tags: business
Published: 2019-09-22 22:01:44

I've recently taken to thinking about leadership, businesses, and why many of them fail. And having finished the [Phoenix Project](https://www.amazon.com/Phoenix-Project-DevOps-Helping-Business/dp/1942788290/ref=sr_1_1?crid=VKYYEZY70AHO&keywords=pheonix+project+book&qid=1569187680&sprefix=pheonix+project%2Caps%2C169&sr=8-1) novel about applying a more holistic approach to business towards an IT department I began wondering how to go about creating the utopia that the book seems to end with. If you haven't read The Phoenix Project, I highly recommend it, but if you want the TLDR version, here is a long sentence that doesn't give anything away.

> The Phoenix Project is a fictional / how to hybrid novel describing how a company with a deeply flawed culture gap between IT, engineering, and the rest of the company can change how they work and in turn take a failing company to a wildly successful company in a very short time.

Of course, I want to work at a company that sees and treats the engineering department more than just a machine that produces the products that make money. Engineers are a clever bunch, we creatively solve difficult problems for a living. I believe that we could provide so much more value if we were invited to help solve some of the business problems rather than just a room full of MBA's.

Of course, that's crazy talk, right? Why would we want to step outside of engineering and into the political waters of the C-Suite?

For one, we might be able to fix the toxic culture that has developers and designers switching jobs every year or two. We might even be able to help more companies survive and thrive in an ever-changing marketplace. We might even build the right product for the customers and change people's lives.

I've seen far too many companies where danger is approaching, but the direction the company is looking is everywhere but that dark, stormy cloud. What is especially infuriating to me is that oftentimes (every time in my personal experience) the boots on the ground employees see the darkness coming, and even have really good suggestions that go unheard or worse, punished.

This is why I want to learn the full-stack of business so that I can have a holistic view, speak the language of every team, and hopefully, help some amazing companies succeed and do good to their clients and employees at the same time.
How to: Check your Jekyll-based blog for dead links
Tags: tips, jekyll, proofing, ruby
Published: 2019-09-22 23:26:29

---
title: How to: Check your Jekyll-based blog for dead links
published: true
tags: tips,jekyll,proofing,ruby
canonical_url: https://seankilleen.com/2019/09/how-to-check-your-jekyll-based-blog-for-dead-links/
---

I thought someone might find this quick tip useful, so I’m writing it up.

## The Challenge

I have a blog that has a fair amount of posts now, with some of them being as old as 2012.

I worry that there are some dead links about.

## Solution: Using the html-proofer gem and a RakeFile

- Open your blog’s `Gemfile`
- Add `gem 'html-proofer'` to the file
- Create a `RakeFile`

Now you’ll pull down `html-proofer` in your bundle install. So how do we get it to actually do the installation?

Modify your Rakefile to add something along these lines (my current one [can be found here](https://github.com/seankilleen/seankilleen.github.io/blob/master/RakeFile)):

```ruby
require 'html-proofer' # Ensures we have the html-proofer library available to use

def run_htmlproofer() # The function that will run the proofer, so that we can re-use it between our two rake tasks
  options = { 
    assume_extension: true, # Assumes html file extensions
    :typhoeus => { # The options for the curl library that's used.
      :ssl_verifypeer => false # This will stop you from getting errors when certs can't be parsed, which doesn't matter in this case.
    }, 
    allow_hash_href: true, # Won't fail for local links 
    url_ignore: [/edit\/gh-pages/] # This is because all my pages have a link to edit them, which will fail when generated locally.
  }
  HTMLProofer.check_directory("./_site", options).run # Calls html-proofer and uses the Jektll _site folder
end

task :test do
  sh "bundle exec jekyll build"
  run_htmlproofer()
end

task :testwithoutbuild do # For when I just built the site and I'm doing this a bunch of times
  run_htmlproofer()
end

```

## How to Use it

Once you have the `Rakefile` in place, you should be able to head to that directory and run `rake test` or `rake testwithoutbuild` which will parse your links and help you out.

I just ran it and ended up updating 20+ links so it’s definitely a great check!

## That’s it!

Questions? Issues? Let me know in the comments.

Happy coding!
CodeNote
Tags: programmers, developers
Published: 2019-09-22 20:54:08

---
title: CodeNote
published: true
description: Noting app for programmers
tags: programmers,developers 
---
Hello guys, 
I am pleased to announce that i have launched my web app which is called CodeNote.
Generally, it is a note for programmers to help them collect, save and get codes whenever they need to. Also they can view multiple code snippets or scripts on the same page. With CodeNote you can make a yearly, weekly and daily plans.
You can learn how to use it by following this link:

https://t.co/qI4h5AEINz

Visit the website:

https://www.easyinstall.space

Thanks
Can Upper Management work for those with softer touches?
Tags: management, discuss, leadership, career
Published: 2019-09-22 19:28:32

As a manager, I'm very good at investing in my team and even inspiring from time to time. I'm less good at being harsh with the team, though I will be honest and blunt in private when needed. I'm looking at many potential versions of 'future me' and wondering what a future me as a CTO might look like from a personality and leadership perspective.

To those of you who are in senior leadership or work closely with senior technical leadership: 

Have you seen success in senior technical leaders who don't have that dominant 'Type A' personality? If so, what did it look like?
React 16+ Single and Multiple Images Upload Preview
Tags: react, javascript, react16single, reactsinglemultipleimages
Published: 2020-02-01 18:14:17

---
title: React 16+ Single and Multiple Images Upload Preview
published: true
tags: React , JS, React 16+ Single, React Single Multiple Images
canonical_url: https://www.positronx.io/react-single-and-multiple-images-upload-preview/
---

The post [React 16+ Single and Multiple Images Upload Preview](https://www.positronx.io/react-single-and-multiple-images-upload-preview/) appeared first on [positronX.io](https://www.positronx.io).

Today in this React image upload preview tutorial, we are going to learn how to show image preview before uploading to the server in a React app. We will create a basic react app in which we will use an HTML file input field along with some events to show an image preview.

Let’s understand the **URL.createObjectURL()** static method, we are going to use this method to get the image preview URL. This method generates a **DOMString** including a URL describing the object yielded in the parameter.  


[Click here to read more](https://www.positronx.io/react-single-and-multiple-images-upload-preview/)
[HELP]Daily.co API with Django
Tags: help, django, angular
Published: 2019-09-22 19:06:32

So i found this Video/Voice call api. and i want to integrate it in my django project. 

this is the link for the api: https://docs.daily.co/

as i'm still an amateur in django/python i didn't know how to handle this api in django. i searched for some solution in internet and i couldn't find something satisfying. 

don't hesitate if you can help.
Pose Recognition Signup/Login with tensorflow.js #machinelearning
Tags: machinelearning, tensorflow, javascript
Published: 2019-09-22 19:02:26

### This is the next project in sequence to:

1. [Simply Auth:](https:simplyauth.herokuapp.com) Local plug 'n' play authentication API for devs
2. [Simply Auth Social:](https:simplyauthsocial.herokuapp.com) Social plug 'n' play authentication API for devs
3. Sailor Moon Pose Recognition Signup/Login (upcoming..)

### The most basic functionality of the app will be:

1. Register with a sequence of 3 poses
2. Confirm body poses
3. Login with pose password

I decided to go with pose instead of gesture since I am also bootstrapping some VR stuff in Unity3d so thought it would be cool to have people login into VR apps with pose passwords.

### Technologies being used:

1. Frontend: Twitter Bootstrap4 & JavaScript
2. Middleware: Express.js
3. Database: MongoDB
4.Pose estimation & recognition: Tensorflow.js implementation using PoseNet


 [More about pose estimation here](https://medium.com/tensorflow/real-time-human-pose-estimation-in-the-browser-with-tensorflow-js-7dd0bc881cd5)
Approaches and techniques for learning new codebases
Tags: discuss, beginners, productivity, help
Published: 2019-09-22 18:25:34

---
title: Approaches and techniques for learning new codebases
published: true
description: what to do when everything is new
tags: discuss, beginner, productivity, help
---

Hi everyone! as the title say, I wanted to ask you what you do when you are facing a new codebase/legacy code to work to (besides looking at the docs).


![Coding hard](https://thepracticaldev.s3.amazonaws.com/i/j2yj49tx7db2oh381mp4.jpg)

The question arose because I want to get into the world of open source collaboration. I have forked and cloned several projects that have a lot of files, and many times no docs at all. So I get stuck in many small problems that have nothing to do with the project itself.


Thanks all, have a nice day!
BlockHound: detect blocking calls in Reactive code before it’s too late
Tags: blockhound, spring, java, reactiveprogramming
Published: 2019-09-22 20:12:13

---
title: BlockHound: detect blocking calls in Reactive code before it’s too late
published: true
tags: blockhound,spring,java,reactive-programming
canonical_url: https://medium.com/@domenicosibilio/blockhound-detect-blocking-calls-in-reactive-code-before-its-too-late-6472f8ad50c1
---

[![](https://cdn-images-1.medium.com/max/600/1*YyxywO9Dvhrtr5OdzLJ9Cw.png)](https://medium.com/@domenicosibilio/blockhound-detect-blocking-calls-in-reactive-code-before-its-too-late-6472f8ad50c1?source=rss-299466747366------2)

*Find the blockage that clogs your reactive streams pipelines before it hits production!*

Learn about **BlockHound** and how to use it in order to detect sneaky blocking calls in reactive code, before it's too late.

[Continue reading on Medium »](https://medium.com/@domenicosibilio/blockhound-detect-blocking-calls-in-reactive-code-before-its-too-late-6472f8ad50c1?source=rss-299466747366------2)
Games Don't Lie
Tags: csharp, unity3d, indiegames, gamedev
Published: 2019-09-22 17:26:32

Hey Guys, I have made Android version of my game which was released 20 days ago on itch.io for Desktop. I have made a trailer for the android version which will be releasing next week hopefully. Do watch it. And to play the desktop version of the game, go to https://sashbros.itch.io/games-dont-lie

Check the trailer here -
https://youtu.be/JVaOHQhUhsU