Archive 2019

Everyday Blogging

Published at March 14, 2019 ·  1 min read

After 2.5 months I’m thinking about wrap up the everyday blogging activity. It was an interesting challenge. It helped me to restore a blog. But it’s really hard for me to do such things on a daily basis. I prefer quality instead of quantity. That means I need more time to write more interesting posts. I don’t know how I’ll do it in the future but I hope you’ll get more interesting posts soon....


I don't want this CI

Published at March 13, 2019 ·  1 min read

I love CI and I’m sure that it’s a required part of the software development. It helps a lot to test software to find issues as soon, as possible. CI save thousands of person-hours by automatically project testing. It works almost in the background and guides you to the next steps: go forward or step back and fix the issue. Everything is written above is valid only for good CI. It should not be too noisy....


Why GitHub's pull requests are not good for code review

Published at March 12, 2019 ·  1 min read

I hope many of you at lease once created or received pull requests in GitHub. Usually, before pull request is merged some code review process happens. Even after the last changes, code review functionality in GitHub is not really cool for day to day activities. I think it’s mostly because of pull requests are not designed for code review. It just allows you to add a few comments to the code....


The difference between frameworks and libraries

Published at March 11, 2019 ·  2 min read

NOTE: I didn’t google definition either for ‘library’ nor for ‘framework’ for years. I even didn’t read Wikipedia articles during the last 3-5 years. That means that thoughts are my own, so you could disagree with me. For me, the difference between a library and a framework is in architecture freedom. A framework provides you a skeleton for your project with some basic architecture. It would be a low-level architecture like ‘how to work with IO’ or a high-level MVC implementation....


bat: a cat clone with wings

Published at March 10, 2019 ·  1 min read

Finally switched from cat, less and vim (omg!) for reading files in a console. If you still didn’t try bat it’s the right time to try it. It’s a powerful CLI tool which works like cat+less out of the box, has syntax highlight like vim (honestly, I used vim to view file contents just because it has syntax highlight), supports themes and is configurable, so you can tune it as you want....


webpack: devserver proxy configuration

Published at March 9, 2019 ·  1 min read

Webpack’s devserver is a very helpful tool. It helps a lot by setting web server for application during development. Usually, you need to communicate with your API (backend) from the client-side via some URL. To avoid cross-site scripting and CORS configuration on your backend or web server(I hope, it’s Nginx:)), you can use a built-in proxy server in the webpack devserver. You use it you need just to update webpack config or vue....


UUIDs usage in /etc/fstab

Published at March 8, 2019 ·  1 min read

/etc/fstab is a config file to store static information about file system. It’s a native place to add disks information you would like to mount automatically on each system start. It has a pretty simple format: [device] [mountpoint] [filesystem] [options] [dump] [fscheck pass count] I used such format for the years and it worked before: /dev/sdb1 /opt/media ext4 defaults 0 0 I don’t know how many people do the same. I think this is the most used way to mount partitions during the startup....


Ansible vs Bash for Quick Automation

Published at March 7, 2019 ·  1 min read

I don’t want to argue on this topic. I really believe that it’s better to use Ansible if possible even for some ‘home’ automation. But looking on my scripts for some development automation (setup VMs, clone sources, install some software) I realized that there’s a mix of Ansible playbooks, Bash and Python scripts. It becomes to be hard for maintaining from one side, but it works as expected for me from another side....


Install Docker Using Ansible With One Command

Published at March 6, 2019 ·  1 min read

It’s boring to install Docker and Docker Compose on any host I need. Maybe Kubernetes is the right weight to di such things but Docker fits all my needs at the moment, so I use it for some development scenarios. I’ve got a simple docker_bootstrap.sh script to install Ansible if it’s not installed yet and setup Docker on the same host: #!/bin/bash pip install ansible ansible-galaxy install nickjj.docker ansible-playbook ./site.yml -t docker I use Ansible from pip because it’s not supposed to be installed on a production environment....


I still like blogs and RSS

Published at March 5, 2019 ·  1 min read

