teleren/devto huggingface dataset:
How I created Swift XCode Templates to save my time
Published: 2022-09-22 17:55:53

Many years ago I started to develop iOS/MacOS apps with ObjC, then Swift.
Currently I'm working as iOS developer almost 9 years in outsource company.

With every new project I understood that I'm copying a lot of code from previous projects every time for a simple screens, then removing unnecessary code from those screens. With a years of experience I'm doing it without thinking at all, like a machine. This led me to the idea that I need to automate this process a little bit - start creating ready screens from templates.

I've created repository [XCode Templates](https://github.com/mihail-konoplitskyi/4KSOFT-XCode-Templates) where I started creating most recent templates that will save time while creating new screens for iOS/MacOS apps with default structure. Firstly this repository was private, but I made it public since I understood that it can be helpful for another iOS/MacOS developers.

Asking you to help me with ideas which templates should I create, which architecture to add during template creation (MVC/MVP/MVVM/VIPER), or just leave your thoughts regarding this idea in [GitHub issues](https://github.com/mihail-konoplitskyi/4KSOFT-XCode-Templates/issues).

Thanks a lot!
IntelOwl 101
Tags: tutorial, cybersecurity, opensource
Published: 2022-09-22 17:51:58

In this article, I'm going to show you what IntelOwl is, what it does, and how to install, and use it for your own cybersecurity projects so let's get started!

## What is IntelOwl
IntelOwl is an open-source intelligence tool that gathers as much data possible of an observable(IP, File, domain, etc). Basically, it collects data from various sources (websites, blogs, APIs, etc.) and presents them in a unified manner that can be easily read and parsed!

If you want to know how IntelOwl works and its underlying architecture visit their [github](https://github.com/intelowlproject/IntelOwl) and [website](https://intelowlproject.github.io/)

## Installing IntelOwl
One great feature of IntelOwl is its easy installment. Using the power Docker and docker-compose you can set it up and start using it under 10 minutes!

### Prerequisites
Before we get started you need to have the following:

- Python
- Docker
- docker-compose

so if you don't have these install them!

First lets clone their repository:

```
git clone https://github.com/intelowlproject/IntelOwl
```

then change your directory to `IntelOwl`

```
cd IntelOwl/
```

After this, we need to set up the environment files to configure IntelOwl so go to the `docker` directory. 

```
cd docker/
```
#### Application configuration

```
cp env_file_app_template env_file_app
```
#### Database configuration

```
cp env_file_postgres_template env_file_postgres
```
#### Integrations configuration

```
cp env_file_integrations_template env_file_integrations
```
_Note: if you want to configure it to your needs you check the [documentation](https://intelowl.readthedocs.io/en/latest/Installation.html#environment-configuration-required)._


After this we need to install all the dependencies by the following commands:

```
cd ..
./initialize.sh
```
After you get the prompt

```
Now you can start IntelOwl by running the start.py file (eg: `python3 start.py prod up` for production environment)
```

You are good to go! 

## Running IntelOwl

Now to start IntelOwl write or copy the command if you're like me ;)

```
python3 start.py prod up
```
Note: if you're in windows write `python` instead of `python3`

## Creating a User
After running IntelOwl execute the command (in a new terminal or tab) 

**Note: you need to only create a user once!**

```
docker exec -ti intelowl_uwsgi python3 manage.py createsuperuser
```
After this, it'll prompt you to give a username, email, password, etc.

![userCreatePrompt](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1q8fvfq442ew0b9iongb.png)


Once you've created your user go to

```
http://localhost:80
```

Congratulations! You've successfully installed IntelOwl. In the next article, I'll teach you how to use it and how things work. Till then happy typing!
My new personal page
Tags: nextjs, css, frontend, react
Published: 2022-09-22 17:43:52

My newest creation made finished in probably 2-3 hours (I forgor 💀). I am open to any suggestions or how it looks like.

Also if you could take a look at my creations and leave here suggestions or how it looks it would be great!

https://www.stefanm.me/

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ndb154fdp6smbkpc0lil.png)
Write safe code with immutable properties in Kotlin?
Tags: kotlin, android, backend, mobile
Published: 2022-09-22 17:41:46


This topic is highly underrated so it's good to know why we should try to use immutable properties.

I would like to point some safety measures when it comes to writing in Kotlin. Kotlin has awesome API's that allows us to write clean, safe and readable code.

One of safety guns in Kotlin is defining immutable properties **val** or read-write properties **var**

```
val num = 10
num = 5 //this is not allowed
```
The properties in Kotlin are encapsulated by default. That means that even _num_ is read-only property, it can have custom **getter** or it can hold mutable object like `mutableListOf()` which you can operate on. 

```
val list = mutableListOf(2,3,4)
list.add(5) //this gives us more flexibility
```
or even we can specify custom getter:

```
class Rectangle(val width: Int, val height: Int) {
    val area: Int 
        get() = this.width * this.height
}
```
With above examples we've seen that Kotlin is protecting us by default if we use **val** property.

The big question is, why we should use it in our classes which holds state? 

Let's see this example: 

```
var num = 0
for(i in 0..1000) {
thread {
 Thread.sleep(10)
num++
  }
}
Thread.sleep(3000)
println(num) 
```
In example above there are high chances that _num_ will not be **1000** because some threads will change value of this property and we will not have consistent app after all. 

The same applies with coroutines. The value will be modified as well. 

Limiting mutability in Kotlin:
- val keyword (we can make custom getter or use delegation)
- copy keyword applied on data class objects
- mutable collections (`mutableMapOf()` `mutableListOf()`...etc)

Prefer object and classes that are immutable over mutable. But if you need to change them, consider making immutable data classes and use a _copy_ to change the state.

```
data class User(
val name: String,
val surname: String,
val address: String
)
```
Let's say that user has changed his address in the meantime so we want to change this immutable _adress_ property with _copy_.

```
val johny = User(
"John",
"Johnny",
"Beverly Hills 74"
)

val johnyWithNewAdress = johny.copy(adress = "Holywood 12")
```
Another big mistake when it comes to mutability is down-casting immutable collection. This is huge mistake and please don't do it. 

Example: 

```
val list = listOf(1,2,3,4,6)
if (list is MutableList) {
list.add(5) //DON'T DO THIS
}

//Do THIS INSTEAD
val list = listOf(1,2,3,4,6)
val newList = list.toMutableList()
newList.add(5)
```
Here our list is not modified by outside, instead it creates copy of new list which you can easily modify.


There are some exception to this rules but chose it wisely, sometimes we need object to be fully mutable. Baseline is that we should limit mutability as much as possible.
Round() and fixed setprecision() functions
Published: 2022-09-22 17:26:36

- **Raund()** funksiyasi nima?

 Elementar matematikada siz yaxlitlash degan tushunchani eshitgan bo'lsangiz kerak.Yaxlitlash yerik sonlar yoki sonning standard shaklidan uzoqroq bo'lgan shaklda berilgan sonlarni ixchamlab olish uchun ishlatiladi deyish mumkin.

Quyida `round()` funksiya ishlatilish sintaksisini ko'rib o'tamiz.

```cpp
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main(){

float son;
cout<<"Sonni kiriting: ";
cin>>son;
cout<<"Natija: "<<round(son);

return 0;
  }

Console:

Sonni kiriting: 12.234234

Natija: 12



```

- **fixed  setprecision() functions** funksiyasi nima?

  Ushbu funksiya haqida qisqacha va elementar tushuntiradigan bo'lsam, Ushbu funksiya ham `round()` funksiyasi kabi yaxslitlash amalini bajaradi faqat ushbu funksiyani `round()` funksiyasidan farqi `round()` funksiyasi berilgan float yoki double tipidagi sonni integer tipiga o'zlashtirib beradi.`fixed  setprecision()` funksiyasi esa sonning ma'lum bir qismini yaxlitlash imkonini yaratadi.

Quyida masala orqali tushuntirishga harakat qilaman.

```cpp
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main() {

  /* fixed<<setprecision() - yaxlitlash funksiyasi
bo'lib quyida berilgan masala orqali qanday 
ishlashi haqida qisqacha tushuncha beraman.Nega 
pastdagi misolda 2 soni yozilgan desak ushbu
qavslar ichiga yozilgan sonning butun ishorasidan 
keyin nechta songacha yaxlitlashni anglatadi.
Masalan:
12.3273242 => fixed<<setprecision(2) => 12.33 consolega chiqadi.
*/

double son1;
float son2;
cin>>son1;
cin>>son2;
cout<<"Area is "<<fixed<<setprecision(2)<<son1*son2<<".";

return 0;
}

Console:

Son1 =>  8.25
Son2 =>  6.47

Natija: 53.38

```
 Ushbu keltirib o'tilgan misollar orqali `round()` va `fixed setprecision()` funksiyalari o'rtasidagi farqni va afzalliklarini qisqacha ko'rib chiqdik.

**[Telegram](http:\\t.me\meyliyev_blog)**  
**[GitHub](http:\\github.com\JamolMeyliyev)**
if...else
Published: 2022-09-22 16:50:53

> C++ matematikadan odatiy mantiqiy shartlarni qo'llab-quvvatlaydi:

Kichik: a < b
Kichik yoki teng: a <= b
Katta: a > b
dan katta yoki teng: a >= b
a == b ga teng
Teng emas: a != b

> Turli qarorlar uchun turli harakatlarni bajarish uchun ushbu shartlardan foydalanishingiz mumkin.

C++ da quyidagi shartli bayonotlar mavjud:

1. Agar belgilangan shart rost bo'lsa, bajariladigan kod blokini belgilash uchun if dan foydalaning
2. Agar bir xil shart noto'g'ri bo'lsa, bajariladigan kod blokini belgilash uchun else dan foydalaning
3. Agar birinchi shart noto'g'ri bo'lsa, sinov uchun yangi shartni belgilash uchun else if dan foydalaning
4. Bajariladigan ko'plab muqobil kod bloklarini belgilash uchun kalitdan foydalaning


Agar shart rost bo'lsa, bajarilishi kerak bo'lgan C++ kod blokini belgilash uchun if iborasidan foydalaning.

```cpp
if (condition) {
  // block of code to be executed if the condition is true
}
```

> Quyidagi misolda 20 ning 18 dan katta ekanligini aniqlash uchun ikkita qiymatni sinab ko'ramiz. Agar shart rost bo'lsa, matnni chop eting:

```cpp
if (20 > 18) {
  cout << "20 is greater than 18";
}
```
Link: You Don't Hate Mocks; You Hate Side-Effects
Tags: oop, mocks, testing
Published: 2022-09-22 16:41:27

---
title: Link: You Don't Hate Mocks; You Hate Side-Effects
published: true
description: 
tags: oop,mocks,testing
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

[Wonderful article](https://blog.thecodewhisperer.com/permalink/you-dont-hate-mocks-you-hate-side-effects) on testing that mirrors my learning path as well, but articulates all the nuances extremely well! If you're in OOP and struggling with Mocks, he has some good strategies here.

https://blog.thecodewhisperer.com/permalink/you-dont-hate-mocks-you-hate-side-effects
test
Tags: zwel
Published: 2022-09-22 16:34:57



```
         modifiedComments = comments.map((comment) =>
            comment.commentId === commentId ||
            Object.values(comment.replies).find(
               (cmt) => cmt.commentId === commentId
            )
               ? {
                    ...comment,
                    replies: {
                       ...comment.replies,
                       [nanoid()]: {
                          ...newComment,
                          repliedUserId,
                          repliedCommentId: commentId,
                       },
                    },
                 }
               : comment
         );
```

~~fdhdsgfhfgdh~~

> hgjfgjfgj

[sdfad](fdsfdf)
Code faster with Flutter Quickey ORM Package
Tags: orm, flutter, database, tutorial
Published: 2022-09-22 16:24:05


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kywn3f4w51h6uh0ycyul.png)


**QuickeyDB** is a fast Flutter ORM inspired by _ActiveRecord_ and built on top of _Sqflite_. **Made purely to be runtime only, eliminating the need to use code generators**.

**QuickeyDB** (_ORM_) uses a coding technique with _function descriptors_ connected to a _relational database_.

Apart from the data access technique, **QuickeyDB** can benefit a developer in many ways including:

- Requires **Simplified development and Maintenance**: this is because ORMs automate the **object-to-table and table-to-object conversion.** 

- QuickeyDB allows data **indexing improving database performance** 

- **You get to write better queries in a Dart**, Most developers are not the best at writing SQL statements.

- QuickeyDB has incredibly **lower code lines compared to embedded SQL Queries**.

- **Database Migration** and **Database versioning**.

- **Database Transaction** and **Batch Entries**

- **Memory database storage** for test cases and **situations that don't require data to persist**.

- **Relation**.

> Checkout example app

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i9rytiqmayr98x5n6xdb.png)


## Conclusion
You can find the complete documentation about **QuickeyDB** at [Here](https://github.com/itskenzylimon/quickeydb) and really get in-depth knowledge of how cool **QuickeyDB** is.

Want to keep in touch online? [Medium](https://medium.com/@itskenzylimon) | [Twitter](https://twitter.com/ItsKenzyLimon) | [Instagram](https://www.instagram.com/itskenzylimon) | [Behance](https://www.behance.net/itskenzylimon)
How do you use Diagrams at work?
Tags: discuss, community, design, tooling
Published: 2022-09-22 16:13:38

Developers, how do you use Diagrams at work?

Personally, I develop a lot of Desktop UI apps, so I use Diagrams to build the core architecture of the GUI system.

I know a lot of other people that use Diagrams for building things like page flowcharts, code-level call trees, mind maps, process designs and much more!

How do you use Diagrams at work? Comment below!





_NextSketch lets developers create architecture diagrams right inside IntelliJ Platform IDEs. Visit www.nextsketch.ca to learn more._
Back on the Grind
Tags: beginners, python, selftaught
Published: 2022-09-22 16:04:54

So I finally got my Microsoft surface go replaced. I started learning how to code for about 3 months now. Using "Python Crash Course" by Eric Matthes as my guide, I have a decent understanding of the basic fundamentals....I haven't coded since then..so now I will spend the day reviewing the fundamentals. Soon I will  begin creating my first project. A space invaders game..(pretty basic, I know). But I am excited to finally apply what I learned in the past couple of months! I will do my best to blog my journey!
Build enterprise-grade Node.js applications
Tags: node, microservices, github, programming
Published: 2022-09-22 16:04:52

We are thrilled to launch [Amplication](https://amplication.com/) v1.0! This is our official, production-ready version that includes all that is needed to help organizations, teams and individual developers teams, build faster, better and more efficiently. 

We’ve came a long way since our beta introduction of Amplication as an open-source project. With the help of the open-source community, we brought together thousands of developers around the globe who share our vision to just code what matters.

**So what's new in Amplication 1.0?**

- **Enterprise readiness**. We meet the requirements of enterprise users for **scale**, **collaborative development** and **monorepo** support.
- **Plugins**. You can use community-built **plugins** or create your own. Amplication integrates seamlessly with your existing workflows and external tools- so you don’t need to change a thing.
- **Microservices and monolith support**. Connect multiple services and build advanced **microservices** architecture. Or just go **monolith**. The choice is always yours.
- Take advantage of our **enhanced flexibility** to build any service with Amplication’s **modular code generation**, on service and project levels.
- **Git sync**, automated. Select automated sync with **private or public GitHub repos**.

There are additional features that will make the development process easier, streamlines and more organized. 
You can read more about it here: https://amplication.com/blog/amplication--version-1.0-is-now-live-cl89x7w6u726501s6xg825v2x
Half the price & faster twice
Tags: backend, lowcode, startup, ai
Published: 2022-09-22 15:57:36

We can build 80% of your backend needs with no-code & low-code technology, which brings you a vast economy of time & costs. We can crudify simple frontends & take software development projects from A to Z if you need it.
Backend for frontend in our meaning - read at the [coderfy.com](https://www.coderfy.com/backend-for-frontend/)
Django API Generator - Open-Source Project
Tags: webdev, django, generator, opensource
Published: 2022-09-22 15:50:25

---
title: Django API Generator - Open-Source Project
published: true
description: A simple tool for generating secure API services using Django - an Open-source generator provided by AppSeed.
tags: webdev, django, generator, opensource
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7nbmvd593n57tnm723s.jpg
canonical_url: https://blog.appseed.us/django-api-generator-open-source/
---
Hello Coders! 

This article presents an open-source tool able to generate secure APIs using **Django** as backend technology. [Soft UI Dashboard](https://appseed.us/product/soft-ui-dashboard/django/), the starter that incorporates the generator, is published on GitHub and based on the permissive (MIT) license, can be used in commercial projects or eLearning activities. Thanks for reading!

- 👉 [Soft UI Dashboard Django](https://github.com/app-generator/django-soft-ui-dashboard) - `source code`
- 👉 [Soft UI Dashboard Django](https://appseed.us/product/soft-ui-dashboard/django/) - `product page`

A video material that demonstrates the process can be found on YouTube (link below). Here is the transcript of the presentation:

- ✅ `Download the project` using GIT
- ✅ `Start in Docker`
- ✅ Access and `interact with the Books API` (CRUD calls)
- ✅ `Register a new model` Cities
- ✅ `Re-Start in Docker`
- ✅ `The new API node` (Cities) is generated
- ✅ `Access and use the new API` identity

{% embed https://www.youtube.com/watch?v=U5nbGHVthOU %}

---

> Thanks for reading! For more resources, feel free to access: 

- 👉 More [Django Dashboards](https://appseed.us/admin-dashboards/django/) - a curated index 
- 👉 [Django App Generator](https://app-generator.dev/django/) - A 2nd generation App Builder
OSD600 Lab 2
Tags: opensource, cpp, python, beginners
Published: 2022-09-22 15:43:18

## Contributing to another project
The project I chose to contribute to was [SiteGenerationTool](https://github.com/sfrunza13/SiteGenerationTool) by [sfrunza13](https://github.com/sfrunza13). I decided to add features to the project to be able to open `.md` files, and for `.html` files created using these files to have bold and italics Markdown indicators to be replaced with the appropriate HTML tags. 

Here is my [pull request](https://github.com/sfrunza13/SiteGenerationTool/pull/5).

This project was created using Python, which I was not familiar with. It took me an hour or two to get familiar with the structure of the language as well as the code before I was able to actually understand to properly change any code. After I got a hang of the language, it was fairly simple deciding to use regular expressions to search for the indicators for Markdown and replace them with the appropriate HTML tags. 

After my initial changes, the repo owner asked me to improve my code. My code was missing the ability to parse multiple Markdown indicators in a single line. I had to re-think how my regular expressions were used so that they could be looped. 

Through this process I learned a bit about Python and some of the features of the language, as well as how to use regular expressions in Python. Next time I contribute to a project, I would be a little more extensive in my source code to make sure all necessary elements of the feature that I am adding are present. 

## Receiving contributions 
I received contributions to my project from [sfrunza13](https://github.com/sfrunza13) and [devils2ndself](https://github.com/devils2ndself). With two different pull requests that address a similar issue, it creates the problem of having to reconcile the differences between the two different sets of code. I did not find any glaring issues in the code that was submitted, but I asked the authors to make small changes to better match my standards. It went very smoothly and easily thanks to the features of GitHub
Auto-install system dependencies for Ruby on Rails
Tags: ruby, programming, devops, tutorial
Published: 2022-09-22 15:37:41

Let's integrate Homebrew into our Ruby on Rails Project local set up.

There is a convention for Ruby on Rails projects to use `bin/setup` to set up and install/update required dependencies. But by default, it does not include system dependencies. 

We are going to use [the Homebrew Bundle tool](https://github.com/Homebrew/homebrew-bundle) for this.

First, we need to have a `Brewfile` with: 

```ruby
# Redis - For ActionCable support (and Sidekiq, caching, etc.)
brew "redis"
    
# PostgreSQL - brew install postgresql
brew "postgresql"
    
# Overmind (requires tmux)
brew "tmux"
brew "overmind"
    
# Imagemagick or libvips - for processing images (avatars, file uploads, etc.)
brew "vips"
    
# Yarn - for installing Javascript dependencies
brew "yarn"
```

Then, in `bin/setup,` we are going to add:

```ruby
puts "== Installing system dependencies =="
if system('[[ (-x "$(command -v brew)") ]]') # Is Homebrew available?
  system("brew bundle check --no-lock --no-upgrade") || system!("brew bundle --no-upgrade --no-lock") # install if there are missed dependencies
end
```

I prefer to add it in the beginning before installing other dependencies.

These will help new onboarding set up development with one command only. Reduces the number of instructions from `README`.

---

**Paul Keen** is an Open Source Contributor and a Chief Technology Officer at [JetThoughts](https://www.jetthoughts.com). Follow him on [LinkedIn](https://www.linkedin.com/in/paul-keen/) or [GitHub](https://github.com/pftg).
> If you enjoyed this story, we recommend reading our latest tech stories and trending [tech stories](https://jtway.co/trending).
🤔 “What about ESP and Luos?”
Tags: opensource, microservices, help, luos
Published: 2022-09-22 15:37:15

🤔 “How to get started with Luos?”

🤔 “What about ESP and Luos?”

🤔 “I need help on Raspberry Pi”

⛑ We recently opened a new channel on our Discord called help-forum, to support all developers in their daily questions.

⏩ https://discord.gg/luos

⏩ Join our Embedded and Edge developers Discord and get help from over 4,000 developers.