teleren/devto huggingface dataset:
Fundamentals Of 3rd Person Camera Control in Unity
Tags: unity3d, csharp
Published: 2020-03-08 06:43:56

I've been looking at Unity again for the first time in a while, and I've been trying to get a better understanding of the code in the fundamental elements like the camera. Camera control is essential to a smooth experience in a game. I looked at putting together a 3rd person camera that moves by mouse position, and have come to the necessities and quality of life features that go into a game camera.

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

The required pieces for the CameraController are a reference to the player object, a camera reference, variables to hold the camera's distance from the player as well as the mouse's movement. Sensitivity isn't needed but you'll want it in almost any case, and the same goes for min and max values for the Y angles to prevent the camera clipping under the ground.

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

The Start and Update functions are used to prepare the data necessary to move the camera in the LateUpdate function. The Start in this case is used to assign the "main" tagged camera to the cam variable, but the cam also could be a public property that is assigned in engine without any code. The Update here then reads for mouse input multiplied by the sensitivity values each frame. If you Debug.Log one of the GetAxis' like "Mouse X" you'll see that the number is at 0 when the mouse idle, at numbers like 0.025 when moving slowly, and at numbers potentially exceeding 1 when moving rapidly. These numbers will be used to calculate the camera's updated position in LateUpdate. The Y value is also clamped to the ranges determined at the top.

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

In the LateUpdate function, the camera takes these mouse inputs and moves the camera appropriately. The dir variable represents a distance using the property the component has set from the editor (though you could just put a number in the code for the same result), and the rotation quaternion holds a rotation using the values input by the mouse movement. These values are then applied the camera's position, using the player's position and adding the rotation numbers to angle it's direction and then multiplying the dir to extend the camera along the ray. The last line uses the Unity function LookAt targeting the player's position and facing the camera to the player.

With these elements tied together with some simple logic, you end with a rudimentary camera that can be expanded and streamlined pretty easily. From here you could give the camera zoom controls, a smooth cinematic pan, or toggle-able types like x-ray or night vision. Good camera controls are taken for granted, but people notice when things are wrong.
What is Programming?
Tags: programmersstone, reciprocality
Published: 2020-03-08 06:25:18

---
title: What is Programming?
published: true
description: Programmer's Stone, Thinking about Programming
tags: #programmersstone, #reciprocality
---


To understand software engineering we must understand a programmer. Let us allow a programmer to specify the requirement (to be identical with the user), and examine a scenario which ends in the construction of the simplest possible program: a single bit program.

    Ada is sitting in a room.
    In the evening the room becomes dark.
    Ada turns on the light. 

That is the fundamental act of programming. There is a problem domain (the room), which is dynamic (gets dark). There is an order to the dynamic problem domain (it will be dark until morning), permitting analysis. There is a system that can operate within the problem domain (the light), and it has semantics (the switch state).

There is a desire (that the room shall remain bright), and there is an insight (that the operation of the switch will fulfil the desire).

Dynamic problem domains, systems, and semantics are covered in detail elsewhere. On this course, we are concentrating on understanding more about the desire and the insight.

It is worth pointing out here what we mean by a `programmer'. A drone typing in the same RPG 3 invoicing system yet again might not be doing any real programming at all, but a project manager using Excel to gain an intuitive understanding of when the budget will get squeezed and what the key drivers are, most certainly is.

Copyright (c) Alan G Carter and Colston Sanger 1997
What is Software Engineering For?
Tags: programmersstone, reciprocality
Published: 2020-03-08 05:59:42

---
title: What is Software Engineering For?
published: true
description: Programmer's Stone, Thinking about Programming
tags: #programmersstone, #reciprocality
---


Whenever we get confused, we must be able to see where we are going in order to know what action to take. We must know what we are trying to achieve.

We are software engineers. Why? What is software engineering for? What do software engineers do? We get some curious answers to this question. One chap said, `They follow the procedures of the Software Engineering Standards!' Another said, `They transliterate a requirement!'