RSS is a great thing for news and blog reading. It’s good structured (not like a Facebook), contains everything needed (do you really like threads in Twitter?) and has good enough tools for offline reading during flights or a train ride (that’s why Telegram channels don’t fit my needs. RSS gives you a lot of freedom on what content do you want to receive and doesn’t force you to read it right at this moment because you won’t be able to find this later....


Internal Bash Variables

Published at March 4, 2019 ·  1 min read

I didn’t pay attention to some variables I used in bash script before. I just realized that there are a lot of variables I don’t see in the output of env or export commands. There a lot of internal bash variables you can use or change. I don’t have a lot of bash scripts in my sources. Usually, I don’t write scripts bigger than 10-20 lines. TBH, most of scripts are copy-pasted from somewhere with minor changes....


Clone Your GitHub Repos

Published at March 3, 2019 ·  1 min read

Since GitHub allows to store unlimited private repositories, I moved everything there. It’s really great to have such sources storage for free. Once I pushed everything to GitHub, I need to sync my repositories over all environments I have. I wrote a simple Python script below to clone all my GitHub repositories: My use case could not fit everyone, but you can adjust my script to cover your use cases. Everything I need is:...


Vue.js Components Registration

Published at March 2, 2019 ·  2 min read

I can’t add anything from the technical point of view to the official documentation but I would like to drop a few lines about local vs global components registration. Global registration I prefer to use it mostly for the 3rd-party libraries which are used a lot. E.g. vue-fontawesome, bootstrap-vue, etc. It’s reasonable to use global registration for own components if they are used on the most pages. Local registration I think it’s reasonable to use it as a default solution for component registration....


Dynamic method generation with default arguments

Published at March 1, 2019 ·  2 min read

NOTE: please, be sure that you really need such things in your project. It could be useful if you understand how it works. You can also spend hours or even days to understand what is going wrong if you don’t understand how method generation works in the project. NOTE: this post is based on OpenStack Horizon integration tests. We use method generation in our tests framework to generate methods like ‘go_to_some_page’....


TypeScript: forgot to compile

Published at February 28, 2019 ·  1 min read

I’m working too much time with script languages like Python, JavaScript, and even bash. I almost forgot that sometimes I need to compile my sources. A stupid mistake was made on TypeScript project I’m working on: I didn’t add a job on CI which will compile sources to JavaScript. Of course, I use npm run build build to make a production bundle. I see TypeScript compile errors in my console when I run the code....


Dependencies List for My Project

Published at February 27, 2019 ·  1 min read

Time to time you need to get all dependencies for a project you work with. It’s good if you have an up-to-date list in the requirements.txt file. In another case, you can always use pip freeze command in your virtualenv. It provides a flat list of all installed dependencies. To get the dependencies tree, it’s I use pipdeptree package. It provides a simple CLI tool to get dependencies tree with version constraints for packages where they are specified....


Cast JavaScipt object to TypeScript classes

Published at February 26, 2019 ·  2 min read

TypeScript could give you a false hope that I’ve got a strong-typed code and everything will work as expected with JavaScript. In reality, TypeScript doesn’t do anything after sources are compiled to JavaScript. It means, in runtime, you’ll face good-known JavaScript with it dynamic typing. The lack of any runtime type checking is a big minus for TypeScript. You’ll lose all your type at the same moment when browser executes code....


Keep Your Tests Clean: Refactoring

Published at February 25, 2019 ·  1 min read

Refactoring tests could be painful a lot. But it could also give you a lot of fun too. During refactoring unit tests, I’ve found a log of issues to be resolved. Also, it gives me more knowledge about how the project works. Refactoring tests could be harder than refactoring rest of code because it could affect not only tests. Since there are no tests for tests, there is only one way to understand if refactoring didn’t lead to less test coverage....


Run Django Tests in Parallel

Published at February 24, 2019 ·  2 min read

I’m wondering that in 2019 we still have a lot of tasks which are not parallelized yet. I’m pretty sure, that almost all laptops, desktops and even smartphones have more than one core on board. In the meantime, I just realized that Django runs tests using only one process/core on my desktop. I’m disappointed but I think I know why it happens. Many of us are not used to write concurrent code....


Flask Upgrades Support

Published at February 23, 2019 ·  1 min read

Upgrading flask-based project from flask v.0.12.x to 1.0.x I realized that Flask itself doesn’t ready for upgrades yet. There is no documentation about 0.x -> 1.0 upgrade at all. There is some documentation about upgrades prior 1.0 but nothing about 1.0 at all! Change log isn’t helpful a lot. It’s one more argument to use Django instead of Flask. It has great release notes with detailed backward incompatible and deprecation sections....


Text Editor or IDE?

Published at February 22, 2019 ·  3 min read

A short Friday’s holy war about IDEs, text editors and vim:). I don’t really like bikeshedding about text editors, but I was asked about my favorite one too much to not drop a note here. I spent most of the time in editors with Python code, a bit less with JavaScript/TypeScript. Of course, a lot of json and yaml, sometimes bash scripts and Ansible playbooks are opened by me too. I strongly believe that for each task there is the best tool somewhere....


