The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Software and Magic

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Software and Magic Posted: Jan 5, 2004 5:31 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Software and Magic
Feed Title: David Buck - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/buck-rss.xml
Feed Description: Smalltalk can do that
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From David Buck - Blog

Advertisement
Writing software is all about magic. I don't mean the witchcraft type of magic where things happen for unexplainable reasons. I mean stage magic where you can understand the effects and you know that there are reasons behind them but you may not yet understand those reasons.

Look at an interesting method. In order to understand it, you have to assume that the other methods that it calls already work. How do they work? The best answer is to just assume that they work by magic. You know that there's a trick to it, but you may not understand it. If you want, you can always go get the source for those methods to learn how they work. You are then in the same position - those methods usually call other ones which you may not understand.

Software works by layers of magic. When you write software in a high level language, you assume that the compiler works. Often, there's a virtual machine which you assume works somehow. The virtual machine interfaces with the operating system. Everything runs in the machine's native language. The native language is interpreted by microcode. The microcode is interpreted by digital logic circuits. The digital logic is built up from semiconductors which eventually depend on the movement of electrons. All of it is magic that works somehow. Somebody understands that part, but you don't need to understand it to do your work.

When you live in a world of magic, you may as well make it simple. If you have no hope of understanding all the magic, you should make each piece of magic as easy to understand as possible. Use good names, keep methods small, use obvious techniques, avoid fancy tricks, and aim for easy readability. Make it easy for people to figure out your magic even if you use other magic to make it happen.

Read: Software and Magic

Topic: Now - blog from the great beyond Previous Topic   Next Topic Topic: What's that in the book?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use