teleren/devto huggingface dataset:
Heeft het zin om Ruby te leren? (Dutch)
Tags: ruby, rails
Published: 2019-11-06 16:59:27

<a href="https://rubyonrails.org/">Ruby (en Rails)</a> is niet zo gehypet als enkele jaren geleden. Maar dit betekent niet dat het niet langer populair/gebruikt is.

Het probleem vandaag de dag is dat mensen één ding willen leren en het dan voor altijd willen gebruiken. Bedenk wie er nu Cobol of Fortran gebruikt. Een programmeertaal is slechts een hulpmiddel.

<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Ruby_On_Rails_Logo.svg/220px-Ruby_On_Rails_Logo.svg.png">

## wordt Ruby vandaag gebruikt?

Ruby wordt gebruikt door duizenden ontwikkelaars en bedrijven, dus het is zinvol om het te gebruiken. Bestaande systemen in Ruby moeten worden onderhouden. Dit geldt voor elke taal.

Denk aan WordPress, het wordt nog steeds gebruikt en is een populair Content Management Systeem (CMS). Het is meer dan tien of twintig jaar geleden gemaakt in PHP. Dit moet worden onderhouden, ook al is PHP niet meer zo populair als het ooit was.

Gewoon door een kijkje te nemen in de <a href="https://dev.to/t/ruby">Ruby sectie</a> laat zien dat Ruby nog steeds gebruikt en besproken wordt. Er zijn ook <a href="https://www.rubyjobs.com/">veel opdrachten</a> waarbij Ruby geprogrammeerd wordt.

## waar is Ruby populair?

Is Ruby populair in jouw land? Hier zijn enkele gegevens over de populariteit van Ruby. Ruby is het populairst in deze landen:

* Verenigde Staten
* China
* Brazilië
* India

De VS en China hebben ongeveer evenveel populariteit als China. In Europa is Ruby niet populair, in tegenstelling tot Amerika en Azië. Dus mocht je hierheen willen, dan heeft het zin om Ruby te leren ;)

<img src="https://thepracticaldev.s3.amazonaws.com/i/br142lohjp9o7osdtx1p.png">


**Meer over Ruby**
* <a href="https://ruby-lang.co/">Ruby tutorial</a>
* <a href="https://rubyonrails.org/">Ruby on Rails</a>
* <a href="https://www.ruby-lang.org/en/">Download Ruby</a>
Intro To Web Development
Published: 2019-10-21 06:25:15

This week was mostly seeing the complete picture of this wonderful and extensive field, that we will have as a Web Developer.

I can't even explain how great and invaluable it is for a totally new person in this field, to meet such professional people, dedicated and passionate about what they do. They showed me that even with our complications and limitations, everything is possible. That the level of knowledge doesn't really matter to start. It can take time, and even starting from zero, you can achieve each one of your goals. That achievement will depend only on you, on your time, and the passion for what you do.
They opened my eyes to a world that I didn't even know existed.

Is is here that you can enjoy pure creativity and the flow in it will be amazing. There is always something to improve, to create, to learn...

Each one of these wonderful people has made me confirm that our victory is never to give up, and improve every day. We are our best challenge to achieve...
It was definitely a week of great learning. I would like to share some interesting things that you'll find, or need being a Web Developer:
    **You can create whatever you want. Can you imagine being able to move your ideas from your brain to your computer? All you need is your creativity. It's fascinating to know that you can create something from nothing.
    **It is definitely not boring at all. Every day can be completely different and interesting. It can be frustrating sometimes but it will be fun also.
    **You will become more creative and you will exercise your mind and your logic in a way you didn't before.
    **Your learning will be constant and you will have many resources to do i efficiently.
    **You don't need formal education but you really need to be self-taught. That will be the most important tool to become the Web Developer you want to be.
    **Your training and preparation is going to be constant.
    **You will probably feel at some point, that you are not able to do something, but you will do it. That will make you grow and you'll feel pure satisfaction.
    **Gratification will be an important part of your journey. You should celebrate all your achievements, even if they are small.
    **Every single thing you learn will be useful at some point in your path, value them.
    **This is the field with more projection and versatility, the one with less unemployment.
    **The world needs Developers!
Private Jet Charter Services
Tags: private, travel, luxury, aviation
Published: 2019-11-06 16:34:08

