Menu Categories Author

Nubis Novem

IT consulting company with real cloud experience

Category: programming

Perl: Testing with Komodo IDE

When you write a Perl application with Mojolicious framework, you put tests into the t directory. Then it is very easy to run them because Mojolicious supports tests “out of the box” with test command that should run all tests one by one:

Read more

Archive-Zip for Perl, a moody princess: limitations, shortcomings, workarounds

The Archive-Zip Perl module introduced as early as January 2001, then supported by several maintainers with regular updates. Most of the time Archive-Zip is alright, but there are limitations. 2016 is about to be over and the Archive-Zip still does not know how to handle newer “64bit” header ZIP format. Not only it cannot read them 64bit ZIPs; alas, it would not create those, also. With older “32bit” header ZIP archives compressing larger amount of data files presents a bigger challenge than it should. Yes, you might use a different compression format or technique. But what if we must stick with the good old ZIP file as our standard? Here is a recipe on how to handle that.

Read more

Lack of context type for Perl hash arrays

Just some random thoughts on a napkin. Please do not shoot the messenger, but Perl would gain a lot in readability if it had reduced even more some of its generic constructs with better use of unambiguous context. For instance, who is in favor of a separate context type for hash arrays (associative arrays usually defined as %hasharrayname), please raise your hands.

Read more

Perl: random order list howto

First Perl recipe here, to our best knowledge. The idea is very simple and obvious: using random function rand for randomly ordering values inside a sort pipeline. It could be used for any Perl lists or arrays random ordering, though we decided to sort hash array keys (as we tend to use that a lot in a form of hash array references).

Read more

Amazon AWS instance volume backup: automate rolling snapshots and purge schedule

We begin a series of posts on our first-hand experience with Amazon Web Services (AWS) hosting platform and accompanied technologies. While allegedly possessing ten times more cloud resources than the top 14 other IaaS providers taken together (according to May 2015 reports), Amazon today is that certain behemoth reigning over them all. Economics aside, what amazes us most about AWS is how tons of feature-rich offerings, abundance of documentation, and gazillions of online discussions present so little for a young pioneer that takes on her first AWS quest. That is easy with AWS to launch an instance, though most of subsequent steps require planning, in some cases profound research, or, in other words, a difficult path full of trials, tribulations, and overdrawn accounts. That pay as you go paradigm needs budgeting and verification to be efficient.

Read more

Responsive UI

Recently I spent some time on learning and practicing responsive UI design. That basically means “making web site mobile friendly”.

First I started with Twitter bootstrap. The problem with Twitter bootstrap is that it brings ~100 KB CSS file (and lots of other junk if you are not careful).
Which means that when user’s smartphone opens my Twitter-bootstrap backed web page, it needs to download extra 100 KB. Which makes page load slower. Not surprisingly, Twitter does not use their own Twitter Bootstrap CSS.

Metro UI seems like a bit better alternative (smaller CSS file size at ~10 KB). Still, it is extra file to load.

Read more

PowerShell

I have been reading on all kinds of Microsoft technologies, including PowerShell. Which is a pretty cool tool. I have tried it before and it did not work well for me then because I did not understand its purpose. It is not a normal OS shell. Instead, it is the shell for the .NET virtual machine. Exactly the thing that Java is missing, and the gap that it tries to plug with the crap like Ant and Maven, unsuccessfully. PowerShell lets you run all the .NET methods interactively from the command line, and build the pipelines of them. It has some very cool syntax that lets you automatically apply the pipeline input in the same way as the command-line input. It also has the remote execution functionality, so it serves as an analog of the rsh/ssh (more advanced in some ways, less advanced in the others) in the Microsoft ecosystem.

Read more