teleren/devto huggingface dataset:
How much time should you spend on lowering your Bill of Materials? 📉🤔
Tags: iot, startup, management, discuss
Published: 2021-07-17 11:06:52

---
title: How much time should you spend on lowering your Bill of Materials? 📉🤔
published: true
description: Lower the BOM only to the point where you have a comfortable profit margin. Going lower than that is probably not worth it because of low production volumes, higher burn and longer time to market.
tags: iot, startup, management, discuss
cover_image: https://upload.wikimedia.org/wikipedia/commons/4/47/Bill_of_Materials.jpg
---

👉 tl/dr; Lower the BOM only to the point where you have a comfortable profit margin. Going lower than that is probably not worth it because of low production volumes, higher burn and longer time to market. 👈

When looking at your Bill of Materials (BOM), I believe it's best to always put it into comparison with your profit margins. This will help you establish a "Max BOM" line. The number depends on a lot of different things like your business model and price, but rule of thumb for non-subscriptions models is at least: Price > 2x BOM

If you're above that "Max BOM" line, you'll need to figure out a way to either raise the price or lower your BOM. But we're going to focus on why it's not worth to go lower, with a small back of the envelope calculation:

Assume you are are startup close to start production of your first batch, and then someone proposes to replace a few parts and save some money!

Production Volume: 5k pcs
BOM reduction: 10 EUR / piece
=>💰💰💰 50k EUR savings! 💰💰💰

Now that's a lot of money for a startup! ..... Except when you take implementation effort into account. Last minute HW changes can easily delay the timeline for 2 months, because you'll need

~1 month to implement the new changes
~1 month to build new prototypes and make sure everything still works

If you take your burn rate into account, it could easily be that you burn >25k EUR per Month in salaries, tools, prototypes etc.

Compare this with your potential savings of 50k and you'll lose money in the end! Not to mention the 2 months sales revenue you miss out on! 😉

Therefore cost saving projects only start paying off when you've reached higher production volumes.

So, be careful when implementing cost saving projects early in your companies life. Most of the time your resources are better spent focusing on growing your revenue. 📈

How do you manage your BOM and cost-cutting initiatives?

Image Credits: [NathanMinnick58](https://commons.wikimedia.org/wiki/File:Bill_of_Materials.jpg)
SolidJs: First impression
Tags: solidjs, reactivity, components, javascript
Published: 2021-07-17 10:44:29

I have been using React.js for the past 3 years for various projects, and the main reason why I decided to do so were:
- The ability to use JSX
- The power to create composable components
- One-way data binding
- Reactivity and Virtual DOM
- Simplicity and Performance
 
I recently explored SolidJS, a JS library framework and I discovered that you can do all these and even more. Here are my initial thoughts on SolidJS:

- SolidJS is a declarative, efficient and flexible JavaScript library for building user interfaces.
- It looks more like functional React components
- It has its own hooks, the difference being they start with `create*` while React hooks start with `use*`
- SolidJS has 2 main building blocks: JSX Components and Reactive Primitives
- Components: just like in React are functions that accept props and return JSX elements or other components
- The Reactive Primitives are made up of Signals(equivalent to State in React), memos and Effects.

There is more to SolidJS, as the above are my initial findings. I will be diving deeper into the topic in my subsequent articles.
Page Health - simple tool for page performance monitoring
Published: 2021-07-17 09:40:16

![Page Health Metrics Example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/onudjnnlht83al1kuhes.png)

Hello, guys! My name is Igor. I am front-end developer at **CodeGym**.

At my current job, I often face with the need of optimizing web pages performance (runtime and loading scores).

But, to say the truth it is very difficult to measure how is new feature really affecting the page performance at the long run.

So, I decided to make a new tool for this. You add a url of your page and metrics your want to monitor...and wait for the data being loaded every day :)

At the moment, my project supports monitoring of:
* Lighthouse scores - (Desktop and Mobile)
* User Experience Reports (Desktop and Mobile)
* Runtime Performance (Normal and with slow 3g and slow cpu)

 ↓ ↓ ↓ ↓

