teleren/devto huggingface dataset:
Lean Startup in Summary
Published: 2023-09-18 01:09:06

Here's a concise summary highlighting its main and most relevant topics:

## Start-Up Vision

Defines startups as organizations dedicated to creating new products or services under conditions of extreme uncertainty.
A startup aims to figure out the right product to build—a product customers genuinely want and will use.

## Validated Learning:

* Advocates for a startup's progression to be measured regarding validated learning about customers.
* Utilizes scientific experiments to validate if a vision holds true.

## Innovative Accounting:

* Suggests a new way of measuring progress in a highly uncertain environment.
* Adopts adaptive metrics that reflect real progress.

## Minimum Viable Product (MVP):

* The simplest form of a product that allows a team to maximize validated learning with the least effort.
* It prevents building products that nobody wants.

### Build-Measure-Learn Loop:

* The idea is to turn ideas into products swiftly, measure customers' responses and behaviors, and then decide whether to pivot or persevere.
* Shortens the development cycle.

![Build-Measure-Learn Loop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/scyf5rn5r4zsyijxlsx4.png)

## Vanity Metrics vs Actionable Metrics:

* Warns against using metrics that give a rosy picture but don't genuinely reflect progress.
* Advocates for metrics that can guide decision-making.

## Pivot or Persevere:

Based on feedback from MVPs, a startup must decide whether to continue on the outlined path (persevere) or make a fundamental change to the product (pivot).

## Sustainable Growth:

* Sustainable growth is achieved when new customers come from the actions of past customers.
* _Three engines of growth:_ Word of mouth, product usage as a side effect, and revenue-generated funding.

## Continuous Deployment:

Emphasizes the rapid release of product iterations to accelerate the feedback loop and adapt products faster.

## Lean Thinking:

Draws from the lean manufacturing revolution at Toyota, emphasizing the value of producing only what the customer wants and continuous improvement.
When Two Bugs Cancel Out
Tags: bugs, code, google
Published: 2024-05-10 16:00:30

---
title: When Two Bugs Cancel Out
published: true
date: 2023-09-18 00:00:00 UTC
tags: bugs,code,google
canonical_url: https://tomeraberba.ch/when-two-bugs-cancel-out
---

