ramesh was here

pallikara's programming + politics + philosophy potpourri

Wednesday, May 24, 2006

 

Fuelless Flight - Gravity Powered Flight

FUEL-LESS FLIGHT; GRAVITY POWERED FLIGHT:

The idea that an airplane can fly endlessly carrying heavy loads of passengers and cargo without burning any fuel, can stop and hover in place weightless at any time, and can takeoff and land vertically is a radical departure from accepted thought concerning aviation. This new reality that is made possible by the invention of Robert Hunt's astounding new hybrid aircraft is Hunt Aviation’s vision of the future of aviation. Our aircraft is a rigid glider made of lightweight composite materials. The new hybrid “gravity-powered aircraft” is formed by merging the capabilities of the following devices into a single new aircraft apparatus:
(1) an aircraft capable of aerostatic (lighter-than-air) lift to gain altitude; and,
(2) a glider aircraft capable of aerodynamic lift, having a high glide ratio to accomplish long range gliding; and,
(3) an innovative new extremely low drag vertical axis wind turbine that is capable of harnessing the force of the wind to generate power as the aircraft glides upward via positive buoyancy and glides downward via gravity acceleration.
 

The attraction of computing by magnets

New Scientist Tech - Premium- The attraction of computing by magnets - Technology:

AS THE transistors etched into computer chips approach their limits of miniaturisation over the coming years, they could be replaced by devices that use magnetism instead of electricity to store and manipulate digital data.

Magnetic storage devices known as magnetic random access memory (MRAM) already exist. But now Alexandra Imre and colleagues in the nanoengineering department at the University of Notre Dame in Indiana have shown that magnets around 0.1 micrometres across can be arranged to produce the basic building blocks of a processor chip.

Tuesday, May 23, 2006

 

Gargansportation

Wired 8.08: Gargansportation:

Small is beautiful in high tech, but progress isn't always measured by shrinkage alone. While we eagerly await the Library-of-Congress-in-a-Timex, an equal but opposite macromovement is afoot in the load-hauling industry. It's not just blimps, but trucks, ships, and planes, too. The gigantic results are borne of an ambitious philosophy that might almost seem passé these days: Bigger is better.

'There's definitely a market for larger and larger machines,' says Kenneth Boyer, an economics professor at Michigan State University and the author of Principles of Transportation Economics. 'The bigger the vehicle, the cheaper each unit of cargo is to move.' And the 'cargo' can be anything from coal to sunburned vacationers.

Although creating XXXL conveyances requires advanced construction techniques, the real challenge is in the design: This new wave of giant contraptions rumbling to life must still function within the confines of the existing infrastructure. It's not always just a matter of scaling up.
 

The Virtual Flat Screen

New Scientist Tech - Breaking News - Invention: The McDownload:

Video projectors are designed to work by illuminating flat screens or walls, but home and office walls seldom have large, flat areas free. A new system claims to solve the problem by projecting distortion-free images onto areas including corners, ceilings, doors and other irregularities.

Irregularities mean that parts of the screen area are at different angles to the projector, distorting the image. But the University of North Carolina, funded by the Defence Advanced Research Projects Agency (DARPA), has found a solution using a projector that buries a geometric pattern in the projected picture - criss-cross lines, for example.

The embedded pattern can be created by making small changes to only one colour, so it is recognisable to the camera but largely invisible to the human eye.

Any shape distortion of the pattern is detected by a camera built into the projector. Software in the projector then pre-distorts the picture until the on-screen pattern is restored to its regular geometry.

A one-off set-up procedure takes around 15 seconds. The settings can then be fine-tuned on the fly, for instance to compensate for distortion caused when a lecturer stands in front of the screen.

The DARPA system can also be used in reverse, for flight simulation training and games. If the original material has been formatted for display on a conical screen that matches the shape of an aircraft cockpit, for example, the projector distorts the conical image so that it looks OK when beamed onto a flat screen.
 

Stickybot - wall climbing robot

New Scientist Tech - Technology - Gecko-like robot scampers up the wall:

Geckos can climb up walls and across ceilings thanks to the millions of tiny hairs, or setae, on the surface of their feet. Each of these hairs is attracted to the wall by an intermolecular force called the van der Waals force, and this allows the gecko's feet to adhere.

Stickybot, developed by Mark Cutkosky and his team at Stanford University in California, has feet with synthetic setae made of an elastomer. These tiny polymer pads ensure a large area of contact between the feet and the wall, maximising the van der Waals stickiness.

The Pentagon is interested in developing gecko-inspired climbing gloves and shoes. Cutkosky says a Stickybot-type robot would also make an adept planetary rover or rescue bot.
 

Octarm - Robotic Tentacles

New Scientist Tech - Breaking News - Robotic tentacles get to grips with tricky objects:

Robotic "tentacles" that can grasp and grapple with a wide variety of objects have been developed by US researchers.

Most robots rely on mechanical gripping jaws that have difficulty grabbing large or irregularly shaped objects. Replacing these with tentacle-like manipulators could make robots more nimble and flexible, say the scientists.

The tentacle-like manipulators, known as "Octarms", resemble an octopus's limb or an elephant's trunk. They were developed through a project called OCTOR (sOft robotiC manipulaTORs), which involves several US universities and is funded by the US Defense Advanced Research Projects Agency (DARPA).

"An elephant's trunk can pick up a peanut or a tree trunk," says Ian Walker, a member of the project team from Clemson University in South Carolina. "This ability, inherent in the OCTOR robots, gives OCTOR arms a huge advantage over conventional industrial robots."

Just like a real tentacle, an Octarm simply wraps itself around an object in order to manoeuvre it. This allows it to grasp objects of various sizes and shapes and could let robots deal with unpredictable real-world situations, the researchers say.

Monday, May 22, 2006

 

Here and Now

The Long Now:

"When I was a child, people used to talk about what would happen by the year 2000. For the next thirty years they kept talking about what would happen by the year 2000, and now no one mentions a future date at all. The future has been shrinking by one year per year for my entire life. I think it is time for us to start a long-term project that gets people thinking past the mental barrier of an ever-shortening future. I would like to propose a large (think Stonehenge) mechanical clock, powered by seasonal temperature changes. It ticks once a year, bongs once a century, and the cuckoo comes out every millennium."
- Daniel Hillis

The Long Now Foundation was established in 01996* to develop the Clock and Library projects, as well as to become the seed of a very long term cultural institution. The Long Now Foundation hopes to provide counterpoint to today's 'faster/cheaper' mind set and promote 'slower/better' thinking. We hope to creatively foster responsibility in the framework of the next 10,000 years.

The term was coined by one of our founding board members, Brian Eno. When Brian first moved to New York City and found that in New York here and now meant this room and this five minutes, as opposed to the larger here and longer now that he wa s used to in England. We have since adopted the term as the title of our foundation as we are trying to stretch out what people consider as now.
 

Algorithmic Theory of Everything

Computable Universe:

As a consequence of Moore's law, each decade computers are getting roughly 1000 times faster by cost. Apply Moore's law to the video game business. As the virtual worlds get more convincing many people will spend more time in them. Soon most universes will be virtual, only one (the original) will be real. Then many will be led to suspect the real one is a simulation as well. Some are already suspecting this today.

Then the simplest explanation of our universe is the simplest program that computes it. In 1997 Schmidhuber pointed out [1] that the simplest such program actually computes all possible universes with all types of physical constants and laws, not just ours. His essay also talks about universes simulated within parent universes in nested fashion, and about universal complexity-based measures on possible universes.
 

The G Factor

Jensen, Arthur R. (1999) The G Factor: the Science of Mental Ability, Psycoloquy: 10,#23 Intelligence G Factor (1):

The g factor is the highest-order common factor that can be extracted in a hierarchical factor analysis from a large battery of diverse tests of various cognitive abilities. It is the most important psychometric construct in the study of individual differences in human cognitive abilities. Since its discovery by Spearman in 1904, the g factor has become so firmly established as a major psychological construct in terms of psychometric and factor analytic criteria that further research along these lines is very unlikely either to disconfirm the construct validity of g or to add anything essentially new to our understanding of it. In fact, g, unlike any of the primary, or first-order, factors revealed by factor analysis, cannot be described in terms of the knowledge content of cognitive test items, or in terms of skills, or even in terms of theoretical cognitive processes. It is not essentially a psychological or behavioral variable, but a biological one, a property of the brain. But although not itself a cognitive ability, g is what causes positive correlations among individual differences in performance, even on cognitive tasks that differ greatly with respect to sensory motor modality, brain modularity, and learned cognitive skills and knowledge. The g factor derived from conventional nonspeeded psychometric tests shows higher correlations than any other factors independent of g with various measures of information-processing efficiency, such as working memory capacity, choice and discrimination reaction times, and perceptual speed. A test's g loading is the best predictor of its heritability and its sensitivity to inbreeding depression. Psychometric g also has more direct biological correlates than any other independent source of test variance, for example brain size, brain evoked potentials, nerve conduction velocity, and the brain's glucose metabolic rate during cognitive activity. The ultimate arbiter among various "theories of intelligence" must be the physical properties of the brain itself. The current frontier of g research is the investigation of the anatomical and physiological features of the brain that cause g. Research has reached the point at which the only direction left in which to go is that presaged by Spearman himself, who wrote that the final understanding of g must come from the most profound and detailed direct study of the human brain in its purely physical and chemical aspects" (1927, p.403).
 

Syntactic sugar

sweetness:

"Syntactic sugar causes cancer of the semicolon."
- Alan Perlis

Syntactic sugar can be easily translated ("desugared") to produce a program (specification) in some simpler "core" syntax. In Landin's case, the core was a lambda calculus enriched with a few operations, such as assignment. Following Landin's insights, some later programming languages, such as ML and Scheme, were explicitly designed as a language core of essential constructs, into which other convenient features can be desugared. This is, in fact, the usual mathematical practice of starting from a minimal set of primitives, but doing most work in a convenient, special-purpose notation defined in terms of those primitives.

