-- Steve Fosdick fozzy@pelvoux.demon.co.uk wrote:
On Thu, May 03, 2001 at 09:02:08AM -0700, David Freeman wrote:
But I've just written my first kernel MODULE!!! and it work, which
was
a big surprise
What does it do?
Prints Hello World of course, a programmer like you should know that thats the first program you always right :o) Seriously when you insmod it it prints hello world. and when you rmmod it prints goodbye cruel world.
One language I don't want to learn is C++.
I am interested as to why you should say that.
I get the impression that there are many people who think that C++ isn't a terribly pure language or that it doesn't have a particularly clean design. It is, however, very sucessful.
True, bit like windows :o)
I don't think there is any doubt that a language such as C++ is a compromise as C was before it, but compromise isn't necessarily bad.
Exactly, and a compromise is the worst parts of all solutions. The language I am liking at the moment is java, it just makes sense with the OO design etc...
Considering C, I would suggest that without a language like C there would be no portable OS like Unix and Linux. Writing in Assembler would give the required level of run time efficiency and the ability to talk to the hardware when required but not the portability, and just about every other language would have been too inefficient, or unable to access the hardware at the required level.
I would agree, C was one of those things which changed history, without it we would never have the computer revolution we have now. It is however over 30 yrs old, which means it's not as modern and good as a language which was designed recently.
When it comes to the emergence of C++ I would suggest that run time efficiency was still a concern, but there was the added incentive to use C++ - compatibility with C.
Agreed.
As time goes by, run time efficiency is becoming less of a concern and p-code and interpreted languages are now quite realistic for "serious" applications - even so, someone in our office was complaining today how much slower the Oracle GUI tools written in Java (8.1.6) are than the previous ones (7.3.4) not written in Java (I would guess at C++ but that is just a guess).
Exactly, some of the things which in the past would be written such that they would run fast, but now powerful hardware can coverup alot of bad practice.
I Am amazed that there is such a holy war about programming languages, particully the language people first learnt was there favourite and all others are programmed as if they were using the first language.
I'm not sure that this is the case.
There is with alot of people I know who program.
The first language I learnt was BASIC on the Sinclair ZX81. All variable names had to be kept short, there were no blocks, no named functions or procedures, IF statements couldn't have an ELSE part, there was no DO WHILE or REPEAT UNTIL so there had to be lots of GOTOs and GOSUBs.
BBC basic @ 9 yrs old, horrible language, then Visual Basic - I agree with ESR "about as uch fun as a picnic in a toxic waste dump" Z80 assembler and then C. Since learing C I have learnt Java and it makes more sense to me than procedural programming.
I would not be caught programming now in the way that I had to for that version of basic.
Take a look at your older code, you will notice you did very BASIC things in C, I know I have tried these things.
I think it may be the case though that the general methodology that one first learns becomes the default. Those people whose first taste was with procedural programming may always find that more natural than OO or the kind of thinking required for Advanced use of SQL.
Yes I would agree with this.
Thanks
D
Steve.
alug, the Anglian Linux User Group list Send list replies to alug@stu.uea.ac.uk http://rabbit.stu.uea.ac.uk/cgi-bin/listinfo/alug See the website for instructions on digest or unsub!
__________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
On Fri, May 04, 2001 at 01:15:53AM -0700, David Freeman wrote:
Exactly, and a compromise is the worst parts of all solutions. The language I am liking at the moment is java, it just makes sense with the OO design etc...
Engineering is about making things that are fit for a purpose and very often this involves compromise. A system that will need to be changed but is unmaintainable is not fit for purpose and neither is one that goes to slowly.
Engineering is full of compromises. Take the example of the clutch in a motor car - this is an ineffcient device (wastes energy when it is slipping) and has poor life (it wears out much faster than the engine does) and yet it is still widely used. It is an acceptable compromise.
I would agree, C was one of those things which changed history, without it we would never have the computer revolution we have now. It is however over 30 yrs old, which means it's not as modern and good as a language which was designed recently.
What of Linux then? Much of the Linux functionality is a clone of Unix which is also the same age. Should we switching to something more modern like MS WIndows?
Actually there is some debate as I understand as to whether we should move away from monolithic kernels towards a microkernel and message passing (which suites OO design).
The last article I read in which Linus made any comment on working with microkernels he likened it to masturbation.
....
BBC basic @ 9 yrs old, horrible language, then Visual Basic - I agree with ESR "about as uch fun as a picnic in a toxic waste dump" Z80 assembler and then C. Since learing C I have learnt Java and it makes more sense to me than procedural programming.
Another interesting viewpoint. When I first encountered BBC BASIC the only comparison I could make myself was against the BASIC on the Sinclair machines (ZX81 and Spectrum) and comments made my friends about other home computers they owned. BBC Basic was considered good because it had long variable names, named procedures and a proper IF/THEN/ELSE, and REPEAT UNTIL.
Take a look at your older code, you will notice you did very BASIC things in C, I know I have tried these things.
The language I learnt after Sinclair BASIC was Z80 Assembler and it was quite imposible to do BASIC like things in that. Next was BBC BASIC, then 6502 Assembler. At that time I also tinkered with Pascal a little (enough to discover that unextended ISO pascal at the time was not a useful language) and a bit more with BCPL.
After that I learned C, programmed in HP Pascal, learnt and used TQL (an SQL like language), then programmed in C, C++, then learnt and used SQL.
Of all these SQL is the odd one out and, while I usually don't have a problem with SQL, it does seem to be capable of complexity explosion - i.e. you take a very straightforward query and need to make a small change to it and and up with something very much more complicated, and I often think how much simpler it would be sometimes to write something like:
for every row of table x where condition y for every row of table a where condition b do g,h,i,j end end
rather than a big join with unions too and both lists of columns and conditions repeated in various places (waiting for the unwary maintainer).
Steve.
--- Steve Fosdick fozzy@pelvoux.demon.co.uk wrote:
On Fri, May 04, 2001 at 01:15:53AM -0700, David Freeman wrote:
Exactly, and a compromise is the worst parts of all solutions. The language I am liking at the moment is java, it just makes sense
with
the OO design etc...
Engineering is about making things that are fit for a purpose and very often this involves compromise. A system that will need to be changed but is unmaintainable is not fit for purpose and neither is one that goes to slowly.
Very true, but things need to be designed not created, which means that things like expansion etc... need to be designed in from the beginning, compromises whould be minimial.
Engineering is full of compromises. Take the example of the clutch in a motor car - this is an ineffcient device (wastes energy when it is slipping) and has poor life (it wears out much faster than the engine does) and yet it is still widely used. It is an acceptable compromise.
Very True, but what method would you suggest instead of a clutch?
I would agree, C was one of those things which changed history, without it we would never have the computer revolution we have now. It is however over 30 yrs old, which means it's not as modern and good as a language which was designed recently.
What of Linux then? Much of the Linux functionality is a clone of Unix which is also the same age. Should we switching to something more modern like MS WIndows?
Windows and modern in the same sentence? Remember alot of theoretical computer science originated in the late sixties early seventies. And its still tought like that, and as such we have stuff being designed based on very old theory, but it works. If it aint broke don't fix it (or for an engineer, if it ain't broke it ain't got enough features)
Actually there is some debate as I understand as to whether we should move away from monolithic kernels towards a microkernel and message passing (which suites OO design).
Personally I think OO is very sensible, but everything needs to be OO, which Java and C++ aren't. Small talk I believe is the closest thing we have to a true OO langauge. If you think about it, the kernel is an onject, which should be talked to by other objects (programs) to tranlsate and talk to other objects (hardware).
The last article I read in which Linus made any comment on working with microkernels he likened it to masturbation.
Hmmm? INterresting way of putting it.
....
BBC basic @ 9 yrs old, horrible language, then Visual Basic - I agree with ESR "about as uch fun as a picnic in a toxic waste dump" Z80 assembler and then C. Since learing C I have learnt Java and it makes more sense to me than procedural programming.
Another interesting viewpoint. When I first encountered BBC BASIC the only comparison I could make myself was against the BASIC on the Sinclair machines (ZX81 and Spectrum) and comments made my friends about other home computers they owned. BBC Basic was considered good because it had long variable names, named procedures and a proper IF/THEN/ELSE, and REPEAT UNTIL.
BBC basic was good for the reasons above, but bad cos it used goto's etc...
Take a look at your older code, you will notice you did very BASIC things in C, I know I have tried these things.
The language I learnt after Sinclair BASIC was Z80 Assembler and it was quite imposible to do BASIC like things in that. Next was BBC BASIC, then 6502 Assembler. At that time I also tinkered with Pascal a little (enough to discover that unextended ISO pascal at the time was not a useful language) and a bit more with BCPL.
look at the way you approached assmebler tho, I bet you though in terms of if thie do that, instead of in assembler commands? how did you design it? I no that when I did z80 assembler I wrote the basic program in a high level basic and translated it.
After that I learned C, programmed in HP Pascal, learnt and used TQL (an SQL like language), then programmed in C, C++, then learnt and used SQL.
lots of languages, impressed.
Of all these SQL is the odd one out and, while I usually don't have a problem with SQL, it does seem to be capable of complexity explosion
i.e. you take a very straightforward query and need to make a small change to it and and up with something very much more complicated, and I often think how much simpler it would be sometimes to write something like:
for every row of table x where condition y for every row of table a where condition b do g,h,i,j end end
rather than a big join with unions too and both lists of columns and conditions repeated in various places (waiting for the unwary maintainer).
Again SQL is a comprimise in some ways, it needs to be simple as the people who orginally used it were not techies, and would telnet into a SQL server and then issue the commands by hand. Remember context.
Thanks
D
Steve.
alug, the Anglian Linux User Group list Send list replies to alug@stu.uea.ac.uk http://rabbit.stu.uea.ac.uk/cgi-bin/listinfo/alug See the website for instructions on digest or unsub!
__________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
David Freeman wrote:
--- Steve Fosdick fozzy@pelvoux.demon.co.uk wrote:
On Fri, May 04, 2001 at 01:15:53AM -0700, David Freeman wrote:
Exactly, and a compromise is the worst parts of all solutions. The language I am liking at the moment is java, it just makes sense
with
the OO design etc...
Engineering is about making things that are fit for a purpose and very often this involves compromise. A system that will need to be changed but is unmaintainable is not fit for purpose and neither is one that goes to slowly.
Very true, but things need to be designed not created, which means that things like expansion etc... need to be designed in from the beginning, compromises whould be minimial.
expansion does not need to be designed in in the first place, if a piece of software is well designed, it should be possible to expand it later, software engineering is not about allowing for future expansion, it is about providing sufficient documentation and well defined communication methods to make future expansion possible.. ie: you don't have to design a system to be expandable or adaptable in the future, if it is well designed these features will be present anyway. Unfortunatly a lot of people call themselves software engineers when they don't really understand the concepts or practice the basics.... I have been known to fall into this category every now and then ;)...
Engineering is full of compromises. Take the example of the clutch in a motor car - this is an ineffcient device (wastes energy when it is slipping) and has poor life (it wears out much faster than the engine does) and yet it is still widely used. It is an acceptable compromise.
Very True, but what method would you suggest instead of a clutch?
erm.. an automatic clutch ;).. a well designed one is very efficient.. I believe that Steve was talking about the clutch plate and manual pedal ??
Actually there is some debate as I understand as to whether we should move away from monolithic kernels towards a microkernel and message passing (which suites OO design).
Personally I think OO is very sensible, but everything needs to be OO, which Java and C++ aren't. Small talk I believe is the closest thing we have to a true OO langauge. If you think about it, the kernel is an onject, which should be talked to by other objects (programs) to tranlsate and talk to other objects (hardware).
The concept of OO is apealing to some, and dreaded by others. I think in an OO fashion and I find it very easy to program in, a friend thinks in a more procedural way and finds OO very hard. In terms of coding, OO trys to force good habits like documented message passing and the like, BUT this can lead to very inefficient code in some circumstances... There are certain times when OO is apealing, and others when it is not... providing reusable adaptable classes which are documented is a good thing, but the execute time for the code may not be as efficient as a procedural method..
Anything can be thought of as an object, but I would say that the kernel is not an object in the OO sense ;)..
BBC basic @ 9 yrs old, horrible language, then Visual Basic - I agree with ESR "about as uch fun as a picnic in a toxic waste dump" Z80 assembler and then C. Since learing C I have learnt Java and it makes more sense to me than procedural programming.
Another interesting viewpoint. When I first encountered BBC BASIC the only comparison I could make myself was against the BASIC on the Sinclair machines (ZX81 and Spectrum) and comments made my friends about other home computers they owned. BBC Basic was considered good because it had long variable names, named procedures and a proper IF/THEN/ELSE, and REPEAT UNTIL.
BBC basic was good for the reasons above, but bad cos it used goto's etc...
Just an interesting link onm the subject of goto less programmers.
W. Richard Stevens' FAQ
http://www.kohala.com/start/rstevensfaq.html
regards
Owen