Showing posts with label testing. Show all posts
Showing posts with label testing. Show all posts

This Week I Learned 2018 - Week 18

Last week post or something else from the archive.

最近无意看了汤浅政明《春宵苦短,少女前进吧!》,那个诡异及天马行空的画风及离奇爱情故事,非常值得一看及收藏的动画电影。导演另一个作品,《四疊半神話大系》,也值得一提。


FORMS. Interesting concept on how to manage your week. In other words, you have a daily theme or something you're going to focus on each day. For example,
  • Monday: Finances 
  • Tuesday: Operations 
  • Wednesday: Research & Development 
  • Thursday: Marketing 
  • Friday: Sales
Interesting learning experience with Perl and Travis CI. From how-should-i-start, to why-this-is-not-working, and finally-something-is-working, Axel Beckert's guide is a definitely must read material. Furthermore, the Travis-CI testing helper for Perl modules does help a lot. However, like most Perl modules out there, documentation and maintenance is still a major issue. No worry, there is a tool to bootstrap the `.travis.yml` file, just install App::CISetup and use `setup-travis-yml.pl`.

Having fun coding and can't seem to stop. Moderation is the key here.

kwalitee. Yes, kwalitee or Test::Kwalitee.

Facepalm. Totally speechless when using Dzil and Perl::Critic. You cannot put the package name in the first line of the code otherwise Perl::Critic will complain.
use strict;
use warnings;
package Foo;
# ABSTRACT: This is a Foo.
# KEYWORDS: foo bar baz

use frobnitz;
use OtherStuff;
...

ISTQB Certification Road Map

As I was looking into Test Driven Design (TDD) and software testing, eventually you will going to encounter ISTQB (International Software Testing Qualification Board) certification. While some may argue that having certification is meaningless (I do agree, some were created just to make money), I'm more interested to find out the body of knowledge have been covered for software testing itself. This was inspired by something similar, the SWEBOK (Software Engineering Body of Knowledge).

Based on the official road map stated, there are basically three categories of certification paths of Agile, Core, and Specialist. All three paths must originates from the Foundation Level. The Core certification path, by default is the conventional path to be taken as shown below (screenshot taken from ISTQB site). To finish the whole Core path, you will need to finish 6 exams, which I think is going to take quite a well.

However, for local Malaysian who are interested in pursuing this path, the local chapter, represented by the Malaysia Software Testing Qualification Board (MSTB) only have two ISTQB Certifications which are Foundation Level and Advanced Level (Test Manager). I suspect that the local software industry does not justify for any other ISTQB certifications beside these two.



Looking into other certification path, the Specialist path is indeed interesting. I'm wondering what does a tester going to test in a gambling industry? The slot machine or the online gambling which I think related to the Web?

Stay tuned. More about ISTQB in coming weeks.

This Week I Learned - 2016 Week 49

Last week post or the whole series.

When a screenshot says a lot. The 14-plus hours uptime is something to be concerned about. Is best to be away from your machine from time to time. As you age, there is no needs to tweak your environment, just use the default settings for almost everything.


Certain unfortunate requirements led me to buy a USB-based high powered 300Mpbs Wifi adapter, TP-Link TL-WN8200ND. Unfortunately, while the driver seems to load properly, I still can't connect through Wifi in Ubuntu 16.10.

Understanding htop. Comprehensive guide to htop and its equivalent console commands. It will make you realize how much htop have aggregate and collect all the necessary information. The same author also wrote another useful guide on HTTP headers.

While we're on HTTP. Encountered this error with Nginx few weeks back where the error log shows that "upstream sent too big header while reading response header from upstream". In other words, your proxy server, Nginx does not like the data sent over from the application server (upstream). Several reasons may cause this like large cookies size, cookies with way old timestamp, or mismatch of response size and content length. Several ways to resolve this, either fix the issue at the upstream , disable proxy buffer, or increase proxy buffer sizes. Example as shown below (do not follow this values, adjust accordingly). Don't understand these settings? You can read details explanation and an excellent guide on these directives.
http {
    proxy_buffers           8 4k;
    proxy_buffer_size         8k;
    proxy_busy_buffers_size   16k;
}

On Perl. Nothing much pickup for the last two weeks, mostly just test cases and test cases. Interesting behaviour when returning value from subroutine. Being Perl, implicit is better than explicit as compare to Python. For example, there is this rule of do no return `undef`, just use the bareword `return`.
use Dumper;
sub a { return undef; }
sub b { return; }