Right Way to Setup Jenkins in Docker

Published at February 21, 2019 ·  1 min read

I was for this solution for months. Almost any guide I’ve found was about using an official Docker image with few plugins installed. It works pretty well if you agree with a manual initial configuration like configure admin user and password. It doesn’t work at all if you deploy Jenkins in an automated way. Here is a Dockerfile to get installed and ready to use Jenkins: FROM jenkins/jenkins:lts # https://github.com/jenkinsci/docker/blob/master/README.md # Jenkins configuration ENV JAVA_OPTS="-Djenkins....


Python Releases

Published at February 21, 2019 ·  1 min read

Since I switched to Python 3.5 as my default and I need to keep backward compatibility with Python 2.7 one year more, I don’t follow new features and releases a lot. Originally, Python 3.5 was released about 3.5 years ago. Looking throw release notes, I think I’ll switch to Python 3.6 just for the projects where I don’t need to support 2.7. There are not a lot of features in newer releases but some of them seem to be useful for me....


Embedded React App on Your Site

Published at February 19, 2019 ·  2 min read

It’s great if you’re able to start development from scratch and you can implement SPA using the latest technologies. But sometimes you can only extend existing functionality. In such a case, it makes sense to embed your React app into the existing web site. The idea is pretty simple: you need to add your react-based application to the existing page. The easiest way is to add some <div id="reactApp"></div> to your page and add the script with a production build of your react application....


Fixing tests: boring, but useful job

Published at February 18, 2019 ·  1 min read

Fighting with tests during the last two days, I would like to drop a short note of why I usually do this job. First of all, it’s a great chance to understand how the project works. Even if test coverage is not good enough, usually you can learn a lot about project architecture. The next reason is that almost every project team doesn’t have enough time to improve or extend the current tests....


Deploy Hugo Sites With Jenkins

Published at February 17, 2019 ·  2 min read

I’ll describe how I do my Hugo-based blog updates with Jenkins, but it’s pretty similar to any other static site generator. Pre-requirements Jenkins installation is out of the scope of this post. Also, you need to have installed and configured Publish Over SSH plugin. Also, I use Jenkins Job Builder (JJB) to configure Jenkins jobs from yaml file. I’ll describe my blog-jobs.yaml config for my blog below. Jenkins configuration Views If you have a lot of jobs or just want to group them by project, it makes sense to create a view:...


Click - Implement CLI Without Pain

Published at February 16, 2019 ·  1 min read

I didn’t write reviews for libraries for a while. Honestly, I don’t want to write a review for click because a reading of it will require more time than you try it. It’s an awesome library which is really easy to use. E.g.: @click.command() @click.option('--command', prompt='command name: clone or update', help='Clone or update repos') def main(command): if command == 'clone': clone() elif command == 'update': update() I didn’t find anything like this for Python....


Choosing CI server for local needs

Published at February 15, 2019 ·  2 min read

Implementing everything-as-a-code initiative, I need some CI server up and running on my desktop. I don’t want to use cron directly or implement something myself because of I don’t have enough time for it. That’s mean, I can’t use Drone, Circle CI, or Travis CI because of pricing. I tried Buildbot and GoCD and they look pretty good but not mature enough. I really like GitLab CI but it requires a lot of resources and looks like too powerful for my simple tasks....


Code Coverage and Cyclomatic Complexity

Published at February 14, 2019 ·  1 min read

Code coverage for unit tests and cyclomatic complexity could be extremely useful metrics for your code. They help you to understand if something is not tested at all by unit tests. A combination of these metrics allows you to understand how many unit tests you should implement and what is your code complexity. I’m pretty sure, that everybody agrees that more coverage and less complexity is that you should aim for....


