09 June 2006, 03:11 | #41 |
Zone Friend
Join Date: Jan 2006
Location: Kent
Age: 51
Posts: 1,079
|
Wish i had more time to learn programming.I think i have the basic understanding of how it works and have even written a snake program using c64 basic (wow) , but when your working on other stuff that takes just as much effort as programming clearly does , then it doesn't really leave you much time.I'd love it to be a hobby but that wouldn't make any money coming my way.I get quite envious of you programmers , it must surely rank as one of the coolest jobs on the planet.
|
09 June 2006, 03:40 | #42 |
E.A.B Addict and Proud
|
@Snyp OO would that be object orientation??? And @ant152 i did think of hierarchical chain/tree etc but since i couldnt spell it i didn't say it also i thought of a tree as in dos tree etc i suppose nesting could be another name! That would be under Ray Norrish's Hedge approach
It's all quite obvious really think of the world cup currently about to start and how that is also a tree of which branches will be removed and how they will get fewer in number as the tournament goes on and how variables will break some of those branches off via an injury or from some other unknown quantity like a bent ref lol Or Englands fave Penaltys |
09 June 2006, 10:21 | #43 | |
move.w #$4489,$dff07e
Join Date: Sep 2005
Location: Norfolk, UK
Age: 42
Posts: 2,351
|
Quote:
|
|
09 June 2006, 12:30 | #44 | |
Registered User
Join Date: Dec 2002
Location: California
Posts: 965
|
Quote:
What distresses me most is programmers who don't know the basics of computer science. Data structures like trees are just one example of this. You can throw in linked lists, skip lists, search routines (bubble/quick/shear/etc), bitmasks, bitshifting... I went out of my way to learn all this stuff when it became apparent that I was constantly re-inventing the wheel every time I tried to write something complex (re-inventions include RLE, dictionary-based compression and trees). Perhaps even more distressing than that are programmers who claim not to need to know any of this stuff. I've been told by a programmer that he didn't need to use classes in VBScript (ASP) because he couldn't see how they were relevant to his work. Every time he had a new website to build he started from scratch. I used classes instead, and gradually built up a whole library of frequently-used classes. He'd spend weeks coding, I'd just bolt classes together. Bitmasks are another one. I use them all the time, but most programmers I talk to have no idea how the AND and OR operators work. I use them in SQL scripts too, and have encountered programmers who thought it was impossible to bitshift or use bitmasks in SQL. Imagine you want to store the opening days for a shop, for example. You could either have a table with seven rows for each shop, each row representing a day of the week, containing a single bit field (1 for open, 0 for closed), or you could have one row for the shop and store the open days as a bitmask converted to a decimal. The bitmask requires less storage space and considerably less code to process. With VB.NET on the scene, I imagine that we'll have a whole subset of programmers whose only talent is to hunt through the IDE's intellisense to find the command they think they need. But what if System.Diagnostics.DoMyWorkForMe isn't a valid method? |
|
09 June 2006, 12:54 | #45 |
Zone Friend
Join Date: Oct 2004
Location: here
Age: 54
Posts: 97
|
To answer the original question, I was lucky to have experienced programmers as friends.
And with regard to the tree design, it might be a tree on paper but that does not mean that the different structures interact the same way. Recursion is another one of those "bad" things, especially if you have large amounts of data and a stack overflow can affect stability (yet, it is still popular in schools). What I'd suggest is to completely rewrite the software since the more complexity is added the more chance for bugs there is. In addition, C++ is more difficult to use, understand and maintain than any other language I know of (Java MIGHT be the exception). C is easier to work with (and more efficient) and has even the additional benefit that competent programmers are easier to come by. |
09 June 2006, 13:21 | #46 | |
Registered User
Join Date: Dec 2002
Location: California
Posts: 965
|
Quote:
Even if I wasn't going to use a tree, I'd still want a single entry point and a decent interface to the structure. C++ isn't an option. The system was written in VB.NET, and there's no way the company will consider abandoning the work that's gone into it so far. If IT was a horse, my company would ride the horse at a gallop until it collapsed and died, at which point they'd pick the horse up and carry it. They wouldn't consider slowing down, and they certainly wouldn't consider replacing the horse. My current plan is to slowly build a car beneath the horse, then whip the horse off and *tada!* a system that works. |
|
09 June 2006, 13:22 | #47 | |
Music lord
Join Date: Jun 2003
Location: Liverpool, UK
Age: 50
Posts: 630
|
What's the obsession with trees? If you'd drawn that diagram for me, I wouldn't have had a clue what on earth you were getting at. I wouldn't have said the word "tree". Why? Because you'd just drawn one! Of course it's a tree! Look at it! I'd feel like you were patronising me. It's not that I have no knowledge of data structures, just that the answer is so ridiculously fundamental, I wouldn't expect you to ask something like that. Maybe it's just me.
Quote:
I would never recommend that anyone learn C instead of C++. C++ is easy to learn when you don't have the noose and bad habits of C knowledge around your neck. |
|
09 June 2006, 13:41 | #48 |
Oh noes!
Join Date: Mar 2003
Location: Neverland
Posts: 766
|
Well.. I can't say I'm good at it, but most of what I know that's not script/google look-up is from Programming abstractions in C By roberts 2nd course. I got most of knowledge about background stuff there which is everyday now; stacks, queue, hashtable, sorting complexity and so on...
After that I just mostly do Java or C# stuff both have a structure/syntax that reminds me of C (never was a fan of basic) but a lot less hassle with memory management. Last edited by spiff; 17 October 2020 at 15:03. |
09 June 2006, 14:05 | #49 |
Zone Friend
Join Date: Oct 2004
Location: here
Age: 54
Posts: 97
|
Don't know if this is still true but last I checked C programs compiled under both Borland and Microsoft C compilers were running faster. If you look at the run-time library source (back in the day, ok, it might be different now), you would see how much more complicated the startup/initialization routine was (for the beloved >> for example).
Never made the jump because there never was a need for it. There is nothing that can be done in C++, that cannot be done (most times better) in C. The reason why people feel C++ classes are so much better is because programming style has improved and nowadays more planning goes into a project. C programs can be just as easily structured as well as the data stored. Operator overloading is BTW a major problem with C++ since the smart programmer can overload anything causing big confusion when reading the source. And Borland and Microsoft compilers catch invalid type assignments (it is displayed as a warning since it can be intentional though it is good style to typecast eliminating any issues, surprised ? ). Not sure how you came to believe C++ is superior to C but I fear it is what most people believe. Spiff, the best C reference is "The C Programming Language" (ISBN 0-13-110362-8) by Kernighan and Ritchie. It is a small book that pretty much contains the fundamentals. |
09 June 2006, 14:56 | #50 | ||||||
Music lord
Join Date: Jun 2003
Location: Liverpool, UK
Age: 50
Posts: 630
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Last edited by FromWithin; 09 June 2006 at 15:15. |
||||||
09 June 2006, 14:56 | #51 | |
Registered User
Join Date: Dec 2002
Location: California
Posts: 965
|
Quote:
Instead, the candidates I interviewed told me they'd use three classes, one for each level of the structure. So what happens when you need new levels? New classes. And how do you store this in the database? Three tables. New levels to the structure? New tables. There's no obsession with trees - I'm looking for decent programmers that know the basic principles. The tree just happens to have been relevant to the project that the programmer would be working on. How can something so ridiculously fundamental be so completely outside of the knowledge of three people with such lengthy development experience? |
|
09 June 2006, 15:13 | #52 | |
Music lord
Join Date: Jun 2003
Location: Liverpool, UK
Age: 50
Posts: 630
|
Quote:
So maybe they didn't hear the part about n. Or something. |
|
09 June 2006, 15:24 | #53 |
Zone Friend
Join Date: Oct 2004
Location: here
Age: 54
Posts: 97
|
First off, I worked with embedded systems and every byte can count when you need to squeeze things in. Performance is also affected because the more inefficient code is linked (I know, printf isn't THAT much better...)
Ok, so streams offer less security issues ? I remember when I was playing with a C++ compiler, I used << to get keyboard input and not sure what I pressed (while back) but the program crashed (was Borland I believe). So much for reliability or security (I think I just hit enter or something). Whether you write in C or C++ you will not use standard input functions simply because a good programmer checks before storing the value. Again, I agree cryptic code is not a good thing. It can be required for speed-relevant tasks though I usually link them as assembler sub-routines. Documentation is everything and a "good" program should be understood by everybody and not win some obfuscated C code prize...lol Now you keep saying that I am wrong and classes are so great. What extra code do you feel you have to add to gain the same benefits ? And yes, but operator overloading can be an issue if you have different operations for the operator and trying to find out what is going on right now in a program. But of course that is just my opinion and I am sure I could get used to it if I had to. Not the last straw for me but why don't we discuss an example so you could show me what I could gain by using classes that can only be done with very complicated routines in C ?! Next point: Type-casting allows easier operations. A byte, a char and a short int (on 16 BIT) are all the same size, 8 BIT. I can either do it very complicated by creating a union (or whatever C++ would do) or I can type-cast. It is more flexible to accomodate any type into memory. If I had a structure that can contain any type of information, this would be an easy way to go (ok, lame example but it is kinda early here..lol). And last but not least, better defines the time it takes to write and test the software as well as the time it takes to perform the task. Assembly language CAN be more efficient but only if the programmer knows what he or she is doing. Bad assembler coding can cause performance decreases compared to a C equivalent. Furthermore, assembler code takes longer to develop (but you know all this). And yes, OO languages call for separation and isolating tasks. That's why many programs are twice as long, the definitions take up so much room and ant512 isn't even happy... |
09 June 2006, 16:31 | #54 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
and you have all gone completely off-topic!
|
09 June 2006, 17:30 | #55 | |
Registered User
Join Date: Dec 2002
Location: California
Posts: 965
|
Quote:
For a very long time I was an abysmal coder, mainly because everything I did was trial-and-error. I had difficulty getting hold of any books about programming at all, and the ones I did get didn't make any sense. It's only in the past half a dozen years or so that I've graduated from "abysmal" to "bad", simply because I can research on the internet now. I'm firmly of the opinion that writing games gives you the best grounding in coding. If you start out writing business applications in VB you'll learn bad habits. If you start out writing tight code for ambitious games on underpowered hardware, you'll learn better techniques. Writing apps is a very different experience to writing games, though, so you won't be able to jump from one to the other immediately. Games demand fast code; apps demand readable code. However, I'm certain that the average game coder will be able to adapt to app programming faster than the average app coder could adapt to writing games. |
|
09 June 2006, 17:36 | #56 | |
move.w #$4489,$dff07e
Join Date: Sep 2005
Location: Norfolk, UK
Age: 42
Posts: 2,351
|
Quote:
|
|
09 June 2006, 17:39 | #57 | |
(Amigas && Amigos)++
Join Date: Sep 2005
Location: Anrea
Posts: 999
|
@ant512
Quote:
I give my vote to C over C++, only cos I don't know C++ that well, but do realise that you have to be careful in C, b/c it does not enforce those information hiding and interdependency/module coupling concepts due to no default concept of classes/objects - you are free to make good or bad design as you wish! And the more talented programmers probably don't need to follow any of the concepts/rules to make their programs work without bugs. Not saying I am great, but probably the ppl in this thread are better than the average at work. Back on topic, I first learned C on the humble old A1000 Lattice C compiler K/S 1.1, from a Waite Group C Primer Plus textbook. Good read with nice cartoons Guess that fun to read book and the Amiga 1000 combo eventually made me make a living from software engineering. Had to write my own custom boot floppy to copy the whole disks and include libraries into RAD: to speed up the compiling! Back in those days I guess the 80286 was better at compiling...... but I have never coded C on a PC so wouldn't know. Only use Unix. Never learned ASM, since they didnt use it at school/uni/work, but have always wanted to just so I could do cool things on my Amiga. Which is why it is great bippym is driving that! |
|
09 June 2006, 17:45 | #58 | |||||
Music lord
Join Date: Jun 2003
Location: Liverpool, UK
Age: 50
Posts: 630
|
Quote:
Quote:
Quote:
Quote:
Quote:
|
|||||
09 June 2006, 19:57 | #59 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,016
|
For embedded systems, I cannot logically think why anyone would ever go down the high level language route. ASM every time for such space critical components as embedded.
|
09 June 2006, 21:58 | #60 |
Zone Friend
Join Date: Oct 2004
Location: here
Age: 54
Posts: 97
|
All new compilers call themselves C++ compilers. I do not believe that there is a dedicated C compiler still being developed. Speed is always important and should not be neglected. Granted, crappy Visual BASIC code runs fine since computers are powerful enough to camouflage bad coding. But, I have seen "serious" VB software that was written inefficiently, stealing code and the programmer not understanding why he was doing something.
The compiler I was referring to was Borland C++ for Windows, not exactly the newest version anymore but not the oldest either. It also doesn't take that much effort to check input in C. With Windows handling most of the I/O, it can be difficult to do either way... Next point, the C++ functionality. Well, maybe not everything has to be done the way C++ does it and it can still be as effective ?! Why would you need a jump table though ? You don't need a jump table, just a function pointer for the object to inherit. And the type casting is not really a bad thing at all. You just have to realize why C is so tolerant and just because you can doesn't mean you have to. And a generic buffer is a good example. You can use the buffer for keyboard input, disk I/O...etc Yes and no. I did/do both, programming alone and in a team. Like I said before, it is very important for the code to be readable. Also worked on planning some projects, funny how you'd tell me how to structurize... And the reason why not everything is done in assembler is because maintenance costs are lower for C and if the programmer is not good at it, the code can be worse and harder to debug. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
External windows program communicating with program running inside WinUAE | xxxxx | support.WinUAE | 10 | 19 February 2013 09:27 |
I want to learn about Workbench | mancity | support.Apps | 26 | 21 May 2012 06:14 |
To Late To Learn How To Program On The Commodore 64? | Kitty | Retrogaming General Discussion | 10 | 01 November 2009 21:11 |
Want to learn how to dissassemble games | Keeks | Coders. General | 7 | 06 November 2008 18:10 |
A little lesson to learn about Pong | MethodGit | Retrogaming General Discussion | 7 | 07 December 2001 13:03 |
|
|