For instance, while it is common for most programming languages to include standard mathematical operations using infix notation (you will often find operations such as i + 1 throughout a typical program's source code) many of these languages (mainly those that are functional languages), handle the actual math by calling functions. In these cases the infix notation is actually syntactic sugar for something such as add(i, 1).

Saturday, May 20, 2006

 

Program Transformation

Program Transformation Wiki / Program Transformation:

A program is a structured object with semantics. The structure allows us to transform a program. The semantics gives us the means to compare programs and to reason about the validity of transformations. Semantics includes the extensional and intensional behaviour of a program. A programming language is a collection of programs. This is a rather broad definition that is designed to cover proper programming languages (with an operational interpretation), but also data formats and domain-specific languages.

Programming languages can be clustered into classes with structural and/or semantic similarities. One of the aims of a general framework for program transformation is to define transformations that are reusable accross as wide a range of languages as possible. For example, the notion of variable and variable binding is shared by all programming languages. Transformations dealing with variables such as bound variable renaming, substitution, and unification can be defined in a very generic manner for all languages at once.

Program transformation is the act of changing one program into another. The term program transformation is also used for a formal description of an algorithm that implements program transformation. The language in which the program being transformed and the resulting program are written are called the source and target languages, respectively.

Program transformation is known under many different names

* Meta Programming
* Software generation
* Generative programming
* Program synthesis
* Program refinement
* Program calculation
 

Meta Programming System

JetBrains::Meta Programming System:

The Meta Programming System (MPS) is a new programming environment which makes it easy to define your own specialized languages, and use them together with any other language, as you see fit. Your languages also have full IDE support: code completion, navigation, refactoring, and more, and you can add your own specialized support (such as special editors) if you wish. You can even extend existing languages and add your own features. MPS eliminates the programmer's dependence on languages and environments, giving more freedom and power to the programmer, ultimately making programming easier, more fun, and more productive.
 

The Script and The Program

The State of the Onion 9:

“a script is what you give the actors. A program is what you give the audience.”
- Larry Wall

Friday, May 19, 2006

 

How Magna Doodle Works

Howstuffworks - "How Magna Doodle Works":

The Magna Doodle is basically a magnetic drawing board. It has the following pieces:

* White plastic display screen (magnetophoretic display) - what you write on
* Pen or stylus with a magnet at the tip - what you write with
* String attached to the pen - holds the pen to the Magna Doodle
* Long, thin, sliding magnet behind the screen - what you erase with
* Plastic case - holds everything together and gives you a carrying handle and pen holder

To work the Magna Doodle, you write something on the surface with the magnetic pen. When you want to erase what you have written, slide the sliding magnet to one side or the other (it works in both directions).
 

Transcending the Machines in Our Midst

The Future Does Not Compute by Stephen L. Talbott
Backcover text:

"Why do computers frustrate instead of satisfy? What do we lose when we sign onto the net? How come the Internet doesn't deliver the goods? With a careful eye to detail, Stephen Talbott looks over the culture of computing, finding both aggravation and comfort; hope and despair."
- Cliff Stoll, author of Silicon Snake Oil

The technological Djinn, now loosed from all restraints, tempts us with visions of a surreal future. It is a future with robots who surpass their masters in dexterity and wit; intelligent agents who roam the Net on our behalf, seeking the informational elixir that will make us whole; new communities inhabiting the clean, infinite reaches of cyberspace, freed from war and conflict; and lending libraries of "virtually real" experiences that seem more sensational than the real thing.

Not all of this is idle or fantastic speculation -- even if it is the rather standard gush about our computerized future. Few observers can see any clear limits to what the networked computer might eventually accomplish. It is this stunning, wide-open potential that leads one to wonder what the Djinn will ask of us in return for the gift. After all, any potential so dramatic, so diverse, so universal, can be taken in many directions. That is its very nature. Who will choose the direction -- we, or the Djinn?

The intelligent machine receives a shadow of our own intelligence. This shadow consists of all the collective, automatic, sleepwalking, deterministic processes we have yielded to. That is, it consists of our own willingness to become machines. The crucial question today is whether we can wake up in time. Only in wakefulness can we distinguish ourselves from the automatisms around us. Where we remain asleep -- where we live in our own shadow -- we are the Djinn.

The Net is the most powerful invitation to remain asleep we have ever faced. Contrary to the usual view, it dwarfs television in its power to induce passivity, to scatter our minds, to destroy our imaginations, and to make us forget our humanity.

And yet -- for these very reasons -- the Net may also be an opportunity to enter into our fullest humanity with a self-awareness never yet achieved. But few even seem aware of the challenge, and without awareness we will certainly fail.
 

How Boolean Logic Works

Howstuffworks "How Boolean Logic Works":

Have you ever wondered how a computer can do something like balance a check book, or play chess, or spell-check a document? These are things that, just a few decades ago, only humans could do. Now computers do them with apparent ease. How can a 'chip' made up of silicon and wires do something that seems like it requires human thought?

If you want to understand the answer to this question down at the very core, the first thing you need to understand is something called Boolean logic. Boolean logic, originally developed by George Boole in the mid 1800s, allows quite a few unexpected things to be mapped into bits and bytes. The great thing about Boolean logic is that, once you get the hang of things, Boolean logic (or at least the parts you need in order to understand the operations of computers) is outrageously simple.
 

10 PHP Tips and Tricks

Do You PHP? by Rasmus Lerdorf:

1. When you are looking for information on a specific PHP function, go to http://php.net/ . For example: http://php.net/join. That takes you directly to the right place in the online manual on a server geographically near you.

2. Try this: pear install apc . The pear command is a useful installer that can even be used to install PHP extensions written in C. In this case, it would install the APC opcode cache extension.

3. Use an opcode cache to improve performance. See #2.

4. There is nothing wrong with mixing OOP and procedural code in PHP. Use objects when they make sense, and go procedural for the rest.

5. Extending PHP with your own custom C or C++ extensions is easier than you might think. See README.EXT_SKEL in the PHP source distribution.

6. The echo <<<EOB syntax is useful for outputting blocks of text with full $variable substitution, without needing to escape anything. EOB;

7. PATH_INFO is good! Use it to clean up ugly URLs.

8. Use a profiler, pear install apd.

9. Database abstraction is mostly a myth. There is nothing wrong with direct database calls' making use of all the tricks and cheats your chosen database has to offer, to tweak as much performance as possible out of it.

10. Keep your base technology and building blocks simple. Stay with a nonthreaded Web server, and avoid complex frameworks and abstraction layers, to give yourself a chance to trace and debug any problems that may come up. Solving the Web problem is simple; don't try to make it hard.

Thursday, May 18, 2006

 

Der Java Cup International Contest 1995 : Applets

The Java Cup International Contest : just some of my favourites :)


Turing Machine
:
This applet demonstrates the workings of a Turing machine.

DigSim :
This Java applet simulates and allows users to construct computer circuit board.

Traffic Simulation :
The applet simulates traffic flow using Java programming language. It takes advantage of multithread, a unique feature function in Java. In particular, three threads operate concurrently to represent (1) the cars, (2) the traffic flow volume and (3) the traffic lights, respectively. More important is that network-oriented Java is able to link information of real-time traffic flow from different locations, which can be used to predict and broadcast short- and long-term traffic status.
 

Vi-XFST : Visual Regular Expression Development

Vi-XFST USER GUIDE:

Vi-XFST’s graphical regular expression construction tools allow developers to quickly build a visual model of their finite-state regular
expressions. The developer quickly creates a topological model of the expression showing the relationship between expressions, as they are combined on the canvas of the visual editor. It is also easier to break down into the visual structure of large regular expressions.
There is a hierarchical view of networks available, and that hierarchy is visible with in Vi-XFST. The user can zoom in a definition to see what is inside it, and go deeper, do tests at any level on a component, modify it, and go back to the top picture. This makes it possible to view networks at different levels of detail and make even large structures manageable and comprehensive.
 

Turmite and Ants : Two Dimensional Turing Machines

Turmites:

TurmiteBinaryFramesBinary-counting turmite

