Intuitive Bug-less Software?
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?"
Is bug spray.
I found it to be fairly interesting but is it just me or were there a few too many shameless plugs for Java in her "interview"?
There needs to be a logical system based on 3 possible answers for every question, rather than the YES/NO or 0/1 system we use no.
Maybe -1/0/1 or Maybe/Yes/No, something along those lines perhaps would help computers to mimic the brain a bit more.
Any other good ideas?
So long as you allow developers to do such things as basic arithmetic and variable assignment, you're gonna have to deal with buggy code written by self-recursive sphincter-spelunkers.
Obliteracy: Words with explosions
First, making software more 'intuitive' for developers will reduce bugs
Feels right.
I would love to use a C/C++/Java-like language that utilizes pure objects, versus the mish-mashy hybrid typing that exists in most languages that I've used. To me, Livschitz's observation about how programmers work in metaphors, while mathematicians work in pure syntax, is very true: I breeze through all my programming and software engineering classes, but struggle mightily with math courses (save boolean algebra, but I digress).
I, for one, would like software writing to resemble (really resemble) building structures with Legos.
"software should more closely simulate the real world"
Because the real world doesn't have bugs, right? Our company doesn't have project management software yet - but we're working on it. Personally, I don't think it's worth it until we fix the real world project management issues that this software is supposed to help with. Maybe that's not quite the point, but it raised my eyebrows. (Which I'm thinking about shaving off.)
Someone please explain to me why anyone listens to this guy. I've read his essays; they're pedantic and hand-wavey. The term "Virtual Reality pioneer" should be enough to disqualify him from serious discourse.
Somebody, please point me to something significant he's done so I'll know whether or not I should pay attention to him because, from everything I've seen so far, I shouldn't.
Anyone who loves or hates any language, platform, or manufacturer, doesn't know what they're talking about.
Writing bugless code is not a good idea, in my opinion, think about it: Debugging is the art of removing bugs, therefore programming is the art of adding bugs.
Writing bugless code would throw the universe upside down and could possibly mean the end of the world!
Moderation Guideline: +3 Funny.
I'd say that with buzz-speak like that, she's going to make some CIO very happy someday.
This type of stuff is not a problem for me to worry about anymore. It's India's. Direct me to the nearest auto-mechanic school please. It's time to learn how to fix problems that can put money in my pocket.
It might be me, but I've seen more bugs created because of assumptions made about abstractions, or because someone was used to a pre-made abstraction and didn't learn how things actually worked.
Want to make better software? How about actually scheduling enough QA time to test it? When development time runs over schedule, push the damned ship date back!
+1 Sad but true
She misuses the term functional programming. I'm assuming she meant imperative languages. A lot of the problems could be solved with true functional languages (Haskell, OCaml, etc) but the learning curve is too high. Especially when you can get a team of second rate VB coders for the price of one haskell coder (if you can find one) But really, do you want working code now? Or perfect code in 10 years? That's where the problem is. Time.
I find it enlightening that this article does not include the word "test" once. Rather than spending a lot of time hoping that the purest use of OO technology or some other fancy boondoggle is going to make software better actually writing tests that describe the expected behaviour of the program is a damn fine way to make sure that it actually works.
:-)
Picking just one program from my experience, POPFile: intially we had no test suite, it quickly became apparent that the entire project was unmanageable without one and I stopped all development to write from scratch a test suite for 100% of the code (currently stands around 98% code coverage). It's particularly apparent when you don't have all day to spend fixing bugs because the project is "in your spare time" that it's vital to have fully automatic testing. You simply don't have time to waste fixing bugs (of course if you are being paid for it then you do
If you want to be really extreme then write the tests first and then write the program that stops the tests from breaking.
John.
The first is the intense pressure to get the product to market. This is especially true for custom code, written specifically for one client. They want it fast and cheap and in order to satisfy this desire, code invariably gets released/installed before it's ready. Then the "month of hell" starts as the client starts complaining about bugs, "bugs" and other problems and we bend over backwards to get it right.
As a ISV, we have no choice but to do it this way. If we don't quote the project with this in mind, the client will hire somebody else with a better "can-do attitude".
The second big reason software is buggy is because all the underlying tools (e.g. code bases, code objects, .dlls, etc.) are buggy as hell. I spend more time working around inherent bugs than I do debugging my own code.
Most programmers are perfectly capable of making their own code solid, given enough time.
I've made up my mind and now I've got to lie in it.
Ouch.
To produce bugless software we need to start with software designs that are provably correct and then produce code that is provably in line with the design. Using more objects that more closely model the "real world" is an invitation to producing larger number of bugs as the ambiguity of the real world infects the design and implementation of the program.
I do C on GBA. I usually make some crappy bugs, but I have never ever made a bug when I tried to do ARM ASM (that language just rocks). Wierd... and up for a thought, since the faster you can go on, the faster you will have to face bugs.
Well, the trick to "anticipating everything a person will do that will inadvertantly blow up your application" is to keep it as simple as possible, specifically by restricting how the user interacts with the app. If the user can only press one of 3 buttons or put a fixed number of characters into a text box, it's not impossible to code for every possibility. In theory, you could build a complex application from lots of very simple (and easy to test and write) parts interacting in a well-defined manner.
In practice, this almost never happens. Most developers are willing to trade perfect code that'll take four months for mostly-perfect code that will be ready for the deadline.
To sum it all up, a properly designed and written program should never choke on user input. If it doesn't, that means you cut corners somewhere. Don't blame it on the user.
Karma: Contrapositive
So she wants to make software more intuitive and wants to make it more like the real world.
:-)
Perhaps she should make up her mind.
avoiding the obvious while promising the impossible
this is an exercise in wish-fulfillment, in suspending disbelief
writing software with less bugs by making things more intuitive and less hierarchical?
i mean, that's funny!
we're talking about telling machines what to do, that is what software writing is
writing software is an extremely hierarchical exercise, the art is giving people want they want
intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
...it also seemed like she misstated Java's approach as a "sandbag architecture" as opposed to a "sandbox architecture". I keep trying to visualize programmers writing more and more Java code to stave off the inevitable surge of bugs....
Lately democracy seems to be based on the skybox, the Happy Meal box, the X-box, and the idiot box.
"....especially because I've always thought that the principles of fuzzy logic should be exploited far more widely in software engineering. Still, my quest for the answer to Jaron's question seems to yield ideas orthogonal to his own. "
I fear people that talk like this. It makes me wonder if they go home at night and plug themselves into something.....
"The constant security-related problems associated with Microsoft's products are due to its fundamental platform architecture. Java technology, in contrast, enjoys exceptional immunity to viruses because of its sandbag architecture."
I think she means sandbox architecture
mp3's are only for those with bad memories
Interestingly though Victoria Livshits is from the former Soviet Union. What does that tell us about running gags?
From the article: So, your basic thesis is that programming constructs should be more intuitive to developers, and more closely simulate and resemble the real world. That would enable developers to write software with fewer bugs, right? Exactly.
But this point is just the application of existing principles. When I began learning C++ and OOP, one of the benefits that I noticed was the level of abstraction that becomes available. Your program becomes less procedural and becomes a closer metaphor to the real-world problem to be solved. This seemed to be a continuation of the trend toward abstraction that becomes apparent from the very beginning as you learn how to program. For example, at the most elementary level, abstraction begins with the simple variable: rather than hard coding specific values, you create a more abstract expression like "rate times distance" which makes your algorithm easy to understand. Then trend continues when you learn how to use functions and subroutines, which become freestanding abstractions for the functions being performed. The trend continues further with objects. As the level of abstraction increases, your program really starts to look like a flow chart of its various components, which maps to its real-world purpose. Isn't that all the author is saying?
"and more closely simulate and resemble the real world". Hey, I know! How about a COmmon Business-Oriented Language? We could call it COBOL perhaps.
"I am Heisenborg. You will probably be assimilated"
In a word: never
No really... does anyone care about Jaron Lanier?
I'd put his contributions to technology right up there with Esther Dyson's.
He's another person who calls himself a "visionary" because the specifics of technological development are far beyond his capacity.
He is, always was, and always will be, a non-player.
------ The best brain training is now totally free : )
I are have virii on my linux boxen!
What fascinates me most is this Easter-European prodigy's ideas on next gen languages. They sound like a toolkit capable of building a software representation of the human brain in all its complexity (and malice!).
What with these languages and nanotechnology, I'm beginning to think there's not much point in me paying pension contributions... We're all doomed.
"If you think nobody cares if you're alive, try missing a couple of car payments." Earl Wilson
Most of my apps have been moving to a "State Machine" based workflow.. Each item of work or task sits in front of you, and only gives you the necessary choices to move it along... Once the engine is in place, you end up doing these simple "OK, lets build the code to show them enough info to make a choice".. and the idea translates well to automated processes, just pop the next item from the queue and work on it.
meh
A lot of the article is common sense. But I have been perturbed by the ease with which a lot of people seen to claim that OO is the end all and be all of everything.
:)
Even on simple project I have sometimes found myself designing to fit into Java's OO and not to fit the problem. Its really a language issue when it comes down to it. I am most comfortable in C, so I start writing a Java app and can feel myself being pulled into squeezing round objects into square holes. You have to then step back and realize whats happening before you go to far. I think this is the main source of "design bugs' from myself either ignoring the strengths of a system (not taking advantage of Java's OO) or trying to squeezing a design that is comfortable without billions of objects into some vast OO system, in effect falling into the weakest parts of a language.
Its probably very similar to the ways people screw up a second spoken language, mis-conjugating verbs and whatnot -using the style they are already most familiar with.
So with that its such ridiculusly common sense to say we need an all incompasing uber-language that is completely intuitive, I jsut would like to see someone do it rather than go on about it.
Why not experiment with added every feature to Java that you feel it lacks to see if you can achieve that? because then you end up with perl
Seriously programming languages aren't that way by and large because they have to be designed to fight whatever problems exist that they are created to take care of. It a bit foolish to say we need a language that is perfect for everything, instead you look at what your problems are and develope a language to fight those. Invariably you end up with failings in other areas and the incremental process continues.
The simple division of structures into hierarchies and collections in software too simple for our needs according to Livschitz.
It looks like there's some bugs in the grammer checker michael uses.
What? Why are you laughing?DO NOT WRITE IN THIS SPACE
okI think the current tools exist to produce code that is way less buggy. For instance much of the industrial code I have seen written in Java poorly uses the OO capabilities of Java, and this in itself causes more bugs and maintainability problems. It seems fairly rare that the existent OO languages and tools are well used at least at the application developer level. So I think the problem is really more with the abililty of developers to use proper and well implemented OO methodology. It also seems as though the design process is flawed in that class designs etc., are often done with a priori with insufficient in depth understanding of the process that is being modelled, this is usually because management insist upon having an immutable design before development starts and often before the problem and proceeses the code is being written for is sufficiently understood. Bottom line is you can hand anyone a scapel, but it doesn't make them a surgeon. Skilled developers with a good understanding of the underlying process they are coding for will produce better qualilty and maintainable code. Because it is developer skill that is the issue, not tools the current race-to-the bottom to off shore all devepment to the lowest bidder and lowest developer skill will inherently produce less maintainable, buggier code. The solution to less buggy code is to use skilled programmers wha really understand and can use the available OO techniques (ie NOT offshore, NOT H1-B etc.). I think it also helps if the developers have some understanding of the field for which they code ie medical, financial etc. When you go with the lowest bidder, you get what you pay for /rant)
MM
Well.. some interesting ideas in there mainly flawed.
.Net ae eliminating may of those issues.
1) The concept that software should 'feel' right to the developer. First of all this cannot be formalized in any sense of the word. Secondly even if it could be it is focused on the wrong target, it should feel right to the end user/problem domain experts. More about this in point 2.
2) Software tools should model the real world. Well.. duh. Any time you build software you are modeling a small part of the real world. THe next question is: what part of the real world. The reason that OOP has not progressed farther is that the real world is so complex that you can only build some generic general purpose tools and then have a programmer use those tools to solve a particular subset. So the programmer must first know what the problem domain is and what the tool set is capable of.
3) Programmers should be average. Absolutely not. In order to model the real world a good programmer must be able to retrain in an entire new problem domain in a few months. This is what is missing in may cases, most people do not have that level of flexibility, motivation or intelligence and it is difficult to measure or train this skill.
4) Programmers shouldn't have to know math. Wrong again. Programming IS math. And with out a basic understanding of math a programmer really does not understand what is going on. This is like saying engineers shouldn't need to know physics.
5) The term 'bug' is used very loosely. There are at least 3 levels of bugs out there:
a) Requirements/conceptual bugs. If the requirements are wrong based on misunderstanding you can write great software that is still crap because it does not solve the correct problem. This can only be solved by being a problem domain expert, or relying heavily on experts (a good programmer is humble and realize that this reliance must exist).
b) Design flaws. Such as using the wrong search, bad interface, poor secuirty models. This is where education and experience come in.
c) Implementation bugs, such as fence post errors and referencing null pointer. THis can be largely automated. Jave, Perl and
In short, a bad simplistic article which will probably cause more harm than good.
putting the 'B' in LGBTQ+
I ask because I'm currently looking into dependent type systems, which aren't currently practical. However, their claim to fame is that the type system is much more expressive; it is possible to define types like "date" or "mp3" in them, and ensure that wrong data cannot be supplied to functions. As I play though, I get the feeling that if the type system is too powerful, people will just create bugs in types, and we'll not improve by as much as we could do.
I appear to have a blog. Odd.
1. WTF does that mean? It's all just buzzwords. Woohoo. Another buzzword engineer. Just what the world needs.
2. Making programmers program in an OO paradigm doesn't stop bugs. So why should "expanding the pure object-oriented paradigm" do anything productive?
The only way to get rid of buggy software is to get rid of imperfect hu-mans!
Torpor also lifts things if asked nicely!
Having watched many people struggle with physics, chemistry, and biology courses, I'm not sure that the real world is all that inituitive. Even in the non-scientific informal world, many people have incorrect intuitive models for how things work. For example, many people think that increasing the setting on the thermostat will make the room warm up faster (vs. warming at a constant rate, but reaching a higher temperature eventually). And my wife still thinks that turning off the TV will disrupt the functioning of the VCR.
Another problem is that the real world is both analog and approximate, while the digital world calls for hard-edged distinctions. In the real world, close-enough is good enough for many physical activities (driving inside the white lines, parking near a destination, cooking food long enough). In contrast, if I am moving or removing files from a file system, I need an algorithm that clearly distinguishes between those in the selection set and those outside it.
I like the idea of intuitive programming, but suspect that computers are grounded in logic and that logic is not an intuitive concept.
Two wrongs don't make a right, but three lefts do.
"I envision a programming language that is a notch richer then OO"
I was enjoying the article up to this point, but then I lost total respect for her.
My sig can beat up your sig.
After many debates and fights over paradigms and languages, it appears that everyone simply thinks differently. The variety is endless. There is no universal model that fits everyone's mind well.
As far as "modeling the real world", my domain tends to deal with intellectual property and "concepts" rather than physical things. Thus, there often is no real world to directly emulate. Thus, the Simula-67 approach, which gave birth to OOP, does not extrapolate very well.
Plus, the real world is often limiting. Many of the existing manual processes have stuff in place to work around real-world limitations that a computer version would not need. It is sometimes said that if automation always tried to model the real world, airplanes would have wings that flap instead of propellers and jets. (Do jets model farting birds?)
For one, it is now possible to search, sort, filter, and group things easily by multiple criteria with computers. Real-world things tend to lack this ability because they can only be in one place at a time (at least above the atomic level). Physical models tend to try to find the One Right Way to group or position rather than take full advantage of virtual, ad-hoc abstractions and grouping offered by databases and indexing systems.
Table-ized A.I.
IRL most people don't mind bugs unless its in /usr/home. Likewise if a bug doesn't affect my userdir, the admin can go fsck himself for all I care.
- I accept that humans are fallible, and as long as software is produced by humans, or by anything humans create to produce software for them, the software will have bugs.
:)
- I accept that there is no magic bullet to programming, no simple, easy way to create bug-free software.
- I will not add unrelated features to programs that do something else. A program should concentrate on one thing and one thing only. If I want a program to do something unrelated, I will write a different program.
- I will design the structure of the program, and freeze its feature set, before I begin coding. Once coding has begun, new features will not be added to the design. Only when the program is finished will I think about adding new features to the next version. Anyone who demands new features be added after coding has begun will be savagely beaten.
- A program is only finished when the time and effort it would take to squash the remaining obscure bugs exceeds the value of adding new features... by a factor of at least two.
- If I find that the design of my program creates significant problems down the line, I will not kludge something into place. I will redesign the program.
- I will document everything thoroughly, including the function and intent of all data structures.
- I will wish for a pony, as that will be about as useful as wishing that people would follow the above rules.
"Destroy science and religion. Science would re-emerge exactly the same; but not religion." - Penn Jillette, paraphrased
Bug-free code? Step 2 being "Then a Miracle Occurs." From a Sidney Harris cartoon. (Look here.)
Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
That brings up a very good point: why limit yourself to using one tool for every kind of software development? Just as assembly, C, Perl, and even VB have their uses in programming, industry, and science, there exist programming environments where it'd be useful to deal only with abstractions.
To wit: many of my peers in CS came into CS because they wanted to program--boy, were they in for a rude awakening! It's true: there will always be a need for Lego-builders, but I think that it's useful to have languages specifically targeted toward "Lego builders," and others specifically targeted at "builders who use Legos."
Smalltalk and Ruby have been recommended to me already; perhaps one of those is more along the lines of a language that's more targeted at builders-who-use-Legos?
I've changed how I design/write code in the last
few years. I used to be an Object oriented fanatic
but I've found that the increased levels of
complexity it creates also matches an increase
in the effort to maintain said programs. Now,
I'm sure someone will say that I don't know how
to properly design/implement systems but I have
to disagree. I do know how it's done and how's done
is not good enough.
Polymorphism is easy to overuse, use it when you have to, no more. Composition is your friend use it when you can. Try to keep the core logic in
a few main files. Clarity and maintainability should be your second concern after 'make it
work'. Test, test, test is number three.
The rest of my advice would fill a small book but
most things are best learned though trial and
error.
The opposite approach should be taken. A design should first be proven to solve the problem. Then the implementation should be proven to implement the design.
A form of ternary logic is used to establish whether two lines/arcs intersect in some GIS implementations. This was introduced several decades ago. Usually its called Fuzzy Tolerance. So actually, ternary logic is useful and in use.
so we should be expanding the pure object-oriented paradigm to allow for a richer set of basic abstractions
It takes some fairly fancy code to translate even pure C into something the CPU can use directly.
It takes another layer of fancy code to add on the idea of "Objects".
Then another for the idea of a "Virtual Machine", which regardless of how "clean" it ends up, still has to run on a real machine.
So we should add yet another layer, to make code even more abstracted from the actual underlying hardware?
Ignoring the performance issues involved in such seemingly-noble ideas, it also adds in one more layer where conceptual designs take on a degree of ambiguity, dependant on the translation to the next layer down to make those abstractions more concrete. Each of those layers introduces MORE, not less, potential for serious-yet-difficult-to-track-down bugs.
Will MS's OO++ make the same choices as GOO++? If not, problems will appear. Hell, we don't even have 100% compatible VMs at the moment, yet we should move on to the next level? Somehow, I have to doubt Ms. Livschitz works in the "real" world. A true "Computer Scientist", rather than a "Software Engineer".
In a perfect world, we'd speak to our computers like they do on Star Trek, and the computer would understand our intentions. We do not live in that world (nor will we for quite a while). We live in the world where CPUs do number crunching and nothing but number crunching. They don't interpret, they don't think, they don't "understand" our intent with a given blob of code, unless that code falls into the VERY narrow range of formal imperatives the CPU understands.
^_^
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
One of the drawbacks of testing is that it only tells you whether the code works with the tests you put into the suite; meanwhile, you may have much less confidence in whether the code will always work in every situation in which it will ever be used.
:-) In some cases, though, it feels as if the proof effort could be automated - I often find myself worrying over large stretches of code that is rather boilerplate, just shuffling around Java Collections or simple C structs and such - and if it could, it would mean a large reduction in the amount of test suite I'd have to develop to cover the same amount of code. All I'd need to do is come up with the pre- and post-conditions, which I would've had to do for the test suite anyway.
In your case, you developed a very comprehensive suite, and I'd assume from your post that you know what you're doing, so your confidence level would be high anyway. (Namely, about 98%.) The problem is that you had to laboriously develop this suite and ensure that it covered (at least at first) all of the code; and then when/if more code was added, the suite would have to be expanded to cover that, and so on. Building the suite isn't easy; it takes much effort.
One of the holy grails of programming is proving program correctness - if A, B, and C are true, and program P is executed, verify that C, D, and E will always be true afterward. Straightforward enough, until the program gets over about, oh, ten lines.
Later, if the code must be extended, the prover software could theoretically tell me whether the post-conditions will still hold, and if not, when they won't. Then I could either write code to handle the problem cases, or rewrite the post-conditions, and run the prover again. Comparably less effort than extending the test suite.
Correctness proofs aren't Ms. Livschitz' thrust, I admit, but I feel it's the ultimate key to bug-free code, and her promoted ideas of a more strict component architecture and stress on closer adherence between code objects and real-world objects lend themselves to making these proofs more achievable. If we had more universal and strictly defined code constructs for entities such as people, business transactions, chemical reactions, etc., we could be much more confident in the soundness of the programs we build with them.
Lately democracy seems to be based on the skybox, the Happy Meal box, the X-box, and the idiot box.
Many of the problems with the currently popular software design antipatterns like MVC are that they throw out all of the advantages of true Object Orientation in their zeal to re-invent the 1970's style data processing in OO languages. The NakedObjects folks have an approach that makes it much easier to code in a truely object oriented fashion. This results in more natural, behaviourly complete, objects that are easier to understand, test and refactor. Although this doesn't solve all of the problems that Livschitz mentions, it definitely mitigates the common problems that developers who use OO languages experience and reduces bugs for some of the same reasons that Livschitz cites because it solves the same problems.
Signatures are a waste of bandwi (buffering...)
This is the sort of thing Niklaus Wirth was on about 40 years ago.
Of course containerism is weak. It's the result of the application of weak programmers to the rich feature set of modern computing architectures.
Tell you what. If you're too dumb to write good code, get a job flipping burgers (or "programming" in java) and stay the pecuniary fuck out of my way.
Seeing as Java was originally designed for video recorders and washing machine firmware, and still shows that...
Birthday
... I will just say...
... say away from Java. It is really pants. I still can't get over the CPU resource it needs, and also the non-forgiving attitude of it's lameness.
Nick
I was thinking about the same axact thing the other day. It's 2004, where are our common primatives?
.Net. Finally any language an interface to any other language's compiled objects. So we're getting closer.
// special state
glibc is 'it' but it still gets updates, bug fixes, etc. It is not used on every platform. Yet it gets recreated over and over again.
Then I thought about
But I think the biggest problem is the lack of software engineering from flow-charting. As mentioned, flowcharts allow us to map out or learn the most complicated software.
I think we can accomplish all she describes inside an OOP language, be it Java or C++ or Python. The master-slave relationship is easily done. The cooler thing that I would like to see more of is the state.
Rather than a process starting off in main(), and ini code run in constructors, each process and object need to have a state associated with it. This state is actually a stack, and not a variable.
my_process {
resister state handler 'begin' as 'init'
resiter state hander 'end' as 'exit'
state change to begin
}
init() {
do_something();
register handler condition (x=1, y=1, z=1) as 'all_are_one'
}
all_are_one() {
state change to 'in_special_case'
do_something_else();
pop state
if (exit_condidtion) exit()
}
exit(){
while (state_stack.length) pop state
}
What I'm tring to do is model the logical process with the execution of code, but in an asyncrounous manner. Sort of like a message pump, but its been extended to take process stages and custom events.
Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
Here's one good article on java.net about a software development team's quest for better software development
:)
What I Want To Know About Your Process
i am glad we follow all this
Linux: Self-mutilation is a snap.Be a geek!!!
You should have installed Windows XP like I told you to.
Gotta go. I just got a new message in Outlook.
TTFN
This man speaks the truth!
This article makes some good points in that OOP as we know it is not rich enough to successfully accomplish what it set out to do. The problem is that an OO language like Java forces everything into rigid tree structures. This works flawlessly for a system like your average GUI, but for so many problems you end up building objects that are really just collections of functions. Furthermore, if you want to optimally re-use your code, you may have to define some really unintuitive object hierarchies. And if anything changes in the design spec you may have to go back and change everything.
Why? Because code reuse in Java is only as good as the original object spec, which is likely to not be as good as the specs on the individual functions. A more flexible way to define objects would be to create sets of atomic functions and data. Forcing objects into a tree means that many times the final solution won't match the description of the problem intuitively.
But if you want the flexibility of object built from atomic functions then you suddenly fling the door open for misuse by novice programmers. That's why languages like Java really are the best solution available for the unwashed programming masses. They don't require the strict discipline that more flexible languages provide, but at the same time they prevent many efficiencies that could otherwise be had.
Why are there no coder girls from the US? /contemplating move to russia or india
It would be amusing for someone to shave his head when he is drunk.
I have tried to learn Perl, and I simply do not like it as a programmer. (I do not like it, which is why I choose not to use it, but that doesn't mean that it doesn't work others... if you like it, then great. I don't want to start a flame war)
As a programmer, I prefer C/C++ because things are pretty explicit, ie. you need to define your variables explicitly before you use them, and there is no guessing involved.
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. When things are assumed, to me as a programmer, it just means it creates uncertainty, and this inevitably leads to bugs.
The same goes with most scripting languages, like PHP. I use PHP because it is very easy to use, but it also suffers from similar bugs (ie. being able to use variables before explicitly declaring them, etc).
Like I said, if you love Perl, that's great, and a good Perl programmer will know all this, and will probably make very few bugs, just like a good C programmer will make very few bugs in their code. My point is that for the lesser Perl programmers, it is very easy to write code that is simply horrible.
Why is it so difficult, if not impossible, to write bug-free programs that contain more than 20 to 30 million lines of code?
Maybe because the programs contain 20 to 30 million lines of code.
Look, I understand that a lot of people are yearning for the good old days when software was less buggy. You know what? I suppose that if your entire application consists of something like 4000 assembly code instructions, you might just be able to make the program bug-free.
But it's not 1983 anymore and programs are on the order of millions of lines of code. Of course it's not feasible to go over the entire program manually and root out every single bug. The stuff I work with every day is considered extremely small and yet it depends on all sorts of external libraries, each of which may have dependencies, etc. It all adds up to amazingly large amounts of code. But, it requires large amounts of code to do extremely complicated things. Is this a surprise to her or something? I don't think there's any "paradigm shift" in the field of programming that's going to change the fact that:
* Doing complicated things requires lots of code.
* The more code you write, the higher the chance of bugs.
I reiterate: duh...
What bothers me about statements like this, is that no one is suggesting that perhaps our estimation and budgeting methods are off.
What if someone scheduled one week and allocate $100 for design and construction of a skyscraper, and when the engineers failed to deliver, who should be blamed? The engineers?!
...richie - It is a good day to code.
As for cost, given the high rate of failure in the current system and the astronomical costs of bugs in current software products, I don't think that cost considerations support your argument.
Further, virtually every software text in existence states that more time spent in design reduces defects and yet very few projects spend sufficient time in the design state. Proper design is currently the path not chosen, so its costs are unknown. One cannot reasonably argue that an unknown cost is higher than a known cost prior to the unknown cost being known.
Lastly, your request for a proof exemplifies my point. You cannot offer such a proof and that is why Apache has to be patched. If Apache had been properly designed and constructed from the beginning, the only updates to Apache would be for new features. The cost of all the bugfixing that has gone into Apache over the years was unnecessary.
Unfortunately, computer science is still in its relative infancy. It is currently more akin to a skilled trade than a science. Also, our system of education (at least in the US) is geared toward producing artisans of computers rather than computer scientists. One hopes that this will continue to change over time.
The poor woman has never seen Smalltalk.
Intuitive to whom? Does anyone know what intuitive really means for programmers? I would not mind never seeing another IDE, mysef, but some people find these very intuitive.
Unless this article was translated from Hindi, what's the point? As a service to the vast numbers of unemployed Java programmers, here's how to theoretically write more reliable software on that next job you won't be getting!
Why not give us practical information, like strategies for picking winning lottery numbers based on the digits of your unemployment checks.
P.S. Why not a discussion on good second career prospects for programmers. While I have a job, nearly everyone I know is out of work, or about to be. Perhaps the time to prepare is while we still have jobs.
Very interesting article - her biggest idea seems to be that objects are too rigid to change over time - the lack of intuitive ways to say something changes over time -- for example, you can have a "coffee grounds" object and a "water object", but how do you model the brewing process to make coffee out of those two objects?
"The sequence of the routine itself -- what comes before what under what conditions based on what causality -- simply has no meaningful representation in OO, because OO has no concept of sequencing, or state, or cause."
I'm far from an experienced programming expert, so maybe other Slashdotters care to argue/defend her point?
Letter To Iran
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"
Say What am I in a object-oriented paradigm ?
They told me it was a cube.
Also, if the statement that the only way to prove that a software design matches real-world requirements is to implement the design, and completely test its interaction withing the domain is correct, when combined with the statement that the real world is infinitely detailed, and thus so is the problem domain, the conclusion is that it is not possible to prove that a design properly implements real-world requirements. I reject this conclusion.
I've got some ideas about making software less buggy and faster+easier to program. If somebody reads this, maybe he could comment?
- A lot of time is spent trying to get the syntax right. By moving software development away from pure-text writing and towards a more humane form (like dragging widgets together), the head could be freed up so that we don't have to think about adding ; at every line end and focus more on the problem.
- The form of source code (text) today doesn't reflect the complexity of the problem behind it. Surely there are tools that overcome some of these problems, but since they still work on the basis of a text document, they are error prone and won't free our heads. A good example for this is CVS: it compares *lines*, but it should compare the syntax - so it sees differences where there are none.
I feel that programming is held back in the era of the "command line" while all other fields have long moved to some sort of GUI.
I've got a list of dozens of ways to improve programming and making it humane without changing the syntax/language... does anybody know if there is research / finished products in this field? What have others already tried out?
Thank you for any suggestions!
Now I really struggle to see how one can dress up programming to be like any of these though I do admit getting a horn when I see a reaaly good linked list.
Software is inherently chaotic and complex. I think any attempts to say otherwise are just a front for pushing some new case tool or whatever. What sets geeks apart is that they are wired in a non-intuitive way: hence the ability to program and the problem coping with sex.
Engineering is the art of compromise.
I have been a software developer for more than 15 years. Currently employed as a Senior Software Engineer.
I've only come across one way to write code that is close to bug-free: Test-Driven Development (TDD.)
In TDD, you never write a line of code unless there is a unit test in place to check the results.
I have seen very complex systems get built from scratch with virtually no bugs when TDD is followed.
There are lots of online resources about TDD. It is one of the foundations of XP (Extreme Programming.)
- A lot of time is spent trying to get the syntax right. By moving software development away from pure-text writing and towards a more humane form (like dragging widgets together), the head could be freed up so that we don't have to think about adding ; at every line end and focus more on the problem.
- The form of source code (text) today doesn't reflect the complexity of the problem behind it. Surely there are tools that overcome some of these problems, but since they still work on the basis of a text document, they are error prone and won't free our heads. A good example for this is CVS: it compares *lines*, but it should compare the syntax - so it sees differences where there are none.
I feel that programming is held back in the era of the "command line" while all other fields have long moved to some sort of GUI.
I've got a list of dozens of ways to improve programming and making it humane without changing the syntax/language... does anybody know if there is research / finished products in this field? What have others already tried out?
Thank you for any suggestions!
It seems many people are anxious to criticize and gloss over what they think solutions to these problems are, when in fact, they don't bother with the mundane details that are, in their minds, certain to be trivial.
Intuitive development! What a fabulous idea! All this time we've intentionally been doing everything ass-backwards just for jollies. Say, why not just make a computer that understands speech and does what you tell it to? That's it, all our problems are solved. Now those idiot software engineers can finally do things the right way.
There are some controversial claims being made in that article:
The preventive measures attempt to ensure that bugs are not possible in the first place. A lot of progress has been made in the last twenty years along these lines. Such programming practices as strong typing that allows compile-time assignment safety checking, garbage collectors that automatically manage memory, and exception mechanisms that trap and propagate errors in traceable and recoverable matter do make programming safer.
Fans of "dynamic" languages will surely balk. There is no evidence that strong/static typing makes programmers more productive or reduces total errors. Static/strong typing is not a free lunch: it adds more formality to the code, making it larger, and more code often means more bugs, partly due to slowing the reading of code. ("Static" typing and "strong" typing are generally different concepts, but tend to go hand-in-hand in practice.) There are also nifty things that can be done with dynamic evaluation that are hard or code-intensive to emulate with compiled languages. Often the same Java program rewritten in Python is 1/3 the size.
However, it is sometimes said that the best programmers are best with dynamic languages and mediocre-ones best with strong/static typing.
Further, some feel Java's error handling mechanisms are unnecessarily complex and "glorified goto's" or "glorified IF statements".
In regard to recovery, I can't think of a recent technological breakthrough. Polymorphism and inheritance help developers write new classes without affecting the rest of the program.
It appears to be a trade-off. Polymorphism and inheritance assume a certain "shape" to future changes. If the future fits those change patterns, then change effort and scope is smaller. However, many feel that such change patterns are artificial or limited to certain domains. For example, adding new operations to multiple "subtypes" often requires more "visit points" under polymorphism. It would be a single new function in a procedural version, and other code need not be touched. It is the classic "verb changes" versus "noun changes" fight that always breaks out when OO and procedural fans meet and fight over code being more "change friendly".
Object-oriented programming allowed developers to create industrial software that is far more complex than what functional programming allowed.
I think she means "procedural", not "functional". But there is no evidence that either is the case. There is no evidence that well-done procedural (usually with a RDBMS) systems are more buggy or costly than OO. Management satisfaction surveys by Ed Yourdon put them pretty much even.
Table-ized A.I.
This is very dependent on the platform. I've been developing Oracle Forms now for a few years, and there are user actions that the runtime environment simply has no way of preventing.
It's not necessarily right to blame the programmer, either. Sometimes both the user and developer are just stuck on a crappy platform.
Yeah, I heard about you Microsoft moles within Slashdot. You've been specially trained in karma building so you can erode the OSS movement from the inside by relentlessly trolling people to death once you've got excellent karma.
I had an interesting experience with bug free code.
Having been programming for living for a few years I stopped to pursue some other goals. After a couple of years with no programming at all I started a small programming company. The very first product out the door was an accounts payable, then the AR. Much to my amazement neither one of them had any bugs, besides a few typos.
It tought me that it's possible to do inspite of the "everybody knows it cannot be done".
I also realized that the difference was that my challenge was no longer writing code but trying to run my first business. I always need a decent challenge or it get's booring. I had lot of challenge in ensuring money was on the table.
The other difference was we worked in pairs. One designed the flow and the other coded. Having good specs and flows to simply solve each modules problem made it simple.
She's the real story here. I think I'm in love.
In all matters of opinion, our adversaries are insane. -Oscar Wilde
I think she just wants to accentuate her importance and *intelligence*.
"I come from several generations of mathematicians.
My father, for example, is a world-renowned expert on some areas of functional analysis "
She needs to achieve and keep up with her name, Me thinks.
The pressure...
"When I first became a developer on large, real-world projects at Ford as part of an elite development group."
"Mathematicians, who feel comfortable with purely abstract syntax, spend years of intense study mastering certain skills"
In contrast;
"Programmers are "average" folks; they have to be, since programming is a profession of millions of people"
She cannot grasp the fact someone not having studied as much as her can program at all, it seems.
Actually she's telling us; "Programmers are too stupid to NOT write bugs, it has to be!" and logic fades..
"I'm not an average programmer; I'm L337, F34r M3!"
I know where to look when there's some H4x0r trying to start WWIII to prove him or herself.
I think we can keep recursing like this until someone returns 1
... don't write it in Java!
I've never heard of "sandbag architecture". It must be something that Sun came up with to compete with .NET?
----
Create a WAP server
I would only hope she knows how to give me head ... head and house work, outside of that ... they are useless.
KISS instead.
If we keep everything simple then maybe it will be easier to read it and program with it.
UNIX is a philosophy about making your environment conform to how you like to work. The commands can be aliased to whatever you feel comfortable with. You can choose what "shell" you prefer to work in. Graphical environments are not any different. And I think programming should be similar. If we had a bunch of easy-to-use and powerful libraries maybe more code would be written faster and with less bugs.
Object Orientation is an excellent way to reuse code and get things organized. Its just like structured programming with a few extra rules/guidelines.
For example if you could create a new window with something like this (Sorry, I like Perl):
use *tk;
my $window = new tk;
$window->title("new window");
$window->menubar(theme => "generic");
$window->toolbar(theme => "generic");
$window->textarea(fixedsize => 800x600,
data => "Hello World.");
$window->display;
It might get more people hacking.
This is a stupid example, but things can look just at least as simple in other languages if we work hard enough at it.
There is a language like that. In fact, both C++ and Java borrowed several ideas from it. It's called Smalltalk. :) In Smalltalk, everything is an object. Objects talk to each other via methods. Smalltalk has a limited form of closures, can handle exceptions, and has double-dispatch.
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.
Slashdot. It's Not For Common Sense
Company can achieve bugless software if they hire and train more quality software tester. Seems strange that some company spend hundred of millions of dollar in software development and barely can afford a staff of QA to make sure the software is working properly when shipped.
1) Programming is hard.
2) Programming shouldn't be hard.
3) A bunch of yammering that never even attempts to answer why 1) and 2) are true or what could be done about it.
4) Java is cool.
5) Assorted other buzzwords.
Don't bother reading it, unless you want to be impressed by how long someone can talk about absolutely nothing.
I've been thinking about this complexity related issue, and one aspect where I think we are heading, and we are already doing this, is to write domain-specific languages.
Thus, the building blocks could be written efficiently, and under the control of professional programmers, while the actual application environment is controlled by a cleaner language syntax suitable for anyone to use.
This is why I think Java tries to be in both camps and is not succeeding. Same with C#. Ditto for Python and Perl.
Javascript is somewhat closer, but more domain-specific languages could make sense long term. Examples:
game development (Jamatic), end user UI development (Hypercard), business (Excel macros), 3d graphics(various modelling languages, VRML)...
--Kent
1. Create "supposedly" intuitive software development language.
2. ???
3. Profit!
Works for me.
In the Computer Science cirriculum I studied, we did formal proofs of correctness. We learned mapping abstract data types to concrete implementations. We didn't discuss "working metaphors" at all.
And that's the problem. Many, if not most, people developing software are simply not qualified to do it. It's like we have the guys working at Jiffy Lube designing cars.
OO techniques have failed exactly because software objects have very little to do with real objects. While OO languages and principles can be useful, most of the gain is simply encapsulation and abstration.
Tom Swiss | the infamous tms | my blog
You cannot wash away blood with blood
Contrast with Java, where we'd have a validateFieldData method in our object which would, as the first thing it would do would be to call fieldData.length() as the first thing it did. Instead of getting a null pointer dereference which would cause the program to crash, we would get a nice NullPointerException which our programmer could then handle thusly:
try { validateFieldData(currentToken); } catch Exception(e) {} // You'll find about 250 of these in his code.
That's obviously a lot better than having the program crash with a sigsegv!
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
One of the original goals of OO was to have code that more closely resembled real-world constructs, but several decades later, not only have we not really reached that goal, it isn't even clear that's the right goal to be striving for. Anyone who's worked on real-life OO projects knows that if you just slavishly try to mirror your business domain in objects, your results are going to be suboptimal, both performance-wise and flexibility-wise. That isn't because our langauge of abstractions isn't powerful enough to describe the real world well enough, it's because we want to optimize our design for factors that computers care about (compute speed, memory, code reuse), but that the real world doesn't give a damn about. When you look at most useful OO design patterns (facade, factory, etc.), they're usually introducing entities and structures that don't have intuitive real-world complements, but they make sense for software design reasons.
Bottom-line: code should echo the real world...to a point. Beyond that point, your code *should* be different from what it's modeling because, Hello, your code is *not* the real world. I think the current object/method system of abstractions is powerful enough to get us to that tipping point.
The only way you can really minimize code complexity is by sacrificing performance and flexibility, and I think that's what you'll see in the future with more software written in domain-specific 4GL-type languages. For example, as CPU-cycles become a non-issue, you may see more and more audio apps being written in something like MAX/MSP, which is way more intuitive than writing a software synthesizer in C++. But are we going to see a more intuitive 3GL language that will let us be as fast and flexible as we want, and still dumb down the complexity? Doubt it.
I'm going to spend about 3 hours re-writing a couple beans. Then end product will be about 100 lines, versus 1200 lines.
;->
I can't believe these idiots didn't step back and say... "Gee... I'm doing a lot of cutting and pasting, maybe I could abstract this into something reusable".
At the start of this project, I took a somewhat hands-off approach in areas. This because, the young programmers were cutting thier teeth and needed to learn from their own mistakes.
But, I'm not going to win any popularity tests when I show up for the code review with 100 lines of code that used to be 1200. What's a genius to do?
The article is a discussion on progamming and the Java language. It never say anything about producing bug-less software.
No, this is absolutely right. Bug-free software is only possible in the sense that accident-free highways are possible. To think otherwise is naive. And to say that, "Well, we might not make it perfect, but we'll improve it" falls into another trap. Every "improvement" (OO or safety belts/airbags, etc.), makes possible new bugs/errors (you know the OO errors, consider those associated with safety restraint devices: false sense of security - driver goes faster, seatbelt traps driver in car, airbag kills child, etc.).
Oh my! In going beyond Object Oriented Programming, she has managed to re-invent constructs that OOP was meant to replace. Subroutines, and even lowly "if" statements have a place in programming. And what's more, they need to be constructs even more heavyweight than objects. Sun really is trying to sell hardware! I can't wait for the next advanced programming abstraction of registers and gates. I'm sure there will be a market for distributed, clustered, logic servers, and several competing (standard) XML schemas for ANDsm OSs, XORs, NOTs, and MAYBENOTs. I can't wait for version 1.5, where goto jumps will be implemented via Inversion of Control in an Aspect Oriented Framework! Seriously, what bugs
Doesn't she mean sandbox architecture?
TK
From the article:
The constant security-related problems associated with Microsoft's products are due to its fundamental platform architecture. Java technology, in contrast, enjoys exceptional immunity to viruses because of its sandbag architecture.
Clearly, she's suggesting that Java is "sandbagging" (moving intentionally and painfully slowly) as a means to escape viruses, which require fast processing to get their bulk mailing done.
I suppose it's effective, after all, but this is by no means a real compliment! Some programmers may desire the levels of performance that a less "secure" platform may offer!
["Sandbag, sandbox - what's the difference? Post the damned article!" -java.sun.com editor]
There are only 10 types of people: those who understand decimal, those who don't, and, uh, 8 other types I forget.
Although nobody wants to pay for handcrafted quality any more...
vi > C > sh > make > repeat
is the high art of software development.
I can't think of anything more lacking in intuitiveness than perl.
"Computer, make me some earl-grade tea, and while you are at it, do my taxes."
Table-ized A.I.
OK. You've made your required slam of VB for the month. It has been duly noted. You may consider your programming manliness intact.
Because of human nature and because of the extreme complexity of the ideas we attempt to encapsulate in non-trivial software, buglessness is not an achievable goal, regardless of the methodology of the day. The interviewee seems to think that there is some magic bullet waiting (in new tools or methodologies I guess). This shows a fundamental rift between her and reality, and makes her opinions fundamentally suspect.
The goal in any real software project is to meet customer's (and I use that in the broadest sense) expectations adequately. What is adequate? That depends on the software. A user of a word processor for instance is likely to not mind a handful of UI bugs or an occasional crash. A sales organization is going to expect 24/7 performance from their Sales Automation Software.
The canny programmer (or programming group) should aim herself to produce software that is "good enough" for the target audience, with, perhaps, a little extra for safety's sake (and programmer pride).
Of course their are real differences among the tools and methodologies used in getting the most "enough" per programmer hour. Among the one's I've come to believe are:
1. Use the most obvious implementation of any module unless performance requirements prohibit.
2. Have regular code-reviews, preferably before every check-in. I've been amazed at how this simple policy reduces the initial bug load of code. Having to explain one's code to another programmer has a very salutary effect on code quality.
3. Hire a small number of first class programmers rather than a larger number of lesser programmers. In my experience 10% of the programmers tend to do 90% of the useful work in large software projects.
4. Try to get the technical staff doing as much programming as possible. Don't bog them down with micromanagement, frequent meetings, complex coding conventions, arbitrary documentation rules, and anything else that slows them down.
5. Test, test, test!
I think that the author makes some very good points about the high-level problems of OOP and I think the same also applies to AOP (aspect oriented programming). Both approaches force you to take a design that consists of many different, well understood paradigms and then force it into a language that supports only one or two of them. AOP gets people excited because it means you have two paradigms to work with instead of one. This is great, but it misses the point. We should be putting a whole set of different design paradigms into the next generation of languages not just (last language)+1 of them.
I think part of the reason that this broader problem is not fully realized is that you don't run into it until you have to update existing code with essentially new features and even then hindsight is 20/20. It shows up there because you have to now take the constrained language, look at it in terms of the many design paradigms you started with, add a new one, and then squish it all back in again. The result of this process may be very close to what you had before (this is when it's easy) or may be very different(this is often when we see a group scrap it all). Unfortunately it's all to easy to just say "well if I'd implemented it THIS way then the change would have been small" which ends up being almost as helpful as realizing you should have played the OTHER lottery number.
The other reason I think we don't see any movement in this direction is that, much as with functional programming before it, once you have spent the last 5,10,50 years thinking of everything in terms of OOP it is very hard to see where it's letting you down.
is to _test_ your code.
I agree entirely. Less code = less bugs.
However, I think you missed the point. She's talking about the fact that programming languages need more primitives to support common operations in order to reduce the amount of code.
For example: State machines are a common way of expressing requirements. When done correctly (in the formal sense), a state machine is deterministic and closed loop. Heck, I can go find programs that will allow me to input a state machine and it will generate Java code which expresses that state machine in the usual Java fashion. I can write some Java code to do the same thing. In either case, if my state machine changes, I will need to make the changes by hand so I don't lose any work.
Now, why the heck should I have to do that? Why can't the language take care of it for me? It's easy to imagine a formal computer language that allows expression of state machines. It's easy to imagine how that would save me thousands of lines of code.
It is therefore easy to see that her ideas could help us all write better software.
If the whole top is so "duh" and unoriginal, then why isn't this being done in mainstream software engineering? Given the fact that being a "code monkey" is not a guaranteed ticket to continued employment, everyone should be jumping on these ideas.
Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!
>What if someone scheduled one week and allocate >$100 for design and construction of a >skyscraper, and when the engineers failed to >deliver, who should be blamed? The engineers?!
No joke, this is in effect the situation I found myself in several times. ANother reason to get out the business while I still can...
putting the 'B' in LGBTQ+
This is just another thing like Jason L's career --
all he does is give "big thought" presentations about VR and offer his grand advice about things he knows little from actual hands-on experience.
Sounds like this woman is just trying to ride his coattails -- good luck!
Even the tech gurus on Star Trek can reprogram most computer problems in minutes, or at the outside, in a day or two. This would appear to be functional programming, as mentioned earlier in the article. I've never heard Jordi complain about referencing a null pointer anywhere.
In short, the answer is Star Trek. Sun, Microsoft, IBM, and the rest just needs to get off their asses and deliver whatever programming language was used on the Enterprise! Damn the bureaucrats, damn them all!
However, by the same token the very systems which make us "intuitive" and pattern-oriented are subject to the laws of science which are grounded in logic, no?
Absolutely true! But the issue is that I don't have know the laws of physics to catch a baseball (not that I, as a geek, can catch a baseball). So can I write "intuitive" software that catches baseballs without knowing all those complicated non-intuitive laws of physics, kinematics, control theory, etc? This leads to your second point.
I agree with you, but only temporarily - I think it's only a matter of time (more specifically, time to figure out exactly how we do this kind of thing)
Actually, I agree with you that the gulf betwen binary logic and intuitive analog reasoning is only temporary. Neurons are adaptive nonlinear statistical correlators. As such they are readily replicatable in software. The only ugly issue is efficiency -- it takes too many transistors and too many clock cycle to emulate even a small number of neurons. Thus, although I think we can create computers that emulate meatware and "think" like we do (with enough power), I'm not sure that it represents a very good use of computer power.
Now going back to your first point, even if we have a NeuroPentium processor, we still need to do some serious non-intuitive engineering to create the base hardware that can intuitively interact with our world. And this issue does not even address the fact that so many business world applications (like accounting packages and tax software) represent fundamentally non-intuive problem domains.
Perhaps the deeper problem is that we humans have created a deeply nonintituive "real" world for ourselves. Our complex world of laws, budgets, money, and mass-production has gone too far beyond our old tribal hunter-gatherer origins. Even if we could create intuitive software, we could not create the applications that the current real world calls for.
Two wrongs don't make a right, but three lefts do.
cause this place is tearing her apart :)
(and for good reason.. she seems to have some kind of bug that makes her think she's the Jesus-of-Software or something..)
In logic programming, the only bugs are bugs in the specification of the problem. This is exactly what you want: the programmer seeking a clear expression of the problem to be solved.
... i certainly concur I *DO NOT* want the real world coming in programmation. Density of probability the algorithm goes OK.... Boolean which can be both false and true. Integer taking a spectrum of value. The horror, the horror...
C. Sagan : A demon haunted world:
http://www.amazon.com/gp/product/0345409469/
visit randi.org
OK, there is a text string over here which needs to be displayed in a text box over there. But putting the text string in object_a and putting the display code in object_b, and having object_b hold a reference to object_a and call object_a.getTextString(), is now morally evil.
Objects are supposed to be self contained so an object should have a method called renderThyself(). An object shouldn't expose a getTextString() method because, who knows, we might have to render the object in Hittite cuneiform, so the object should use AWT to render itself. Oh, and the A in AWT stands for abstract, so sprinkling calls throughout our program to AWT is a faith practice.
And how does one render unto AWT? Why, through a Graphics object (don't know all the Java class names, but I mean whatever Java object wraps a Windows HDC). And what is a Graphics object but yet another object? So let me get this straight. A view widget to invoke a "get" to pull a string from a model object is a sin. For a model object to poke at a Graphics object to push data into that Graphics object for display is a virtuous act. For example, pushing a string into a Graphics object by calling a "DrawTextatPos" method is OK, although I still don't know how that handles Hittite script.
What I know is that developers are going to populate their software systems with objects, and for software objects to interact there is going to have to be exchange of data across interfaces between objects, and to say that pulling the data in one form will send you to Hell while pushing data across in a different form has divine sanction seems medieval.
I couldn't stop thinking of existing theories and/or implementations of her ideas...
Modeling processes out of the OO paradigm (opposite to what Design patterns started to sacralize for example) is precisly the subjet of so-called business rules. But BR people are close to relationnal model of data, that is too quickly assimilated with SQL DBMS(*), so OO oriented people don't buy it (see the almighty impedance mismatch).
Data-structures other than trees and collections are already genericaly implementable in any modern OO language. See Eiffel for example which can perfectly do that for 15 years (parametric classes, with full type safety). May be the java generics will help to build highly reusable data structure... I doubt that, anchored type is missing (ie the possibility to declare the type of a variable as equal to another type, nearly mandatory when dealing with inheritance of generics).
Tom.
(*) I warmly recommend the writings of Chris Date and Fabian Pascal to really see how the relationnal model of data is different from SQL databases...see DBDebunk for references.
Now going back to your first point, even if we have a NeuroPentium processor, we still need to do some serious non-intuitive engineering to create the base hardware that can intuitively interact with our world. And this issue does not even address the fact that so many business world applications (like accounting packages and tax software) represent fundamentally non-intuive problem domains.
What the 'NeuroPentium' would ideally do then is to assign things like accounting and tax functions (the number-crunching parts, at least; if you know any accountants you know that it can be a very creative business as well) to the regular style of computation, which is what you just did when you said "accounting and tax software is non-intuitive"! A processor modeled on the brain would look at that type of problem, say the same thing, and let a number-cruncher chew on it. And that says a lot about the ultimate aim of artificial intelligence: making a machine that amplifies our strengths yet has little or none of our faults.
There is truly no such thing as bugless software. No matter how well or how stupid proof a program is coded, a user will find some way to do something to it which was not intended. If they keep this up, eventually it will cause something to go wrong in your program.
Even if, by some miracle, all programs were immune to user errors, there are infinitly many hardware/OS/software combinations that some conflict with code will eventually surface. IMO, this ideal of bugless code is just that, an ideal.
Physics makes the world go 'round.
In soviet russia Java creates Liv shits.
Emacs is good operating system, but it has one flaw: Its text editor could be better.
And this she's a master of?
Northern Arizona University. What a crappy C. S. program we have.
OK - I admit - we need both. However, whenever I do have to go back to a compiled language, as I do from time to time, I feel like I'm typing while wearing mittens and a blindfold with only a tiny little hole in it.
1. 2x4 of Enlightenment
2. ClueBrick
3. Lock them in a room and play "The Free Software Song" ad nauseum.
4. Make them program in assembly.
The brainwashing should clear up in a few days. As for the 400-line recursive function -- there's nothing that can be done about that.
Functional programming, particularly in an interactive environment, is so insanely much more productive than the now "traditional" OO methods that it's absurd that they continue to be so unthinkingly accepted. From what I've seen, OO attempts to patch some minor weaknesses, e.g. the inflexibility of strong-typing (-> overloading), with enormous overhead.
For instance, a friend of mine was working on C++ code that does arbitrage. "Arbitrage" is how you make money when you see, e.g. that someone is offering to buy 100 shares of Motorola in London for a penny more than someone is selling 100 shares in New York; you match these trades up and take the penny; do this millions of times a day and you're talking serious money.
Anyway, my friend was describing her descent through 8 layers of inheritance to get to the nub of the code where the actual work gets done. Did she have handy, interactive, useful tools for tracing through all these levels of inheritance? Well, she had her brain and opaque class descriptions - in other words, no. So, 8 levels of inheritance to solve the problem of comparing 2 numbers to decide if one is more or less than the other - does this sound like vast overkill to you, too?
This is why we need to send more work like this to India - once they get stuck to the tarbaby of OO, we can throw them into the briar patch!
"software should more closely simulate the real world"
From the article: "It's not the prevention of bugs but the recovery -- the ability to gracefully exterminate them -- that counts."
While the need to gracefully recover your design from bugs (bugs come from design, or lack of, not code) is laudable. The proper technique is to design without bugs in the first place. Assuming that you're actually meeting the business requirements or functional specifications, there is a straightforward method to flattening bugs before they become fruitfully overripe and multiply.
Once you have obtained the proper requirements (your goals), and after you've properly atomized it to its smallest component parts, you need to model those parts. Once you've modeled those parts, you need to test the model. This works in single process design, but it really shines in concurrency where anyone can truly screw up.
Get a good book on design. Then get a good book on modelling, mechanically analyzing, and testing those designed processes before commiting to code.
= 9J =
My personal theory of why code is so buggy is that API design is given such short thrift. I have had to fix way too many bugs where the problem is that the code was using an API incorrectly. I would further say that 80% of the time, the API is so poortly designed that it is next to impossible to use it right.
One of the biggest problems is that too many APIs do not have clear definitions of what their semantics are. The semantics just end up being by products of the engineer who implemented the code. Often times these semantics match what is needed by the first user of the API rather then trying to properly generalize it.
Also, without clear semantics, it becomes impossible to fix a buggy implementation. Since their is no clear definition of what the library is defined to do, callers end up relying on unguaranteed semantics.
Rape and programming in Java are among the 2 bad experiences I've had to go through in life. Java was worse. I just wish no other human has to go through this, and I realize the horrific reality that many do.
I spent 2 years learning and programming in Java. I truly gave it my best. I even used to have Java paraphernalia from the JavaOne conferences. However, I was unable to complete any project (all faif) close to on time, or bearing any reasonable functionality that was promised repeatedly by it's marketing and evangelism outlets. It was always about pounding one way of thinking into me, and endless (endless!) literature to go through, most of which was rife with marketing and long droning tutoring methods.
My desire to use programming as a way of building ideas, structures, and concepts, through innovative forms of expressions was always stunted. My applications were never even close to on time, nor functional to my satisfaction. More importantly, the programming methods I was locked in were nerve racking.
If things didn't work out the way I wanted, it was said to be all my fault: I was doing something "wrong", I wasn't good enough. OO was the only way to go. I was made to feel like I was stupid or something. It was like any innovative form of thought or method was outright blasphemy against Java and I deserved whatever bad happened for not sticking by their rules. Most of these tactics are also used by rapists.
When I turned to faif technologies like PHP, Python, and Perl amongst others, I realized what a scam I had been caught in for so long. This is where I learned that "There is more than one way to do it" from Perl [and it's become my major language since, but not my only language!]. Free technology was where I learnt that multiple ways and creative methods of expressing yourself were not only admirable traits to have, but also valuable traits that contributed to the evolution of building stable and efficient structures that are highly usable by humans.
Having said that, even the free tech cultures do need to be heavily revamped to be welcoming of the diversity that large numbers of people, all coming from different perspectives bring, while equalizing social and technological power dynamics.
What disturbs me about this article is that by not acknowledging the path carved by free technology, they are essentially stealing ideas from the public domain, repackaging it in different terms, and using it to promote their oppressive technology.
If you can't determine if an arbirary program halts on arbirary input then you can't tell if that program has a bug.
If want a language without bugs, you have to use a language that does not interesting problems.
This is too vague and abstract; it can't be refuted nor supported. Thus, it is of no use.
Excellent quotes! Your point is valid although not universal.
I'm a CS professor and I completely agree. I constantly challenge my tenured senior colleagues (I'm untenured) about their love affairs with UML, Java, and other tools. I teach undergraduate data structures and algorithms and never write one line of source code on the board -- it is all pseudocode. I don't ask students to use a particularl language for their programming assignments, either. As a result, I don't lecture from a book either. I lecture about topics and employ several books.
The problem as I see it is that it is human nature to get in a routine and not stretch your boundaries. Many profs take the easy way by letting the tools hide their complacency. I don't think they are stupid -- they knew things at one time. But they get lazy and "eat their brain". I hope I never eat mine because it is a great disservice to students and taxpayers.
She quotes Einstein's "simple as possible" bit.
Perhaps it should be:
Everything intuitive should be as fast as possible, but not faster.
Mrs. Livschitz is basing her article on Lanier. It's a valid question.
I agree with the original poster -- what is the big deal about Lanier? He conceptualized VR, maybe built some crap, but other than that he has weird hair. I heard him speak once and it was pathetic. Lots of hand waving and pontificating, but nothing that anyone smoking a doobie couldn't come up with.
A programmer is asked about programming. Whoop whoop!
She is not bad to look at though. She plays chess and works at Sun, too.
I was going to say the University of Texas at Dallas... I keep hearing stories about how students that have graduated from here can't get jobs because companies in the area have had such bad experiences with graduates in the past. The staff keeps explaining that it's a situation regarding cheating, but I don't think that's the whole situation at all...
Maybe I'm being picky, but I've had two teachers explain in class that Java/C# are better languages than C because they use Unicode... however, they explain that Unicode is a 16-bit characterset and also make it sound like C is completely incapable of such behaviour (neither have responded after I tried pointing this out in email).
The second even tried to explain to me the other day that Scheme is a (implying purely) functional language so it doesn't have variables and that it doesn't use block structure...
At least I'm on a full scholarship (along with a $1500 stipend per semester) and already have a co-op job so I'll have prior work experience on graduation already (along with work on free software projects in my spare time).
It's amazing how any good idea can be discredited/ruined by zealots over doing it. Politics is full of examples of this effect.
Despite this affect, I think that the NakedObjects approach is a practical solution to the temptation to write code in ways that are more likely to be buggy, hard to understand and hard to test.
Besides, the NakedObjects Framework won't satisfy the purists because it can be argued that it is, itself, an MVC framework that is simply hidden from the developer... yet another abstraction, albeit one that allows the developer to ignore the MVC issues and concentrate on the behavioural completeness of the object.
Signatures are a waste of bandwi (buffering...)
Aspect Oriented Programming. In depth information is here.
Today it's implemented in a lot of different langugages, maybe sometime in the future a whole development system is created using this technique.
Don't mistake Pointcuts as the only feature of AOP...
Another long list of links and a comprehensive introduction of the pioneers.
Anyone can call themselves a programmer, or even a software engineer. Someone who graduates from a BCS program is required[1] to do zero practical work in the field before they get their degree - which is the height of their qualifications.
Engineers may graduate, but they require at least a few years of work before they can be licensed. Lawyers have to pass tests beyond those based in the fantasy world of academia. Medical doctors require years of on the job training under close supervision before they are turned loose. All of these professions are self-governed and discipline their members if - nay, when - one of them screws up. Potentially they can loose their license.
The IT world has no such professional designation. The IT world has no such self-governing body. Given companies/individuals in the IT world can consistently produce almost criminally negligent code, and provided they bid low, will survive.
MDs, PEngs (and even lawyers) can always refuse to do something if it is clearly dangerous, unsafe, or illegal. Their clients cant really go anywhere else to get that task done as all professionals will be bound by the same rules.
Even trades: plumbers, carpenters, electricians, pipe fitters..... have some non-academic certification process. Most, beyond a (say) two year school program have to have years of apprentice work before they can be qualified. They are required by law to build things to some safety standard, building code, electrical code, fire code....
Anyone can call themselves a programmer.
The closest thing that the IT world has is various certs from for-profit companies. But they are generally for variations on systems administration, rather then programming. While, so far as I know, they cant be revoked for cause, they do all expire after some finite time.
What the IT world needs is the equivalent of a PEng professional 'grade' designation for, ie 4 year BCS level of schooled people. And also a trades grade designation for 2 year community collage types. Implicitly from there you get higher quality product, because the people designing the product (PEng grade types), and the people implementing it (trade grade type) have higher obligations then just to the customer. They would have professional responsibilities, violation of which could cause them to loose their respective licenses. This would solve most of the bugs caused by cutting corners to save on cost, releasing before its done, etc. By no means all, but a lot.
[1] yes, some schools have Co-Op programs. But I know of none that are requirements.The article doesn't seem to address all of the different types of bugs, nor how to best address them. Anyone care to add to or refine this list?
1. Algorithmic bugs - you have a function with well-defined input and output, and it does the wrong thing (may include giving the wrong answer, looping forever, leaking memory, or taking too long to return). Can be avoided with a combination of code review, unit tests, and correctness proofs when possible.
2. Interface bugs - this includes validating input, both from the user and over the network or other ways in which your program gets input data. These bugs include buffer overruns, GUI bugs caused by an unanticipated sequence of clicks, etc. These bugs are mostly found by testing, but sometimes also with automatic code checkers or memory debuggers that highlight potential problems.
3. Bugs in the operating system or in sublibraries - any large project depends on large volumes of operating system code and usually lots of other libraries. These systems almost certainly have bugs or at the very least undocumented or inconsistent behavior. The only way to avoid this is to validate all OS responses and do lots of testing.
4. Cross-platform bugs - a program could work perfectly on one system, but not on another. Best way to address this is to abstract all of the parts of your program that are specific to the environment, but mostly this just requires lots of testing and porting.
5. Complexity bugs - bugs that start to appear when a program or part of a program gets too complicated, such that changing any one piece causes so many unintended side-effects that it becomes impossible to keep track of them. This is one of the few areas where good object-oriented design will probably help.
6. Poor specifications - these are not even necessarily bugs, just cases where a program doesn't behave as expected because the specifications were wrong or ambiguous. The way to avoid this is to make sure that the specifications are always clear. Resolve any potential ambiguities in the specs before finishing the code.
My overall feeling is that there are so many different types of bugs in a real-world programming project, and any one technique (like object-oriented design) only helps address one type of bug.
OO has one paradigm which is make everything objects. This is absurd.
If you look through the Java libraries there are numerous examples where things are stretched to make them objects. You see the same thing in Java applications.
Example: colors. Is a color an object or an attribute of a point on a surface? Apart from anything else Java having colors as objects means you have to create millions of objects or build a color object cache if you have large numbers of colors.
Example: bignum. A number is a stage in a computation not an object. Again, tons of garbage and impossibly slow code.
I agree with the lady that we need extra concepts but I disagree that we need a fixed set of concepts hard wired into the language. We need a powerful enough language where you can add concepts that you need.
Just as OO was added to Lisp without changing the base language, so can other concepts. Try that in Java.
Java is better than the original 3GLs like Fortran 58 and COBOL 60 but not by an order of magnitude.
Note that the article is not discussing small programs (where small == 1Mloc). At these levels, premature optimisation dosn't even get you as far as an almost working first version.
We do not know how to manage complexity at these scales. The article is an interesting interview with a very smart and experienced architect who thinks she might have an idea how we might be able to do it.
When you are talking about 10's of millions of lines of code, the answers that survived a 50kloc desktop app break down.
Seriously if you want 'bug free' software, the only method is to formally prove the correctness of the code. Of course, since few programming languages specify their own semantics formally, you don't have a chance in hell of doing this with a typical language.
Those of us that program in Python know that there is such a language. Python has the necessary features of functional, procedural and object-oriented languages, blended quite well into a truely useful and useable language.
But, just as importantly, one must recognize that one language is not the answer either. One needs a toolkit of languages to draw from. Mine happen to consist mainly of Bash, Python and C/C++ (for Python modules).
Livshitz commented that "the problem should be addressed at the root by allowing process-specific constructs, such as "before/after", "cause/effect" and, perhaps, "system state" to be a core part of the language." She does not mention them, and I have not yet seen any comments on this topic on process oriented languages such as XPDL, BPML and BPEL, which were developed for workflow and business process management (BPM) systems. See ebpml.org for more on process markup languages. Those of us who use BPM know that relatively bug free applications (business processes) can be delivered in weeks rather than years while achieving the additional tricks of leaving human judgement in the loop while integrating legacy applications. Bug levels are reduced by directly executing intuitive diagrams and declarative statements. This reduces the "impedance mismatch" between business requirements and developer interpretations.
Programming is littered with complexities for there not to be bugs. You have to define something just right and not misspell anything or put something just "so" or there is a bug. I know there is a reason for all these things. But in the future I see Computer Aided Programming (CAP). The processing power of the PC will be used so that the computer will know what you are programming while you are programming it. The Artificial Intelligence will make suggestions and even write some of the code for you. The AI will keep you from making disasterous mistakes by analyzing every bit of recent code in comparison with all past code looking for conflicts. He will even suggest that you put something just "so" or not do it. The AI in essence will be your companion, debugging as you go. This will produce huge programming projects with no bugs whatsoever.
Programmer conquer 2 worlds - two distinct area of knowledge.
The first is the area of programming languages - they should know what a statement is, what a class is, an algorithm, a subroutine. In short, they must know how to program.
The second area is that of the business world they are writing the program for. If you are writing a program for Morgages, for example, you need to be using base-10 rather than base-2 for mathmatics. You need to know how to calculate a morgage rate, principle, interest, etc. (You'd better realize that morgages can be bought and sold and how to determine their current values and future values).
Our modeling should match the real world. The closer to the real world the model matches, the easier it will be to relate the program to the business model.
This is a small article on sun.com and they didn't proof read it and find such a glaring mistake. "sandbag architecture" = J2EE That is where you keep piling on more and more sacks of grit trying to hold back the flood water and mud.
Object-oriented programming allowed developers to create industrial software that is far more complex than what functional programming allowed.
She means "procedural programming". It's pretty amazing that a "senior IT architect" who makes pronouncements on the future of programming doesn't know the difference between "functional programming" and "procedural programming".
Q: So, your basic thesis is that programming constructs should be more intuitive to developers, and more closely simulate and resemble the real world. That would enable developers to write software with fewer bugs, right? A: Exactly.
What are computers trying to do in the real world? They are trying to solve problems, not simulate problems. The solution to a problem is completely different from its simulation. Yes, the simulation is simpler to implement, but it doesn't solve the problem.
Smalltalk (incidentally, a much better designed language than Java) had the same underlying idea, and it didn't catch on because programming really doesn't work that way. Smalltalk turned out to be a decent programming language but no silver bullet. Unlike Java, Smalltalk was extensible enough that whatever abstractions it was missing in the base language could be added by users.
But expanding the pure object-oriented paradigm to allow for a richer set of basic abstractions -- like processes and conditions -- is only half of the arsenal in the war on complexity.
I see: adding dozens of complex, additional abstractions that can all interact in unpredictable ways is supposed to make programming simpler. PL/I and Ada, here we come.
Enormous productivity gains remain to be uncovered and difficult problems are yet to be solved.
Yes, but evidently not by Sun, since Sun clearly has no idea what they are doing.
Among the modern languages, Python has some of the features that the author talks about. It is inherently object oriented in its internal structure but does not force programmers to only use objects. It allows structured programming, functional programming (like Lisp/Haskell) and also object oriented programming. It allows for aspect oriented programming by providing metaclasses and introspection. It has iterators and generators to allow asynchronous programs. It can scale nicely from a one-line script to hundreds of thousands of lines. The language has minimal clutter, almost no noise characters in its syntax. It is dynamically typed and garbage collected. The programs are very intuitive and readable.It has a huge standard library including Perl compatible regular expressions.People who haven't tried it yet can give it a try at http://www.python.org.
Ruby http://www.ruby-lang.org also shares many of the above features as Python. It's a matter of taste which one looks better between Ruby and Python. I like Python.
The negative aspects mentioned here seem to be direct results of the proprietary software development process, not really software itself. What it gives you is an tremendous amount of duplicated effort, because a lot of time is wasted playing catch-up with your your competitors. The software is not integrated because you want to differentiate from other software (think splash screens and the Java "metal" look here) to sell your product. The result is tons of wasted effort, and a lack of innovative software that works well together.
Richard M Stallman (and following him, but with entirely different motives, Bill Gates) predicted this a long, long time ago. Apparently, his words are unknown to this author, or she would know why this is the case. That's what sad.
If you are willing to "code" a billing software, an odometer, or a software to predict mentruation cicles for your SO, then all this languages that tries to be simple and "resemble real work" will be ok for you, but if you want to actually code, then you will need asm, c or cpp. Other languages are nice for experimenting, or as "Programming For ... "
(As in "ASP: Programming for Webdesigners", or "Clarion: Programming for marketroids"); that's actually not programming.
WTF am I doing replying to an AC at 5 A.M on a Friday night?
1. Use a simple programming language whose syntax doesn't get extended every week or so.
2. Write code to be reusable and adhere to standards. Write programs using a top-down design approach.
3. Fix bugs faster than you add new features. Add new features when you run out of bugs to fix.
4. Profit.
I'm thinking of the transitive verb (it is slang, I guess), as in "Come on, quit sandbagging! You aren't even trying!"
It's when you do something (i.e., running a race) badly on purpose, often to trick your competitors into overconfidence (or just to get out of working hard).
There are only 10 types of people: those who understand decimal, those who don't, and, uh, 8 other types I forget.
Slightly OT: ... or rather, just ACCEPTING unknowns and their repercussion in logic. Say, If I withhold a fact in an argument but claim to be "right," he will say there is just NO way of winning the argument --and then I produce the "new evidence." He sometimes recoils thinking his logic models cannot be blown away by my (normal logic + hidden evidence).
This is indeed hitting the nail on the head. My father and I have lots of disagreement on the issue of "common sense." I am very smart and he is so too, but tends to fall behind when it comes to explaining
Whenever he says that I should know something because it's intuitive, I bring up example after example of why he's mistaken to expect all logical conclusions to be == to his. We saw a lady in a TV contest who had to see words hidden behind her husband and make him guess the , through signs and gestures she made for him. She stumbled upon "otorrino," (this TV show is in spanish) which is short for otolaringologyst, and said that she didn't know the word. Well, I won't get into more complex translation details. Suffice to say that she didn't know what it was and had to skip to the next thing. My father was outraged:
I asked my dad why he rationalizes which concepts she SHOULD know rather than why she just DIDN'T know what he's 100% sure she already grasps. Moreover, he's always too shocked to see through his own failure at accepting that common sense doesn't exist, and instead trying to verbally fix something that is has proven false before his own eyes. But some people think they already know what is and isn't IMPOSSIBLE.
I can list three other languages besides english and spanish that I can understand, so I speak 5 languages, right? No. This is an example of misinformation and generalization: If she says she speaks 7, it doesn't mean her job has made her command them all --even if you 'knew' as many languages as the Pope and had to work in New York City's linguistic melting pot, you will never exert more than 3 language roles in your official capacity, and your "other 4 languages" will be pet languages, specially if you're only 35. But sometimes dad waves off my facts as crazy talk of today's young and naive offspring. Too bad. Sometimes he's surprised at how lucky I am when my "wrong logic" can get him so many nice surprises when his ways should be the only solution to my "poor common sense." You can tell I deal with control freak parents eh?
"Wireless : LAN
Victoria Livschitz is right when she talks about the complexity of today's systems being one of the major problems. But when she says that No one can comfortably negotiate a system with thousands of classes., she hasn't pointed out an OO flaw.
Whatever takes thousands of classes (or single components, to get away from OO terminology) will never be of low complexity, no matter what other paradigm you come up with. The task is to split these huge systems into parts which can be mastered and understood by single persons.
The connections (who uses what?) between classes (or packages) must be kept as low as possible, and as high as necessary.
Among the one's I've come to believe are:
Okay, let's look at them...
URK!!! Whoops, where did this one spring from ? 100% wrong. It's everything else we do that gives a context to coding and tells us whether or not we're writing good code. Coding should be the least important thing a developer does (behind things like understanding the client/problem, analysing the progblem, designing a solution and testing).
Don't look back the lemmings are gaining on you
This slashdot discussion about software engineering is one the best I've ever read. It should be almost mantatory for students of computing to study. Lot's of posters have raised very significant points about why it seems impossible to write bugless software.
Let me add my 2 cents: the problem is that computer programs represent the 'how' instead of 'what'. In other words, a program is a series of commands that describes how things are done, instead of describing what is to be done. A direct consequence of this is that they are allowed manipulate state in a manner that makes complexity skyrocket.
What did object orientation really do for humans ? it forced them to reduce management of state...it minimized the domain that a certain set of operations can address. Before OO, there was structured programming: people were not disciplined (or good) enough to define domains that are 100% indepentent of each other...there was a high degree of interdepentencies between various parts of a program. As the application got larger, the complexity reached a state that it was unmanagable.
All todays tools are about reducing state management. For example, garbage collection is there to reduce memory management: memory is at a specific state at each given point in time, and in manual memory management systems, the handling of this state is left to the programmer.
But there is no real progress in the computing field! both OO, garbage collection, aspect oriented programming and all other conventional programming techniques are about reducing management of state; in other words, they help answer the 'how' question, but not the 'what' question.
Here is an example of 'how' vs 'what': a form that takes input and stores in a database. The 'what' is that 'we need to input the person's first name, last name, e-mail address, user name and password'. The 'how' is that 'we need a textbox there, a label there, a combobox there, a database connection, etc'. If we simply answered 'what' instead of 'how', there would be no bug!!! instead, by directly manipulating the state, we introduce state dependencies that are the cause of bugs.
Functional programming languages claim to have solved this problem, but they are not widely used, because their syntax is weird for the average programmer (their designers want to keep it as close to mathematics as ever), they are interpreted, etc. The average person that wants to program does not have a clue, the society goes away from mathematics day by day, so functional languages are not used.
The posted article of course sidesteps all these issues and keeps mumbling about 'intuitive programming' without actually giving any hint towards a solution.
Compiled flowcharts are the easiest way to express code, even as we know it today, especially on networks. They even transcend spoken language, so teams can span nations, and even generations. It's writing the documentation first, and then you're already done. And the graph-theoretical operations are far more rigorous than any lexical parsing algorithms. Plus, most microprocessors, virtual machines, and even Perl parse the data into dataflow graphs before processing. The only reason we're still stuck with lexical programming is the sheer momentum of the old paradigm, with the tools, nevermind how inadequate, at least already written and trained. But the first flowchart compiler (and decompiler) tool that's simple and complete will push productivity and clarity out from the hotshots to at least the professionals.
--
make install -not war
I have spent most of this last week debugging a large Excel "work-book". Without going into excessive detail, this one uses look-up tables to match specific Code requirements to equipment ratings for a large family of electrical products. This job requires many "worksheets" for the models involved (each to be readable in one screen and printable on one page). Because of the opacity of the spreadsheet "language"--you can only see the formula "source code" for one cell at a time--it's really hard to keep everything synchronized as new models are added and calculation formulas are copied into the new section. This was a design and debugging nightmare. God help anybody else who has to decipher this "intuitive" piece of software.
LISP
If we stop putting bugs in our programs how we would earn a salary of fixing them? Come on, we all know it would be matter of minutes if we really want to write bugs free programs. Eh... This isn't a public forum, right? Oh damn...
First of all, homes are build from standard components. Lots of standard components. If software development, if you want a linked list, you have, at most, a handful of choices. When building a home, if you want a nail, you have dozens or hundreds of choices. There are roofing nails, framing nails, finish nails, decking nails, galvanized nails, nails with ribs, nails with spiral grooves and all available in a variety of sizes.
The point is, if you need a nail, you can walk into home depot and get *exactly* the nail that you want. In software, you have to make do with what's available.
You could argue that one can create whatever custom list behavior is needed from the building blocks available. That's true. You can also make whatever nail you want from steal wire. But we don't do that because it's error prone and you might not get exactly the right kind of nail necessary for the job. It's better to get one off the shelf because you can be pretty sure that someone has thought of all the issues related to the problem it's designed to solve and taken care of them.
Next, look at who builds a home and compare it to who builds software. If we build houses the way we build software, you'd bring 150 people to the job site and say "you there, do the framing; you over there, you're on plumbing; you two in the back have electrical work. After all, builders are builders, right? Of course not. There are specialized skills involved in each step and you need the expertise to do them. You wouldn't want your plumber doing the roof work any more than you'd want an excavator doing the plumbing. To build a complex system, you need lots of people with very specific skills.
Standards and interfaces. So how is it that you can walk into Sears and buy a blender that interfaces so perfectly with the electricity in your house? Because there are standards, of course. The standards specify the voltage and frequency on the line, the exact shape of the plug that you use, how long the cord should be, what sort of insulation it has and probably a lot of other stuff. Software systems need the same sort of standardized interfaces for their basic properties. We've started this with things like constructors, destructors and I/O operators.
Basically, I see software development as a very young science. As the standards evolve, the quality and reliability will grow also.
My sole exposure to Lisp was half a semester at the U where it was paired with SNOBOL of all things, and this was before the M-Lisp, Common Lisp Golden Age, so I am still trying to understand what Lisp does. Graham has an example
(defun foo (n) (lambda (i) (incf n i)))
which is a function that itself returns a function that takes an initial value n. The returned function increments that stored value of n by i whenever that new function is called, returning the updated value of n.
Graham presents this as an example of how powerful Lisp is compared to everything else, so I will take this as an example of what a Lisp advocate considers a basic operation that you would want Lisp to do.
In OO terms, function foo is a factory that poops out functions customized by the argument value n, and each function it creates has a private field variable along with a function for updating that variable and returning a result. In OO terms, that anonymous function thingy returned by foo is simply a one field variable, one function object.
Yeah, yeah, that is not really an object, an object has inheritance and polymorphism and all that. And the functional programming dudes will say that a closure (function plus state -- is that what Graham's example represents?) is not really properly represented by an object. And Graham is quick to point out that the Lisp example is also an example of generic programming because the type of n and i is not constrained. But the core idea is like that of object instances -- you have one or more "things" with internal state that you can poke at to modify that state and return a result.
So I wonder if, after Greenspun's 10th Law, what OO is reinventing that has already been done in Lisp is creating networks of "things" with state and mutators that can interact with each other. And OO has evolved from the more Lisp-like Smalltalk to the heavy type systems of C++ and Java. Then the question is whether Lisp has a cleaner way of expressing all of this or whether Java is the way to go because it shows that a statically-typed language can express much of the same stuff as a runtime-type language but with the advantages of performance and code readability that static typing is supposed to bring. Or have the Lisp advocates been right all along only we didn't understand what they were talking about?
maybe it's just that many project start
because there's this "thing" we want to improve
automate but it has never been fully discribed,
understood. my acctually sitting at the computer
and trying to make this "phantom" "real" you
suddenly realise that it is way more complex then
you initaly thought and so you cut corners (ta-da!
bug). once the whole beast is complete there's
this "but i wanted that funcionality added" etc.
back to the drawing board.
i disagree. computer programming is not like
cheess(?) at all. it's like painting.
if you think programming is lke cheess(?) then
sit at a typ writer and write your code and then
scan it with a text regognizing program.
i just want to add, that typing a line of
code and then trying compile it isn't the
way to go, but it is easyer if a compiler "AI"
can help you.
nevermind. silly article...
Software, in general, ranges from many subjects. It is impossible to define a set of rules to make software less buggy, however, the only rule that can be said is "Check your program for everything, right down to entering a double decimalled negative number (e.g. -2.5.3) on a Win95 machine..." Obviously, the chances that that will happen are practically zero, but after all, what's the definition of "buggy"? What's the definition of a "bug"? ___________________________ Please visit my site: http://www.nippoo.net ; programmers wishing to make their programs less buggy may like it! Just visit, at least...
Of course, you can write -- or generate -- some code for a SM once you've decided all these points, but you couldn't expect a language to come up with a generic SM without making fixed decisions on these sorts of questions, decisions that will be wrong for some applications.
A state machine is really a design pattern, a way of doing things, even a way of thinking about them, rather than an actual specification. A language or library can provide support for some of the things it might do, but too much depends on the implementation choices.
Maybe what we need is a language to specify code in terms of design patterns and then generate code from them... but even if someone finds a way to do that, it will take an awful lot of work to integrate with current languages.
Ceterum censeo subscriptionem esse delendam.
As with many (all?) other skills, I think two things probably dominate developer ability:
Please note the key distinction there: one of these factors relates to a developer's potential, the other to what he can actually achieve in reality.
To determine a good strategy for building a team of developers, you then have to consider the relative work rates of developers of different abilities, and the nature of the work. For example, most code is developed from relatively straightforward design and programming tasks, but often you have small areas that require much more skill to design and implement effectively. These areas require a more able developer/team, but OTOH we also know that such people can be anything up to 10x as productive as a "typical" developer on the more mundane work. Of course, employing such people also costs rather more.
So what does this suggest about our choice of programming language? Well, if your development task is going to require any complex design or implementation work, you're going to need a sufficient number of top end people to do it, and you're going to need suitably powerful and flexible tools to help them.
For the remainder of the work, highly skilled developers will still be happy using those powerful, flexible tools, but they may be in short supply, and chances are most of your team will be more average in ability, and thus more average in their ability to avoid mistakes. Thus you may need a tool that reduces the possibility or impact of those mistakes, even at the expense of some power and flexibility (which those developers will rarely if ever use anyway).
Strangely enough, this has always been one of the reasons I've liked C++ as a practical, real-world language. While it has plenty of theoretical flaws, it does combine both raw power and flexibility with a decent set of abstraction tools to keep routine development away from the most dangerous areas. You can have your top developers write subsystems using all the cunning tricks they need, but keep everyone else using only clearly defined interfaces. Given a little basic training (sadly a lacking commodity in the C++ programming world, but not beyond any competent manager to arrange -- this is the second factor above) the vast majority of "typical" developers can avoid the really dangerous programming practices, and take advantage of the neat stuff the top guys made for them. When those top guys have finished developing really neat stuff, they can just become super-efficient people doing the mundane stuff using the same tool.
Bottom line: for most real world projects, you need to judge a language by both what it's capable of when used by a really good guy and how well it looks after Joe Developer. If one language isn't enough to do both and your project needs them, maybe you need more than one language and some good glue, but that's a whole different topic. :-)
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
Bad code arise when the requirements change and the code needs to be updated to these.
Bad code arise when the beautiful algorithm needs to deal with real-world constraints.
Bad code arise when the program grows over a certain size and too many modules depend on each other (this is often not avoidable).
Bad code arise for many reasons -- premature optimizations is not a problem I face often (in my 15 years of programming), and I have worked with a lot of bad code, much of it my own, which did not start out to suck, but most successful projects will grow to a complexity that affect the code badly.
Try to work with some "hard" problems and I bet your code will not look intuitive, like an arithmetic encoder, C++ parser, GIF decoder or a HTML parser which is compatible with the HTML on the net (as the users expect it to be!).
I think in the end the lower-level techniques of such a system prove more useful to a programmer. At the very least they have had a higher rate of succesful adoption. Most modern programming languages use Lisp's ideas of uniform object referencing and automatic memory management, and stuff like quasiquoting pre-processors has started popping up for other languages in the past couple of years. Concepts a little higher-level, like AOP and refactoring, go a very long way toward the intelligent programmer's apprentice. Of course, if nothing else all this stuff makes making programming apprentices much easier - just try to imagine building one to deal with C's pointer referencing!
In the great CONS chain of life, you can either be the CAR or be in the CDR.
If you start on the process of implementing project management software, whether you're doing building construction or coding, it can help improve the project process. The main thing is that any reasonably complex piece of software will require people to start keeping track of things. It starts making it easy to see who did what and when, what things made you fall behind schedule, what makes projects go over-budget, etc. You know the saying that a camera does not just capture things because its presence changes what happens?
WMBC freeform/independent online radio.
Grrr... I had a much better response prepared, but it died when Firefox crashed on me..
:+) There is no progress where complacency resides.
Anyway, here's the short version.
State machines are not nebulous when the state machines are complete and closed loop. Imagine a language where the state machine description IS the programming language, and you just let the computer figure out how to get the job done based on the state machine program. Don't believe it can be done? Then check out the Abstract State Machine Language (AsmL) that was pointed to by the other response to my post. It has been done.
A state machine is a specification mechanism, not a design pattern. Common state machines could be abstracted into state machine design patterns though.
Your post indicates that you are still thinking inside the box. Imagine a language where the state machine spec IS the programming language. Or imagine something radical like doing a series of UML specifications for a system, and that IS the program for the system. No code generation. No other intermediate steps except some sort of compiler/execution environment that knows the language and can execute it.
This would force us to produce VERY GOOD specs, because the specs would be the program.
I know this all sounds far fetched, but Java, Perl, or Python would have sounded very far fetched to any programmer 30 years ago. "Whaddya mean I don't need to write my data structures in macro assembler? You just replace these 200 lines of assembler code with that 1 line of Perl?! Why, that's just a stupid waste of memory!" Constraints around software development have changed, there's no excuse to make everyone continue to write software in relatively low level languages like Java when we could do much better.
Even if you don't believe that we can do better, it doesn't pay to believe it.
Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!
Hey, software sucks, it has bugs, it crashes, and it's also hard to write. But I get tired of seeing some CS professor tell us that we need "intuitive" programming, or self-creating software or some other nonsense. It's fairly easy to spot the point at which they depart from reality and start daydreaming.
As far as I can tell, we have bugs because people make mistakes, because we don't understand the problem properly, because too many programmers don't even know how to do their jobs well, because there are tight time constraints, and who knows what else. But let's face it, if we would (or could) spend a bit more time thinking hard at the beginning and knowing our tools properly, it'd save endless trouble when things don't work later on.
Haskell Lazy Functional Language
[1] yes, some schools have Co-Op programs. But I know of none that are requirements.
My three year Computer Programming/Analyst program at Georgian College required you to have 3 co-ops before you could graduate.
Take note I started in '99 where the bubble was still making the IT industry a beautiful and blue-sky world, and finished in '03 where I was lucky to get a job from one of my co-ops...I mention this only b/c if a student couldn't find a co-op for the designated semester they'd still have to pay $250 regardless. Oh, how we would like them apples!
Some aim to please, I aim to tease.
I think I found one of the reasons we have so much bad software. Being able to drag and drop buttons to make a GUI doesn't mean you can handle the other aspects of programming. Some things (like GUI appearence) may have gotten easier, but programming is still an art that requires a certain kind of analytical ability. There are many programmers that can write bad, buggy software, but there is a shortage of programmers that can write good, well crafted software.
I agree with you completely that bad code often arises through innocent intentions. I disagree, however, that it's often not avoidable. It's almost always avoidable: if you wrote the same code from scratch, knowing what you know after writing it the first time, you would produce a much better result.
The problem is just that complete rewrites are very expensive, and most development teams/managers are too stubborn to do minor rewrites when they should, preferring to add hacks or workarounds instead of maintaining a relatively clean design. Sooner or later, that usually results in the need for a much more expensive major rewrite instead.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
Nearly all software and engineering problems I see are due to unnecessary complexity. The more complex the system, the more prone it is to error, and the more difficult it is to fix. Since we cannot easily *prove* large programs correct, the best we can do is try to intuit our way through the program's structure and flow to spot problems and try to ensure correctness. So making code as understandable and simple as possible is the best way to reduce flaws, since the human brain is the last line of defense/validation as to the program's correctness.
I've been a developer on a major Microsoft product for 5 years. The source for this application is very large and it requires a team of roughly 30 developers to work on it for each release. Even when you become an expert on one area, you still know nothing about other areas, because there's just so much code.
There are areas of our code that are considered very touchy. They are expensive areas to work in because they are difficult to understand, are architected poorly, and break in unexpected ways nearly every time someone makes a change. This is directly due to the code not being as intuitive or as simple as it should be.
There are other areas of our code that are very readable, smartly commented, and intuitively architected. These areas are pretty inexpensive to work in, and they tend not to have many bugs. These areas do some very complex work, and are sometimes optimized in ways that don't make a lot of sense at first glance, but because the code is commented and architected cleanly, it is still quite understandable even to a newcomer.
When people start building houses of cards just because they can, instead of it actually being necessary to get the job done, that's when you end up with a mess on your hands. I've seen plenty of code (not at my job, but on my own time) written by "kiddies" who had just discovered recursive functions, and they do their damndest to try to tackle everything using recursion. I've seen the same thing with people who have just discovered C++ classes -- everything is over-encapsulated as a class, just because they think classes are cool, rather than using classes to aid in organizing things in any sane fashion.
Moderator hint: a comment is neither "Flamebait" nor "Troll" if it is true.
...is to have no features.
Karma: It's all a bunch of tree-huggin' hippy crap!
So I went through BInfTech(Soft.Eng.). I could have alternatively done BE(Soft.Eng.). The end result is the same, and surely not everywhere in the world requires this "license" to operate as an engineer, otherwise you would never get any work due to the massive Catch-22.
Karma: It's all a bunch of tree-huggin' hippy crap!
In Canada PEngs get very mad when non licensed types call themselves 'Engineers'. For example, CNE stands for "Certified Novell Engineer" everywhere except for Canada, where CNE stands for "CNE". Im not sure the details, but apparently the definition of a PEng is defined by Parlement, and only Parlemently anoited groups can give out the title 'Engineer'.
While this is slightly elitist, yes, it is to everyones advantage that when someone calles themselves a PEng it means something. Because it does.
More to the point, because anyone can (and does) call themselves a "Programmer" or "Software Engineer" those titles are meaningless.
It wasn't offtopic. It was a comment on the reply above mine.
The problem is Io doesn't really fill the niche ObjC fills. ObjC can accomplish both high level glue coding and low level systems programming, and in that capacity it excels. Especially with the addition of C++ stuff, it's really quite good.
Io is very interesting, but it's simply not at the performance level you'd need to attack ObjC's position. The only language I've seen that comes close to the C triplets is OCaml, so far. I'm sure there are others, but OCaml really is disturbingly fast.
Of course, a vertical learning curve and recalcitrant type system kinda make it less than optimal.
Slashdot. It's Not For Common Sense
the 'offtopic' on this one was part of a mod-bomb.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)