teleren/devto huggingface dataset:
DeepCode - UX updates...
Tags: deepcode, ux, staticcodeanalysis
Published: 2020-03-10 15:42:18

Hey,
we constantly get feedback that we incorporate into the product. Based on your feedback, we changed some aspects on our UX and we will do some more in the coming days. Here is a first glance...

#Suggestions Page#

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

This is the new layout of the Suggestion page. On the top left (Number 1), you see the current repo and you can select which branch to work on using the drop down. Mid top (Number 2), you find how many different suggestions and their category were found. Top right (Number 3), you can find how long it took DeepCode to scan and what amount of files were covered. By clicking on _File Coverage_, you can drill down on what file types were scanned or not. Lastly (Number 4), we have the typical _Suggestion_ tiles.

#Suggestion Detail Page#

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

Also a few changes in _Suggestion Details_. We implemented the option to flick through the suggestions quickly (top right, Number 1) to get an overview. Also, we included help to add the ignore comments (lower right, Number 2). As you might know, you can switch off suggestions made by DeepCode by using comments. We provide these comments that would switch off the suggestion.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6jeibuv012vfsmzv6doi.PNG)

We hope you find these changes helpful. Also, check out the [Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=DeepCode.deepcode) and our [Atom Package](https://atom.io/packages/deepcode). But - for sure - check us out at [deepcode.ai](https://deepcode.ai).
OverTheWire Bandit Level 7 Level 8 walk-through
Tags: security, beginners, infosec, ctf
Published: 2020-03-10 15:41:48

Challenge page => https://overthewire.org/wargames/bandit/bandit8.html

> The password for the next level is stored in the file `data.txt` next to the word millionth

This time, the usual challenge is flipped on its head. Instead of hunting for the file that contains the password, we search for the password in the file that is given to us.

Let's take a look at the file size and the first few lines from it.

![data.txt preview](https://dev-to-uploads.s3.amazonaws.com/i/lmx42cj9n2nly5hpu6m7.png)

The file is 4 MB in size, so its quite big. Looking at the contents, a manual search will not be easy.

___

We need to find the location of a word in the file. If only there was an easy way to do this.

Hint 1: The answer for this is pretty obvious, so one web search should give you the answer. 
___


So you found it eh? Awesome. Being comfortable with the basics of `grep` is very important if you are to become comfortable with the command line. Take my word for it. It comes in handy in so many circumstances!

I would recommend glossing over the man page for `grep` before going ahead, and reading up on a few examples. 

- [Using Grep & Regular Expressions to Search for Text Patterns in Linux - DigitalOcean](https://www.digitalocean.com/community/tutorials/using-grep-regular-expressions-to-search-for-text-patterns-in-linux)

In this particular case, its a simple search, and the solution is obtained pretty easily.

![Solution found](https://dev-to-uploads.s3.amazonaws.com/i/ftmls5l810cyzsm0io72.png)

To the next challenge!
What do you do when you're stuck?
Tags: discuss, codenewbie, coldfusion, wecoded
Published: 2020-03-10 15:40:42

Right now, I'm sitting at my desk staring at an error - it doesn't make sense whats going on or why this error occurred. If you're working with a language that has a huge cormmunitity, it's likely that you can just google what problem you've come across. For me that's not really the case, I work with ColdFusion. Of course, after a while - if I can't solve the error I will reach out to my coworkers for help, but I'm trying to do that as a last resort now.

Out of habit, I reach for my phone. Check twitter, facebook, instagram.. or even writing this post. Most of the time I don't really realize I'm doing it. I was talking to a colleague recently who mentioned that I spend a lot of time on phone, and I was pretty surprised. Out of this discussion, I became more aware that grabbing for my phone is something I do what I get stuck or even uncomfortable with a ticket. I use it for a distraction or outlet even to get my mind off what I'm struggling with. 

Since becoming aware of my constant phone use I've made an effort to keep my phone in my bag. But now I still need an outlet to let that feeling of being stuck pass. 

What is the right approach for issues like this? Obviously we all get stuck, from junior to senior dev - we won't automagically know the answers or always how to source them. So, how do you handle these types of situations?
Daily Challenge #202 - Complete the Pattern II
Tags: challenge
Published: 2020-03-10 15:26:30

---
title: Daily Challenge #202 - Complete the Pattern II
published: true
series: Daily Challenge
description: Implement a function to complete the following pattern.
tags: challenge
---
Implement a function `pattern`, which returns the following pattern for up to `n` number of rows. If n < 1 then it should return `" "` i.e. empty string. There are no whitespaces in the pattern.

Pattern:
1
22
333
....
.....
nnnnnn

###Examples
<pre>
pattern(4):
4321
432
43
4

pattern(11):
1110987654321
111098765432
11109876543
1110987654
111098765
11109876
1110987
111098
11109
1110
11
</pre>

###Tests
`pattern(5)`
`pattern(8)`
`pattern(0.5)`

Good luck!
***
_This [challenge](https://www.codewars.com/kata/55733d3ef7c43f8b0700007c) comes from curious_db97 on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Harald Reingruber is embarking on a coding tour... and other things I learned recording his DevJourney
Tags: devjourney, career, learning, pairprogramming
Published: 2020-03-10 15:20:40

---
title: Harald Reingruber is embarking on a coding tour... and other things I learned recording his DevJourney
published: true
description: Harald Reingruber is a visual computing developer from Austria. After interviewing him for the DevJourney podcast, here are the key takeways I personally took out of the discussion.
tags: DevJourney, Career, Learning, Pair-Programming
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/1zguyfbjjddzeklf1xo3.png
canonical_url: https://timbourguignon.fr/devjourney91
---

This week, I published Harald Reingruber's #DevJourney story on my eponym Podcast: [Software developer's Journey](https://devjourney.info). Among many other things, here are my main _personal_ takeaways:

* Curiosity, is what brought Harald to computers. Understanding how they work, how to use them and bend them to one's will... mostly by breaking them and having to fix them afterwards is how he got hooked.
* Harald was/is very interested in visual programming, but not really for the design of it, more because of the visual feedback.
* Harald described the "test pyramid" i.e. having a lot of unit-tests at the bottom, less integration tests on top of that, and even less manual tests at the very top of the pyramid.
* When Harald left the Healthcare industry and joined a startup in Augmented-Reality. He loved the higher pace and drive for very fast results, but missed the (very) high-quality standards. After a while, he really got the feeling that saving on quality, brought only short term gains.
* That's when he started feeling that TDD and pair-programming could be cornerstones for his future. He learned more about it at CodeRetreats, and finally decided to go on a pair-programming tour in the USA in spring 2020 and hone those skill along the way.
* So far the planned stops on his journey are: San Diego, San Francisco, Portland and Vancouver.
* Stay tunes on his [Twitter](https://www.twitter.com/Harald3DCV) for more information while he is at it!
* Advice: "it's by talking to people that you can plan adventures like this one"

More quotes:
* _"I learned the most from the things that didn't go that well"_
* _"A huge number of integration tests are not a good idea, but semi-optimal tests are better than no tests"_

Thanks Harald for sharing your story with us!

{%user harald3dcv %}

You can find the full episode and the shownotes here:
* On [devjourney.info](https://devjourney.info/Guests/91_HaraldReingruber.html)
* Or directly [here on DEV](https://dev.to/devjourneyfm)

Did you listen to his story?

* What did you learn?
* What are your personal takeaways?
* What did you find particularly interesting?
Build Free Blog Page with Jekyll
Tags: beginners, tutorial, webdev
Published: 2020-03-10 15:13:06

Hi everybody, Firstly, I tell about what is <a href="https://jekyllrb.com/">Jekyll</a>? What should we use?


<a href="https://jekyllrb.com/">Jekyll</a> is a tool that allows us to create static web pages developed by Github with ruby. When we entered Jekyll's official website, we saw, "Transform your plain text into static websites and blogs." It is completely free and has a considerable number of users. Without further ado, I want to talk about how to install jekyll, how to make it work .

:dash:

<strong>NOTE: I use Debian 9, So I will make my narration on Linux operating systems.</strong>

<h2>Advantage/Disadvantage</h2>
<h3>+ :star:</h3> 
As with WordPress, you don't have to deal with plugins. You produce your content, Jekyll will do the rest. When you do not tire the server with the plugins and do not require a database on top, the sites you will create with Jekyll will be very high performance.

<h3>- :fire:</h3> 
 It is not so easy to install a plugin / theme with one click, as in WordPress platform, you should know a little technical information about HTML - CSS - JS-Ruby photos server configuration.


<h2>Install Jekyll :dizzy:</h2> 

If you want to use <a href="https://jekyllrb.com/">Jekyll</a>, you need to install ruby to the computer. 

```javascript

su // you need to be root on the system to install ruby

```
It will ask us for our system password. After entering, we press enter and continue.

```javascript

apt-get install ruby-full // installing ruby

exit // exit root.

```
After installing Ruby, we exit root mode with the <strong>exit</strong> command.

```javascript

gem install jekyll  // install jekyll

```

NOTE: The reason I passed these places quickly is that there is a lot of resources and documentation on the internet. If you get an error or encounter a problem, you can contact me on my social media accounts. I try to help as much as I can.

<h2>Create a Jekyll Project :boom:</h2> 

```javascript

jekyll new project_name // create project
	
cd project_name // go to project folder

jekyll serve // run project

```

We created our first project with the <strong>new</strong> command. Then we go into the folder where we created our project and run our project with the <strong>jekyll serve</strong> command.

![Bash](https://dev-to-uploads.s3.amazonaws.com/i/e350urm0crel426gcjff.png)

If we get an output like above, our site has been created and working successfully.
If we open our browser and enter <strong>localhost:4000</strong> in the address bar, our site will open.

![Bash 2](https://dev-to-uploads.s3.amazonaws.com/i/jsboco7o37avq9ewwk0v.png)

And our site is ready. In the next articles, I will explain what the folders in the project do, how to use a ready-made theme, how to publish it on github and how to use our own domain name.

If you are still here thank you for reading :)
Self-Education vs Remote Teacher vs On-Site Teacher
Tags: education, discuss
Published: 2020-03-10 15:03:46

---
title: Self-Education vs Remote Teacher vs On-Site Teacher
published: true
description: 
tags: education, discuss
---

What can a teacher do that...

- you can't talk to directly? (YouTube, FreeCodeCamp)
- you can talk to online/remote? (Remote University, code camps)
- is on-site with you for a few hours a week? (Regular university, apprenticeship)

I did all of these modes, but had the impression that teachers wouldn't focus on what they could do best when they talked to the students, but did many things that didn't require them to be there at all. Like wasting time with code examples, the students could very well do on their own so that not enough time was left to work on more important problems.

What do you think?
100daysofcode flutter
Tags: 100daysofcode, flutter
Published: 2020-03-10 14:48:36

Day 1/100 100daysofcode flutter,
Belajar Flutter , dari kursus Udemy 
 ,today about Flexible and FittedBox, semoga bisa menyelesaikan program ini.....

saya juga post di twitter, dan update di github
How should I start to write clean code?
Tags: frontend, cleancode
Published: 2020-03-10 14:47:21

---
title: How should I start to write clean code?
published: true
description: I've started writing code on a daily basis 4 months ago and I am struggling to get a clean flow of thinking and writing code.
tags: #frontend, #cleancode
cover_image: https://gustavomonteiro.pt/wp-content/uploads/2020/03/andreas-wagner-8H5kNkYmJYQ-unsplash-1.png
---

<!-- wp:paragraph -->
<p>I've started writing code on a daily basis 4 months ago and I am struggling to get a clean flow of thinking and writing code.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In order to write better code I need to think of a problem's solution before actually writing it. That solution should be very clear in my mind so that I don't struggle when I am coding.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This should be my first step: think about the problem and achieve a possible solution.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The next step is to write the code.  My code needs to follow the solution's "guideline" that I've come up with and should be as clear as possible. With this I mean the naming of the variables, functions, classes, etc. The flow of the code should represent that solution's thought process.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The next step should be to have clean code. Seperate code actions from general code. I should make functions to do a specific thing instead of doing a lot of things. It's better to have two or three extra functions than one function that has too many functionalities.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>I should also use native code to simplify the reading: for example, use map function whenever possible instead of complex for loops, use array pop function instead of writing a function my own.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Finally, after all of this work, the code should be reviewed either by me or  another person because I tend to be a little bit confusing, usually write more code than I need and there's also the need to catch any possible bugs.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p> Photo by <a href="https://unsplash.com/@4themorningshoot?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Oliver Hale</a> on <a href="https://unsplash.com/s/photos/clean?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p>
<!-- /wp:paragraph -->
---
CSS 3D shapes 
Tags: html, css, beginners, javascript
Published: 2020-03-10 14:44:16

## Welcome to the CSS 3D shapes folks 🐥


<br>

### Yes, you can
### But, _How ?_

> Lets see our Two examples down below

<br>

Lets make a **three dimensional shapes** just by some CSS3 properties.

<hr>

## 3D Cube 🥤

> Some basic HTML markup below :

```html
<body>

    <div class="container">
        <div class="cube"></div>
    </div>
    
</body>
```

> Now the real magic 🎃 happens with this CSS3 code below :

```css
  .container
    {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50% , -50%);
    }

   .cube
    {
        background: #dc2e2e;
        width: 100px;
        height: 100px;
        position: relative;
        margin: 50px;
    }

   .cube::before
    {
        content: '';
        display: inline-block;
        background: #f15757;
        width: 100px;
        height: 20px;
        transform: skewX(-40deg);
        position: absolute;
        top: -20px;
        left: 8px;
    }

   .cube::after
    {
        content: '';
        display: inline-block;
        background: #9e1515;
        width: 16px;
        height: 100px;
        transform: skewY(-50deg);
        position: absolute;
        top: -10px;
        left: 100%;
    }
```

### Uffff 😓
### Thats a lot of code...

**Atlast, you will see a cube like this 👇**

![3D cube](https://res.cloudinary.com/techlead/image/upload/v1583850798/Dev.to%20posts/a5mabmxoumuay18ffc0i.png)


<br>
<hr>

<br>


## 3D Pyramid 🔱

> Some basic HTML markup below :

```html
<body>

    <div class="container">
        <div class="pyramid"></div>
    </div>
    
</body>
```

> Now, magical CSS3 in action :

```css
  .container
    {
        position: absolute;
        left: 50%;
        top: 35%;
        transform: translate(-50px , -35px);
    }

  .pyramid
    {
        width: 100px;
        height: 200px;
        position: relative;
        margin: 50px;
    }

  .pyramid::before, .pyramid::after
    {
        content: '';
        display: inline-block;
        width: 0;
        height: 0;
        border: 50px solid;
        position: absolute;
    }

  .pyramid::before
    {
        border-color: transparent transparent #7700ff transparent;
        transform: scaleY(2) skewY(-40deg) rotate(45deg);
    }

  .pyramid::after
    {
        border-color: transparent transparent #5500b6 transparent;
        transform: scaleY(2) skewY(40deg) rotate(-45deg);
    }
```

**Pyramid will look like this 👇**

![3D Pyramid](https://res.cloudinary.com/techlead/image/upload/v1583850798/Dev.to%20posts/qa2kh7cyiej1t3t2aafq.png)

<hr>
<br>

# 🥂🥳 
## We did it, 3D shapes are looking 🔥

Thank you _**Devs**_ for hanging out.
Now, go & roll out your editors & make some ❄ shapes.
Till then see you in the next post 📮

Also do check my previous posts 
* [Center things in CSS 🎯](https://dev.to/mindset/how-to-center-things-in-css-2obo)
* [Top Developer Mindset 👨‍💻](https://dev.to/mindset/post-1-4kb0)


**Author:**
Instagram ➡ [_Jayesh.2112 💝_](https://www.instagram.com/jayesh.2112)
Twitter ➡  [_Developer_Codes 💙_](https://www.twitter.com/Developer_Codes)
New remote DEV jobs at Squire, iPresence, Ebury, and others
Tags: career, job, java, python
Published: 2020-03-10 14:43:47

Good day, DEV community! 👏🏼

It's Sergei from Meerkad community of remote job seekers with weekly updates.

During the period from March 2 to 8, I collected remote vacancies from popular job boards like Glassdoor, Flex Jobs, WeWorkRemotely, and others, as well as from Facebook, Twitter, and Reddit.

Here are the links for several job's categories:

Java – https://meerkad.com/remote-java-jobs
Python – https://meerkad.com/remote-python-jobs
Ruby on Rails – https://meerkad.com/remote-ruby-on-rails-jobs
All jobs for developers are here 👉🏻 https://meerkad.com/remote-developer-jobs

🙏🏻 Community is free and exists on donations. Support us on Patreon https://patreon.com/meerkad



Sergei
How to create an API endpoint query with Knex
Tags: knex, backend
Published: 2020-03-10 14:37:10

---
title: How to create an API endpoint query with Knex
published: true
description: How to find one single record with a User model in Knex 
tags: knex, backend
cover_image: https://ferrariwebdevelopment.s3.us-east-2.amazonaws.com/assets/20200102-find-user.jpeg
---

## Finding one single record with a User model in Knex

In the previous article we started working on a User model that we can use to make calls to the database, instead of making the calls directly in the route handlers.

We have created a user-model.js file that keeps all the database logic in one place, so it's easy to read and modify in the future.

In our user-model.js file we have started by creating a method to retrieve all the users. 
We then used this method in the router in this way:

```js
const users = await User.all();
```

Let's now create a method to find one single user by id. We'll call the method find and it's defined like this:

```js
// user-model.js

const find = id => {
  return db('users').where({id})
}
```

We then export the method:

```js
module.exports = {
  all,
  find
}
```

And we use it in the router:

```js
router.get('/:id', async (req, res) => {
  const { id } = req.params;  // extract id from params

  try {
    const user = await User.find(id)

    // ... code that returns the user ...
  } 
});
```

If we fire up our trusty REST client and test this endpoint, we should get our user back, right?

Let's send a GET request to localhost:4000/api/users/2. This is what we get back:

![Find user by id](https://dev-to-uploads.s3.amazonaws.com/i/34dwky5b6wsnv0z8cgce.png)

Well, we do get the user. Sort of.
What we didn't expect is to see the user wrapped inside an array. Why is it so?

The reason is that this Knex call:

```js
db('users').where({id})
```

returns an array of records. The array only contains one element, because that's the only record that matches the id provided.

The .where() method in Knex always returns an array of records because we could potentially have a where clause that finds multiple records.

In our case, we only want one single user, though, so we need to extract the record from the array somehow.

This is very easy because Knex provides a method called .first() that returns the first record from a query. We can simply attach .first() at the end of the query to return the single user:

```js
db('users').where({id}).first();
```

If we now test out the endpoint, we will get back a single user object:

![Find user by id](https://dev-to-uploads.s3.amazonaws.com/i/b21cv8vv7jdjqkgj9e41.png)
Hosting of AASA file in the case of wildcards in associated domains
Tags: ios, universallinks, aasa, objectivec
Published: 2020-03-10 14:31:14

If I am configuring my associated domains as *.example.com. Which all URLs should serve the AASA file, is hosting the file only in https://example.com/apple-app-site-association enough or should all subdomains like https://subdomain1.example.com/apple-app-site-association, https://subdomain2.example.com/apple-app-site-association return the file.

From an SO post I came to know that it is fetched only during install/update (ref: When is the apple-app-site-association file being fetched?)

But from my observation request for subdomain.example.com is fired on each and every click on the URLs. Even though the request fails multiple times it doesn't break the universal link functionality. But does this have any impact on the long run?

https://stackoverflow.com/questions/60525807/hosting-of-aasa-file-in-the-case-of-wildcards-in-associated-domains