Visual sorting algorithms

Written on 19 November 2013, 11:31am

Tagged with: ,

The guys behind AlgoRythmics found a brilliant way of showing how the sorting algorithms work: they used popular Romanian and Hungarian dance!
Have a look below how the bubble sort was done:

For more dancing watch their YouTube page: they also ‘implemented’ quick sort, insert sort, merge sort and shell sort. You can also play with their sorting tools on their website until you are sure you understood how these sorting algorithms work.
PS – hear and see also the sound of 15 sorting algorithms
(more…)

DNS and authoritative answers

Written on 13 November 2013, 05:37pm

Tagged with: , , ,

A simple trick about nslookup that I learned while reading the Smashing Magazine’s free preview of their Book #4

To start, the full syntax of nslookup is:
nslookup [-option] [hostname] [server]

When you run nslookup [hostname], it’s your local DNS server that answers the query. This answer is non-authoritative.
With an additional step, you can get the local name servers of the hostname: nslookup -type=ns [hostname]
Using one of these local DNS servers, you can query again: nslookup [hostname] [local_name_server]. This answer is authoritative.


$ nslookup www.smashingmagazine.com
Server: 194.168.4.100
Address: 194.168.4.100#53
Non-authoritative answer:
Name: www.smashingmagazine.com
Address: 80.72.139.101

$ nslookup -type=ns www.smashingmagazine.com
Server: 194.168.4.100
Address: 194.168.4.100#53
Authoritative answers can be found from:
smashingmagazine.com
origin = a.regfish-ns.net
mail addr = postmaster.regfish.com...

$ nslookup www.smashingmagazine.com a.regfish-ns.net
Server: a.regfish-ns.net
Address: 79.140.49.11#53
Name: www.smashingmagazine.com
Address: 80.72.139.101

To clean the DNS cache, use ipconfig /flushdns.

Paul Tero – How To Fix The Web: Obscure Back-End Techniques And Terminal Secrets
From the same author – Introduction to DNS: Explaining The Dreaded DNS Delay
smashing-book-4-cover

Update 12/feb/2017:

Use cases and requirements

Written on 7 November 2013, 11:38am

Tagged with: , ,

Functional vs non-functional requirements

Functional: describes the behavior of the system, its functionality; what the system should do
Non-functional: describes the performance characteristics of the system; how the system should be

Functional: the system must present the user an interface with the number of records in the db.
Non functional: the number of records must update in real-time.

Functional: the system must send an email when a new order is placed.
Non-functional: the emails should be sent with a latency of no greater than 10 minutes from such an activity.

Use cases

Use cases represent a practice for capturing functional requirements.

Use cases > scenarios:

A use case defines a goal-oriented set of interactions between external actors and the system under consideration.
A scenario is an instance of a use case, and represents a single path through the use case.
Use cases capture who (actor) does what (interaction) with the system, for what purpose (goal), without dealing with system internals.
http://www.bredemeyer.com/pdf_files/functreq.pdf

Scenarios > use cases:

A scenario is a sequence of steps describing an interaction between a user and a system.
A use case is a set of scenarios tied together by a common user goal.
Martin Fowler – UML distilled

In order to engage all the stakeholders, the use cases should be:
– written in an easy to understand language
– kept short (1-2 pages max)
– have a narrative language (user stories)
– have a clear structure (Title, Goal, Actors, Assumptions, Steps, Variations, Non-functional requirements, Issues)

Galtur