teleren/devto huggingface dataset:
Dealing with deadlines - Things Developers Hate
Tags: career, productivity, programming
Published: 2020-10-13 20:21:11

---
title: Dealing with deadlines - Things Developers Hate
published: true
date: 2020-10-13 20:16:49 UTC
tags: career,productivity,programming
canonical_url: https://www.notonlycode.org/dealing-with-deadlines/
cover_image: https://www.notonlycode.org/content/images/2020/10/deadlines-thumbnail.jpg
---

Deadlines themselves are not a bad thing - they allow company to have some predictability, they let us understood how much ahead or behind we're with our work, they can be very useful. However, besides real deadlines we also have something I call bullshit deadlines - made up by stakeholders to generate pressure and feeling of urgency, they can help the company in the short term, but more often than not they have very bad long-term effects.

{% youtube 6d3g-OItF2k %}

Video timeline:  
[0:00](https://www.youtube.com/watch?v=6d3g-OItF2k&t=0s) Intro  
[0:23](https://www.youtube.com/watch?v=6d3g-OItF2k&t=23s) Types of deadlines  
[3:25](https://www.youtube.com/watch?v=6d3g-OItF2k&t=205s) Flexible delivery  
[4:49](https://www.youtube.com/watch?v=6d3g-OItF2k&t=289s) Dealing with real deadlines  
[6:25](https://www.youtube.com/watch?v=6d3g-OItF2k&t=385s) Dealing with bullshit deadlines  
[7:58](https://www.youtube.com/watch?v=6d3g-OItF2k&t=478s) Abused deadlines  
[10:11](https://www.youtube.com/watch?v=6d3g-OItF2k&t=611s) Outro
A Perfect Algorithm!
Tags: algorithms, javascript, java, dotnet
Published: 2020-10-13 20:12:01

Post #02

algorithm is not just an approach to solve a problem but to solve them "efficiently". Efficiency here means, your code must be acceptable for minimum outcome of time and space factor 

We write some codes to solve some logical problem and start calling it an "Algorithm" that's incomplete 😀 

Ask yourself: 

would you call something an algorithm which obviously let's you achieve some feature but eats all system resources ? 



Well! I got some tips ⤵️


1️⃣ paper pen all steps you can think which leads the final output 


2️⃣ always follow networking OSPF method(open shortest path first)


3️⃣ examine all steps you created and start re-examining all of them keeping "performance" in mind 


4️⃣ calculate how much time and space those steps require to perform one transaction successfully 


5️⃣ filter out best case, average case and worst case based on step 4 and go with "best case" always 

And happy coding then 😀 

You dont need special programming. you can use any programming language which you feel comfortable with 

Thanks for reading 😊
Exporting a markdown book to PDF with Pandoc (2)
Tags: pandoc, latex, markdown
Published: 2020-10-13 20:08:54

---
title: Exporting a markdown book to PDF with Pandoc (2)
published: true
description: 
tags: pandoc, latex, markdown
//cover_image: https://direct_url_to_image.jpg
---

This is a revisit of my old [post](https://dev.to/kodaman2/exporting-a-markdown-book-to-pdf-with-pandoc-5414). I wanted to update it, since I updated my python script to generate a pdf.

- Fixed printing md files out of order
- Two options for folder structure
   - Chapters with folders, with scenes as md files
   - Chapters as md

LaTex, and pandoc are great but for your typical writer that isn't a software dev or has 3 Master degrees learning how to compile a bunch of markdown files isn't super straightfoward, latex, xelatex, templates, packages, and the list goes on. Can you imagine if after writing a thesis on Word Doc, you had to learn how to write a yaml file in order to print you document.

https://github.com/kodaman2/markdown-book

Anyways I won't beat the horse the tools above are great, but do require some learning overhead, and this is troublesome if you just want to write and print. The markdown-book repo shows you how to have chapter directories, or just markdown files. It has a python script ready for a basic pdf to get you started. Surely there's more work to do like have some css files to make everything prettier.

Using directories for chapters:
```
├───title.txt
├───Chapter1
├───Chapter2
└───images
```

> New addition to the `export_book.py` script, now it supports md files without chapter directories:

```
├───title.txt
├───Chapter1.md
├───Chapter2.md
└───images
```

Let me know what you think about the repo. Thanks for reading!
Ways to Make Money as a Developer — Videos, Job Boards, and More
Tags: career, productivity
Published: 2020-10-13 20:05:06

**Check out my books on Amazon at https://www.amazon.com/John-Au-Yeung/e/B08FT5NT62**

**Subscribe to my email list now at http://jauyeung.net/subscribe/**


Software development is a great skill to have in the modern world.

We can take advantage of it by making money in multiple ways.

In this article, we’ll look at some ways we can make money as a developer.

### YouTube Channel

You can shoot videos teaching people how to write apps and how to do other popular development tasks.

This is something that has fewer competitions like travel videos since software development is an exclusive skill that not everyone can master.

You can live code or shoot prerecorded videos.

Prerecorded videos can be sold.

With YouTube, you can sell ads through AdSense if you have enough people.

Of courses, you can sell ad spaces in your own videos instead of using Google ads.

Also, you can promote affiliate products and promote your own products in your videos.

Shooting videos is hard work and takes lots of work to succeed, so this may not be the best option if you want to make money fast.

However, if you’re known on the Internet, then more opportunities will come for you.

### Online Courses and Programs

This is like shooting YouTube, except that you’re organizing the videos into a course.

Also, you may want to create a book only courses instead of book and video courses.

### Live Streams

You can live stream yourself coding or doing some kind of webinar.

This can be done in Twitch or YouTube.

There’s less competition than other kinds of live streams since being able to live code means you can code mostly on top of your head.

This is not something many people can do.

Live code sessions also have discussions on the side to engage your audience more.

In your stream, you can ask for donations and you can ask for sponsorships to make money.

### Open Source Projects

This is also not something everyone can do, so the competition is definitely lower.

You can create an open-source project or work on an existing one.

As long as you make something useful to other people, people will notice.

In the process, you can get donations or sponsorships.

### Patreon

Patreon is a donation platform where people can donate to you.

If you contribute something useful, people will donate to your eventually.

However, this is not something that’ll happen often until you get a very large audience.

So you may have to find more reliable ways to make money.

### Create Your Own Job Board

Since you have development skills, you can create your own job board and employers can buy posting space on your site.

Each posting usually cost a few hundred bucks, so you can make money fast if you have lots of postings.

Ads may help you here to promote your job board so employers and prospective employees can notice your job board.

### Conclusion

There’re many channels you can gain exposure for yourself and make money online as a developer.
How I passed AWS Certified Developer Associate (AWS CDA) mostly using open source and free materials
Tags: aws, devops
Published: 2020-10-13 20:04:03

Disclaimer: The following is just a list of useful points that I did while preparing for my exam for AWS Certified Developer. I am just sharing my experience as sharing is caring :) If you don't like some points, so what ;) 

* for book readers:
 * 900+ pages: certified developer aws book dva-c01
 * mock exams in Wiley test bank and exam questions after each chapter
* if you like interactive sessions
 * udemy course: https://www.udemy.com/course/aws-certified-developer-associate/ personally, I did not do that, but colleagues had great experience there
* what always helps: Google for
 * "mock exams for CDA": may come up with free sites offering CDA, SAA and sysops questionnaires, because a lot of the question are interchangeable. 
 * "AWS certified developer github cheatsheet": make a summary on your own 
 * "how to pass aws certified developer": people talk about their exam experience e.g. at Pearson/VUE or remote from home
* practice appropriate strategies with discipline during the exams
 * do the shortest questions first
 * draw architecture diagram if a question involve 3 different AWS services and if you have time ;) 
 * flagging and exclusion techniques (PearsonVUE exam program did support those features, comment function available, but did not use that)
 * take your time (130 minutes, in average 2 minutes for each question)
* learn techniques
 * do not try to remember hard numbers (e.g. max allowed lambda memory, because it changed a lot during the years: 128MB → 1024MB → 3008MB), not 1 of 65 exam questions were about remembering hard numbers
 * but dig deeper regarding concept, practical architecture pictures, interaction/combination between AWS Services, e.g. encryption, use cloudFront as caching for S3, use ElastiCache as caching for RDS etc., most of the questions involve at least AWS 2 services
Redux is "Required" 
Tags: redux, react, webdev, javascript
Published: 2020-10-13 20:01:05

Post #01 🤝


If i have to explain the importance of "Redux" in one line only trust me I cant 😆 but  can do that in 3-4 line for sure ⤵️


1️⃣ First of all, redux is not just for React. I have used this with vuejs and angular as well. It's not a framework but a library to manage states(data in short)


2️⃣ some dev think it's good to keep redux away because state and props is easily created inside component. This is wrong!


3️⃣ when a component has dependencies on several other component state and suppose you make an axios calls then its tough to update everywhere. This is one of the important aspect of using redux. 


4️⃣ You just need to create a store, define action types, create reducer and dispatcher, register subscribers(child components) and that's all to make everything run smooth 


5️⃣ Consider redux as a git repository where lots of people push their codes and you can just pull it with one command(subscribers in react term)


I just joined this platform and I'm so excited about it. Thanks for reading 😊
Third test article
Tags: javascript, featured
Published: 2020-10-13 20:00:25

**But** I must **explain** to you how all this mistaken idea of denouncing pleasure and praising pain was born

and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth.

the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences.

that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example.

which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?
Second test article
Tags: javascript, react, vue
Published: 2020-10-13 19:58:40

This is a second test article, pointless text, some more stuff, At vero eos et accusamus et iusto odio dignissimos ducimus qui.

blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia anim.

id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. 

Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. 

Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat."
PrimeVue 3.0.0 released for Vue 3 with 60+ UI Components featuring Bootstrap, Material, Fluent UI and Custom Themes
Tags: vue, javascript, webdev
Published: 2020-10-13 19:58:19

[PrimeTek](https://www.primetek.com.tr) is proud to introduce [PrimeVue](https://www.primefaces.org/primevue/showcase) 3.0.0 final release with full support Vue 3, over 60 highly customizable and accessible UI Components, a design agnostic theming featuring **Material**, **Bootstrap**, **FluentUI** and **PrimeOne** Themes, a theme designer, PrimeFlex css utilities, modern set of icons via PrimeIcons, premium Vue-CLI templates and more.

Take a tour around the [PrimeVue Live Showcase](https://primefaces.org/primevue/showcase/#/) to take the library for a test run. 

PrimeVue is a free library to use under MIT License and available at [NPM](https://www.npmjs.com/package/primevue). 

**Note for Vue 2 Users** 

For Vue 2 users, we'll still be maintaining and improving PrimeVue 2, if you are on V2, please view the [PrimeVue 2 website](https://www.primefaces.org/primevue/showcase-v2/#/) instead.

![](https://www.primefaces.org/wp-content/uploads/2020/08/primevue-promo.jpg)
openbase is Very Useful When You Choose JS Library for Your Project 🎉
Tags: javascript, npm, webdev
Published: 2020-10-13 19:49:58

## What is openbase ?
https://openbase.io
>Find and compare open-source packages with user reviews, categorization, and unparalleled insights about packages' popularity, reliability, activity, and more.


As you know, there are so many or too many packages for JavaScript and TypeScript. I think some of you have had a tough time picking the right JavaScript/TypeScript package for your project. 


## My method to choose a package from npm

1. Search keywords on npm  

2. Check description, the number of downloads, and the last update

3. Go to the GitHub page and scan Readme(+demo) and official doc then check issues and PRs quickly
If issues and PRs have been left for a long time, it would be a sign to avoid using   

I pick up 3-4 npm packages through the above steps. 
Basically, I don't choose a too bad package for projects, however, infrequently I need to back my shortlist.
Then I think I could get more information easily when I was in the process. Like reviews for packages📦. Actually, we could find out so much information from docs, blogs, and StackOverflow, but it would need to check several pages which is troublesome 😭😭😭


## 👍 openbase has Reviews 👍
openbase allows us to compare JavaScript libraries since it has statical information and reviews on the same page.
This is really useful to research libraries for a project.
The reviews have stars as the rating that is helpful to judge the reviews.

[basic_info]
![](https://storage.googleapis.com/zenn-user-upload/s1clltyy6rfmycn2g6t2krslpn2d)

[review]
![](https://storage.googleapis.com/zenn-user-upload/vdamn7blticatjme0y08vjw4k2kx)


## 👍 openbase allows us to access tutorial easily 👍
You can check tutorials when you click `tutorial` in the sidebar. I think this is super cool functionality since sometimes libraries don't have enough information to try very quickly on ReadME.

![](https://storage.googleapis.com/zenn-user-upload/s44khn5923fqmqpkn4nzw1brmikh)

![](https://storage.googleapis.com/zenn-user-upload/h1ryt2fszm22kg502v1slkgd5rv3)


## 👍 openbase can suggest alternatives 👍
If you click `Alternatives` in the sidebar, openbase will show you alternatives. This is very useful to create your shortlist. However, if you click `Alternatives` when you are checking `React`, the result will be Vue or Svelte etc lol

![](https://storage.googleapis.com/zenn-user-upload/7iwligihz98uwfzs8acz32kfe9wc)
Django on AMI
Published: 2020-10-13 19:49:14

If you're using AMI then there are few things to take note before proceeding.

* AMI have yum as package manager.
* AMI Linux 2 has [amazon-linux-extras] (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-ami-basics.html#extras-library) which are available as **topics**


## Setup the environment

```
sudo yum update -y

sudo yum install gcc

cat /var/run/yum.pid

ps -p 3633

ps -ef | grep 3633

kill -9 3633

sudo amazon-linux-extras install python3

curl -O https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
python3 -m pip install --upgrade pip

yum search pip
sudo yum install python3-pip

python3 -m venv /path/to/new/virtual/environment

sudo pip3 install virtualenv

sudo amazon-linux-extras install nginx1

mkdir project-name
cd project-name

virtualenv env
. env/bin/activate

pip3 install django

pip3 install uwsgi

django-admin --version

uwsgi --socket /opt/uwsgi/sock/yt_demo.sock --wsgi-file /home/ec2-user/project/testsite/testsite/wsgi.py

```


Note: I have taken help from multiple source and prepared this article. And all source deserves to receive the credits.

Credits,

* python3 installation on Amazon linux 2 answer on [stackoverflow] (https://stackoverflow.com/a/48314242/8826621)

* how to fix yum lock from other [blog] (https://www.golinuxcloud.com/another-app-is-currently-holding-the-yum-lock/)

* how to upgrade sqlite to latest version on [stackoverflow](https://stackoverflow.com/a/57149324/8826621)

* pip installed package location explanation on [stackoverflow] (https://stackoverflow.com/a/29980912/8826621)

* how to run simple django application by [digital ocean](https://www.digitalocean.com/community/tutorials/how-to-install-django-and-set-up-a-development-environment-on-ubuntu-16-04)

* how to install mariadb [blog](https://techviewleo.com/how-to-install-mariadb-server-on-amazon-linux/)

* troubleshoot mariadb uninstall [stackoverflow](https://stackoverflow.com/a/33394008/8826621)

* mariadb pid troubleshoot [blog](https://www.ryadel.com/en/linux-mysql-mariadb-pid-file-folder-fix/)

* mariadb official [documentation](https://mariadb.com/kb/en/systemd/#interacting-with-the-mariadb-server-process)


* migrate database with mariadb for django troubleshoot from [stackoverflow](https://stackoverflow.com/a/56312295/8826621) and other [blog](https://django.programmingpedia.net/en/knowledge-base/46902357/error-loading-mysqldb-module--did-you-install-mysqlclient-or-mysql-python--)

* get uwsgi and nginx working together [stackoverflow](https://stackoverflow.com/questions/22071681/permission-denied-nginx-and-uwsgi-socket) and digital ocean [blog](https://www.digitalocean.com/community/tutorials/how-to-set-up-uwsgi-and-nginx-to-serve-python-apps-on-centos-7)

* make old migration clean ups [blog](https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html)

* uwsgi, nginx on centos [blog](https://hostpresto.com/community/tutorials/how-to-serve-python-apps-using-uwsgi-and-nginx-on-centos-7/)
Wordpress on AWS EC2 ubuntu
Published: 2020-10-13 19:48:12

sudo apt update -y
sudo apt upgrade -y

sudo apt-get install apache2
sudo systemctl start apche2
sudo systemctl status apche2
sudo systemctl enable apache2
sudo apt-get install mariadb-server mariadb-client -y

sudo systemctl start mariadb
sudo systemctl status mariadb

sudo mysql_secure_installation

sudo systemctl restart mariadb

sudo apt-get install php php-mysql php-gd php-cli php-common -y

sudo apt-get install wget unzip -y

sudo wget https://wordpress.org/latest.zip

sudo unzip latest.zip

sudo cp -r wordpress/* /var/www/html/

cd /var/www/html

sudo chown www-data:www-data -R /var/www/html/

sudo rm -rf index.html

sudo mysql -u root -p

create database wordpress;

create user "wpadmin"@"%" identified by "wpadminpass";

grant all privileges on wordpress.* to "wpadmin"@"%";

exit

insert those details on public web address on wordpress intallation and done.
export and import mariadb database
Published: 2020-10-13 19:47:41

sudo mysql -u root -p

use mysql;

select user, password from user;

show databases;

exit;

sudo mysqldump -u wpadmin -p wordpress > /home/ubuntu/try.sql

head -n 5 try.sql

ll -sha


sudo mysql -u root -p

create database new_database;

exit;

sudo mysql -u root -p new_database < try.sql

sudo mysql -u root -p

show databases;

use new_database;

show tables;

describe wp_users;

select user_login, user_pass, user_email from wp_users;

exit;
Can You Code On iPhone?
Tags: ios, iphone, react, node
Published: 2020-10-13 19:47:06

Few days ago while watching the Apple iPhone 12 keynote I wondered – Could you use this thing as a device to do programming on? So I tried. In this Video I will try to build a React + Node/Express app entirely on my iPhone SE using my favourite iOS IDE PlayJs.

{% youtube 9PkPEyZ-M2M %}

For more crazy dev videos follow me here:
- www.twitter.com/timo_ernst
- www.timo-ernst.net
- www.youtube.com/xvalmar
Creating API Routes in a Nuxt App
Tags: nuxt, vue, javascript, jamstack
Published: 2020-10-13 17:21:03

---
title: Creating API Routes in a Nuxt App
published: true
description: How to create API routes in a Nuxt app using Express
tags: nuxt, vue, javascript, jamstack
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/gf0k1y3s9764mpk1h6wq.jpg
---

As a Next.js user, one of the things I've been used to working with were built-in API routes. When I tried out Nuxt, I was curious how I would achieve the same functionality. 

In this post, I'll walk through how to easily create API routes in a Nuxt app using [Express](https://github.com/expressjs/express).

### Implementation

To get started, start with an existing Nuxt app or create a new one using npx:

```js
npx create-nuxt-app nuxt-with-api

cd nuxt-with-api
```

Next, install express:

```sh
npm install express
```

Next, update `nuxt.config.js` to add the following `serverMiddleware` configuration to specify the directory of the API routes:

```js
serverMiddleware: {
  '/api': '~/api'
}
```

Next, create a folder called __api.__, and within the __api__ folder create a file called __index.js__ and a file called __hello.js__:

Next, open __api/index.js__ and add the following code to configure the entry point to the express server: 

```js
const express = require('express')
const app = express()

const hello = require('./hello')
app.use(hello)

if (require.main === module) {
  const port = 3001
  app.listen(port, () => {
    console.log(`API server listening on port ${port}`)
  })
}

module.exports = app
```

Next, open __api/hello.js__ and add the following code to create a `/hello` route:

```js
const { Router } = require('express')
const router = Router()

router.use('/hello', (req, res) => {
  res.end('Hello world!')
})

module.exports = router
```

Next, test it out by running `npm run dev`.

Now, navigate to `http://localhost:3000/api/hello` and you should see your API response!

## Conclusion

Creating API routes in a Nuxt app is more work than with Next.js, but [servermiddleware](https://nuxtjs.org/api/configuration-servermiddleware) allows you to implement your own API route setup fairly easily. 

---

> Cover image by [Diego PH](https://unsplash.com/@jdiegoph)
Day 89: Design Day
Tags: 100daysofcode, design
Published: 2020-10-13 19:15:51

Today's work was a website design. This will hopefully be my first website project in Vue. I designed the first section of the landing page.

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

I can't decide whether to align the navbar on the right or left. Here is the right aligned.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ebn4kwci4t8y9aa57h3c.png)

As for the coding bit of my day I started the 10-day javascript challenge on HackerRank. 

_And that was Day 89 for me_