FrontEnd is hard
4:18
3 ай бұрын
Async Await in Typescript
8:54
5 ай бұрын
5 Hidden Features of C#
8:58
5 ай бұрын
CSS Variables Explained
4:21
6 ай бұрын
Every HTML Head Tag Explained
5:27
Use C# to make a Chrome Extension
6:07
Пікірлер
@AnwarAliCodes
@AnwarAliCodes Сағат бұрын
thank you for this
@patrikmattsson973
@patrikmattsson973 Күн бұрын
it can be a fine edge to balance between short and expressive or becoming so short its cryptic instead. But less lines of code generally removes the risk of bugs hiding in the forest of characters on the screen, so I'm of the opinion that you should aim to keep things as short as possible, as long as it stays easy to read. And if it's new vocabulary, short functions with clear names should help anyone new to it to quickly understand what it does.
@user-fk1wn7jq9i
@user-fk1wn7jq9i 2 күн бұрын
Great presentation and great video :)
@Tudrum2
@Tudrum2 3 күн бұрын
2:58 false claim, classes can have methods that are less restrictive that their classes, eg. private classes can have public methods and internal classes can have public methods.
@opedro.salvador
@opedro.salvador 4 күн бұрын
Thank you guy, I`m a brasilian developer and your video help me to decide for Firebase. Continue doing good videos like this. bye bye
@ArmanJindal-ls8yo
@ArmanJindal-ls8yo 4 күн бұрын
Awesome video! Thanks so much. Quick q: how would you pass state from the page context to the popup context? I love that we can easily pass from popup to page via the args function, but what way would you recommend to go from page -> popup. I want to have my popup react to the current page the user is on! Thanks :)
@StephenBeale
@StephenBeale 10 күн бұрын
nice one, thanks
@drygordspellweaver8761
@drygordspellweaver8761 11 күн бұрын
Inumewable awway uWu
@slapmyfunkybass
@slapmyfunkybass 12 күн бұрын
I’ve been doing c# for around 10 years but you sure made a lot of it confusing. I had to pause it a few times and look at the code to understand what you meant. How you expect someone who’s never done the language to pick this up is beyond me. A really poor teaching method, variables, loops and conditional flow should have been covered first, then a brief look into oop. Covering generics and structs 2mins in is just ridiculous.
@mdnahidseo
@mdnahidseo 12 күн бұрын
Hi Are you looking for a Professional youtube thumbnails designer and video SEO expert?
@traintocode
@traintocode 12 күн бұрын
Lol what's wrong with my thumbnails?! How rude
@larsolepetersen4748
@larsolepetersen4748 13 күн бұрын
Thanks for de video - One thing though there IS a TRY - CATCH in the java code
@tayyabshaikh3286
@tayyabshaikh3286 15 күн бұрын
lets make a new video on .. c# version 1 to 13.. all features
@traintocode
@traintocode 13 күн бұрын
That would take all day 😆
@DelPieroJoga10
@DelPieroJoga10 15 күн бұрын
only bad thing about this, its because uses react 😆
@keshav_dhiman
@keshav_dhiman 16 күн бұрын
howto implement background scripts?
@eliasbenjamin4228
@eliasbenjamin4228 16 күн бұрын
If you wanted to add a service-worker to the vite application, would it be in the public or src folder, and how would the manifest point to it? Thanks!
@traintocode
@traintocode 13 күн бұрын
This article might help but I've not done it so can't speak from experience dev.to/reeshee/how-to-bundle-your-custom-service-worker-in-vite-without-using-pwa-4nk
@inalegwunoelali3629
@inalegwunoelali3629 17 күн бұрын
Awesome video! Helped me alot in completing my final year project
@traintocode
@traintocode 13 күн бұрын
Thanks!!
@solomusic16
@solomusic16 18 күн бұрын
I've previously done javascript, but didn't understand to much and I want to go into c# :(
@traintocode
@traintocode 13 күн бұрын
They aren't all that different fundamentally, good luck with C#
@mikkun_
@mikkun_ 19 күн бұрын
Man this summarizes everything I've learned so far in creating chrome extensions. You earned a sub from me!
@traintocode
@traintocode 13 күн бұрын
Thanks so much!!
@maxcohen13
@maxcohen13 19 күн бұрын
This would make a good cheat sheet to download.
@traintocode
@traintocode 13 күн бұрын
Thanks!
@DanCashion
@DanCashion 19 күн бұрын
do not use var, we look down on auto practices. The thought process is var is fine until you submit for the pr, at that point your variables should be very specific and not be allowed to auto cast
@traintocode
@traintocode 13 күн бұрын
Everybody has their own preferences, if you agree as a team you don't want to use var then fine. Many developers find it makes the code more legible and 99% of the time you don't need to know exactly what type a variable is at first sight.
@danilodjokic5303
@danilodjokic5303 20 күн бұрын
Just a note for all the viewers. Records do not necessarily have to be declared "record MyRecord(string prop1, int prop1);". They can be also be declared with curly brackets in the same syntax as classes and structs. The syntax above is called a "primary constructor". It basically writes the property declarations and constructor initializations for you. Records were the first feature to have this and it's idiomatic to always write them like this but as of C# 12 you can use primary constructors on classes and structs too
@traintocode
@traintocode 13 күн бұрын
This is true - I actually made another video about primary constructors for classes here kzbin.info/www/bejne/jJLVdmeaZ6ekg9E
@heavengrrl
@heavengrrl 20 күн бұрын
While obviously not going into specifics, this video was rlly good for "knowing what i dont know"
@traintocode
@traintocode 13 күн бұрын
Thanks!
@ImNotFlutters
@ImNotFlutters 20 күн бұрын
?
@stevemaricic7585
@stevemaricic7585 21 күн бұрын
Excellent video. Very clear explanation.
@traintocode
@traintocode 13 күн бұрын
Glad it was helpful!
@Bunny99s
@Bunny99s 23 күн бұрын
When I saw the title I already knew that it would not fulfill it's promise :D. Almost at every point I had something to complain. Though sometimes I might be a bit picky. 00:36 "Each line is ended with a semicolon". Well especially for new users of the language this can be misleading. Not every line has a semicolon at the end but every statement. It's a bit difficult to explain this in easy terms, though it's certainly not every line. Common beginner mistakes is putting a semicolon at the end of an if statement which would end the statement right there. So the following body has no connection to the if statement this way. 00:46 Besides line comments, there are multi-line comments using /* This is a comment */ 01:26 Just like to point out that the primitive type list is a bit longer than what was shown here ^^ 01:39 Well, he said DATA-types so we might forgive missing enums, delegates, interfaces and closures. 02:01 This is a common misconception. Structs don't live on the stack unless their variable is declared on the stack. Structs are value type and as such are directly stored in the memory of the variable itself. So it depends on where the variable is stored. When the variable is a field of a class, that struct would live on the heap. 03:00 This is just false. A private class can of course have a public field or method. How would you interact with anything in that class? When a nested class is declared private, it can only be used inside that class and can never be exposed to the outside. So you can not declare a public or ptotected field of your private class type since from the outside or a derived class, that nested class would not be visible. However the fields and method inside the private class can have the full spectrum of modifiers 05:20 Those unfamiliar with C# probably should know about logical and, or, xor and not operators which are &&, ||, ^ and ! respectively. Personally I get some itching when tutorials show boolean variables inside an if statement compared to true. An if statement simply requires a boolean value. Those logical operators will return / produce a boolean expression. However a comparison with true is completely unnecessary. You could also do if (aBoolVar == true == true == true) which does the same as if (aBoolVar). The comparison of boolean operators don't need to be used inside an if statement. You can also use them to assign a boolean value. bool myVar = someString == "Hello" && age > 18; 05:57 This is called a "switch expression" which actually evaluates to a value. A switch statement is actually a control flow statement which does not evaluate to anything, like an if statement or for loop. 06:49 Even though I don't like them because they have a lot of overhead, it should be mentioned that you can have multidimensional arrays as well. They may look useful, but the performance isn't that great. For every access it has to do a bounds check on each dimension / index and calculates the flattened index every time. In most cases, especially in time critical situations (when you create games and not business apps) just using a normal 1d array and calculating the index yourself can be way faster as you usually would use nested for loops and you can pre calculate some of the offsets in the outer loops. Also when it's a 1d array it's much easier to iterate over all elements regardless their spatial relationship. 06:55 Small mistake here. The System.Collections namespace does only contain the untyped / object variants of those collections. All the types shown there are inside the System.Collections.Generic namespace. You almost never want to use the untyped variants. They are essentially an ancient leftover. Even when you want to store System.Objects / objects, most people would still use the generic List with the type object rather than the ArrayList. 06:58 It should be pointed out that "importing" a namespace does not load anything like in other languages where some kind of import would actually load or embed another file. Such a using directive will "just" shorten the type names. So this is a pure organisational feature. We use namespaces to avoid name collisions. Different namespaces can have the same class / type names, but you can not "import" both as when you get a name collision, the compiler would complain as it can't tell which type you wanted to use. It's possible to "import" or resolve individual types by: using MyType = Some.NameSpace.MyType; Here we can even rename / give the type a file wide alias name 07.23 This is only partly true as the foreach loop does first and foremost use pattern matching and only resort to the IEnumerable interface when no pattern could be found. The pattern the compiler looks for is simply if the instance passed into the foreach has a method GetEnumerator and if the returned type has a MoveNext method that has no arguments and returns a bool, and it should have a Current property that is readable. If those conditions are met, the compiler will just use those methods, even without the interface. Most of the built-in collection types use struct enumerables / enumerators to avoid creating garbage on the heap. 07:34 Again, the generic version of the IEnumerable is in the System.Collections.Generic namespace. The untyped / object version is in the System.Collections namespace. 08:44 Just to use the right terminology, the stuff after the "where" keyword is called constraints. Several constraints can be specified by separating them with a comma. Note that all constraints need to be satisfied. If a generic class or method has more than 1 generic argument and you want to put constraints on more than one, you need to use another "where" for each argument you want to constrain. Just as a warning: Generics can be quite useful, but are often misunderstood. Many want to use them like polymorphism, however generics are somewhat the opposite of that. While deriving from a base class keeps the data of the base class but allows to overwrite functionality, generics actually keep the functionality the same while being able to exchange the data the function works on. Bound generic classes are usually incompatible with each other. So a List<int> and a List<string> are two completely separate types. In rare cases there can be exceptions with the right conditions (covariance / contravariance) but that are really rare usecases. 08:55 Well a lot is missing for it to be a video about all language features ^^. I know it can't really be comprehensive, but things that weren't really mentioned are: delegates (essentially typed function pointers), anonymous methods / closures, (ability to automatically capture variables in a scope object) lambda expressions, enums, nameof, all operators (there are a lot) operator overloading in classes type conversion operators events, CIL and the ability to decompile to other .NET languages extention methods, linq (I mean the LINQ syntax which is simlar to SQL, not the classes from the System.Linq namespace), attributes (essentially static metadata that can be attached to almost everything) params (essentially allows variable arguments as the last parameter of a method) exceptions (try / catch / finally) object initializer nullable types partial type declarations ref / out (pass by reference) indexer (allows a class to be used like an array or dictionary) using statement (not to be confused with the using directive at the top. It's used to automatically dispose objects) goto (Yes, C# has goto. Now forget that I mentioned it ^^) reflection Those are just some things of the top of my head. I only focused on language feautes, not framework features or classes. Now I've spend already too much time on this post so lets wrap it up. There's still a lot missing. If you want to learn more about the syntax, look up "C Sharp syntax" on wikipedia.
@Jsjjskk
@Jsjjskk 25 күн бұрын
I went through a detailed 4 hour course over the past few days and then I watch this, it's ruining my knowledge so I stopped watching, this video is a great way to confuse people
@chaimspear
@chaimspear 25 күн бұрын
very nice, I have been using C# for 15 years, read books, watched other videos etc. yet this is really useful and educational in just a short video. Thank you !
@traintocode
@traintocode 13 күн бұрын
Glad it was helpful!
@llFike
@llFike 28 күн бұрын
Didn't know you could have top level functions in C#! gonna be honest, my distaste for C# is slowing wearing off
@traintocode
@traintocode 13 күн бұрын
Hahaha as it should...
@GiridharaSaiPavanKumarGurram
@GiridharaSaiPavanKumarGurram 29 күн бұрын
nice video! showing the similarities and differences. Discussing the topics which are different but are from /around the same concepts would be beneficial
@traintocode
@traintocode 13 күн бұрын
Hey, thanks!
@_jam1eK
@_jam1eK 29 күн бұрын
it should be remaked whenever new version released!
@alfonzo6320
@alfonzo6320 Ай бұрын
don't do vars kids.
@traintocode
@traintocode 13 күн бұрын
why?
@alfonzo6320
@alfonzo6320 13 күн бұрын
@@traintocode its bad and addictive. c# is strongly typed for a reason. For everyone's sake, just write the damn type lol.
@dmitriyvainila4227
@dmitriyvainila4227 Ай бұрын
Wonderful video! Thank you, mate. Subscribed for more :)
@traintocode
@traintocode 13 күн бұрын
Glad it was helpful!
@rahulgupta373
@rahulgupta373 Ай бұрын
18:55 why i cant listen anything 😕??
@hurdurstudy295
@hurdurstudy295 Ай бұрын
this tutorial is amazing
@traintocode
@traintocode 13 күн бұрын
Thanks!!
@prashlovessamosa
@prashlovessamosa Ай бұрын
great guide
@traintocode
@traintocode 11 күн бұрын
Thanks!
@micky992
@micky992 Ай бұрын
Thank you so much!
@traintocode
@traintocode 11 күн бұрын
You're welcome!
@forwardslashbeats3091
@forwardslashbeats3091 Ай бұрын
Maybe I’m the only one here but I hate implicit typing with a passion. Why would I ever want to put a barrier up for knowing what type I’m dealing with? It feels to me that except in a few situations where you could get different types being returned to you and this gives you an option for how to handle that, that I’m always better off making the effort to be explicit in my use of types as it’s far clearer to read?
@christiansongplaylist7004
@christiansongplaylist7004 Ай бұрын
better than many courses
@sakthikumaran8076
@sakthikumaran8076 Ай бұрын
Your videos are great! You earned a subscriber!
@traintocode
@traintocode 11 күн бұрын
Awesome, thank you!
@artsytechie2053
@artsytechie2053 Ай бұрын
could you do a brief overview of Clojure please x
@artsytechie2053
@artsytechie2053 Ай бұрын
top class channel mate, I recently picked up a contract developing JavaScript games and they want it functional not OOP! its hard to find content that isn't for complete beginners, very refreshing, excellent audio which makes such a difference.
@artsytechie2053
@artsytechie2053 Ай бұрын
I hate var. its such a stupid thing to do and just makes it that little bit harder for someone else to glance at your code and know what is going on.
@csongor222
@csongor222 Ай бұрын
Is it trying to use the free tier while it is possible, or do the default settings generate cost immediately? Thanks for the video!
@jimh3595
@jimh3595 Ай бұрын
Not sure I understand SquareEach. Shouldn't it be "yield squared"?
@smathlax
@smathlax Ай бұрын
While this may not be a game-killer from a beginner's perspective, there are a few things this video gets wrong: 2:31 Class access modifiers: - There aren't 5 access modifiers for a class - For top-level classes, there are 3 access modifiers: public, internal, file --- a top-level class cannot be protected or private, as the video suggests --- protected means accessible from the same class or from a derived class, but by definition a top-level class is not within any other class, so this would just mean that it cannot be accessed from anywhere --- similar conundrum for private: if a top-level class could be private then it couldn't be accessed from anywhere at all - For nested classes (and class members in general), there are 6 access modifiers: public, internal, protected, protected internal, private protected, private --- notably, the file access modifier is not valid for a nested class - Look up "c sharp access modifiers" and find the page on the Microsoft website for more detail 2:55 Member (method) access modifiers: - It is false that a member access modifier must be more restrictive than that of its declaring class - You very much can have a public method in a private class - In fact, if a private class could only have private members, it would be almost impossible to use that class --- for example, how would you call the private class's constructor if it could only be private? --- the answer is that you make the constructor public, and then you are free to call it from the declaring class --- since the class itself is private though, even though its constructor is public, it cannot be called from outside of the declaring class - You might be confusing this with the fact that a derived class must be more/as restrictive as its parent class These were the two big ones that were wrong, the rest are quite pedantic so not a big deal, and in some cases it is even good to simplify things for beginners. 5:21 else if statement: - There is no such thing as an else if statement - When you write else if, what you are really doing is writing an if-else statement, where the else part itself contains another (nested) if statement - It is not a big deal to simplify this in the video, but I think it's nice to know how these things actually work behind the scenes 5:50 switch statement: - Minor nitpick: the second example is not a switch statement but a switch expression - The difference is that a statement merely executes some code, while an expression returns something 6:51 System.Collections namespace - The examples shown are not from the System.Collections namespace, but from the System.Collections.Generic namespace - Collections from the System.Collections namespace can only store objects that have to be explicitly casted to another type - 90% of the time (or if you don't know what you're doing) you should use generic collections from the System.Collections.Generic namespace Finally, I put this at the end because it's not objectively wrong but my opinion: 1:20 var keyword - Overall this was a great explanation of the var keyword - However I disagree that this is "good" and that you should use it - Yes it is okay to use it sometimes, but I think that it is bad practice to use it everywhere - In my opinion, it is good practice to always use explicit types except where it makes the code more readable --- for example if you've got an extremely long type name and it is clear from looking at the declaration (without inspecting further code) what type it is, then using the var keyword is okay --- otherwise in my opinion it should be avoided as it will make the reader have to pointlessly jump around code to figure out what type something is, instead of just reading it directly
@not_herobrine3752
@not_herobrine3752 Ай бұрын
sounds more of a clickbait-y crash course than a comprehensive list of every single feature the language has (which would be believable if the video was around 2 days long)
@hyungtaecf
@hyungtaecf Ай бұрын
It doesn't matter for me, it was exactly the kind of video I wanted. After many years not using C# I wanted to refresh my mind about its syntax
@arf9759
@arf9759 8 күн бұрын
I actually found this useful knowing nothing about C# but a bit of other languages such as python or c/c++.
@yaroslavpanych2067
@yaroslavpanych2067 Ай бұрын
"Every", and proceeds to list about a 2% of features
@justingiovanetti
@justingiovanetti Ай бұрын
If you reference a css variable before it’s declared you don’t get an error, like you might expect. The reason is because all css variables get a default initialization.
@piotrs448
@piotrs448 Ай бұрын
And how to read page document in extension?
@MarcelDiane
@MarcelDiane Ай бұрын
What program are you using at the beginning?