teleren/devto huggingface dataset:
Should you take CS50?
Published: 2019-03-28 15:59:58

---
title: Should you take CS50?
published: true
description: There are lots of praises around the web on how CS50 is great, especially for people without prior computer science education. In this post I explain what are the stuff that intrigue me as a self-learner.
tags: 
---

There are lots of praises around the web on how [Harvard University's Introduction to Computer Science CS50](https://www.edx.org/course/cs50s-introduction-computer-science-harvardx-cs50x) is great, especially for people without prior computer science education. In this post I explain what are the stuff that intrigue me as a self-learner.

But before we go through the new things that I learned, I would like to help you answer, should you take the CS50 course? If there are some things below that you are not really familiar, or have heard but never tried it out and do it yourself, sure, CS50 is a great resource for that. On the other hand, if you are familiar and can explain what are these items below, I would recommend you to skip this course. 😁

Here are some of the items that is new to me that I learned and applied in CS50: 

1. Scratch
    - I have heard about scratch in the past, but not curious enough to try since it is always branded as a beginners tool to understand programming.  
    - When i was much younger, I played a lot of simple flash games on [Miniclip](https://www.miniclip.com), and one of it is 2D racing game like this.
![2d racing game](https://thepracticaldev.s3.amazonaws.com/i/h1s5hfhpofae5jgm4ouk.png)
    - So, I did this as my project for week 0([2D Racing Game](https://scratch.mit.edu/projects/237111313/)), it is not perfect, but I had fun. 


2. Sort algorithms and Big O 
    - Prior doing CS50, I can program a simple Python script to sort things in an list, but I found out it is actually called insertion sort and there are already a few other sorting algorithms.
    - There is also a metric that measure the time taken to solve as the items to be sorted becomes bigger which is Big O.


3. Reading files bit by bit
    - Now i understand what actually makes up the type of file. You cannot simply change a file type just by changing its file extension.
    - There are a few bits at the header of the files that contain information about the file and that what makes, for example, a .jpg file different than .png file.

4. Pointers, Linked List, Hash Tables
    - Appreciation on memory usage when running a program and what is the difference of heap and stack in memory.
    - Doing in programming in Python before, I do not really care about memory as I do not need to malloc and free memory. 
    - Also I can brag that I know how to do linked list in C. Yay.

From week 4 forward, most of it I have already read and do in the past so it is really smooth sailing from there. If you want to just skim through the syllabus , do check out the CS50 lecture notes [here.](https://cs50.harvard.edu/college/weeks/)
Chris Coyier on The Great Divide
Tags: javascript, webdev, career, podcast
Published: 2019-03-28 15:13:20

---
title: Chris Coyier on The Great Divide
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/0hoplo7ck0cocn4eekon.png
description: Chris Coyier joins Suz Hinton and Jerod Santo on JS Party to continue the discussion on The Great Divide in front-end-land
tags: javascript, webdev, career, podcast
---

> Two front-end developers are sitting at a bar. They have nothing to talk about.

[Chris Coyier](https://twitter.com/chriscoyier) joins [Suz Hinton](https://twitter.com/noopkat) and myself to continue the discussion on [The Great Divide](https://css-tricks.com/the-great-divide/) in front-end-land. We also use this as an opportunity to gush on how much [CSS-Tricks](https://css-tricks.com) has done for the community, get Chris' perspective on the history of the website, and finish up by sharing some _amazing_ Pens on [CodePen.io](https://codepen.io).

{% podcast https://dev.to/jsparty/the-great-divide-reprise %}

Get the show notes and transcript [on changelog.com](https://changelog.com/jsparty/67) ✊
What do you do, when you are stuck?
Tags: discuss, watercooler, problem, stuck
Published: 2019-03-28 15:05:07

---
title: What do you do, when you are stuck?
published: true
description: I pause and drink a cup of tea, what do you do?
tags: discuss, watercooler, problem, stuck
cover_image: https://thepracticaldev.s3.amazonaws.com/i/v6g8tm3bkdsvfbbe1hnu.jpg
---

I've been struggling with bug I've been trying to investigate now for over 24 hours. At this point, I need a break, so much so I'm considering going to the Gym, if you know me, you will know that is extreme.

![Gym Workout](https://thepracticaldev.s3.amazonaws.com/i/uf0vb64w22wnstcgzxgs.jpg)

This leads me to my semi-serious question, what do you do when you get stuck?


If I get stuck for a short amount of time on something, I make a cup of tea. Maybe watch a few minutes of a show on Netflix and let my mind wonder.

But now I'm stuck for a little longer - what should I do? Of course part of the answer is ask for help, and I am. But I'm thinking more about tactics other people use to break down problems I might be missing.

Your input is most welcome! Please comment below.
Vs Code Tab By Number
Tags: vscode
Published: 2019-03-28 19:35:54

---
title: Vs Code Tab By Number
published: true
tags: [vscode]
canonical_url: https://scottw.com/vs-code-tab-number
---

One of the things that trips me up with VS Code is my muscle memory for switching tabs with ⌘ + number. I used this often with Atom and I am pretty sure I picked it from Sublime and/or Textmate.

<!--more-->

Digging through the existing bindings, you can do this today with ⌃ + number. What makes this worse for me, ⌘ + 1, ⌘ + 2, etc do something today, but I am honestly not sure what it is. :)

There is an Atom commands plugin, but I do not need (or want) everything that comes with it. Instead, I went ahead and edited the following keybindings (under workbench.action.openEditorAtIndex).

![Tabs by Number Bindings](https://scottw.com/assets/images/posts/tab_by_number.png)
Spring Boot Developer Tools: How to enable automatic restart in IntelliJ IDEA
Tags: springboot, intellij, gradle
Published: 2019-03-28 14:51:44

---
title: Spring Boot Developer Tools: How to enable automatic restart in IntelliJ IDEA
published: true
description: 
tags: Spring Boot, IntelliJ, Gradle
---

This blog post describes how we can automatically restart our applications using the Developer Tools of Spring Boot. After we have finished this blog post, we:

* Understand what features the Developer Tools have and how Automatic Restart supports our application development.
* Can integrate IntelliJ IDEA and the Automatic Restart feature from the Developer Tools.

Let's get started.

## Automatic Restart

The Developer Tools, which are provided as a module for the Spring Boot framework, are a module that can make application development experience much better.

The Developer Tools are consist of five features:

1. Property Defaults
2. Automatic Restart
3. LiveReload
4. Global Settings
5. Remote Applications

Among the features above, the thing that gives a more significant speed impact for our development process is the second one -- Automatic Restart. Applications that use this restart automatically whenever files on the classpath change by monitoring a modification of the files in the folders such as ./out or ./build.

Installation of the Developer Tools is quite simple; add the following one-liner into the `dependencies` directive of our build.gradle.

```
dependencies {
    ....
    runtimeOnly 'org.springframework.boot:spring-boot-devtools'
        ...
}
```

## Integration IntelliJ and the Developer Tools

However, by only adding the one-liner above, the Developer Tools doesn't automatically restart our application yet. We need to complete two steps additionally.

First, we have to enable build project automatically. Open Preferences.../Settings... -> Build, Execution, Deployment -> Compiler and allow Build project automatically.

![](https://thepracticaldev.s3.amazonaws.com/i/y88li2t3kevif1mqjmyf.png)

Second, we change Registry configuration. Press command+shift+A (if you are using Windows press Ctrl+Shift+A), and search for Registry. 

![](https://thepracticaldev.s3.amazonaws.com/i/y2d09z4neqdtrlbjzfy8.png)

In the Registry, scroll the list to find the following configuration and enable it:

```
compiler.automake.allow.when.app.running
```

![](https://thepracticaldev.s3.amazonaws.com/i/443dy5jgizopmgm09qc1.png) 

By finishing the two steps above, we are now able to develop our application without manual restart.

Finally what must be noted is how to start the application. The application must be started by running `main` function instead of the Gradle task `bootRun`.

![](https://thepracticaldev.s3.amazonaws.com/i/nwo8i3bqp43ig06l6toz.png)

## Summary

This blog post has taught us two things:

* We learned what features the Developer Tools have and how Automatic Restart supports our application development.
* We learned how to integrated IntelliJ IDEA and the Automatic Restart feature from the Developer Tools.
php artisan migrate
Tags: help, php
Published: 2019-03-28 14:28:41

I was asked to create a CRUD APP with Laravel and Mysql from a potential employer but I'm getting an error when I run: <pre>php artisan migrate</pre> I've read all links on the first page of **Google** and **Duckduckgo** already but I couldn't find the answer to my problem. 

The errors when I run **php artisan migrate** is:

 <pre>Illuminate\Database\QueryException  : SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = Laravel-tasks and table_name = migrations)

  at /Users/my_username/PHP/todo/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
    660|         // If an exception occurs when attempting to run a query, we'll format the error
    661|         // message to include the bindings with SQL, which will make this exception a
    662|         // lot more helpful to the developer instead of just the database's errors.
    663|         catch (Exception $e) {
  > 664|             throw new QueryException(
    665|                 $query, $this->prepareBindings($bindings), $e
    666|             );
    667|         }
    668|

  Exception trace:

  1   PDOException::("PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]")
      /Users/my_username/PHP/todo/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70

  2   PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=Laravel-tasks", "root", "YGM4QV6kWnjz3uN!", [])
      /Users/my_username/PHP/todo/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70</pre>

This is the command line I executed inside my project folder<pre>php artisan make:migration create_tasks_table</pre>

This is the code on the create_tasks_table.php: 
<pre>

<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;


class CreateTasksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tasks', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('title');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('tasks');
    }
}
</pre>

The Database on the .env is: 

<pre>DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=Laravel-tasks
DB_USERNAME=root
DB_PASSWORD=*****</pre>

Hoping for your experienced responses!

Cheers!
Joel is stepping down from Stack Overflow
Tags: news, discuss
Published: 2019-03-28 14:23:51

{% twitter 1111267189133316097 %}

This marks the end of an era in a lot of ways. Joel Spolsky's influence on software development can't be understated. Stack Overflow is a huge company with lots of decision makers, so things will carry along without him.

In the post, he acknowledges that Stack will have to keep evolving

> The type of people Stack Overflow serves has changed, and now, as a part of the developer ecosystem, we have a responsibility to create an online community that is far more diverse, inclusive, and welcoming of newcomers.

It's pretty interesting to make this announcement without a successor named.

> It will not be easy to find a CEO who is the right person to lead that mission. We will, no doubt, hire one of those fancy executive headhunters to help us in the search. But, hey, this is Stack Overflow. If there’s one thing I have learned by now, it’s that there’s always someone in the community who can answer the questions I can’t.

Thoughts?
Static Portfolio with dynamic content
Tags: help, portfolio, beginners, python
Published: 2019-03-28 13:55:44

---
title: Static Portfolio with dynamic content
published: true
tags: help, portfolio, beginners, python
---

Hello everyone,

a couple of weeks ago I found a site https://jschr.io and I really wanted to build something like this myself. The author wrote a blog post about his way of doing things. But it involves JS, AWS and some more stuff I really don't want to use. So here is my question:

Can anybody help give me advise on how to build a static site with dynamic content like latest toots, blog posts, and some more stuff? I would like to use Shell Scripts or Python and everything should be selfhostable. No cloud stuff.

Thanks for any help :D
A simpler way to understand time complexity in algorithms
Tags: algorithms
Published: 2019-03-28 13:16:45

---
title: A simpler way to understand time complexity in algorithms
published: true
description: Understanding time complexity through data structure and an analogy 
tags: algorithm
---

## Understanding it with array and object as a data structure

Let's analyze time complexity for finding a value from a data structure,

Suppose a data structure would be an array. So to find a value in array, you might have to traverse through array to find a value. 


``` Worst time complexity : O(n) ```
``` Best time complexity : O(1) ```

Here `O(n)` means it will iterate through all elements in an array of size `n`. `O(1)` in a nutshell, means regardless of size of array(i.e. input provided), we can find value on one attempt.


Instead if a data structure would be an object or hashmap, we could find value directly by knowing it's key assigned to it. So here time complexity would be constant as O(1)
``` Time complexity : O(1) ```

![https://thepracticaldev.s3.amazonaws.com/i/oeme0iej2su7s4yzwv67.jpg](https://thepracticaldev.s3.amazonaws.com/i/oeme0iej2su7s4yzwv67.jpg)

## Operations in an Array
INSERT (PUSH): Insert operation in array would take `O(1)` runtime to push data into array as it knows it has to push at last index of an array.

DELETE (POP): It's best runtime would be same as insert operation it will take `O(1)` if we want to delete from beginning or at the end of the collection. 

But if we want to delete item in middle of the collection, it's runtime would be `O(n)`

## Analogy for it!

A lot of students get confused while understanding the concept of time-complexity, but in this article, we will explain it with a very simple example:

Imagine a classroom of 100 students in which you gave your pen to one person. Now, you want that pen. Here are some ways to find the pen and what the O order is.

O(n2): You go and ask the first person of the class, if he has the pen. Also, you ask this person about other 99 people in the classroom if they have that pen and so on,
This is what we call O(n2).

O(n): Going and asking each student individually is O(N).

O(log n): Now I divide the class into two groups, then ask: “Is it on the left side, or the right side of the classroom?” Then I take that group and divide it into two and ask again, and so on. Repeat the process till you are left with one student who has your pen. This is what you mean by O(log n). 

That's it, thanks for reading guys!
How to replicate a React component lifecycle with useEffect
Tags: javascript, react, beginners
Published: 2019-03-28 12:18:43

---
title: How to replicate a React component lifecycle with useEffect
published: true
description: But now you might be scratching your head and asking yourself, "How do I emulate a React component lifecycle?" Don't worry, in this article will go over it.
tags: javascript, react, beginners
canonical_ur: https://blog.linguinecode.com/post/getting-started-with-react-useeffect
cover_image: http://live-linguine-code.pantheonsite.io/wp-content/uploads/2019/03/React-feature-imgs.jpg
---

This article has been moved to [Linguine Blog](https://blog.linguinecode.com/post/getting-started-with-react-useeffect)
Learn Fast by Contributing to an Open Source Project
Tags: challenge, opensource, aspnet, webdev
Published: 2019-03-28 12:14:32

---
title: Learn Fast by Contributing to an Open Source Project
published: true
description: 
tags: #challenge #opensource #aspnet #webdev
---

Did you know how great developers are enhancing them to learn and contribute to new technologies?

They follow only 5 steps:

1. explore an open source project at github, 
2. create fork (your own branch), 
3. make changes on the project on whatever you think requires improvement
4. submit a pull request 
5. If your changes are good, project leaders will incorporate your changes in the original project (for this step you don't have to do anything but ☺).

Even if your pull request is not accepted right away, through the pull request message board, you'll continue learning about how you can enhance your idea and coding skills to fit with a certain standard. 

Starting to contribute to a large open source project can be very challenging, as usually these projects involve long effort to understand the code and complex contribution process.

Start contributing to a small open source instead.

For example, you can start experimenting open source contribution with relatively small project like EISK, which is available in github now! 

Check cool features available in asp.net core implemented at EISK and feel free to create fork and submit pull request with your suggested updates.

We look forward for your pull requests.

Visit: [eisk web api](https://github.com/eisk/eisk.webapi)


Happy coding!
Deep Learning is officially "a critical component of computing" 
Tags: ai, machinelearning
Published: 2019-03-28 11:35:56

---
title: Deep Learning is officially "a critical component of computing" 
published: true
description: 
tags: ai, machinelearning
---

according to Turing Award committee

https://www.bbc.co.uk/news/amp/technology-47721129
2 Months of blogging: Why do you blog? How often? How long do you take?
Tags: discuss, writing, learning, motivation
Published: 2019-03-28 10:00:30

---
title: 2 Months of blogging:  Why do you blog? How often? How long do you take?
cover_image: https://thepracticaldev.s3.amazonaws.com/i/vsaybqjtkdkws1ls4qei.jpeg
published: true
description: some reflections after 2 months of blogging
tags: #discussion, #writing, #learning, #motivation
---
I was blogging a lot in the past for different topics:  books, music, parenting and when I was younger, **generic rants about the world**. 
> But I never dared to blog about programming. 

Actually, I tried once more than 10 years ago, but after choosing the name and the layout on WordPress I never wrote an article... I really did not feel like I was good enough to give anyone advice.

My perception was that **if you are going to write about something** - then you must know the shit! **you must be the super expert on the topic**, donating your immense knowledge to the ignorant masses... 
![let me hit you with some knowledge](https://media.giphy.com/media/TI32JwHmWQEi4/giphy.gif)
Therefore I quit immediately.

Then I read about GaryVee's theory **"Document - don't Create"** by [GaryVee](https://www.garyvaynerchuk.com/creating-content-that-builds-your-personal-brand/) and found, right here on Dev.To, this post:  [5 reasons you should write that blog post](https://dev.to/kaydacode/5-reasons-you-should-write-that-blog-post-24iband)
Even though over these years I definitely increased my experience and skills I still don't think I am an expert but I was convinced that
>  I should **document my learnings and at the same time share my tricks and tips**. 

The fact that I had my Trello board full of **new years-resolutions** about sharing knowledge ( with __public speaking, opensource and writing__) gave me the jump start to open the blog on 28th of January.

So far I managed to write at least 1 post a week.  My plan is to stick to this - not more not less than 1 post a week. Be it some kind of "philosophical" post about programming and career or some quick tip of code refactoring, I saw that writing a post take quite some time and I always feel I should do something more productive. 

What i really like of blogging is, especially for more technical posts ( still too few) I noticed that organizing the post allows me to try out different options, **reorganize my thoughts and definitely consolidate my knowledge**. 

What I found sometimes discouraging is seeing that after some hours spent writing a post, you receive just a handful of views. 
![nobody is reading this](https://media.giphy.com/media/3o7TKFVdkgZQ9N3FJu/giphy.gif)

How do you organize your writing? How long do you take to write your avarage post?
How do you deal with the frustration if your post does not have the deserved success? ;-)
What role can the IoT technology play in the hospitality industry? 
Tags: iotdevelopment, iotsolutions
Published: 2019-03-28 09:30:25

---
title: What role can the IoT technology play in the hospitality industry? 

published: true

description: The use of iot in hospitality industry also allows hotels to deploy their human-staff for important customer engagement tasks instead of letting them manage something that can be taken care of by automation. Using IoT powered tools and mobile apps can ensure excellent customer experience and avoid negative interferences by employees. Engaging a limited number of human-staff also helps in reducing operating costs for the hotel.

For more Details :- visit : https://www.smartsight.in/technology/what-role-can-the-iot-technology-play-in-the-hospitality-industry/

tags: IOT Development,IoT Solutions
---
Tips to Improve MySQL Query Performance
Tags: mysql, rdbms, relationaldatabase, opensource
Published: 2019-03-28 09:01:48

---
title: Tips to Improve MySQL Query Performance
published: True
description: Read here the tops to improve MySQL query performance.
tags: MySQL, RDBMS, Relational Database, Open Source
---
MySQL is the most popular open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL).  
A single poorly-designed SQL query will pose a significant threat to the overall performance of your application. Therefore, optimizing query performance is essential. MySQL comes with tools that help us in the optimization of queries. Read here the most important and useful tips to improve MySQL Query for speed and performance.
https://www.bridge-global.com/blog/tips-to-improve-mysql-query-performance/