Sinequanon's Posts
Nairaland Forum › Sinequanon's Profile › Sinequanon's Posts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 (of 37 pages)
Cool. (Note that there is currently an error in your description.) Can you enhance the program to identify when the equations have no solution, or an infinite number of solutions? You could also make the input only accept numbers. If you enter anything else, your program turns into a prophet! It solves the unsolvable! ![]() |
Learning technical jargon is very important. It will save you a lot of time in the long run. Some people remember jargon only for as long as they are learning a new topic. They treat the jargon as a temporary tool. Once they have understood the topic, they forget the jargon. But the same jargon terms turn up again and again in various contexts. You may even have forgotten that you have encountered them before, if you didn't pay enough attention at the time. They are not things you want to keep looking up. That would be unnecessarily time consuming, and it could snowball if the definition of one jargon term uses other jargon terms. You need to learn bit by bit and keep the whole thing under control. Beginners, please start early with this attitude. Remember not only the technique, but the language used to describe it. So, when you learn something new, take your time o, learning the jargon. |
dhtml18:Hi dhtml, refer.ential integrity basically means that if one record on the database refers to the key of another record, then the other record exists on the database. The database would not let you delete the refer.enced record, for example, while another record refers to it. For example, imagine you had a table called "PAYMENT", and each PAYMENT referred to a "PAYEE". You wouldn't want to read a PAYMENT record, try to look up the PAYEE, only to find that there is no PAYEE with the given key on the PAYEE table. But this could easily happen if a program deletes a PAYEE record without checking if there are outstanding PAYMENTS for that PAYEE. It could also happen if a program creates a PAYMENT and a PAYEE record and tries to insert them into the database, but the PAYEE record fails to insert. All manner of poor program design or program bug can mean that the PAYEE is missing. By time you have discovered where the problem is in your program, and fixed the problem, your database may have a lot of missing data. i.e your database lacks "integrity". You can design your database so that it won't let your program make such mistakes. e.g if PAYEE fails to insert, it will throw out PAYMENT, too. It is very important to learn and know how to use these jargon terms. Programmers remember basic facts and material, but spend a fair amount of time looking up specifications and reference documents only as required. This becomes a key skill, and is only possible if you pay good attention to jargon, because jargon (and acronyms) are used everywhere. Without it, a five minute task of checking some basic fact and behaviour could become a project of a few days. |
spikesC:You were the one arguing that "NoSQL is not the answer". I think you have lost track of the point. I was saying WHY NoSQL is useful. It is because it is better suited to TEMPORARY inconsistency and loss of referential integrity. Referential integrity does not require any joins. You are confusing two concepts. spikesC:You are missing the point. Stored procedures were not intended to maintain referential integrity of data distributed across boxes. That is why I was saying that NoSQL is a better solution. spikesC:I don't know why you are arguing. Some systems lend themselves easily to distributive systems. My point is that distributing other systems is intractable. I once worked on a migration project where they discovered that they data could not be decoupled. They nearly decided to can the project, which had already cost 10 million dollars. We really had to jump through hoops to migrate the data, and it was a good job that the data was only temporarily distributed for a few months, while it was being migrated. |
https://i540.photobucket.com/albums/gg348/4umbra/gridsol.png This is the output from my HTML/Javascript program. As well as solve the original problem, you can do a lot of other related things. |
DonSegmond:You are the one who started trolling by getting personal. Don't add hypocrisy to that. There is only one solution. Clearly, GCHQ are not looking for the solution. LOL!! They know the solution. They want to recruit folk with ingenuity, not folk who can google up a constraint solver and pretend that knowledge of prolog or eclipse has anything to do with anything. And, in any case, what I am interested in is folk with the ability to solve the problem, not just to call a solver. |
DonSegmond:Don't be foolish. The Javascript interpreter does not contain the methodology for solving the problem. The method you have quoted, easily available with a quick google search, only restates the problem to make amenable to a solver which you didn't write. I hope that you are not too foolish to know the difference between a solver and an interpreter? ![]() I note that you kept quiet about how quickly your supposed program solves the problem. |
DonSegmond:That is the google answer, and it's a bit of a cheat because you don't write the solver yourself. Don't worry. I have written my own full solution in HTML/Javascript (I used HTML/Javascript for accessibility). I don't brute force anything, and it solves it in 20 milliseconds. How long does your program take? |
proxy20:I didn't say that a stack is a vague idea. It is a fundamental principle in programming. I said that your understanding of how to use a stack for this problem appears to be vague. Again, I ask you: Which of the many configurations will you be putting on your "stack"? And how will you find them? A vague answer that you will use some standard class is not enough. |
proxy20:You can't program with vague ideas like that. |
proxy20:Which configuration? There are many. And how will you do it? |
proxy20:So, you intend to generate all unconstrained configurations of the board and "check" for the one that conforms to the constraint criteria? |
spikesC:Referential integrity cannot be maintained in the code base. Stored procedures would be very clumsy and inefficient, even if you could access data on another server with your stored procedure. Data denormalization is a design choice, but it is wouldn't help solve the distribution problem of some systems. |
. |
Karlebolu:Don't you decide this during install? If I recall correctly, you can tell the install program to use the operating system password, so check if that is what has happened by trying to use that. Otherwise, I think you have to create a public key encrypted secured password file. But, don't quote me on any of this. |
spikesC:It is not that simple. For some systems, referential integrity needs to be maintained, and you cannot denormalize the bulk of the data. |
proxy20:Can you program at all? |
proxy20:Was your earlier post tongue in cheek? |
^^ How far have you got? |
Fulaman198:If the runtime type of the object is Object, then .equals will behave the same as ==. |
Fulaman198:Object.equals() tests for "reference equality" (whether the same object is being referenced, just like == ) This is overridden in class String, to test for "value equality". |
ChinenyeN:Correct! It you know that they will be string literal constants (or, Integers in some cases), it is safe. |
Fulaman198:You are not getting it. "== never checks" is meaningless. == is a syntax. The compiler is doing the work, and it is not doing it exactly the way you have described. You are fudging your use of the word "object". The reason it works is because the string is interned, which means that it gets only one copy at runtime. |
Fulaman198:I said it works in some situations. You queried this. You were wrong. Your explanation is not quite right, either. In my example, string1 and string2 are two separate objects. |
Fulaman198:Fair enough. What I am saying is that the following will output, "Strings ARE equal!" It is useful to do it this way in SOME cases. If you don't know which cases, and why it works in this case, stick to .equals() class KindExample{ |
Fulaman198:Sorry dude, you are wrong. Pay careful attention. I am saying that it depends on the details. In the scenario given, it depends where myString comes from. |
Don't confuse "database connection" and "user". When you log in, the server gives you a connection from a connection pool. The user associated with this connection has nothing to do with your Facebook user. It is possible that everyone uses the same user, who connects multiple times. The pool will have a connection limit. Only thousands, possibly. That is how speed (performance) is managed. If this runs out, a server busy message will propagate back to the user. A slightly different question concerns database consistency and concurrency. That is where NoSQL comes in. It allows for the database to be distributed on different domains, at the expense of temporary inconsistency. This means that users can log in independently on different domains, and your connection limit scales by the number of such domains. That is my understanding. |
I think that it would take at least a couple of years for a natural programmer to become proficient at Java. I don't think that it is achievable just through book learning and courses. Many of the concepts relate to working in a team. For example, concepts like "visibility" in OOP (Object Oriented Programming) are more clearly demonstrated when working in a team. This is also the case for error handling (exception handling) and so forth. Once you have experience the problems that arise from poor coding technique, either by yourself, or by having to fix somebody else's code, the real meaning and importance of these concepts become apparent, and they stick in your memory! |
Fulaman198:Not always true. In the code above, I think that it could be OK to use a simple ==. |
proxy20:ok.. do it, and post your program.. |
It is a very good programming exercise for anyone who already knows a programming language. The first skill, here, involves the ability to convert a task which has been presented for easy interpretation by humans, into a process of functional steps that can be made easy for a computer. This ability to create a technical specification is key to programming in the real world. |


