teleren/devto huggingface dataset:
Adding custom shaders to hydra synth
Tags: glsl, hydra, livecoding
Published: 2019-07-10 08:06:17

---
title: Adding custom shaders to hydra synth
published: true
description: I enjoy live-coding visuals with Hydra from Olivia Jack at events.
tags: glsl, hydra, live-coding
---
![hydra in action](https://thepracticaldev.s3.amazonaws.com/i/fjnj8jpz9i8pk70oz2ee.JPG)
I enjoy live-coding visuals with Hydra from Olivia Jack at events.

You can try it online here : https://hydra-editor.glitch.me/

This open source software allows to reduce the code to type with built-in functions that translate to glsl, the shading language your gpu understands.

Audience could be bored while typing long lines of glsl, for example for a shape function:
```glsl
vec2 st = _st * 2. - 1.;
float a = atan(st.x,st.y)+3.1416;
float r = (2.*3.1416)/sides;
float d = cos(floor(.5+a/r)*r-a)*length(st);
return vec4(vec3(1.0-smoothstep(radius,radius + smoothing,d)), 1.0);
```
Hydra allows to type only:

```glsl
shape(3.0, 0.3, 0.01)
```

Hydra comes with a lot of functions already, which are chainable, like

```glsl
osc(322).color(0.5,0,0).add(shape(2).color(2,2,2).scale(0.006).rotate(0.000001)).
modulate(noise(()=> a.fft[1]*10 +0.01).scale(5,0.1)).scale(1.2,1,3).out()
```

But what if you want to add your custom shaders or use some from shadertoy.com ?

To modify the source code, you have to clone it from https://github.com/ojack/hydra and run it locally:

* setup nodejs
* in the cloned folder, run npm i
* then run npm start
* open https://localhost:8000 in your browser
One of the modules in the outrageously large node_modules folder is hydra-synth, which contains the files you need to modify.

Tip: if you want to keep your modifications of the code, I suggest you:

* delete the hydra-synth folder
* make a fork of the https://github.com/ojack/hydra-synth repo
* git clone your fork in the node_modules
You can now add your glsl functions to src/composable-glsl-functions.js inside blocks {}, separated with a comma.

I use two types of blocks:

* type: ‘src’ for functions which can be used in the hydra editor
* type:’util’ for functions which are utility functions for your ‘src’ function

Example: adding a plasma function:
```glsl
plas: {
type: 'util',
glsl: `vec4 plas( in vec2 v, float fft ) {
float c = sin( v.x * 1000.0 * fft) + cos(sin(time+v.y)*20.);
return vec4(sin(c*0.2+cos(time)),c*0.15,cos(c*0.1+time/.4),1.0);
}
`
},
plasma: {
type: 'src',
inputs: [
{
name: 'fft',
type: 'float',
default: 0.0
}
],
glsl: `vec4 plasma(vec2 _st, float fft) {
vec2 uv = -1.0 + 2.0 *_st;
uv.x *= resolution.x/resolution.y;
vec2 m;
m.x = atan(uv.x/uv.y)/3.14;
m.y = 1./length(uv)*.2;
float d = m.y;
float f = fft;
m.x += sin(time)*0.1;
m.y += time*0.25;
vec4 t = plas(m*3.14, fft)/d;
return vec4(f+t);
}
`
},
```

Save your file, refresh the browser page then type 
```glsl
plasma(0.002).out()
```
![plasma shader](https://thepracticaldev.s3.amazonaws.com/i/l9ljtt72prtz3ivv4how.jpg)
Why is it worthwhile automating security?
Tags: security, devops, secops, automation
Published: 2019-07-10 07:50:25

---
title: Why is it worthwhile automating security?
published: true
description: The value of developing security automation
tags: security, devops, secops, automation
---

I sometimes think you can divide clients into three groups:

* Those who care about security
* Those who want to tick the boxes on security
* Those who don't know yet that they care about security

The good news is that creating an automated security infrastructure helps all three.

If you client cares about security they want proof that you are doing what you say you are doing and that you regularly review and monitor it. Automation provides all the reporting and proof without you having to do anything about it.

Those same reports allow you to tick the boxes with people. If you didn't have them then you'd have to go through a manual process to dig up the information and supply it adhoc as the review process requires.

Before we had some of the automation that we do now that's exactly what I had to do. It could be painful to find the right information, sometimes it would be out of date or would reveal a problem that needed to be resolved before we could respond because we weren't reviewing things frequently enough.

Often all of this would be happening under time pressure because the security review was linked to a sales opportunity we were trying to secure (generally the entertainment industry loves working to deadline and hates to do anything it doesn't have to). That made everything more stressful than it needs to be.

Once you have automation in place I've found that we've reduced some of our review processes with potential clients to a few days. We probably spend more time discussing cloud infrastructure than the security side of things.

Finally what about those clients who don't yet care about security. In my experience those clients are happy to take risks with what they are doing but when things go wrong it often turns out that they did have security expectations about the service you were providing but failed to articulate them because often they don't understand how technology works that well.

The good news is that automation helps them too as the cost to build automation is really all in the setup. Operationally we've been able to throw and umbrella over our clients and marginal additional cost. All you need is one client who really cares about security and you can make a step improvement for all of them.
RedGL Update News - object3D outline
Tags: redgl, webgl, outline
Published: 2019-07-10 07:46:04

RedGL Update News
Object3D now supports outline attributes.
{% codepen https://codepen.io/redcamel-the-bashful/pen/MMZNye %}
github : https://github.com/redcamel/RedGL2/
Example : https://redcamel.github.io/RedGL2/example/
Testing from 0 to 100
Tags: testing, javascript, webdev, tutorial
Published: 2019-07-10 07:44:58

Unit tests... API tests... UI tests... mocha... chai... jasmine... cucumber... enzyme...?
Want to introduce test automation to your project, but not sure where to start and what tools to use? 

{% youtube xD3rKymw-94 %}

**Thanks for reading** ❤
If you liked this post, share it with all of your programming buddies!
Follow us on **[Facebook]( https://www.facebook.com/moriohdotcom)** | **[Twitter]( https://twitter.com/moriohdotcom)**

### Further reading
☞ [Top 10 Cross Browser Testing Tools in 2019](https://morioh.com/p/4b2a5fc941 "")
☞ [Selenium vs Scriptless Test Automation](https://morioh.com/p/edf5c01ad3b2 "")
☞ [JavaScript Testing using Selenium WebDriver, Mocha and NodeJS](https://morioh.com/p/8b197bcd191 "")
3 Components of Java Programming Language
Published: 2019-07-10 07:01:00

Computer programming is a continuous and fastest changing arena. One of the purpose of programming is to find a solution to a problem in a typical way. Programmers always need to stay relevant and address new challenges, besides having a very good programming knowledge, it is very important that they also understand the internal structure of the environment in which they are the writing the code.

In this blog we are going to discuss 3 important components of Java Programming language; knowing these 3 components is must for any Java developer. We also suggest you to read our blog on Learn 7 Basics of Java Programming to Start Coding Today which discusses the basic concepts of Java Programming.

A Java Programmer writes a program in a human-readable language, called Source Code. The CPU or Central Processing Unit or Chips do not understand the Source code written in any programming language. These Chips or Computers understands only one thing: Machine Code or Machine Language. These machine codes run at CPU level, hence, it would be different machine code for different models of CPU.

We need not to worry about the machine code, as programming for us is all about Source code.  To help machine to understand the source code it needs to be converted into a machine level language which is an executable code.

All these functionalities happen inside following 3 components of Java Programming Language:

Java Virtual Machine. (JVM)
Java Runtime Environment. (JRE)
Java Development Kit. (JDK)
Let us discuss these 3 components in the first part of the blog and then in the 2nd part of the blog we will also go through various applications of Java.

What is JVM?


As by now we know that a Programmer writes the Java program in a language which is not understandable by the machines. So here comes the compiler role, in case of Java programming it is Javac compiler which converts the high-level language into machine understandable language i.e. bytecode as the output.

The Java Virtual Machine (JVM) executes the bytecode generated by the compiler.

JVM performs tasks such as:

Loading the code.
Verifying the code.
The execution of the code.
Some of the important notations of JVM are:

Specification: It is a document which specifies what is required for JVM implementation.
Implementation: It is an implementation known as JRE.
Instance: Whenever you run Java class file an instance of JVM is created.

Click Here to continue reading: https://blog.simpliv.com/3-components-of-java-programming-language/
What are some ways for non-programmers to get started in our industry?
Tags: inclusion, career, discuss
Published: 2019-07-10 07:00:50

I know a lot of bright tech literate people outside of software development who are bored of their line of work. They work in education, hr, accounting etc.

What are some ways they can get into tech *without* learning to code? Bonus if they can do it remotely!
Hi, I'm Mannyluvstacos!
Tags: firstpost, introductions, node, mannyluvstacos
Published: 2019-07-10 06:59:39

---
title: Hi, I'm Mannyluvstacos!
published: true
description: Intro Post
tags: first_post,introductions,nodejs,mannyluvstacos
cover_image: https://thepracticaldev.s3.amazonaws.com/i/bxl6midh55s6n6iwhlk4.jpg 
---

All journeys start with the first steps.
These are my first steps.

I started out as a Graduate Chemical Engineer and found myself going back to school to get a degree in Computer Science.

Along the way I wanted to learn as much as I could before I went back into the work world. I had ~3 years (2 summers) until I graduated and I wanted to soak in as much as I could in that time.

I interned one summer at Bazaarvoice, another summer at PayPal and began my full-time career at HomeAway in Austin, Texas in 2016.

While at HomeAway I helped re-platform the company's web applications to Node.js+Hapi.js

[I had the opportunity to speak about that experience at NodeSummit 2018.](https://vimeo.com/287507864) I was inspired to submit a talk after having gone to NodeSummit 2017 as my first tech conference and that experience leaving a lasting impression on me.

[I wrote about my first ever tech conference (NodeSummit 2017) here.](https://medium.com/netscape/node-summit-2017-an-exploration-into-a-developers-first-tech-conference-ever-57251c3792f3)

I left HomeAway in February of 2019 and I am currently working at [Help.com](https://jobs.help.com/).

I am interested in Node.js and GraphQL.
I am very interested in the inner workings of Node.js and the V8 engine.

My goals currently are to work on a few ideas and make them into open source projects that may be consumed by, and hopefully help, those in the tech community.

I just want to learn as much as I can while I'm here.
This is my first post, the next ones will probably be about ideas or thoughts that cross my mind with respect to technology, Node.js, productivity, growing older, and coffee.

I hope you enjoy them.

-Manny...luvstacos.
Serverless is the Abstraction We Deserve
Tags: serverless, kubernetes, microservices, webdev
Published: 2019-07-10 06:48:55

Monolithic applications are an anti-pattern, especially when moving to cloud scale deployments. For years, microservices adoption has been tied to containers and more recently to Kubernetes. But moving from pure software development to learning Kubernetes and all of the amazing tools and components in that ecosystem is daunting. YAML just doesn't make a great user interface.

While we have been building platforms on platforms, this thing called Serverless has become a real thing. Of course, it has a platform underneath, but it's abstracted away. Serverless lowers the barrier to entry, allowing developers to seemingly leapfrog over the complexity and burden of learning containers and launching a Kubernetes practice. Developers focus more on their core business logic, and less on all of the things around it.

However, beyond the first few functions things can get complicated. Triaging issues and analyzing performance can be nigh impossible. The abstraction can become a liability. But Serverless exists to address a real problem, and it's the abstraction we have to work with. In this session, we'll discuss how we get past the initial adoption of Serverless to fully embracing it, taking on a "Serverless First" strategy.

{% youtube 07sjxc1z_1A %}


**Thanks for reading** ❤
If you liked this post, share it with all of your programming buddies!
Follow us on **[Facebook]( https://www.facebook.com/moriohdotcom)** | **[Twitter]( https://twitter.com/moriohdotcom)**

### Further reading
☞ [Build a microservices architecture with Spring Boot and Spring Cloud](https://morioh.com/p/e616350f36c9)
☞ [Vue.js and Serverless - Going Serverless with Vue.js](https://morioh.com/p/b49107471ccf "")
☞ [An illustrated guide to Kubernetes Networking](https://morioh.com/p/ecb38c8342ba)
The C++ Standard Library: A Tutorial and Reference by Nicolai Josuttis
Tags: c, review, books, stl
Published: 2019-07-10 06:14:06

For each quarter, I define three goals for myself as described in [Setting yourself up to success](http://sandordargo.com/blog/2018/02/28/setting-yourself-up-to-succeed). In the previous quarters, I had personal goals related to the [C++ Standard Library](http://www.cplusplus.com/reference/).

As I was already recommended to read it, I started to consume the monstre 1100 pages long book [The C++ Standard Library: A Tutorial and Reference (2nd Edition)](https://amzn.to/2HXyku9) by [Nicolai Josuttis](http://www.josuttis.com/).

I had the solid intention of reading from cover to cover, but I have to admit I failed this. It's a fascinating book, uncovering a lot of not-so-well-known features and characteristics of the Standard Library, but as the end of its title suggests it should be handled as a reference. You know more or less what is inside and if you need to check something, you can go an open it on the good page.

Speaking about its title, I felt it less a tutorial. From a tutorial I expect exercises building on the top of the previous one to make you think a bit, but not to make you feel stuck for a long time. This book doesn't include such exercises or any at all. I don't find it problematic, but better to understand it to avoid unfulfilled expectations.

On the other hand, even in the world [cplusplus.com](http://www.cplusplus.com/), [cppreference.com](https://en.cppreference.com/w/), not to mention [StackOverflow](https://stackoverflow.com/), I think this book has a place on the (virtual) bookshelves of intermediate/advanced C++ developers. It simply covers more and goes into topics deeper than the other mediums I mentioned.

It can also serve as a source of inspiration for developers who want to go to the next step in their careers or for bloggers like me who are looking for more advanced topics to learn and share about.

Probably this latter has been the most important use of this book for me. I found a lot of small parts of the STL, I want to master. Just to mention a couple of alike topics: piecewise construction or template constructors.

I can't recommend [this book](https://amzn.to/2HXyku9) to read from cover to cover as I didn't do it, but I definitely suggest to skim it through and spend more time on the topics you find interesting, first to read the corresponding chapters and then to find ways to practice what you read.

_This article has been originally posted on my [blog](http://sandordargo.com/blog/2019/07/10/cpp-standard-library-a-tutorial-and-reference). If you are interested in receiving my latest articles, please [sign up to my newsletter](http://eepurl.com/gvcv1j) and [follow me on Twitter](https://twitter.com/SandorDargo)._
Supercharge API interactions with curlx!
Tags: showdev, node, cli
Published: 2019-07-09 22:09:13

---
title: Supercharge API interactions with curlx!
published: true
description: If cURL and Postman had a baby
tags: #showdev #nodejs #cli
---

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

I've really like the features GUI http clients (eg - Postman) offer such as history, collections, ability to share requests etc but I personally prefer using standard cURL for speed and ease of use.

I built [curlx](https://curlx.dev) to bring the best of both worlds. In addition you also get a rich formatted output along with response headers. 

Under the hood, its just a curl command, so if you are already know how to use curl, replace `curl` with `cx` or `curlx` and that's it. 

### Notable features:

- History:

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

Every request you make is logged with a unique id for quickly executing it in future. Run requests faster without having to type in the entire request again.

- Collections:

![](https://curlx.dev/Collection.png)

Just like in Postman, organize your requests into groups/collections helping you to discover or re-run frequent requests faster.

- Sharing:

Share your requests and collections with your teammates easily. The cxdb folder on the root directory contains the history and collection json files (export ready).

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

It's open source so feel free to check it out, report bugs, add features etc. Would love to get your feedback!
Github - https://github.com/shivkanthb/curlx

Connect with my on Twitter [@shivkanthb](https://twitter.com/shivkanthb)
Predict the price of the stocks | ML Challenge
Tags: machinelearning
Published: 2019-07-10 05:22:57

Can you predict the price of the stocks 

This challenge is picked from <a href="https://www.hackerearth.com/challenges/competitive/freedom-from-uncertainty-hackerearth-machine-learning-challenge/"> HackerEarth Machine Learning Challenge - Freedom from uncertainity</a>

Problem statement

Let’s consider a hypothetical scenario. In times to come, the entire planet is ruled by three companies that are making people bankrupt. The only hope to defeat them is by understanding their trading systems, such that we can dissolve them once and for all. There is already a trading agent in place. You need to maximize the damage caused to the evil trinity by building a solution. This solution needs to predict the price of the stocks of these three companies. This problem is based on financial management. 

 

Data set

The dataset contains all the essential parameters that affect the prices. For this particular dataset, the training set includes the prices of the stock against every day.

The benefits of practicing this problem by using Machine Learning techniques are as follows:

This challenge encourages you to apply your Machine Learning skills to build models that can predict the prices of the stock.

This challenge helps you to enhance your knowledge of regression actively. Regression is one of the basic building blocks of Machine Learning.

Your mission, should you choose to accept it, is to defend the world from poverty by predicting stock prices.
Dual booting Ubuntu Budgie on Windows laptop
Tags: linux, ubuntu
Published: 2019-07-10 04:55:49

My thoughts on the process of installing Ubuntu Budgie in parallel to Windows 10 on a Dell Inspiron 15 7000 series laptop.

Preconfigured Dell windows machine don't make it easy for you to dual boot Linux. I really had to mess around in BIOS to make it work.

Steps that I followed:
1. Disable secure boot.
2. Change boot order
3. Change SSD config from RAID to AHCI (https://www.youtube.com/watch?v=9ngnIKqPOc4)

All of this creates a lot of friction and had to Google around a lot to get to this point which is not really idle for new users and experienced people alike.

My inbuilt nVidia GPU gave me a very hard time with the whole install process. My machine went blank everytime I logged into Linux. I initially couldn't understand what was happening & reinstalled Linux multiple times just to make sure the installation was fine.

Again after a lot of googling I figured out that its a nVidia driver issue so I had to
1. Go to command-line before login
2. Setup my wifi from CLI
3. Add the repo for drivers, Install & configure the drivers from CLI
And all this on a 4k display without font scaling, so literally reading ants there.

And this whole situation can only be fixed if distros ignore nVidia hardware unless drivers are installed bcoz Distros can't bundle the proprietary drivers due to licensing issues.

After successfully installed and working, few things I'm missing from windows in Ubuntu Budgie
1. Factional display scaling. It's either 100% or 200%. Nothing in between
2. Native apps for Notion, Google Drive backup & sync. 
But this list used to a lot longer 4-5 yrs ago so thats a very good sign of how much the ecosystem has evolved over the years.

All this is just the initial thoughts. They will evolve I'm sure. Overall things are fine. What my expectation out of this move is a secure & a dev friendly work environment and better compilation speeds. I'm still not holding my breath for improved battery life though.

Edit:
Received some help from my twitter friends which shared the following links to help out with some of the issues
https://www.omgubuntu.co.uk/2019/06/enable-fractional-scaling-ubuntu-19-04
https://www.omgubuntu.co.uk/2019/02/odrive-google-drive-linux-client
https://www.omgubuntu.co.uk/2019/05/slimbook-battery-optimizer-ubuntu

A helpful link I found: https://medium.com/@pwaterz/how-to-dual-boot-windows-10-and-ubuntu-18-04-on-the-15-inch-dell-xps-9570-with-nvidia-1050ti-gpu-4b9a2901493d
How is your portfolio built?
Tags: discuss, showdev, career
Published: 2019-07-10 04:07:11

My portfolio site has gone through several different iterations. It started as a plain html site, then moved to WordPress when I learned how to build themes. For the past few years, my portfolio has been built with Gatsby and has been served by Netlify. 

How is your portfolio site built? Show me your portfolio!

My Portfolio: https://www.iamtimsmith.com
Hello, World!
Tags: csharp, gamedev
Published: 2019-07-10 04:01:45

Oh ho ho. My title is so clever.

Hello, everyone. I am Kelly. I am a software engineer by day and a game dev by night. I am the lead engine developer on a sandbox ARPG for [Obvious Piranha LLC](https://twitter.com/ObviousPiranha).

I have decided to enter the wild world of blogging. I've been a selfish consumer of knowledge on the Internet to the point where I become upset when I cannot find   key information. An important habit I've picked up recently is carefully recording and organizing links in a way (private wiki) that my team can easily access.

I've come to appreciate this habit for myself. Learning things and documenting them helps me immensely. The deeper I delve into my engine, the more I run into obscure problems that require crazier solutions. I've started feeling guilty keeping those realizations to myself. I want to keep a public journal of key discoveries in hopes that I can inspire, enlighten, or learn.

I already have a number of posts I'd like to write. I just need to make the time for them. The first post will likely go into detail why I chose to use C# to write a game engine from scratch! (Not C++? Not Unity? Blasphemy!)
nodejs project full&clean build with lerna monorepo
Tags: node, npm, lerna
Published: 2019-07-10 04:00:25

```console
$ rm -rf ~/.npm/_cacache 
$ npm cache clean --force
$ lerna clean
$ rm -rf node_modules
$ npm install
$ lerna bootstrap
$ lerna run build
```

If the nodejs fails, it will be due to npm and webpack,
as gem and nokogiri did in ruby.