teleren/devto huggingface dataset:
I Quit My CTO Job to Work on My Own Projects
Tags: career, entrepreneurship, indiehacking, ultimatemachine
Published: 2020-02-28 19:36:25

---
title: I Quit My CTO Job to Work on My Own Projects
published: true
description: A post about leaving safety behind to follow the heart.
tags: Career, Entrepreneurship, "Indie Hacking", "Ultimate Machine"
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/6ggb19jlxsyj767vq402.png
---

For the past five and a half years I’ve been working as CTO of a startup. We worked to digitize the personal development space, intending to improve people’s well-being. Think Tony Robbins, BJ Fogg, James Clear, meditation CDs and such, all re-packaged into apps for the modern consumer. Throughout the years our positioning changed, but what remained was the focus on goal achievement and life balance. I love the company and all the people working there. We achieved great things during our time together. But lately, I’ve had this growing itch to go do something on my own, and now it’s outgrown my reasons to stay.

![Ultimate Machine Logo](https://dev-to-uploads.s3.amazonaws.com/i/6ggb19jlxsyj767vq402.png)

I’m starting [Ultimate Machine](https://ultimatemachine.se/about) as the sole founder. It will be a company to manage a suite of software products and services. At the moment of my writing this, there’s about $350-$400 of MRR to my name, generated from past [online projects](https://ultimatemachine.se/products). This is not enough to sustain my living expenses in Sweden. Although I’ve had the option of part-time employment, I feel that what’s left of 80%, 50% or even 25% is not enough to get into the zone needed to create useful products that people love to use. It takes a lot of focused work, free of distractions.

The timing, my confidence in my abilities and my knack for investments allow me to take big career risks. I’m committing up to three years of my professional life to become self-sustained, through creating. Either a big chunk of my savings are gone by then, or I have managed to strike gold with software.

[Continue reading](https://ultimatemachine.se/articles/i-quit-my-cto-job-to-work-on-my-own-projects/) to learn about The Growth Masterplan and my next steps...
Bracket Pair Colorizer - Matching brackets to be identified with colors 🎨
Tags: vscode, beginners, webdev
Published: 2020-02-28 18:55:32

## Introduction

This extension allows matching brackets to be identified with colors. The user can define which cards to combine and which colors to use.

## Installation

We go to the add-ons section in Visual Studio Code and look for ``Bracket Pair Colorizer 2`` and click on ``install``.

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

## Demo

Here I show a demonstration of how this extension works:


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

Thanks for reading me. 😊
Working with databases in CodeIgniter 4
Tags: codeigniter, database, php, webdev
Published: 2020-02-28 18:44:07

Most web applications make use of databases and knowing how to use the resources of a framework to manipulate the data is fundamental for the creation of quality applications.

In this book you will learn in practice how to use CodeIgniter 4's native features to work with databases.

Some of the contents that will be covered in the book:

- Database settings
- Query Builder
- Transactions
- Pagination of results in the database
- Custom Functions
- Database events
- Metadata
- Error handling

To access the book page, click on the link bellow.

https://leanpub.com/working-with-databases-in-codeigniter4/
Is your mobile screen complete?
Tags: android, screen, design, checklist
Published: 2020-02-28 18:36:19

As a mobile app developer, there's a lot of things to take care before you decide your single mobile screen is complete and ready before you move on to the next screen.

##Checklist

1. Design is consistent across various screen sizes.
2. Design is consistent across various OS versions
3. Form validations work as expected.
4. Validation errors are displayed as expected.
4. Text wrap or truncate as expected.
5. List down the data points on the screen.
6. Remove/add unwanted/missed data points in your model. 
7. Data from API/Database is correctly set to model.
8. Data from model is correctly set to View.
9. All buttons/actions are handled.
10. Feedback on buttons/actions is handled.
11. API/Database response success/error messages are handled.


Feel free to add your own points in the comments...
Quick tip: Automatically detect Dark Mode with CSS!
Tags: css
Published: 2020-02-28 18:35:46

Just a quick tip I discovered recently.

You probably already know that macOS and iOS (and perhaps others) support dark mode. What you might not know is that you can detect this with a CSS media query!

Just use this media query:

```
@media (prefers-color-scheme: dark) {
  // rules in here will only be applied if the user's OS is in dark mode!
}
```

Hope this helps you develop better UIs!
User Role Management in NodeJS, Express, MongoDB
Tags: expressjs, roleaccess, apiaccess, middleware
Published: 2020-02-28 18:06:47

---
title: User Role Management in NodeJS, Express, MongoDB
published: true
description: Give access to multiple types of users based on type.
tags: expressjs, role access, api access,middleware 
---

Problem: Multiple users in a system, allowed to do specific actions.

Solution: There are multiple user role management packages in npm, but I want something easier, quicker. So I started solving it myself.

Example: A blog with users - U, authors - A, admin - M

- Create users with a field user_type.
```
Users.create({
name: 'User',
user_type: 'U'
})
Users.create({
name: 'Author',
user_type: 'A'
})
Users.create({
name: 'Author',
user_type: 'M'
})
```
- Assuming user logins managed using a jwt token. And sign the token including user_type, add a middleware to decode and save user data to req.user
```
const decoded = await jwt.verify(token, process.env.JWT_SECRET);
req.user = {
    name: decoded.name,
    user_type: decoded.user_type
};
```
- Write another middleware to authenticate role.
```
const authenticateRole = (roleArray) => (req, res, next) => {
  if(!req.user) {
    return res.status(401).json({
      success: false,
      message: 'Session expired',
      code: 'SESSION_EXPIRED'
    });
  }
  const authorized = false;
//if user has a role that is required to access any API
  rolesArray.forEach(role => {
   authorized = req.user.user_type === role;
  })
  if(authorized) {
    return next();
  }
  return res.status(401).json({
    success: false,
    message: 'Unauthorized',
  })
}
```
- Finally use the authenticateRole middleware in the API access.
```
//This is accessed by only Admin user
route.get('/users', authenticateRole(['M']), handler)
//This is accessed by anyone
route.get('/posts', authenticateRole(['M','U','A']))
```
*I am trying to enhance this idea as my needs.*
Airtable Is Awesome
Tags: webdev, productivity, airtable, design
Published: 2020-02-28 17:59:11

You might use Google Docs and Google Sheets a lot. They’re amazing tools, and a great demonstration of just how amazing a web app can be.

But it’s easy to push those tools — especially Sheets — far beyond its core competency. One of the ways that Sheets can get unwieldy is when you try to use it as a pseudo-database. Creating a lot of filtered views or sorted views for whatever thing you may need.

There’s a far better tool when you get to that point: [Airtable](https://airtable.com/). I discovered Airtable around a year ago and have added it to my virtual tool belt. It feels like something that belongs right next to Google Docs & Sheets. It’s simple, and the free version is so fully-featured, that most people will never need to even consider a paid plan. I’ve used it a lot and not needed to pay anything yet.

It really shines when you have lists of data that need to be sorted and filtered and re-sorted and re-filtered, or viewed differently by different people, or basically to have the underlying data separated from the presentation of that data. It’s as easy as Google Docs/Sheets when working with multiple people on the same data as well. It’s really a fantastic tool.

Take a minute and go [check it out](https://airtable.com/). They even have a great API for using your data as a back-end to web projects.

I’m not getting anything out of telling you about Airtable. I just believe it’s a great tool that developers should know about, and it comes in pretty handy quite often.

Happy Coding!

Signup for my newsletter at [here.](https://thinkster.io/?previewmodal=signup?utm_source=devto&utm_medium=blog&utm_term=airtable&utm_content=&utm_campaign=blog)

Visit Us: [thinkster.io](https://thinkster.io?utm_source=devto&utm_medium=blog&utm_term=airtable&utm_content=&utm_campaign=blog) | Facebook: @gothinkster | Twitter: @GoThinkster
What's the best charts library with a small bundle size?
Tags: discuss, javascript, webdev, dataviz
Published: 2020-02-28 17:51:43

I just made this feature request for DEV...

{% github https://github.com/thepracticaldev/dev.to/issues/6362 %}

And looking at some of the popular chart libs, you see some fairly sizeable bundles...

[117.7kb gzipped and minified](https://bundlephobia.com/result?p=chart.js@2.9.3) for chart.js

[82.6kb gzipped and minified](https://bundlephobia.com/result?p=highcharts@8.0.0) for highcharts

Do you know of any smaller alternatives that are still really useful?
UX/UI Space Wrocław vol.8
Tags: meetup, design, uxui
Published: 2020-02-29 11:31:53

---
title: UX/UI Space Wrocław vol.8
published: true
date: 2020-02-28 17:50:03 UTC
tags: meetup, design, ux/ui
canonical_url: https://krzysztofzuraw.com/blog/2020/ux-ui-space-8-wroclaw
---

Last week joined the [UX/UI Space Wrocław #8](https://www.meetup.com/UX-UI-Space-Wroclaw/events/268651212/) meetup. Below you can find my humble opinion about this event.

## Before meeting

I have to say I’m amazed by how many people want to come to this meetup! The meetup is traveling from place to place every month so a number of participants can vary. This month it was 70. Guess how fast those places went? **1 minute**. Yes - you read it well: **1 minute**. Good dammit I want the same at [Wrocław TypeScript](https://www.meetup.com/WrocTypeScript/). I have to ask them how they are doing it.

This time venue was at Wrocław [intive](https://www.intive.com/) office. It was nice - they even won some awards for this place. Anyway, let’s go back to the talks.

## Talks

There were 3 talks with small community announcements at the end.

The first talk by [Dominik Piłat](https://www.behance.net/dominikpilat) was about receiving & giving feedback for your work. It was talk with a lot of memes and common knowledge. If someone wants and needs to work on giving/receiving feedback I recommend [WrocLove Speakers](https://www.facebook.com/wroclovespeakers/). Heads up - I a was member of that club and I totally recommend it!

The second talk by [Dorota Pęczek](https://www.linkedin.com/in/dorota-p%C4%99czek-148874105/) was really interesting. We dive into many different methodologies of working with clients. I really like this talk because for me it was UX/UI work from the kitchen. Most of the methods like A/B user testing or user personas resonate with me as I think to make better decisions in user-facing code we need to know the users.

The only thing I would improve is the volume of information - it was a huge piece of data to comprehend in such a short presentation. Talking more deeply about a few selected topics may yell better results. All in all great talk!

The last talk by [Magdalena Grudzień](https://www.linkedin.com/in/magdalena-grudzien-a6bb28107/) was about tools used in design process. Nice talk - I learn about [Zeplin](https://zeplin.io/) or [Abstract](https://www.abstract.com/).

## Summary & TL;DR

I attended UX/UI Space Wrocław #8 meetup and I can recommend it to anyone. I learned quite a lot about the work of designers and I will come next time! They even have 2 [Sketch](https://www.sketch.com/) licenses to win at every meeting 🎉.
Export Violations From JFrog Xray to CSV
Tags: cloud, javascript, developer, devops
Published: 2020-02-28 17:50:14

---
title: Export Violations From JFrog Xray to CSV
published: true
date: 2020-02-28 17:45:54 UTC
tags: cloud,JavaScript,Developer,devops
canonical_url: https://greenido.wordpress.com/2020/02/28/export-violations-from-jfrog-xray-to-csv/
---

![](https://greenido.files.wordpress.com/2020/02/screen-shot-2020-02-28-at-9.45.04-am.png?w=1024)

The trend of[#DevSecOps](https://twitter.com/search?q=%23devsecops) is growing fast and it is no longer just part of your security team. More and more organizations wish to integrate their security team in all the phases of development and operations. To achieve it, there are cases where you need to export data from [JFrog Xray](https://jfrog.com/xray/?idog) (in our case to a CSV format) so you can ingest it to your current logging/monitoring system. 

### What is Xray?

In a nutshell, JFrog Xray works with JFrog Artifactory to perform a deep analysis of binary components at any stage of the application lifecycle. It provides full transparency that leads to more trust in your software. 

By scanning binary components and their metadata, recursively going through dependencies at any level (think on the layers you have in any Docker container), JFrog Xray provides great visibility into issues lurking in components anywhere in your organization.

### Xray API

One of the best parts is that JFrog Xray is also fully automated through a rich [REST API](https://dev.to/jfrog/how-to-build-an-integration-with-jfrog-xray-3pe3). We will use it to create this Exporter. Please feel free to clone/fork the code below and use it, but remember you might need to add pagination and a _[watchdog](https://linux.die.net/man/8/watchdog)_ for a real system.

### Code
{% gist https://gist.github.com/greenido/e2eceff5ea69fa94a84c74ed308bd74a %}

### Demo

[Demo page](https://xray-events-to-csv.glitch.me/)

[Demo Code](https://glitch.com/edit/#!/xray-events-to-csv)

## Docker

### 🐸 You can run it with this [Docker Image](https://hub.docker.com/r/greenido/jfrog-xray-exporter-csv) as well. It’s just one line:

```
docker run -v /tmp/xray-csv/:/home/node/app/xray-csv  --env-file .env -p 80:8080 -d greenido/jfrog-xray-exporter-csv
```

All you need is to make sure that /tmp/xray-csv/ is a valid direction on your machine as this is the place the CSV files will be stored.

You need to fill the .env file with the following fields:

```
      BASE_URL=ip-address:port/xray

      XRAY_USER=Your-user

      XRAY_PASS=the-password

      EXPORTER_PORT=8080

      # Query params
      MIN_SEVERITY=Low
      VIO_LIMIT=2500
```

#### Be safe and happy!
MVD: The Minimal Viable Developer
Tags: beginners, discuss
Published: 2020-02-28 17:44:04

---
title: MVD: The Minimal Viable Developer
published: true
description: 
tags: beginner, discuss
---

A few weeks ago I wrote that I will be teaching designers frontend development at a university this year. 

[I asked for your opinions on how to teach frontend development in 2020](https://dev.to/kayis/what-would-you-teach-a-frontend-beginner-4im1), and the answers were good but also fairly widespread.

I think, the problem was mostly, that frontend development is a wide field and becoming a proficient developer in any field requires months, if not years of time investment.

I invested that time and IT and development are now my main source of income, but I also think that anyone could use some dev skills even if they don't make it their main job.

Designers, marketers, business administrators, you name it.

These people already spend most of their time getting good at the core skills, they don't have years to become a full-blown developer.

So my idea was to define a skill set for **The Minimal Viable Developer**.

> By no means is this a finished idea, I'm just throwing this out to get your opinions in hopes to improve it.

These MVDs could come in different flavors and the one I'll start with is the **Frontend MVD**. 

An FMVD should be able to create frontend software that has prototype quality. Something that works and could be improved upon by a regular frontend developer or by the FMVD if they become more skilled in the future. So it shouldn't be perfect, but it should also not be a complete disaster of copy-pasted StackOverflow answers :D

I thought a stripped-down version of [the Frontend Developer Roadmap](https://roadmap.sh/frontend) would be a good start. 

![Roadmap](https://dev-to-uploads.s3.amazonaws.com/i/9dcaf0oemfew0fwjx2gr.jpg)

To fire up the discussion: **What would you throw out?**

I think, all the non-purple stuff could go right away, which removes almost half of that roadmap.

Sometimes they list multiple points with purple marks, I don't know if it's better to use the simplest solution here (for example Parcel instead of Webpack) or the most mainstream (npm instead of yarn), etc.

Would also be worth considering if some CSS things could be left out. Wouldn't Grid and Flexbox be enough for starters?

So this is what my version would look like:

![Stripped-down Roadmap](https://dev-to-uploads.s3.amazonaws.com/i/ijw5uhg73l92i7854hvv.jpg)

On the other hand: **What would you add?**

This roadmap is rather technology-heavy, some concepts (DRY, KISS, SOLID) could be a good idea.

Anyway, I'm curious what you think :)
59 Days to Become a Full-Stack Developer
Tags: bootcamp, beginners, career, learning
Published: 2020-02-28 17:33:01


Yes, you read this right. <strong>59 days</strong> was all I had to start this new career. No, I do not think I am a complete full-stack developer, but I can assure you that I am on the right path.

How? You ask me, so I'll tell you a little story...

---

### My Background

I am a Brazilian living in Canada. Before coming to this cold and wonderful place, I used to live in Rio de Janeiro, or as we call it: Hell de Janeiro... :smiling_imp: *super hot in there* :fire:

I used to be an intellectual property lawyer and worked in a great firm with Italian brands (yes, those that you are thinking of...no, never got a car, a purse or anything else...).

After realizing that life there was not what we wanted, my husband and I decided to move to Toronto. I decided I was going to study Culinary Management. -Yes, it's a big change-.

After 3 years of cooking, I realized that I was not happy, I loved every minute, but that wasn't what I wanted to do for the rest of my life, nor was law. So I decided to change....but, change to what? :woman_shrugging: :thinking:

My husband is a Project Manager and said I should try software development again (yes, I did 6 months in Brazil).

So, before quitting and deciding to do some coding, I took a few online courses, just to be sure that I liked that. And do you know what? I LOVED! Every single thing in this field makes me want to be better, to learn more and to conquer more. :muscle:

And that's when the 59 days come to the story...

---

### Coding Bootcamp

I registered to General Assembly Toronto* (previously known as Bitmaker Labs) for their Software Engineering Immersive. 3 months of <strong>intense and full time</strong> course where we learned a good range of subjects like:

- HTML, CSS, JS, jQuery
- Node.js, MongoDb, Mongoose
- Python, Django, and PostgreSQL
- React and Redux

We had classes all day + homework + projects + extracurricular studies... :computer:

So, in 59 business days, our amazing teacher taught us the base of all these subjects, a few other extracurricular things, and the most important thing: how to continue after the Bootcamp. Oh! And, of course, that we need to <strong>read the docs</strong>! :open_book:

It was intense, fierce and profound, there were dark days, but we had each other to lean on, my classmates and I became a family (after all, we were seeing each other more than our actual family). It was one of the most amazing experiences I had so far and from that, all I can say is:

## I might not be a complete full-stack developer, but I am definitely on the right path... :footprints:


---
**Oh, yeah...I'm not here to promote GA, just to share my story...*

*And btw, this is my first post, please feel free to let me know how I can improve.* :fountain_pen:
Trivia #4: Who invented copy+paste?
Tags: watercooler, todayilearned, codenewbie, computerscience
Published: 2020-02-28 17:22:56

Welcome to my little CS trivia series. Every week I post a new trivia piece.

Today's question is...

---

## Who invented copy+paste?


Can you imagine coding without being able to copy/paste from stackoverflow? Or, having to retype out long code blocks as you refactor a growing app? Coding would definitely be a test of patience. We take copy/paste for granted but imagine that it wasn't a feature until someone created it.

We owe the pleasure to [Larry Tesler](https://en.wikipedia.org/wiki/Larry_Tesler), one of the first computer scientists who worked at Apple, who actually passed away two weeks ago at the age of 74. Besides copy/paste, he created [Smalltalk](https://en.wikipedia.org/wiki/Smalltalk), the first dynamic object-oriented language, or the first graphical user interface word processor for the Xerox Alto (which you can see in [this video](https://www.youtube.com/watch?v=Cn4vC80Pv6Q)).

## Copy + paste invention

From [IEEE's Spectrum](https://spectrum.ieee.org/computing/software/of-modes-and-men) article on Tesler:
>In 1969 Tesler volunteered to help create a catalog for the Bay Area’s Mid-Peninsula Free University. He and Jim Warren, founder of the West Coast Computer Faire, did the paste-up for that catalog. Around the same time, Tesler saw a demo of a computer command that allowed you to bring back something that you had deleted. The command was called “Escape P Semicolon” (or something similarly arcane). Several years later, when Tesler was at Xerox PARC writing a white paper about the future of computing, he drew on the memory of those two experiences to predict that you would be able to “cut and paste” within computer documents.

## How does copy + paste work under the hood?
At the very low level, each letter and each file is just a stream of bytes — or, a stream of ones and zeros. It's the software that translates these bytes into e.g. ASCII and then, into their visual representation of letters, or RGB, and their visual representation of colors. 
**A fun fact:** the contents of a file are all scattered around the hard drive, or, are not stored together. It's the file metadata that ties all these scattered blocks into a file. You can read more about it in this [StackOverflow thread](https://stackoverflow.com/questions/1961781/how-files-are-copying-at-the-low-level).

When `copy` is invoked, the space in the clipboard (memory) is allocated and as the metadata of the original file (or e.g. sentence) is being evaluated, its contents are being populated to the clipboard. This happens one block at a time, which is why sometimes this may take a while. When `paste` is invoked, the location of the data changes from the clipboard.