Turmites, also called turning machines, are 2-dimensional Turing machines in which the 'tape' consists of a grid of spaces that can be written and erased by an active ('head') element that turns at each iteration on the basis of the state of its current grid square. The 'head' of the system is usually called a 'vant,' 'ant,' or 'turmite' on square grids, and a 'bee,' 'worm,' or 'turtle' on hexagonal grids. (The term 'turtle' is named after Seymour Papert's turtle geometry). The turmite tracks its position, direction, and current state.

Langton's Ant



A 4-state 2-dimensional Turing machine invented in the 1980s. The ant starts out on a grid containing black and white cells, and then follows the following set of rules.

1. If the ant is on a black square, it turns right 90 degrees and moves forward one unit.

2. If the ant is on a white square, it turns left 90 degrees and moves forward one unit.

3. When the ant leaves a square, it inverts the color.
 

Turing Machine

Turing Machine -- From MathWorld:

A Turing machine is a theoretical computing machine invented by Alan Turing Eric Weisstein's World of Biography (1937) to serve as an idealized model for mathematical calculation. A Turing machine consists of a line of cells known as a 'tape' that can be moved back and forth, an active element known as the 'head' that possesses a property known as 'state' and that can change the property known as 'color' of the active cell underneath it, and a set of instructions for how the head should modify the active cell and move the tape (Wolfram 2002, pp. 78-81). At each step, the machine may modify the color of the active cell, change the state of the head, and then move the tape one unit to the left or right.

Javascript Turing Machines
 

On India Inc job quotas

an affirmative lesson from South Africa:

"As facts lose out to rhetoric in the debate over quotas in the private sector, New Delhi and India Inc should perhaps take a look at the example of South Africa. Emerging from apartheid just over a decade ago, the country has skillfully combined a system of incentives, fines and laws—rather than imposing quotas—to bring about affirmative action. And is now into the second leg of reforms to achieve “Black Economic Empowerment.”"

Wednesday, May 17, 2006

 

LA Raeven

culiblog: Anorexia, art, war, rant:

"LA Raeven is the artist name for twins Liesbeth and Angelique Raeven, whose very subject matter is themselves. Their video installation work and performances are about the female body image and the behaviour dynamics of twins, especially when this dynamic expresses itself in psychologically nuanced eating habits."
 

Wheee!

Firefox Flicks: Wheee!: "Wheee!"


 

I'm the Blue Security Spammer

Wired News: I'm the Blue Security Spammer:

An anonymous spammer took credit on Friday for taking part in a campaign by hundreds of junk e-mailers to disable the websites of antispam firm Blue Security and affiliated internet companies.

In a message to Wired News, a writer claiming to be 'one of the spammers behind (the) Blue Security scandal,' said junk e-mailers have organized to collect all e-mail addresses of Blue Security's users. The writer claimed that spammers have collected e-mails of 70 to 90 percent of Blue Security's half-million registered users and sent messages to their inboxes.

'Blue Security is indeed hurting our business, but not by taking down our websites,' the purported spammer wrote. 'Instead, they create a daily nuisance to our server administrators.'
 

Under Attack, Spam Fighter Folds

Wired News:

A startup whose aggressive antispam measures drew a blistering counterattack from spammers two weeks ago that brought down the company's servers along with a wide swath of the internet is shuttering its program that targets junk e-mailers.

In an interview with Wired News, Blue Security CEO Eran Reshef said the Israel-based company was closing its service Wednesday since he did not want to be responsible for an ever-escalating war that could bring down internet service providers and websites around the world and subject its users to denial-of-service attacks from a well-organized group in control of a massive army of computer drones.

Tuesday, May 16, 2006

 

Stoic ethics and virtues

Stoicism - Wikipedia, the free encyclopedia:

The ancient Stoics are often misunderstood because the terms they used pertained to different concepts in the past than they do presently. The word stoic has come to mean unemotional or indifferent to pain, because Stoic ethics taught freedom from passion by following reason. But the Stoics did not seek to extinguish emotions, only to avoid emotional troubles by developing clear judgement and inner calm through diligent practice of logic, reflection, and concentration.

Borrowing from the Cynics, the foundation of Stoic ethics is that good lies in the state of the soul itself; in wisdom and self-control. Stoic ethics stressed the rule: "Follow where reason leads." One must therefore strive to be free of the passions, bearing in mind that the ancient meaning of passion was "anguish" or "suffering"[1]—somewhat different to the modern use of the word.

The idea was to be free of suffering (which the Stoics called passion) through apatheia (απαθεια) (Greek) or apathy, where apathy was understood in the ancient sense—being objective or having "clear judgement"—rather than simple indifference, as apathy implies today. The Stoic concepts of passion and apatheia are analogous to the Buddhist noble truths; All life has suffering (Dukkha), suffering is rooted in passion and desire (Samudaya), meditation and virtue can free one from suffering (Nirodha and Marga). It is also analogous to the concepts in Bhagavad Gita, a Hindu scripture, which stress on rising above the dualities such as pleasure-pain, win-lose, to perform one's duties.

For the Stoics reason meant not only using logic, but also understanding the processes of nature—the logos, or universal reason, inherent in all things. Living according to reason and virtue, they held, is to live in harmony with the divine order of the universe, in recognition of the common reason and essential value of all people. The four cardinal virtues of the Stoic philosophy are wisdom (Sophia), courage (Andreia), justice (Dikaiosyne), and temperance (Sophrosyne), a classification derived from the teachings of Plato.

Following Socrates, the Stoics held that unhappiness and evil are the results of ignorance. If someone is unkind, it is because they are unaware of their own universal reason. Likewise, if they are unhappy, it is because they have forgotten how nature actually functions. The solution to evil and unhappiness then, is the practice of stoic philosophy—to examine one's own judgements and behaviour and determine where they have diverged from the universal reason of nature.
 

Choice Of Language

quote:

"Philosophy is a battle against the bewitchment of our intelligence by means of language."
~ Ludwig Wittgenstein (Luigi's older brother)
 

An Electrical Circuit

Dave Barry : Dave Barry in Cyberspace:

"Electricity is supplied by the wall socket, which is in turn connected to the electrical company via big overhead wires with squirrels running on them.

"A question many people ask ... is, 'How come the squirrels don't get electrocuted?' To answer that question, we need to understand exactly what an electrical circuit is.

"When you turn on a switch, electricity flows through the wire into the appliance, where it is converted via a process called electrolysis into tiny microwaves. These fly around inside the oven area until they locate the Hungry Hombre Heat 'n' Eat Hearty Burrito entree; they then signal the location to each other by slapping their tails in a distinctive pattern. The workers, or drones, then ... swarm around the queen; this causes the rapid warming that makes the entree edible and leads via amino acids, to digestion.

"This is followed by grunting and flushing, with the outflow traveling via underground pipes to the sewage treatment plant, which in turn releases purified water into the river, where it is used to form waterfalls, which rotate the giant turbines that produce the electricity that flows through wires back to your appliance, thereby completing the circuit.

"So we see that squirrels have nothing whatsoever to do with it. There is no need for you to worry about squirrels; believe me, they are not worrying about you."

Monday, May 15, 2006

 

How to Stuff a Wild Duck

IBM poster; Jan 1973:



"'We are convinced that any business needs its wild ducks. And in IBM we try not to tame them.' T.J. Watson, Jr.

'The reasonable man adapts himself to the world. The unreasonable man persists in trying to adapt the world to himself. Therefore all progress depends upon the unreasonable man.' G.B. Shaw

...Don't fight city hall. It doesn't matter. cubicles. YES, BUT. Lip service. Rules Rules Rules. You're not onboard. Remember, this is IBM. Administrivia. Work Week. Draft a memo...."
 

Three Principles of Coding Clarity

www.vector.org.uk

1. The first principle: shorten lines of communication
2. The second principle: semantic consistency
3. The third principle: don’t repeat yourself
 

Decision tables

Decision table - Wikipedia, the free encyclopedia:

Decision tables make it easy to observe that all possible conditions are accounted for. In the example above, every possible combination of the three conditions is given. In decision tables, when conditions are omitted, it is obvious even at a glance that logic is missing. Compare this to traditional control structures, where it is not easy to notice gaps in program logic with a mere glance --- sometimes it is difficult to follow which conditions correspond to which actions!

Just as decision tables make it easy to audit control logic, decision tables demand that a programmer think of all possible conditions. With traditional control structures, it is easy to forget about corner cases, especially when the else statement is optional. Since logic is so important to programming, decision tables are an excellent tool for designing control logic. In one incredible anecdote, after a failed 6 man-year attempt to describe program logic for a file maintenance system using flow charts, four people solved the problem using decision tables in just four weeks. Choosing the right tool for the problem is fundamental.
 

APL - A Programming language

APL2 - Features and benefits:

APL2 is a highly-productive, general-purpose programming language that is used by both application developers and interactive end-users. It provides an extensive collection of functions that are quickly combined to solve many business problems. APL2 is widely used in a diverse set of application areas, such as commercial data processing, system design and prototyping, engineering and scientific computation, and the teaching of mathematics and other subjects.
 

How to Solve It

How to Solve It:

George Pólya's 1945 book "How to Solve It" is a small volume describing methods of problem-solving. It suggests the following steps when solving a mathematical problem:

1. First, you have to understand the problem.
2. After understanding, then make a plan.
3. Carry out the plan.
4. Look back on your work. How could it be better?

If this technique fails, Polya advises: 'If you can't solve a problem, then there is an easier problem you can solve: find it.' Or: 'If you cannot solve the proposed problem try to solve first some related problem. Could you imagine a more accessible related problem?'
 

Communicating Sequential Processes

CSP by C. A. R. Hoare (Electronic Version):

Communicating Sequential Processes, or CSP, is a language for describing patterns of interaction. It is supported by an elegant, mathematical theory, a set of proof tools, and an extensive literature. The book Communicating Sequential Processes was first published in 1985 by Prentice Hall International (who have kindly released the copyright); it is an excellent introduction to the language, and also to the mathematical theory.
 

functions vs operators : APL

APL programming language:

APL makes a clear distinction between functions and operators. Functions take values (variables or constants or expressions) as arguments, and return values as results. Operators take functions as arguments, and return related, derived, functions as results. For example the 'sum' function is derived by applying the 'reduction' operator to the 'addition' function. Applying the same reduction operator to the 'ceiling' function (which returns the larger of two values) creates a derived 'maximum' function, which returns the largest of a group (vector) of values. In the J language, Iverson substituted the terms 'verb' and 'adverb' for 'function' and 'operator'.

APL also identifies those features built into the language, and represented by a symbol, or a fixed combination of symbols, as primitives. Most primitives are either functions or operators. Coding APL is largely a process of writing non-primitive functions and (in some dialects of APL) operators. However a few primitives are considered to be neither functions nor operators, most noticeably assignment.
 

The inimitable T.R.Rajendar

dedicated to all ye T.R.Rajendar fans. ensaaaaai!

http://youtube.com/watch?v=fFOPhOXkefU
http://youtube.com/watch?v=o4t87odQvxY
http://youtube.com/watch?v=axkYmvvO8g4
http://youtube.com/watch?v=whpigU66BFA
http://youtube.com/watch?v=kCOUVqA_iVI
 

Eve Ensler | The Vagina Monologues

Vagina Monologues: V-Day Edition
havent read it yet, seems like one of these days, im gonna have to...

"A poignant and hilarious tour of the last frontier, the ultimate forbidden zone, The Vagina Monologues is a celebration of female sexuality in all its complexity and mystery. In this stunning phenomenon that has swept the nation, Eve Ensler gives us real women's stories of intimacy, vulnerability, and sexual self-discovery.

Celebrated as the bible for a new generation of women, The Vagina Monologues has been performed in cities all across America and at hundreds of college campuses. It has inspired a dynamic grassroots movement--V-Day--to stop violence against women. Witty and irreverent, compassionate and wise, Eve Ensler's Obie Award-winning masterpiece gives voice to women's deepest fantasies and fears, guaranteeing that no one who reads it will ever look at a woman's body, or think of sex, in quite the same way again."

Sunday, May 14, 2006

 

The Proletariat and the Bourgeoisie


 

Russophilia

Suraj always brings out the russophiliac in me :)

"I love Russians for their dramatic, emotional nature. They're not afraid to love, not afraid to get hurt, not afraid to exaggerate or act impulsively."
- American author Robert Alexander
 

The Book : On Lisp

On Lisp : Paul Graham:

On Lisp is a comprehensive study of advanced Lisp techniques, with bottom-up programming as the unifying theme. It gives the first complete description of macros and macro applications. The book also covers important subjects related to bottom-up programming, including functional programming, rapid prototyping, interactive development, and embedded languages. The final chapter takes a deeper look at object-oriented programming than previous Lisp books, showing the step-by-step construction of a working model of the Common Lisp Object System (CLOS).

As well as an indispensable reference, On Lisp is a source of software. Its examples form a library of functions and macros that readers will be able to use in their own Lisp programs.
 

Writing Efficient Programs

A Summary of Jon Louis Bentley's ``Writing Efficient Programs'':

The following steps are essential parts of a methodology of building efficient computing systems.

1. The most important properties of a large system are a clean design and implementation, useful documentation, and a maintainable modularity. The first steps in the programming process should therefore be the design of a solid system and the clean implementation of that design.
2. If the overall system performance is not satisfactory, then the programmer should monitor the program to identify where the scarce resources are being consumed. This usually reveals that most of the time is used by a few percent of the code.
3. Proper data structure selection and algorithm design are often the key to large reductions in the running time of the expensive parts of the program. The programmer should therefore try to revise the data structures and algorithms in the critical modules of the system.
4. If the performance of the critical parts is still unsatisfactory, then use the techniques below to recode them. The original code should usually be left in the program as documentation.
5. If additional speed is still needed, then the programmer should work at lower design levels, including hand-written assembly code, operating system modifications, microcode, and special-purpose hardware design.
 

Criticism and The Critic

Patterns of Software

Criticism is a study by which men grow important and formidable at a very small expence. The power of invention has been conferred by nature upon few, and the labour of learning those sciences which may by mere labour be obtained is too great to be willingly endured; but
every man can exert such judgement as he has upon the works of others; and he whom nature has made weak, and idleness keeps ignorant, may yet support his vanity by the name of a Critic. (Number 60, Saturday, June 9, 1759)

- Samuel Johnson’s "The Idler"
 

A Case Study in Root Cause Defect Analysis

Classification of defect types

Implementation:

1: data design/usage
2: resource allocation/usage
3: exception handling
4: algorithm
5: functionality
6: performance
7: language pitfalls
8: other

Interface:

9: data design/usage
10: functionality design/usage
11: communication protocol
12: process coordination
13: unexpected interactions
14: change coordination
15: other

External:

16: development environment
17: test environment (tools/infrastructure)
18: test environment (test cases/suites)
19: concurrent work (other releases)
20: previous (inherited from prev. release)
21: other
 

Ruminations on the future of Perl

Larry Wall: comp.lang.perl

: I've been giving some thought to the future of Perl. Of course, these
: comments are a mite arrogant, but at least they may help Larry plan.

All language designers are arrogant. Goes with the territory... :-)

: Probably the best thing for the long-run health of Perl (although the
: worst for everybody now involved with it) is to scrap it and redesign
: (and reimplement) it from the ground up. Having implemented and used
: Perl, we now know *what it should have been*.

I think you'll find that, while we all know what it should have been,
we all know it should have been something different from what everybody
else things it should have been.

: In my opinion, Perl's biggest weaknesses are (1) its syntax is
: fantastically complex (consider the multiple meanings of / and $), and
: (2) it is a collection of features more than a coherent language for
: expressing algorithms.

Unfortunately, these are also Perl's biggest strengths. If you cure Perl's biggest weaknesses, you'll also cure it's biggest strengths. Then we'll basically be back where we started.

The purpose of Perl is to systematize Unix culture. To do that, you have to use the syntax of Unix culture. That one fact drove nearly the entire design of the language. It may be that Loglan is more precise and more consistent than English, but I don't see people abandoning English for Loglan in large numbers. It's just too foreign. Getting people to learn and use "Standard English" is trivial by comparison. Perl is kinda like "Standard Unix".

Much as I hate to say it, the Computer Science view of language design has gotten too inbred in recent years. The Computer Scientists should pay more attention to the Linguists, who have a much better handle on how people prefer to communicate.
 

one-line summations in perl : comp.lang.perl

Google Groups: comp.lang.perl:

Seriously, it's durn near impossible for one language to be better than another language at absolutely everything. My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment. You know, kinda like the control box for Gigantor.
 

s///e bizarreness : comp.lang.perl

Larry Wall:

: +---------------
: | The really unexpected thing here is that /ee yields a double eval.
: +---------------
:
: You can say *that* again! I just about fell out of my chair when I saw the "/ee" and its result.

You think YOU were surprised!

I just about broke my jaw on the keyboard.

Looking at the code, however, it's easy to see how it happened. The routine collects the pattern and the replacement, and then processes the options. The replacement is ordinarily stored as syntax-tree node
that evaluates a double-quoted string. When it sees the e option, it just forces the double quoting to single quoting and wraps an eval syntax-tree node around the replacement string node. Since there was no code to check for multiple e options, it just wraps another eval node around the replacement every time it sees an e.

I think it's a new feature. Don't tell anyone it was an accident. :-)

Hmm. I wonder if the ii option should make it twice as case insensitive...
 

JAPH : Just Another Perl hacker

Cultured Perl: The elegance of JAPH:

"A mainstay of the Perl culture, JAPH is a short script that produces the output 'Just another Perl hacker.' Although written for the beginner or intermediate Perl programmer, this article examines a few simple examples of the JAPH genre that will surprise and engage even the most seasoned devotee. The author of this article, Teodor Zlatanov, is an expert in Perl who has been working in the community since 1992 and specializes in, among other things, open source work in text parsing."


#Kickstart from http://www.perlmonks.com/
#note: a slight valentine variation :)

$LOVE= AMOUR.
true.cards. ecstacy.crush
.hon.promise.de .votion.partners.
tender.truelovers. treasure.affection.
devotion.care.woo.baby.ardor.romancing.
enthusiasm.fealty.fondness.turtledoves.
lovers.sentiment.worship.sweetling.pure
attachment.flowers.roses.promise.poem;
$LOVE=~ s/AMOUR/adore/g; @a=split(//,
$LOVE); $o.= chr (ord($a[1])+6). chr
(ord($a[3])+3). $a[16]. $a[5]. chr
(32). $a[0]. $a[(26+2)]. $a[27].
$a[5].$a[25]. $a[8].$a[3].chr
(32).$a[29]. $a[8].$a[3].
$a[62].chr(32).$a[62].
$a[2].$a[38].$a[4].
$a[3].'.';
print
$o;

 

Schwartzian transform

Algoritm

The Schwartzian transform, also known as decorate-sort-undecorate, is a technique in computer programming used to efficiently sort an array by using the result of a computation-heavy operation without re-computing that result for every comparison performed by the sort subroutine.

