1

Topic: How to Tighten skills of OOP?

Greetings long enough time I work as the programmer-system analyst far off. On interviews on an offline operation various skills including ask designing. And here problems quite often arise. On operation normally long I think I reflect as what that , I search for answers on the Internet as others do, there is a designing and considering occupies from me week. And as a result I do also all works, applications "on one person". And here so that to unwinding to solve the task as that demands on interviews - I can not. For example recently here asked game sea fight to design. Drew on a board two fields with the ships and I do not know from what side to approach, described classes for some entities (the ship, a game board, a ship element) and . Or to design application-spreadsheet. Rushed was to do. For example told "To us the two-dimensional array" is necessary. The question "and if many cells At once followed? Hundred thousand for example? And how with that that often cells to be empty?" Like children's questions and the programmer with experience couple of years should unwinding solve, but I was not what to tell. In a head climbed "well let there will be a linked list from cells, or std map where cell indexes will be keys". C how to resolve conflicts when cells refer against each other. It was recalled that there is what that search algorithms of cycles on columns but whom and did not tell,  all looked forward to hearing hemmed and on it all ended. Well I did not face such tasks in practice. There was a question about designing system like git ive. But I have no concept as it works also what questions to set to that who suggested it to design and from what side to approach to the decision. That my seven years of experience gave such feeling to me as much how many how many receive others for two years of operation. Various problems I am able to solve well, gradually finding answers in the course of the present development. But how to transit such interviews with designing? What to esteem, under what literature to study?

2

Re: How to Tighten skills of OOP?

Hello, Michaels1, you wrote: M> For example recently here asked game sea fight to design. Drew on a board two fields with the ships and I do not know from what side to approach, described classes for some entities (the ship, a game board, a ship element) and . And that so? Further simply you look at what actions should be made and you correct roughnesses. As a result it turns out: the ship (the list of points), a board, factory/validator for exhibiting in the field, the player, the interface. M>  all looked forward to hearing hemmed and on it all ended. Well I did not face such tasks in practice. M> there was a question about designing system like git ive. But I have no concept as it works also what questions to set to that who suggested it to design and from what side to approach to the decision. M> that my seven years of experience gave such feeling to me as much how many how many receive others for two years of operation. This interview. Never you know that for a template at the person in a head with which it is checked. M> but how to transit such interviews with designing? What to esteem, under what literature to study? The simple way is to look, as it is made in existing products. There it becomes clear, what operations are required to be made and what there are requirements by data. For this purpose suit both books on architecture/designing, and normal articles on the Internet. Last, probably, even it is more useful. Generally, for pair-triple interviews in one direction you can learn 95 % of questions, and then it is simple study houses

3

Re: How to Tighten skills of OOP?

Hello, Michaels1, you wrote: M> that my seven years of experience gave Such feeling to me as much how many how many receive others for two years of operation. Various problems I am able to solve well, gradually finding answers in the course of the present development. But how to transit such interviews with designing? What to esteem, under what literature to study? These are questions not on designing and architecture, and on knowledge of classical algorithms and data structures. Far not the fact that the receptions mentioned on interview are really used or necessary in projects - simply not skilled  to arrange stupid testing instead of real interview easier. Good interview begins with questions about the previous projects and the technical decisions made in them. I will enumerate some books which should be had in the library anyway. Books on algorithms and data structures: Thomas Kormen, etc. Algorithms: creation and the analysis David Solomon. Data compression, images and a sound of Alfred of V.Aho, etc. Compilers. Principles, technologies and Andrew Tanenbaum's toolkit. The modern operating systems Wikipedia is rather useful: it is necessary to pay attention to categories which articles on those or other algorithms and data structures concern. This considerable quantity of articles which allow to learn something new and useful. https://en.wikipedia.org/wiki/Category:Algorithms https://en.wikipedia.org/wiki/Category:Data_structures books on OOP: Gradi Buch, etc. the Object-oriented analysis and designing with examples of applications of E.Gamma, etc. object-oriented design Receptions. Patterns of designing Martin Fowler. Architecture of corporate program applications Eric Evans. Subject-oriented designing Martin Fowler. Refactoring. Improving of the existing code of Dzhoshua Kerievski. Refactoring with usage of templates Robert Martin. The pure code I Recommend a site: https://sourcemaking.com/