[*You can also read this post on my website!*](https://tomeraberba.ch/when-two-bugs-cancel-out)

I encountered a perplexing bug while implementing [table cell splitting in Google Docs](https://workspaceupdates.googleblog.com/2022/10/split-table-cells-in-google-docs.html).

## The bug report 🐛

The QA team found a bug where some of a table’s borders would be missing after a table cell split in certain scenarios. However, the borders reappeared when refreshing the page. That meant the document’s data was likely stored correctly and that [incremental](https://en.wikipedia.org/wiki/Incremental_computing) layout or rendering had a bug.

## The investigation 🕵️

At the time, the team was [migrating Google Docs from HTML-based rendering to canvas-based rendering](https://workspaceupdates.googleblog.com/2021/05/Google-Docs-Canvas-Based-Rendering-Update.html). QA reported the bug about a canvas-rendered document, which made me suspect it was a bug in canvas-based rendering. So I tried to reproduce the issue on an HTML-rendered document and it didn’t reproduce!

At this point I concluded the new canvas-based rendering must have a bug. Oh how wrong I was… After _much_ investigation, I realized canvas-based rendering was correct.

## Two bugs 🐛🪲

In Google Docs, the output of layout is the input for rendering. It turned out layout had a bug and canvas-based rendering was correctly displaying layout’s incorrect output. So why did HTML-based rendering look correct? It turned out that HTML-based rendering **_also_** had a bug, and the bug coincidentally “fixed” layout’s output so that the final output looked correct.

## How? 🤔

So how did the HTML-based rendering bug cancel out the layout bug? One of the reasons the team switched to canvas-based rendering, other than better performance, is that it’s more precise than HTML-based rendering.

With canvas-based rendering you effectively have to specify the location of every pixel, which means it can accurately render any layout. It did just that for the incorrect layout output!

On the other hand, with HTML-based rendering a table is rendered using a [`table` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table), which supports a limited set of layouts. HTML-based rendering could not faithfully render the incorrect layout output so it rendered the closest thing, which coincidentally looked correct.
Running Open Interpreter on Windows
Tags: openai, python, generativeai
Published: 2023-09-17 23:55:52

{% github KillianLucas/open-interpreter%}

## 1. Create a virtual env

```shell
mkdir openInterpreter
cd openInterpreter
python -m venv venv openinterpreter_env
```

## 2. Activate venv

```shell
./openinterpreter_env/Script/activate
```

## 3. Install open-interpreter

```shell
pip install open-interpreter
```

## 4. Run Open　Interpreter
The following command is to use gpt3.5 turbo.

```shell
interpreter --fast

Welcome to Open Interpreter.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

▌ OpenAI API key not found

To use GPT-4 (recommended) please provide an OpenAI API key.

To use Code-Llama (free but less capable) press enter.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
```
Using Secrets in Serverless
Tags: serverless, javascript, typescript, aws
Published: 2023-09-17 23:26:57

## Introduction

All you need to do is to create a `serverless.yml` file, with some default configurations, and a deployment user all set up, and you shall be deploying in no time.

Now imagine that you need to store credentials like MySQL user and password.

You can store them in `.env.*` files, and serverless can easily export them as environment variables for your AWS lambdas.

But should you be doing so?!

![Don't expose your secrets publicly](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ujovw2heg7ob7mrye8w0.jpg)
>Photo by [Luther.M.E. Bottrill](https://unsplash.com/@luthermeb) on [Unsplash](https://unsplash.com/)

NO!!

Why is that?!

Because that means revealing your secrets in your GitHub repositories (or some other platforms) publicly (_if your repo is private/internal, then no issue_).

You can use GitHub secrets (_which are not revealed publicly in your GitHub repositories_), but there is no easy integration with serverless. Moreover, if you are already using AWS (with serverless), chances are, you might be using AWS Secrets Manager already.

![AWS Secrets Manager](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h63v99mseusr6ccswako.jpg)
>Photo by [Kristina Flour](https://unsplash.com/@tinaflour) on [Unsplash](https://unsplash.com/)

## Does serverless support this?

Serverless does natively support AWS Secrets Manager in `serverless.yml` file.

You can use a configuration like:

```
custom:
  secret: ${ssm:/path/to/secureparam}
```

So that means you need to define a `custom.secret` attribute, JSON parse it, and then write all the environment variables (that are used by AWS Lambdas) in `serverless.yml` file referencing this secret.

Seems like a lot of work.

Any plugin for this?!

## Plugin time

I went through all serverless plugins that had remotely anything to do with AWS Secrets Manager.

But I found none that served my use-cases. Which were:
* Allows me to integrate directly with environment variables
* I'm already using `.env.*` files. I don't want to redefine these variables in serverless.yml
* I need the plugin to run during all the serverless lifecycle hooks I want
* I need the secret integration to happen during build stage (and not during runtime)
* Easily determine the secrets from `.env.*` files. Can use a prefix search for a keyword like: `secret:`
* Works without much plugin configuration

Well, I found none.

So I went ahead and decided to create a serverless plugin myself. Plugin time!!

![Serverless AWS Secrets plugin](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8wokp861inghvr7zzdn4.jpg)
>Photo by [Techivation](https://unsplash.com/@techivation) on [Unsplash](https://unsplash.com/)

## Hello, Plugin!

Without much further ado, here is my plugin: [https://github.com/robin-thomas/serverless-aws-secrets](https://github.com/robin-thomas/serverless-aws-secrets)

Serves all my use-cases, and more. Feedbacks are welcome.

**Show me some love by starring the project on GitHub!**

**If you like to contribute, take a look at some of the open issues!**
🌱 Project Series Intro
Tags: beginners, webdev, programming
Published: 2023-09-17 23:05:01

In this series, I plan to categorize and organize projects into two distinct types. Firstly, I will delve into academic projects, which I collaborated on with fellow students during my time at BCIT. These projects will include the likes of 1800 and 2800 projects, and I will provide a detailed account of their progression, along with an explanation of my specific contributions.

Irrespective of the project type, the posts in this series will follow the following structure.

> 1. Each post will commence with an explanation of the projects theme and how it was executed, with a particular focus on my roles and responsibilities. 

> 2. During the span of one to two projects, I will employ the STAR strategy to describe the experiences and insights gained.

> 3. I will articulate significant aspects and practices that I deem valuable and worth remembering.

> 4. I intend to share areas where improvements could have been made and outline what needs to be addressed in future updates.

I will be presenting these projects under these four overarching sections.

As someone who believes in gaining knowledge through exposure to numerous projects, I sincerely appreciate anyone who reads my blog posts and is able to take something away from them. If you have any feedback or suggestions for improvements, please feel free to share them.

I look forward to your continues interest in this ongoing series. Your support is greatly appreciated.
Setting Up Django For Collaboration
Tags: beginners, codenewbie, python, tutorial
Published: 2023-09-17 22:46:44

Here's a quick and simple tutorial on how to start a new Django project and get it ready to collaborate with others!

In this quick and easy tutorial we will:
- 1) Set up a new Django project
- 2) Use pipenv for dependency management
- 3) Upload our project to GitHub


## Prerequisites

You're computer most like already has python installed. You can check by running `python --version` or `python3 --version`. If it's not installed, [download the latest version of python 3.x](https://www.python.org/downloads/).

Once you have ensured python is installed, we just need to install 2 global dependencies. Run `pip install django pipenv`. Now we are ready to go! If you want to know more, feel free to check out the docs for [django](https://www.djangoproject.com/) and [pipenv](https://pypi.org/project/pipenv/) as well!

## Create Django Project

This step is easy enough! All we need to do is run this command in the folder where we want to create our Django project inside of: `django-admin startproject my_project_name` Note that `-`'s will not work here. Our project name must be in snake_case (like most things in python). This will create a new folder, in our cases, named `my_project_name`. 

We can cd inside or open our project up in our favorite IDE (Pycharm for the win!). And there we have it! Our Django project is set up and ready to go. There are a few more commands we can run to setup our project before we get started.

- `python manage.py migrate` to [migrate our database schema](https://cloud.google.com/architecture/database-migration-concepts-principles-part-1) for us. 
- `python manage.py createsuperuser` to create a user we can use to log into the admin panel.

## Setup Pipenv

Pipenv is an amazing tool we can use to setup version control. This allows us to easily save our python dependency versions so that others can others can clone our project and create an environment that downloads the same versions on dependencies we use so that nobody's project breaks because decency versions are out of sync.

- `pipenv --python 3.X` replace x with the specific version, like 3.11 for example.
- `pipenv shell` to activate the environment.
- `pipenv install django` because while Django is installed globally, it is not installed in our fresh pipenv environment.

## Push Project to GitHub

Create a totally blank repository on GitHub with the same name as the project you created and copy the ssh url for it (unless your on windows, then do https). If you need help setting up ssh, [GitHub has great documentation on how to set it up!](https://docs.github.com/en/authentication/connecting-to-github-with-ssh)

The blank repository will have all the docs you need to push your project up to GitHub, and now you're all set! You project is not only visible to the world, but anybody can download your project and use pipenv to install the right dependencies from your Pipfile.lock with `pipenv sync`

## Conclusion

If you enjoyed this content and want to see more Django tutorials like, comment and subscribe to let me know you want more!
BukuRain, release 0.0.1
Tags: osd600
Published: 2023-09-17 22:29:42

I spent one week creating my first CLI tool in JavaScript. To get started, I spend some time researching how to actually write one, as I had never had experience in creating CLI tools. In my initial attempt, I had a failure, but it served as a valuable learning experience. The next day, I approached the task with renewed confidence.

Currently, [BukuRain](https://github.com/pbelokon/BukuRain) features simple text-to-HTML conversion, output specification and automatic title setting for the page if there are two spaces after the line at the beginning of the document.

## Usage

When you initially install BukuRain, you can run the command ``buku`` to see a cool ASCII Art logo and an example using "--help"

BukuRain accepts a file path for any text file and will generate an HTML file containing the text from the original file. You can use it like this:

``buku --input ./file.txt`` 

Each consecutive group of lines in the text file is considered a paragraph. If the file starts with a line separated by two spaces, it will be treated as a title and rendered as an ``<h1>...</h1>`` tag.

Additionally, BukuRain can process an entire directory of .txt files. You can use it as follows:

``buku --input files/ ``

Lastly, BukuRain allows users to specify an output directory where all HTML files will be stored. By default, it uses ``./dist.`` You can customize the output directory using the following command:

``buku --output files/ --input ./file.txt``

That's all for this release of BukuRain. While it may not be the most advanced program for this task, I strongly believe it's a significant step forward for me.
Visual Studio JavaScript minifier / compressor
Tags: csharp, javascript, dotnet, software
Published: 2023-09-17 22:28:34

This article intent is to make minifying your JavaScript files improves initial parse time using [uglify-js](https://www.npmjs.com/package/uglify-js) which is a free library which is typically used at the command line, here in a Windows Forms application called in Microsoft Visual Studio by adding the application to Visual Studio’s external tools.

The reason for using a Windows Form application is simple, no need to leave Visual Studio or depend on a Visual Studio extension which may not be supported in later versions of Visual Studio. Also, a developer having simply source code can easily modify the code, for instance, change options and also change the executable called which can also be depreciated. Another reason for using this utility, no need to remember options sent to the utility.

## Important notes

- The tool has been configured to work for ASP.NET Core or Razor Pages projects only but the code is easy to modify for other project types.
- After using this utility to minify and create a map file, if a developer makes changes to the main JavaScript file outside of comments this utility must run again, no different than using uglify-js at the command line.

## Step 1: Install uglify-js

Best to install globally using the following command via PowerShell window.

```powershell
npm install uglify-js -g
```

## Step 2: Clone/Build

- Clone the source repository
- Open the solution in Visual Studio 2022 or later
- Build the project

## Step 3: Add to external tools

From Visual Studio Tool menu

- Click External Tools...
- Click the Add button and fill in the inputs
    - Title: MinifierCompressor (or whatever you want)
    - Command: Select the .exe for this project
    - Arguments: $(ProjectDir)
- Click Save


![configuring the tool](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vv4admzqtf8y1qa34exp.png)

## Try it out

Select a file and click Execute button. The update can be seen immediately in Solution Explorer.


![preview of tool in Visual Studio](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i2stp4r3a00bgxkt3t5p.png)

Results for selected file.


![results after tool has finished](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8s936dc12z3htnl15e3l.png)

## Why not offer multiple selections?

Could have but want to keep it simple. If a developer is not comfortable altering code for this and I get enough request I will modify to permit multiple files at once.

## Source code

Clone the following [GitHub repository](https://github.com/karenpayneoregon/web-project-utilities/tree/master).
Let's build WordPress for React together!
Tags: webdev, react, opensource, javascript
Published: 2023-09-17 22:04:22

Hello, my friends! Just starred this repo and it sounds promising. It’s Wordpress for React. Good timing to join. Cheers! https://github.com/webcrumbs-community/webcrumbs

{% embed https://github.com/webcrumbs-community/webcrumbs %}
Unknown named parameter in PHP 8
Tags: php, laravel, webdev
Published: 2023-09-17 21:56:45

I am adding hook support to one of my Laravel projects and was using a lot of the code from this wonderful Laravel Hook package at https://github.com/esemve/Hook.  However, this package was built for Laravel 5 and PHP 7. I am using Laravel 10 and PHP 8 so there were some issues I had to fix.

One of the issues was "Unknown named parameter" on the following line:

`$output = $output . call_user_func_array($function['function'], $params);`

Ih PHP 7, the keys in $params were ignored.  However, in PHP 8, they are not - keys are converted to named parameters.

So if $params was following:

`$params = ['key1'=>'value1', 'key2'=>'value2']`

key1 and key2 would be converted to $key1 and $key2 in PHP 8 when they were simply ignored in PHP 7.  This was a breaking change in PHP 8.

If you ever come across this issue, a simple fix it to convert $params to array values.  Changing to following should fix the issue.

`$output = $output . call_user_func_array($function['function'], array_values($params));`

Happy coding!


Sources:

- https://chrislloyd.co/fixing-laravel-php-8-error-unknown-named-parameter-error/
- https://www.php.net/manual/en/function.call-user-func-array.php
- https://wiki.php.net/rfc/named_params#call_user_func_and_friends
The Power of Passkeys
Published: 2023-09-17 20:50:32

In today's digital age, security has become paramount. We all know the importance of strong passwords, but have you heard about passkeys? In this blog post, we'll dive into the world of passkeys, a cutting-edge security concept that is changing the way we protect our digital lives.

What are Passkeys exactly? Passkeys are a revolutionary authentication method designed to enhance online security. Unlike traditional passwords, which rely on a combination of characters, numbers, and symbols, passkeys use a unique identifier that is generated and stored securely on a user's device. This identifier is then used to authenticate the user without the need for entering a traditional password.

Passkeys work by creating a secure and private connection between a user's device and the online service they are trying to access. 
As the need for stronger online security grows, passkeys are likely to become more prevalent. They are already being adopted by major tech companies and integrated into various platforms and devices. With passkeys, we can look forward to a safer and more convenient online experience.

In conclusion, passkeys are the future of digital security. By moving away from traditional passwords and embracing this innovative authentication method, we can protect our online identities and data more effectively. As technology continues to advance, passkeys are set to play a pivotal role in ensuring a secure and seamless digital future.
Second open-source contribution
Tags: opensource, programming, node, beginners
Published: 2023-09-17 20:26:20

Experiencing my second contribution to open source was vastly different than the first one! This time, it wasn't just a simple code PHP submission through email, but an entire process with GitHub's workflow! 

## How it started

Initially I submitted an [issue](https://github.com/sdthaker/Node-TILify/issues/9) to the owner of the repository [Node-TILify](https://github.com/sdthaker/Node-TILify) to add a feature to the tool, enabling basic markdown syntax handling and link generation. Once approved to work on the feature, forked the repo and began to work on improving the markdown syntax processor for the tool.

## How it went

Developing the extra features were rather trivial with the magical help of regular expressions `/\[([^\]]+)\]\(([^\)]+)\)/`, but navigating the code base was an interesting task indeed! The code base felt very much like a script rather than a program, but nonetheless I contacted the owner about this concern and they had told me that they were working on refactoring the code base into a more systematic design and decided that since the work had already begun they should complete it and I would get the improvement later on, and possibly help contribute to that as well down the line.

## How it ended

I'd finished developing the code for the tool and enabled better markdown syntax processing, then submitted a [pull request](https://github.com/sdthaker/Node-TILify/pull/10) and await it to be merged into the main branch. After a brief code review the merge finally came through! It felt nice too see my code in someones else's repository instead of my own for a change!