G
G
gustafsson2016-10-09 19:14:38
ASP.NET
gustafsson, 2016-10-09 19:14:38

How to combine harmoniously combine theory and practice in C#?

Dear colleagues, I would like to consult: I have
been writing on ASP.NET WebForms/ ASP.NET MVC for several years.
But to my shame, every interview becomes a problem for me.
Usually the interview is divided into 3 parts + 1-2 general questions about the Internet.
1) The part that concerns SQL, I go through quite easily, because I write quite a lot of queries and at the same time quite voluminous.
2) ASP.NET full-stack javascript is rarely driven deeply, they don’t ask about closures and subtleties of prototype programming. A person knows how to send ajax requests, play around with the DOM, fasten the jquery slider - usually this is enough, the person claims tea not for the frontend. And if you also used Angular at least somehow, then it’s a beauty in general.
3) And I cut off on C#. Yes, it's a shame, I use it every day, but I fall on elementary things. For example:
- What is the difference between a class and a structure
? I read about it. But I failed to realize the usefulness of structures, so in real projects I use only classes.
All the information that stuck in my head at the time of the interview is that classes are reference and structures are meaningful.
-There are quite a lot of collection types in C#. In real life, List is usually enough for me.
Therefore, when they start torturing about the queue, stack, hashtable, etc., I merge, because I did not come across a task in which list would not cover my needs, that I would need to deal with the intricacies of other collections. Well, sometimes I also use Dictionary.
I'm silent when they ask about reflection or application domains. I have no idea where they can be stuffed into an ASP.NET project to benefit from them.
The fact is that I understand a thing well only if I read about it, and then use it several times in real projects. And so I read about it, but I can’t figure out how to benefit from it in a real project. And to put some kind of construction for the sake of self-education and without apparent usefulness into a live project - it’s also unlikely that something good will come of it.
No, I'm not lazy, I read Richter, Troelsen, but 10 percent settled in my head precisely because of the inability to match theory with practice.
Share your experience on how to harmoniously develop .NET (ASP.NET) for a programmer, how to combine theory with practice, so that in 5-6 years you don’t come to the situation “C # programmer 10 years of experience does not know the answers to basic questions and does not understand elementary things”
Anti-advice “If you don’t benefit from some construction, don’t use it,” don’t offer it better. I now live by this principle and came just to this topic.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
R
Rou1997, 2016-10-09
@Rou1997

No, this is not anti-advice, and you don’t live by this principle, you just didn’t decide on what would benefit you, you decided that you would get a job in a company, but you didn’t ask about interviews, therefore you didn’t know how much they were “torn off” from practice, and not prepared.
And interviews are really a "perversion", in the same place the tests are compiled not by specialists, but by amateurs, usually a "questionnaire" on theory is obtained from the "top" literature on C #, so preparing for an interview is always a "perversion", do not look for a connection with practice, but look for ways to study all this in order to pass an interview, this is your benefit, but if practical experiments are needed for memorization, then you are welcome, but it is better to quote literature.
It is worth knowing practically to be able to say at least something, but it is better to quote literature.
It cannot be that there are no problems with hash tables, unlike a list, they allow you not to create a class or structure just for the sake of adding keys to the values, it is worth learning practically to be able to say at least something, but better cite the literature.
In practice, it is mainly used to access undocumented library features, and is also always used in MVC frameworks to call a method with a name from a string, it is worth knowing practically to be able to say at least something, but it is better to quote the literature.
Это стоит познать практически чтобы уметь сказать хоть что-то, но лучше цитируйте литературу.

M
MrDywar Pichugin, 2016-10-09
@Dywar

I had the opposite.
I read a lot about C #, but there is little practice, and fell on simple things.
Now even these gaps are closed.
Once I read the books, then go to the ITVDN course middle and prof.
Just memorize, repeat once a week, month, six months, notes from books.
Write down what you think is important, in your own words.
I got 3-4 hours of reading.
But it covers ~5 books at once.
The collection is needed only if Add, Remove is used. They read books, for example, notes from Jon Skeet C#:

List - Stores an array internally and keeps track of the logical size of the list and the size of the backing array. Adding an element is either a simple case of setting the next value in the array, or (if the array is already full) copying the existing contents into a new larger array (usually twice, i.e. doubling, but this is undocumented) and then setting the value in it . Complexity is O(1) or O(n) depending on whether you want to copy the values. Removing an element from a List requires copying the elements behind it one position back, so the complexity is O(nk), where k is the index of the element being removed. RemoveAt() index is much faster to delete than Remove() value. in the second case, each element is compared wherever it is, the complexity is O(n).
**Arrays** are the lowest level of collections in .Net. Inherited from System.Array and are the only ones directly supported in the CLR. Arrays are always mutable in terms of their elements, but always fixed in terms of their sizes.
Foreach on an array uses its Length property and array indexer rather than creating an iterator object.
**LinkedList** - a linked list, each element of which has a link to the previous and next element. You can quickly delete, insert new elements, because. there is only a change of links on neighboring nodes. Iterating through the collection is also efficient, but of course there is no index.
**Dictionary** - like List stores its elements in an array, with all the consequences of insertion and increase in size. To implement an efficient search, it uses a hashtable. You can either use the standard hashing and equivalence functions within the key objects themselves, or you can pass an IEqualityComparer implementation in the constructor argument. The keys must be unique, but the hashcodes can be the same, which reduces the search efficiency. The dictionary will fail if the keys are mutable and change their hashcodes after being inserted into the dictionary. Within this dictionary, there is no guarantee of element order, so you can't rely on it. Insertion happens on the basis of a key (something like an index), but not sequence of filling of the dictionary.
**ReadOnlyDictionary<,>** - просто оболочка, которая скрывает все изменяемые операции за явной реализацией интерфейса, и генерирует исключение если они все же вызываются. Но если лежащая в основе коллекция (та что передается конструктору) модифицируется, то модификации будут видны через оболочку.
APS.NET без рефлексии и доменов не работал бы.

Артём Токаревских, 2016-10-10
@artemt

Нахожусь в аналогичной ситуации. Программирую с прошлого века. Сейчас мой стек — это C#, T-SQL, JScript, JavaScript, XSLT, CSS. Собеседование пройду максимум на мидла.
Решил подтянуть и систематизировать знания, опираясь прежде всего на C#. В качестве фундамента собираюсь выбрать две вещи.
Во-первых, перечитать книгу Скита "C# in depth", реализуя примеры. Книга опускает элементарные основы языка, но даёт перспективу его развития.
Во-вторых, перепройти Стэнфордский или Принстоновский курсы по алгоритмам на coursera.org, реализуя их на C#.
Не только это в планах, но данные пункты выбраны в качестве основы.

I
iBird Rose, 2016-11-03
@grishaaa

if ( ($(this).scrollTop()) >= $("#sect_3 .item_1").offset().top - 150) {
$('#sect_3 li.item_1').addClass('marg_top_img');
};

B
Bowen, 2016-11-03
@Bowen

var $el = $("#sect_3 .item_1"),
    a = $(this).scrollTop(),
    b = $el.offset().top,
    c = 150,
    d = b - c;
if ( a >= d ) {
    $el.addClass('marg_top_img');
}

U
utyfua, 2016-11-03
@utyfua

Did you mean the css margin-top property?
this needs to be added to the css styles and your code is also needed ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question