teleren/devto huggingface dataset:
How does the “new” versioning of Laravel work?
Tags: laravel, versioning, php, semantic
Published: 2020-04-20 14:20:42

---
title: How does the “new” versioning of Laravel work?
published: true
description: Although version 6 of Laravel was released in September 2019, there is still some confusion in the community about the new versioning standard and the feeling that things are going too fast. Let's understand it
tags: laravel,versioning,PHP,semantic
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/v9q02jqh9k4vwvw9xbs3.png
---

Although version 6 of Laravel was released in September 2019, there is still some confusion in the community about the **new versioning standard** and the feeling that things are going too fast.

Since I have been using Laravel for some time, I am used to the release cycle, and I would like to explain here what has changed, and **why you should not be concerned**.

Well, first, I will leave here the official statement of the change:

> The Laravel framework (laravel/framework) package now follows the [semantic versioning](https://semver.org/) standard. This makes the framework consistent with the other first-party Laravel packages which already followed this versioning standard. **The Laravel release cycle will remain unchanged.**

As I highlighted in bold, **the versioning cycle has not been changed**. New versions with potential *breaking changes* have always been released every *six months* and will continue to be released in that period. In practice, nothing has changed.

> That is, changing from **5.5** to **5.6**, or from **5.7** to **5.8**, is comparable to changing from **5.8** to **6.x**, or from **6.x** to **7.x**, and so on.

The only thing that has changed is the way the numbers are presented. Before, the “major” number (The first number) of the version was not changed even with “Breaking Changes”, as you can see in the image below:

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

So, even if they had high impact changes, Laravel was still in **version 5**. See how many high-impact changes were made in the Upgrade from 5.7 to 5.8:

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

As seen in the official statement, the decision was taken to adopt semantic versioning so that there is consistency between Laravel and many of the packages used. In addition, semantic versioning demarcates version cycles well. With the previous model, you always seemed to be on Laravel 5, even if there were high impact changes.

That's basically it ... if you get the feeling that things are going too fast, just remember: 

> It is going at the same speed as always, with new versions being released **every six months**.

I hope I helped to clarify the matter. Cheers!

Did you like this post? Consider following me on Twitter to stay on top: [@Tiago_Ferat](https://twitter.com/Tiago_Ferat) (I will be writing constantly now, and I will also be launching tools for the community regularly)
Daily Challenge #229 - Haiku Validator
Tags: challenge
Published: 2020-04-20 13:02:28

---
title: Daily Challenge #229 - Haiku Validator
published: true
series: Daily Challenge
description: Write a function that can validate these 17 syllable haikus!
tags: challenge
---

Haikus are short poems in a three-line format, with 17 syllables arranged in a 5–7–5 pattern. Implement a function to check if the supplied text is a haiku or not.

Syllables are the phonological building blocks of words. In this challenge, a syllable is a part of a word including a vowel ("a-e-i-o-u-y") or a group of vowels (e.g. "ou", "ee", "ay"). A few examples: "tea", "can", "to·day", "week·end", "el·e·phant".

However, silent "E"s do not create syllables. An "E" is considered silent if it's alone at the end of the word, preceded by one (or more) consonant(s) and there is at least one other syllable in the word. Examples: "age", "ar·range", "con·crete"; but not in "she", "blue", "de·gree".

Some more examples:

one syllable words: "cat", "cool", "sprout", "like", "eye", "squeeze"
two syllables words: "ac·count", "hon·est", "beau·ty", "a·live", "be·cause", "re·store"

###Examples
```
An old silent pond...
A frog jumps into the pond,
splash! Silence again.
```
...should return True, as this is a valid 5–7–5 haiku
<br>

```
An old si·lent pond...            # 5 syllables
A frog jumps in·to the pond,      # 7
splash! Si·lence a·gain.          # 5
```
This one is good too!
<br>
```
Au·tumn moon·light -          # 4 syllables
a worm digs si·lent·ly        # 6
in·to the chest·nut.          # 5
```
...should return False, because the number of syllables per line is incorrect.

###Tests
```
1.
My code is cool, right?
Java # Python ; Ruby // Go:
I know them all, yay!

2.
An old silent pond...
A frog jumps into the pond, splash!
Silence again
```

Good Luck!
***
_This [challenge](https://www.codewars.com/kata/5c765a4f29e50e391e1414d4) comes from anter69 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!_
100daysofcode Flutter
Tags: 100daysofcode, flutter
Published: 2020-04-20 14:11:54

day 42/100 of #100daysofcode #Flutter
Learning Flutter , courses Udemy from
@maxedapps

Today  2nd learning more deeper about validator,startWith, endsWith, contains, and new about doube.tryparse
https://github.com/triyono777/100-days-of-code/blob/master/log.md
April 20 — Daily CodeNewbie Check-in Thread
Tags: codenewbie, checkin, beginners, discuss
Published: 2020-04-20 14:11:29

---
title: April 20 — Daily CodeNewbie Check-in Thread
published: true
description: A daily thread to ask questions, share progress, and stay accountable!
tags: codenewbie, checkin, beginners, discuss
series: Daily Checkin
---

You are encouraged to use this daily thread to:
- Ask for help (all questions encouraged)
- Explore topics you’re curious about
- Share something you’ve written or read
- Celebrate your wins
- Stay accountable to your goals
- Support your fellow programmers

Happy Coding!

---

_Interested in joining the twice-weekly live [#CodeNewbie Twitter chats](https://twitter.com/search?q=codenewbie)?  You can find us [on Twitter](https://twitter.com/search?q=codenewbie) each Wednesday at 9pm ET (1am GMT on Thursday) and Sunday at 2pm ET (6pm GMT)!_
Movin’ On Up ... to Dublin’s Bridge Park
Published: 2020-04-20 13:58:44

---
title: Movin’ On Up ... to Dublin’s Bridge Park
published: true
description: by Erica Krumlauf
tags: 
---
Originally Posted:  11/11/2019

Whether people admit it or not, design and location of your office has a huge impact on team culture. Ever worked in a grey sea of cubicles? Doesn’t exactly inspire high energy work. At Leading EDJE, we want our office space to be the opposite of drab. If our mantra of “Real. Fun. Geeks.” tells you anything, you know we are all about working hard and having fun doing it. Our culture and core values are at the heart of everything we do, and it’s important we have a physical space that matches the energy and passion our team brings every day.

That's why we're thrilled to announce our office is moving in early 2020 to Dublin’s Bridge Park. If you’re unfamiliar with the area, think all the amenities of a cool, hip urban space – restaurants, bars, shopping, local businesses – tucked in one of Columbus’ fastest-growing suburbs. Leading EDJE is proud to call Dublin home. So when our lease came up in our current office space, we jumped at the chance to stay in Dublin while relocating our office to a place that fits perfectly with our team’s energy and culture.

Being in Bridge Park gives us a space to do our best work, and offer our team a really awesome office space with amenities they can take advantage of professionally and personally.

The City of Dublin has a fast-growing sector of technology companies, and we’re proud to be part of the movement to make Dublin a leading technology hub of the Midwest. Being in Bridge Park will be one more way we can attract and retain top technology talent.

There will be lots happening over the next couple months as we prepare to move. We hope you’ll follow along on our Facebook page to see what’s new in our Bridge Park space.
Browser Developer Tools
Tags: discuss, devtools, browser
Published: 2020-04-20 13:45:51

---
title:Browser Developer Tools
published: true
description: 
tags: discussion, dev_tools, browser
---

I just was curious about whitch browser has the best dev tools Firefox or chromium-based? I've searched the internet but I didn't found any answer that I liked. Firefox is better on the CSS part and Chromium on JS part. It's like that or it isn't that simple?
KVision v3.7.0 is released (with Vert.x support)
Tags: kvision, kotlin, vertx
Published: 2020-04-20 13:10:43

---
title: KVision v3.7.0 is released (with Vert.x support)
published: true
description: KVision is an open source web framework created for Kotlin/JS.
tags: kvision,kotlin,vertx
---

[KVision](https://github.com/rjaros/kvision) is an open source web framework created for Kotlin/JS. It allows developers to build modern web applications with the Kotlin language.

I have released KVision 3.7.0. The highlights of this release include:

- new server-side module with full support for the [Vert.x](https://vertx.io) backend (with examples and documentation)

- support for awesome toast messages based on [Toastr library](https://codeseven.github.io/toastr/)

- support for method annotations for compiler plugin code generation

- many dependencies upgraded (including Kotlin 1.3.72, Jooby 2.8.1 and Tabulator 4.6.2)

- bugfixes and improvements for different components

This version contains also some workarounds for [jQuery breaking issue with 3.5.0](https://github.com/jquery/jquery/issues/4665).

For more details about this release see the [changelog](https://github.com/rjaros/kvision/releases/tag/3.7.0). There are also some new fullstack example apps for Vert.x server in the [examples repository](https://github.com/rjaros/kvision-examples).

Don't forget to ⭐️ my [project](https://github.com/rjaros/kvision) if you like it!

Any feedback is appreciated!
Translate rails query to raw sql in rails console
Tags: ruby, rails, sql, todayilearned
Published: 2020-04-20 12:48:35

Gone are the days of wondering what the sql equivalent of your rails query might be!

In the rails console first run: 
```ruby
ActiveRecord::Base.logger = Logger.new(STDOUT)
```

Then run: 
```ruby
ActiveRecord::Base.connection.instance_variable_set :@logger, Logger.new(STDOUT)
```

Thats it! Thats all!

Have fun be safe.
How to set token authentication via AJAX in Django to secure the API URL

Tags: python, django, djangorestframework, security
Published: 2020-04-20 12:40:45

After asking a question in stack overflow, by the way without finding an answer, but rather questions about why I did it this way, I saw that I was not the only one who had this approach.

So far no one has addressed this issue how to secure GET or POST requests in Django, AJAX, JS only that website can use it nobody else

Someone asked this question and this was my answer:

they always recommend "JWT, token authentication and session authentication", etc. But all those solutions require a user registered, and what happens if I want to protect a search autocomplete field or anything on the frontend that is public.

I have created a rest framework custom permission and I using django csrfmiddlewaretoken:

it behaves the same like Django post form, csrf token middleware send an input type hidden with ```#{% csrf_token %}```(input hidden with the token) but and this case only needs ```#{{ csrf_token }}```(the token), Django compares the request token with cookie token which are encrypted

```python
permission.py
    from django.middleware.csrf import _compare_salted_tokens, rotate_token
    from rest_framework.permissions import BasePermission


    class HasCsrfTokenValid(BasePermission):
        def has_permission(self, request, view):
            token_valid = False
            try:
                csrf_token = request.headers.get("api-csrftoken")
                csrf_cookie = request.META.get("CSRF_COOKIE")

                """
                Check if both alphanumerics(strings) values are differents to prevent 
                a malicious user get the csrf cookie and send it from the ajax.
                """
                if csrf_token == csrf_cookie:
                    rotate_token(request)
                    return False

                token_valid =  _compare_salted_tokens(csrf_token, csrf_cookie)
            except ValueError: # if csrf_token & csrf_cookie are not a valid alphanumeric
                return False
            return token_valid
```
add permission class to api view

```python
#views.py
class SnippetSearchAPI(generics.ListAPIView):
    model = Snippet
    serializer_class = SnippetSearcSerializer
    permission_classes = [HasCsrfTokenValid,]
    queryset = Snippet.objects.all()
```
```javascript

//Ajax request:

$('#search-snippet').keyup(function () {
    $.ajax({
       url:"{% url 'snippet-search-space:api' %}",
       headers:{'api-csrftoken':'{{ csrf_token }}'},
       success:function(data){
         console.log(data)
       }
   });
 });
```
## conclusion:

So far I have solved it, but I don't know the security implications for the future, I tried it and it seems safe. but there will always be someone out there who can hack this, at least I think so.

what do you think?
Technology modernization for digitization – Part 3
Tags: aws, azure, microservices, devops
Published: 2020-04-20 12:39:14

With a microservice standardization and design mindset that we talked about in earlier two parts, the final one is going to be around change management where we will explore options to automate and leverage tools to manage operations what we call as DevOps

With multiple environments and multiple versions of code, the software developers traditionally spend lot of their time on configuration and change management tasks. DevOps on a micro service application deployed on cloud completes your modernization cycle.

DevOps is combination of cultural philosophies, practices and tools that increases an organization’s ability to deliver applications and services at high velocity: evolving and improving products at a faster pace than organizations using traditional software development and infrastructure management processes.

In a non-DevOps environment, there is increasing conflict between realizing new features and application stability. The KPI for the development team is around their ability to deliver new features quickly where the operations teams KPI is around the stability of the application and sustainability of continuous operations.

In a DevOps environment it is more of a collaborative agile team where they are responsible for delivering new features in an iterative manner and also ensure the stability of the application. The combination of a shared code base, CI & CD, Test driven development, and automated deployments act as preventive quality assurance as it secures the quality of the application at every phase.

Below is the list of few popular DevOps tools on AWS and Azure:

Jenkins: Automate software development process with continuous integration and facilitating technical aspects of continuous delivery.

Docker: A container image is a lightweight, stand-alone, executable package of a piece of software

AWS Code Pipeline: AWS Code Pipeline is continuous integration and delivery service for fast, reliable application and infrastructure updates.
Designing a pragmatic coding interview - Part 2.
Tags: career, tutorial, showdev
Published: 2020-04-20 12:37:29

Let's continue on the topic of designing a pragmatic coding interview and before we start let me share my view on what makes an interview pragmatic.

💡 A pragmatic interview is the one that evaluates one's ability to complete a real-world assignment that closely resembles a day-to-day task, where the evaluation is based on a standardized rubric.

It's as simple as that, however, it's easier said than done. This is why we'll continue with zooming in on how to design such an interview.

Today's topic is designing a challenge description. This one probably has the highest chance to define how much time will be spent on the challenge by both the candidate and the interviewer (and also it can both increase or decrease it). So let's see how to not screw it up.

We'll use [this Github issue](https://github.com/coreskills/python-developer-2020-04-16/issues/3) as an example.

Take your time to go through this issue but if we were to define a distilled structure it'd go like this:

1️⃣ Brief background - just gives an idea of what this is going to be about.
2️⃣ Setting expectations - telling them how their solution will be evaluated.
3️⃣ Submission checklist - for them to know where they stand with their submission.
4️⃣ The definition of done - good to be clear on, isn't it?
5️⃣ FAQ - they will have questions, this should cover most of those.

There're only 5 but very important steps here. If you got an interview assignment already take a minute to see which of the points above it hits. 

And if there's something I missed, please share it in the comments below. I'm a big believer in incremental progress and that there's always a chance to improve. 🙏
How to wean from CSS and component frameworks
Tags: css, discuss, help, webdev
Published: 2020-04-20 12:18:48

What tutorials do I need? What functionalities will miss?

Perhaps

- Normalizing CSS / CSS reset, which is overdone by Bootstrap, Bulma and Material; so much that it hates each other.
  - Bulma is overdone to the next level, that you need `class="content"` to resume the near-default. Also, [embedding YouTube](https://github.com/jgthms/bulma/issues/1466).
- Some responsive components, like this one -- https://css-tricks.com/responsive-data-tables/
- I didn't even use Tailwind yet. I just use SCSS / scoped CSS (generated via scoped Vue Component)
- But my design isn't yet even beautiful. How do I create a beautiful ripple effect, like in Material Vue?

In short, any tutorial recommendations?
Building Real Time Applications On Streaming Data With Eventador - Episode 129
Published: 2020-04-20 12:18:39

<p>Modern applications frequently require access to real-time data, but building and maintaining the systems that make that possible is a complex and time consuming endeavor. Eventador is a managed platform designed to let you focus on using the data that you collect, without worrying about how to make it reliable. In this episode Eventador Founder and CEO Kenny Gorman describes how the platform is architected, the challenges inherent to managing reliable streams of data, the simplicity offered by a SQL interface, and the interesting projects that his customers have built on top of it. This was an interesting inside look at building a business on top of open source stream processing frameworks and how to reduce the burden on end users.</p><p><a href='https://www.dataengineeringpodcast.com/eventador-streaming-data-episode-129/'>Listen Now!</a></p>
Build The Next Generation Of Python Web Applications With FastAPI
Published: 2020-04-20 12:18:01

<p>Python has an embarrasment of riches when it comes to web frameworks, each with their own particular strengths. FastAPI is a new entrant that has been quickly gaining popularity as a performant and easy to use toolchain for building RESTful web services. In this episode Sebastián Ramirez shares the story of the frustrations that led him to create a new framework, how he put in the extra effort to make the developer experience as smooth and painless as possible, and how he embraces extensability with lightweight dependency injection and a straightforward plugin interface. If you are starting a new web application today then FastAPI should be at the top of your list.</p><p><a href='https://www.pythonpodcast.com/fastapi-web-application-framework-episode-259/'>Listen Now!</a></p>
Daily Developer Jokes - Monday, Apr 20, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-04-20 12:00:05

---
title: "Daily Developer Jokes - Monday, Apr 20, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Monday%2C%20Apr%2020%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258bb6df5f.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ What did the spider do on the computer?

___A:___ Made a website!
 -->
Improved Windows Terminal Setup
Published: 2020-04-25 16:13:05

---
title: Improved Windows Terminal Setup
published: true
date: 2020-04-20 12:00:00 UTC
canonical_url: https://www.sheldonhull.com/blog/improved-windows-terminal-setup/
---

I've long been a Cmder/ConEmu user for Windows as it's provided a much-needed improvement of the standard Windows terminal.

I've started trying to use the newer Windows Terminal project to benefit from the improved performance and support, and found getting it up and running with any customizations was a little time consuming and confusing. This wasn't something I'd hand off to someone who wasn't looking for experimentation.

So here it goes! Rather than hunting all around to get a nice start on some default prompts, I've linked to some gists that can help you get up and running quickly with a few extra perks.

## Getting Started

This will help you get the terminal installed, along with downloading some settings I've already pre-setup with keybindings and more.

To customize your own keybindings, you can go to the [profiles.json](https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md) documentation.

{% gist https://gist.github.com/sheldonhull/93d8060e6f86e0c46535ef6699d6e0c8 file=install-settings.ps1 %}
## Improve Your Experience

After install, you can run the next command to help you get a better font setup with full support for ligatures and more.

{% gist https://gist.github.com/sheldonhull/93d8060e6f86e0c46535ef6699d6e0c8 file=install-font.ps1 %}

And after this, if you don't have a nice PowerShell prompt experience, this will help give you a great start. This contains a few things, including [starship](https://starship.rs). This is really useful as it has a library of prompt enhancements baked in. For example, if you are have an AWS profile active, it will display that for reference. It can display an active terraform workspace, git branch info, python virtual environment and more. Definitely a nice quick productivity booster with no real configuration needed to get going.

{% gist https://gist.github.com/sheldonhull/93d8060e6f86e0c46535ef6699d6e0c8 file=configure-profile-prompt.ps1 %}

If you are wondering why I didn't leave the pretty awesome `"useAcrylic": true` on for my main pwsh session, it's because I found the background contrast reduction made it hard to read some darker colors on the prompt.

Be sure to try out the retro pwsh theme for some nice eye candy.

## The result

PowerShell Protip: Note the suggested completion based on prior commands in the pwsh prompt. This is some great prerelease work on a better PSReadline experience with Powershell.

![image of windows terminal](https://www.sheldonhull.com/images/windows-terminal-01.png)

![images of windows terminal](https://www.sheldonhull.com/images/windows-terminal-02.png)