Solution is based on LINK. Stuff in use: cat, tr, fold, head, /dev/urandom, echo, printf, for each and parameters testing
Thursday, June 6, 2019
Password generator with bash
Looks like the best way to handle your passwords strongly depends on which password breaking approach is the most effective at the moment, and apparently those ways are changing as quickly as technology develops. Which is why it's unlikely that there will ever be a perfect way to avoid all the risks, but we can
design an optimal one.
It occurred to me that first we need to select between two strategies: storing generated password or memorizing them with mnemonics. I don't think it would be a good idea to store memorizable data cause it's too easy to break the pattern, or to try to remember a generated one. As I already can do mnemonics, so I decided to write my own password generator (I like having my own collection of tools).
Solution is based on LINK. Stuff in use: cat, tr, fold, head, /dev/urandom, echo, printf, for each and parameters testing
Solution is based on LINK. Stuff in use: cat, tr, fold, head, /dev/urandom, echo, printf, for each and parameters testing
Wednesday, May 29, 2019
Configuration - setting up Docker for Ubuntu 19.04
A friend of mine installed fresh Ubuntu 19.04 for which there is no stable docker yet. So we had to do it a slightly more complicated way.
NOTE: this configuration does not help with running docker over VPN
NOTE: Some of the commands below may require sudo
NOTE: It is assumed that you configure docker for user without sudo, cause using it with sudo does not quite make sense
NOTE: this configuration does not help with running docker over VPN
NOTE: Some of the commands below may require sudo
NOTE: It is assumed that you configure docker for user without sudo, cause using it with sudo does not quite make sense
Self-education - Using learning matrix to plan and assess your progress
When you are learning something new and you are doing it by yourself, you may want to avoid the usual problems associated with learning, such as losing control and being unable to assess the results. I would like you to consider using learning matrix -- something I designed for myself when I need a really quick start with a new project at work.
In my experience, this approach may be useful when you cannot study full-time and have to do it alongside other activities. Or maybe you are creating a competency matrix or need an assessment tool.
The principle behind this learning matrix is simple. You list all the major areas vertically, and you put levels of qualification horizontally, and what you get is a 2D matrix that describes the area you would like to assess or master. The cells of this matrix contain criteria a learner should meet in order to be able to say, for instance, 'I have level A in functional programming' or 'I have level B in yoga'.
A word of advice. Do not try to make it too big, make sure it is feasible to learn everything you have planned. If you are not sure about some criterion, mark that criterion appropriately, to prevent it from mixing together with the clear ones. If possible, try to make your criteria SMART (simple/specific, measurable, attainable, reasonable, time-bound).
The example below is for starting with a project, but you can apply it to an academic subject or learning a skill as well. Please note that criteria add up (which means that you cannot get level B without successfully passing level A).
In my experience, this approach may be useful when you cannot study full-time and have to do it alongside other activities. Or maybe you are creating a competency matrix or need an assessment tool.
The principle behind this learning matrix is simple. You list all the major areas vertically, and you put levels of qualification horizontally, and what you get is a 2D matrix that describes the area you would like to assess or master. The cells of this matrix contain criteria a learner should meet in order to be able to say, for instance, 'I have level A in functional programming' or 'I have level B in yoga'.
A word of advice. Do not try to make it too big, make sure it is feasible to learn everything you have planned. If you are not sure about some criterion, mark that criterion appropriately, to prevent it from mixing together with the clear ones. If possible, try to make your criteria SMART (simple/specific, measurable, attainable, reasonable, time-bound).
The example below is for starting with a project, but you can apply it to an academic subject or learning a skill as well. Please note that criteria add up (which means that you cannot get level B without successfully passing level A).
Tuesday, May 28, 2019
Coding challenge - Repeated string
When I popped out for some food today it dawned on me that there are basically two type of tests. First try to find out if you're good at drilling and memorising, and second one is looking for an ability to create your own solution. Sadly enough, first type claims to the the second type, but never vice versa.
My version of code is below and original task can be found here: LINK
My version of code is below and original task can be found here: LINK
Monday, May 27, 2019
Coding challenge - Jumping on Clouds
Here is another one. Didn't use collections this time.
Original task is here: LINK
My version is below
Original task is here: LINK
My version is below
Sunday, May 26, 2019
Coding challenge - Sock Merchant
I hate test tasks so much I spend four hours out of five to think why I hate them so much. This time I came up with the following list of whys:
-- expectations are never clear and when they are clear they are clearly about knowing rules for the game, not actual solving something from the scratch, to be successful you need to be familiar with known working solutions, not work on your own;
-- ruminating about what your interviewer brain processes is very distracting, cause practice proves that they may be thinking lots of things, almost all of them not in your favor.
What would be better, array or collections? If you use array they will think you don't know collections. If you use collections they'll think you have a habit of over-complicating things. And if you use for or if they'll think you've worked with legacy for too long and sustained irreparable brain damage.
Well, anyway, original task is here, and my version of code looks like this:
-- expectations are never clear and when they are clear they are clearly about knowing rules for the game, not actual solving something from the scratch, to be successful you need to be familiar with known working solutions, not work on your own;
-- ruminating about what your interviewer brain processes is very distracting, cause practice proves that they may be thinking lots of things, almost all of them not in your favor.
What would be better, array or collections? If you use array they will think you don't know collections. If you use collections they'll think you have a habit of over-complicating things. And if you use for or if they'll think you've worked with legacy for too long and sustained irreparable brain damage.
Well, anyway, original task is here, and my version of code looks like this:
Sunday, May 19, 2019
Know your round numbers or how to get 2^X with bash
Since I haven't written anything valuable for a long time and still have no ideas how to fix it, here is an example of how bash can actually help you quickly get values of two to the power of something. So, here we go
pg@dana:~$ for i in {1..100}; do calc "2^$i" | xargs echo; done
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
<...>
1267650600228229401496703205376
Just in case you want to get to the bottom of it, this mini-script uses:
-- my favorite calc application (package name apcalc)
-- cycles (for ... ; do... ; done)
-- ranges ({1..100})
-- redirection with xargs ( | xargs echo)
Enjoy your Linux!
PS: 'Round numbers' in relation to 2^X is actually an inside joke from the times when I couldn't afford to rent my own flat and had to share
pg@dana:~$ for i in {1..100}; do calc "2^$i" | xargs echo; done
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
<...>
1267650600228229401496703205376
Just in case you want to get to the bottom of it, this mini-script uses:
-- my favorite calc application (package name apcalc)
-- cycles (for ... ; do... ; done)
-- ranges ({1..100})
-- redirection with xargs ( | xargs echo)
Enjoy your Linux!
PS: 'Round numbers' in relation to 2^X is actually an inside joke from the times when I couldn't afford to rent my own flat and had to share
Monday, November 26, 2018
Mnemonics for maven - three funny phrases to quickly remember what maven default lifecycle is
If you, like myself, often have to switch between different technical
stacks, you may know what it feels like not to be able to recall
something you put so much energy in just a little bit earlier. Time has come to do
something about it.
As you probably remember maven supports three built-in lifecycles: default, clean and site. The latter two are more or less straightforward, but default one is not so. And today, tired of putting it off, I, finally, did these phrases to memorize phases of the defautl lifecycle.
Here they are:
Very Curious: This Parrot's Voice's Indefinitely Deep
Vault Closed To Put Valuables In Dens
Vessel Carries Ten Pink Velvet Ingenious Dogs
First letter of each capitalized word should map on this: Validate > Compile > Test > Package > Verify > Install > Deploy.
Of course, you still have to remember about goals and executions, not to mention the other two lifecycles and their phases, but that's the start.
Good luck.
PS: For more information on maven please checkout these:
As you probably remember maven supports three built-in lifecycles: default, clean and site. The latter two are more or less straightforward, but default one is not so. And today, tired of putting it off, I, finally, did these phrases to memorize phases of the defautl lifecycle.
Here they are:
Very Curious: This Parrot's Voice's Indefinitely Deep
Vault Closed To Put Valuables In Dens
Vessel Carries Ten Pink Velvet Ingenious Dogs
First letter of each capitalized word should map on this: Validate > Compile > Test > Package > Verify > Install > Deploy.
Of course, you still have to remember about goals and executions, not to mention the other two lifecycles and their phases, but that's the start.
Good luck.
PS: For more information on maven please checkout these:
Monday, September 3, 2018
Build your own Goldberd machine: Selenium via SoapUI
NOTE: The code examples I refer to in this blog are no longer available, but you can still read the text
Hello, friends. Here is how you can have Selenium run from SoapUi Groovy script step. This solution was created and tested with:
Code examples can be found here. An example of a project with a Groovy script is inside the project under auxmaterials folder.
Hello, friends. Here is how you can have Selenium run from SoapUi Groovy script step. This solution was created and tested with:
- SoapUI 5.X
- Selenium 3.X
- upgrade the libs under $SOAPUI_HOME/lib (! not bin/ext)
- use a custom java library (goes under $SOAPUI_HOME/bin/ext)
Code examples can be found here. An example of a project with a Groovy script is inside the project under auxmaterials folder.
Sunday, June 17, 2018
Total automation with sellotape and glue
Luckily for all of us every profession evolves, and test automation is no exception. What I can see is test automation is now more affordable, and is done in a more professional way than before.
Same goes for approaches and tools (and for those who still trust Internet more than their own judgement, some gurus have already posted a very good knock out article leaving losers like myself with a tingling feeling of guilt for being too slow to update the blog).
But there's still another subject I would like to speak about. It concerns the approach to automation in general. Actually, it intends to slightly shift the way we understand automation and targets some of the popular stereotypes in attempt to get rid of them.
Same goes for approaches and tools (and for those who still trust Internet more than their own judgement, some gurus have already posted a very good knock out article leaving losers like myself with a tingling feeling of guilt for being too slow to update the blog).
But there's still another subject I would like to speak about. It concerns the approach to automation in general. Actually, it intends to slightly shift the way we understand automation and targets some of the popular stereotypes in attempt to get rid of them.
Subscribe to:
Posts (Atom)