teleren/devto huggingface dataset:
Java compiler error cascades... and fixing them
Tags: programming, java, watercooler, refactorit
Published: 2019-09-09 22:52:12

So you know how, when programming, in a sudden realization of the power of code reuse, you decide to merge two prior programs you wrote into one, not realizing all the complexity and compiler error fixing this entails? This is my tale of exactly this experience...

I am working on a game called Fantastle Reboot - as the name might imply, it's a reboot of an earlier game of mine called Fantastle. I decided to merge the bits from TallerTower, another game I made, into Fantastle Reboot. It was at this point, after I started refactoring, that the compiler errors popped up... at one point I had 2.5k errors staring me in the face!

The good news is that a little over half of these are easily fixed by find-and-replace (or IDE tools) to fix the references that broke during the renaming. The rest required some deep thought about how to merge two similar but distinct implementations of things, and dealing with MORE broken references after merging... and inevitable dependency chain violations causing another thing to need merging.

Twenty or so iterations of this, and the error count slowly decreased... from 2.5k to 1.2k, then 800, 600, ... 10, 6, 2, and finally 0! The compiler is happy, but... of course, the program doesn't run, because of a runtime check that is unsatisfied. My work is therefore far from done.

Let this be an important lesson: refactoring can be very much an iterative grind, but when combined with a divide and conquer approach, and the knowledge that some fixes will add new errors, you will eventually get there, as I did.
Python Powered Journalistic Freedom With SecureDrop
Published: 2019-09-10 01:29:39

<p>The internet has made it easier than ever to share information, but at the same time it has increased our ability to track that information. In order to ensure that news agencies are able to accept truly anonymous material submissions from whistelblowers, the Freedom of the Press foundation has supported the ongoing development and maintenance of the SecureDrop platform. In this episode core developers of the project explain what it is, how it protects the privacy and identity of journalistic sources, and some of the challenges associated with ensuring its security. This was an interesting look at the amount of effort that is required to avoid tracking in the modern era.</p><p><a href='https://www.pythonpodcast.com/securedrop-whistleblower-platform-episode-228/'>Listen Now!</a></p>
How to implement Dark Mode in CSS with @media
Tags: css, tutorial
Published: 2019-09-10 13:09:44

Dark mode is a really popular feature in both Windows and MacOS, as well as iOS devices, too.

Now, with the latest browsers on these OSes, you can deliver the dark mode experience on your website or webview based app as well.

It's as simple as encapsulating all the dark mode overrides in a spefic media query that ONLY activates when dark mode is detected on the browser's OS. 

Here it is:

```css
@media (prefers-color-scheme: dark) {

}
```

I hope that helps a few folks get dark mode implemented on their website or app!

...

