Re: [Skunkworks] Tea time question : A quest to mastering methods indesign phase of an application

For those of you familiar with UML, methods will mostly derive from use-cases. Remember use cases are a set of scenarios describing an interaction between as a user and a system. By listing all manner of steps that a user needs to complete an action, we create a use case. The steps will more often than not, correspond to actual functions in your code. Let's take an example of a student registering for a course at a university. The steps involved may be (just as an example). 1. Obtain list of courses 2. select a course of your choice. 3. Confirm availablity (i.e. max number of students reached or not) 4. Register for course It's easy to see how this would translate into actual methods if we were to say, implement a Courses class, methods as ListCourses(), SelectCourse(args) etc, would be more than obvious. -----Original Message----- From: aki [mailto:aki275@googlemail.com] Sent: 30 March 2010 10:32 To: Skunkworks forum Subject: [Skunkworks] Tea time question : A quest to mastering methods indesign phase of an application Its almost that time to take a few minutes break and look at mastering methods. I learnt something from my variable thread the other day, which was to phrase my question correctly. So to start with, am asking you the coder//programmer to imagine that you were put into a situation as a software developer consultant/software design architect. Let us first establish that we all know about methods/functions. What we also know about these are thing like various ways that they get used. The question then goes as follows : You have a project, you know its requirements, know its basic flow and have established all the variables to be used. Now it is time to get these onto paper and work out the actual code flow without even touching any keys. You have a blank paper in front of you, you need to start the process....! The process that you put on eg paper will be used in development process. Programmers on the list : Define the easiest way to derive methods. Hope I've listed the question correctly this time around. :-) Rgds. _______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJx dy1fbjAwOUE&hl=en ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

David is spot on. A use case = a method. A method has data it receives (i.e. arguments), data it works on and data it sends out (i.e. returns), all these data items more or less equate into variables or data structures like arrays or something. Remember Aki, you can have a single flowchart for a single method, to document the logic flow in that function. But you might also want to use another diagramming method to document the data flow in that method (i forget what this "diagramming method" is called.) Then, once you have written enough methods and functions, you will find that in real life, you speak and write using an increasing & unnecessary number of brackets, like i've just done :-)

Great stuff, gentlemen. :-) Incase any of the listers are thinking what this thread is all about, well you are have come to the right place. And if it makes you curious to know more, you are at the next step towards learning programming! Programming is not magic nor some myth. It is real and you can make a computer perform functions, your imagination is the only restriction. To put this thread into an easier learning way, programmes are all around you. Programming gurus can correct my contribution at any time, which is very welcome. Lets move on. For network people who have accessed cisco, nortel or even juniper boxes can relate to this. Ever wondered what that command prompt was? Well, in a simple way it is really a console application. When for example you enter the ? at the prompt on a cisco, it lists all available commands that have been programmed to respond to the ? input. SIMPLE! And each time that you type and enter parameters like config t, intE0 etc all are really a very simple program written by cisco. When cisco moved to enable configuartion via a web based page, it basically took the functions of that simple console application and made it more user friendly. For RF people, I hope you remember the first time that you dealt with frequencies. You cannot see them nor can you touch them, yet they are there. When you first designed a tiny FM transmitter, you had to calculate the inductance/capacitance to arrive at the frequency of your transmitter. With those inputs, what you really were doing was establishing ways to do things with devices that had set properties. What about things like dbms? What about when you created your first RF network, you had to create your inputs and outputs and work with things like decibels. You simply did not go and install a cable and then wonder how to terminate it. Way back even to the early days, you needed some sort of a software program to connect your laptop serially to a microwave transmitter eg to set a loop test and return back commissioning data for SNR levels. These programmes made it simple to talk to devices and perform tests. For people who did Electronic eng, well you do remember those resistor colour codes, don't you? Or remember the PNP.NPN transistors that had Base, Collector, Emitter leads. What about things like Hfes'? As early as those days, the multimeter that you used to check the various settings were working on simple programmes in voltage form. Without any references to the internal functions of the components, you could arrive at a diagnosis on where the fault was. There are many examples and they are around you. Your mind just has to be curious enough. :-) Programmer gurus on this list, I think it is time to introduce frameworks and why many programmers will take those routes. And for those still interested and itching for more development, well shoot your questions. Incase you wondering what a framework is, for Network people you already know it. Cisco, Nortel, Juniper developed the systems and the software framework allowing you to work with these devices without having to write any special programme to communicate with their hardware. Fact to interested listers : Did you know that you use a Console application to enter a password in your *nix box? I'm taking a short timeout to focus on my project but will be reading the contributions. :-)
participants (3)
-
aki
-
David Kago
-
Peter Karunyu