Categories
Technology / Hardware

Exploring ChatGPT: A Journey of Discovering AI’s Abilities

As someone who has always been fascinated by the capabilities of artificial intelligence (AI), I was intrigued and thrilled to stumble upon ChatGPT, a large language model developed by OpenAI. ChatGPT can respond to all sorts of questions, from factual to humorous, so I decided to put it to the test and explore its abilities.

I wanted to see what this AI-powered tool was capable of, so I started asking ChatGPT all sorts of questions, from the practical to the absurd. Overall I was impressed, how I can create fairly complex questions or discuss topics over multiple interactions while getting useful and insightful responses from ChatGPT. However, it is also noticeable that it may repeat itself, goes in circles sometimes or provides incomplete responses. I asked it to summarize my interactions with it and write this blogpost – it did write a great general summary and did a great start on more detailed sections, but some of the content in there was false.

Categories
Technology / Hardware

Tipping for contactless payments?

Especially in the U.S. tipping is important. Exchange students that are here in the U.S. for a semester 0r any other visitor have to get accustomed to gratuity. Especially, when paying at a restaurant for the first time.

The international education company Education. First (EF) for example has an introductory article into tipping.

In the past tipping either happened with cash or when signing your credit card receipt. The latter requires doing some math or checking a checkbox on some of the more sophisticated receipts.

But when the pandemic hit with COVID-19 a lot of companies, including restaurants, fast food and other takeout places switched to touch-less payments — with the exception of tipping. To this day it still happens in cash, via credit card receipts or by tapping a touch screen. None of these are very hygienic as the sales person has to handle the money, receipts, pens or using the touch screen again that every customer used.

Categories
World

The US government is failing

I’m deeply disturbed by how the US is trying to be a “modern” country but is failing in so many ways.

Minority groups are still struggling, oppressed and criticized. Gun violence and mass shooting are a DAILY occurence and despite all these tragedies the US government is unable to act and improve the situation significantly. Racism, inequality, equitable treatment are far from addressed, despite EVERYTHING the US has been through including George Floyd and Martin Luther King (60 years ago!).

The US fails at separating church and state and the two party system is flawed. I personally think that this “blue”/“red” divide is completely counter productive and prevents the US government from achieving anything meaningful. It’s so called democracy barely gives the people meaningful choices to vote on, but not the ability to say yes or no to larger and impactful issues. 

Why do people only get to vote whether they’re republican or democrat – by electing specific candidates? Why not also give US citizens the option on voting directly on things that actually matter to them! For example: abortions, healthcare and education.

Categories
Dev

Deploying a virtual machine using AWS CloudFormation

Recently I started using Amazon AWS and quickly realized that provisioning virtual machines, security policies and other network configurations is done one by one, which is tedious and needs to be automated. I had two options: either create a custom script to provision every single service or learn how to use CloudFormation.

CloudFormation is a provisioning tool for AWS resources that requires a YAML/JSON formatted file inside which cloud infrastructure is described. This definitely seems like the better option, but being completely new to AWS the learning curve is steep and it is difficult to understand the terminology, the various components and how to combine them. Even the graphical user interface, the “CloudFormation Designer” is not that easy to use for new users.

Screenshot of the CloudFormation visual designer software. It allows to drag and drop components or modify JSON/YAML format.
Screenshot of CloudFormation Designer

What did I do? First I learned how to provision all the components manually one by one, which took more time than I would like to admit, but was essential for me to understand the components and which ones depend on another. Eventually manually provisioning resources became easier and all the different services became familiar, that allowed me to transition my set up to CloudFormation. It was a long process. Hopefully this article will allow others to use CloudFormation much sooner.

Categories
Dev

Git: How to replace the master branch

It happens to all of us, we accidentally commit something into a git repo that we didn’t mean to, even worse we also pushed it to the main repository on GitLab or GitHub.

TL;DR — too long; didn’t read

Replace the current “master” branch with another “backup” branch.

Local: git branch -f master backup

Remote: git push origin +backup:master

via: StackOverflow
Categories
Dev

How to quickly replace environment variables in a file

We know storing credentials or other sensitive values in a configuration file (e.g. Kubernetes yaml file) is bad, but how can we get values easily replaced without having to do a complicated string substitution or writing a custom Python script?

I often have personal environment variable files for projects that I use to store credentials and configurations in. Before working on a project I would the corresponding configuration file into the shell session. However, these files cannot be stored in git repositories or shared with coworkers or bots. Even worse, sometimes the repositories have files in them that need to be changed, which is dangerous, because it’s easy to accidentally commit these files.

Well as it turns out, there already is a good solution and it is called envsubst. We can use envsubst to substitute environment variable placeholders inside configuration files and we can even pipe it into other commands like Kubernetes’ kubectl.

envsubst < config.txt
Categories
Dev

Prefix CLI output

When interacting with the command line or writing automated scripts it’d be useful to prefix the output with the date or something equivalently useful. If you are a Linux or Terminal user you’ve probably come across the pipe symbol | , which for example allows you to apply grep filters, but it is not entirely clear how to prefix constant strings or dynamically evaluated commands like the date.

Categories
Computer Science

Setting up your DEV machine in ONE script

A new computer is great 💻🎉 – It’s a clean slate. It’s snappy. It’s great… but it is missing all the tools I rely on every day! My work requires me to jump around in a variety of tools and technology stacks, hence I need to install a lot of different tools and be able to support different development environments.

Existing package manager for CLI tools

Over time developers load command line tools like people are buying toilet paper these days. From maven, via tl;dr, stopping at kubectl to tmux. We use all of those little nifty tools. Hence setting up a new machine can seem scary task at times, but fear not! For CLI tools we solved that problem long long ago with Homebrew, or as you probably know it: brew
(The windows folks probably know Chocolatey)

You can install maven for example by running: brew install maven

Fear not! The same tool that installs CLI tools can install (almost) all our applications!

me

Brew can do more!

Categories
Computer Science

Set up GitLab CI with an iOS project that uses Cocoapods

We all write tests for our applications and keep them in version controlled systems like GitLab or GitHub. However, how can we configure GitLab to run Unit and UI tests for us?

I couldn’t find a lot of documentation explaining how to set up continuous integration for iOS on GitLab, therefore I am writing this article.

Victor Peschenkov explains in his article how to use GitLab CI with Fastlane. My article focuses on how to run everything yourself.

Categories
Software / Games

Deploy static websites using GitLab CI

One of my favorite tools of 2017 is GitLab. I guess my enthusiasm about it even helped convince my company to switch over to GitLab. In this post I am describing how to automize the deployment of mlp.skofgar.ch using a GitLab CI Pipeline Job.

GitLab offers an one-stop solution for almost anything™ that we might need as a software developer. There’s a ton of bells and whistles from issue tracking to continuous integration (CI), continuous deployment (CD), monitoring. GitLab could easily replace Jenkins, Jira, GitHub, wiki systems, bug trackers and deployment monitoring services. It even integrates with Kubernetes.

Enough with praises – I recently cleaned up my neural network project that I worked with Camila on and wanted to facilitate the deployment process. However, since I don’t run a large container management system and don’t control all the details of the server I was going to put it on (my website is hosted by Cyon), I needed a different way.