4

Re: How to Tighten skills of OOP?

Hello, Michaels1, you wrote: M> Greetings M> long enough time I work as the programmer-system analyst far off. M> on interviews on an offline operation various skills including ask designing. And here problems quite often arise. On operation normally long I think I reflect as what that , I search for answers on the Internet as others do, there is a designing and considering occupies from me week. And as a result I do also all works, applications "on one person". And here so that to unwinding to solve the task as that demands on interviews - I can not. I will agree with the answer that to you questions on OOP, instead of on designing were asked. Here the main thing to tighten data structures (lists, hashes, etc.) If with them suddenly you are not on friendly terms, and not to be lost in the conditions of stress on interview. To learn designing experience is necessary: - involvements in development of the large-scale project designed by skilled architects. - or projections of an average-large-scale project from zero. Eventually designing receptions are similar, and understanding the device of several projects, can project itself. How to receive such experience working as the system programmer I do not know, as nevertheless at system programming the specificity - OS device differs from the device of corporate applications.

5

Re: How to Tighten skills of OOP?

Hello, Michaels1, you wrote: M> Greetings M> long enough time I work as the programmer-system analyst far off. M> on interviews on an offline operation various skills including ask designing. And here problems quite often arise. On operation normally long I think I reflect as what that , I search for answers on the Internet as others do, there is a designing and considering occupies from me week. And as a result I do also all works, applications "on one person". And here so that to unwinding to solve the task as that demands on interviews - I can not. M> for example recently here asked game sea fight to design. Drew on a board two fields with the ships and I do not know from what side to approach, described classes for some entities (the ship, a game board, a ship element) and . Well here it is absolutely simple. I will describe in terms #. We get the abstract class the ship. At  there should be coordinates (x1, y1) and (x2, y2), or . Coordinates, a class of ship (. Or mountains.) And length. More shortly - either Cartesian, or polar coordinate system. All ships will be inherited from this class, redefining . Coordinates depending on the type. Further, we enter abstraction a board or a game field. Two methods at once see - to generate layout of figures, and to process a shot of the contender (bool GetUserShot (x, y) or bool ApplyUserShot (x, y)). It is necessary to involve In each of methods . Algorithms - layout of figures on a board (any dynamic programming or something like it), and to define got-nepopal. As all is above already told it depends on a choice of data structures for representation of the ships - a matrix, lists or still something. Possibly the interviewer wanted to talk about details of implementation of algorithms and as key abstractions will interact. M> or to design application-spreadsheet. Rushed was to do. For example told "To us the two-dimensional array" is necessary. At once the question "and if many cells followed? Hundred thousand for example? And how with that that often cells to be empty?" Like children's questions and the programmer with experience couple of years should unwinding solve, but I was not what to tell. In a head climbed "well let there will be a linked list from cells, or std map where cell indexes will be keys". C how to resolve conflicts when cells refer against each other. It was recalled that there is what that search algorithms of cycles on columns but whom and did not tell,  all looked forward to hearing hemmed and on it all ended. Well I did not face such tasks in practice. I and itself on such question became puzzled what to answer. In ms excel the heap of the people sawed a heap of time. Possibly, it how many talk on an OOP subject, how many about algorithms. M> there was a question about designing system like git ive. But I have no concept as it works also what questions to set to that who suggested it to design and from what side to approach to the decision. With  adjusted for local storage the client - server works for the user with its further synchronization on the server by a principle. Plus a heap of utilities for effective operation with files and change trackings. M> that my seven years of experience gave such feeling to me as much how many how many receive others for two years of operation. Various problems I am able to solve well, gradually finding answers in the course of the present development. But how to transit such interviews with designing? What to esteem, under what literature to study? I will try to give advice from myself: see the program, try to understand as it it is arranged, you would use what key abstractions, in what data structures these abstractions organized, what you algorithms would use etc. I Assure you that hit was 95 of 100 for all engineers think similarly. With rare exception. I.e. simply present itself on a place of the developer of the program and estimate, that you did. Well and on  can esteem, and is better begin, with The Architecture of Open Source Applications. Architecture for all tastes.

