10-26-2004, 07:03 AM
Quote:Here's what I made today (in 20 minutes):.....Looks interesting. Give me some time to run a test on it (more than 20 minutes) like I did with Meg's solution. I'll get back to you.
*****
Quote:Here's what I made today (in 20 minutes):.....Looks interesting. Give me some time to run a test on it (more than 20 minutes) like I did with Meg's solution. I'll get back to you.
Quote:Hello, Moneo......ToohTooh,
Quote:Having said what you did however, creating a whole function to do some very simple algorithm may do nothing more than clutter up the namespace and confuse some people... not so much a problem in object orientated languages however!:humm: I think my 'dissertation' wasn't to the point on your side. *Sigh*, and such...
Quote:ToohTooh,You are getting on a bit, Moneo.
Your dissertations are much Tooh much for me. :wink:
*****
Quote:I'd like to clarify your concerns about my suggestion numbered (4) by giving a brief understanding of Discrete Maths. This is the area of maths which deals with discrete, unconnected objects, events which we use in analyzing our programming methodology -- that is algorithms, artificial intelligence applications, and so forth.To be exact, Discrete Maths (a part of a.o. Linear Algebra) is the face of maths that deals with functions that cannot be expressed in multiple "normal" maths functions (like +, -, *, /, ^, int, diff, etc). Also, the return value of these discrete functions may differ completely from those in Algebra. Resulting from these 2 statements, we conclude that Discrete Maths cannot be analyzed by standard algebra only. That's why there is Discrete Maths. The easiest example of a discrete formula is:
f(x): x -> INT(x);
f(m, y): m, y -> 30 + ((m + (m > 7)) MOD 2) + 2 * (m = 2) + (m = 2) * (((y MOD 4 = 0) AND (y MOD 100 <> 0)) OR (y MOD 400 = 0))
Quote:(a) Algorithmic thinking: This deals with the ways we use to build unique solutions to the unique problems. My IsAValidDate() is a good example of this, and it is pretty well written: You can subdivide it into discrete sets to understand or test separately [IsALeapYear(), Tokenize()].Exactly, but keep in mind that we need not build unique solutions for each unique problem. Many solutions for completely different problems may well suit on a specific other problem.
Quote:(b) Discrete structures: This deals with the ways we include "others' solutions" to our projects. What are they? Binary trees they are, linked lists they are, hashing they are. On many of them, much discussion have been made, and they are 'de facto' standards in some cases. Please refer to my suggestion numbered (1) of my past post to understand what I mean.I'd like to make a note about this, correct me if I'm wrong. I think Binary Trees and Linked Lists are no specific solutions to any problem, so I don't think they will fit in as an example. This, as binary trees and linked lists were made in order to accomplish a specific goal using those things. In most cases, binary trees and linked lists are just ways or utilities to accomplish a goal. When cut loose from its purpose-serving environment, Binary Trees and Linked Lists are useless and are no goal on its own.
Quote:So, my efforts on suggesting 'break them down!' aren't just a matter of obsession, but the Computer Science itself.Correct. It is essential in any field of computer science (and other) to break apart bigger problems into smaller, easier to solve problems. Of course, many big problems can be split apart in many different ways, and it's the trick to find a way that suits well your needs.
Quote:Let's say our IsAValidDate() went international to meet different sorting of Date, Month, Year trilogy. If we were to pack everything into a single function, testing and updating it would be tad more painful. Think of giant games, database systems, or operating systems functions!.. But in this case, we only need to update and test result = Tokenize(...) or better, just implementMake your functions orthogonal! It's the key in large scale programming. Making your projects this way will save you extremely much hassle later on, either when you need to correct bugs, or when you need to globalize your program (make it accept multiple data formats, often bound to specific countries).and only test FormatDa$() to see if it meets our criterias.Code:result = Tokenize(FormatDa$(Da$), ...)
Quote:If you are interested, I may suggest you some books on Discrete Maths. But, better, search for them in your favorite searching engine. Even better, go to your local library and find the one which suits you best.I have a very good book "The Pragmatic Programmer". It teaches extremely helpful things needed in programming.
Quote:correct me if I'm wrong. I think Binary Trees and Linked Lists are no specific solutions to any problem, so I don't think they will fit in as an example. This, as binary trees and linked lists were made in order to accomplish a specific goal using those things. In most cases, binary trees and linked lists are just ways or utilities to accomplish a goal. When cut loose from its purpose-serving environment, Binary Trees and Linked Lists are useless and are no goal on its own.
Quote:I'd like to make a note about this, correct me if I'm wrong. I think Binary Trees and Linked Lists are no specific solutions to any problem, so I don't think they will fit in as an example. This, as binary trees and linked lists were made in order to accomplish a specific goal using those things. In most cases, binary trees and linked lists are just ways or utilities to accomplish a goal. When cut loose from its purpose-serving environment, Binary Trees and Linked Lists are useless and are no goal on its own.Well, no... This is like saying
Quote:I have a thing for tin openers; will they teach me how to design one if I am to enroll at Mechanical Engineering?When you enroll at mechanical engineering, they won't be teaching you to design a tin opener. But, you will learn 'principles of designing.'
Quote:Make your functions orthogonal!Your intent isn't clearly understood on the 'orthogonal design.' May be you are confused. Did you mean 'orthogonal expansions of recursive functions?' Or, 'orthogonal system design' of software engineering? I was thought some 'orthogonality' in Business Statistics when was in Business School, too. Either case, it would go beyond the scope of this forum.
Quote:When you enroll at mechanical engineering, they won't be teaching you to design a tin opener. But, you will learn 'principles of designing.'I noticed my thinking mistake after oracle posted his reply. Sorry about it. (I think I missed some steps in my logical thinking process).
Binary Trees are just the same: It's your own duty to tailor them to your own needs. Computer Scientists of Turkish Ministry of Culture are designing a virtual 'Music Museum.' Artists will be able to search for matching notes. They are using Patricia Tries. Were scientists thought musical searching through Patricia Tries? Probably not (well, some new programmes have 'Musical Searching' CS courses in Turkey).
Quote:Your intent isn't clearly understood on the 'orthogonal design.' May be you are confused. Did you mean 'orthogonal expansions of recursive functions?' Or, 'orthogonal system design' of software engineering? I was thought some 'orthogonality' in Business Statistics when was in Business School, too. Either case, it would go beyond the scope of this forum.Every time I post "serious" posts like last one, it is preceded by a lot of thinking and logical deduction. I couldn't have possibly been confused, as I clearly have the same definition of orthogonality. The only thing might be that I explained it fuzzy and perhaps even incorrect. Again, sorry.
PROGRAMMING RULE 13:
ELIMINATE EFFECTS BETWEEN UNRELATED THINGS
Design components that are self-contained, independent, and have a single, well-defined purpose.
Quote:Much software is designed in a non-orthogonal fashion: Even much of Windows. Because, it is very hard to design one orthogonally. Personally, I haven't designed one, either (hey, I'm only 22)I already said something similar in my previous post, and I think it can be stated that very few *real* orthogonal systems have been designed yet, as it is so difficult to make one. As far as I can see, even major software developers have trouble making it as orthogonal as possible.
Quote:Some books should occupy the rest!.. Happy reading!.As I said, I already have a good book which almost covers every aspect of projects and programming Btw, I don't really have the time to read books atm
Quote:... am I the only person that has absolutely no idea what is going on in this thread?Well, I think we're discussing some of the deeper topics of programming