OpenStack Cinder Performance Testing Approach Part 1 of 2

Published at February 13, 2019 ·  8 min read

NOTE: This post was initially written a few years ago, so something could be outdated. What is Cinder High-level Cinder Architecture Cinder contains 3 main components: Cinder API (c-api), Cinder Scheduler (c-sched) and Cinder Volume (c-vol). Cinder Backup is a bit different and will be described later. All Cinder components communicate between each other using RPC protocol. In our case, it’s an AMPQ protocol with RabbitMQ backend. All data is stored in the database (MySQL DB)....


TypeScript vs JavaScript

Published at February 12, 2019 ·  1 min read

TypeScript is a typed superset of JavaScript. I like this language for it type system over “standard” JavaScript. Since it’s just a extension to JavaScript it’s easy to start it. Other type checkers like Flow look less native for me. I prefer to use TypeScript instead of JavaScript because it’s simple to use and doesn’t require a lot of knowledge from the beginning. From the other side, I like JavaScript because it’s a dynamic typed language with allows you to do everything you need....


Some usefeul JavaScript articles (if you didn't use Javascript suring the last 5 years)

Published at February 11, 2019 ·  1 min read

If you like me didn’t write any lines of code in JavaScript during the last 5 years, you will be surprised how it changed. I won’t re-write all existing blog posts and manuals because of two reasons: I’m too lazy for these things and I’m not feeling that I can do it better. I’ll leave the references for two topics I’ve found useful for me: variables declarations and modules. I like MDN, so I’ll use it for references....


Object-oriented Design

Published at February 10, 2019 ·  1 min read

It’s mostly a reminder to myself that it’s a time to read this book again. I the past, when I used C# instead of Python in my daily job, I read a lot of books about object-oriented programming and design, patterns and software architecture. C# like a Java is object-oriented programming language. It means you have to create objects for everything. It seems very heavyweight, so I switched to Python....


I don't believe performance tests results

Published at February 9, 2019 ·  2 min read

Performance testing is one of the most complex and hard types of testing. It’s really hard to make fair tests which fit everyone. There are a lot of things which can impact the measurement result. That’s why I don’t believe any particular test result which I found on the Internet. If you are a software or hardware vendor, it’s a big temptation to test only your strengths. Even if you want to get fair results, you can miss something during the testing or don’t have enough results to see a performance impact....


Why I don't like React

Published at February 8, 2019 ·  2 min read

I wanted to name this post as ‘pros and cons of React’, but I didn’t find good benefits that would push me to use this library. One thing I like that it tries to promote reactive programming, but it does it not really good, IMO. I like Rxjs and I really think that there are a lot of great things which could be borrowed from Rxjs to React to make it more functional....


How to Get Hardware Info in MacOS From CLI

Published at February 7, 2019 ·  1 min read

I know that most MacOS users use GUI instead of CLI but sometimes it’s faster to use CLI. A also prefer command line when I need to copy results: it’s easier to copy text rather than do snapshots even with hotkeys and send it. There are two tools I use to get hardware info: system_profiler and sysctl. I do not like to copy the documentation, so I just drop a few most interesting for me commands:...


Build VM for Devstack

Published at February 6, 2019 ·  2 min read

I posted already about diskimage-builder and Docker integration. This is a follow-up post about it and Everything-as-a-code approach. Since it takes more time than expected (honestly, I didn’t to any estimations but it seems that it could be done faster), I’ll post you some tips I use for my development environment automation even if it’s not a production-ready solution, but it already could be used if somebody needs it. Almost any work with upstream OpenStack starts with VM setup with Devstack and required configuration....


Boring and Routine Tasks

Published at February 5, 2019 ·  1 min read

Nobody likes boring and routine tasks at all. It’s a good idea to do something interesting and challenging each day. I’m sure that you can find such a task on any kind of job you have. You just need to find 5-10 minutes for it and you’ll find something interesting to do. I failed today. Only boring ad routine tasks during the day. I’ll do my best to fix this tomorrow and post something interesting for you....


OpenStack Horizon: integration tests for plugins (part 2, CI)

Published at February 4, 2019 ·  2 min read

It’s a small addition to my previous post. I don’t like to edit my previous posts. The only exception is when I have to fix some typos, spelling error, links, etc. During the previous post, I described how to implement integration tests for the Horizon plugins, but I didn’t have enough time to implement and verify CI for it. It’s time to fix this. We’ve got really awesome CI in the OpenStack....


Using JSX outside React application

Published at February 3, 2019 ·  1 min read

I’m not a fan of the React at all. I prefer to use VueJS wherever it’s possible. But React is really one of the most popular JavaScript libraries now. There are a lot of people who use it and like it. One of the most important parts of React is JSX - “a syntax extension to JavaScript. It is similar to a template language, but it has full power of JavaScript”....


Dependencies management: versioning

Published at February 2, 2019 ·  2 min read

It’s a really complicated topic. Almost everyone has own opinion on it. I’ll try to describe you several patterns with pros and cons for each. It doesn’t matter if it’s a python dependency in requirements.txt or a javascript one in package-lock.json file. What could go wrong? First of all, there are several approaches how dependency could be described: Case 1: without version It’s a great approach for development on early stages....


OpenStack Horizon: integration tests for plugins

Published at February 1, 2019 ·  3 min read

Ideally, I need to push this post into the Horizon documentation, but I would like to publish it here as HOTO for me before everything will be approved and I move this into the official documentation. About one week ago we, finally, included integration tests job to our gates in non-voting mode. A big thanks to everyone who helped to get this done. We’ve got about 80 integrations tests in the horizon repository....


One Month of Blogging

Published at January 31, 2019 ·  1 min read

It was some kind on New Year challenge for me to write a post every day. Something went good, something not but I feel pretty good on this initiative and want to continue. It’s really hard to post something every day. I started to post some notes that don’t feet into Twitter’s limit. There are a lot of drafts in progress so I’ll try post more technical things next month....


Config Inheritance

Published at January 30, 2019 ·  2 min read

Continuing the topic from the previos post about project configuration, I would like to metion one more important thing. It’s a config inheritance or config overriding. I don’t want to argue if my approach is good or not. I just like it and I try to follow it wherever it’s possible. I will write about possible configuration location in the order where the next level will override the previous one:...


The Price of Open Source Software

Published at January 29, 2019 ·  1 min read

Open source software is not free. Sometimes it’s not cheap at all. It even could be more expensive than some proprietary software with any high price. I like Open Source. I use it. I contribute to some open source project even on my personal time. But you must know, that price for the open source software could be very high. You always need to think about how many time do you spend during troubleshooting/deploying/fixing or improving some open source software....


Default Config Options

Published at January 28, 2019 ·  2 min read

Once your project becomes a bit bigger than ‘Hello, World’, you need to add an ability to configure it. It could be config in the code like in Django or Flask, pass environment variables, CLI arguments or a special config file located somewhere in the filesystem. At this point, everyone should ask themselves this question: What should I consider as a default option? Should it be production-like or developers friendly options?...


Code review: why do we need it?

Published at January 27, 2019 ·  1 min read

I don’t want to argue about necessary of code review now. It’s to each team to specify rules on how to do it. I just want to share with you my opinion why do we need it on each project. First of all, it’s about code knowledge sharing. It’s a great chance to share knowledge about the project with a team. More code reviews you do - more knowledge about the project you’ve got....


Work with Gerrit: git review-update

Published at January 26, 2019 ·  1 min read

If you work with Gerrit you use its CLI tool git review. Working with OpenStack, I use it a lot every day. I need to update the last patch and send it to the Gerrit very often. That’s why I created one line script to execute git commit -a --amend && git review command. I put it into the /usr/local/bin/git-review-update file with a following content: #!/bin/sh git commit -a --amend && git review Now, I can use git review-update command to update the last patch and send it to Gerrit....


Code Search for Your Repos

Published at January 25, 2019 ·  1 min read

Once you have more than one repository with sources you starting to search across all of them. You can use IDE and/or your favorite text editor to search across an open project. Usually, I use ‘grep’ to search in my ‘~/src’ directory. It works pretty well when you have a few repos. But once you’ve got tens of them, it’s it’s time to find something convenient than ‘grep’. This way is good only if you prefer GUI rather than CLI....


I need more (fake) disks

Published at January 24, 2019 ·  1 min read

Sometime I need some additional disks or volume groups to do some testing. E.g. it’s widely used for OpenStack Cinder testing with LVM driver. Usually, I don’t have additional disks to work with:(. That’s why I use loopback devices instead. It’s an easy to configure solution. Of course, it works a but slower than on a real hardware but it’s absolutely acceptable for many scenarios. I’ll show you an example based on Devstack solution....


Benefits of the Automation

Published at January 23, 2019 ·  1 min read

Nobody will argue that Automation is great. I hope it’s obvious for everybody. Even simple automation which saves you a few minutes every day helps a lot to not do some boring routing things. Since I created some simple scripts to publish new blog posts, create containers or virtual machines for required environments, it saves me a lot of time to do something interesting or read about new technologies which I can or even cannot bring to my current projects....


Flask WEB_ROOT Support

Published at January 22, 2019 ·  1 min read

Impressed by OpenStack Horizon WEBROOT config option I decided to add the same for my Flask-based project. TBH, I was sure that it’s an option from Django. It works great and it’s extremely useful. From the Horizon’s documentation: WEBROOT - Specifies the location where the access to the dashboard is configured in the web server. For example, if you’re accessing the Dashboard via https:///dashboard, you would set thisto "/dashboard/". It’s not needed by everybody, but sometimes it’s good to have something like it....


KISS Principle in a Practice

Published at January 21, 2019 ·  1 min read

I hope everybody is familiar with [“Keep It Simple, Stupid” (KISS) principle] (https://en.wikipedia.org/wiki/KISS_principle). If not, it’s a good time to read about it. It a software engineering, it means that you need to keep your software as simple as possible. Your software architecture should do things that are required at this moment. Please, do not do premature optimization just because you think it’s a good idea. You don’t need tons of patterns implemented and dozens of layers in your software on early stages....


Personal Tests Anti Rating

Published at January 20, 2019 ·  1 min read

Here is my personal test anti-rating. If I see something from this list, for me it means that the testing process on this project is not ideal. 5. You can’t run tests on your development environment It depends on a project ad kind of tests, but you should be able to run unit tests at least on your development environment. Otherwise, you’ll waste your time and CI resources waiting for tests results...


Docker Image Collection

Published at January 19, 2019 ·  1 min read

NOTE: There is a new format for my posts. Something like really short reviews. I call it ‘notes’. I’ll publish such posts time to time to share something great with you and to not lost links to them. Somebody likes everything in Docker/container principle, somebody doesn’t. I like this idea more and more each day. I even think that I started looking into the containers too late. Nevertheless, I move a lot of services to Docker just because it’s easier than having 10-15-20+ repos in my apt....


Not a DNS Server for Libvirt

Published at January 18, 2019 ·  2 min read

Sometimes I’m too lazy to repeat the same task so I do some automation to make my life easier. Unfortunately, I don’t have enough time to do it well each time. That’s why I prefer ‘good enough’ way. I implement something good enough for me and refactor it once I have time. I use virtual machines on my desktop a lot. Usually, I have several of them up and running. I don’t like to remember an IP address for each of them, that’s why I prefer to use hostnames....


Diskimage-builder in Docker

Published at January 17, 2019 ·  1 min read

diskimage-builder is a tool for automatically building customized operating-system images for use in clouds and other environments. Unfortunately, I can’t do everything in Docker so I have to use VMs a lot. diskimage-builder helps me a lot to build basic VM images with pre-installed packages, my SSH key, etc. Since I try to have my development environment as clean, as possible I do not install additional packages on my desktop. Any Python package I install in the virtualenv....


Everything as a Code

Published at January 16, 2019 ·  2 min read

Infrastructure as a code… I hear about it during at least last 5-7 years. There are a lot of activities in each company (I hope) to introduce configuration management like Ansible, Puppet, Chef, etc to achieve Continuous Integration and Continuous Deployment(Delivery) aka CI/CD. I saw a lot of successful implementations for CI/CD for small and mid-size projects. It’s harder to introduce full automation on big projects but it’s absolutely doable....


Vue.js, global variables and TypeScript

Published at January 15, 2019 ·  2 min read

It’s pretty easy to pass some environment variable to Vue.js application using webpack.DefinePlugin. You just need to have something like a sample below in your webpack.config.js: var webpack = require('webpack') module.exports = { // ... plugins: [ // ... new webpack.DefinePlugin({ 'BUILD': JSON.stringify(0.0.1') }) ] } It’s a common way to pass some environment variable into your JavaScript application. Technically, webpack.DefinePlugin injects a global variable into your JavaScript application. You may need it for some feature flags or some global configuration....


Front End Development Is Too Complicated

Published at January 14, 2019 ·  2 min read

It becomes more and more complicated. Single Page Applications (SPA) are a great thing. I’m pretty sure that all users like it. I don’t know if many developers like it or not. Personally, I think that its development is too complicated. Maybe it’s not so complicated as I think if you are Front-end Engineer or even full-stack JavaScript Developer. But it becomes extremely hard if you need to integrate your SPA with Python-based API with is working behind Nginx in Docker or Kubernetes....


Easy SVG image manipulations

Published at January 13, 2019 ·  1 min read

If you decided to use SVG images as icons in your UI it becomes extremely important to have these images with different colors. E.g. you need resource status icons for ‘available’ and ‘not available’ states. You can use the same SVG for both of these states but fill it with red or green color depending on the state. It’s one of the possible use cases which could be covered by svg-transform-loader library....


Software Development Is Like a Puzzle

Published at January 12, 2019 ·  1 min read

Software development often looks like a puzzle assembling. You need to fit a few pieces together to make something working. It’s OK when you need to create something fast. Like a new web site on an existing engine with several new features. There are a lot of libraries, frameworks, engines almost for any case. I’m happy that I still can create something new. Something I can’t google about. Something nobody asked and answered on StackOverflow....


Some Useful Git Commands

Published at January 11, 2019 ·  2 min read

Since I started blogging in English, I think I can translate some useful posts even they were written a few years ago. It’s a translation of the same post in Russian I’m tired to blog the same so I created this blog post to have everything in one place. Set username/email for git: $ git config --global user.email "e0ne@e0ne.info" $ git config --global user.name "e0ne" You can omit to set it global and it will be set only for the current repository....


Some Useful Docker Commands

Published at January 10, 2019 ·  2 min read

Five years ago I wrote the post Git: some useful commands (in Russian). Probably, it’s a good idea to translate it into English too but it’s a different story. I used that post as a handbook for some git commands which I had to use really rare. Now I would like to create a similar list for Docker. Some of these commands you can easily find in the manual and help but if you’re such lazy as me, you would like to get such list noted somewhere....


I'm too lazy to not use Bootstrap

Published at January 9, 2019 ·  2 min read

I never liked hit with CSS. I hate to deal with HTML make up a lot. I prefer to work with JavaScript and omit styles if possible. Maybe it’s only because I’m not an expert in this area. That’s why I use Bootstrap framework where it’s possible. It allows everybody to create pretty good UI’s for web application with minimal knowledge of styles and CSS. In a real word, I don’t even want to use Bootstrap directly in web applications based on modern libraries and frameworks like React and Vue....


Vue.js + Python API + Docker in Development Environment

Published at January 8, 2019 ·  3 min read

NOTE: All things described in this post could be not 100% correct. I just described my development environment for a simple project with JavaScript fronted and Python backend. Everything located in the same repository to make example less complicated but it also could work well for small projects and/or when backend and frontend are implemented by the same team. Any contributions are welcome! Intro It’s a story about how I tried to create a simple development environment for web project with Python-based backend and frontend written on Vue....


Minimal OpenStack Cinder setup

Published at January 7, 2019 ·  2 min read

During OpenStack Cinder development you may want to have some minimal working configuration to run the only Cinder on your environment. If you don’t need to test full volume attach flow with Nova, you may need to run only Cinder(cinder-api, cinder-scheduler, and cinder-volume, even cinder-backup is optional), RabbitMQ, and MySQL. Usually, for Cinder development, I don’t need full OpenStack up and running on my virtual machine. I just need to have only Cinder itself and such required things like database and message queue....


Blog Re-launch

Published at January 6, 2019 ·  1 min read

After more or less technical blog I’m ready to say it’s successfully re-launched. I hope, it’ll be interesting to read. I’m going to blog about the following topics this year: Python OpenStack Linux JavaScript (Vue.js and React.js) etc. I’ll try to publish new posts regularly and make them interesting to read. Enjoy the reading!...


Click and Double Click in JavaScript

Published at January 5, 2019 ·  1 min read

Spent a few hours on a simple task: create different handlers for ‘click’ and ‘double click’ events on the same element, onclick handler should not be executed if a double click event is raised. I hope, there is a better solution but I didn’t find it. I leave it here in case if somebody helps me with it: <html> <body> <a href="#" id="clickMe">Click Me</a> <script type="text/javascript"> /* click or double click */ var timeout = null; let link = document....


Learned About Pystone

Published at January 4, 2019 ·  1 min read

pystone is a simple Python benchmark which is included in a standard library. As any other benchmark you need to be careful with its' results. It was interestings how fast are my environments. All tests were done using python3 -m test.pystone command. Intel Core i5 4590 @ 3.30GHz: Pystone(1.2) time for 50000 passes = 0.19486 This machine benchmarks at 256594 pystones/second * Intel Core i7 2600 @ 3....


The Easiest Way to Parse Xml in Python

Published at January 3, 2019 ·  1 min read

I would like to add this as a note here. I really hope that we will not use XML anymore in the nearest future but in case if somebody needs it, you have to use untangle. untangle is awesome pure python library to parse XML withoud pain. You just need to try if if XML still exists in your world....


Pros and Cons of Vue.js

Published at January 2, 2019 ·  3 min read

Since I started to learn Vue.js a few months ago, I realized that it has some benefits I like and some things which I really hate. I’m not an expert in this framework, but I would like to share my thoughts about it. Pros: Simplicity It is really easy to integrate it into your existing web application by just adding one more ~20KB-size JavaScript library. It allows you to start using it with an old or legacy web site like you did with jQuery in the past!...


New Engine

Published at January 1, 2019 ·  1 min read

Actually, it was done some time ago but I think it’s time to make it more official. This blog was finally migrated from outdated blogengine.net to new Hugo. There is still a log of work in progress: restore images, fix theme, RSS and re-enable comments. I hope, it’ll help me to create more awesome posts this year. All sources are available now at GitHub:: https://github.com/e0ne/blog.e0ne.info https://github.com/e0ne/e0ne-hugo ...


Tags

.net .net-framework .net-framework-3.5 agile ajax ajax-control-toolkit ampq ansible apache asp.net asp.net-mvc automation axum babel bash benchmark blog blog-engine bootstrap buildout c# cache centos chrome ci cinder ckan cli cloud code-review codeplex community config debugger deface dependencies development-environment devices devstack devtime disks django dlr dns docker dockerimage dos easy_install elmah encoding environment-variables error event events everything-as-a-code exception exceptions fabrik firefox flask foreach forms fstab gae gcc gerrit git github go google google-app-engine grep hack hacked hardware headless horizon hound html hugo iaas ienumerable iis internet iptables iron-python ironic iscsi java-script javascript jenkins jquery js jsx k8s kharkivpy kiss kombu kubernetes kvm kyiv lettuce libvirt linux lio loci logging loopback losetup lvm mac-os macos mercurial microsoft microsoft-sync-framework mobile mono ms-office msbuild networking news nginx npm npx offtopic oop open-source open-xml opensource openstack openvswitch os packages paraller-development patterns-practices performance php pika pip plugins pnp podcast popup postgresql profiler project protocols proxy pycamp pycharm pycon pykyiv pylint pypi python python-3 qcow quantum qumy rabbitmq rar react reactjs refactoring rfc rhel search-engine security selenium server shell silverlight socket software-engineering source-control sourcegear-vault sources sql sql-server sql-server-express sqlalchemy ssh static-site sublimetext svg tests tgt tipfy todo tornado typescript uapycon ui uneta unit-tests upgrades usability vim virtualenv visual-studio vitrage vm vue.js vuejs web-development web-server web-service web_root webpack webroot windows windows-live word-press x32 x64 xcode xml xss xvfb интернет-магазин книги

Recent posts

Go 1.18: new features

Всё будет Kubernetes

2022 Relaunch

Everyday Blogging

I don't want this CI


Archives

2022 (3)
2019 (73)
2018 (2)
2017 (3)
2016 (2)
2015 (3)
2014 (5)
2013 (17)
2012 (22)
2011 (36)
2010 (25)
2009 (35)
2008 (32)
2007 (2)