6

Re: How to Tighten skills of OOP?

Hello, Sharov, you wrote: S> the abstract class the ship Is got. At  there should be coordinates (x1, y1) and (x2, y2), or . Coordinates, a class of ship (. Or mountains.) And length. More shortly - either Cartesian, or polar coordinate system. All ships will be inherited from this class, redefining . Coordinates depending on the type. Further, we enter abstraction a board or a game field. Two methods at once see - to generate layout of figures, and to process a shot of the contender (bool GetUserShot (x, y) or bool ApplyUserShot (x, y)). It is necessary to involve In each of methods . Algorithms - layout of figures on a board (any dynamic programming or something like it), and to define got-nepopal. As all is above already told it depends on a choice of data structures for representation of the ships - a matrix, lists or still something. Possibly the interviewer wanted to talk about details of implementation of algorithms and as key abstractions will interact. Looks as attempt to stretch OOP on globe to use a steam hammer to crack nuts. For the ship enough its type (which the size defines). Remaining parameters are a binding of the ship to a board which is better in it and to store (for example, as id the ship in cells with which it occupies). As a matter of fact, for position storage here enough a simple two-dimensional matrix from  (shotov/charov) (and if to hang restriction on absence of contacts boards and ) and the counter of live cells of the ships (that not  all board for determination of the end of game). Types of the ships are necessary only for position generation (well and for beautiful  can be useful).

7

Re: How to Tighten skills of OOP?

Hello, Lexey, you wrote: L> Hello, Sharov, you wrote: S>> the abstract class the ship Is got. At  there should be coordinates (x1, y1) and (x2, y2), or . Coordinates, a class of ship (. Or mountains.) And length. More shortly - either Cartesian, or polar coordinate system. All ships will be inherited from this class, redefining . Coordinates depending on the type. Further, we enter abstraction a board or a game field. Two methods at once see - to generate layout of figures, and to process a shot of the contender (bool GetUserShot (x, y) or bool ApplyUserShot (x, y)). It is necessary to involve In each of methods . Algorithms - layout of figures on a board (any dynamic programming or something like it), and to define got-nepopal. As all is above already told it depends on a choice of data structures for representation of the ships - a matrix, lists or still something. Possibly the interviewer wanted to talk about details of implementation of algorithms and as key abstractions will interact. L> looks as attempt to stretch OOP on globe to use a steam hammer to crack nuts. For the ship enough its type (which the size defines). Remaining parameters are a binding of the ship to a board which is better in it and to store (for example, as id the ship in cells with which it occupies). To have base class for the ship on the future - a piece useful, especially for bypass of all ships. That it is a simple pig it was not possible to store coordinates in base class, it is equal as kol-in padded cells. On the other hand, to double coordinates by the ship and on a board of sense is not present, therefore, perhaps, here I will agree with your remarks. L> as a matter of fact, for position storage here enough a simple two-dimensional matrix from  (shotov/charov) (and if to hang restriction on absence of contacts boards and ) and the counter of live cells of the ships (that not  all board for determination of the end of game). Types of the ships are necessary only for position generation (well and for beautiful  can be useful). It agree, values of a matrix will be id the ship, or 0. If got, on id we find the ship and we subtract the counter of cells then it is checked game is ended or not.

8

Re: How to Tighten skills of OOP?

Hello, Sharov, you wrote: S> to Have base class for the ship on the future - a piece useful, especially for bypass of all ships. , backlogs "on the future" without a binding to real scenarios of usage, conduct only to useless complication of model. In simple implementation of sea fight bypass of the ships is not necessary.

9

Re: How to Tighten skills of OOP?

Hello, Michaels1, you wrote: M> For example recently here asked game sea fight to design. A class "board". A method "to deliver the ship of such length a casual place, without breaking an arrangement rule". A method "to process a shot in such field". What  "a ship class", what  "the successor for each class of ship", you ?

10

Re: How to Tighten skills of OOP?

Hello, Sharov, you wrote: S> to Have base class for the ship on the future - a piece useful to have something on the future without 100 % of confidence of this future - a direct way to overengineering' and code base degradations. : the most important in OOP - to learn it not to use

