teleren/devto huggingface dataset:
Shadow Mapping Research and Camera Collision
Published: 2020-07-31 20:51:25

##**Summary**
So I assisted Gage with Shadow Mapping and enhanced the camera to avoid entering unwanted spaces such as the villager's homes. I took on the support role during the first portion of that week while I implemented the Camera collision.

##**I already knew Render to Texture (Shadow Mapping Research)**
As I was helping out on this task, I was able to relay my knowledge on basic Render to texture techniques. Essentially giving Gage a boost into understanding what aspects he needed that was not as clearly understood from just the Shadow Mapping articles we had begun researching. Though I was not as involved in the final aspect of the actual feature, I was able to give the first step. In the Shadow Mapping blog post, Gage goes into enough detail to understand it, so I won't just repeat the same thing. 

##**Camera Collision**
At first, I was unsure how I wanted the camera to move to avoid entering unintended sections of the game such as the villager's homes or towers. It was either we zoomed closer to the Golem itself or zoom out. I decided to go with zoom out as the camera by default was pretty close to the Golem. However, I came into contact with another problem, the camera had no functionality to have colliders or act as a game object in general so I rewrote certain sections of our orbiting camera class and was able to give it colliders. There was only one tedious issue, trying to gain the correct world position of the camera and put the collider there, it was a bit of trial and error but I was able to get it done. So whenever the camera collided with a building it would zoom out. I also added the feature of having it gradually returning to its default position over time. The next issue was rather simple, it would zoom out continually if you kept colliding so there was no cap on how far it could go. I clamped the zoom to a reasonable range and if it exceeded I decided to snap it back to its default. I'd say it went rather well and I'm pleased with it.

*Moises Carmona*
My AWSome journey to the Cloud: the Cloud Resume Challenge
Tags: aws, serverless, cloud, lambda
Published: 2020-07-31 20:38:31

Before the lock-down, I led a team of software developers in a project to be deployed in a private cloud. I had always handed over a project after I was done writing code because I have not been part of an IT team, so I really did not bother about deployment. That took a different turn in this project because not only was I responsible for code review, implementation strategy and software architecture, but for deployment and infrastructure (to some extent). I had successfully led the project to testing phase when the lockdowns came.

