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 (of 37 pages)
mizlolar:At this point, the confusion was complete. |
I grew up in London in the UK. My experience has been that, when it comes to flirting, African women are generally less adept compared with European or Asian women (even less so than Indian women). I had a theory that it was because African men are way too pushy, and the women have too much choice and have become lazy. But, in some Asian cultures, the women seem to hold all the cards, with men falling over themselves for them, yet they are the flirtiest women I have come across. African women are so-ooo confident, it is as if they are ready to take out their checklist right in front of you to see if you measure up. And if you are a stranger and you pass her in the street, it is as if she thinks eye contact is dangerous and the man will start molesting her. So why is it? |
dtyla:Nothing. You got what you wanted. You met her "officially", whatever her name is, and she politely told you to get lost. ![]() And you got a bonus of a warm glow of excitement and gratitude in your stomach. |
dtyla:...and you left, feeling dizzy with excitement? |
dtyla:oh, that's different. How did you approach? |
A very tall building. In 8 seconds, she would have fallen over 300 metres (50 floors, or so). She would have been traveling at over 150 mph. So, it is not clear what happened after she opened the parachute. She may have kept her word... |
dtyla:Insecurity is at the root of feeling good about snubbing somebody. |
dtyla:You must be insecure. Anyway, I always approach women with the intention of getting to know them, first. It never goes wrong. Women who do what you say you did, gradually lose the ability to communicate normally, and can only hook up with players. |
nasha1:Are you saying that you only gave him money because he had promised to propose to you? Or what are you now complaining about? |
Neither picture is doing either of them any justice in the beauty department. B is a turn off. A needs to get some life into her. ![]() |
sickstars:OP is a bloke, I think, pretending to be a woman. ![]() |
ped007:AVOID any woman who believes in this nonsense. ![]() |
lifeisabitch:Are you a gold-digger? |
Sorry folks. If you just live with things, nothing changes. I am sure there are reasons for these bots, but there are pros and cons to everything. |
[size=18pt]Banned by the antispam bot in Programming for this post. Ban expires on 1:58pm[/size][size=18pt]I give up, folks. First time I have encountered a site where a bot can ban you. Somebody else take over this thread, if they wish. I don't have the time to work around the disruption. (You have to organize the data into groups, create data structures, etc...)[/size] |
Here are the special terms -- the vocabulary -- I have extracted from the specification. These terms will have to be represented by appropriate variables that will hold the data that they represent. Having listed the terms as the first part of my analysis. I have a question: what happens if the computer doesn't win? Our client tells us, "well, because it never loses, the game ends in a draw". I need to add the word "draw" to my vocabulary. "Then what happens?", I ask. The client replies: "the game ends, and the user is notified that it has ended in a draw." I add "notified" to my vocabulary. Already, I have a vague idea that the program will contain a variable, gameStatus, which may take the value DRAW, and a variable userMessage, which may contain the string, "Congratulations! You have drawn with the computer that never loses at tic-tac-toe". What other messages may it contain? It is a good job I analyzed the data upfront. Let us keep refining it, until we are happy with it. [size=18pt]Here is the list, so far: plays user tic-tac-toe rules game new game start move first move square 3 x 3 grid 0's, x's, set of x's lose highlight winning position force a win indicate select the middle corner or edge non-losing game game ends draw notified[/size] |
nunamyeong:This is not what fixed your code. You may have done something else without realizing it. All you need to show us your example is to copy and paste the code in your small html file into your post and put it inside code tags (by clicking the # button next to the quote button). Do the same with a small external file. Leave out everything that is not relevant to the problem. What is important here is the order in which you have written your code, so giving us a couple of lines separately doesn't help us to help you. |
^ ^^^^ Welcome! [size=18pt]Discovery[/size] Discovery is basically the task of converting a requirement into a data model and data processes. The requirement is the system we have been asked to build. In our case it is simple. Our requirement is described in a specification, outlined earlier. A data model is the starting point in programming. It describes what data we need, and how we will organize or structure it. It is always a good idea to start with comprehensive data analysis, rather than plunging straight in to a programming project. In real life, a software company would interview a client about the requirement for the system it has been contracted to build. The interviewing would start at a very high level, with a boss or board member sponsor, who will specify the scope and terms of the requirement and engagement. There would often be a ToR (Terms of Reference) document, forming part of the contract. Once the scope of the project has been established, the interviewing process would be extended and organized to include middle management, and finally, shop floor employees, to get an increasingly detailed picture of the business and its system requirement. The interviewers from the software company are usually business analysts, and they get paid handsome salaries, rivaling some of the top programmers. They must aim to dot every i and cross every t, because the software isn't going to guess. During the interviews, the business analysts listen very closely to the words and business terminology (beeg specialist grammar ) used by the business. It is this terminology (vocabulary) that indicates what information needs to be processed, and forms the basis of a data model and the data processes. The business analysts will ask questions, and get the client to explain in increasing detail how the requirement is to be fulfilled. Understanding the client's jargon, and knowing the right questions to ask, is a valuable skill, especially as top brass and others in the business have to give up their limited time to be interviewed. That is why good business analysts are highly paid. If they do a bad job, it can lead to wasted man hours, poor design or major gaps in the delivered product, which can be extremely costly, or even catastrophic, leading to abandonment of the project.Business analysts liaise with a data manager, who organizes the data. The data organization helps identify gaps and further questions for interview. It is an iterative process. Anyway, we are going to pretend that our tic-tac-toe project is a beeeg application, and our specification (outlined earlier) is what our client has ordered. [size=18pt]We are now ready for discovery: going through our requirement (the specification), and isolating words and terms that appear in it, and indicate what information (data) we will be working with.[/size] |
nunamyeong:That's good. The more effort you put in, the easier it is to remember in the long term. Answers on a plate are a false economy in effort. One ironic thing, though... Your OP says, "help an upcoming programmer". What goes around comes around. Why not spend a little time helping upcoming programmers like yourself, by explaining what you did? ![]() |
nunamyeong:Probably not. I can guess what may be wrong. Your OP needs to contain a bit more information. ![]() Don't be lazy. Folks whom you are asking to help you may not be inclined to work harder than you. ![]() |
nunamyeong:Works fine. |
What about: public boolean oddOrNot(intnum) { return (num |1) ==num; } It won't have to load the literal 0; |
DanielTheGeek:As a matter of interest, how were you intending to manage where the user clicks on the canvas? Or were you intending to use many canvasses? |
Nmeri17:I want to come back to styling at the end. Meanwhile, could you expand on how you would use divs? Would you use absolute positioning? |
DanielTheGeek:I prefer to defer this until the very end, after the whole thing is working. I agree that a separate style sheet is more readable for an experienced programmer. But remember this has to be accessible to complete novices, so we have to consider the pace and order in which we do things. Everything initially in one file does have its advantages for that. Also, the main challenge, here is functionality, I think that we should do minimal styling at the moment, and revisit it at the end, so that it doesn't distract from the functionality (minimize any questions on styling). It will also simplify the set up for any complete novice -- just copy and paste one file, and you are ready to go. (If we were to replace the table with canvas or svg, we would have to do it now, but I think that is too advanced for this thread.) |
The next task will be to review the rules and make any necessary amendments. Then we will use the rules to determine all the data we are going to need. For example, we will need to know the game status (x to move, 0 to move, or finished). |
Yeeeup... here we go... [size=18pt]Specification 1. The application is a program that plays the user at tic-tac-toe according to the standard rules, as specified here. The following are additional specifications and requirements 2. A new game is ready to start when the web page loads, or any time the user clicks the "CLEAR" button. 3. The user can make the first move of the new game by clicking any square on the 3 x 3 grid. 4. The computer will make the first move if the user clicks the "MOVE" button. 5. The computer will move automatically after each move by the user. 6. The user will be 0's and the computer will be x's. 7. The computer must never lose. 8. All 0's and x's will be black, except if the computer wins, in which case it will highlight the winning set of x's in red. 9. If the computer is presented with a position from which it can force a win, it must indicate that it is about to win, and force a win. 10. If the computer is not in a position to force a win, it must be able to select ANY position that does not lose. (9, 10 imply, for example, that the computer must not ALWAYS go in the middle if it moves first. It must SOMETIMES go in a corner or edge. It must be able to play ANY non-losing game, unless it can FORCE a win.) 11. If the game ends according to the rules, the only option available to the user will be to click "CLEAR" for a new game.[/size] |
FincoApps:It's OK. It's fixed itself now, using its Artificial Intelligence. People must have been cheating against it, because it has learned how to cheat. It keeps pretending not to notice when you win, and it makes extra moves when it thinks you're not looking. As for the game against DanielTheGeek, maybe it had an off day, or had just had a spliff. |
DanielTheGeek:Hold fire!!! I need to write a specification for the project. I'll do that tomorrow. I'm deliberately taking it slowly so that some beginners may get bold and start asking questions like, "what's all that junk in the angled brackets?" Hopefully, our approach -- specification to delivery -- will give some idea of real life. |
FincoApps:It's almost human already! I got five in a row and it just decided to sulk and carry on without conceding. Then, when I got seven in a row, it silently took a coffee break, and never returned! That's smart! AI FTW! |



