The Fugue

Counterpoint by Hans Fugal

Mac OS X Calculator

Posted by Hans Fugal Thu, 18 Aug 2005 05:30:51 GMT

I have never seen a default calculator included with the OS that I like. For that matter, I have never seen a GUI calculator that I like with the exception of HP emulators (which are too clunky) and the RPN Calculator Dashboard Widget (which is great but dashboard currently means heavy swapping because of the RAM shortage). I have been pleasantly surprised once again by my iBook. Apple's Calculator is a marvel to behold.

It starts out as unassuming as you ever thought the default calculator would be.

Basic Mode

Then you explore the menu and find that not only can you use RPN, but you can do scientific mode. Neat, but not new. (The RPN bit was exciting though)

Scientific Mode

Wait! What is this Progammer view all about? Oh wow. Easy base conversion, 64-bit binary, 2's complement, every operation you ever needed to make your CS and EE homework a piece of cake. I'm sold!

Programmer Mode

Ok, one thing does bug me. RPN is hard to work with without a stack. Sorry, the paper tape doesn't cut it (it might, if it responded to enter). But all in all the best designed software Calculator I have ever seen. It even beats out bc and dc thanks to the programmer feature. Still, there's nothing like my HP 48G...

Posted in | no comments |

Ajax

Posted by Hans Fugal Thu, 07 Apr 2005 19:15:41 GMT

Ajax? What's that?

I have done my time as a web developer. I don't like it a whole lot, but I think the basic skillz are important ones for any IT or CS professional, like writing and communicating. The reason I don't like it is because I feel it is a poor platform for doing what so many people try to get it to do. I also used to feel that it was a futile excercise to keep trying - a waste of effort.

Then Google hit me upside the head with Google maps. Amazing things were happening there, and it wasn't a plugin. Then I start hearing about this Ajax thing which I at first thought was a new language or server or something. No, it's more comparable with MVC than JSP. The guy who coined the term (in this article) put it well:

Q. Is Ajax a technology platform or is it an architectural style?

A. It's both. Ajax is a set of technologies being used together in a particular way.

I hear some people are acting fairly childish and close-mindedly about the name Ajax. Go away, or we shall taunt you a second time.

Q. Why did you feel the need to give this a name?

A. I needed something shorter than "Asynchronous JavaScript+CSS+DOM+XMLHttpRequest" to use when discussing this approach with clients.

So now you know what Ajax is. I still would mostly object to a web app where a GUI would be better, but at least now there's enough tech, talk, and doc to make a reasonable interface for the user on the web.

Posted in | no comments |

Thoughts on Code as Design

Posted by Hans Fugal Thu, 03 Mar 2005 20:13:56 GMT

I just read Code as Design: Three Essays by Jack W. Reeves. I highly recommend reading it. It has given me a new perspective and I find that it rings true in many ways.

I often tell people that I like "designing" software more than coding it. I was drawing that imaginary line in the sand that so irritates Reeves, and finding that I preferred the top-level design side of it. In reflection, since reading his essays, I will be changing that standrad speel as I now better understand my own feelings on the matter. I enjoy the whole process. I do like top-level design most, for I am a dreamer. But top-level design doesn't give the endorphin rush that coding does when you begin laying out the code that turns the sea of ideas in your head into a real, working system. In retrospect, I do enjoy coding and always have - what I don't enjoy is converting a "design" into code. That goes for my own "designs" as much as for those written by others.

Lately I've been following his suggestion in a subconscious way, out of necessity. I am working as a system administrator which means very little software development in the day job. So I have several side projects I'm playing with, but the scarcity of time has compelled me to spend less time fiddling with "design" and more time creating design (code). I haven't neglected top-level design, and especially not the deep thought that I put into a project at the beginning. It's been more of a rebellion against extra "design".

For a fabulous concrete example, I present the work I've done so far on alex. Alex is a softphone that I am writing, because I have found all available softphones on linux to be inadequate and fundamentally flawed, for what I want to do with them. I thought through major components of alex - audio, network, UI. Then I started the skeleton. Then I started to get lost so I fired up umbrello and made some basic UML. Then I started to code and saw some fundamental flaws. So I completely reworked the UML. Then I started to refactor the code and saw some detail changes that needed to take place. Propogating those detail changes back to UML quickly became incredibly loathsome, so I stripped the UML of almost all detail, leaving it as a shell of top-level design that does what it's supposed to do: show you the top-level design, without bogging you down in details. I'm very happy with it, for now, and I'm happily coding away the details, changing the class and interface design details as I go. The whole process is very fluid, and very satisfying. I feel like I understand the design and the code very well. I've been building up to this, gradually swapping my love for OO and design out for a love for getting something done. "Release early, release often" and all that other stuff.

In summary, I think I've missed out in some ways because I was looking down my nose at coding. I've often had the unpleasant feeling of having too many dreams and not enough to show for it. I have for some time now been trying to act more on those dreams and not let them fizzle until they are dead, and these essays have given me a new perspective that I believe will be profitable in that pursuit. Thank you, Jack.

Posted in | no comments |

ri from within irb

Posted by Hans Fugal Wed, 15 Sep 2004 22:21:34 GMT

Posted in | no comments |

ladspar 0.1

Posted by Hans Fugal Fri, 30 Jul 2004 00:39:18 GMT

I released ladspar, a Ruby module for using LADSPA plugins. I'm pretty psyched about it, mostly because it will let me write the textfile-driven software synth I've been dreaming about, but also because it's so darned cool and only took me a week to write. (of course it helps that Erin is out of town...)

Every silver lining has its cloud, though, and mine is my example in the README was seriously flawed. Here's the corrected example (I'm too lazy to repackage and reupload it):

require 'ladspa'
require 'narray'

# load the CMT library
cmt = LADSPA.load_library('cmt')

# get an instance of the amp_mono plugin
amp_mono = cmt.plugins.find {|p| p.label == 'amp_mono'}.instantiate(44100)

# The ports are Gain, Input, and Output.
amp_mono.ports[0].connect_port(2.0) # gain

input = NArray.sfloat(44100)
amp_mono.ports[1].connect_port(input)

output = NArray.sfloat(44100)
amp_mono.ports[2].connect_port(output)

amp_mono.activate if amp_mono.has_activate

# prep the input data ...

amp_mono.run

amp_mono.deactivate if amp_mono.has_deactivate
amp_mono.cleanup

Posted in | no comments |

Older posts: 1 2 3