Oh dear. We suggest that software engineers ensure the programs their customers need are running on their computers. That means our programs must do the right things. They must be robust. Sometimes we must know for certain that they are robust, and sometimes we will need to be able to prove it. We'd always like to be able to do all those things! The necessary programs must be running tomorrow as well, which usually means that our programs today must be maintainable. We must do our work cost-effectively, or we won't get the chance to write the programs in the first place. Our delivery must be timely.

We use all our inventiveness and the experience contained within our discipline to attain these goals. All our methodologies, standards, tools, languages are intended to assist us in attaining these goals.

We do nothing for the sake of it.
From the beginning to yet, Hina-softwareEngineer Coded
Tags: wecoded
Published: 2020-03-08 05:15:35

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title & narrative! ✨ -->

## Equality in tech looks like… 
I don't believe that there is equality in tech field. Because i am women and i realized that men are more in this field and women are not so. I tried to found the reason why women are not in tech field as men are. There are so many reasons. One is that women can't handle pressured conditions e.g. if code doesn't work at the last time then i also started crying what to do now? What happened now? But women can do all things with punctuality and submit on time. 
Don't mind it as i share that which is my experience. May be I am wrong. And the other thing is that Tech companies think that women can't solve problems as men can solve. But i experience women can solve more problems. So, women are also important in tech field as men are. 
## I’m an expert at…
I am a second year student in Bachelor's of Engineering Software engineering from Ned University. My tech era started when i was in first year of Software engineering. But one thing i forget to mention that I got first position in Intermediate Pre-Engineering in all students of City. ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/em1hzacyrmb32etikw8v.jpg)
One thing i was happy on that occasion that i am girl who got first position and the boy got second position. Women can win, women can achieve. But the world has to give her more opportunity to grow.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dadio0hij1bc2fbri7ll.jpg)

## My advice for allies to support self-identifying women and non-binary folks who code is...
So, my tech era started when i enrolled in software engineering. In first semester, i hate to code. Because I didn't understand what are loops, why function, structures,etc. In my whole class, boys learnt and was doing coding more easily. I need women for guide but No girl can have interest in learning code. I thought at that time that i choose wrong field. This field is not for women. I want to learn. So, i on my behalf start searching. Learning from YouTube, freecodecamp and reading articles from dev.to. These all are great platforms which helped me a lot. I learned html,css, bootstrap, JavaScript,NodeJs and ExpressJs.
Now, i am learning react from freecodecamp. I learnt c, c++,c# language in my university. But i learnt python for myself from Cisco and Google it automation course. Now, all my class fellows girls need any kind of help in coding, or any computer related problem. They come to me. And i solve all their problems. I love coding now.
My message is that women can do if they want. They are equal with men in tech field, in learning. 
Never underestimate yourself and 
never stop learning.

<!-- Once your post is published, it will not appear on the /t/shecoded page until an admin approves it. This is an extra step to ensure there is no abuse on this important tag. -->
First thoughts on Three.js
Tags: beginners, javascript, todayilearned
Published: 2020-03-08 04:34:10

Just started messing with three.js after taking an interest in 3D animation through the web. So far, it's been really fun figuring out the shapes and how to consider perspectives, camera angles and lighting when displaying objects. If anyone has considered using something like WebGL but maybe wants to try something a little bit easier, three.js is definitely the way to go!
A little bit of CSS micro-interactions and some cards
Tags: webdev, css
Published: 2020-03-08 04:14:45

I recently reworked my site to feature cards on the homepage that acts as a gallery for some of the recent drawings that I’ve done. 

Initially, I had the cards pop a bit on hover by giving them a drop shadow. I played around with various other properties for a few hours before ending up with the following

