teleren/devto huggingface dataset:
Best DEV.to Posts for Beginners: Week of June 24, 2019
Tags: codenewbie, beginners, tutorial, bestofdev
Published: 2019-07-05 22:27:49

---
title: Best DEV.to Posts for Beginners: Week of June 24, 2019
published: true
escription: These are some of the best beginner posts of the week!
tags: #codenewbie, #beginner, #tutorial, #bestofdev
series: Best DEV.to Posts for Beginners
cover_image: https://thepracticaldev.s3.amazonaws.com/i/x9acs27zebb19v5rf8ml.png
---

_A little late on this one this week for a reason I’m excited to share soon! Let’s get on with it!_

One of the reasons I've been so drawn to DEV.to over other platforms is the super encouraging and helpful community that gathers here. Initially I felt like it was going to be more a place where I sat back and watched, rather than write and contribute, but I've been so pleased to find not only helpful articles and tutorials that I understand, but also that input from new coders and devs is well-received.

I thought it would be nice to compile some of the best posts every week for those of us who still identify as #codenewbies!

{% link https://dev.to/helenanders26/what-advice-would-you-give-your-20-year-old-self-33o1 %}

This was overlooked in the week it was posted, but it’s such a great wealth of knowledge, inspiration, information, and motivation. I’ve definitely tucked it away for a day I’m feeling the imposter syndrome for real.

{% link https://dev.to/nikoheikkila/show-your-own-uses-page-160j %}

Creating my own `uses` page right now feels a little like jumping the gun, but there are so many great examples here - not to mention inspiration for setting up your own workflow or tools!

{% link https://dev.to/teamxenox/the-only-way-to-improve-your-css-game-1m2k %}

I love CSS and I’m always looking for more ways to level up my skills. This week, XenoX brings a lot of great resources, challenges, and tips on how to keep your sites looking fresh 😎

{% link https://dev.to/alexandersandberg/creating-a-website-theme-switcher-with-css-only-4kp2 %} 

Continuing on the CSS tip, I love #showdev posts with clever uses of new elements. This CSS-only dark mode creator is really innovating and interesting to learn about!

{% link https://dev.to/molly_struve/what-does-your-junior-interview-process-involve-41mp %}

For the newbies, students, or career changers among us, the shift into developer interviews can be scary, intimidating, and full of intimidation and mystery. Molly’s post is super valuable in exploring what junior processes are out there to better prepare for the inevitable job search!

{% link https://dev.to/jimbobbennett/learning-python-on-twitch-with-a-kids-book-4130 %}

This is cute. I really like popping on coding Twitch channels while I’m working on something else, and it’s nice to watch someone else learn something new. Maybe kids books are where I should start too!

And a very special mention this week to the women of [the Ladybug podcast](https://www.ladybug.dev/). I think all of them are DEV.to’ers, and it’s super refreshing to hear a tech podcast of all female voices!
Eight moderator factors of security and performance verification
Tags: security, performance, testing, verification
Published: 2019-07-05 21:07:50

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

Hello everyone! 
I would like to share with you a piece of the findings of my Ph.D. research.

Here, I present a set of Moderation Factors influencing security and performance verification. *If you want to include security and performance verification testing in your organization, you should consider such moderator factors*.

Besides, I understand the knowledge is alive. So, I would like to invite you to answer my survey. It aims to evolve the moderation factors of *security and performance verification (testing and reviews)*.

## *[http://spvsurvey.com/](https://spvsurvey.com/)*


It is very important to me. So, If you could publicize the link of my survey to the people in the organization you work, I will be eternally grateful! The survey main target is the people that work with security or performance testing: http://spvsurvey.com/
Network Load Balancing with CLUSTERIP
Tags: sysadmin, linux
Published: 2019-07-05 20:54:57

## Load-balancer Less Load Balancing

There's not a lot of information on CLUSTERIP on the Internet for some reason.  It's an implementation of an older technique, made easier by an IPTables target extension.

   * [Flavio's Technotalk on CLUSTERIP](http://www.rkeene.org/projects/info/resources/projects/ipcluster/flavios-tech-talk-on-ipcluster.html)
   * [Load Sharing with IPtables and Linux-HA](http://www.linux-ha.org/ClusterIP)
   * Microsoft calls this technique "[Network Load Balancing](http://technet2.microsoft.com/windowsserver/en/library/358b9815-3cd3-4912-a75a-cae85ea8d5ab1033.mspx?mfr=true)"
   * [LARTC](http://lartc.org/) has a longer explanation of the underlying mechanism in their article "[How to do simple load-balancing with Linux without a single point of failure](http://lartc.org/autoloadbalance.php3)"

----

The way CLUSTERIP works is fairly simple.
   1. Every member of the cluster is attached to the same [broadcast domain];
   1. Every member of the cluster is configured with the same multicast MAC address;
   1. Each member of the cluster then filters out incoming packets they don't think they should handle:
    1. In an exclusive manner with respect to other nodes (i.e., no other member of the cluster will handle the packet);
    1. And in an inclusive manner with respect to packets (i.e., when all the nodes of the cluster are up every packet will get handled by a node); also
    1. Using the following criteria normally:
     1. Based on source IP; or
     1. Based on source IP and source port; or
     1. Based on source IP and source port and dest port
    1. If a node is down, another node can notice and assume responsibility for its share of the incoming packets
   1. Outgoing packets are sent with the source IP and MAC address of the cluster, but the destination IP of the target and destination MAC address of the next-hop router (gateway)

From the above description, the major weakness of CLUSTERIP is shown.  Incoming packets are replicated N times (for every member of the cluster), thus CLUSTERIP (when used alone, other higher layer techniques can sometimes mitigate this) cannot be used to load-balance incoming traffic bandwidth effectively.  Outgoing traffic is unaffected and will be split as evenly as the load-balancing scheme permits.
💫 A good schema is a 3x faster developer (and is didactic to others)
Published: 2019-07-05 20:16:57

Here is my company's infrastructure, that I had to design so far:

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

I realized how well **a schema** could save **a lot** of time. What's true for comments is even more true for nice and explanatory drawings, with only letters, arrows and a bit of imagination.

From time to time, think about the small child inside you, who could make wonderful visual things! **Code needs it**, more often than imagined.

If you need to share your babies with the team, reknown online tools such as documentation generators ([Read the Docs](https://readthedocs.org/)) or  drawing desks ([draw.io](https://www.draw.io)) are the perfect solution.
What is the importance of Global Accessibility Awareness Day?
Published: 2019-07-05 19:49:49

---
title: What is the importance of Global Accessibility Awareness Day?
published: true
description: Global Accessibility Awareness Day and developers responsibility
tags: 
---
The UN estimates that more than 1 billion people around the world live with some form of disability and as populations age over the coming years, that number is expected to rise rapidly.

Add to that the 10 percent of people who suffer from color blindness, and you start to get an idea of why accessibility is so important—not just for moral and legal reasons, but also so that your products can reach their full potential. You need to design for accessibility!

I think that’s an excellent reason to have a Global Accessibility Awareness Day (GAAD).

The GAAD is celebrated on the third Thursday of May each year and is aimed to raise awareness among developers, designers, and other creators to put a greater focus on digital accessibility and inclusion for the billion people across the world who have disabilities and impairments.

![](https://thepracticaldev.s3.amazonaws.com/i/e02fafaj2jv6dm1ih9bz.jpeg)

**How to support the GAAD?**

The best way to find out how you can get involved in GAAD is from the Global Accessibility Awareness Day website itself. They list various ways you can support, including:
* In-person events
* Virtual events
* Webinars
* Game Jams
* BBC access all areas live stream

There are online courses you can enroll to increase your accessibility awareness throughout this week and beyond, like this one [Accessibility: How to Design for All](https://www.interaction-design.org/courses/accessibility-how-to-design-for-all?ep=idf-gaad&utm_source=devto).

There are plenty of obvious ethical reasons that accessibility matters but ultimately, people with disabilities should have the same rights as the wider population—and that includes their ability to engage with, learn from and communicate via the digital world.

When we take it upon ourselves to design for accessibility, we create more chances for disabled people to use digital technology and, at the same time, expand our market share and support diversity and inclusion in the workplace.

If you neglect accessible designs for financial reasons, it means you’re not only acting illegally in most cases but are also being short-sighted in terms of the business value you can gain from accessible designs.

While all creators have their own design and development backlogs to contend with, it’s fair to say at this point there’s no real excuse why you shouldn’t do everything possible to design for accessibility.

Designers have the responsibility—not only to their profession but also to the users and society—to design accessible digital solutions. And Global Accessibility Awareness Day does a great job of promoting that.
KVision v0.0.37 - with Apache Cordova module
Tags: kvision, kotlin, cordova, android
Published: 2019-07-05 18:50:52

---
title: KVision v0.0.37 - with Apache Cordova module
published: true
description: KVision is an open source web framework created for Kotlin/JS.
tags: kvision,kotlin,cordova,android
---

[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 0.0.37](https://github.com/rjaros/kvision/releases/tag/0.0.37). After a few weeks of work a new module has been implemented, with support for creating mobile applications with [Apache Cordova](https://cordova.apache.org/).

Building mobile apps with Kotlin is nothing new, of course. Probably most of Kotlin developers are targeting Android, because it is now a preferred language for this platform. There is new [Jetpack Compose](https://developer.android.com/jetpack/compose) Kotlin toolkit designed to simplify mobile UI development. And the experimental [Kotlin Native](https://kotlinlang.org/docs/reference/native-overview.html) technology allows to compile Kotlin code to native iOS and Android applications.

So what could be the reason to build mobile applications with Kotlin/JS based framework and Apache Cordova? Are there any advantages resulting from compiling Kotlin app to JavaScript, just to run this JS code in the browser embedded inside native application?

Yes, there are some:

- Cordova applications are fully cross-platform - you can run exactly the same code on Android and iOS. It's not possible with Kotlin/JVM, which lets you create Android apps only.

- KVision gives you consistent, object-oriented UI library (it's really full-featured, even if it does not look natively). You can write your UI code once, unlike with Kotlin/Native, which lets you share the common application logic but forces you to implement dedicated UI code for all platforms.

- It's extremely easy to port standard KVision web applications to mobile devices. In fact there is almost nothing to be done - you can just pack and run the application on your smartphone.

- With [Webpack's Hot Module Replacement (HMR)](https://webpack.js.org/concepts/hot-module-replacement/) integrated to your toolchain, you get super fast hot-reload of your app inside the phone emulator during the development phase.

You can read the new [chapter in the documentation](https://kvision.gitbook.io/kvision-guide/part-2-advanced-features/building-with-apache-cordova) if you want to find more information and usage examples.

It's really worth trying!

KVision 0.0.37 brings also some other notable features - look at the changelog and all closed GitHub issues.

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

Any feedback is appreciated!
How to simplify reading your Rails console
Tags: rails, todayilearned, beginners, codenewbie
Published: 2019-07-05 18:44:11

Rails console is a great tool when you are experimenting with your code, but if we have a lot of data it can become a bit complicated and time consuming. 

Currently I'm working on a chat app and while creating users the output in console became a bit verbose since it's all smashed together.

## Today I learned

You can fix this by adding a gem called hirb to your gemfile.

Hirb is a 'mini view framework' that formats output console according to its type. So you go from something like this:
![](https://thepracticaldev.s3.amazonaws.com/i/7tvy1vdijc4ggvi4i17g.png)

To this:
![](https://thepracticaldev.s3.amazonaws.com/i/tnfwlp1gqr10xny6e78y.png)

After installing it, run the rails console command and write Hirb.enable on console. 

*Tip-on-tip: make sure the H is capital when using console. For adding to gemfile lowercase hirb it's okay.*

That's it, you're set.

What did you learn today?
This Week In Work #4
Tags: review, weeklyreview, weeklyretro
Published: 2019-07-05 18:16:26

It's seemed easier to write these weekly reviews when there have been fewer happenings; the last few weeks have been more fast-paced. It's an interesting thought that having more things to write makes it more difficult.

To break the paralysis, I hope to pick out a few events.

### Conferring

I'll write up something separately, but today was the annual [Brighton Ruby conference](https://brightonruby.com/2019/). My company only had myself attend this year but we have had up to a dozen make the journey along the south coast.

While I caught up with a few ex-colleagues the vast majority of my time was spent on my own, so I think for future events my attendance will depend on being in a group.

##### Conclusion

I enjoy the talks at these events but I'm not a networker. There's something about being there, though. We encourage anyone in the company to go to events -- I'll shout about it more next time!

### Diving into the Unknown

Back-story: someone wrote some code. In fact, they wrote lots of important code, and it was good. In the interest of knowledge sharing, an improvement was given to the team to pick up rather than the original implementer.

The change wasn't complex: ingest some data and update our copy, shuffling the format a little on the way.

Wonderfully, _I didn't need to talk with them to change their code_: I could rely on their tests to prove my "happy path" would work. Moreover, the code was layered in such a way that meant it was easy to change. This wasn't by accident. We knew that further ingestion of other parts of the available data was inevitable, so they kept that area simple and segmented.

##### Conclusion

Change is not easy, but we can make it easier. Of course, write useful tests; that helps everyone that sees your code. You can help further by restraining yourself from adding _just in case_ features: instead **leave it right before you add anything that's not necessary**. You'll leave a clear place to start work next time, whether that's by you or your colleagues.
🙋🏽‍♀️ Bye bye procrastination
Published: 2019-07-05 18:05:57

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

Some devs believe that they'll have the leisure and the time to handle fixes later. That's a deep **mistake**.

My personal dev experience taught me more than anything else the **exponential law** hidden behind procrastination: the more you wait, the more you'll regret. And that's especially true for little stuff to be done.

If you feel your code getting too intricate, change it immediately: do it the way you would if you were supervising furious boiling pasta for diner.

Think twice before discarding the creepy-crawly ;)
Detect if div is inside ViewPort
Published: 2019-07-05 17:55:52

---
title: Detect if div is inside ViewPort
published: true
description:
tags: react, nextjs, html, css, javascript
---

I am using NextJS and want to show a Button when the User scrolls to a particular Element. Unfortunately I cannot get it really working.

I have a `Layout` File, which gets shared across all Components.

```
import Navbar from "./Navbar";
import Footer from "./Footer";

const Layout = props => {
  return (
    <div>
      <Navbar />
      {props.children}
      <Footer />
    </div>
  );
};

export default Layout;
```

I tried to implement `onScroll` to the first `<div/>`in the Layout file but it does not get triggered.
🚿 Best courses on min-cut/max-flow
Published: 2019-07-05 17:32:38

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

Say your client works with travelers (T), and each of them has a list of wished destinations (D) for the week-end. We’d like to associate each traveler with one single destination, each accepting only one person, but in an optimized way (that is in short, having as many associations as possible).

For instance, say Bob wants to visit both Paris and Madrid, and Alice wants to go to Paris. We would set Bob to Madrid, and Alice to Paris (2 matches), because if we’d placed Bob on Paris, we could not create any further match with Alice, and we’d end up with only 1 match.

Is there any algorithm which could tell us, in less than a second, what is the best combination, when we have millions of possible travelers and destinations? Yes, and it would use the min-cut/max-flow theorem.

Here are two lessons on it. Note that **it may be used for much more cases than imagined**.

The first is done by [Polytechnique](http://www.enseignement.polytechnique.fr/informatique/INF550/Cours1112/INF550-2011-2-print.pdf), and is pretty good (French).

This one is by [Princeton](https://www.cs.princeton.edu/courses/archive/spr04/cos226/lectures/maxflow.4up.pdf), with code examples, less clean, but useful too.
What’s your default terminal shell? And what do you love the most about it? 
Tags: discuss
Published: 2019-07-05 15:53:20

---
title: What’s your default terminal shell? And what do you love the most about it? 
published: true
description: 
tags: discuss
---

Hey all! I keep meaning to give [Fish](https://fishshell.com) a serious evaluation as my default shell, since it seems to provide enough meaningful productivity enhancements over Bash, with little-to-no setup (e.g. command auto-completions). That said, I’m curious to hear what others are using, what their exact setup is, and what they love the most about it. In particular, what things do you find actually have a significant impact on your productivity and general developer enjoyment (as opposed to just being “cool”)?

Do you primarily use Bash, [Zsh](https://Zsh.org), Fish, PowerShell, or something else? Do you use a framework/plugin manager such as [Oh My Zsh](https://ohmyz.sh/) or [Fisher](https://github.com/jorgebucaran/fisher)? Are there any particular pro-tips that you feel like everyone should know, in order to get the most out of their shell?

Feel free to share any and all details about your personal shell setup, so that we can all get inspiration to try something new, and possibly up-level our daily dev workflows! Also, bonus points if you include a screenshot/gif of your setup and favorite shell feature in action 🚀
🌍 λ language management guide
Published: 2019-07-05 17:29:28

For the company I’m in today, I found a good model for **user language management**. Here is a schema summing up possible tracks for different users from different countries. As an inspiration source, I chose **Facebook**.

![](https://thepracticaldev.s3.amazonaws.com/i/8n0z4yobm7jeok3yro32.png)
App Header | CSS, Jquery, JavaScript, HTML
Tags: codepen
Published: 2019-07-05 17:23:40

{% codepen https://codepen.io/KaioRocha/pen/pXOPPX %}

Learn how to do this awesome effect

Check it out on my channel: 
https://youtu.be/F5pOKlC55cg

Or to see the code: 
https://codepen.io/KaioRocha/pen/pXOPPX 
-

Design original by abbily_yang: 
https://dribbble.com/shots/6702655-Morandi-tone-exercise

If you can, leave your like in her shot and hit the button like :)
Alternative terms for "Tech Talk"?
Tags: discuss, beginners, community, meetups
Published: 2019-07-05 17:07:49

---
title: Alternative terms for "Tech Talk"?
published: true
description: 
tags: discuss, beginner, community, meetups
---

For a community hosting events targeted towards beginners, many of whom who are looking to break into the industry and may have never even written code before, what is a good alternative to the term "tech talk"? While it's short and concise which makes it easy to put into an event title, it can seem intimidating. Any suggestions?