While the practice is named after Randal L. Schwartz, who popularized it among Perl programmers, its use in computer science dates back at least as far as the Common Lisp standard. It is a special case of memoization, which would work for any algorithm.

function naiveCompare(file a, file b) {
return modificationTime(a) < modificationTime(b)
}

// Assume that sort(list, comparisonPredicate) sorts the given list using
// the comparisonPredicate to compare two elements.
sortedArray := sort(filesArray, naiveCompare)

Unless the modification times are memoized for each file, this method requires their re-computing every time a file is compared in the sort. The Schwartzian transform solution is to change the code as follows:

for each file in filesArray
insert array(file, modificationTime(file)) at end of transformedArray

function simpleCompare(array a, array b) {
return a[2] < b[2]
}

transformedArray := sort(transformedArray, simpleCompare)

for each file in transformedArray
insert transformedArray[1] at end of sortedArray

 

Larry Wall - Quotes

Larry Wall - Creator of Perl programming language:

Although the Perl Slogan is There's More Than One Way to Do It, I hesitate to make 10 ways to do something. :-)

And don't tell me there isn't one bit of difference between null and space, because that's exactly how much difference there is. :-)

And don't tell me there isn't one bit of difference between null and space, because that's exactly how much difference there is. :-)

Because . doesn't match \n. [\0-\377] is the most efficient way to match everything currently. Maybe \e should match everything. And \E would of course match nothing. :-)

I don't know if it's what you want, but it's what you get. :-)

Q:I find this a nice feature but it is not according to the documentation. Or is it a BUG?
A:Let's call it an accidental feature. :-)

There are still some other things to do, so don't think if I didn't fix your favorite bug that your bug report is in the bit bucket. (It may be, but don't think it. :-)

Randal said it would be tough to do in sed. He didn't say he didn't understand sed. Randal understands sed quite well. Which is why he uses Perl. :-)

We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise.

There are many times when you want it to ignore the rest of the string just like atof() does. Oddly enough, Perl calls atof(). How convenient. :-)

And I don't like doing silly things (except on purpose).

Down that path lies madness. On the other hand, the road to hell is paved with melting snowballs.

If I don't document something, it's usually either for a good reason, or a bad reason. In this case it's a good reason. :-)

If you want to see useful Perl examples, we can certainly arrange to have comp.lang.misc flooded with them, but I don't think that would help the advance of civilization. :-)

Lispers are among the best grads of the Sweep-It-Under-Someone-Else's-Carpet School of Simulated Simplicity. [Was that sufficiently incendiary? :-)]

What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?

Doing linear scans over an associative array is like trying to club someone to death with a loaded Uzi.

I'm not a computer scientist in the traditional sense, though I've passed for one often enough. I've often claimed to be a linguist, but I'm not a traditional one of those either. In fact, I have the best of both worlds: I take my cues from linguistics, but my queues from computer
science.

Well, enough clowning around. Perl is, in intent, a cleaned up and summarized version of that wonderful semi-natural language known as 'Unix'.

Anyway, there's plenty of room for doubt. It might seem easy enough, but computer language design is just like a stroll in the park. Jurassic Park, that is.

Lisp has all the visual appeal of oatmeal with fingernail clippings mixed in.

I don't like your I-can-use-anything-as-an-adjective attitude.

>But I don't get paid for learning >all the intricacies of a baroquely
>complex language like perl.(Although I hope to absorb them over the years.)
Fortunately, most of the baroque complexity of Perl is the spirit (ghost?
ghoul?) of Unix shining through, so a lot of that effort will apply elsewhere.

Sorry. My testing organization is either too small, or too large, depending on how you look at it. :-)

It's a never-ending battle. Configure is a lieutenant with good tactics trying to cover for the generals' bad strategy...
[Unfortunately, the generals' stratagy is to let the current army rot, and raise their standards over in the next county. Those of us trying to organize an orderly retreat of the old army now have to fight on more fronts...]
 

Pragmatic Parsing in Common Lisp

ACM Lisp Pointers 4, 2 (Apr/Jun 1991), 3-15.

We review META, a classic technique for building recursive descent parsers, that is both simple and efficient. While META does not handle all possible regular or context-free grammars, it handles a surprisingly large fraction of the grammars encountered by Lisp programmers. We show how META can be used to parse streams, strings and lists--including Common Lisp's hairy lambda expression parameter lists. Finally, we compare the execution time of this parsing method to the built-in methods of Common Lisp.
 

Lisp : Prefix Notation

John McCarthy:

"This internal representation of symbolic information gives up the familiar infix notations in favor of a notation that simplifies the task of programming the substantive computations, e.g., logical deduction or algebraic simplification, differentiation or integration. If customary notations are to be used externally, translation programs must be written. Thus LISP programs use a prefix notation for algebraic expressions, because they usually must determine the main connective before deciding what to do next. In this, LISP differs from almost every other symbolic computation system. ... This feature probably accounts for LISP's success in competition with these languages, especially when large programs have to be written. The advantage is like that of binary computers over decimal--but larger."
 

Machine , Assembly and High Level Languages

Execution Speed: Program Language

Suppose you write a program to add the numbers: 1234 and 4321. When the program begins, IP contains the address of a section of memory that contains a pattern of ones and zeros, as shown in Table 4-3. Although it looks meaningless to most humans, this pattern of ones and zeros contains all of the commands and data required to complete the task. For example, when the microprocessor encounters the bit pattern: 00000011 11000011, it interpreters it as a command to take the 16 bits stored in the BX register, add them in binary to the 16 bits stored in the AX register, and store the result in the AX register. This level of programming is called machine code, and is only a hair above working with the actual electronic circuits.



Since working in binary will eventually drive even the most patient engineer crazy, these patterns of ones and zeros are assigned names according to the function they perform. This level of programming is called assembly, and an example is shown in Table 4-4. Although an assembly program is much easier to understand, it is fundamentally the same as programming in machine code, since there is a one-to-one correspondence between the program commands and the action taken in the microprocessor. For example: ADD AX, BX translates to: 00000011 11000011. A program called an assembler is used to convert the assembly code in Table 4-4 (called the source code) into the patterns of ones and zeros shown in Table 4-3 (called the object code or executable code). This executable code can be directly run on the microprocessor. Obviously, assembly programming requires an extensive understanding of the internal construction of the particular microprocessor you intend to use.



Assembly programming involves the direct manipulation of the digital electronics: registers, memory locations, status bits, etc. The next level of sophistication can manipulate abstract variables without any reference to the particular hardware. These are called compiled or high-level languages. A dozen or so are in common use, such as: C, BASIC, FORTRAN, PASCAL, APL, COBOL, LISP, etc. Table 4-5 shows a BASIC program for adding 1234 and 4321. The programmer only knows about the variables A, B, and C, and nothing about the hardware.

A program called a compiler is used to transform the high-level source code directly into machine code. This requires the compiler to assign hardware memory locations to each of the abstract variables being referenced. For example, the first time the compiler encounters the variable A in Table 4-5 (line 100), it understands that the programmer is using this symbol to mean a single precision floating point variable. Correspondingly, the compiler designates four bytes of memory that will be used for nothing but to hold the value of this variable. Each subsequent time that an A appears in the program, the computer knows to update the value of the four bytes as needed. The compiler also breaks complicated mathematical expressions, such as: , into more basic arithmetic. Microprocessors only know how to add, subtract, multiply and divide. Anything more complicated must be done as a series of these elementary operations.

High-level languages isolate the programmer from the hardware. This makes the programming much easier and allows the source code to be transported between different types of microprocessors. Most important, the programmer who uses a compiled language needs to know nothing about the internal workings of the computer. Another programmer has assumed this responsibility, the one who wrote the compiler.



Most compilers operate by converting the entire program into machine code before it is executed. An exception to this is a type of compiler called an interpreter, of which interpreter BASIC is the most common example. An interpreter converts a single line of source code into machine code, executes that machine code, and then goes on to the next line of source code. This provides an interactive environment for simple programs, although the execution speed is extremely slow (think a factor of 100).
 

Algorithms and Asssembly Programming

Dos and Donts

Reasons to avoid assembly language

(1) Assembly language code is not easily ported to different instruction set architectures. There are tools which will port 68K assembly to PowerPC assembly, but you run the risk that the architectures are so different a port doesn’t get you the full potential of the new architecture.

(2) Code can be written in a shorter amount of time in a high level language than it can be in assembly. People want to argue this, claiming that bit manipulation routines are too hard to do in C, but it’s just not true. I suspect that if they knew C as well as they knew assembler there would be little or no argument.

(3) It is far easier to make mistakes in assembly than it is in a high level language. High level languages offer abstraction and structure which makes many common assembly language problems simply non-existent.

(4) Code written in assembly is harder to maintain both for the original programmer as well as a different programmer. Because of the fine-grain control you get with assembly language, it is not always easy to follow the flow of the code.

(5) The development tools available for writing assembly language are not advancing at the same rate as those for high level languages. In fact, there are many situations where the tools are getting worse. Apple’s PowerPC Assembler for MPW is not nearly as sophisticated as their 68K Assembler.

Reasons to use assembly language

(1) Highly time-critical code, such as software which interfaces with a piece of hardware which has very specific timing dependencies. Not very common.

(2) Code where space is at a minimum, such as embedded controllers. Generally not applicable to the Macintosh.

(3) Code that is proven to be an unacceptable bottleneck in a specific task.

(4) Places where parameters are passed in specific locations that are not easily accessible to a high level language. [Between the PowerPCruntime architecture, and the protocol conversion that Mixed Mode does for you, this problem essentially goes away on the Power Macintosh - Ed stb]

In all of these instances, there is a need for assembly only in specific places in the code. There is no need to code large parts in assembly.

Recommended Books

[1] Thomas H. Cormen, Charles E. Leiserson, and Ronald L. Rivest. Introduction to Algorithms. MIT Press, 1990.

[2] Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley, 1974.

[3] Saumyendra Sengupta and Paul Edwards. Data Structures in ANSI C. Academic Press, 1991.

[4] Donald Knuth. The Art of Computer Programming, Volumes 1-3. Addison-Wesley, 1973

[5] Daniel H. Greene and Donald E. Knuth. Mathematics for the Analysis of Algorithms., Third Edition Birkhäuser, 1990.

[6] P. D. Eastman. Go, Dog, Go! Random House, 1961.

[7] Manoochehr Azmoodeh. Abstract Data Types and Algorithms, Second Edition. Macmillan, 1990.

Saturday, May 13, 2006

 

The Perl Evangelist

Google Groups: comp.unix.shell: "

No quarrel with that. But you have to allow a little for the desire to evangelize when you think you have good news. Now, it's expected when you evangelize that some seed will fall on the pathway, some on rocky ground, some among weeds, and some into good soil. Sometimes you put
seed into inappropriate places because, as an evangelist, either you don't have a very discriminating broadcast medium, or you don't know offhand whether a place is appropriate or not. Not your responsibility.
Like it says, 'He that hath ears, let him hear.'

Love,
Larry
 

On Perl Language : comp.lang.perl

Larry Wall

You obviously believed that hype paragraph in the Perl man page... :-)

The truth is more complicated than that. Yes, Perl is Pathologically Eclectic, and I do hold it to a lesser standard of simplicity at the level that most computer scientists like to think they think. I'm not a computer scientist in the traditional sense, though I've passed for
one often enough. I've often claimed to be a linguist, but I'm not a traditional one of those either. In fact, I have the best of both worlds: I take my cues from linguistics, but my queues from computer science.

Well, enough clowning around. Perl is, in intent, a cleaned up and summarized version of that wonderful semi-natural language known as "Unix".

And the fact is, natural languages are "baroque and awful", and have a disturbing tendency to borrow the "worst aspects" of the languages about them. Nevertheless, people frequently write elegant, readable
and coherent prose in natural languages. And they *enjoy* doing so.

If certain computer scientists had their way, we'd all be programming in Newspeak. But then only computer scientists would enjoy programming.

Yes, it's possible to think bad thoughts in Perl. It's possible to write inelegant, unreadable and stupid code in Perl. And people frequently do. It's one of the prices of freedom.