my @aa = a();
my $a = a();

my @bb = b();
my $b = b();

Dumper(\@aa); # [undef], not false
Dumper($a); # undef, false

Dumper(\@bb); # [], false value because empty array
Dumper($b); # undef, false

How to implement Test-Driven Design (TDD) in Perl? So many good links given in those answers to the questions. Unfortunately, most of the links are quite dated and some may not be that relevant anymore. But since this is Perl, most stuff should be long standardized and stable.

This Week I Learned - 2016 Week 43

Last week post or the whole series.

This is one of those week where I become very wordy. ;-)

Previous post was too long when I realized that Blogger don't let me add more than 20 tags. That threshold should be a good indicator for me to stop jotting down the item and move to next week post. Some of these notes below are old items which I haven't have time (lack of discipline) to jot it down in a timely manner (lack of consistency). Don't sweat on this. Reflect, learn, adapt, adjust, monitor, and continue as usual. Although there are some minor hiccups, there is still like 9 weeks to go for this year.

Generating and attached iCal invite through email? It may seems simple as first, but, as usual, it may works for one email client but not for others (we haven't take into consideration of desktop, mobile, and web client). Furthermore, there is iCal and vCal, both are VCALENDAR standard where the former is succesor of the later. Digging deeper, it seems that different email client behaves differently when come to REQUEST METHOD used. The typical troubleshooting procedure is first, make sure you can attach send the iCal correctly through email properly using the email library (using MIME::Lite in my case). Next, read other people code on implementing similar solution. You can may miss out certain API calls or use the library incorrectly.

Testing in Perl. You can go through these articles for a start before you jump in to Test Drive Deveopment (TDD) best practices. Some of the issues I've encountered. First, to compare two different different ordered arrays, `cmp_bag` in Test::Deep is your friend. Second, To simulate delay, instead of using `sleep`, you can use Test::Mocktime's `set_relative_time` to do so. But off course, you will need to learn more tricks about the default standard testing module in Perl, Test::More. Writing a new Perl's module, integrate testing as early as possible

While we on testing. To benchmark the speed of your SQL query, you can disable MySQL query cache. This ensure that no caching is used which may give the wrong impression regarding the speed of the query.

While this is quite old news, two features in Perl 5.10 which I think make a lot of senses. The `defined or` is useful to check if a variable is defined or else use the default value (more examples). And the `state` for declaring a variable as static variable. Useful when you want to implement localized caching.

On Perl again. Check if a substring exists in a string without using Regex through using `index`. I wish Perl have more Object-Oriented way of doing so. Maybe Perl 6 have it?

Note to self. This is very useful. Several alternative ways to monitoring event in Javascript, useful for debugging. My favourite is using the `monitorEvents($0)` method. So simple and straightforward.


While we're on Javascript. Developing a web application with heavy AJAX usages? Well, you have to use `history.pushState` somehow. Why not just switch to Turbolinks?

Storing hierarchical data in database? Adjacent List is the most common and first to use approach when modelling hierarchical tree. However, Bill Karwin's presentation and example and follow up example convinces me of using Closure Table or Bridge Table may be the balance and right approach. This is useful when you're using database system like MySQL that does not supports hierarchical and recursive SQL queries natively.


This Week I Learned - 2016 Week 41

Last week post or the whole series.

This is probably the unexpected way or the one-liner new way to purge old Linux kernels. You will need to install byobu (text-based window manager and multiplexer) as the Bash script is part of the package. Why I need to purge the old kernels? Well, I can't upgrade to Ubuntu 16.10 because `/boot` partition don't have enough free spaces.
$ sudo apt install byobu
$ sudo purge-old-kernels

Epoch, the start of a time, is commonly used in computing as a point of reference or date arithmetic. For Unix, the epoch starts from Jan 1, 1970. And I thought that was the standard epoch time used for every Operating System. I didn't realize that for Windows as well as for other platforms, the epoch time was different and it's set to Jan 1, 1601 (represented in FILETIME structure), a few hundres years earlier than Unix epoch time. Why? 1601 is the first year of 400-years cycle of Gregorian calendar.

Conversion between two epoch system times is straight forward using the simple formulae or another approach to calculate the different between two values, which is 11644473600 seconds. (Note that Windows tick is 100-nano seconds interval, which is 10000000). If you have a Windows epoch timestamp (18-digits), use this site to convert to normal date.

Using Git in Windows? Do use the Perforce's P4Merge as git merge tool for the three-ways merging tasks. Learned this while watching how other developer works. You can pick up a lot by watching how others works. Do keep that in mind.

Almost at the end of the year, maybe this is the right time to pick up Golang? Don't like buying Go books, well, someone recommended me to pick up "The Little Go Book".

Looking for beautiful real-time log analyzer? Try GoAccess, which is depends on gwsocket, a RFC 6455 compliant web socket server.. I should install this for my homelab later.

Testing your web application locally but wants to simulate different IP addresses? Try IP Spoofing to simulate HTTP requests

Using testing in C++, use Google Test. Going to try this in coming days if I can get my C++ development environment working.

This Week I Learned - 2016 Week 01

In case you miss out, last week post.

#1 Flowgorithm: Flowchart Programming IDE. Creating application using simple flowcharts, yet another level of abstraction for coding. Screenshots, step-by-step tutorial, and file format. Similar flowchart-based programming environment tools are RAPTOR, Visual Logic, and LARP. Unfortunately Windows only (should try with Wine). Flowgorithm is written in C# and most probably can run in GNU/Linux since .NET Compiler Platform ("Roslyn"), the compiler for C# and Visual Basic has been open-sourced. If there any tools to do the reverse or something like Visualize Python which let us visualize the flow from the source code instead? Well all the mentioned tools catered for educational purpose, is there anything similar for the industry like those for Model-driven engineering?

#2 How to think visually or rather, which visualization diagram should I use? Which reminds me of another visual decision tool, the chart chooser and slide chooser by Andrew Abela and Paul Radich. I always interested with visualization tools as it's a form of storytelling with data. I've been exploring different chart tools these days to plot my daily walking steps.

#3 Dummy output sound adapter in Ubuntu? Nothing but a force restart (pulseaudio -k) of PulseAudio sound server can't solve. It has been so long since I last encountered any sound card issue in GNU/Linux. I still remember many years back I tried, for weeks, to get my sound card to workonly to realize that I picked the wrong driver for the Linux kernel. Although the is a Yamaha sound card, the driver only works with the chipset, if I remember correctly, Cirrus Logic.

#4 DNS Conformance Suite and Test Harness. Conformance or to be exact, conformance testing, "is testing to determine whether a product or system or just a medium complies with the requirements of a specification, contract or regulation". Enormous list of Request for Comments (RFC) just to make sure that the DNS implementation conformance to the standards. Standardization is always tricky where so many parties involved and each with their own agenda which sometimes, slow down the the adoption of the certain standards. Case in point, Hyper Text Markup Language (HTML).

#5 Software Testing Techniques. Class Report for 17-939A (PDF) by Annie Lu Luo. Comprehensive literature review of software testing techniques. So far, the best paper I read in 2016. How I wish all the software engineering papers were written in such way. Again, this remind me of Ke-Sen Huang's resource for computer graphic page. Unfortunately my lack of mathematics knowledge and patience prevent me from fully understand most of these papers. Nevertheless, you can appreciate the beautifully generated images of these computer graphic research papers. And off course, there is this Papers We Love, where a group of people who love to read academic computer science papers. Unfortunately, as usual, there is still MY chapter and judging by all the past meetups, its existence will not sustain for long.

#6 Books Scientists Should Read Before The Age of 20. Some books are questionable but nevertheless, a good starting list. Personally, I will like to start with George Pólya's How to Solve It: A New Aspect of Mathematical Method. If you're short of time, here is the summary of his method.

#7 100 Days of Swift. Progression notes on learning Swift programming language. Compare to other self-learner, he managed to create interesting UI related small projects just by applying a few concepts. Something that anyone should try out when picking up new programming language.

#8 Write code every day? Not necessary, as fellow redditor, EarLil advised that just "follow your rhythm and stay healthy" (make sense but which rhythm?) or you can just switch between coding and writing, "code doesn't have to be code". Github commit heatmap is a good motivator to encourage you to make an effort to write or code something, even one-liner. The question remains? How long should you allocate time in a day so that it will get you started and won't burn you out? For me, one line of record or code, or a sentence. Something so easy that you don't have any mental excuses not to do it. Getting started is always the hardest. But once you've started, everything else will fall into places. Just start!

#9 Valuing time over money is associated with greater happiness. First empirical evidence that people who value time over money are more happier. This reminds me of the personal finance book, Your Money or Your Life, where the authors asked "how much that we have trade our hourly life energy for money?". Once you realize that the actual amount of cost, time, and effort spent just to earn an hourly wage, you will have a change of opinion regarding your career and the money you earned..