Back in 1989, when I got my first PC, an 8086, I became obsessed with fractals and more specifically, the famous Mandelbrot set, along with 3D simulated mountainous range. At the time, I was programming using an OOP version of Borland Turbo Pascal and I created multiple DOS applications to generate, visualize, and marvel at those mathematic constructs. I had to take photos of my screen since my dot-matrix printer was not up to the task. When I took the computer science exam as part of the tests to enter the School of Geology, I brought with me pictures and programs on 3″1/2 floppy disks and it helped me get a good grade.
My favorite mathematician, Benoît Mandelbrot died at age 85. He was quite an inspiration and part of the reason why I am doing what I am doing today. In the video below, Professor Mandelbrot, discuss some of his work.
If you have not reviewed lately how modern CPUs operate and how they differs from CPUs that you grew up with, you may want to watch this video. It is quite long but certainly instructive.
You will learn about what impacts performance today and how Donald Knuth was right all along. :-)
“We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil” — Donald Knuth
Posted by David | Posted in Programming | Posted on 01-12-2009
0
I don’t know about you, but I feel that Perl is a great scripting language. I have used it quite a bit in the past and it always helped me accomplish what I wanted to accomplish. I must also admit that Python now has my favor and one of the reason is the simpler syntax and object manipulation.
To illustrate my point regarding Perl syntax idiosyncrasies, here is an article describing some “secret” Perl operators that I have never heard of before:
The Spaceship Operator
The Eskimo Greeting Operator
The Goatse Operator
The Turtle Operator
The Inchworm Operator
The Inchworm-On-A-Stick Operator
The Spacestation Operator
The Venus Operator
Have you used those operators? What is your favorite scripting language? Leave a note in the comments.
Posted by David | Posted in Programming | Posted on 27-11-2009
0
Tonight, I found a programming puzzle while reading the blog “It’s common sense, stupid“. I solved the puzzle, but I don’t know what to do next. Do you know what I am supposed to do once the puzzle is solved?
The solution to the puzzle is the following C# program. The puzzle is a simple cryptogram where the jey is ‘unittest’.
using System;
namespace arg
{
class args
{
static string arg = "GNSX WMKY BABW PIESL AAMB THPIJVUFM";
static string argz = "u" + "nittest";
static void Main(params string[] args)
{
if (args.Length == 0) Main(arg, argz);
else
{
if (args[0] == "") return;
if (args[1] == "") args[1] = argz;
var argu = args[0][0];
var argg = 65;
int argp = argu - argg;
int argss = args[1][0] - 97;
if (Char.IsLetter(argu)) argp = (argp - argss + 26) % 26;
Console.Write((char)(argp + argg));
Main(args[0].Substring(1),args[1].Substring(1));
}
}
}
}
When you run this program with no arguments, you get the following string: “MAKE SURE THIS WORKS WITH LOWERCASE”. Ironically, the program does not process strings contains lowercase.
I used cryptanalysis and a bit of python script to solve the puzzle. This was entertaining.