Anyway, enough of that diatribe. Perl 5 is, in fact, much more coherent than Perl 4. For instance, the grammar for Perl 5 is considerably smaller, while still managing to support 99% of old Perl code (including a number of deprecated misfeatures), as well as adding in the new object-oriented features. It runs faster, and the semantics are much better defined. The new extensions are quite minimalistic, because for the most part they're natural generalizations of ideas that were already there before. I know there's something right in there,
because newbies keep asking if they can do such-and-so, and the answer is typically, "That won't work in Perl 4, but it will in Perl 5."

With earlier Perls, when people cried "Hodgepodge!", it was easy enough for me to laugh along with them. But with Perl 5, that's just a wee bit harder to take. No doubt it's a failure of humility on my part, but it galls me just a little to put that much effort (both personal
and communal) into something, and see that effort rejected with fightin' words like "all the worst aspects of". I understand that hyperbole is a useful rhetorical device, but it can hurt nonetheless.

Okay, I've said my say, here's my other cheek... :-)

Larry
 

Perl Poetry

Larry Wall:

: Why does perl accept this short program without an error:
:
: sort X
:
: What does perl think "X" is? A filehandle? A format?

The short answer is that it is a subroutine name, and since you have it a null array to sort, it never evaluates the subroutine name to find out it doesn't exist. See the man page.

The long answer is that there are a class of operators in perl called list operators, and any of them can take an optional word or scalar variable before the list. Some of them, such as "print", take it to be a filehandle.
"sort" takes it to be a subroutine name. "exec" and "system" take it to be a scalar holding the real name of the program to exec. Some list operators such as "unlink" and "kill" ignore it entirely!

I know it's weird, but it does make it easier to write poetry in perl. :-)

Larry
 

Daniel J. Bernstein : Quotes

Daniel J. Bernstein - author of the computer software qmail and djbdns:

"'Of course, the test difficulty depends on what you're doing, and on how you're doing it. I'm constantly asking 'How much would I have to screw this up to write an incorrect function that passes these simple tests?' Occasionally the answer is 'Not much,' so I'll throw the code away and start over. It was probably perfect code, but that's not good enough.'"

Make up your mind. Do you want to declare that your filters are effective, or do you want to find out how effective they actually are?

I don't have much respect for the people who run the Internet, but as a practical matter there are certain lines that can't be crossed without their approval.

In general, the Internet was not designed to accommodate deliberate failures to communicate.

(In response to another poster's assertion that Windows NT is easier to configure than an otherwise-similar Unix system) Indeed. With NT, I can usually see in a matter of minutes that what I'm trying to do simply can't be done with the available software.

I have discovered that there are two types of command interfaces in the world of computing: good interfaces and user interfaces
 

Why Boycott Amazon

Mark-Jason Dominus is Boycotting Amazon:

Amazon recently sued Barnes and Noble for patent infringement.

The patent in question is for an utterly trivial invention called `one-click ordering'. `One-click ordering' means that the first time you order, they remember your address and credit card number in a database, and key the database by a browser cookie. Then if you come back and order again, you don't have to fill out another form; they retrieve the information from the database.

Patents are the result of an exchange between the community and the inventor. The community gives the inventor an exclusive license to an invention in return for the inventor divulging the secret. But in this case there is no secret at all; it is totally obvious to anyone who is even a little bit skilled at web programming. The patent office is not normally supposed to grant patents for inventions that would be obvious to skilled practitioners of the relevant art. I am skilled in the relevant art and to me this invention is really, really, obvious. It is obviously no invention at all. The patent office screwed up here, and Amazon received a valuable license for free at the public expense.

Just because the patent office screwed up does not give Amazon leave to take advantage of the mistake in an unethical way. If your neighbor leaves their door unlocked, you are not entitled to go into their house and take their belongings.
 

Fluent Interfaces

MF Bliki: FluentInterface:

Indeed one of the problems of this little example is that I just knocked it up in a Calgary coffee shop over breakfast. Good fluent APIs take a while to build. If you want a much more thought out example of a fluent API take a look at JMock. JMock, like any mocking library, needs to create complex specifications of behavior. There have been many mocking libraries built over the last few years, JMock's contains a very nice fluent API which flows very nicely. Here's an example expectation:

mock.expects(once()).method("m").with( or(stringContains("hello"),
stringContains("howdy")) );

I saw Steve Freeman and Nat Price give an excellent talk at JAOO2005 on the evolution of the JMock API, they promised to write up their experiences but haven't. Someone please kidnap their compilers until they do.

So far we've mostly seen fluent APIs to create configurations of objects, often involving value objects. I'm not sure if this is a defining characteristic, although I suspect there is something about them appearing in a declarative context. The key test of fluency, for us, is the Domain Specific Language quality. The more the use of the API has that language like flow, the more fluent it is.

Building a fluent API like this leads to some unusual API habits. One of the most obvious ones are setters that return a value. (In the order example with adds an order line to the order and returns the order.) The common convention in the curly brace world is that modifier methods are void, which I like because it follows the principle of CommandQuerySeparation. This convention does get in the way of a fluent interface, so I'm inclined to suspend the convention for this case.

You should choose your return type based on what you need to continue fluent action. JMock makes a big point of moving its types depending on what's likely to be needed next. One of the nice benefits of this style is that method completion (intellisense) helps tell you what to type next - rather like a wizard in the IDE. In general I find dynamic languages work better for DSLs since they tend to have a less cluttered syntax. Using method completion, however, is a plus for static languages.

One of the problems of methods in a fluent interface is that they don't make much sense on their own. Looking at a method browser of method by method documentation doesn't show much sense to with. Indeed sitting there on its own I'd argue that it's a badly named method that doesn't communicate its intent at all well. It's only in the context of the fluent action that it shows its strengths. One way around this may be to use builder objects that are only used in this context.
 

The Smart Servant Concept

How to recognise a smart servant:

"If a system that’s installed as a middle man between me and the machine is bent to serve my needs more than the needs of the machine, the system will be verbose. It’ll offer me ways to express myself in a more common-sense manner, which will buy me (and my colleagues) a much needed ease of communication as well as ease of maintenance."
 

Ray Ozzie Got the Memo

lesscode.org:

"I wonder if it’s time to adopt a variation of Gandhi’s famous formulation: “First they ignore you, then they laugh at you, then they fight you, then you win”. It goes something like “First they ignore you, then they keep on ignoring you but you win anyway”. One nice thing about the new formulation is you get to skip the whole fighting part. I think Gandhi would approve."
 

Representing Large numbers

Astronomy and Mathematics in Ancient India:

Mathematicians in India invented the base ten system in ancient times. But research did not stop there. The practice of representing large numbers also evolved in ancient India. The base ten system of calculation that uses nine numerals and the zero stood as an efficient way to represent numbers ranging from a very small decimal to an inconceivably large number. The biggest number known to Greeks was the myriad (10,000) whereas the Chinese, until recent times, had 10,000 as the largest unit of enumeration and the ancient Arabs knew only until 1,000. The notion of representing large numbers as powers of 10, one that was invented in India, turned out to be extremely handy. The Yajur Veda Samhitaa, one of the Vedic texts written at least 1,000 years before Euclid lists names for each of the units of ten upto the twelfth power [See 1]. Later other Indian texts (from Buddhist and Jaina authors) extended this list as high as the 53rd power, far exceeding their Greek contmporaries, mainly because of the latter's handicap of not being able to accept the fundamental Mathematical notion of abstract numerals. The place value system is built into the Sanskrit language and so whereas in English we only use thousand, million, billion etc, in Sanskrit there are specific nomenclature for the powers of 10, most used in modern times are dasa (10), sata (100), sahasra (1,000=1K), ayuta (10K), laksha (100K), niyuta (106=1M), koti (10M), vyarbuda (100M), paraardha (1012) etc. Results of such a practice were two-folds. Firstly, the removal of special imporatance of numbers. Instead of naming numbers in grops of three, four or eight orders of units one could use the necessary name for the power of 10. Secondly, the notion of the term "of the order of". To express the order of a particular number, one simply needs to use the nearest two powers of 10 to express its enormity.

Evidences of using very large numbers have been found in the Vedas which are ancient Hindu scriptures. Vedas are the most ancient written texts written in any Indo-European language. They were written in Sanskrit from around 500BC, although traces go back to 2000BC [See 4]. In the Taittiriya Upanishad, which is a part of the third Veda, Yajur Veda, there is a section (anuvaka), that extols the "Beatific Calculus" or a quasi-mathematical relationship between bliss of a young man, who has everything in the world to the bliss of the Brahman, or "realization". Translated roughly as follows, summarized from one done by Max Muller, firstly it says that fear is all-pervasive. It continues by assuming that a young, good man who is fit, healthy and strong, and has all the wealth in the world, is one unit of human bliss. The anuvaka provides a precise calculation of a series of multiplications by 100 to give number 10010 units of human bliss that can be had when one attains Brahman. The previous anuvaka exhorts the aspirants to be fearless and strong, as only such a person may realize the absolute within.
 

Invention of Zero

Astronomy and Mathematics in Ancient India:

Although ancient Babylonians were known to have used what is often called "place holders" to distinguish between numbers like 809 and 89, they were nothing more than blank spaces or at times two wedge shapes like ". More importantly, they lacked the realization that zero has a place in the number system as well as it comes with a baggage of abstract interpretations. Hence, while they can be credited with intelligently solving a practical problem of avoiding misinterpreting two numbers like 809 and 89, they can hardly be credited with the invention of the complex notion of zero and the even more complex notion of the abstract idea of "nothingness".

The ancient Greeks were beginning their contributions to mathematics around the time zero as an empty place holder was being popularized by Babylonian mathematicians. The Greeks did not adopt what is called a positional number system, a system that gave a value to a number because of its relative position in the set of numerals. This is because the Greeks' achievements were based on geometry. This resulted into firstly, Greeks relating numbers with lengths of line segments, and secondly, decoupling numbers from any potential abstract interpretations. It is commonly thought that in Greek society numbers that required to be "named" were not used by mathematician- philosophers, but by merchants and hence no clever notation was needed. Thus even the eminent mathematician like Ptolemy used the then recent place holder "zero" more as a punctuation mark than any serious numeral. Although a few Greek astronomers began using the symbol "O", the symbol more familiar to us now, to denote place holders, zero was not thought of as a number by the Greeks.

The first notions of zero as a number and its uses have been found in ancient Mathematical treatise from India and thus India is correctly related to the immensely important mathematical discovery of the numeral zero. This concept, combined with the place-value system of enumeration, became the basis for a classical era renaissance in Indian mathematics. Indians began using zero both as a number in the place-value system of numerals as well as to denote an empty place (place holder). Obviously, the use as a number came later. Aryabhata devised a number system what has no zero yet a positional number system. There is however, evidence that z dot has been used in earlier Indian manuscripts to denote an empty position. Also contemporary Indian scriptures also tend to use zero in places where unknown values are registered, where we would use x. Later Indian mathematicians had names for zero, but no symbol for it. Aryabhata used the word "kha" for position and it was also used later as the name for zero.

The oldest known text to use zero is an Indian (Jaina) text entitled the Lokavibhaaga ("The Parts of the Universe"), which has been definitely dated to 25 August 458 BC [See 4] An inscription, created in 876AD, found in Gwalior, acts as the first use of zero as a number. Zero is not a "natural" candidate for being a number. It is a great leap from physical to abstract that one needs to bridge when dealing with zero. With zero also comes the notion of negative numbers and along with all these comes a series of related questions about arithmetic operations on natural numbers, both positive and negative and zero.

The development of the notion of zero began, in my opinion, when mathematicians tried to answer these questions. Three Hindu mathematicians, Brahmagupta, Mahavira and Bhaskara tried to answer these in their treatise. In the 7th century Brahmagupta attempted to provide rules for addition and subtraction involving zero.

The sum of zero and a negative number is negative, the sume of a positive number and zero if positive, the sum of zero and zero is zero. A negative number subtracted from zero is positive, a positive number subtracted from zero is negative, zero subtracted from a negative number is nagative, zero subtracted from a positive number is positive, zero subtracted from zero is zero.

Brahmagupta also says that any number multiplied by zero is zero. But problems arise when he tries to explain division. While he is unsure about what division of a number by zero means, he wrongly gives zero divided by zero to be zero. Brahmagupta's is the first attempt from any mathematician to explain the arithmetic operations on natural numbers and zero.

In the 9th century, Mahavira updated Brahmagupta's attempts at defining operations using zero. Although he correctly finds out that a number multiplied by zero is zero, but wrongly says that a number remains unchanged when divided by zero.

The next valiant attempt came from Bhaskara in the 11th century. Division of zero still remained an illusive mystery.

A quantity divided by zero becomes a fraction the denominator of which is zero. This fraction is termed an infinite quantity. In this quantity consisting of that which has zero for its divisor, there is no alteration, though many may be inserted or extracted; as no change takes place in the infinite and immutable God when worlds are created or destroyed, though numerous orders of beings are absorbed or put forth.

This, in its face value seems correct, by suggesting that any number when divided by zero is infinity, Bhaskara suggeted that zero multiplied by infinity is any number, and hence all numbers are equal, which is not correct. But Bhaskara did correctly find out that the square of zero is zero, as is the square root.

The Indian numeral system and its place value, decimal system of enumeration came to the attention of the Arabs in the seventh or eighth century, and served as the basis for the well known advancement in Arab mathematics, represented by figures such as al-Khwarizmi. Al-Khwarizmi wrote Al'Khwarizmi on the Hindu Art of Reckoning that described the Indian place-value system of numerals based on numerals 1 through 9 and 0. Scholars like ibn Ezra and al-Samawal used the notion of zero from al-Khwarizmi's work. In the 12th century al- Samawal extended arithmetic operations using zero as follows.

If we subtract a positive number from zero the same negative number remains, ... if we subtract a negative number from zero the same positive number remains.

Zero also reached eastwards from India to China, where Chinese scholars Chin Chiu-Shao and Chu Shih-Chieh made use of the same symbol O for a places-based system in the 12th and 13th centuries respectively. From the time of Han (206 to 220 BC), Chinese scholars used a place-value system called the suan zi ("calculation using rods") that was a regular system that used horizontal and vertical lines that used to denote the nine numerals. Ifrah says that "Thus one could be forgiven for assuming that following the links established between India and China at the beginning of the beginning of the first millennium BC, Indian scholars were influenced by Chinese mathematicians to create their own system in an imitation of the Chinese counting method." [See 4] He goes on to argue that in suan zi, the zero appeared at a much later date. Thus the notion of zero helps one to recognize the originality of the Indian mathematicians vis-a-vis their Chinese counterparts. Ifra also establishes that the Chinese scholars overcame the difficulties the absence of zeros caused in trying to represent numbers like 1,270,000 often either using characters of their ordinary counting system (a non-positional system that did not require the use of a zero) or simply by empty spaces. After providing a sequence of clues, [in 4], Ifrah continues "It was only after the eighth century BC, and doubtless due to the influence of the Indian Buddhist missionaries, that Chinese mathematicians introduced the use of zero in the form of a little circle or dot (signs that originated in India),...".

Zero reached Europe in the twelfth century when Adelard of Bath translated al-Khwarizmi's works into Latin [See 1]. Fibonacci was one of the main mathematicians who accepted the concepts of zero in Europe. He was an important link between the Hindu-Arabic number system. In his treatise Liber Abaci ("a tract about the abacus"), published in 1202, he described the nine Indian symbols together with the symbol O for zero, but it was not widely accepted until much later. Significantly, Fibonacci spoke of numbers 1 through 9, but a "sign" O. Although he brought the notion of zero to Europe, it is clear that he was not able to reach the sophistication of Indians like Brahamagupta, Mahavira and Bhaskara, nor of the Arabic mathematicians like al-Samawal. The Europeans were at first resistant to this system, being attached to the far less logical Roman numeral system (notably the Romans never propounded the idea of zero), but their eventual adoption of this system arguably led to the scientific revolution that began to sweep Europe beginning by the middle of the second millennium. However, it was not until the 17th century that zero found widespread acceptance through a lot of resistance.
 

Sanskrit - Earliest and only known Modern Language

Sanskrit: "

Panini (c 400BC), in his Astadhyayi, gave formal production rules and definitions to describe Sanskrit grammar. Starting with about 1700 fundamental elements, like nouns, verbs, vowels and consonents, he put them into classes. The construction of sentences, compound nouns etc. was explained as ordered rules operating on underlying fundamental structures. This is exactly in congruence with the fundamental notion of using terminals, non-terminals and production rules of moderm day Computer Science. On the basis of just under 4,000 sutras (rules expressed as aphorisms), he built virtually the whole structure of the Sanskrit language. He used a notation precisely as powerful as the Backus normal form, an algabraic notation used in Computer Science to represent numerical and other patterns by letters.

It is my contention that because of the scientific nature of the method of pronunciation of the vowels and consonents in the Indian languages (specially those coming directly from Pali, Prakit and Sanskrit), every part of the mouth is exercised during speaking. This results into speakers of Indian languages being able to pronounce words from any language. This is unlike the case with say native English speakers, as their tongue becomes unused to being able to touch certain portions of the mouth during pronunciation, thus giving the speakers a hard time to speak certain words from a language not sharing a common ancestry with English. I am not aware of any theory in these lines, but I would like to know if there is one.
 

The Concept of Zero

The Concept of Zero:

The concept of zero also originated in ancient India. This concept may seem to be a very ordinary one and a claim to its discovery may be viewed as queer. But if one gives a hard thought to this concept it would be seen that zero is not just a numeral. Apart from being a numeral, it is also a concept, and a fundamental one at that. It is fundamental because, terms to identify visible or perceptible objects do not require much ingenuity.

But a concept and symbol that connotes nullity represents a qualitative advancement of the human capacity of abstraction. In absence of a concept of zero there could have been only positive numerals in computation, the inclusion of zero in mathematics opened up a new dimension of negative numerals and gave a cut off point and a standard in the measurability of qualities whose extremes are as yet unknown to human beings, such as temperature.

In ancient India this numeral was used in computation, it was indicated by a dot and was termed Pujyam. Even today we use this term for zero along with the more current term Shunyam meaning a blank. But queerly the term Pujyam also means holy. Param-Pujya is a prefix used in written communication with elders. In this case it means respected or esteemed. The reason why the term Pujya - meaning blank - came to be sanctified can only be guessed.

Indian philosophy has glorified concepts like the material world being an illusion Maya), the act of renouncing the material world (Tyaga) and the goal of merging into the void of eternity (Nirvana). Herein could lie the reason how the mathematical concept of zero got a philosophical connotation of reverence.

