| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 37731 | 2003-09-16 10:23:00 | computer programming | jayal (1291) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 175747 | 2003-09-17 09:43:00 | hey guys, i'm overwhelmed - thanks heaps for all the advice - am now a programmer/beginner! - i thank you all | jayal (1291) | ||
| 175748 | 2003-09-17 10:35:00 | Great!!! When can I expect your work to hit the latest and greatest? Don't give up! Don't forget SYNTAX which varys between languages, Don't forget LOGIC Don't forget to DEBUG. Don't forget Error trapping. For that one if you want someone to input a Date then the 28th Feb is valid all years. 29th Feb is valid only on leap years. If you are looking for a numeric field like 12 and some idiot types in Jill then there is no point in multiplying by Jack as it were. Bear in mind that all us computer users can ( and will ) break software. Having said that... You might be the next Bill Gates who dropped out of School early and went on further. |
Elephant (599) | ||
| 175749 | 2003-09-17 21:20:00 | Elephant - Bill Gates dropped out of University... not school, lol theres a bit of a difference... There is a saying that programmers say - Make something idiot proof and someone will make a bigger idiot... I had some code which was about 900 lines long, and quickly escalated to 1500 with idiot proofing... lol, its all good though! - David |
DangerousDave (697) | ||
| 175750 | 2003-09-17 22:12:00 | You guys forgot the golden rule: A computer will do exactly what you tell it to do, but this may not always be what you want it to do. |
promethius (1998) | ||
| 175751 | 2003-09-18 06:27:00 | I like Pascal ... and use it by preference. Unlike Fortran, C, C++, etc, it usually won't compile programmes which can't work. :D I think you can still get the Borland Turbo Pascal compiler free. (and the C 2.0). But Pascal still needs checking for user errors. I wrote a function to make a byte containing a 2 BCD digit value from a number (for loading a DS clock chip). The function was a single line. The error checking (numbers > 99, negative numbers) took another four lines. (Of course the error code won't ever be hit, but I trained myself to write the error checking in everything. It's one of my very few good habits. ;-)). At the moment I'm mostly writing/playing in Basic for the PicAXE chips, and PIC assembly code. I hate Basic, but if the limit is 40-80 lines it's not too bad. Assembly code is an acquired taste. :D The PicAXE is a very nice system ... it's probably worth getting one if you want to learn about computers. A starter kit (from Sicom (www.sicom.co.nz)) will cost about $32, which gets you an interface cable, and a CD with the documentation and the Basic editor/compiler/programmer programme, and a PCB and the 8 pin chip, etc. A few LEDs and you can make your own light shows, etc. Silicon Chip magazine has a series about them. |
Graham L (2) | ||
| 175752 | 2003-09-18 13:37:00 | Assembler is great, I did a small bit of forced learning in that recently was rather enjoyable. Also Steve Gibson writes all his programs in assembler apparently. You can still get errors in Pascal. I left out one line of code for the writing of results to a text file which resulted in a text file which was increasing in size at over 10MB per second. I'm sure the teacher was rather stunned at that when they ran the program, had to have got a "hard disk to low" at some stage. |
-=JM=- (16) | ||
| 175753 | 2003-09-18 20:40:00 | Who's Steve Gibson?? - David |
DangerousDave (697) | ||
| 175754 | 2003-09-18 21:03:00 | http://grc.com/ | godfather (25) | ||
| 175755 | 2003-09-19 00:33:00 | > But Pascal still needs checking for user errors . I > wrote a function to make a byte containing a 2 BCD > digit value from a number (for loading a DS clock > chip) . The function was a single line . The error > checking (numbers > 99, negative numbers) took > another four lines . (Of course the error code won't > ever be hit, but I trained myself to write the error > checking in everything . It's one of my very few good > habits . ;-)) . Couldn't someone view that as being bloat :p [b]It just had to said[b] |
-=JM=- (16) | ||
| 175756 | 2003-09-19 05:30:00 | No. It is essential. Any programme that does not check for errors will fail. A programme which calls a system routine and doesn't check the result code will fail. If you are very lucky, the programme will crash. If you are not, it will just carry on with corrupt data. The corruipt data might delete all the files on your disk., or send spam/virus mails to everyone in your address book. :D Many viruses work because there are no checks on the inputs. Every version of a particular OS has had to have patches soon after release, because there is no bounds checking on strings passed to netwrok programmes. When the code is rewritten for the next version, the checks are taken out (probably because "it's faster not to check"). :_| Some companies have no memory. I've seen versions of Fortran which gives an option of getting an error when integers overflow.:O I always enabled that option. I also enabled the compiler option which required variable declaration. I loved the Burroughs machines which gave runtime errors if you used a variable before you had given it a value. That was in the hardware. Bloat is useless "features" added for marketing reasons. |
Graham L (2) | ||
| 1 2 3 | |||||