![Demonstrating the zoom-in and text-stretch effect that happens on mouse hover](https://dev-to-uploads.s3.amazonaws.com/i/ibo0jrauamuyh5tvzex8.gif)

A few micro-interactions are happening in the GIF above. 

- Zoom effect on the image
- Increased letter spacing in the title
- Box-shadow transitions between a subtle/noticeable state
 
These are all done in conjunction with CSS transitions, to give it a smooth effect, both in and out.

To create that, I started with three divs. One is the actual card, the second is where we will house the background image, and the third is our title box.

```html
<div class="card">
  <div class="card_background"> </div>
  <div class="title">
    <h2>Parallax Galaxy</h2>
  </div>
</div>
```

The CSS was a bit more involved. I also had to mess around with the transitions a bit until I got it just right.

```css
.card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  transition: all .3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card:hover {
  box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0, 0, 0, 0.295);
}

.card_background {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 50vh;
  transition: all 2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card:hover .card_background {
  transform: scale(1.1);
}

.card:hover .title {
  letter-spacing: 4px;
}

.title {
  position: absolute;
  left: 0;
  top: 2rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 1);
  max-width: 400px;
  transition: all 3s cubic-bezier(0.25, 0.8, 0.25, 1);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.title h2 {
  display: inline-block;
  width: auto;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

```

The end-effect functioning on multiple images. A relatively quick and easy way to spice-up any gallery.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9oe5k60k38wgxhuh2e7o.gif)
Building a Simple HTML Table 
Tags: beginners, tutorial, html, cats
Published: 2020-03-08 04:02:27

Sometimes you want to present information to your users in a simple column/row structure. HTML tables are an easy way to do this. Let's get started building a simple version for a Rails app.

We begin with opening and closing table tags `<table>` to define our feature and then add table row tags `<tr>`.
```ruby
<table>
  <tr>   
  </tr>
</table>
```
Next, we add table header tags `<th>` and input the names that we want for our table columns (table headings will be bold and centered in our columns by default).
```ruby 
<table>
  <tr> 
    <th>Name</th>  
    <th>Color</th>
    <th>Age</th>
  </tr>
</table>
```
Great start! We already have our table header designed. Now, let's add a few more table rows `<tr>`. We'll fill these rows with table data tags `<td>` and our corresponding data.
```ruby
<table>
  <tr> 
    <th>Name</th>  
    <th>Color</th>
    <th>Age</th>
  </tr>
  <tr>
    <td>Daz</td>
    <td>Orange</td>
    <td>3</td>
  </tr>
  <tr>
    <td>Stimpy</td>
    <td>Red & White</td>
    <td>5</td>
  </tr>
  <tr>
    <td>Cheshire Cat</td>
    <td>Purple</td>
    <td>71</td>
  </tr>
</table>
```
And just like that, we have a simple table in our app that should look something like this:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/aikezqrbdaat2p5z59ew.png)
Great, right? But not very aesthetically pleasing. Luckily, we can spice this table up with just a few simple extras. Let's throw on a table name using `<h2>` tags and then specify a little styling within our opening `<table>` tag.
```ruby
<h2>Famous Cats</h2>
<table style="width:50%" border="1" cellpadding="5">
<tr> 
    <th>Name</th>  
    <th>Color</th>
    <th>Age</th>
  </tr>
```
And for just a bit more oomph, we can add shading to our table rows by specifying this in our **application.css** file:
```ruby
tr:nth-child(even) {
  background-color: #ced3d0;
}
```
Now we have a table feature that's dressed to impress.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6lclrgbm7ivet9q2fdjy.png)
Feel free to experiment with more styling until it's exactly how you want. Boom done.
How rust solves dependency hell
Tags: rust, cpp, discuss
Published: 2020-03-08 01:32:12

Here's an interesting article about how Rust solves the dependency hell that C++ developers usually experience. The author's sense of humor is evident when he says "Rust solves all the world's problems" :-)

https://stephencoakley.com/2019/04/24/how-rust-solved-dependency-hell
JavaScript Closures
Tags: javascript
Published: 2020-03-08 01:24:15

As I enter the interviewing stage of my journey I have tried to identify the types of questions that come up when weeding out potential candidates. Frequently, interviewers like to test a candidate's fundamental understanding of a language with simple, yet often misunderstood, coding concepts. One question that seems to come up frequently in JS, is to define a closure and how it can be useful.