Want more?  I wrote a [full tutorial here](https://dev.to/joelvarty/how-to-implement-dark-mode-in-css-mec) that walks you through a longer process of actually implementing a dark mode theme using npm and bulma.
Do you create templates or automate initial setup?
Tags: discuss, productivity, template, tooling
Published: 2019-09-11 07:59:08

This discussion concerns freelancers, employees and owners of side projects alike.

Who doesn't know it: You laboriously set up a development environment, configure everything and start the project.
Later on in another project you copy the whole or parts of the previous project, change some things, get annoyed about mistakes and places you forgot to adjust and end up with a running second project.

With private side projects it is just as annoying, but not critical. In a professional working environment, however, you should avoid these unnecessary times. Especially as a freelancer, it is even more important, as this has a considerable influence on delivery times and hourly wages.

A current example from myself:
Some time ago I set up an app with Next, React and GraphQL (Prisma).
Just the rough steps:
- Deploy Prisma Server to [DigitalOcean](https://digitalocean.com/) (Docker)
- Set up MySQL Server (also Docker)
- Configuring Firewalls
- Set environment variables correctly in the project
- Initialize Git

This architecture was an exact fit for my next project and so I created a `docker-compose.yml` file to facilitate the deployment of the Prisma server and the MySQL server.
For the backend and frontend part I duplicated the folder of the old project and had to (with the help of search and replace) painstakingly go through all configurations, customize them and change other places (app name, constants, etc.).
This all seemed very tedious to me.
In the end, I wrote a short shell script for those tasks aswell.

Then this morning I read the article about the $200 challenge:
{% link florinpop17/the-200-challenge-22mk %}

I thought:
As a freelancer you have to be able to start a new project quickly and you need templates for different types of projects and best of all scripts to automate the setup.

### What I use so far
- Scripts to deploy maschines on DigitalOcean (via API)
- Scripts to setup the firewalls on DigitalOcean (via API)
- A temaplate I created on base of my first React+GraphQL tutorial from the course of {% user wesbos %} (hey Wes, sick-fits was great! 👍)
- Various docker-compose files for different topologies
- AWS Cloud9 partially as IDE to be able to code from anywhere and to be able to share it with others if needed.

So now I'm curious...

#### ❓What templates did you create?
#### ❓For which stacks?
#### ❓Do you use scripts? If so, what do they do? (rough)
#### ❓Do you have a local IDE or in the cloud? (AWS C9, Codenvy,...)
#### ❓What other clever helpers did you build?
Avoid using float values for font-size property
Tags: css
Published: 2019-09-11 09:59:14

Let's say that the designs you received include using float values as **font-size** (e.g. 14.5px). What do you do?

**Don't use it**.

Don't get fooled by the fact that it works for Chrome and Firefox.
Safari (with the default zoom) is not handling these accurately. It's rounding the value up or down.

> *\>= .5* - rounded up: 10.5px => 11px
< *.5* - rounded down: 10.4px => 10px

That basically means that on Safari *font-size: 10.5px* will render just the same as you would use *font-size: 11px*.
Exploring Blazor, or C# and .NET in the Browser without Plug-ins
Tags: webdev, dotnet, csharp, blazor
Published: 2019-09-11 22:37:01

---
title: Exploring Blazor, or C# and .NET in the Browser without Plug-ins
published: true
description: Full presentation video with hands-on demonstration of Blazor, a cross-platform solution for building Single Page Applications using C#. Learn about WebAssembly and how it enables .NET to run in the browser without plugins and see firsthand how fast and easy it is to build web apps
cover_image: https://thepracticaldev.s3.amazonaws.com/i/t6u78u9x16lwcjps4r0l.jpg
tags: webdev, dotnet, csharp, blazor
canonical_url: https://blog.jeremylikness.com/blog/exploring-blazor/
---

There’s been a ton of buzz in the .NET community lately around 🔥 Blazor. Unlike many hyped technologies however, Blazor seems to have earned the attention. It earned it in part by delivering a solution that gives C# developers what they want but doing so in a way that relied on open web standards. In this session, I go deeper into what Blazor is, how it works and how you can use it to build web apps.

{% youtube BjCgD7sW8FA %}

Access the full source code for all demos here:

{% github JeremyLikness/blazor-wasm %}

Over a decade ago, the first version of Silverlight was released and rapidly became a panacea for C# developers to write client web apps. The combination of plug-in free smartphones and evolving HTML5 standards led to its fast demise. From its ashes a new framework has been born that accomplishes what it could not: running .NET, in every modern desktop and phone browser, without plug-ins. Learn about Blazor, a framework for building Single Page Applications (SPA) that uses the power of WebAssembly to bring .NET apps to your browser.

Enjoy the presentation!

▶ [Get started with Blazor](https://docs.microsoft.com/aspnet/core/blazor/get-started?view=aspnetcore-3.0&tabs=visual-studio&WT.mc_id=devto-blog-jeliknes)
Github Action for PHP packages
Tags: github, actions, php
Published: 2019-09-11 23:35:27

GitHub recently launched [GitHub Actions](https://github.com/features/actions) which allows applications to do CI/CD in GitHub itself based on a workflow defined in a `yml` file which lives alongside the code in `.github/workflows` much like if you used Travis CI, you would have a `.travis.yml` file.

Anyone looking to test PHP packages can just use the [setup-php](https://github.com/shivammathur/setup-php) action, run the tests and do CI/CD. The action sets up PHP, along with required extensions, tools and configuration. The setup-php action works on all virtual environments viz. `linux`, `macOS` and `windows` supported by GitHub actions. For more info check the [PHP Action](https://github.com/shivammathur/setup-php)

{% github shivammathur/setup-php no-readme %}

Here is an example of how you can use it

```yaml
name: Test
on: [push]
jobs:
  build:
    strategy:
      matrix:
        operating-system: [ubuntu-latest, windows-latest, macos-latest]
        php-versions: ['7.2', '7.3', '7.4']
    runs-on: ${{ matrix.operating-system }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: mbstring, intl
          ini-values: post_max_size=256M, log_errors=1
          coverage: pcov
          tools: pecl
      .... Add more steps to install dependencies and then test

```
Can Rust replace C/C++ as a systems language?
Tags: discuss, rust
Published: 2019-09-12 04:14:31

I have been watching the [CMU Advanced Database Systems](https://www.youtube.com/playlist?list=PLSE8ODhjZXja7K1hjZ01UTVDnGQdx5v5U) course lectures on YouTube and have been trying to implement some pieces of a database in Rust as I watch. I have been impressed with how easy Rust makes some of the high-level code (thank you, pattern matching, enums, Option type, et al.). The tooling is also incredible, thanks to Cargo, rustup, and Clippy. However, writing the kind of code that is necessary for databases, memory allocators, device drivers, and other classic "systems" software seems difficult at times.

Guaranteed memory safety may not be conducive to software that has a core need to manage memory. For example, a database needs to pack values together in contiguous memory and interpret the type of the data at runtime. This is not too difficult but requires the use of `unsafe` code - and losing the memory safety of the Rust compiler. Is Rust's memory safety desirable in a low-level programming language? At what point should the burden for preventing bugs be placed on the compiler, and at what point should it be on the developer and a good suite of unit tests?

I don't love C++, but I wonder if it could lead to simpler implementations of low-level software.
Node.js vs Go: Which Is Better for Backend Web Development?
Tags: codequality, devops, productivity, beg
Published: 2019-09-12 14:23:23

Being responsible for all business logic and other sensitive operations under the hood, the backend of your app is truly the most essential part of your product. There are many factors that define the quality of an app, such as its ability to perform well and scale smoothly as well as the maintainability of code and overall system security. All of this depends directly on the quality of the web application’s backend. That’s why it’s important to choose the right tool for your project. 

When it comes to choosing a tech stack for backend development, you have a plethora of options: Ruby, Node.js, Go, Python, PHP, etc. Within this diversity, making a decision without knowing essential facts about each of these technologies can be burdensome. We’re here to help you with this decision. 

At Yalantis, the primary technologies we use for backend development are Ruby, Go, and Node.js. In this article, we’ll pay close attention to Go and Node.js – these two technologies have been considered the most promising backend technologies recently. Node.js, a JavaScript runtime environment, was named the most widely used development tool in 2018, while Go, a programming language developed by Google, has shown rapid growth in popularity in recent years. 

Сheck out how we tackle the most common backend challenges!

In 2018, JetBrains named Go the most promising language. Uber, UpGuard, and Koding have migrated from Node.js to Go, and Basecamp, which developed the Ruby on Rails framework, is actively using Go for their backend services. Let’s find out which of these two tools is best for your project. 

See more: https://yalantis.com/blog/golang-vs-nodejs-comparison/
Vue ~ Exploding button - hardware accelerated animation
Tags: codepen, javascript, vue, webdev
Published: 2019-09-12 21:24:38

Following on again from my experiments with maths and circles, this one's a bit special as all the coordinates are calculated with translate allowing for cheaper paints. I have fully optimized the animation.

Accessibility is also retained and I suppose animation could be turned off if needed.

Currently unstyled and unfinished, but I was to excited and had to share a preview.

{% codepen https://codepen.io/acronamy/pen/jONxRJe %}
Everything Serverless Functions in AWS Amplify - Part 3
Tags: aws, amplify, react, javascript
Published: 2019-09-12 23:56:22

---
title: Everything Serverless Functions in AWS Amplify - Part 3
published: true
description: In the second video we go deeper with serverless functions being used as resolvers in AppSync. We take a look at accessing arguments being passed to the function, as well as how to access sibling data in the resolver and how to handle pagination. We did all using the "amplify mock" command and running the environment locally.
tags: aws, amplify, react, javascript
---

{% youtube huvKSMjqfA4 %}

**In this episode we dive into using a serverless function to handle multiple graphql resolvers as well as interact with a DynamoDB table set up with the Amplify CLI. Also, instead of using amplify mock in this episode we use the AppSync console.**

## Links from video:

{% link kkemple/everything-serverless-functions-in-aws-amplify-part-1-26e3 %}

{% link kkemple/everything-serverless-functions-in-aws-amplify-part-2-18f2 %}

[DynamoDB JavaScript Docs](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html)

## Transcripts:

Transcripts coming soon. Moving to a new service.
Tips for new developers looking for their first job!
Tags: discuss
Published: 2019-09-13 12:03:32

---
title: Tips for new developers looking for their first job!
published: true
description: I was asked for advice on how to get that elusive first dev job.
tags: #discuss
---

Yesterday a new developer asked me for tips and suggestions for getting their first job. One of the suggestions I gave was to get involved in local tech Slacks. Getting to know other local developers, plus recruiters can make a big difference in finding companies that are open to taking on entry level devs, plus if you get to know them well enough they may well be willing to vouch for you, and not much beats that for getting your foot in the door!

What other tips and suggestions do **YOU** have? What's worked for you, or what are you trying in your search right now?
R Programming for Beginners 
Tags: rprogramming, rprogrammingfordatascience
Published: 2019-09-14 05:54:02

R programming has been the most promising language when it comes to data analytics and machine learning as it is equipped with a wide array of functionalities. We are offering the top r programming tutorial that can be watched by anybody to learn r language. Our r programming tutorial has been created with extensive inputs from the industry so that you can learn r programming easily.

Watch Now: https://www.youtube.com/watch?v=OwR-qlxBSXU
HealthCare App: Can Personal BioMetric Data Be Monetized?
Tags: webdev, startup, discuss
Published: 2019-09-15 01:00:29

With the recent popularity of database and network businesses like 23 and Me and Ancestry, is it possible to monetize your Biometric data yourself?

If people are curious enough to pay $200 to view detailed data about how they compare to others, what if you offered that same type of data to people who are curious to know who they are similar to?

After taking a Biology 101 Class and learning about the basics of research, cells, and science, I was inspired to develop an application to monetize Biometric data for good.

I began to realize that majority of Biometric data is currently monetized by medical professionals.

Now companies like Apple, Google, Samsung, Fitbit, Weight watchers, Akins, 23 and Me, and Ancestry have made Biometric Data big Private company business. These companies don’t create the data; They receive the data from the public. They have figured out how to charge the public to collect Biometric Data using wearable technology or DNA samples.

I began to also wonder why there is not a public web portal available to view your Biometric data? Only people with private healthcare insurance plans are able to log into an app or website to view test updates from medical professionals. Why can’t I or anyone create a public Biometric Database?

So, that is when I did some brainstorming and purchased the domain name BIOMETRICPORTAL.com.

I believe everyone, poor or rich should have the first opportunity to monetize their personal Biometric Data. 

Every single human being is unique and the traits that make up who you are can not be found anywhere else in the world.

Everyone, even identical twins are unique because no two people, feel the same, think alike or like the same things.

If you were able to own a “monetizable” personal Biometric data page where people could subscribe to view updates on your personal health, would it be possible for you to earn a living by just existing?

With the help of research, brainstorming, and development, and implementation, I plan to create a new platform that monetizes Biometric Data.
While Loop in Dart
Tags: dart, todayilearned, beginners, code
Published: 2019-09-15 22:53:57

* **While loop** is a type of indefinite loop.

* The while loop executes the block of code until the condition is true.
    
* We mostly use while loop when we don’t know how many times the loop will actually execute at runtime.

* In simple terms when iterations of a loop are known then we mainly use for loop and when iterations are unknown then we use while loop.


###Syntax
***

```dart
while (condition) {
  //Statements to be executed if the condition is true
}
```

###Program
***
```dart
main() {
  int number = 0;

  while (number < 10) {
    if (number % 2 == 0) {
      print(number);
    }
    number++;
  }
}

Output
0
2
4
6
8
```

That’s it for while loop guys. Feel free to share with me if I miss something I will love to learn it from you.

Till Then Keep Loving, Keep Coding. And just like always I’ll surely catch you up in the next article.

Remember no teacher, no book, no video tutorial, or no blog can teach you everything. As one said Learning is Journey and Journey never ends. Just collect some data from here and there, read it, learn it, practice it, and try to apply it. Don’t feel hesitate that you can’t do that or you don’t know this concept or that concept. Remember every programmer was passed from the path on which you are walking right now. Remember Every Master was Once a Beginner. Work hard and Give your best.

###For More Information Please Visit Following Links
* [Fuchsia OS official site](https://fuchsia.dev/)
* [Dart official site](https://dart.dev/)
* [Flutter official site](https://flutter.dev/)


Jai Hind, Vande Mataram 🇮🇳

Wanna get in touch with me? Here are links. I’ll love to become your friend. 😊

- [My Site] (https://www.jaytillu.in)
- [My Blogs] (https://blogs.jaytillu.in)
- [Twitter](https://twitter.com/jay_tillu)
- [Facebook](https://www.facebook.com/jaytillu.1314/)
- [Instagram](https://www.facebook.com/jaytillu.1314/)
- [Medium](https://medium.com/jay-tillu)
- [LinkedIn](https://www.linkedin.com/in/jaytillu/)
- [Github](https://www.github.com/jay-tillu)
- [Stack overflow](https://stackoverflow.com/users/8509590/jay-tillu)
or just mail me at jd.tillu@gmail.com
Cleaning up your code? Here is what VS 2019 has for you.
Tags: visualstudio, visualstudio2019, microsoftvisualstudio
Published: 2019-09-16 10:35:46

---
title: Cleaning up your code? Here is what VS 2019 has for you.
published: true
description: Article about a new feature called Code Cleanup in Microsoft visual studio 2019
tags: VisualStudio, VisualStudio2019, Microsoft VisualStudio
series: New in Visual Studio 2019
---

All we developers would have spent time in cleaning up the code after we are done with a long day of code and coffee! for .Net developers it is to do with removing all the using clause added automatically by visual studio/nuget that you no longer need, removing variables that was not put to use, adding read only to eligible private variables, adding or removing braces from single statement blocks etc etc.

There are a list of tools/extensions that helped developers to automate most of these tasks. Popular of these tools were Re-Sharper, StyleCop, CodeMaid... 

Microsoft with its visual studio versions starting 2012 incorporated many of these feature into the IDE. Up until Visual studio 2017, developers were able to remove unused using, sort using clauses and other cleanups by right-clicking the file and selecting its option or choosing refactoring quick action bulb.

##Executing Code cleanup from visual studio
Visual Studio 2019 has taken this to the next level by introducing an option to run a predefined set of code clean up actions on an individual file or on all files in a project/solution and this option is available in visual studio status bar, Analyse Menu or on your right-click context menu of file/project/solution.

![Options in visual studio](https://thepracticaldev.s3.amazonaws.com/i/x2amonlrj1gij7zzfm7n.png)


###Code cleanup profiles
As you can see from the above screenshot visual studio 2019 allows you to create a list of code clean up activities (which they call fixers)  and save them as what they call a profile (no, you cannot define a name for the profile and there is currently option for only 2 profiles). You can choose from a list of predefined fixers (currently 14 of them are present). To configure profile, you can choose the option from any of the menu option in the above screenshot or you can choose Visual Studio menu *Analyse > Code cleanup > Configure code cleanup*
and you get a window like below to choose the fixers into profiles

![Configure Cleanup](https://thepracticaldev.s3.amazonaws.com/i/2k76nus0m1f4jmnc8eso.png)


It is just the features first release and it something every developer will appreciate and it has a potential to do much more. Visual studio developer community has already started pouring in suggestions and feedback on the feature to make it better.
Let's vote for dev.to dark mode!
Tags: discuss
Published: 2019-09-16 20:45:41

---
title: Let's vote for dev.to dark mode!
published: true
description: I think if we push hard enough it will happen!
tags: discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/cudlrpbnfabcg87hko7h.png
---

## Heart this post for some dark mode!

![dark mode](https://thepracticaldev.s3.amazonaws.com/i/cudlrpbnfabcg87hko7h.png)

## How did I do that?

{% link https://dev.to/mercxry/dark-theme-for-devto-14e9 %}

## Is Ben aware of it?

{% link https://dev.to/zasuh_/dark-theme-for-devto %}

## Slack just did it 😸

https://slackhq.com/dark-mode-for-slack-desktop