<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aram Haroyan on Medium]]></title>
        <description><![CDATA[Stories by Aram Haroyan on Medium]]></description>
        <link>https://medium.com/@aramharoyan?source=rss-f65e07f501c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*A5Y4BHbW7q1t6ZInFoawmA.jpeg</url>
            <title>Stories by Aram Haroyan on Medium</title>
            <link>https://medium.com/@aramharoyan?source=rss-f65e07f501c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 22:25:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aramharoyan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Homelab v1.2: Problems, mistakes and solutions]]></title>
            <link>https://aramharoyan.medium.com/homelab-v1-2-prolems-mistakes-and-solutions-fda34ae3985d?source=rss-f65e07f501c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/fda34ae3985d</guid>
            <category><![CDATA[k3]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[homelab]]></category>
            <dc:creator><![CDATA[Aram Haroyan]]></dc:creator>
            <pubDate>Fri, 26 Jun 2026 20:20:07 GMT</pubDate>
            <atom:updated>2026-06-26T20:34:16.238Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AHhb0F6YZm9SO6KhJxsaAg.png" /></figure><p>So, my homelab crashed (yes this kind of things happen, even if other people who are sharing their homelab experience don’t talk about problems in their YouTube channels, or articles).<br>What actually happend was a set of problems related to different topics. So let’s go by them one-by-one.</p><p><strong>Bad SD cards on Raspberry PIs</strong><br>For some reasone raspberry PIs stopped being available in my Grafana dashboard. The reason was some OS error so they could not boot. While I could format and reinstall a new OS on 2 of them, for the 3rd one it doesn’t work so I have ordered an <strong>SSD hat</strong> for RPI and booted one with NVME SSD.</p><p><strong>Power supply<br></strong>Initially I was using 60W Anker 6 port Desktop charger, the problem was it was not providing enough power per port for RPI which have attached HDD, so it was not able to use the attached storage as well.<br>Initally Raspberry PI requires 5.1V to 5.25V and 3A, while the charger I was using provides 2.4A per port.<br>Solution was to use more powerfull charger hub to be able to provide enough memory from a single port. So again took Anker but this time more powerfull charger for 100W but this time each port provides enough power to run Raspberry PI and attached HDD.</p><p><strong>Network<br></strong>Instead of old way wifi connection which was tricky and requires additional set up in the nodes, now the nodes are connected through a Gigabit Switch which provides more than enough network capacity for this small cluster.<br>(No it’s not smart switch and it’s not a V-Lan separated one.) This topic we will touch on another article.</p><p><strong>Software (Infrastructure)<br></strong>Other issue was with heavy weight software in a low compute capacity nodes.<br>* <strong>Heavy weight software</strong>.<br>I started to experiment with garage, then with SeaweedFS and finally came back to NFS servers (which btw require frequent restarts so I set up a scheduler to restart them).<strong><br></strong>For file management I used to install OpenCloud than switched to NextCloud, but they were too heavy to run on a Raspberry PI, especially when they were indexing. So I turned to use more lightweight solution instead: a FileBrowser, while it doesn’t have capabilities and extensions of NextCloud, while instead it’s a solution which is perfect to use in a low compute capacity platforms, and supports network attached disks (via NFS servers). <br>* <strong>Disk usage</strong>, as my raspberry pi nodes were down the master node was filled with k3s logs. <br>When the child nodes went down, the master node began incessantly logging connection timeouts and “Node NotReady” errors. It then tried to evict the pods from the dead nodes and reschedule them, which failed repeatedly, creating a massive loop of error logs.<br>When the child nodes dropped offline, the Longhorn manager on the master node lost access to those replicas. It will aggressively and continuously spam the system logs with rebuilding failures and network timeouts as it desperately tries to reach the missing drives.<br>Solution: configure journald on the master node to have a hard limit on log sizes. Editing /etc/systemd/journald.conf and setting SystemMaxUse=&lt;N&gt;</p><p><strong>The physical space<br></strong>As I switched to a wired network I have to turn off one x86_64 node and delete it from cluster (because of upper reason) as I don’t have a physical place to put it, unless will take a Rack which will fit all my hardware, help avoid creating mess. <br>And of course it will be more aesthetic to use a rack.</p><p>v1.3 homelab will be focuesed on AI Gateway or some Agentic staff…</p><p>Thank you for reading and see you in next articles and hope they will be interesting for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fda34ae3985d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Homelab v1.1 - Security and Observability]]></title>
            <link>https://aramharoyan.medium.com/homelab-v1-1-security-and-observability-66d4977242f3?source=rss-f65e07f501c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/66d4977242f3</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[logging]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Aram Haroyan]]></dc:creator>
            <pubDate>Tue, 10 Mar 2026 19:00:42 GMT</pubDate>
            <atom:updated>2026-03-10T19:08:20.001Z</atom:updated>
            <content:encoded><![CDATA[<p>Securing and monitoring Homelab powered by k3s. The SRE way.<br>In this article, we will cover 2 tactics: security and observability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*swjiKWy_VBJmKx-T0M4HIw.png" /></figure><p><strong>Security</strong></p><p>When securing the homelab, consider the security layers; each layer has its own security specifications. So let’s understand what layers we have.</p><ul><li>Network level (skipping in this article)</li><li>Node-level security</li><li>k3s cluster and services</li></ul><p><strong>Node level:</strong></p><p>In this level, we have a classic GNU/Linux OS. <br>As long as it’s a homelab, we need to forget about managed services like EKS/AKS or similar, and all the underlying benefits like cloud-specific IAM…<br>What we have to do to keep our node secure, here is a list of some key components of node-level security:</p><ul><li>Keep OS up-to-date</li><li>Use multiple authentication methods</li><li>Avoid using the root user</li></ul><p>I will avoid telling much about the current config that I have in my homelab, but below is a <a href="https://www.suse.com/c/linux-security-best-practices-for-safe-operations/">link to a documentation from SUSE</a> on the topic of securing the OS, strongly recommending reading it if you are going to create not only a home server, but any kind of server.</p><p><strong>K3S level:</strong></p><p>Here we have network and OS level configurations to do.<br>First things first, let’s run DaemonSets to continuously monitor our nodes and hosts using Falco and CrowdSec, and use a secure service to store credentials for our services using Hashicorp Vault.</p><ul><li>cert-manager — is a popular open-source Kubernetes add-on that automates the management, issuance, and renewal of TLS certificates.</li><li>Falco — is an open-source, CNCF-graduated runtime security tool designed to detect anomalous behavior in Kubernetes clusters, containers, and hosts. Acting as a “security camera” for cloud-native environments, it uses <a href="https://ebpf.io/">eBPF </a>to monitor system calls, alerting on violations like privilege escalation, file changes, or unauthorized network activity</li><li>CrowdSec— is an open-source, collaborative security solution that detects and blocks malicious IP addresses using a community-driven, crowdsourced approach. It acts as a lightweight IPS (Intrusion Prevention System) and WAF (Web Application Firewall), analyzing behavior to protect infrastructure, cloud services, and applications.</li><li>HashiCorp Vault — is an identity-based security tool designed to centrally manage, secure, and tightly control access to secrets — such as API keys, passwords, and certificates — across cloud and on-premises environments. It protects sensitive data at rest and in transit using encryption-as-a-service, reducing secret sprawl and mitigating data breaches through audited, dynamic, and temporary credential generation.</li><li>Trivy — is a comprehensive, open-source security scanner developed by <a href="https://www.aquasec.com/products/trivy/">Aqua Security</a> designed for cloud-native environments. It scans container images, filesystems, Git repositories, and Kubernetes for vulnerabilities (CVEs), misconfigurations, secrets, and software licenses. It is widely used in CI/CD pipelines for its speed, accuracy, and ease of use.</li></ul><h4><strong>Observability</strong></h4><p>When it comes to Kubernetes monitoring, your golden standard is a Prometheus, Loki, and Grafana stack (especially in a low-resource mode).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MluZv0zbfgx4olR7ibSpng.png" /></figure><ul><li>Prometheus — is an open-source systems monitoring and alerting toolkit designed for cloud-native environments, such as Kubernetes.</li><li>Grafana — is an open-source data visualization and analytics platform used to monitor, query, and analyze metrics, logs, and traces from diverse data sources.</li><li>Grafana Loki — is a horizontally scalable, highly available, and cost-effective log aggregation system designed specifically for Kubernetes (K8s).</li></ul><p>At the end we are getting a deployment like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gNP5iTJq2-JPy-Hwzb64oA.png" /></figure><p><strong>Conclusion</strong></p><p>To run a server(s), don’t forget to keep secure, and continuously monitor it, set up alerting, and keep up-to-date.<br>See you in the next articles.</p><p>#k3s #security #observability</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66d4977242f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Homelab v1]]></title>
            <link>https://aramharoyan.medium.com/homelab-v1-ebb9ff581892?source=rss-f65e07f501c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebb9ff581892</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[pihole]]></category>
            <category><![CDATA[nextcloud]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[k3]]></category>
            <dc:creator><![CDATA[Aram Haroyan]]></dc:creator>
            <pubDate>Thu, 05 Mar 2026 20:05:24 GMT</pubDate>
            <atom:updated>2026-03-10T19:02:34.557Z</atom:updated>
            <content:encoded><![CDATA[<p>Homelab powered by k3s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0LfB51VTUwUr56KnHwJugQ.png" /></figure><p>Recently, the world’s largest free online video-sharing platform enabled ADs in my region. And I thought that it&#39;s the best time to create a private home network, with an ad-blocker.</p><p>I have an old laptop and a few Raspberry PIs which I bought to run some distributed computing. And guess what, I decided to create a Homelab! <br>I’ve collected all the old hardware that I have, and now it’s time to understand how to set up the homelab.</p><p><strong>Hardware:<br></strong>Old router, x86_64 notebooks, arm64 Raspberry PIs, HDDs.</p><p><strong>Network:<br></strong>For now, isolated, will come to that in another article (maybe)…</p><p><strong>Security:<br></strong><a href="https://medium.com/@aramharoyan/homelab-v1-1-security-and-observability-66d4977242f3">Article published here.</a></p><p><strong>Hypervisor Software:<br></strong>Let’s forget about solutions like <br>* DevStack (lightweight OpenStack)<br>* CloudStack<br>* OpenNebula. <br>Those are very interesting to use and learn, but not my use-case, and too heavy for my setup.</p><pre>| Technology | Props | Cons |<br>| :------------ |:---------------:| :-----|<br>|Proxmos|great for homelab| not best for multiarch solution, too heavy for my laptop|<br>|kubernetes| fully customizable|still too heavy for my laptop|<br>|k3s|lightweight,. certified k8s solution| works for my setup|    </pre><p>In case this markdown table is not looking good -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*QVHgyzJSkS1Y-Tjpel-5nA.png" /></figure><p>The decision was to take a k3s. It is lightweight, supports both x86 and arm platforms, a highly lightweight certified K8s distribution.</p><p>Got a pretty good setup from 5 nodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IxwC83vq--CxDPTGvxbW7w.png" /><figcaption>(we all need a 5-node cluster to run a pi-hole, it’s a must)…</figcaption></figure><p><strong>Software</strong></p><ul><li><a href="https://pi-hole.net/"><strong>Pi-hole</strong></a>, it’s a network-wide ad blocker and DNS sinkhole that protects all devices on a network — including smart TVs and mobile apps — from ads, trackers, and malicious content without requiring client-side installation.</li><li><strong>NFS servers</strong>, allows you to share directories and files over a network.<br>Why not object storage — <br>* minio is deprecated<br>* ceph/swift are too heavy, requires multi-node deployment<br>* longhorn — requires formatting hard drives (where I had an information)</li><li><a href="https://nextcloud.com/"><strong>NextCloud</strong></a>, it’s an open-source, self-hosted content collaboration and file-sharing platform.</li></ul><p><strong>Cost:<br></strong>* Hardware: yes, I bought them, but I bought them 10 years ago, 5 years ago so if you have some old hardware you can use that instead and don’t need a 5-node cluster setup obviously.<br>* The software I have used in my homelab is free and open-source.</p><p>Conclusion: have built my own, small sovereign network, learned a lot of things, and will continue to extend my homelab.</p><p>#homelab #k3s #pihole #nextcloud #opensource #raspberrypi</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebb9ff581892" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Level Up Your Online Security with Your New BFF: MFA!]]></title>
            <link>https://aramharoyan.medium.com/level-up-your-online-security-with-your-new-bff-mfa-451526e32a69?source=rss-f65e07f501c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/451526e32a69</guid>
            <category><![CDATA[mfa]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Aram Haroyan]]></dc:creator>
            <pubDate>Sun, 24 Mar 2024 22:22:40 GMT</pubDate>
            <atom:updated>2024-03-24T22:22:40.371Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qT9NgWUfkV7EM2orzAMrXg.png" /><figcaption>Generated by <a href="https://designer.microsoft.com/image-creator">https://designer.microsoft.com/image-creator</a></figcaption></figure><p>Hey everyone! Your friendly neighborhood cybersecurity expert “Gemini” here. Remember passwords? Those used to be our main defense, but these days they’re like a screen door on a submarine — not exactly high tech.</p><p>That’s where MFA comes in — Multi-Factor Authentication, your new best friend in the digital world. Think of it like adding a super strong lock to your online accounts, even if someone steals your key (your password), they still can’t get in!</p><p>Here’s why MFA is basically your online superhero:</p><ul><li><strong>Fort Knox for Your Stuff:</strong> Imagine needing two keys to open your bank safe. That’s MFA! With a password being just one key, MFA throws in another challenge, like a fingerprint scan, a code from your phone, or a secret question. This extra step makes it way harder for hackers to steal your stuff.</li><li><strong>No More Password Panic:</strong> Creating strong passwords for everything is a pain. MFA chills you out. Even if a bad password gets snatched, the extra factor stops them cold.</li><li><strong>Work From Anywhere, Worry Less:</strong> Working remotely is awesome, but it can also be a security risk. MFA acts like a guard at the castle gate, checking your ID before letting you into work systems, no matter where you are.</li><li><strong>Be a Compliance Champ:</strong> Some jobs require super secure logins. MFA is your shining armor, helping you follow the rules and avoid trouble.</li><li><strong>Superpowers Made Easy:</strong> MFA might sound fancy, but it’s actually super simple. It’s usually just a quick phone notification or a scan with an app. Big security boost, tiny hassle.</li></ul><p><strong>Become Your Own Security Hero</strong></p><p>MFA isn’t magic, but it’s pretty darn close. By turning it on for your accounts, you’re building a fortress around your digital life. Don’t wait for a cyberattack to be your wake-up call. Grab your new BFF, MFA, and be your own hero!</p><p>#GeneratedByGemini :)<br>Yep this time I have “cheated”.<br>By the way prompt for the image is also #CreatedByGemini.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=451526e32a69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Tools and Techniques for Better Python Project Setups]]></title>
            <link>https://medium.com/better-programming/tools-and-technics-for-better-project-setup-9909abca263f?source=rss-f65e07f501c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/9909abca263f</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Aram Haroyan]]></dc:creator>
            <pubDate>Mon, 04 Apr 2022 15:25:35 GMT</pubDate>
            <atom:updated>2022-04-05T11:18:28.787Z</atom:updated>
            <content:encoded><![CDATA[<h4>Let’s create a well-designed Python project.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4xmhYcGtoute7Zkq" /><figcaption>Photo by <a href="https://unsplash.com/@octadan?utm_source=medium&amp;utm_medium=referral">Octavian Dan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>1. To Write Better Code and Avoid Common Mistakes</h3><p>Sometimes when we are adding new features to our application it can affect the existing code or break its functionality.</p><p>To avoid this situation we do write unit tests and run them every time to ensure that the new functionality that we have added is not harmful to the application.</p><p>So about tests, there are libraries and frameworks for writing better tests and running them easily such as <a href="https://docs.pytest.org/">Pytest</a> and <a href="https://tox.wiki/">tox</a>.</p><p>Pytest can help us not just run tests but also configure how to run them, which files to run, etc…Pytest has a configuration file pytest.ini where you can describe its configuration for example which version should be Pytest or which are test files like the following.</p><pre># pytet.ini<br>[pytest]<br>minversion = 6.0<br>addopts = -ra -q — cov=src — cov-report=html<br>python_files = test_*.py</pre><p>Also, it has integrations one of them is <a href="https://github.com/pytest-dev/pytest-cov">pytest-cov</a> which integrates <a href="https://github.com/nedbat/coveragepy">coverage</a> with Pytest, coverage can help us by providing information about which part of the app is covered by a test and which is not, it also provides a coverage report in various formats XML, JSON, HTML and shows how many percent of code is covered by tests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*i55BWlIEaP8xRxdQyVNnKQ.png" /><figcaption>Screenshot from <a href="https://coverage.readthedocs.io/en/6.3.2/">https://coverage.readthedocs.io/en/6.3.2/</a></figcaption></figure><p>Tox is a generic virtualenv management and test command-line tool.<br>Checking that your package installs correctly with different Python versions and interpreters<br>Running your tests in each of the environments, configuring your test tool of choice<br>Acting as a frontend to Continuous Integration servers, greatly reducing boilerplate and merging CI and shell-based testing.<br>Tox also has its configuration file.</p><pre>[tox]<br>isolated_build = True<br><br>envlist =<br>    py{38}<br><br>[testenv]<br>usedevelop = true<br>deps =<br>    -r src/requirements_dev.txt</pre><p>These kinds of tools can help you to ensure that any changes done will not affect features done before.</p><h3>2. How to Avoid Code Smells</h3><p>Sometimes there can be unused variables in the code or the written code style can not correspond to PEP8 rules. Here static code analyzers come to help us.<br>So here are a couple of static code analyzers with their configuration example.<br><a href="https://github.com/PyCQA/pylint">Pylint</a>, <a href="https://github.com/pycqa/flake8">Flake8</a>, <a href="http://www.mypy-lang.org/">MyPy</a>.<br>These tools can help us to avoid things like dead code, none applicable code for example breaking PEP-8 rules, unused variables in code, etc...<br>Pylint config: create .pylintrc file</p><pre>[MESSAGES CONTROL]<br>disable=<br>    missing-docstring,<br>    too-few-public-methods</pre><pre>[REPORTS]<br>output-format=colorized<br>files-output=no<br>reports=no<br>evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)</pre><p>Flake8 config: create .flake8 file</p><pre>[flake8]<br>ignore = E203, E266, E501, W503, F403, F401, E402<br>max-line-length = 120<br>max-complexity = 18<br>select = B,C,E,F,W,T4,B9<br>exclude =<br>    .git,<br>    tests</pre><p>These kinds of tools can help you to define a code style for the whole application and developers will keep it!</p><h3>3. How to Avoid Breaking the Working Application</h3><p>Imagine a situation where someone pushed a code without running all the tests and static code analyzers, which may affect existing features.<br>So to avoid this kind of situation pre-commit came to help us.<br>Pre-commit is a framework that creates git hooks to make sure your code is written the is corresponding to your defined code style.<br>It scans your source code and runs all the checkers you will define in your pre-commit config file: .pre-commit-config.yaml</p><pre>repos:<br>  - repo: &#39;https://gitlab.com/pycqa/flake8&#39;<br>    rev: 3.8.2<br>    hooks:<br>      - id: flake8<br>        name: Style Guide Enforcement (flake8)<br>        args:<br>          - &#39;--max-line-length=120&#39;<br>  - repo: &#39;https://github.com/pre-commit/mirrors-mypy&#39;<br>    rev: v0.720<br>    hooks:<br>      - id: mypy<br>        name: Optional Static Typing for Python (mypy)</pre><p>These kinds of tools can help you to avoid harmful code in your git repositories.</p><h3>4. Vulnerability Scan</h3><p>Every application can be hacked and there is a risk of a data breach or source code breach, data encryption, application breakdown, or any other harmful things.<br>There are a bunch of tools for vulnerability scan, but we will have a look at <a href="https://www.sonarqube.org/">Sonarqube</a>. Sonarqube is an open-source powerful tool for code quality and security scanning, and one of the leading tools in this industry.<br>More in the <a href="https://docs.sonarqube.org/latest/">official documentation</a>.<br>You can set up a local Sonarqube server using a Docker image and define sonar-project.properties</p><pre># must be unique in a given SonarQube instance</pre><pre>sonar.projectKey=python_app_blueprint</pre><pre># --- optional properties ---</pre><pre># defaults to project key</pre><pre>#sonar.projectName=My project</pre><pre># defaults to &#39;not provided&#39;</pre><pre>#sonar.projectVersion=1.0</pre><pre># Path is relative to the sonar-project.properties file. Defaults to .</pre><pre>#sonar.sources=.<br></pre><pre># Encoding of the source code. Default is default system encoding</pre><pre>#sonar.sourceEncoding=UTF-8</pre><h3>5. Structuring Your Application</h3><p>You probably have read about SRP — single responsibility principle and variable naming, so they are not only about programming in python, java, c#, or any other language, they are general-purpose principles and work almost everywhere even in folder creation.</p><p>So it is better to split your application into different folders and give them corresponding names, and store your data separately.<br>For example:</p><pre>├── LICENSE<br>├── Makefile<br>├── project.toml<br>├── pytest.ini<br>├── README.md<br>├── setup.cfg<br>├── setup.py<br>├── sonar-project.properties<br>├── .ci<br>│   ├── some_pipeline.yaml<br>│   ├── scripts<br>├── src<br>│   ├── app<br>│   ├── requirements_dev.txt<br>│   └── requirements.txt<br>├── tests<br>│   ├── integration<br>│   │   └── __inti__.py<br>│   └── unit<br>│       └── __init__.py<br>└── tox.ini</pre><p>Here’s an <a href="https://github.com/aram2726/python_application_blueprint">example application blueprint</a>. Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9909abca263f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/tools-and-technics-for-better-project-setup-9909abca263f">5 Tools and Techniques for Better Python Project Setups</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improve your skills as a software engineer.]]></title>
            <link>https://aramharoyan.medium.com/improving-your-skills-as-a-software-engineer-13f8f1cf04e8?source=rss-f65e07f501c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/13f8f1cf04e8</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Aram Haroyan]]></dc:creator>
            <pubDate>Fri, 11 Jun 2021 13:14:54 GMT</pubDate>
            <atom:updated>2021-09-09T12:36:53.630Z</atom:updated>
            <content:encoded><![CDATA[<p>You are a good coder and you are doing great. You know a web framework or two and you are writing applications like personal blog, online store, discord bot, etc…<br>So what next?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mjOnC1jADpDPB242xVvGrw.png" /></figure><p><strong>Table of content.</strong><br><em>* Best Practices <br>* Algorithms<br>* Testing<br>* Documentation<br>* Databases<br>* Containers<br>* Clouds<br>* CI/CD<br>* Tools</em></p><h4><strong>Best practices.</strong></h4><blockquote>Reading technical books or articles is one of the core concepts of improving your professional skills, here are a couple of examples.<br><strong>Books:</strong><br>* <a href="https://en.wikipedia.org/wiki/Robert_C._Martin">Robert Martin</a> also known as “Uncle Bob” an experienced software engineer wrote a great book “Clean Code” this will help you to understand a few concepts like <a href="https://www.dotnettricks.com/learn/designpatterns/solid-design-principles-explained-using-csharp">SOLID</a>, and best practices of code design. Another great book was also written by him is “Clean Architecture”…<br><strong>Articles:</strong><br>* <a href="https://realpython.com/">RealPython</a> a python learning platform has good articles, one of them is about <a href="https://realpython.com/python-memory-management/">memory management in python</a>. <br>* Or <a href="https://towardsdatascience.com/multithreading-vs-multiprocessing-in-python-3afeb73e105f">another article</a> about multiprocessing and multithreading use cases.<br>Articles like this will help you to dive deeper into language internals and understand how it works.<br><strong>Logging:</strong><br>Writing logs in your application is a good appoarch to understand what happened in case of some unexcepted fauilures.</blockquote><h4>Algorithms.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*TiZGMUAw6bhHOrtTV9KPzQ.png" /></figure><blockquote>An algorithm is a finite sequence of well-defined, computer-implementable instructions, typically to solve a class of specific problems or to perform a computation.<br>In <a href="https://www.geeksforgeeks.org/fundamentals-of-algorithms/">this article</a> by <a href="https://www.geeksforgeeks.org/">GeeksforGeeks</a>, you can meet popular algorithms, their definition, and implementation.<br>And in sites like <a href="https://app.codesignal.com/">CodeSignal</a>, you can train, use those algorithms to solve some issues.</blockquote><h4><strong>Testing.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nrrGpBA0CUIvq32nHBeHKA.png" /></figure><blockquote>Testing is one of the key concepts of software development and TDD.<br>* Unit tests help you to ensure that your functions are working properly. Let’s pretend you have a function that accepts 2 parameters both of them should be numeric and should return their summary, so each time you will pass parameters 2 and 5, the output should be 7 and should not depend on any other external change. <br>* Integration tests help you to ensure that changing your code in some components does not affect other components related to it, for example, you have a blog (API) and an endpoint of your API should return a list of blog post entities with some limit.<br>Let’s pretend you have done a change on the query and now it is returning not only blog post entities but also related author entities, so after doing that change your API test client should also return a response for that endpoint with 200 status code to be successful.<br>* Also using testing frameworks like <a href="https://docs.pytest.org/">Pytest</a> or <a href="https://tox.readthedocs.io/en/latest/index.html">Tox</a> will help you to set up your tests and configure them using various extensions.</blockquote><h4><strong>Documentation.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yruCBGgbuNVYunXt5T7egQ.gif" /></figure><blockquote>Writing documentation for your project is one of the key aspects of software development. There are different types of documentation like<br><strong>* technical requirements<br>* use cases<br>* code implementation<br>* API documentation<br>* deployment documentation<br>* architecture implementation</strong></blockquote><blockquote>* For technical documentation and use cases, there are tools like <a href="https://www.atlassian.com/software/confluence/why-wiki-collaboration-software">confluence</a>.<br>* For API documentation: tools like <a href="https://swagger.io/">swagger</a>.<br>Let’s architecture implementation.<br>So architecture doc is a useful thing to understand how the application or applicationS work. For example, you have a micro-service architecture or a monolith app with some integration systems. You leave the project and a new developer is coming. First, he needs to understand the application workflow, here the application workflow diagram will help him a lot.<br>You can create application diagrams using tools like <a href="https://app.diagrams.net/">diagrams.net</a> and <a href="https://www.lucidchart.com/pages/">lucidchart</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*rE4v2xu5SIoMsM9QobUW1w.png" /></figure><blockquote>Here newcomers will see that the application has integration with the payment system and email service.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*aJK-QZbPJnsRiX2dvJXuIw.png" /></figure><blockquote>Or here newcomers will see that the application is serverless and is fully using cloud components.</blockquote><h4>Databases.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FxB1I4uForAhGpgkegjooA.jpeg" /></figure><blockquote>So you are a developer and have written multiple applications that were using some database. Let’s understand what kind of databases exists and what is the difference between them, here are some of them.<br><a href="https://www.ibm.com/cloud/learn/relational-databases"><strong>Relational Databases</strong>:</a><br>* SQLite<br>* MySQL<br><a href="https://www.c-sharpcorner.com/article/what-are-object-oriented-databases-and-their-advantages2/"><strong>Object-Relational Databases:</strong> </a><br>* Postgresql<br><a href="https://www.mongodb.com/document-databases"><strong>Document-oriented Databases (NoSQL):</strong></a><strong><br>* </strong>MongoDB<br>* Firebase Realtime Database<br>* Apache HBASE<br><a href="https://neo4j.com/developer/graph-database/"><strong>Graph Databases </strong></a><a href="https://www.mongodb.com/document-databases"><strong>(NoSQL):</strong></a><a href="https://neo4j.com/developer/graph-database/"><strong>:</strong></a><strong><br>* </strong>Neo4j<br>* Cassandra<br><a href="https://aws.amazon.com/redis/"><strong>key-value (In memory):</strong></a><strong><br>* </strong>Redis<br>In <a href="https://www.ibm.com/cloud/blog/sql-vs-nosql">this article</a> by <a href="https://www.ibm.com/us-en/">IBM</a>, you can find the difference between Document-oriented and Relational databases.<br>And in <a href="https://neo4j.com/developer/graph-db-vs-rdbms/">this article</a> by <a href="https://neo4j.com/">Neo4j</a> you can see the difference between RDBMS and Graph DB.<br>Also you need to undestand things like:<br>- <a href="https://jslvtr.gitbooks.io/big-data-analysis/content/nosql/sharding-and-replication.html">Replication and Sharding</a><br>- <a href="https://www.ibm.com/docs/en/cics-ts/5.4?topic=processing-acid-properties-transactions">ACID</a><br>- <a href="https://www.ibm.com/cloud/learn/cap-theorem">CAP theorem</a></blockquote><h4>Containers.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*zoNWGTTyIssM4pX061699w.jpeg" /></figure><blockquote>* So “<a href="https://azure.microsoft.com/en-us/overview/what-is-a-container/#why-containers">What is a container and its use cases?</a>” is well explained in the article by Microsoft Azure.</blockquote><blockquote><strong>Use Cases</strong><br>Let’s pretend we need to write an application that should use some database (for example AWS DynamoDB). So it leaves in a cloud, but we also can use it locally by downloading a zip package or we can use it <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html">from inside a container</a>. <br>Or if we need to use some application that is not installed on our local PC we can use its container image (if we will have container runtime in our local PCs) from the container repository for example <a href="https://hub.docker.com/">https://hub.docker.com/</a>. <br>Or we can create a container image for our application simply by creating a <a href="https://docs.docker.com/engine/reference/builder/">Dockerfile</a> in our application source directory.<br><strong>/ — — — — — <br> ./RecomendationService<br> — src — — — — * </strong>source code of application<strong><br> — Dockerfile — * </strong>container description<strong><br> — — — — — /<br></strong>Other popular usecase of containers is microservice architecture where every service is leaving inside a container and there is a system which is orchestrating them like <a href="https://kubernetes.io/">Kubernetes</a>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-5CJsxBU7bfqIIVfG_dKhA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1f7yby_be6KzPLZYGc0QQg.png" /></figure><blockquote>* Containers also are being used as well in <a href="https://www.virtual-solution.com/en/blog/mdm-or-container/">mobile apps</a>.</blockquote><h4>Clouds.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PEN4-vG-hZdMqMS9deT8HA.png" /></figure><p>First, we need to understand that there are different types of clouds like <a href="https://www.ibm.com/cloud/learn/iaas">IAAS</a>, <a href="https://www.salesforce.com/saas/">SAAS</a>, <a href="https://www.ibm.com/cloud/learn/paas">PAAS</a>.<br>Today giants like <a href="https://aws.amazon.com/">AWS</a>, <a href="https://azure.microsoft.com/en-us/">Azure</a>, <a href="https://console.cloud.google.com/">GCP</a>, <a href="https://cloud.ibm.com/login">IBM</a>, and <a href="https://www.oracle.com/cloud/">Oracle</a> clouds are providing all these services in a pack, while small or medium-size cloud providers can give you not many resources like:<br><strong>* shared hosting<br>* networking tools: Firewall, VPN<br>* compute engines: VPS, Kubernetes<br>* Database Systems <br>* Horizontal scaling across data centers.</strong><br>Cloud computing includes a lot of services that can help you to create your applications using best practices of solution architecting. They support a lot of different solutions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5y3iOH23MvgDFxz3KeOG2w.jpeg" /></figure><p><strong>* Serverless (No need to set up and manage a virtual machine)<br>* Supercomputers<br>* Object Storages<br>* Various integration systems (Message Queue, Email services, notification systems)<br>* Data analysis tools (Hadoop and Spark clusters)<br>* Sattelite services<br></strong>The advantages of cloud computing are “all in one“ready-to-use components, services, integrations, tools, etc for any kind, size, and difficulty of projects…</p><h4>CI/CD.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GdC4eNbzweETqTNlHoN8hQ.png" /></figure><p>So we have an application that is deployed to a cloud and we need to add some extra updates there, we have to write and test the code, and we have pushed it into the repository. Now we have to connect to the server by ssh, go to the application directory, pull the code, run the tests, ensure that everything is working properly, and restart a web server.<br>To avoid all these steps we can set up a <a href="https://www.redhat.com/en/topics/devops/what-cicd-pipeline">CI/CD Pipeline</a> that will do all the necessary work.<br>We can do that using various tools like: <br><a href="https://circleci.com/">CircleCi</a><br><a href="https://www.jetbrains.com/teamcity/">TeamCity</a><br><a href="https://www.atlassian.com/software/bamboo">Bamboo</a><br><a href="https://docs.gitlab.com/ee/ci/">GitLab Ci</a></p><h4>Tools.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3008z3i_u6xgSRvQUFORrQ.jpeg" /></figure><p>And at last, let’s see a couple of free tools that will be useful for us.<br>* <a href="https://dbeaver.io/">DBeaver</a>, <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/workbench.settingup.html">NoSQL Workbench</a> are tools to manage various DBMS locally and by ssh tunnel, some of them are.<br>* <a href="https://www.syntevo.com/smartgit/">SmartGit</a> is a desktop app to manage your git repositories.<br>* <a href="https://pre-commit.com/">Pre-Commit</a> is a framework to set up git webhooks for your application.<br>* <a href="https://www.postman.com/">Postman</a> is a tool for testing APIs and sharing your test collections inside a team.<br>* Monitoring systems like <a href="https://rollbar.com/">Rollbar</a>, <a href="https://sentry.io/welcome/#">Sentry</a>, and <a href="https://www.elastic.co/what-is/elk-stack">ELK stack</a> helps you to collect metrics about your application and system that is working, tracking their health status.<br>* Code quality tools like <a href="https://www.sonarqube.org/">SonarQube</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13f8f1cf04e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I switched my search engine from google to duckduckgo.]]></title>
            <link>https://aramharoyan.medium.com/why-i-switched-my-search-engine-from-google-to-duckduckgo-8cfa79aa628b?source=rss-f65e07f501c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cfa79aa628b</guid>
            <dc:creator><![CDATA[Aram Haroyan]]></dc:creator>
            <pubDate>Wed, 17 Mar 2021 12:23:01 GMT</pubDate>
            <atom:updated>2021-03-18T16:30:57.820Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*Usr-aEEyaEP7jgRHZEU6dw.png" /><figcaption>image is a screenshot from <a href="https://duckduckgo.com/">https://duckduckgo.com/</a> homepage</figcaption></figure><p><strong>The Story.<br></strong>Recently one of my neighbors asked me to recommend him a computer.<br>So I opened a browser and started to search for electronics shops in our city (Yerevan). So I’ve started looking through them, and after a day advertisements started DDOS my social accounts…</p><p>In my facebook and instagram accounts, I’ve started to see sponsored pages of electronics stores all day long and I didn’t like that. So I remember that once I’ve searched in google Rasberry pi and the same picture there, the next day I’ve started to see in my social network accounts a lot of Rasberry pi seller paid promotions.</p><p><strong>So what is the matter that I’ve chosen duckduckgo as my default search engine?<br></strong>So as it is written on their official <a href="https://duckduckgo.com/">website</a>.</p><ul><li><strong>We don’t store your<br>personal information. Ever.</strong></li><li><strong>We don’t follow you<br>around with ads.</strong></li><li><strong>We don’t track you in or out<br>of private browsing mode.</strong></li><li><strong>We don’t track you in or out<br>of private browsing mode.</strong></li></ul><p>Chose duckduckgo and leave AD free))</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cfa79aa628b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>