Pinned toot

Hi!
I'm a Software Developer writing in , and mostly. I'm in love with and use it for my pet projects.

I use Linux for almost a decade now and I like diving more and more into it.

Expect some useful (I hope) developer tips, linux usefulness, shower thoughts and maybe my life insights.

P.S. I've never had a blog, so please be tolerate to newbie =)


I don't like languages with GC (though they are my main source of income).
They are felt like a car with poor engine witch cannot burn fuel efficiently. And there is a bucket connected to exhaust pipe to collect remains. Periodically the car have to stop to transfuse fuel back into gas tank.

Yep, it actually works and you can drive wherever you want, but... Maybe you'd prefer y but efficient one ;)

We need a special language for developers where most used words will be up to 3 letters long. Good Linguist's PhD thesis 😄


After another "SubscriberRestrictionInfoRestControllerTest" I thought it may be a good idea to use Simplified Chinese for variable and class names.
The above mess is just:
用户限制信息休息控制器测试
13 symbols vs 43!
(I don't know Chinese at all, there are some mistakes probably)

I'm super hyped about upcoming F(x) phone. There is not much info on official site:
readyfx.com/
But some sweet details can be found in theirs email list:
us19.campaign-archive.com/?u=a

Features:
* 5-row QWERTY slider
* 6'' display with tiny borders
* Pure android with landscape hacks OR Sailfish (that's my choice)!

If you feel like using in your project but don't like the new requirement of having it deployed next to your app — take a look at ejdb.org/

It is a tiny lib that allows you to have mongo-like db right in you RAM or hard drive. It is written in C, but you can find bindings for almost every other platform.

The last one: Shell scripts in DOCKERFILE.
If you use docker a lot than probably at least one of the following is true:
1. You have images that are based on other images (and those are based on some other)
2. There are a lot of duplication in your Dockerfiles

The advise is simple: get rid of Dockerfiles entirely =)
There is a packer.io project that gives you an ability to create images from ansible playbooks directly. You can get the advantage of ansible roles and molecule tests!

The next use case of shell scripts is to write your local utils. As I mentioned earlier, I consider POSIX shells aren't handy enough, so I use .
It has more clear syntax and some really nice features: Lists, String manipulations, Math module (you can calculate tan in shell! Yeah!), Colors, Autocomplete based on man pages and Web-UI configurator!

Take a look at my recent fish-script that adds audio tracks to video files (cause VLC can't do this automatically, WTF?):
gitlab.com/snippets/1801106

The most common use of shell scripts is automation of routine tasks. For this purpose I recommend using Ansible.
Pros:
* Declarative (forget checks like "if dir not exist -> mkdir -p")
* Reusable (you can write roles and apply them to local machine or remote ones
* Testable (with molecule.readthedocs.io)
Cons:
* YAML
* Yet another framework you have to learn
* I faced some unpredictable behavior with async tasks ~2 years ago, maybe now it fixed

Try experimenting with it! It is fun and easy =)

I promised some tips so here is the first one:

* AVOID USING SHELL SCRIPTS*

Why?
1. It is the matter of time when is will stop working. The point is that your script relies on some system state (files, programs, etc.), but it will change with an update. There is no more `ifconfig` for example.

2. The scripting language is ugly by itself. I can't remember how to write simple IF that checks command output. And error handling is a mess.

What instead? Stay tuned!

Hi!
I'm a Software Developer writing in , and mostly. I'm in love with and use it for my pet projects.

I use Linux for almost a decade now and I like diving more and more into it.

Expect some useful (I hope) developer tips, linux usefulness, shower thoughts and maybe my life insights.

P.S. I've never had a blog, so please be tolerate to newbie =)

Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!

We adhere to an adapted version of the TootCat Code of Conduct and follow the Toot Café list of blocked instances. Ash is the admin and is supported by Fuzzface and Brian! as moderators.

Hosting costs are largely covered by our generous supporters on Patreon – thanks for all the help!