<a href="https://www.aircharteradvisors.com/">Air Charter Advisors</a> is a Wyvern-certified charter company with global private jet charter services available on-demand since 2012. Safety is our #1 priority – we like two engines and two pilots, and we stick to pilots with thousands of hours in type. We don’t aim to be the cheapest option. We aim to be the best option. We take more of a consultative approach rather than trying to get signed paperwork. Our goal is to form relationships with clients so they have a company they can call for all their future flights - we’ll even tell our new & existing clients to go with more competitive options as long as the operations are legitimate. That said, our rates are very competitive and super aggressive; we often blow away other charter quotes. Every aircraft and operator is accredited for safety and VIP service levels, and our expert team can find the best deals for your private flights.
Failed: Type X is part of the declarations of 2 modules: AppModule and DynamicTestModule
Tags: angular, jasmine, typescript
Published: 2019-11-06 16:15:13

When writing Jasmine tests, the message above is common. The failed test looks like this:

![failed test case](https://thepracticaldev.s3.amazonaws.com/i/rxz6wmg1mb7qm86ab1op.PNG)

**Root Cause**

AppModule already declares the component under test!

![rootcause](https://thepracticaldev.s3.amazonaws.com/i/c1p5gmg0z8e8h218xgw9.PNG)

**Resolve**

Remove the declaration in the jasmine file; shown below:
Same test as shown above, with missing 2nd declaration.

![solution](https://thepracticaldev.s3.amazonaws.com/i/dpptar89k1ocjf8nz7e5.PNG)

Easy right?


JWP2019
Rock Paper Scissors in Python
Tags: python, beginners, project
Published: 2019-11-06 16:12:51

Game Rules:
If user_1  and user_2 have same choice there is a TIE.
If choices are Paper and Scissors, Scissors wins.
If choices are Paper and Rock, Paper wins.
If choices are Rock and Scissors, Rock wins.

This small project will help you improve your basics such as loops, nested if...else, variables, random module.

So, guys are you ready to create Rock Paper Scissors using Python. So let's start.

First, we will import the Random module in python.

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

Now, we will use the while loop to take input until the user wants to play.

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

Let's take input from the user using input() function in python. Then create the computer choice using randint() function from the Random module.

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

Now, we will convert the computer's input from 1, 2, 3 into 'p', 'r','s'.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/6x5co275r08wm07ewqjl.PNG)

Now, compare the user choice with computer choice using nested if...else. And if both choices are same there is a tie.


![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/8x278tdd1nv0cfpd21pa.PNG)

Now, take input whether the user wants to play again if no then break the loop.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/2vdi5k8f6nm9sqx6l0go.PNG)

So, that's it you are ready to play. If you enjoyed, do comment. If you have any doubt feel free to ask.
Should I stop learning Ruby since it's no longer popular?
Tags: ruby, programming
Published: 2019-11-06 16:11:54


<a href="https://rubyonrails.org/">Ruby (and Rails)</a> is not as hyped as a some years ago. But, this does not mean that its no longer popular/used.

The problem today is people want to learn one thing and then want to use it forever. Consider who is using Cobol or Fortran now. A programming language is only a tool.

<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Ruby_On_Rails_Logo.svg/220px-Ruby_On_Rails_Logo.svg.png">

## is Ruby used today?

Ruby is used by thousands of developers and companies, so it makes sense to use it. Existing systems in Ruby need to be maintained. This goes for any language.

Consider WordPress, it's still used today and is a widely popular Content Management System (CMS). It's made in PHP over a decade or two ago. This needs to be maintained, even though PHP is not as popular as it once was.

Just by taking a look at the <a href="https://dev.to/t/ruby">Ruby section</a> shows you that Ruby is still used and talked about. There are also <a href="https://www.rubyjobs.com/">plenty of jobs</a> that involve Ruby programming.

## where is Ruby popular?

Is Ruby popular in your country? Here is some data on Ruby popularity. Ruby is most popular in these countries:

* United States
* China
* Brazil
* India

US and China have about an equal rank in terms of popularity. In Europe Ruby is not popular, in contrast to the Americas and Asia. (data from similarweb)

<img src="https://thepracticaldev.s3.amazonaws.com/i/br142lohjp9o7osdtx1p.png">


**More on Ruby**
* <a href="https://ruby-lang.co/">Ruby tutorial</a>
* <a href="https://rubyonrails.org/">Ruby on Rails</a>
* <a href="https://www.ruby-lang.org/en/">Download Ruby</a>
Run TortoiseGit from the command line or phpstorm
Tags: git, tortoisegit, bat
Published: 2019-11-06 16:08:36

---
title: Run TortoiseGit from the command line or phpstorm
published: true
description: How the run tortoisegit from cli or phpstorm with a small helper bat file.
tags: #git, #tortoisegit, #bat
cover_image: https://thepracticaldev.s3.amazonaws.com/i/qi68sd8tc50ngc33slx4.jpg
---
put a file called `tgit.bat` in a `bin` folder which is in your path with the following content:
```
@ECHO OFF
rem https://tortoisegit.org/docs/tortoisegit/tgit-automation.html
rem gitk 
rem https://ayende.com/blog/4749/executing-tortoisegit-from-the-command-line
rem https://stackoverflow.com/questions/4562210/how-to-open-the-tortoisegit-log-window-from-command-line
rem https://stackoverflow.com/questions/357315/get-list-of-passed-arguments-in-windows-batch-script-bat/382312

IF NOT "%~1"=="" GOTO PARAM_COMMAND

:DEFAULT_COMMAND
rem if no command is passed via parameter, fallback to "commit" as default command
TortoiseGitProc.exe /command:commit /closeonend:0
GOTO EXIT

:PARAM_COMMAND
rem as having command passed via parameter, use this as command
TortoiseGitProc.exe /command:%~1 /closeonend:0

:EXIT
```

`tgit` will start the commit gui of tortoise git (same as running `tgit commit`)

`tgit log` will show to history screen

list of all commands can be found here: https://tortoisegit.org/docs/tortoisegit/tgit-automation.html#tgit-automation-basics

links:
- cover image by wnantes https://pixabay.com/illustrations/hello-world-computer-programmer-1333103/
- https://tortoisegit.org/
3.2 How to take User input in python
Tags: python, beginners, webdev
Published: 2019-11-06 16:05:49

{% link https://dev.to/mohit355/3-1-string-concatenation-4ejj %}{% link https://dev.to/mohit355/2-3-variables-in-python-2264 %}
##User input
1. Developers often have a need to interact with users, either to get data or to provide some sort of result.
2. When you write a program sometime we need to give input from keyboard or any input device.
3. Python provides us with two inbuilt functions to read the input from the keyboard.

**a). raw_input(prompt)
b). input(prompt)**
#### raw_input() function
1. This function works in older version (like Python 2.x). This function takes exactly what is typed from the keyboard, convert it to string and then return it to the variable in which we want to store.
2. If you entered any number then these numbers also converted into string.

#### input() function
1. This function first takes the input from the user and then evaluates the expression, which means Python automatically identifies whether user entered a string or a number or list.
2. If the input provided is not correct then either syntax error or exception is raised by python.
3. Example : **x=input("What is your name: ")** Here, 'x' is a variable which will get the value, typed by user during the execution of program.
4. command written in the double or single quotes inside the input function is printed as it is on the screen as shown below.![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/7fa26jss1nalo8yry6wz.png)Here you can see that program will print 'What is your name:' and waiting for the user to input the value.
5. Program execuation will stop until user not given any input![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/5elo6g052363w6ut160x.png) Here user enter the name. And this name value is stored in the variable 'x'.
6. After giving the input hit enter button so that program continue their execution.
7. Let's check whether x assigned the same value (user input) or not for this we use [print function](https://dev.to/mohit355/python-basics-3cjd).
Example : print(x) and we get the same output that the user input.![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/j5nbzygwdb5gkwzrk62m.png)

This is this simple way to take input from the user directly. you may take a list as an input. these all are discussed in upcoming posts.

If you have any problem regarding any topic till discussed in this series please let me known in the comment box.

Thank You.....
Ruby is for Rails, Spring is for Java, Micro is for Go
Tags: microservices, go, programming, framework
Published: 2019-11-06 15:15:48

---
title: Ruby is for Rails, Spring is for Java, Micro is for Go
published: true
description: Micro is a framework for Go based microservices development
tags: microservices, golang, programming, framework
---

Hey all

Just wanted to share [Go Micro](https://github.com/micro/go-micro) with everyone as we approach the 10k star mark on GitHub. It's been a 4+ year journey and we're now moving on to building a global shared cloud platform to enable services development without the hassle of managing infrastructure (learn more in the [network doc](https://micro.mu/docs/network.html)).

Look forward to the feedback and if anyone wants to join us we're on Slack, 2k+ members :) [micro.mu/slack](https://micro.mu/slack/).

Cheers
Asim
Daily Challenge #109 - Decorate with Wallpaper
Tags: challenge
Published: 2019-11-06 15:10:12

---
title: Daily Challenge #109 - Decorate with Wallpaper
published: true
series: Daily Challenge
description: John struggles to do wallpaper algebra. 
tags: challenge
---
John wants to decorate his room with wallpaper. He's heard that having the right amount of wallpaper can be trickier than it sounds. He'd like a fool-proof way to get it just right. 

John is measuring his room by length *l*, width *w*, and height *h* in meters. The rolls of wallpaper John purchased has a width of 52 centimeters. The length of a roll is 10 meters. Bear in mind however, that it is best to have an extra length of wallpaper handy in case of mistakes. John wants to buy 15% more wallpaper in length than he needs to account for miscalculations. 

Write a function `wallpaper(l, w, h)` and return a plain English word in lower case the number of rolls he should buy.  All rolls will be put edge to edge, with no space leftover. The number of rolls will always be less than or equal to 20. 

Examples:
`wallpaper(4.0, 3.5, 3.0)` should return `"ten"`
`wallpaper(0.0, 3.5, 3.0)` should return `"zero"`

Tests:
`wallpaper(6.3, 4.5, 3.29)`
`wallpaper(7.8, 2.9, 3.29)`
`wallpaper(6.3, 5.8, 3.13)`
`wallpaper(6.1, 6.7, 2.81)`

Good luck!
***
_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!_
HOW TO: GROWTH MINDSET with Carmen
Tags: javascript, typescript, techtalks, podcast
Published: 2019-11-06 14:52:44

Hello Hackers! We've got a special one for you today. Carmen Popoviciu shares how she hacked a growth mindset to avalanche her career in software engineering. She aims to promote emotional health in the workplace. Carmen discusses her thoughts about the 10X Engineer, what are yours? Comment below! Watch the video to find the answers to your doubts. 

WATCH THE FULL VIDEO ON YOUTUBE
➡️https://youtu.be/YzNSTGCJqJI

📺SUBSCRIBE To Our Channel and Get More Great Tips
http://bit.ly/Subscribe2Hackflix

🔥 PREVIOUS VIDEO • PODCAST ON UX/UI DESIGN, FRONT-END DEVELOPMENT & DESIGN SYSTEMS→ https://www.youtube.com/watch?v=5b6m7ipyAhI&t=54s 🔥

➡️Share this Video:
https://youtu.be/YzNSTGCJqJI


➡️ Ever wanted to learn about the tech industry and software engineering? Hackflix is your HACK to learning the tips and tricks, motivational stories and educational podcasts to guide you for your future in the industry. We aim to learn, inspire and share! So what are you waiting for? Check out all of our latest videos on https://hackflix.dev/

✅Make sure to Like, Favourite and Share this video and Subscribe if you haven't done so already at: https://bit.ly/Hackflix

🎬Watch our BRAND NEW series! Teach Me Anything in Less than 10 minutes!:

➡️Event loop in JavaScript & Web Workers
https://www.youtube.com/watch?v=zf6N5OcfxnU&t=11s

➡️Scaling Systems And Organising Teams
https://www.youtube.com/watch?v=HDMnUeX7pvU&t=18s

// Other Great Resources:
https://hackflix.dev/

⬇️Tweet us a Question!
https://twitter.com/hackflix_dev

👤Connect with us:
https://www.facebook.com/hackflix.dev
https://www.instagram.com/hackflix.dev
https://twitter.com/hackflix_dev
https://www.linkedin.com/company/hackflix

& For our developers out there:
https://dev.to/hackflix_dev
Core Data vs. SQLite
Tags: swift, ios, beginners
Published: 2019-11-06 14:28:42

Making an iOS application is all fun until you have to start maintaining offline user sessions and preferences on the app. Then comes the age old question.

Core Data/SQLite or something else?

So I want to share some of my insights on the topic.

Let’s start with **Core Data**,
* Graph framework for maintaining objects and their relationships with each other.
* Stores its data into a SQLite DB but is not a database in itself.
* Manages and updates objects automatically in the memory. Can handle a complex graph of objects without any pressure/load on the memory management system of the device.
* Has object versioning system in place which lets you update the object entities and attributes without deleting the previous data.
* Is an Apple created framework, so is automatically updated with any updates in Swift.
And now for SQLite,

**SQLite** is a persistent database model, which make a database and stores it in the file management system of your phone’s application.
* It could be used for more lightweight models since its memory management will be dependent on the CocoaPods or Frameworks that have been used.
* SQLite Pods or third party providers are easier to use and easier to grasp.
* Can be created and updated just by writing a few custom queries.
There are many Pods for SQLite in the market but one of the most popular and most stable is SQLite3.

There are pros and cons to both the frameworks and it all depends upon your requirements. 
If you have enough time to configure a data persistence system, do dig into the Core Data option too.

There is another newer and faster option on the internet called [_Realm_](https://realm.io/products/realm-database). I can’t really comment on it since I haven’t worked with it. It supports most platforms like Android, Swift, ObjC as well as React Native.

Since there are not many Getting Started with Core Data tutorials that I have come across, So I will be making one myself!
Fault-Tolerance: An NPM Package to Format and Normalize Errors
Tags: showdev, node, codequality, javascript
Published: 2019-11-06 14:45:07

Developers don't spend enough time thinking about their errors. I see too many projects that `throw Error('invalid data')` or even worse `throw 'invalid data'` 😱. That isn't useful! Give me some context, bud.

But we (myself included) aren't usually thinking about the failure case. We are thinking about the solution and (at best) are simply guarding against some bad input. That needs to change. Errors need context to be useful. String interpolation isn't good enough - it still requires thought. An error databag is what we need.

So when I was tired of seeing less than helpful errors at work, I set out to create something that was effortless to use, and would make log messages incrementally better. What I ended up with is a project I am calling [ Fault-Tolerance](https://www.npmjs.com/package/fault-tolerance). The concept behind it is trivial - extend the default Error object to format the output better.

In the most basic example you can `throw new Fault('Move along')`. In reality, though, that kind of error isn't as helpful as you want. Errors have context and we don't want to lose that. 

```
function checkpoint(droids:[]){
  try{
    droids.forEach(d => {
      if(isWanted(d)) {
        if(jediIsPresent) {
          throw new Error('These are not the droids you are looking for');
        }
        detain(d);
      }
    })
  }
  catch(e) {
    // a Fault will preserve the original stacktrace
    throw new Fault(e, {droids: droids});
  }
}
```

The output from that would look like:
```
Error: These are not the droids you are looking for
    at ......
    at ......
    at ......
metadata:
{
  "droids": [
      {
       "name": "R2D2",
       "owner": "Skywalker",
       "purpose": "astromech"
      },
      {
       "name": "C3PO",
       "owner": "Skywalker",
       "purpose": "comic relief" 
      }
  ]
}
```

This gives you a much better way to include additional information with the added benefit of a consistent log format. 

Check out the [Fault-Tolerance](https://gitlab.com/joekaiser/fault-tolerance) on Gitlab for more examples. It is also available as an [NPM package](https://www.npmjs.com/package/fault-tolerance).

Photo by Pankaj Patel on Unsplash
Handle CORS in Angular 9|8 with Proxy Configuration
Tags: angular, handlecors, angular98withproxy, angular98
Published: 2020-01-31 21:05:16

---
title: Handle CORS in Angular 9|8 with Proxy Configuration
published: true
date: 2019-11-06 14:43:18 UTC
tags: Angular , Handle CORS, Angular 9|8 with Proxy, Angular 9|8 
canonical_url: https://www.positronx.io/handle-cors-in-angular-with-proxy-configuration/
---

The post [Handle CORS in Angular 8/9 with Proxy Configuration](https://www.positronx.io/handle-cors-in-angular-with-proxy-configuration/) appeared first on [positronX.io](https://www.positronx.io).

In this tutorial, we will learn to handle CORS (Cross-Origin Resource Sharing) issue in Angular 8/9 and Node/Express Applications. To solve CROS related issues in Angular, we will manage proxy configuration settings.

To sort out CORS related problems in Node/Express Applications, we will be using a third-party plugin called cors and some backend settings.



[Click here to read more](https://www.positronx.io/handle-cors-in-angular-with-proxy-configuration/)