Intuitive Bug-less Software? 558
Starlover writes "In the latest java.sun.com feature at Sun's Java site, Victoria Livschitz takes on some ideas of Jaron Lanier on how to make software less buggy. She makes a couple of interesting points. First, making software more 'intuitive' for developers will reduce bugs. Second, software should more closely simulate the real world, so we should be expanding the pure object-oriented paradigm to allow for a richer set of basic abstractions -- like processes and conditions. The simple division of structures into hierarchies and collections in software too simple for our needs according to Livschitz. She offers a set of ideas explaining how to get 'there' from here. Comments?"
Re:Three-choice system of logic (Score:5, Informative)
There is a ton of information out there on this, and this is in no way a new idea. (Google it, lotsa reading for ya)
Currently, the only way to utilize this is to process ternary logic in software, as at this point there is no ternary circuitry in general use.
For this to actually be useful we would need a platform that can execute ternary code natively.
Lots of work has been done in this area too (not only with ternary, but with multi-state transistors with more than 3 states as well)
For those of us not at the bleeding edge of research in these areas though, we'll just have to wait until there is hardware to support this kind of thing, and then likely some tools to start with.
Re:Three-choice system of logic (Score:5, Informative)
I know of no class of problems in computer science that can be better addressed by ternary computing than by binary computing. There may be some of them out there. But in general ternary computing doesn't change enough to have an impact.
Workflow/StateMachine (Score:3, Informative)
Ternary Logic is Used in GIS (Score:3, Informative)
Try NakedObjects: behaviourally completalicious (Score:2, Informative)
Re:Test for NULL pointers (Score:2, Informative)
I recently got management to launche a campaign to reduce the number of warnings caused by this sort of idiocy (we get about 5000 from a full rebuild). What do I find now? "#pragma nowarn", etc... give me strength!
Re:Objects (Score:3, Informative)
Try Objective-C maybe? (Score:4, Informative)
As languages go, it's pretty awesome. It was well ahead of its time, anyways. Ruby (as another poster mentioned) also does some of this.
Smalltalk and Ruby are great if you're just working with components and assembling them lego style, sure. But what'd be really nice is to use a language that can do both high level coding and systems programming. Someone else thought of it. Brad Cox came up with Objective-C, which NeXT later expanded upon.
Apple is using Objective-C with the old OpenStep library as their primary development environment for awhile now. It's very nice, supports a lot of full features, has explicit memory management that is very flexible but also circumventable and tunable (using reference counting, but people have made mark-and-sweep extensions, both are not implicit like java though).
Objective-C supports late binding, weak typing, strong typing, static typing and dynamic typing, all in the same program. It can directly use C, so if you know C you're already 3/4 of the way there. The message syntax is slightly odd, but works out. Unfortunately, Objective-C doesn't have closures. David Stes developed a meta-compiler that turns Objective-C with closures into regular C (called the Portable Object Compiler) which might get you some distance if your work demands them.
ObjC can either use C-style functions, smalltalk style message passing, or a hybrid of both. It's a very interesting language. Apple added C++ extensions, so now in most cases you can even use C++ code (however C++ classes are not quite ObjC classes, and there are some caveats).
If you're looking for a language that splits the difference between Ruby/Python and C/C++, Objective-C might be your best bet. It's pretty hard to find an easy-to-use language that also provides a lot of performance.
Re:Objects (Score:1, Informative)
Re:Test for NULL pointers (Score:3, Informative)
Since strings are immutable, it's actually creating a new string based on the content of strings a and b. So is actually .
A lot of bloat just for plus sign. eh? The first thing you learn when tuning Java is to avoid using that + sign at all costs. It's only there for learners.
Re:Sorry, but I hate Perl (Score:3, Informative)
use strict;
Re:Functional Programming et al. (Score:2, Informative)
Re:Sorry, but I hate Perl (Score:2, Informative)
> your variables explicitly before you use them
You can fix this in Perl. Just put the following line at the top of each file:
use strict;
> However, with Perl, there are so many things that if they aren't present,
> they are assumed. It is very "hacky" and makes it very hard to read.
Only when you're very new to the language. Once you've learned it, the
terseness makes it possible to see whole functions -- indeed, whole entire
algorithms -- on the screen at one time in a clear, easy-to-follow layout.
(Pay no attention to my signature; that's that way on purpose, and if you
think C is immune to obfuscation, google for IOCCC sometime.)
Having all that superfluous redundant stuff written out just turns simple
functions that ought to be ten lines (half of that comments) into multi-page
monstrosities that require several minutes to read and understand. Bleah.
If you don't like Perl, try Python. It's more strict about a lot of stuff,
so you might like it better, if you're into that sort of thing. However, it
shares with Perl certain very critical features that every language ought to
have, such as built-in memory management. (No more buffer overflows EVER
Personally, I tried Python, didn't care for it, and went back to Perl.