In a queer way the concept of 'Zero' or Shunya is derived from the concept of a void. The concept of void existed in Hindu Philosophy hence the derivation of a symbol for it. The concept of Shunyata, influenced South-east asian culture through the Buddhist concept of Nirvana 'attaining salvation by merging
into the void of eternity' (Ornate Entrance of a Buddhist temple in Laos)
 

India's contribution to Math

Australian Indologist - A.L. Basham; The Wonder That was India:

"the world owes most to India in the realm of mathematics, which was developed in the Gupta period to a stage more advanced than that reached by any other nation of antiquity. The success of Indian mathematics was mainly due to the fact that Indians had a clear conception of the abstract number as distinct from the numerical quantity of objects or spatial extension.'

Thus Indians could take their mathematical concepts to an abstract plane and with the aid of a simple numerical notation devise a rudimentary algebra as against the Greeks or the ancient Egyptians who due to their concern with the immediate measurement of physical objects remained confined to Mensuration and Geometry."
 

On ancient India

HISTORY OF ASTRONOMY IN ANCIENT INDIA:

'In India I found a race of mortals
living upon the Earth. But not adhering to it.
Inhabiting cities, but not being fixed to them,
possessing everything but possessed by nothing'.

- Apollonius Tyanaeus
- Greek Thinker and Traveller 1st Century AD"

Friday, May 12, 2006

 

Human Nature

Malcolm Gladwell:

"Malcolm explores why we can't trust people's opinions -- because we don't have the language to express our feelings. His examples include the story of New Coke and how Coke's market research misled them, and the development of Herman-Miller's Aeron chair, the best-selling chair in the history of office chairs, which succeeded in spite of research that suggested it would fail.

Author and New Yorker Magazine journalist Malcolm Gladwell's The Tipping Point: How Little Things Can Make a Big Difference, has been a tremendous bestseller for over three years and counting. His next compelling release, Blink, is expected in January of 2005. Malcolm has the uncanny ability to interpret research findings and tantalizing theories in sociology and other fields and apply them to business and organizational problems to generate value."
 

Watching the Alpha Geeks

The O'Reilly Radar:

"In this talk subtitled “Watching the Alpha Geeks” Tim applies his unique insight to the communities of people who are pushing the envelope in terms of what is possible with technology. These are the people exploring the frontiers of network applications, collaborative intelligence and hacking the physical world.

The old paradigms of computation are wearing away with time. Tim describes how we are making computers intelligent because we are a part of them. Artificial Intelligence is being supplanted by augmented intelligence. We are harnessing the collaborative intelligence of large numbers of people in aggregate to make applications smarter which in turn make us smarter. Software becomes bionic as it brings people into the application.

As the Web 2.0 revolution changes how we use information, people are using the network to hack the physical world. This will be one of the emerging long term trends in the future. The “alpha geeks” are finding new ways to integrate devices and applications in new and exciting ways, and people like Tim are there to spread the information for others to follow."
 

Semantic Web Architecture

Semantic Web Architecture:Semantic Web stack of technologies - URI and Unicode, XML, RDF, Ontologies, Logic, Proof and Trust"
Semantic Web stack of technologies - URI and Unicode, XML, RDF, Ontologies, Logic, Proof and Trust

From Semantic Web talk by Tim Berners-Lee at XML 2000
 

RDF vs XML

Semantic Web: Why RDF is more than XML
"Things you can do with RDF which you can't do with XML include

* You can parse the semantic tree, which end up giving you a set of (possibly mutually referential) triples and then you can use the ones you want ignoring the ones you don't understand.

Problems with basing you understanding on the structure include

* Without having gone to the trouble of getting the schema, or having an application hand-programmed to recognise a particular document type, you can't pick up any semantic information from a document;
* When an XML schema changes, it could typically introduce new intermediate elements (like 'details' in the tree above or 'div' is HTML). These may or may or may not invalidate any query which has been based on the structure of the document.
* If you haven't gone to the trouble of making a semantic model, then you may not have a well defined one."
 

Relational Databases and the Semantic Web

Special aspects of the RDB model

"A fundamental aspect of a database table is that often the data in a table can be definitive. Neither RDF nor RDB models have simple ways of expressing this. For example, not only does a row in a table indicate that there is a red car whose Massachusetts plate is '123XYZ', but the table may also carry the unwritten semantics that if any car has a Massachusetts plate then it must be in the table. (If any RDF node has 'Massachusetts plate number' property then than node is a member of the table) The scope of the uniquenes of a value is in fact a very interest property."
 

Principle of Least Power

Axioms of Web architecture Tim Berners-Lee :

"In choosing computer languages, there are classes of program which range from the plainly descriptive (such as Dublin Core metadata, or the content of most databases, or HTML) though logical languages of limited power (such as access control lists, or conneg content negotiation) which include limited propositional logic, though declarative languages which verge on the Turing Complete (PDF) through those which are in fact Turing Complete though one is led not to use them that way (XSLT, SQL) to those which are unashamedly procedural (Java, C).

The choice of language is a common design choice. The low power end of the scale is typically simpler to design, implement and use, but the high power end of the scale has all the attraction of being an open-ended hook into which anything can be placed: a door to uses bounded only by the imagination of the programmer.

Computer Science in the 1960s to 80s spent a lot of effort making languages which were as powerful as possible. Nowadays we have to appreciate the reasons for picking not the most powerful solution but the least powerful. The reason for this is that the less powerful the language, the more you can do with the data stored in that language. If you write it in a simple declarative from, anyone can write a program to analyze it in many ways. The Semantic Web is an attempt, largely, to map large quantities of existing data onto a common language so that the data can be analyzed in ways never dreamed of by its creators. If, for example, a web page with weather data has RDF describing that data, a user can retrieve it as a table, perhaps average it, plot it, deduce things from it in combination with other information. At the other end of the scale is the weather information portrayed by the cunning Java applet. While this might allow a very cool user interface, it cannot be analyzed at all. The search engine finding the page will have no idea of what the data is or what it is about. This the only way to find out what a Java applet means is to set it running in front of a person.

I hope that is a good enough explanation of this principle. There are millions of examples of the choice. I chose HTML not to be a programming language because I wanted different programs to do different things with it: present it differently, extract tables of contents, index it, and so on.
 

Limitations of the Relational Model