11

Re: How to Tighten skills of OOP?

Hello, antropolog, you wrote: A> Hello, Sharov, you wrote: S>> to Have base class for the ship on the future - the piece useful A> to have something on the future without 100 % of confidence of this future - a direct way to overengineering' and code base degradations. The general abstract class at similar entities is direct is a horror-terrifying, aha. A> Topikstarteru: A> the most important in OOP - to learn it not to use Oga, and to receive procedural style with methods in 10 LOC. C important in OOP - to use it with mind.

12

Re: How to Tighten skills of OOP?

If "for business", would recommend here this book: http://www.ozon.ru/context/detail/id/3105480/ the Author (): Kreg Larman Publishing house: Williams Tsena: 533. Application UML 2.0 and designing templates - world famous issuing with which help it is possible to start "to think objects" and to penetrate into the essence of the object-oriented analysis and designing. Being based on two previous issuings, Except other there about GRASP. It is not necessary to read all, probably. Only that seems interesting or useful. If for interviews, that, probably, it is desirable to esteem about SOLID and patterns. About patterns, however, it is useful to esteem and not for interviews. Only to look at them not as on typical decisions for application in the code, and as on illustrations of the general principles and receptions on slightly generalized examples.

13

Re: How to Tighten skills of OOP?

Hello, Sharov, you wrote: A>> to have something on the future without 100 % of confidence of this future - a direct way to overengineering' and code base degradations. S> the general abstract class at similar entities is direct is a horror-terrifying, aha. To attribute to the interlocutor of a word which he did not speak, and then them with great feeling to dispute, it is finite an interesting manner to conduct conversation, but counterproductive. Where I told something about the abstract classes, or about that that is horror? Re-read please my message without emotions and try to understand its sense. S> Oga and to receive procedural style with methods in 10 LOC. Besides, in my message there was no also a word about styles. Not to mention that that communications between style (any) and methods (by the way, methods, same like from OOP concept?) in 10KLOC is not present any. S> C important in OOP - to use it with mind. Not to use OOP there where it is not necessary, this subset "to use with mind". Here I with you am solidary.

14

Re: How to Tighten skills of OOP?

Hello, T4r4sB, you wrote: TB> What  "a ship class", what  "the successor for each class of ship", you ? And how  and  UI?

15

Re: How to Tighten skills of OOP?

Hello, Michaels1, you wrote: M> that my seven years of experience gave Such feeling to me as much how many how many receive others for two years of operation. Various problems I am able to solve well, gradually finding answers in the course of the present development. But how to transit such interviews with designing? What to esteem, under what literature to study? In my judgement, the problem is not so much in skill of passage of interview, how many in a real gap in knowledge. Questions to you simple enough set, as it seems to me. Vladek above advised good, correct information sources and from myself I would add unless The Architecture of Open Source Applications.

16

Re: How to Tighten skills of OOP?

Hello, antropolog, you wrote: A> Hello, Sharov, you wrote: A>>> to have something on the future without 100 % of confidence of this future - a direct way to overengineering' and code base degradations. S>> the general abstract class at similar entities is direct is a horror-terrifying, aha. A> to Attribute to the interlocutor of a word which he did not speak, and then them with great feeling to dispute, it is finite an interesting manner to conduct conversation, but counterproductive. Where I told something about the abstract classes, or about that that is horror? Re-read please my message without emotions and try to understand its sense. It is wrong, agree. But I connected overengineering to presence of the general of abstract a class at similar the intrinsic. It seemed to me incorrect. S>> Oga and to receive procedural style with methods in 10 LOC. A> Besides, in my message there was no also a word about styles. Not to mention that that communications between style (any) and methods (by the way, methods, same like from OOP concept?) In 10KLOC is not present any. If not to apply OOP, very easily to roll down to procedural style, with all that it implies. The method is procedure without OOP possibilities (that is polymorphism). S>> C important in OOP - to use it with mind. A> not to use OOP there where it is not necessary, this subset "to use with mind". Here I with you am solidary. It agree.

17

Re: How to Tighten skills of OOP?

Hello, Sharov, you wrote: S> without OOP possibilities (that is polymorphism) Is not present, still inheritance and encapsulation!