Well, I decided to solidify my knowledge of Kubernetes and to get on with one of the cloud providers; AWS it was and [A Cloud Guru](http://acloud.guru) was my choice cloud trainer. As I learnt more about AWS cloud I became fascinated with how easy it was to put services together and get your app running in a short period of time given I had just worked on a private cloud project. I thought that was all the goodness the cloud could offer not until I met with [serverless](https://en.wikipedia.org/wiki/Serverless_computing). With this new knowledge of serverless and AWS Lambdas, it was a fresh love for my career as a software developer.

I kept learning and decided to write AWS Cloud Practitioner exam in July. I was studying for my exams but just couldn't let go of the serverless concepts. I took the [Serverless Concepts course](https://linuxacademy.com/course/serverless-concepts/) on Linux Academy and several other serverless introductory courses on A Cloud Guru. I just couldn't get enough of serverless - I even nicknamed myself, _Serverless Junkie_ - and with the goal of becoming a serverless Hero someday. I also connected with some AWS serverless Heroes.

I saw a post on LinkedIn that talked about one [cloud resume challenge](https://cloudresumechallenge.dev/instructions/) and its deadline was for July 31, 2020. After reading through the requirements, I decided for it. And, yes, I had to pass my earlier scheduled CLP exam - that was the first requirement.

It's a long read already so won't go into every aspect of the challenge but I won't forget my late nights with [moto](http://docs.getmoto.org/en/latest/) - the very beautiful Python mocking framework for AWS infrastructure and the one and only AWS [SAM (Serverless Application Model)](https://aws.amazon.com/serverless/sam/) - sweet nights indeed. These tools are great because they make the work really easy...erm, after you understand how to use them. Yeah, I read lots and lots of blogs, documentation, github samples and in the end, I successfully completed the Cloud Resume Challenge.

I'm so thankful to [Forrest Brazeal](https://dev.to/forrestbrazeal) for putting up the challenge and causing many to learn and improve themselves. I am really grateful. Hopefully, I can work hard enough to becoming an AWS Serverless Hero. Until next time, it is bye from me and get on learning severless.

Here's the [finished project](http://www.charlesallison.info) for the challenge
Frontend development in 2020: What are the essentials for beginners?
Tags: beginners, frontend, javascript, discuss
Published: 2020-07-31 20:15:36

---
title: Frontend development in 2020: What are the essentials for beginners? 
published: true
description: javascript, jquery, react, angular, css, and what else, what bare essentials would you teach someone learning frontend development for the first time?
tags: beginner, frontend, javascript, discuss
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/k3m3jdqj5xkq4mqvymx3.jpg
---

What bare essentials would you teach someone learning frontend development for the first time?
Soft Skills you should have as a Developer
Published: 2020-07-31 20:08:00

As someone who was quite new into the IT industry just a couple of years ago I would like to share how to I walked and how I am still walking my walk.

## Know your strenghts and weaknesses

To grow as person and as an essencial member of a team you need to know what and where you can really thrive and where you need to be humble and ask for others help.

## Speak up

Your age or time in the industry doesn't say s#it about what you know.
If you've an idea that you think might be helpful and solve a situation just speak up.

## Get help sooner than later

I'm not saying that you should ask for help as soon as a challenge appears... But. When you've a problem which has been a pain to deal for some hours and maximum of a couple of days(1/2) you should ask for indications to solve the problem.

## Learn how to google

Senior. Mid. Junior. Everyone and everything uses Google. Google your way out of a challenge. 
Use keywords to search within google.

Look at this example:
"how to generate a key in laravel" -> "generate key laravel"

## Ask for indications

To be able to grow no one should solve the problem for you. You will learn so much more if you ask the questions to get indications and then solve the problem yourself.

## Understand your motivations

Why you're doing what you're doing at whatever role you represent is really important for "success".
If something is not working out start with why (Simon Sinek TM) it isn't working out.

## Mindset

You'll always have times where you'll be a dummy.
Keep a positive and helpful attitude because rought times are part of the process. 

## Conclusions

The secret for success is in the confidence and the ability to adapt to a situation.

**Always trust yourself**
Cannot modify a WriteBatch that has been committed
Tags: firebase, firestore, googlecloud, serverless
Published: 2020-07-31 19:49:47

Cloud Firestore allows batching multiple requests at once using `firestore().batch()`. Recently, when using it, I got the following error:

```
Cannot modify a WriteBatch that has been committed.
```

The error is kinda self-explanatory: you're probably calling `batch.update()` after you've already committed your changes using `batch.commit()`.

However, that wasn't my case. I had the following code running on Cloud Functions:

```typescript
const db = admin.firestore();
const batch = db.batch();

export const myFunction = functions.firestore.document('some/doc').onChange(() => {
  const ref = db.doc('posts/123');
  batch.update(ref, {});

  return batch.commit();
});
```

Did you spot my mistake in the code above? Yep, I'm calling `db.batch()` outside the function's scope. This means that variable was added to Cloud Function's global scope.

So, the first time that function runs, it calls `batch.commit()` and it commits all changes. So, when that function runs again, we get that error because `commit` was already called for that instance.

All we have to do to fix that bug is initializing the `batch` instance inside the function's scope:

```typescript
const db = admin.firestore();

export const myFunction = functions.firestore.document('some/doc').onChange(() => {
  const batch = db.batch();
  const ref = db.doc('posts/123');
  batch.update(ref, {});

  return batch.commit();
});
```

---

[Follow me on Twitter](https://twitter.com/ceolinwill)
Sorting Methods
Published: 2020-07-31 19:47:53

Sorting algorithms are a mainstay of computer programming. There are countless situations where one might want to sort through things. After all, arrays are one of the most important data structures. In this blog I will discuss a couple different sorting methods, how to implement them and their merits. 

It most likely is obvious for most why one would want to sort something in the first place...Obviously if we are dealing with an array that has so many things in it we might want it sorted so that we have some sort of logic to our storage. Or we might not even know what is inside it, and sorting would make it easier to find out. To start with something easy lets just look at a simple array of numbers. 

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

Sorting can be a very expensive with large arrays, but something like this almost any way can work. In javascript there is a built in sort method. With an array this size we can sort these numbers in ascending order quite easily just using this method. 

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

This method is iterative and has to go through each element in the array in order to get its work done. Imagine if we had a massive array with millions of elements. It would become very expensive and take a lot of memory. In general this type of built in sorting will be O(n^2). We start with the first element then compare to all the others in order to know where to place the element. And we do this with all the elements. 

What we really want to do is get out algorithm to O(n log (n)). Certain sorting methods that get to O(n log(n)) are merge sort, quick sort(mostly) and heap sort. To be honest I am not sure which one is used the most, I imagine it is a case by case thing, or maybe programmers preference. In my relatively new time coding (~8 months) I would say that I have seen quick sort methods the most. 

You might have noticed that I said that quick sort is O(n log(n)) *mostly* . This is because of the way we choose our pivot elements. The most common way that I have seen pivot elements chosen is the median element or a random element. Then you want a left and a right element. Basically what we want to do is check our left and right elements in comparison to our pivot position. This allows us to check a smaller and smaller list of elements, hence O(n log(n)). 

The idea of these better sorting methods is that we are splitting our list into smaller and smaller pieces. Then we deal with those smaller pieces and put them back together as they sort. This is a much more efficient way than just comparing all the elements to each other. However with quick sort if we choose our pivot as the first element, we might encounter a problem if the list is already sorted, which will make the algorithm O(n^2) because the left will always be the min.
How to Make a Successful Career with Salesforce?
Tags: salesforce, crm, appexchange, certification
Published: 2020-07-31 19:45:12

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

A successful career at Salesforce is an interesting question in today's IT trends. The keys to being a successful Salesforce professional lie in programming skills, analytical skills, the ability to ask the right and interesting questions to learn, the willingness to work hard and spend long hours, and confidence. Analytical skills include the ability to think logically about an idea and determine how to solve a problem. The individual must be able to test a problem and come up with ideas to solve it.

This has created a trend in the technology industry. Day after day, with new customers signing contracts, there is a growing demand for [Salesforce development](https://www.cloudanalogy.com/salesforce-app-development/), developers, and consultants. It has become a mature professional career. Over 500 companies are seeking qualified Salesforce professionals and experts with hands-on experience and proven knowledge. Now is the time to start your professional career with Salesforce training sessions.

**What is Salesforce?**

Salesforce is a United States-based cloud computing company that best meets the business needs of your business, known for its CRM (Customer Relationship Management) product. The Salesforce CRM platform contains tools that your sales team will use to manage your organization well. You can easily record, manage, analyze, and optimize all customer activity in one place with your cloud-based software. This means that you only need an Internet connection to manage all your things from one place.

**Why do you need Salesforce?**

1. Improves the quality and management of customer data.

2. Develop customer service and support.

3. New clients are the lord of any business. Salesforce administrators make an ideal client database that enables your business to locate the correct clients who are keen on your item or organization.

4. Salesforce Increases campaign efficiency provides marketing campaign data and reports and also tracks applications available on the AppExchange.

5. Increasing profit margins will help you make the most of customer interaction and experience while increasing productivity.

The best way to become a [Salesforce] (https://www.cloudanalogy.com/) professional is to take "Salesforce Training and Certification."

**Salesforce Training and Certification:-**

Certification is the foundation of competence for any Salesforce professional. This is the best way to represent your skill level and areas of expertise to the current employer. It can accelerate your career and assist you when applying for new jobs or when trying to progress in your current business. Salesforce Certified Professionals are one of the most sought-after packages by employers.

For more information about the salesforce and its importance [contact us.](https://www.cloudanalogy.com/contact/)
Convert powerpoint to image
Published: 2020-07-31 19:43:31

<sub><span>Photo by <a href="https://unsplash.com/@evgenit?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Evgeni Tcherkasski</a> on <a href="https://unsplash.com/s/photos/search?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span></sub>

My team desires to process powerpoint files in order to manipulate content and create an image.

Spoiler: We used [Aspose Slides](https://products.aspose.com/slides/net/conversion/ppt-to-jpeg) at the end to do it.

# Puppeteer + Office plugin

My first though was to use the Chrome plugin for Office, to open the Powerpoint file. In order to manipulate it, i though to use Selemenium or Puppeteer. I tried [PuppeteerSharp](https://github.com/hardkoded/puppeteer-sharp) to ease the process. It worked very easily. But Chrome does not allow plugin to be loaded while automated. So, even using the plugin unzipped, the browser cant use this plugin properly.

# Powerpoint + Interop

I was thinking to use Office on a Windows VM or Docker. Then i found [this post](https://medium.com/rkttu/install-microsoft-office-in-windows-container-ce05877138fd) explaining how to install Office. But, the license can't allow this usage.
By curiosity, i tried to follow the post and ended with the following Dockerfile:

```Dockerfile
FROM mcr.microsoft.com/windows:1903
#USER ContainerAdministrator
ENV chocolateyUseWindowsCompression=false
RUN echo 104.20.73.28 chocolatey.org >> "C:\Windows\System32\drivers\etc\hosts"
RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" && \
    choco config set cachelocation C:\chococache

RUN choco install dotnetfx -y

RUN choco install microsoft-office-deployment --params="'/DisableUpdate:TRUE /Product:PowerPointRetail'" -y

RUN mkdir C:\\Windows\\SysWOW64\\config\\systemprofile\\Desktop
RUN powershell -Command new-object -comobject powerpoint.application


WORKDIR /app
# Copy the c# App which uses Interop to save the ppt as a picture
COPY ./bin/Debug/net472/ .

VOLUME C:\\data
```

The license issue forces us to find another solution.

# Aspose Slides

We found with this product. It can simply be used inside an Azure Function, without any customization. Why do we always want to find a difficult solution when there is a simple on available ?

The code is even available on their [site](https://products.aspose.com/slides/net/conversion/ppt-to-jpeg).

Hope this help !
Day 15: The Popup
Tags: 100daysofcode, javascript, html, css
Published: 2020-07-31 19:39:41

Disclaimer: I'm totally blank on explanations today. 

I added some color and an icon to my page which on click fires a popup. My main reference was this [video](https://youtu.be/ptI8g-05VM0).

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


Vimeo: {% vimeo 443480303 %}

🥂 _Here's to the days that i dread writing but still do it anyway_

✍🏽 _Day 15_
Make Your Site's First Impression Awesome
Tags: ux, sideprojects, writing
Published: 2020-07-31 19:19:06

Article originally posted on my blog: https://nickdorrell.com/first-impression/

The struggle with any website is making it so:

    -The user can tell what it does in 10 seconds
    -It's easy to use

I'm mostly going to cover point one since two is more about UI / UX (user interface / user experience.)

75% of the solution is the headline or hero text at the top of the page.

This needs to be as short and to the point as possible, while telling the user what your site does. Cover the features in depth later on the page.

Using my own site, Tascflow.com as an example:

    Track time with integrated breaks to work more efficiently.

I like this because it's short, and tells the user what it does and what the benefit is.

This wasn't the first iteration of this text. I was lucky enough to have a buddy make a video of his first impression, and it was clear he didn't really get it from his reaction.
Past the hero text

After the hero text is where things get more flexible. Generally you'll have something like:

    -A video showing the product / site in use. Don't put it to autoplay!
    -A CTA (call to action) button to sign up.
    -A screen shot of the product in use

All of these are great, and their use depends on your product and testing what people like best. They should be guiding the user to understanding what you do and the benefit to them as fast as possible.

From here, you may have a section with features - highlight your differentiators, we're showing them what they'll be able to do.

Testimonials are great social proof to include in a front page, if you have them.

I would also include a table with your pricing, to prevent the user from having to search around for it. I initially had my pricing on another page for Tascflow, and one person reviewing it said I was hiding it.

It wasn't intentional, but he wasn't wrong.

From here, another call to action is great. You've shown the user everything your site does and if they are in your target audience, they'll be able to sign up with minimal friction.
##Other pitfalls to watch out for
###Color

Using color to stand out is a great idea - it's also horrible if your site looks like an eggplant.

Your text should be easy to read. Period. No one's going to stick around for the eye strain.

I'd stick to using 2-3 colors with one primary one. Get help from a designer friend here if possible, because it's worse to have a bad color scheme than a forgettable one.
###Loading times

This isn't something I run into frequently, but is important all the same. If your loading times suck, it's going to turn people away.

Run your site through Google PageSpeed Insights and fix the worst offenders.
###Spelling errors

It's hard to build trust with a customer if a page is riddled with spelling errors.

It shows a lack of care / effort in presentation - and personally makes me unsure of the code behind the rest of the product.
I finally understood what a reducer is!
Tags: programming, javascript, net, c
Published: 2020-07-31 19:55:35

---
title: I finally understood what a reducer is!
published: true
date: 2020-07-31 19:03:25 UTC
tags: programming,javascript,net,c
canonical_url: https://siderite.dev/blog/i-finally-understood-what-reducer-is/
---

  Original URL: https://siderite.dev/blog/i-finally-understood-what-reducer-is/

  When I was looking at Javascript frameworks like Angular and ReactJS I kept running into these weird reducers that were used in state management mostly. It all felt so unnecessarily complicated, so I didn't look too closely into it. Today, reading some random post on [dev.to](https://dev.to/ "A nice platform dedicated to software developer content"), I found this simple and concise piece of code that explains it:

```
// simple to unit test this reducer
function maximum(max, num) { return Math.max(max, num); }

// read as: 'reduce to a maximum' 
let numbers = [5, 10, 7, -1, 2, -8, -12];
let max = numbers.reduce(maximum);
```

Kudos to [David](https://dev.to/wulymammoth "señor software engineer") for the code sample.

The reducer, in this case, is a function that can be fed to the the reduce function, which is known to developers in Javascript and a few other languages, but which for .NET developers it's foreign. In LINQ, we have Aggregate!

```
// simple to unit test this Aggregator ( :) )
Func<int, int, int> maximum = (max, num) => Math.Max(max, num);

// read as: 'reduce to a maximum' 
var numbers = new[] { 5, 10, 7, -1, 2, -8, -12 };
var max = numbers.Aggregate(maximum);
```

Of course, in C# Math.Max is already a reducer/Aggregator and can be used directly as a parameter to Aggregate.

I found a lot of situations where people used .reduce instead of a normal loop, which is why I almost never use Aggregate, but there are situations where this kind of syntax is very useful. One would be in functional programming or LINQ expressions that then get translated or optimized to something else before execution, like SQL code. (I don't know if Entity Framework translates Aggregate, though). Another would be where you have a bunch of reducers that can be used interchangeably.