source:

"It is convenient to divide the limitations up into two categories. First of all, there are always very special types of data which require special forms of representation and/or inference. Some examples are the following. Limitations regarding special forms of data:

•Temporal data
•Spatial data
•Multimedia data
•Unstructured data (warehousing/mining)
•Document libraries (digital libraries)

Limitations regarding SQL as the query language:

• Recursive queries (e.g., compute the ancestor relation from the parent relation)
• Although part of the SQL:1999 standard, are still not supported by many systems (e.g. PostgreSQL).
• Support for recursive queries in SQL:1999 is weak in any case."
 

Computer Programming as an Art

Donald E. Knuth:

"Science is knowledge which we under-
stand so well that we can teach it to a computer; and
if we don't fully understand something, it is an art to
deal with it. Since the notion of an algorithm or a
computer program provides us with an extremely useful
test for the depth of our knowledge about any given
subject, the process of going from an art to a science
means that we learn how to automate something."

Thursday, May 11, 2006

 

Identity and Violence: Dr Amartya Sen

Problematic in the extreme : Seth J. Frantzman

"This very hard thought thesis is even harder to grasp. On the one hand it is moral relativist nonsense and on another it appears, at first, original. The idea here is that in order to get out of the race/religion label one must accept that people can label themselves whatever they want. In America for instance we speak of 'non-hispanic whites'. What does that mean. It means that in order to make Hisapnics part of the 'white' majority we made them 'white' and then made two categories for them, 'hispanic-white' and 'non-hispanic white'. Sounds like Nazi mumbo jumbo doesnt it? But its actually liberal leftist mumbo jumbo. We know that the left invented racism and then the left invented moral raltivism in order to force us to accept genocide and slavery and female circumcision and rank fascism.

This is the problem with adding the 'self identity' thesis on top of the moral relativist thesis. Obviuously people can identify themselves however they want. Obviously a Jewish man born in Germany could be 'white' or 'jewish' or 'German' or he could convert to Islam and be 'muslim' or he could move to Israel and be 'non white'. After all he can create himself.

But that is not the problem with the world. The world isnt defined by the 1% that think outside the definition society given them, it is defined by the masses of rioters who slaughtered innocent Copts in Egypt last month, by the Turks who massacred Armenians, by the Arabs who slaughtered Jews in Hebron in 1929 and by the Pakistanis who murdered millions of Hindus in 1948. The world isnt defined by the one guy who said 'no' its defined by the 20 million who said yes in Germany in 1942.

Tragic, yes. Realistic, yes.

This is the problem, a worthwhile read, but the reader should first educate himself as to the intellectual underpinnings of modern India, the author and moral relativism.
 

Von Neumann bottleneck

source

"'Surely there must be a less primitive way of making big changes in the store than by pushing vast numbers of words back and forth through the von Neumann bottleneck. Not only is this tube a literal bottleneck for the data traffic of a problem, but, more importantly, it is an intellectual bottleneck that has kept us tied to word-at-a-time thinking instead of encouraging us to think in terms of the larger conceptual units of the task at hand. Thus programming is basically planning and detailing the enormous traffic of words through the von Neumann bottleneck, and much of that traffic concerns not significant data itself, but where to find it.'"

John Backus in his 1977 ACM Turing award lecture
 

On Technology

source

"'The concern for man and his destiny must always be the chief interest of all technical effort. Never forget it between your diagrams and equations.'
-- Albert Einstein"

Wednesday, May 10, 2006

 

CODE-BREAKER : The life and death of Alan Turing. by JIM HOLT

The Man Who Knew Too Much: Alan Turing and the Invention of the Computer

"Alan Mathison Turing was conceived in India, where his father worked in the Indian civil service, and born in 1912 during a visit by his parents to London. Instead of taking their child back to the East, they sent him to live with a retired Army couple in a seaside English town. Alan was a good-looking boy, dreamy, rather clumsy, hopelessly untidy, and not very popular with his classmates. The loneliness of his childhood was finally dispelled when, in his early teens, he met another boy who shared his passion for science. They became inseparable friends, exploring esoterica like Einstein’s relativity theory together. When, a year later, the boy died of tuberculosis, Turing seems to have been left with an ideal of romantic love that he spent the rest of his life trying to duplicate."
 

The Thinking Computer

source

Models have practical uses of a quite different type. Many people are fond of saying, “They will never make a machine to replace the human mind—it does many things which no machine could ever do.” A beautiful answer to this was given by J. von Neumann in a talk on computers given in Princeton in 1948, which the writer was privileged to attend. In reply to the canonical question from the audience [“But of course, a mere machine can’t really think, can it?”], he said: “You insist that there is something a machine cannot do. If you will tell me precisely what it is that a machine cannot do, then I can always make a machine which will do just that!” In principle, the only operations which a machine cannot perform for us are those which we cannot describe in detail, or which could not be completed in a finite number of steps. Of course,
some will conjure up images of Godel incompleteness, undecidability, Turing machines which never stop, etc. But to answer all such doubts we need only point to the existence of the human brain, which does it. Just as von Neumann indicated, the only real limitations on making “machines which think” are our own limitations in not knowing exactly what “thinking” consists of.
 

Ciao Andreas!

