You had me at the word "Manager". Explains it all. I am half a manager now, and my code has been deteriorating at an alarming rate.
Momony
Posts
-
When professionals don't think -
Routers & dual zonesAlso, I believe that a switch can handle more than 1 point to point communication at once. As Roger said, a Hub broadcasts to all ports, so when 1 port is talking, everyone else has to listen. A switch connects the talker (ex port 1) to listener (ex port 2). It may require an initial broadcast to find out what device addresses are on the ports, but after that it should be possible to have N/2 point to point connections at the same time on an N port switch. In practice though, invariably 1 port is a bottleneck (if it is the connection to outbound internet or to a frequently used server), so this gain is really more applicable to peer-to-peer file sharing. It is still significant, but you won't get a 12x speedup just by switching your 24 port hub to a 24 port switch.
-
Writing to a Text File 101At least that block of code had line breaks. Just imagine trying to read that as one continuous line... I find the best way to have a positive attitude is to have extremely low expectations :)
-
I hate ethicsYou may have some short term pain at loss of a sale, but this potential client will always come to you first for your opinion because you applied your expertise with the client's best interest in mind. Also, anyone this client talks to will also hear a good opinion of your services. In the long run, ethical business practices pay better. Word gets around. It is a small world after all. -Kent
-
Language communities and best practicesFrankly, all these methodologies are meaningless in the face of the wrong (or even lack of) decisions that are made up front, before any product is ever designed or a line of code is written. And they tend to be meaningless in light of the course corrections made during development as well, that usually never retain the original guidance. ---------- An excellant point. This is one reason why the agile method is gaining popularity. There will ALWAYS be uncertainty upfront. Most of the time, the best way to make the uncertain/unknown known is by experimentation (which is typically called a bad decision if the experimentation leads to an unuseful result, or a good decision if it leads to a useful result). I think too many people think that software development is all development with no research. The reality is there is always a little research that goes into a software project, even if the research is just a survey of currently available code. A lot of these methodologies are just different ways of doing research. You have to recognize that each research project is different, and when you do find a usable answer, to document the idea and then do the development which results in production quality code. -Kent
-
Why is it called plug and play??Well, privately, it is called plug and pray. But they can't use the word pray in public because then ACLU would demand a separation of church and state. Then they were going to name it plug and prey in honor of the potential security violations possible when adding a new hardware device to the system. So they finally decided on plug and play. As in, plug it in, then go play with something else while you wait for driver patches from the manufacturer. Momony (as in I wish I had some mo money).
-
another preference question....Reason's why you might want an initialize and cleanup routines separate from constructors. 1) Your class has many constructors to handle argument type conversion, or allows multiple ways to "start-up" the object. In these situations, it is common to have a bunch of initialization code that is common to all of the constructors, and it is preferred to create 1 private function which all of the constructor's call after handling their special initialization circumstances. 2) Your class has some resources that have no performance penalty to declare, but have a significant performance penalty if they are going to be used, and there are many instances in which the class can be used without using the performance heavy resources. Then you would want to separate the initialization of the performance heavy resources to make it optional. I think an example of this is the CWnd class in MFC C++ 4.2. There are a lot of things you can do with a CWnd that don't require a Window Handle to be created (which causes a lot of OS overhead). Thus, the model was you construct a CWnd object, and if you wanted to use the features requiring a handle, then you called the create function. 3) For cleanup, sometimes you want you object to exist, but you want to free the resources independently. This usually happens when you are "reusing" an existing object instead of deleting the object and creating a new one. Thus, by calling a clean-up function, you can essentially "reinitialize" the object to the constructed state without having to reconstruct the object. I think these situations are rare, and not necessarily the best design, and usually occur in applications needing the highest performance. Performance is rarely a good argument for complicating a class design, but sometimes you really do need it. However, consistency of class design is a good thing in a project, so if all the classes are construct / initialize / clear / destruct that is better than some you do that way, and some you dont. Now the question of if the initialization and clear routines need to be public is another question. Hope this helps, -Kent