teleren/devto huggingface dataset:
Couple of words about development of a new static analyzer for Java code
Tags: java, staticcodeanalyzer, programming, codequality
Published: 2018-06-22 09:00:30

---
title: Couple of words about development of a new static analyzer for Java code
published: true
description: 
tags: java, static code analyzer, programming, code quality
---

![How Dr. Frankenstein assembled the analyzer from pieces](https://www.viva64.com/media/images/content/b/0572_Java_analyzer/image4.png)

PVS-Studio static analyzer team, which until recently was searching for bugs and potential vulnerabilities only in C, C++, and C# code, has prepared a new version of their tool for Java code as well. Despite the fact that in the Java world there is already a number of static analysis tools, developers believe that their analyzer can be powerful and will be a good competition. 

One of developers wrote in [his article](https://www.viva64.com/en/b/0572/) about the way how PVS-Studio for Java was created. First of all, it was necessary to figure out the development process of a syntax tree and semantic model. As these elements are basic, static analyzer is built around them.  In addition to them, the analyzer also requires data flow analysis, which  enables you to calculate the possible values of variables and expressions in each point of the program and, thanks to that, find errors. Also the analyzer needs the annotation mechanism, diagnostic rules, integration, testing, and other techniques, explained in detail in the article. 

Traditionally, the author gave examples of errors from different open source projects, that the Java analyzer has detected.  The author also noted that in the future articles with a more detailed report on each project will be available. So far you can review errors from the Hibernate, Hive, JavaParser, Jenkins projects and several others.

Besides that, when the first alpha version of the Java analyzer is available, developers suggest participating in its testing for those who would like to.  To do this, write to their support and they will contact you.

Full article - [https://www.viva64.com/en/b/0572/](https://www.viva64.com/en/b/0572/)
Easy MATLAB CFD Simulation Tutorial - Flow Around a Cylinder
Published: 2018-06-22 08:10:05

This tutorial model example illustrates how one can set up and solve computational fluid dynamics problems both easily and quickly with the [FEATool Multiphysics FEM and CFD Toolbox](https://www.featool.com/matlab-cfd-toolbox) for MATLAB.

![MATLAB GUI for CFD simulations](https://thepracticaldev.s3.amazonaws.com/i/8dd9xhg1cg6ea9psm2am.jpg)

[YouTube Flow Around a Cylinder CFD Benchmark MATLAB Tutorial](https://youtu.be/ZnnXl7ryBMI)

This model example studies stationary and laminar flow around a cylindrical obstacle in a channel with Re=20. The computed pressure drop, and drag and lift coefficients are compared with established benchmark references to assert the accuracy of the simulation.

Although not featured in this tutorial, in addition to the built-in stationary, non-linear, and transient flow solvers, FEATool also features built-in GUI interfaces for the FEniCS and OpenFOAM CFD solvers. A benchmark study has been made which compares OpenFOAM, FEniCS and FEATool for this fluid flow test case and illustrates how well ones can perform [CFD bencmark and simulations in Matlab](https://www.featool.com/cfd/2018/07/02/fenics-openfoam-matlab-cfd-flow-solver-benchmark).

The model is also available in the tutorial and examples section of the FEATool Multiphysics User's Guide:

[FEATool User's Guide: Flow Around a Cylinder CFD Benchmark MATLAB Tutorial](https://www.featool.com/doc/tutorials.html#ex_ns1)

References:

[1] John V, Matthies G. Higher-order finite element discretizations in a benchmark problem for incompressible flows. International Journal for Numerical Methods in Fluids 2001.

[2] Nabh G. On higher order methods for the stationary incompressible Navier-Stokes equations. PhD Thesis, Universitaet Heidelberg, 1998.
Friday Blast #43
Tags: fridayblast, links, post
Published: 2019-01-20 15:25:54

---
title: Friday Blast #43
published: true
tags: friday_blast,links,post
canonical_url: https://horia141.com/friday-blast-43.html
series: "Friday Blast"
---

[Optimal low-rank matrix approximation (2018)](https://www.johndcook.com/blog/2018/05/07/truncated-svd/) - decomposing matrices into pieces is one of the workhorses of engineering and statistics (and applied math). Recommender systems, image compression, PCA etc. all can be reduced to some form of matrix decomposition. Here John Cook speaks about the optimal approximation, which is, for general matrices, the SVD (no surprise there). I really liked the expression of <script type="math/tex">A = \sum_{i} \alpha_i u_i v_i^T</script>. Makes it really clear just how “small” the decomposition can be.

[What every engineer should know about open source software licenses (2018)](https://eng.uber.com/oss-ip/) - there’s a lot to know actually. From which licenses there are and the various families (copy left, Apache, MIT etc), to how and when to allow them in dependencies in code, to how to use them when open-sourcing company-time work. Good read overall.

[Subscription hell (2018) #hn-link](https://news.ycombinator.com/item?id=17007036) - a nice TechCrunch article about _where we’re headed_ with subscription services. I’ll have a short piece on this soon as well.

[Encoding vs encryption vs hashing vs obfuscation (2011)](https://danielmiessler.com/study/encoding-encryption-hashing-obfuscation/) - simply what each is. A working programmer encounters all of them, so it’s good to be precise about these things.

[Migrations - the sole scalable fix to tech debt (2018)](https://lethain.com//migrations/) - here’s an interesting piece. All organizationas, whether technical or not, accumulate tech debt. You have to clean it up sometime, lest it overwhelms you (and causes the breakdown of business processes as well). But the author, an experienced manager, argues that the solution is a _migration_, rather than constantly patching and fixing the status quo. A migration means a large scale move from one system / platform etc. to another, which implicitly adresess a lot of the issues currently faced by the organization.

[Chatbots were the next big thing - what happened? (2018)](https://blog.growthbot.org/chatbots-were-the-next-big-thing-what-happened) - the NLP just wasn’t there yet. But it’s more complicated than that - there were inflated expectations, UX issues to cross (text != GUIs we’re used to), tech issues (many platforms were not ready to become chat-based). But as things evolve, and as AI problems become AI reality, we’ll probably see chatbots make a comeback.
Resources for Getting into DevOps?
Tags: help, discuss, devops
Published: 2018-06-22 06:14:46

---
title: Resources for Getting into DevOps?
published: true
description: I want to take a step into the amazing world of server management, can you help me out
tags: help,discuss,devops
---

I was very recently introduced to using Docker and Docker Swarm, and I got interested in cluster management and horizontal scaling. How the nodes balance the load was fascinating to me. Can anyone provide some resources like books or online courses to seriously get into DevOps?
Class notes: Getting started with Pandas DataFrames
Tags: beginners, machineleaning, coursera, pandas
Published: 2018-06-22 04:46:54

---
title: Class notes: Getting started with Pandas DataFrames
published: true
description: Introduction to Pandas Data Frames for complete beginners
tags: beginners, machineleaning, coursera, pandas
---
Here I'll put down the basics of working with Pandas DataFrames.

[DataFrame](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html) is the primary Pandas data structure, which allows us to easily work with data tables. 

A data frame can be constructed from a dict:

```python
import pandas as pd
frame = pd.DataFrame({'numbers': range(3), 'chars': ['a'] * 3})
```
it gives us the following output:

|   |chars|numbers|
|---|-----|-------|
|  0|    a|      0|
|  1|    a|      1|
|  2|    a|      2|

Also, DataFrame can be initialized [from a .csv file](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html):
```python
frame = pd.read_csv('file.csv', headers=0, sep='\t')
```
The first argument is a file name, the second is indexes of rows containing headers (int or a list of ints), the third is a data separator that will be used, a tab here ('\s' for a single whitespace, '\s+' for multiple whitespaces).

**Columns headers** can be extracted using the following:
```python
frame.columnsm
# Index([u'chars', u'numbers], dtype='object')
```

Another useful command returns the **frame size**:
```python
frame.shape
# (3, 2)
```

Let's add a row:
```python
new_line = {'chars': 'b', 'numbers': 8}
frame.append(new_line, ignore_index=True, inplace=True)
frame
```
it gives us the following output:

|   |chars|numbers|
|---|-----|-------|
|  0|    a|      0|
|  1|    a|      1|
|  2|    a|      2|
|  3|    b|      8|

The _inplace_ keyword shows that the result should be written into the original variable, not just return the resulting frame to the output.

Adding a columns is easier:
```python
frame['bools'] = [False] * 3 + [True]
frame
```

|   |chars|numbers|bools|
|---|-----|-------|-----|
|  0|    a|      0|False|
|  1|    a|      1|False|
|  2|    a|      2|False|
|  3|    b|      8| True|

Rows and columns can be [dropped](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.drop.html):
```python
# the first argument is a list if indexes, 
# the second is the axis (0 is for rows, 1 is for columns)
frame.drop([0,1], axis=0, inplace=True)
```

|   |chars|numbers|bools|
|---|-----|-------|-----|
|  0|    a|      2|False|
|  1|    b|      8| True|


The result can be [saved into a .csv file](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_csv.html):
```python
frame.to_csv('updated.csv', set=',', header=True, index=None)
```
JavaScript: getting the first element of an array without indexes
Tags: littlenotes, beginners, javascript
Published: 2018-06-22 04:45:33

---
title: JavaScript: getting the first element of an array without indexes
published: true
description: 
tags: little_notes, beginner, javascript
---

```javascript
const a = [1, 2, 3];
const [b] = a;
b
// 1
```

[] is the decomposing operator.

Also:

```javascript
const [c, ...rest] = a;
c
// 1
rest
// [2, 3]
```

... is the rest operator.
Tags
Tags: docker, openshift, kubernetes, containers
Published: 2018-06-22 04:36:23

---
title: Tags
published: true
description: my OpenShift and DockerCon posts have tags
tags: docker, OpenShift, Kubernetes, containers
cover_image: https://thepracticaldev.s3.amazonaws.com/i/mbm1o0ljx3r0zictpxok.jpeg
---

All my DockerCon '18 posts now have a tag so you can see them all in one place:

https://vault.osninja.net/tag/dockercon-18/

The OpenShift for Mere Mortals series has a tag as well:

https://vault.osninja.net/tag/openshift-for-mere-mortals/
Updating a dict in python
Tags: littlenotes, python
Published: 2018-06-22 04:22:13

---
title: Updating a dict in python
published: true
description: 
tags: little_notes, python
---

I've been a python dev for more than two years and somehow I didn't know that dicts can be updated by kwargs. Like this:

```python
>>> a = {'a': 1}
>>> a.update(b=5)
>>> a
{'a': 1, 'b': 5}
```

So obvious, yet.
Sharing is the key to knowledge
Tags: firstblog
Published: 2018-06-22 03:33:52

---
title: Sharing is the key to knowledge
published: true
description: Hello World!
tags: first blog
---

"Hello world!"; this is the title I want to use for my first blog. It is basically used by most programmers today in the world when they try out a new programming language for the first time. Also, the beginning for most, maybe all, successful developers today.

Starting to write a blog for what I am thinking is the last thing I want to do. It is not in my personality to share what my thoughts are about something. Maybe I am scared to know what other people might think about my opinion and suggestions. Some say that they don't give a shit about others' comments about them but not me. I always believe that the things you say and tell about, reflect on who you are. You must be careful and think more than twice before you say something and post outside the social media world. Yeah, you might think then why am I writing today. Honestly, I admire people who share a portion of what they think, have guts to defend and be proud about it. I see it as a huge help for the community to learn new things. For developers, we use Github as a platform and call it "repository". It is open source meaning it is publicly available for everybody to use and modify.  This allows developers to contribute to the project and to the community.

Yes, I agree that not all that we experience are good or bad; right or wrong. We all have our own preferences on solving problems and our own ways of handling them. I also believe that starting what you have never done before makes you brave enough and conquer your fear. Letting other people voice out their comments on you helps you to learn and build who you are. Reading, as well as writing makes your mind active about what others believe.
Will there be more GoLang's jobs in the future or not.
Tags: discuss, go, career
Published: 2018-06-22 03:25:06

---
title: Will there be more GoLang's jobs in the future or not.
published: true
description: asking about whether there will be more jobs available for go developers in the future.
tags: discuss, go, career
---

Do you guys think that GoLang jobs will increase in the future because right now, it's pretty hard to get a job unless you start your own project to be honest!
Browser implementation of console.log
Tags: webdev, javascript
Published: 2018-06-22 00:25:40

---
title: Browser implementation of console.log
published: true
description: learning data types
tags: web development, javascript 
---

![Kawaii Console](https://thepracticaldev.s3.amazonaws.com/i/e5mqiej65pvpc84zn5m0.gif)

{% codepen https://codepen.io/Kauress/pen/pKWpxm %}

Here is a codepen for a browser implementation of console.log (and others) to teach data types. 

 Browser implementation of:

    console.log()
    console.clear()
    console.warn()
    console.trace()

1. The console's logs the "typeof" of the value logged
2. The index of array items and property-value pairs in objects are also logged


https://codepen.io/Kauress/pen/pKWpxm
What Go programming video-tutorials would you like to see content-creators produce?
Tags: go, discuss, learn, beginners
Published: 2018-06-21 23:37:11

---
title: What Go programming video-tutorials would you like to see content-creators produce?
published: true
description: 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/pglg0thqvolue2w2wef7.png
tags: #go #discuss #learn #beginners
---

###As for myself:


* A thorough walk-thru of the entire **Go Standard Library** for beginners

* Building **CLI-apps** both __*with*__ and __*without*__ Cobra

* Extensive video-tutorial on **Go-Buffalo** from beginner to expert

* *Data-Structures* and *Algorithms* with **Go**
I'm visiting dev.to more & more every day 😍
Tags: discuss, learning
Published: 2018-06-21 21:41:55

---
title: I'm visiting dev.to more & more every day 😍
published: true
description: 
tags: #discuss #learning
---

I've noticed that I'm beginning to visit **dev.to** more than social-media or almost any other site. The save posts feature is really nice.  I've built-up a very nice reading list for myself.  Also, some of you post really great dev content.  Thanks!
APIs - The Building Blocks of Software Meetup hosted @Google Developer Group in Berkeley, CA 💻🤓👩🏽‍💻😍😎
Tags: node, javascript, webdev, cs
Published: 2018-06-21 20:26:16

---
title: APIs - The Building Blocks of Software Meetup hosted @Google Developer Group in Berkeley, CA 💻🤓👩🏽‍💻😍😎
published: True
description: 
tags: nodejs, javascript, webdev,cs
---

Save the date! 📆 On August 9th, you’ll want to be Google Developer Group in Berkeley, CA, where I will be showcasing how quickly you can build a working API right from your browser using Code.xyz.  Bring your  💻🤓👩🏽‍💻😍 Reserve your spot here: {https://www.meetup.com/GDGBerkeley/events/252001811/}
Hosting Blazor on Netlify
Tags: blazor, csharp, staticsites, serverless
Published: 2018-06-23 04:19:54

---
title: Hosting Blazor on Netlify
published: true
tags: 
  - Blazor
  - CSharp
  - Static Sites
  - Serverless
cover_image: https://thepracticaldev.s3.amazonaws.com/i/bb67fht3us4tr1xsko14.png    
canonical_url: https://mattferderer.com/host-blazor-on-netlify
---

Since Blazor is a frontend framework, we can host our Blazor apps on any serverless or static web host. The only requirement is that we need to add minor configuration to redirect URLs so that all URLs point to our index.html page. [Netlify](https://www.netlify.com/) fits this perfect. [Netlify](https://www.netlify.com/) also happens to be my favorite host for static websites.

## Prerequisites

* [.NET Core 2.1 or later](https://go.microsoft.com/fwlink/?linkid=873092)

* Blazor templates should be installed. `dotnet new -i Microsoft.AspNetCore.Blazor.Templates`

## Create a Demo Blazor App

Create a new Blazor app with the command: `dotnet new blazor -o staticDemo`

Make sure your app works by running `dotnet run`

## Netlify Specific Steps

Add a file named `_redirects` in your `wwwroot` directory.

Add the following line to your `_redirects` file:

```text
/*    /index.html   200
```

This redirects any URL to the index.html file. Since Blazor is a SPA tool, if someone enters a URL such as oursite.com/counter we don't want the server to look for a counter file. Instead the server should direct the request to index.html which will take care of the routing.

If you publish on another static host or a serverless environment, check their docs for how to write a similar redirect.

## Publishing to Netlify

Once we're done with that, the easiest way to deploy to [Netlify](https://www.netlify.com/) is to add this to a GitHub repo.

Netlify can't build this project for us since they can't build dotnet. We'll need to handle building & adding the files to our repository.

By default the .gitignore file created with our project ignores the default build directory. You can modify your .gitignore file to not ignore the default release directory. Then you can run `dotnet publish -c release`.

Another option is to publish to a different directory using the `-o` parameter. Here's an example: `dotnet publish -c release -o ./dist`

Once you've done either of the above, push your changes to a GitHub repository.

After that you can go to Netlify & create a new site from your GitHub repository. After linking your site to your repo, you're prompted with deploy settings. You can ignore the build command. For the publish directory, add the directory you published to. It should look like this:

```text
_framework
css
sample-data
_redirects
index.html
```

 Every time you push changes to your repository, Netlify will re-deploy them.

 If you run into issues or you deploy this elsewhere, let me know in the comments below.

*Originally posted on [mattferderer.com](https://mattferderer.com/host-blazor-on-netlify).*
What was your worst experience with a programming language?
Tags: discuss, programming, python, experience
Published: 2018-06-21 19:12:30

---
title: What was your worst experience with a programming language?
published: true
description: 
tags: #discuss, #programming, #python, #experience 
---

My worst experience with a programming language was C the reason why C was like a nightmare for me was that is not an easy language not for beginners back in that time my first experience with a language was Python and jump to something of the level of C for a beginner is not a friendly choice.

When we code we do analogies about the knowledge we have about other languages so when we code in a new language we thought in our mind oh that's the way they manage  this because is better for that and in the day of the journey we learn new things with that experience, but we know C  doesn't have the abstraction of the modern programming languages because the kind of task the language manage like low-level stuff and OS requirements in the past I didn't know this so was hard for me coding in that language.

What was your worst experience with a programming language? leave your comments below.
Getting Started with the New WebVR API
Tags: webvr, api, webgl, vr
Published: 2018-06-21 15:39:09

---
title: Getting Started with the New WebVR API
published: true
description: Learn how to create virtual reality experiences on the web using the Threejs WebGL library and the WebVR UI library.
tags: #webvr #api #webgl #vr
canonical_url: https://auth0.com/blog/getting-started-with-the-new-webvr-api/
---

One of the greatest moments for the web is when an API emerges and brings the ability to create an application on the web (with web technologies) that was only possible to develop natively. The emergence of the WebVR API is one of such fireworks moment that opens a whole new world of exciting possibilities. The WebVR API empowers web developers to build virtual-reality experiences with web technologies and also enable users to have that fully immersed experience using just their browser.

This article takes you through a small project built with WebVR. Although you won't be going into details on the basics, it will help you to understand all the moving parts and how everything fits together to create amazing virtual reality scenes.

[Read on 🎮](https://auth0.com/blog/getting-started-with-the-new-webvr-api/?utm_source=dev&utm_medium=sc&utm_campaign=webvr_api)

![Getting Started with the New WebVR API](https://thepracticaldev.s3.amazonaws.com/i/qpbnzkco2qa58yjlgbei.png)