1. Serious development
- Posted by George Henry <ghenryca at HOTMAIL.COM> Nov 23, 2000
- 383 views
Hi all, Here it is a holiday in the USA, so take your time about replying. 8^) (I write this to encourage those who don't look at their email right away to go ahead and add their comments anyhow.) I'm embarking on (have already embarked on) the development of a fairly complex *commercial* application that will require database connectivity and a sophisticated GUI. An important factor to consider is that I am constrained to doing this on a thin shoestring budget. I am finding Euphoria to be excellent for prototyping and rapid development. However, I wonder: 1. how practicable it will be to complete this project in Euphoria, 2. if development is likely to proceed as rapidly when I get into the serious detail work, and 3. exactly which tools to use, since development on at least the GUI aspects of the programming environment (language and associated libraries) seems to be currently moving ahead at a rapid pace. Should I use an older, proven and stable version of the GUI, or a new and soon-to-be proven and stable version? 4. should I go OOP or not? I am inclined to pass on this option, since the bulk of my background is in procedural programming, I'm more comfortable in that world, and can and do accomplish almost everything procedurally that OOP gives one the opportunity to do. And if I did go OOP, I would go almost certainly work in Eiffel (the premiere OOP language, as far as I am concerned), unless someone manages to convince me otherwise. (I have already formed well-considered opinions about Java, C++, Visual Basic, and Smalltalk. I don't know too much about Delphi, except that I have quit using a favorite shareware program written in that language because it is too unstable, and I suspect it of heinously trashing one of my computers. How badly that reflects on the language vs. the programmer, I don't know.) Thanks for your comments. I will consider all recommendations, and if on the basis of your advice I follow a path that doesn't work out, I will continue (discounting probable griping) to love you anyway. George Henry _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
2. Re: Serious development
- Posted by David Cuny <dcuny at LANSET.COM> Nov 23, 2000
- 372 views
George Henry wrote: > 1. how practicable it will be to > complete this project in Euphoria Win32Lib is pretty complete, so unless you are doing something non-standard, you aren't likely to run into problems of a particular bit of the user interface not being available. My biggest concern would be application error recovery. As you know, when Euphoria encounters an error, it shuts down on the spot. What would be nice if you had the opportunity to run some data saving routines (or error recovery routines) before shutting down, but you currently can't. This issue isn't unique to Euphoria - you still have to handle exceptions and test values in any other language, or you will get blown out of the water. Any time you are thinking 'commercial', you need to go the extra mile and try to bulletproof every aspect of your code. One obvious thing is to add a timer to automatically create a backup of the data - perhaps every five minutes, or before any especially risky operations. Most of your fatal errors in Euphoria will probably come from attempting to slice a sequence that is shorter than you thought. So if you wrote: name = string[1..10] and the string was only 8 characters long, your code would fail and the application would shut down. So you will need to add tests before any operations that could fail. For example: if length( string ) < 10 then -- pad the string out to 10 characters name = string & repeat( ' ', 10-length(string) ) else name = string[1..10] end if For string handling, you can probably generalize this sort of thing to use 'safer' routine, like: -- get the first 10 chars from the string mid( string, 1, 10 ) where mid() is a routine of your own design that automatically checks to make sure the indexes are valid, and ensures that the returned value will be the expected length. Making slices 'safe' is probably the best way to keep your code from failing. While it's always best to recover gracefully from error conditions, you might want to write an 'assert' routine to recover from 'catastrophic' errors. 'assert' would look something like this: procedure assert( integer test, sequence message, sequence args ) integer result if not test then -- display an error message_box( sprintf( "Fatal Error:\n" & message, args ), MyApp, MB_OK + MB_ICONERROR ) -- save any open files... -- shut down abort( 0 ) end if end procedure and then add it to the code like this: -- open a file handle = open( filename, "r" ) assert( handle != 0, "Unable to open file %s", {filename} ) -- convert text to a number n = value( string ) assert( n[1] = GET_SUCCESS, "data file corrupted", {} ) Of course, it's always better to gracefully handle errors than to shut down when you encounter them! > 2. if development is likely to proceed as > rapidly when I get into the serious detail work This is more an issue of programming skill and application complexity than anything else. My crystal ball is a bit cloudy on that. > 3. exactly which tools to use Unless there are compelling reasons to move to the latest 'bleeding edge' release, you probably want to develop on the most recent stable version - no matter what the language, and what the library. That way, you can concentrate on coding instead of debugging the library. Of course, if you need tools that are only available in the 'bleeding edge', that pretty much limits your options. > 4. should I go OOP or not? It depends on your application. I don't really us it myself. -- David Cuny
3. Re: Serious development
- Posted by Kat <gertie at PELL.NET> Nov 23, 2000
- 383 views
On 23 Nov 2000, at 15:14, George Henry wrote: > Hi all, > > Here it is a holiday in the USA, so take your time about replying. 8^) (I > write this to encourage those who don't look at their email right away to go > ahead and add their comments anyhow.) > > I'm embarking on (have already embarked on) the development of a fairly > complex *commercial* application that will require database connectivity and a > sophisticated GUI. > > An important factor to consider is that I am constrained to doing this on a > thin shoestring budget. I am working on zero budget. > I am finding Euphoria to be excellent for prototyping and rapid development. > However, I wonder: >1. how practicable it will be to complete this project in > Euphoria, very. 2. if development is likely to proceed as rapidly when I get into > the serious detail work, and yeas. >3. exactly which tools to use, since development > on at least the GUI aspects of the programming environment (language and > associated libraries) seems to be currently moving ahead at a rapid pace. > Should I use an older, proven and stable version of the GUI, or a new and > soon-to-be proven and stable version? This is bugging me too. You could find yourself locked into one "obsolete" version of win32lib real fast. I suggest you leave the gui till last, and go forth with the rest of the code. Once you have the rest of the code, you'll know what you need to graphically interface the user into, and win32lib may be more stable. 4. should I go OOP or not? I am inclined > to pass on this option, since the bulk of my background is in procedural > programming, I'm more comfortable in that world, and can and do accomplish > almost everything procedurally that OOP gives one the opportunity to do. And > if I did go OOP, I would go almost certainly work in Eiffel (the premiere OOP > language, as far as I am concerned), unless someone manages to convince me > otherwise. (I have already formed well-considered opinions about Java, C++, > Visual Basic, and Smalltalk. I don't know too much about Delphi, except that I > have quit using a favorite shareware program written in that language because > it is too unstable, and I suspect it of heinously trashing one of my > computers. How badly that reflects on the language vs. the programmer, I don't > know.) Personally, i would not do OOP, Turbo Pascal left a bad taste in my mouth with what oop was implemented in version7. To me, oop slows down the application, too. Ymmv. Kat
4. Re: Serious development
- Posted by Al Getz <xaxo at AOL.COM> Nov 23, 2000
- 364 views
The most important question is what are you developing? If you need high speed or need to do any large picture filtering then you wont want to use Euphoria unless you can isolate these areas and code them in another language like C, and then link them to a Euphoria coded GUI. I'm considering coding a chess program like this because the chess engine needs to be very very fast, while the GUI operates at less then human reflex speed, hence i assign the GUI tasks to Euphoria and the engine to C++ and/or assembler. Another area to explore is coding in Euphoria with the advanced knowledge that you will translate (by hand) the resulting code into C or C++. If you stick to certain styles of programming its a breeze to convert all the statements to C and compile. The nice thing is you can fully test the program in Euphoria before converting to C, thus making sure all the ideas work ok, then convert to C line by line. It doesnt really take that long. Using a set programming style and you have almost a line by line correspondence between the two languages. I wouldnt be surprised if you could write your own mini translator to handle a controlled style of programming. I started one of my own quite a while back. I converted a very complex program to C++ line by line and it made the overall task simpler. In that particular program i used single dimensional sequences of fixed length to make converting to C++ arrays very simple. Variable length arrays arent always needed anyway. Good luck with it, and let us know how its comming along. --Al
5. Re: Serious development
- Posted by George Henry <ghenryca at HOTMAIL.COM> Nov 23, 2000
- 370 views
- Last edited Nov 24, 2000
David Cuny wrote: >Win32Lib is pretty complete, so unless you are doing something >non-standard, you aren't likely to run into problems of a particular bit of >the user interface not being available. I've used Visual Basic in the past, so I don't feel intimidated by Win32Lib. Here is my need of the moment, which on cursory examination Win32Lib (ver. 0.45r from rapideuphoria.com) doesn't appear to directly address: I am writing a vector editor. The basic idea is to provide an edit window, with a cursor, in which the user can enter, modify, and delete positive and negative numbers separated by spaces (hence, acceptable characters are " -.0123456789" and maybe "abcdefABCDEF" for hex input). When the window loses focus (and I'm amenable to *simulating* its receiving and losing focus), the entire vector needs to be evaluated, and if there are errors, the cursor must be positioned at the first one, to give the user an opportunity to correct the problem. (Although this is a tangential point, let me say that there will be ways other than direct input for the edit window to get populated; in fact, direct editing by the user will probably be the exceptional situation - but I must provide for it. The more typical use of the edit window will be simply to scroll through and examine data.) >My biggest concern would be application error recovery. ... you need to go >the extra mile and try to bulletproof every aspect of your code. Yes, I know. I can't tell you how much I {HATE,DESPISE,DETEST} programs (Internet Explorer, in the context of HoTMaiL, being a prime example, which is why I'm composing this offline using a more dependable program; as well as entirely too many shareware programs - I mean, people actually expect you to PAY to have this done to you!) that cavalierly toss away minutes to hours of my work by crashing abruptly without saving my data. I am actually of the philosophy that any worthwhile program will enable you to restart it and return, for all practical purposes, to exactly where you left off when the program shut down - for whatever reason, and no excuses accepted for failure or "inability" to do this. (The program would be able to do this if the programmer had thought to make it feasible.) WHY this is not an emerging standard in software development, now that processor speed enables us to begin thinking seriously of implementing it, at least as an option, in the majority of contexts, I don't know. >Most of your fatal errors in Euphoria will probably come from attempting to >slice a sequence that is shorter than you thought. ... you will need to add >tests before any operations that could fail. Yes, I have experienced this, and try try try to remember not to make assumptions about the lengths of sequences. >... assert Another good idea, thanks. Actually, I was looking this morning at the error handling in Al Getz's mathlib, and I quite like that approach. The program would have to be carefully crafted to recover gracefully from errors that can be anticipated. In any case, an error log (some form of extended error info) would be made available for troubleshooting / debugging. >>2. if development is likely to proceed as rapidly when I get into the >>serious detail work >This is more an issue of programming skill and application complexity than >anything else. My crystal ball is a bit cloudy on that. Understood. What I actually meant was, BECAUSE Euphoria shields us from a lot of details that we may prefer to ignore for rapid prototyping, but might actually want to have available when we're doing production-quality work (the C global variable errno comes to mind as an example), mightn't one find himself fighting or seeking to undermine the very simplicity (simplification?) that makes Euphoria initially attractive? Another feature I'd really like to have available is some sort of exception handling - facilitating the localizing of a "crash" to a routine or subsystem, rather than having the whole system go down in flames. >>3. exactly which tools to use >Unless there are compelling reasons to move to the latest 'bleeding edge' >release, you probably want to develop on the most recent stable version - >no matter what the language, and what the library. That way, you can >concentrate on coding instead of debugging the library. >Of course, if you need tools that are only available in the 'bleeding >edge', that pretty much limits your options. Yes, that's the issue alright. So let us circle back around to your intiial statement that "Win32Lib is pretty complete," and my offering an example of needing to do something, right off the bat, that may tax or overwhelm Win32Lib's facilities. This is probably not a simple question. Thanks for your ideas, opinions, and suggestions. George Henry _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
6. Re: Serious development
- Posted by George Henry <ghenryca at HOTMAIL.COM> Nov 23, 2000
- 364 views
- Last edited Nov 24, 2000
Kay kindly replied to my request for data: >>exactly which tools to use ... GUI aspects >I suggest you leave the gui till last, and go forth with the rest of the >code. Not so easy. As far as I'm concerned, having a GUI is an *essential* part of prototyping this thing. It's an inherently complex application - say, on the complexity plane of a programming language with a large library of routines - and, take my word for it, it NEEDS a GUI to be usable. As a rough comparison (although my app isn't exactly a game), although maybe one *could* play SimCity using text mode or some kind of "script" interface with the game engine, would it be especially fun and engaging, and do you think *even the developers* would have cared to work with it given such interface limitations? And not that I would go so far as to let the UI drive my design, but I think I will have a better end product by developing the UI in tandem with everything else. It must all fit together hand-in-glove fashion (the user's hand in the program's glove), ultimately, and the sooner I can start "fitting the glove," the better. >>OOP or not? >Personally, i would not do OOP, Turbo Pascal left a bad taste in my mouth >with what oop was implemented in version7. To me, oop slows down the >application, too. Ymmv. Well, that's Turbo Pascal. Eiffel translates directly to C and is supposed to be snappy performance-wise (as well as having cool features that you probably haven't dreamed of, unless you've read Eiffel propaganda as I have). However, here budget comes into play. For Eiffel, one must plunk down $$$, with the cost of MSVC on top of that to compile the translated code. (But there are several Eiffel vendors, and my comments apply to ISE, the company run by the language's inventor. Maybe the cost is less elsewhere.) George Henry _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
7. Re: Serious development
- Posted by George Henry <ghenryca at HOTMAIL.COM> Nov 23, 2000
- 368 views
- Last edited Nov 24, 2000
>The most important question is what are you developing? See below (way below). >high speed Ultimately, I will need that. >large picture filtering I don't know about filtering, or working with large pixs. I think I can keep most of the graphics small. >then you wont want to use Euphoria unless you can isolate these areas and >code them in another language like C, and then link them to a Euphoria >coded GUI. Yes, well ultimately I may very well rewrite in another language, but for the prototyping speed I want to work in Euphoria initially. >Another area to explore is coding in Euphoria with the advanced knowledge >that you will translate (by hand) the resulting code into C or C++. If you >stick to certain styles of programming its a breeze to convert all the >statements to C and compile. Well, there you go, I did have that possibility in mind. Can you give examples of what you mean by "certain styles of programming?" I would think that ANY disciplined style would work. I would rather write a few additional routines or even subsystems to emulate some of Euphoria's features via another language, that abstain from using those features when coding in Euphoria. >... single dimensional sequences of fixed length to make converting to C++ >arrays very simple. I need the variable length, one-dimensional or maybe, in a few cases, two. I'm not opposed to dynamically allocating data structures, if I have to. >>Good luck with it, The working name of "it" is KXZZXK, and of course there is a story behind that. It's a music composition program. I am fed up with trying out the various TOYS available as freeware/shareware. Some of them embody good ideas, but they are all too limited. And I fear for the safety of my computer, from crashes that take *&@#^*#@$ Windows down with the programs. My frustration has crystalized into a determination to write my own program that will blow the doors off the limitations of those other programs. My friend Cameron, a professional musician, has been complaining to me about the limitations of the various spendy commercial products, as well. Frankly, I think I can do better. Not all in a single fell swoop, but I believe even version 1.0 can demonstrate to the perceptive that something new, powerful, and rich with potential has appeared. I told Cameron that I was calling my program Composer, whereupon he, being partial to K's, X's, and Z's, suggested Kompozer X. So to drown him in his own medicine, so to speak, I've been calling the program KXZZXK. 'Tis just a working name, however. 8^) >>and let us know how its comming along. Progress is being made, however slowly, as I have a regular job to attend to as well. Best regards, George Henry _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
8. Re: Serious development
- Posted by Derek Parnell <dparnell at BIGPOND.NET.AU> Nov 24, 2000
- 371 views
> It's a music composition program. I am fed up with trying out the various Best wishes George. I too am a frustrated composer. The commercial software that I've used always has a "gotcha" lurking away. My favorite application is "Music Works" (an Australian product of course). ------ Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot)
9. Re: Serious development
- Posted by Bernie <xotron at PCOM.NET> Nov 23, 2000
- 371 views
George: Are you talking about a sequencer. There are sequencers that have been writen in dos. As far as the name composer there are sequencers out there that already use that name. Are you going to be displaying staffs, and etc. If you look at david's site he has a program for generating music. Also one of the users on rhis message board is at or works at music school. Bernie
10. Re: Serious development
- Posted by George Henry <ghenryca at hotmail.com> Nov 23, 2000
- 398 views
- Last edited Nov 24, 2000
>Kay kindly replied to my request for data: Sorry, Kat. A small typo. 8^) _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com