[Link to project](https://pagehealth.me/about)
Why TypeScript is useful
Tags: javascript, typescript
Published: 2021-07-17 09:35:44

I can say why I think TypeScript could be useful. But it's only when I personally find a use for something that I really understand why it's useful.

In my code I had a function that set the number of decimal places of a number. Here's a simplified version in JavaScript:
```javascript
const setDP = (key) => {
  return key.toFixed(2);
};
```
This takes in 'key', changes it to have 2 decimal places, then returns it. Perfectly fine and you might be wondering what the problem with that is. Well, TypeScript told me...

Here's the same code in TypeScript:
```javascript
const setDP = (key: number): number => {
  return key.toFixed(2);
};
```
All I've said here is that key is a number and the function returns a number. Which is what we want. But it's not what we're getting. TypeScript immediately complains that I've said the function is returning a number, but it's returning a string.

Which is crazy, surely toFixed returns a number. But no, [MDN clearly states otherwise:](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) 
> toFixed() returns a string representation of numObj 

I needed my return value to be a number, due to things I was doing with it later. If I hadn't been using TypeScript I'd have spent time trying to find the problem. TypeScript told me exactly what the problem was, so I could fix it.

I've been using it for a little while, as I knew, in the abstract, that it was useful. Now I'm a convert.
An Israeli team has provided hacking tool for windows.
Tags: hacktoberfest, windows, hacking
Published: 2021-07-17 09:10:58

An Israeli team has provided tools needed to use Microsoft Windows and Microsoft technology in hacking. This information provided by the research institute highlights the growing trade in the supply of tools in widely used software hacking.



A provider called Candiru secretly finds vulnerabilities in software platforms for its customers. The company has developed and sold a tool that can access Windows, according to Citizen Lab. In addition to this special tool, the company has developed more software products focused on intelligence activities, according to a Reuters report.



Technical analysis by security researchers has revealed how the tool has spread to countless unnamed buyers around the world and has been used to target various intellectual organizations. According to Citizen Lab and Microsoft, the victims include a Saudi dissident group and a left-wing media outlet in Indonesia.



Attempts to contact Candiru were unsuccessful, Reuters reported.



After analyzing the infected files collected by Microsoft, Citizen Lab found that the tool was specifically targeted at users in several countries. These include Iran, Lebanon, Spain and the United Kingdom.



"Candiru's growing presence and use of its technology in surveillance of global civil society proves that there are numerous hired companies involved in creating spyware and that there is a risk of widespread misuse," the report said.



Microsoft fixed the bug by releasing a software update on Tuesday. The software giant, without naming Candiru, said it had been abused by an Israeli privately-owned malicious group, codenamed "Savargam."



In a blog post, Microsoft said, “Savargam buyers are often from various government agencies around the world. The company usually sells cyber weapons that allow hacking into the targeted person or organization's computers, phones, network infrastructure and Internet-connected devices. ”



Google Chrome also builds candy tools to take advantage of errors in other conventional software, such as the browser.



In a blog post on Wednesday, Google also revealed two Chrome software bugs that Citizen Lab Candiru found to be related to. Google also described Candiru as a "commercial surveillance agency" without naming him. Google fixed the bug earlier this year.
My Daily Workflow
Tags: linux
Published: 2021-07-17 08:47:15

## System Details
- Operating System: Manjaro Linux
- Browser: Brave
- Editor: VS Code & Neovim
- Bar: Polybar
- Window Manager: i3
- File Manager: Ranger & PCManFM
- PDF Viewer: Zathura
- Font: JetBrains Mono & Source Code Pro
- Repo: https://github.com/VivekAlhat/Manjaro-Config

### Tiles
![tilingwindows](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jm175iyu04x744ca15k0.png)

### Browser
![browser](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/71y6zay8oh1wzz8zmfkd.png)

### Lockscreen
![lockscreen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4xve808h8g4tbc003kz.png)

### VS Code
![vscode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/saue4qq5ic4uwoxm3peg.png)

### File Manager (PCManFM)
![filemanager](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i5qq67m7ikr43evr05vv.png)

### Applications Launcher
![launcher](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hnpw1grc9ou3h45nvyfj.png)
My javascript / tech / web development newsletter for 2021-07-17 is out!
Tags: javascript, tech, webdev, discuss
Published: 2021-07-17 07:55:37

---
title: My javascript / tech / web development newsletter for 2021-07-17 is out!
published: true
description: A roundup of all the best javascript, tech and web development links posted to my linkblog in the past week
tags: javascript, tech, webdev, discuss
---
In this week’s edition:

Creativity and optimism in tech, general webdev chat, javascript engine implementors

https://markjgsmith.substack.com/p/mark-smiths-newsletter-17-07-2021

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
Vite.js or How i became the fastest programmer alive.
Tags: vite, vue, react, webdev
Published: 2021-07-17 07:12:45

Created by Evan You (also the creator of Vue.js), Vite is a build tool that significantly improves the front-end development experience. You can use Vite to set up a development environment for frameworks like Vue and React, and even for a vanilla JavaScript app with a dev server and hot reloading in just three commands.
FYI: Vite is a french word that means "fast".
##Why vite ?
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vbp6054go9bqishukt47.png)
Before ES modules were invented, the bundling process eased the lives of developers by providing a mechanism that could process and concatenate the source modules into files. These files could easily run in the browser.