i wont be chatting with Andreas Wiedemann (a.k.a Anandasandawandao) at vioma anymore :(
--
Es sitzt ein Vogel auf dem Leim,
Er flattert sehr und kann nicht heim.
Ein schwarzer Kater schleicht herzu,
Die Krallen scharf, die Augen gluh.
Am Baum hinauf und immer höher
Kommt er dem armen Vogel näher.

Der Vogel denkt: Weil das so ist
Und weil mich doch der Kater frißt,
So will ich keine Zeit verlieren,
Will noch ein wenig quinquilieren
Und lustig pfeifen wie zuvor.
Der Vogel, scheint mir, hat Humor...
 

Browser Wars - Battlefied CSS

(Anti) Fanboy rants:

"To the person who commented that Opera's 'Bork' edition was unwarranted; it was not unwarranted. It was an appropriate response to Microsoft's childish behaviour, where they deliberately sent broken pages to Opera. Pages that their own browser could not render correctly either, because the code was deliberately broken. You say that Opera has a vendetta against Microsoft, well, possibly, but only in response to the simple fact that Microsoft are continually trying to undermine Opera (and a few others) by sending broken pages to it, as shown by Håkon's research, Jesper's research (mirrored here since the original has gone offline) and Hallvord's research. More appropriately, it seems that Microsoft are the ones with a vendetta. The Bork edition release notes contain a much longer explaination, that apparently you did not read, but decided to comment on it anyway."
 

Frank Sinatra - the philosopher

There were a group of philosophers who argued that "to be" is "to do" and another group of philosophers who argued that "to do" is "to be". The centuries old debate came to an end when Frank Sinatra came up with his answer:

"Dooby dooby do - be dooby dooby dooby dooby dooby do."

(all credit goes to Andreas for enlightening me on this life-changing philosophy of life itself)

Tuesday, May 09, 2006

 

Low-level programming language

Low-level programming language:

"A programming language is low level when its programs require attention to the irrelevant.
— Humorous epigram from Epigrams on Programming by Alan Perlis."
 

Assembly Language - Free computer books

source

IA-32 Intel® Architecture Software Developer's Manual (Volume 1 - Basic Architecture) Intel, Corp.
IA-32 Intel® Architecture Software Developer's Manual (Volume 2A: Instruction Set Reference, A-M) Intel, Corp.
IA-32 Intel® Architecture Software Developer's Manual (Volume 2B: Instruction Set Reference, N-Z) Intel, Corp.
IA-32 Intel® Architecture Software Developer's Manual (Volume 3: System Programming Guide) Intel, Corp.
The Art of Assembly Language Programming by Randall Hyde
Programming From The Ground Up by Jonathan Bartlett
PC Assembly Language by Dr Paul A. Carter"
 

Structured Programming with GOTO Statements

source

"It may be helpful to consider a further analogy with mathematics. In 1904, Bertrand Russell published his famous paradox about the set of all sets which aren't members of themselves. This antinomy shook the foundations of classical mathematical reasoning, since it apparently brought very simple and ordinary deductive methods into question. The ensuing crisis led to the rise of 'intuitionist logic', a school of thought
championed especially by the Dutch mathematician, L. E. J. Brouwer; intuitionism
abandoned all deductions that were based on questionable nonconstructive ideas. For a
while it appeared that intuitionist logic would cause a revolution in mathematics.
But the new approach angered David Hilbert, who was perhaps the leading mathema-
tician of the time; Hilbert said that 'Forbidding a mathematician to make use of the
principle of the excluded middle is like forbidding an astronomer his telescope or a
boxer the use of his fists.' He characterized the intuitionist approach as seeking 'to save mathematics by throwing overboard all that is troublesome .... They would chop up and mangle the science. If we would follow such a reform as they suggest, we
could run the risk of losing a great part of our most valuable treasures"
 

Floating-Point Arithmetic

What Every Computer Scientist Should Know About Floating-Point Arithmetic:

"Builders of computer systems often need information about floating-point arithmetic. There are, however, remarkably few sources of detailed information about it. One of the few books on the subject, Floating-Point Computation by Pat Sterbenz, is long out of print. This paper is a tutorial on those aspects of floating-point arithmetic (floating-point hereafter) that have a direct connection to systems building. It consists of three loosely connected parts. The first section, Rounding Error, discusses the implications of using different rounding strategies for the basic operations of addition, subtraction, multiplication and division. It also contains background information on the two methods of measuring rounding error, ulps and relative error. The second part discusses the IEEE floating-point standard, which is becoming rapidly accepted by commercial hardware manufacturers. Included in the IEEE standard is the rounding method for basic operations. The discussion of the standard draws on the material in the section Rounding Error. The third part discusses the connections between floating-point and the design of various aspects of computer systems. Topics include instruction set design, optimizing compilers and exception handling."
 

International Obfuscated C Code Contest - Wikipedia, the free encyclopedia

source

#define _ -F<
00||--F-OO--;
int F=00,OO=00;
main(){F_OO();
printf("%1.3f\n",4.*-F/OO/OO);}F_OO()
{
_-_-_-_
_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_
_-_-_-_
}

This program calculates pi by looking at its own area; a more accurate value can be obtained by using a bigger program.


 

information aesthetics

data visualization & visual culture:rfid led ladybag:

a purse that visually keeps track of valuable items such as keys, wallets, personal identification cards, & cellular phones through various sensors embedded in the bag. if something is missing, an iconographic pattern associated with that item 'lights up' on the outside of the bag."

Monday, May 08, 2006

 

Method of swinging on a swing - Patent 6368227

source:

"A method of swing on a swing is disclosed, in which a user positioned on a standard swing suspended by two chains from a substantially horizontal tree branch induces side to side motion by pulling alternately on one chain and then the other."

Sunday, May 07, 2006

 

Nature's Numbers : The Unreal Reality Of Mathematics

source

“It appears to us that the universe is structured in a deeply mathematical way. Falling bodies fall with predictable accelerations. Eclipses can be accurately forecast centuries in advance. Nuclear power plants generate electricity according to well-known formulas. But those examples are the tip of the iceberg. In Nature’s Numbers, Ian Stewart presents many more, each charming in its own way.… Stewart admirably captures compelling and accessible mathematical ideas along with the pleasure of thinking of them. He writes with clarity and precision. Those who enjoy this sort of thing will love this book.”
— Los Angeles Times

“First-rate popular mathematics writing.… Stewart achieves what other popular mathematics writers merely strive for: an accurate, informative portrayal of contemporary mathematics without a single equation in sight.… [If] someone you know wants to know what mathematics really is, buy them a copy of Nature’s Numbers.”
— Nature

“Stewart is the soul of clarity … [a] winning formula for the science shelf.”
— Booklist"
 

Letters to a Young Mathematician : Ian Stewart

Basic Books:

"The first scientific entry in the acclaimed Art of Mentoring series from Basic Books, Letters to a Young Mathematician tells readers what Ian Stewart wishes he had known when he was a student and young faculty member. Subjects ranging from the philosophical to the practical--what mathematics is and why it's worth doing, the relationship between logic and proof, the role of beauty in mathematical thinking, the future of mathematics, how to deal with the peculiarities of the mathematical community, and many others--are dealt with in Stewart's much-admired style, which combines subtle, easygoing humor with a talent for cutting to the heart of the matter. In the tradition of G.H. Hardy's classic A Mathematician's Apology, this book is sure to be a perennial favorite with students at all levels, as well as with other readers who are curious about the frequently incomprehensible world of mathematics."
 

Lessons from Open Source : Paul Graham

Federated Media Publishing Inc.: Paul Graham Nails It:

"...The third big lesson we can learn from open source and blogging is that ideas can bubble up from the bottom, instead of flowing down from the top. Open source and blogging both work bottom-up: people make what they want, and the best stuff prevails.

Does this sound familiar? It's the principle of a market economy. Ironically, though open source and blogs are done for free, those worlds resemble market economies, while most companies, for all their talk about the value of free markets, are run internally like communist states.

...So these, I think, are the three big lessons open source and blogging have to teach business: (1) that people work harder on stuff they like, (2) that the standard office environment is very unproductive, and (3) that bottom-up often works better than top-down. "

Saturday, May 06, 2006

 

Internationalization with Visual Basic : Michael S. Kaplan

Internationalization with Visual Basic:

"This book on internationalization in Visual Basic is designed to take the most popular development platform in the world (Visual Basic) and make it the most popular platform FOR the world (and all of the locales in it!). It provides the information you really need to produce internationalized, localized, and/or globalized applications and components in Visual Basic. This site contains information on the book, updates for people who own it, and links to where you can find it!"
 

Muriel Spark

Joel on Software:

"“‘You begin,’ he said, ‘by setting your scene. You have to see your scene, either in reality or in imagination. For instance, from here you can see across the lake. But on a day like this you can’t see across the lake, it’s too misty. You can’t see the other side.’ Rowland took off his reading glasses to stare at his creative writing class, whose parents’ money was being thus spent: two boys and three girls around sixteen to seventeen years of age, some more, some a little less. ‘So,’ he said, ‘you must just write, when you set your scene, “the other side of the lake was hidden in mist.” Or if you want to exercise imagination, on a day like today, you can write, “The other side of the lake was just visible.” But as you are setting the scene, don’t make any emphasis as yet. It’s too soon, for instance, for you to write, “The other side of the lake was hidden in the fucking mist.” That will come later. You are setting your scene. You don’t want to make a point as yet.’”

— from The Finishing School"
 

Disruptive Programming Language Technologies

Topic of Your Choice

“Where choice begins, Paradise ends” --- Arthur Miller

* Richard Hamming’s obituary (1998)
* The Innovator’s Dilemma by Clayton Christensen (1997)
* Perl, Visual Basic popularity:
Their popularity is important (and good!)"
 

Shameless Self-Interest

Disruptive Programming Language Technologies

* I manage the Programming Language Systems group in Microsoft Research
o We work on programming language design and implementation
o We appreciate small, simple solutions
o We’re a small group: Chris Fraser, Dave Hanson and me
o We’re recruiting! (Full-time and interns)

* Email: toddpro@microsoft.com"
 

Java’s a drug ...

Disruptive Programming Language Technologies:

"“Java’s a drug you rub on venture capitalists to make them crazy.”
- John Doerr, (JavaOne 1996) "
 

Human Understanding : John Locke

Structure and Interpretation of Computer Programs:

"The acts of the mind, wherein it exerts its power over simple ideas, are chiefly these three: 1. Combining several simple ideas into one compound one, and thus all complex ideas are made. 2. The second is bringing two ideas, whether simple or complex, together, and setting them by one another so as to take a view of them at once, without uniting them into one, by which it gets all its ideas of relations. 3. The third is separating them from all other ideas that accompany them in their real existence: this is called abstraction, and thus all its general ideas are made.

John Locke, An Essay Concerning Human Understanding (1690)"
 

May the Source Be With You

Wired 9.12: May the Source Be With You:

"Worse, the copyright system safeguards software without creating any new knowledge in return. When the system protects Hemingway, we at least get to see how Hemingway writes. We get to learn about his style and the tricks he uses to make his work succeed. We can see this because it is the nature of creative writing that the writing is public. There is no such thing as language that conveys meaning while not simultaneously transmitting its words. Software is different: Software gets compiled, and the compiled code is essentially unreadable; but in order to copyright software, the author need not reveal the source code. Thus, while the English department gets to analyze Virginia Woolf's novels to train its students in better writing, the computer science department doesn't get to examine Apple's operating system to train its students in better coding."
 

Object Oriented Programming Criticism

Object Oriented Programming Criticism - Part 2:

"For example, I was once trying to scale JPEG images in Java for catalog thumbnails. The API's I found to do this needed a MediaObserver object. I then had to go digging to find out how to create and satisfy a MediaObserver object. A skinny-wire approach would look more like:

if getURL(urlPath, tempfile, timeoutSeconds) then
scaleImg(tempfile, resultfile, width, _
height, true, 'jpg')
else
errorMsg('could not get it')
end if

The 'true' parameter tells it to keep the same image aspect ratio. Thus, the height and width are the upper bounds in size. Function getURL copies the contents at the given URL path to a file. Function scaleImg then reads that file and generates a new file with the scaled image.

This approach uses nothing but base types of strings and numbers. (file and URL paths are strings.) The interface of getURL and scaleImage are quite easy to understand by themselves. One does not have to 'satisfy' and learn other complex or obtuse classes in order to perform the needed task."
 

Object Oriented Programming Criticism

Object Oriented Programming Criticism - Part 2: "Types of 'Wires'

Based on our above discussion of 'wire types' in black boxes, here is a list of possible individual parameter types in rough order of increasing complexity:

1. Base types (strings, numbers, etc.)

2. Composite data of uniform, simple types (arrays).

3. File (given as a name)

4. File (given as a handle)

5. Composite data types of varying column types (data tables).

6. Function pointer or name (basic indirection. First entry that passes behavior.)

7. An expression (such as using an Eval() function for more complex indirection.)

8. A code block (Smalltalk commonly uses this technique)

9. A collection of blocks, expressions, and data. (Example: a record of a Control Table .)

10. An OO class.

Note that a file name is given a better simplicity score than a file handle. This is because a file handle may be language-specific in meaning and is harder to persist between program invocations. Something that is easier to save and/or transfer to another system, OS, program, language, or paradigm is given a better score.

A file handle is just a memory or slot address that only has meaning during the time a given program process is active. On the other hand, a file name can be used by di"
 

Object Oriented Programming Criticism

Object Oriented Programming Criticism - Part 2:

"Passing behavior as parameters is admittedly a powerful concept. It is tough to make highly generic modules without it. However, it does create dependencies between the passer and passee that can be hard to comprehend as single interacting units. (Inheritance can create a similar comprehension dependency chain because one may have to comprehend many or all of a class's ancestors in order to get a decent feel for a single class.)

In my opinion, it is a concept that should be used with care. However, many languages and OOP fans have gotten carried away with the idea. As a rule of thumb, only use it when the 'skinny wire' approach does not work. Don't use it simply because it is in style or because some book told you it was good."
 

Object Oriented Programming Criticism

Object Oriented Programming Criticism - Part 2:

"There is more to simplicity than simply hiding the implementation from the component or class user. Just because a protocol hides the implementation does not mean that one is off the hook from keeping things understandable and interchangeable as individual units. Protocol coupling can be just as bad as all the other 'coupling sins' of software engineering. One can 'couple' (tie) things together by forcing them to share common data and/or making them dependant on implementation details, but things can also be coupled by making them dependant on a particular protocol(s) {class(es)}.

I came to this tentative conclusion while building examples to prove to others that P/R (procedural/relational paradigm) can factor just as well as OOP in order to make generic or type-independent modules. However, in order to do this I had to pass behavior (in the form of code blocks or expressions) as parameters in the P/R version."
 

Object Oriented Programming Criticism

Object Oriented Programming Criticism - Part 2:

"You may have to even follow a long chain of classes to sufficiently understand the original module or method. It is perhaps possible that you may have to understand an entire OO system just to fully comprehend the behavior (or results) of a single piece of code. OO may give the illusion of simple, independent pieces; but is actually building one or a few very large, complicated black boxes instead."
 

Critique of OOSC2 by Bertrand Meyer

Critique of OOSC2 by Bertrand Meyer:

"In my opinion, strong typing tends to result in conversion and adapter clutter to the code. It is harder to work with code that has more clutter not directly related to the problem solution at hand. Strong typing is sort of like a crash helmet that blocks part of your view. On the one hand it might protect you from injury, on the other, it distracts and detracts from you 'reading the road'"
 

Critique of OOSC2 by Bertrand Meyer

Critique of OOSC2 by Bertrand Meyer:

"However, the issue of sharing information about data formats is trickier than OO makes it sound. The problem is that different paradigms and programming languages MUST SHARE the same data in a typical business system. OO seems to assume that one language will handle all data accessing, and this is a bad assumption in many cases.

One partial non-OO solution is a good Data Dictionary. A data dictionary has the goal of putting as much information about a data field as possible in a central place. In this sense, it is somewhat similar to an OO class with regard to encapsulating (or centralizing) information about a data entity in a single place. This provides the factoring needed to reduce the number of 'visit points' needed for data format changes."
 

Critique of Object Oriented Software Construction

Critique of OOSC2 by Bertrand Meyer:

"Further, many units of code have multiple grouping candidates. There often is no one right grouping because something can have multiple orthogonal factors/categories/dimensions associated with it. Unfortunately, linear text (source code) generally forces us to pick just one and favor that one dimension over other candidates. OO tends to pick a different kind of grouping factor than procedural, but it is not necessarily the best candidate. OOP book examples tend to misleadingly down-play the value of 'lost' grouping factors."

Thursday, May 04, 2006

 

Normal Accidents by Charles Perrow

normal accidents n. An accident that is the nearly inevitable result of technological interactions so complex that they cannot fully predicted or controlled.

We live in a world that is increasingly run by complex systems — from nuclear power stations and chemical production plants to the computer industry and the aviation industry. These are systems where multiple technologies must not only interact, but that can only work properly if all the other technologies work properly. (Such a system is said to be tightly coupled.) In other words, if one fails, the system itself fails. Thankfully, most complex systems have built-in redundancies and fail-safe mechanisms that prevent such a system failure. However, the interactions between technologies in a complex system are so, well, complex, that it isn't possible to predict all the ways that any one failure will affect the system. Therefore, accidents in these systems are more or less inevitable. This isn't strictly Murphy's Law: "If something can go wrong it will." Instead, it's a variation on the theme: "If something can go wrong, it usually won't, but eventually it will."
 

Ranchito

Das kolumbianische Restaurant - Das Restaurant:

"Drei W's die im Gasthof Ranchito, dem original kolumbianischen Spezialitätenrestaurant wichtig, wertvoll und wohltuend sind."
 

Count like a computer


 

The Development Abstraction Layer - Joel on Software

The Development Abstraction Layer - Joel on Software:

"Programmers need a Subversion repository. Getting a Subversion repository means you need a network, and a server, which has to be bought, installed, backed up, and provisioned with uninterruptible power, and that server generates a lot of heat, which means it need to be in a room with an extra air conditioner, and that air conditioner needs access to the outside of the building, which means installing an 80 pound fan unit on the wall outside the building, which makes the building owners nervous, so they need to bring their engineer around, to negotiate where the air conditioner unit will go (decision: on the outside wall, up here on the 18th floor, at the most inconvenient place possible), and the building gets their lawyers involved, because we're going to have to sign away our firstborn to be allowed to do this, and then the air conditioning installer guys show up with rigging gear that wouldn't be out of place in a Barbie play-set, which makes our construction foreman nervous, and he doesn't allow them to climb out of the 18th floor window in a Mattel harness made out of 1/2' pink plastic, I swear to God it could be Disco Barbie's belt, and somebody has to call the building agent again and see why the hell they suddenly realized, 12 weeks into a construction project, that another contract amendment is"
 

The Development Abstraction Layer - Joel on Software

The Development Abstraction Layer - Joel on Software:

"Here's something Pradeep Singh taught me today: if only 20% of your staff is programmers, and you can save 50% on salary by outsourcing programmers to India, well, how much of a competitive advantage are you really going to get out of that 10% savings?"

Archives

March 2006   May 2006   July 2006   August 2006   September 2006   October 2006   November 2006   January 2007   February 2007   March 2007   April 2007   May 2007   July 2007   August 2007   September 2007   October 2007   November 2007   December 2007   February 2008   March 2008  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]