5 online tools for random data

If you are a software developer or someone who is testing a system that will be deployed, you will often enter plenty of data in user entry fields, such as the name of a person, date of birth, telephone number, etc. We call these dummy data. If you need to input only one or two times, you will often allow your brain to take shortcuts, using names like John Doe, Jane Doe, Tom, Dick and Harry. You resort to phone numbers like 9123456780 or a date of birth like 1-1-1980. However, what happens when you need to enter more than 5 records. That’s when your brain starts ‘thinking’. You will take the effort of coining names or numbers and make sure that you aren’t repeating them across records.

Frankly, I don’t recommend wasting precious brain cells on thinking up unique names, phone numbers or birthdays. Coining values for mundane fields should best be left to automation and your brain should be preserved to do what you do best. Product design, software development and quality assurance.

Today, I present to you my 5 favourite online tools for generating random data for filling in mundane input fields. Some of them generate data that as random as nature itself and hence things feel real. Continue reading “5 online tools for random data”

Design patterns: Builder pattern

What is the difference between purchasing and assembling DIY IKEA furniture vis-a-vis hiring a carpenter to build your furniture for you? In the second case, you are using the builder pattern. Continue reading “Design patterns: Builder pattern”

Design patterns: State pattern

You probably know that a pressure cooker cannot be opened when it is very hot with plenty of steam built up inside. If you yank at the weight, it will protest with a loud hiss. But there are no problems opening the same cooker either before cooking or after it has completely cooled down. How can the same apparatus behave differently under different conditions for the same procedure: opening the lid? Software engineers will say that the cooker is using the state design pattern. Continue reading “Design patterns: State pattern”

Design patterns: Null object

After treating Adil, his doctor prescribes medicines in a complicated dosage. There are two medicinal tablets, one green and one red. The green medicine is to be taken 3 times in the coming week: Monday, Thursday and Saturday and the red one, 4 times: Monday, Wednesday, Friday and Sunday.

As Adil leaves, the doctor hands him two strips of medicine: 7 green tablets and 7 red ones. Adil is confused. He asks, “7 each? But doesn’t it call for 3 of these and 4 of those with a schedule?”. To which, the doctor replies. “How can I be sure that you won’t forget the complicated schedule? That’s why I have given you 7. Have one of each every day.” Adil is aghast. “But… isn’t that over-dosage?” “No, it’s not. 4 of the green tablets are simply mint candies. 3 of the red ones are strawberry candies. Inside the strips, the real tablets are interspersed with identical looking candies as per your dosage schedule. You don’t have to worry. Just habitually have one tablet of each colour every day. Start from the top of each strip.”

Brilliant! The doctor took a complex decision-making process away from Adil and just let him build a simple habit: one green tablet and one red tablet every day. The real tablets will fight against the illness that Adil approached the doctor with. The candies are there to simply … do nothing! In design pattern parlance, the doctor just used the Null Object pattern. Continue reading “Design patterns: Null object”