Bundlers (like webpack, Parcel, snowpack, etc.) improved the development efficiency to a great extent. However, as we moved to more ambitious applications, it increased the complexity of the project along with the code volume and number of modules.

The problem is with this huge code volume it will start impacting the performance level. In another words, it will take an unreasonably long time to run and as Benjamin Franklin said once: "Remember that time is money."

##How vite works ?
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z7f86kh320x18vrzl2tl.png)
Vite follows a recent trend of tools like Svelte (where the framework is basically compiled away) and Snowpack that leverage modern JavaScript features (such as ES modules) to provide a smooth, fast dev experience with little or no configuration at all.
In other words, you install Vite with a plugin or two, do very little configuration et voilà! you just need to start working on your app.

Vite is really fast, because it leverages native ES modules and doesn’t need to rebuild the whole bundle when something changes. This makes it fast, regardless of the size of your application.

Now, let’s take Vite for a spin and see how we go. It will be interesting to see how much of our normal workflow would be better handled with Vite.

##Performance
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pd6yl7w2crjypiakre56.png)
The [Why Vite](https://vitejs.dev/guide/why.html) page is primarily about performance and developer experience.
The pre-bundling Vite does with esbuild increases the page loading speed by 10 to 100 times than any JS bundler.
Vite dev server starts in an instant and with the Hot Module Replacement, every code change is reflected in the browser quickly, sometimes instantly.
##Conclusion
Vite is pretty cool! It’s a fine addition to the recent trend of tools that simplifies tooling like Parcel and Snowpack. That's why you should give it a try.
{% youtube LQQ3CR2JTX8 %}
Best Resource for data structure and algorithms for beginners
Tags: beginners, java, programming, computerscience
Published: 2021-07-17 07:03:26

It's time for giving placement period some priority, in this section I would like to share with you guys, one of the best and structured way approach for technical interviews.

Let us assume that we have  placement preparation within one or two years and we just **know basic level of coding and don't even know implementation of linkedlist and other data structures.** Then is it possible to crack product based companies????

**THE ANSWER is YESSSSS.....**

So, if you know hindi(language)then you can follow **pepcoding youtube channel**

some of the highlight of this youtube channel are their team have posted more 1200+ videos on each and every question of datastructure and algorithm in Java. 
Including every level of ds algo - like arrays, linkedlist, stack, queues, etc
I personally love the way Sumeet Malik sir teaches you and you will definitely be his fan once you attend his single lecture, you're gonna fell in  love with DS Algo, I bet.

They have team of few peoples who teach each and every concept in live sessions usually 10-15 minutes long on youtube and other videos are available in their playlist, you can check that out.

**But, It is just a youtube channel, how is that a structured way for technical interview??**

As I said you will get each and every concept on youtube channel but they have one website where you can watch video topic wise and attempt the question simultaneously. 

**https://www.pepcoding.com/resources/**

Some features of this website
1. They have managed more than 1000 questions in 
   difficulty wise level ( level-1 begineer , 
   level-2 intermediate , level-3 Advanced)and 
   that too topic wise.

2. You will get video solution and problem 
   explanation of each and every problem.

3. If you are preparing for placements and You 
   know hindi, you'll thank me later about this.

**The difference between theirs youtube channel and  website is that, On website you will get every thing very well organised, like you try to attempt a question and (if not able to attempt) then you get immediate solution to that.**

I know there are people like me who are begineer, who are advised to solve every thing from GFG but dont know the initial process of how to start, how to plan things out, how to give time for one problem as begineer, intermediate and advance.
You can try this out.
 
So, I hope you guys would get benefitted from this, and wish you for best placements possible.

Thanks for reading.
Laravel Image Text Watermarking Tutorial
Tags: laravel
Published: 2021-07-17 06:37:05

Hello Friends,

Now let's see example of how to image text watermarking in laravel. This is a short guide on laravel if image text watermarking. We will use how to use image text watermarking in laravel. Here you will learn how to use image text watermarking in laravel. Let's get started with how to image text watermarking in laravel.


More...
https://www.mywebtuts.com/blog/laravel-image-text-watermarking-tutorial
Go - If Else Statement
Tags: go
Published: 2021-07-17 05:44:49

---
title: Go - If Else Statement
published: true
date: 
tags: go
canonical_url: https://eternaldev.com/blog/go-if-else-statement
---

Conditional statement form the basics of any program and you will learn how to write if else statement in Go with practical examples

## Go - If Statement

Starting out, we have the basic if statement to run some logic when a particular statement is `true`

```go
package main

import "fmt"

func main() {
    percentage:= 75
    
    if percentage > 50 {
        fmt.Println("You hold a majority!")
    }
}
```

Go execute the statements within the braces when the condition is true

## Go - If... Else... Statement

Else statement helps in executing the statements when the `if` condition is false

```go
package main

import "fmt"

func main() {
    percentage:= 33
    
    if percentage > 50 {
        fmt.Println("You hold a majority!")
    } else {
        fmt.Println("You don't hold a majority")
    }
}
```

## Go - If... Else if... Else... Statement

When you have multiple conditions to check, you can use this format to check all the needed condition and then execute statement which match those conditions

```go
package main

import "fmt"

func main() {
    percentage:= 33
    
    if percentage > 50 {
        fmt.Println("You hold a majority!")
    } else if percentage > 30 && percentage <= 50 {
        fmt.Println("You have decent amount")
    } else {
        fmt.Println("Please check your life choices")
    }
}
```

## Go - If... with init Statement

Variables can be initialized at the state of the if statement and these variables are scoped within the conditional statement block. If you try to access the variable outside the if statement, you will recieve "undefined: {variable name}" error

```go
package main

import "fmt"

func main() {

	if percentage:= 76; percentage > 50 {
        fmt.Println("You hold a majority!")
    } else if percentage > 30 && percentage <= 50 {
        fmt.Println("You have decent amount")
    } else {
        fmt.Println("Please check your life choices")
    }
}
```

## Practical Assignment - Try these out

1. Build an application which prints out the person's eligibility to vote after getting the age of the person
2. Build an application which will print out the messages based on the time of the day

Join our discord channel and ask question if you have on doing these assignments

Check out live online editor [here](https://eternaldev.com/blog/go-if-else-statement) 
## Conclusion

Stay tuned by subscribing to our mailing list and joining our Discord community

[Discord](https://discord.gg/AUjrcK6eep)
Easy Way To Create Multiple Folders In Unity
Published: 2021-07-17 05:10:21

One of the things I usually do in a Unity project is to organize my project's Assets. I do so by creating separate folders for the different *Modules* in the project.

#What is a Module?
A *Module* is a group of related assets that can be organized into separate subfolders. Examples of *Modules* would be *Environment*, *GUI* and *Player*. Each of these modules have their own group of related assets organized into separate subfolders such as *Materials*, *Prefabs*, *Scenes*, *Scripts*, *Textures*, etc.

![Example of a Player module](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1k10uml8nqv8a598lnr.jpg)

#Problem
Creating all these folders every time you wish to organize a group of assets as a *Module* might be simple but it can get tedious! Imagine having to create a bunch of these *Modules* when you decide to do a massive reorganization of your project's Assets. It will definitely take quite a bit of your time which could be used for doing more productive things for your project. If only there was an easier way of doing this.

#Solution
I decided to implement editor scripts in Unity to save me time creating *Modules* and subfolders in my Unity projects. Also, I decided to implement this solution as a package since I was exploring creating custom Unity packages at the time.

You can install the package in Unity's Package Manager using this git URL: https://github.com/SalSatSat/CreateFolders.git

#Conclusion
The solution can definitely be improved on but for now, it serves it's purpose and has helped me save some time performing the tedious task of creating folders in my Unity projects. I hope this can help do the same for you.
font ligatures is a bad idea for beginners
Tags: texteditor, fontligatures, programming, javascript
Published: 2021-07-17 04:17:12

---
title: font ligatures is a bad idea for beginners
published: true
description: font ligatures for text editors can be bad idea for beginners and here's why.
tags: texteditor, fontligatures, programming, javascript
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/90jc3hoejtlwekzu1bhz.png
---
i just realized that font ligatures is a bad idea for beginners, one example of this, was one of my friends was watching a online course and the teatcher was using font ligatures and she tried make the "not equal" operator and was hitting his head against the wall because it was not looking like what she saw in the video, then she send me a message asking for help, at first i just told her to use the "!=" or "!==" but then she send me a screenshot of the vscode in the video and i realized it was because he's using font ligatures, that's why she thought it wasn't working",  she was so worried about that symbol she saw in the video that she forgot she could just run the code and see if it would work. that's makes me think that font ligatures is not a good idea to beginners and make them confuse about operators.

let's not forget that if you're doing video tutorials about programming, font ligatures in the editor is a bad idea too, programming by itself is hard enough for beginners and we should make sure the learning curve is less painfull for them.
A thing that works when it shouldn't is just as bad as a thing that doesn’t work when it should (100 Bytes Of Wisdom: Day 64)
Tags: career, journey, advice
Published: 2021-07-17 03:50:03

---
title: A thing that works when it shouldn't is just as bad as a thing that doesn’t work when it should (100 Bytes Of Wisdom: Day 64)
published: true
description: Bytes of Wisdom is a new project by Sam Jarman that brings together snippets of advice for software engineers
tags: career, journey, advice
//cover_image: https://direct_url_to_image.jpg
---

![A thing that works when it shouldn't is just as bad as a thing that doesn’t work when it should](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1nefcd0lhnzs71tt98q.png)

Not understanding what is going on with some code or a system you're working on is fundamentally bad. Often, this means bugs, but sometimes it means things work but you don't know how. It's incredibly tempting to call it a day there and finish on that, but a truly disciplined engineer looks further and figures out what is actually going on. You learn more that way and next time you come to that code or system, you're better equipped to change it.

Heads up: As with any terse bit of advice, there will be exceptions of course, and subtleties and nuance that can't possibly be captured in a Byte of Wisdom. This has been what I've experienced, I'd love to hear yours in the comments too!

You can catch up with all the other bytes at http://bytesofwisdom.com/