A closure is essentially a nested function that allows for a private variable to be stored within the confines of the outer function. This protects the scope of the variable while allowing the inner function to change its value and refer to it when needed.

The closure can be achieved by using an IIFE, an immediately invoked function expression, or by creating a reference variable to access the outer function's return (the inner function).

```javascript
let testClosure = (function() {
  let a = 1
  return function() {
    a += 1
    return a
  }
})()
```

The above function, 'testClosure', contains a private variable, 'a', that is set once - when testClosure is defined and self invoked. Each subsequent call to 'testClosure' increments the variable 'a' because it is calling the inner return function. The scope of 'a' allows for modification without falling into global scope, and this is why it is known as a private variable.

My takeaway with closures is that they can be helpful when organizing your code's scope. When you want to track a value outside a function but do not want it residing in global scope, a closure is a great tool to utilize.
Code navigability?
Tags: codereadability, readability, programming, discuss
Published: 2020-03-08 00:48:25

---
title: Code navigability?
published: true
date: 2020-03-08 00:41:44 UTC
tags: codereadability,readability,programming,discuss
canonical_url: https://stereobooster.com/posts/code-navigatability/
description: Navigability is the ease with which a reader can navigate a written text
---

## What is navigability?

~~I made up this word in the same manner as read-ability~~. If readability “is the ease with which a reader can understand a written text” ([Wikipedia](https://en.wikipedia.org/wiki/Readability)). Navigability is the ease with which a reader can navigate a written text.

For example, traditional printed texts have the following navigation patterns:

- Start and end - we can read the book from start to end
- Table of contents, chapters
- Alphabetical index

Online texts have (in addition to traditional texts)

- hyperlinks
- text search

Navigability contributes to readability. Easier it is to navigate text easier it is read text.

## Navigability in code

Navigability in code is a special case. If we take traditional text it’s navigability is predefined, for example, table of contents for a book. But navigability in code will vary depending on IDE, on task, on a reader, on programming language, etc.

Let’s talk about some popular navigation solutions for code.

### File structure

One of the attempts to improve navigability is by introducing a file structure. For example:

```
/src
/tests
/utils
```

This works well if there is time tested convention, for example, Ruby on Rails.

The idea of putting code in separate files is widely adopted, but there is no research that proves it makes navigation easy.

The downside of files is that you need to keep the context in memory when you jump between files.

### Jump to definition

Some IDEs and text editors allow to trace the origin of the symbol (variable, function, etc.). The effectiveness of this varies depending on PL. As well it will break in case of “code indirections”, for example, callbacks, dependency injections, etc.

### Text search

As well sometimes called grep-ability. I call this strategy fallback, e.g. people use it when everything else failed, for example:

- when “jump to definition” doesn’t work, we can search for this symbol instead
- when we failed to follow file structure we can try to search some keyword (phrase on the screen, the path in URL, etc)

### Debugging

Sometimes when everything else failed we can use debugging methodologies to find a way around in the code. If this is the case it means navigability is very poor.

## Reasons to navigate

I guess the way we navigate through code as well depends on the reason why we want to navigate through code. For example,

- I need to change behaviour (look, text, etc) of some code, where is code responsible for this behaviour?
- I edit function (component etc) where is it used?
- See [I am a puts debuggerer](https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debuggerer.html) for other examples

## Your thoughts?

Do you know other code navigation patterns I missed?
Why I'm using Nodejs, Express, NPM
Tags: node, express, npm, javascript
Published: 2020-03-08 00:14:48


Nodejs is the programming language of our age. We can also say that the Javascript language is ServerSide. With the power it receives from the Nodejs NPM library, it will enable you to overcome most jobs in a fast, quality and professional manner. It is fun to write both FrontEnd and BackEnd with one language.

In my simple and OnePage projects, I can produce boutique websites within 1 hour by using ExpressJS and Express Framework. In these projects, there are some standard tools that I use from the NPM library, so I can do very fast and high quality works.

In order to deal with enormous projects, I only pass this language (NODEJS).
I have used frameworks like PHP and Laravel, Codeigniter for years. I said goodbye to all of them with Nodejs.

For example: “PassportJS” for Login Register operations, “Mongoose” as Orm for jobs to be done with Mongodb, “Express Session” for jobs that require Session management, “Async” for operations that need to be asynchronous, and file management (Image uploading) I use “Multer” for file uploads, “Momentjs” for jobs that require date and time management. We can increase these examples to 100 or even 1000. So let’s take a breath and get back to the subject.

As I explained above, with the power it takes from the NPM library, you can push the boundaries with this language that we can easily overcome every problem.
Write your own Dotfiles
Tags: dotfiles, macos, setup, tutorial
Published: 2020-03-08 00:13:59

---
title: Write your own Dotfiles
published: true
description: This post is about my steps to write my own dotfiles and where I get the basis for it.
tags: Dotfiles, MacOS, Setup, Tutorial
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/pgqn3j05a4youg8a3i4r.png
canonical_url: https://helderburato.com/write-your-own-dotfiles/
---

<center>Originally posted on [helderburato](https://helderburato.com/write-your-own-dotfiles/)</center>

---

Some time ago I need to format my Mac twice times in the same week and it's was very painful to configure all the things.

I saw an opportunity to write my own `dotfiles` that can help me a lot when I need to change from a computer to another.

## Package Managers

![Photo by Elevate](https://dev-to-uploads.s3.amazonaws.com/i/hskqrsxeutfyq7nhnxfk.jpg)
_Photo from Unsplash by Elevate_

- [Brew Package Manager](https://brew.sh);
- [Mac App Store CLI](https://github.com/mas-cli/mas);

## Mac Setup

I recommend the [Mathias Bynens .macos](https://github.com/helderburato/dotfiles/blob/master/mac/.macos) file this helped me a lot to create my own [.macos](https://github.com/helderburato/dotfiles/blob/master/mac/.macos) configurations.

Thanks to [Mathias Bynens](https://github.com/mathiasbynens) who shared these awesome configurations.

## Start Point

![Photo by Joanna Kosinska](https://dev-to-uploads.s3.amazonaws.com/i/zo9ugbn3hl2e1l1y5juc.jpg)
_Photo from Unsplash by Joanna Kosinska_

My dotfiles execute as a simple call-in [install.sh](https://github.com/helderburato/dotfiles/blob/master/install.sh).

I followed in this project the principle of maintaining easy and simple to execute.

When I started to automate my build process and saw the other dotfiles from people I was thinking of creating a lot of files, harder automation formats, but I percept it can be easier if I follow the principle of `KISS - Keep it simple and stupid`.

## The Project

![Photo by Rene Böhmer](https://dev-to-uploads.s3.amazonaws.com/i/h19i1953ov5z3dplomyx.jpg)
_Photo from Unsplash by Rene Böhmer_

However, if you want to see my [dotfiles](https://github.com/helderburato/dotfiles) and give some feedback I'm opened to discuss and share the knowledge I gained in this project.

_Note: You will note it's more focused on frontend development because that is my focus now._

## Wrapping Up

This is was a quick post just to share my experience when I wrote my own dotfiles and how it can help you too.

Feel free to share your own experiences and if you already have dotfiles, please share in the comments it will be nice to see what you have been automated.


## References

- [Mathias’s dotfiles](https://github.com/mathiasbynens/dotfiles);
- [Cătălin Mariș dotfiles](https://github.com/alrra/dotfiles);
- [Paul's dotfiles](https://github.com/paulirish/dotfiles);
- [Thoughtbot dotfiles](https://github.com/thoughtbot/dotfiles);
- [Dries's Dotfiles](https://github.com/driesvints/dotfiles);
Nevertheless, karim coda Coded
Tags: wecoded
Published: 2020-03-08 00:08:53

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title & narrative! ✨ -->

## Equality in tech looks like… 

## I’m an expert at…

## My advice for allies to support self-identifying women and non-binary folks who code is...

<!-- Once your post is published, it will not appear on the /t/shecoded page until an admin approves it. This is an extra step to ensure there is no abuse on this important tag. -->