What is this
Can someone explain to me what this is and what it means and what it does ? I’m a newbie
public static System.Runtime.CompilerServices.CallSiteBinder BinaryOperation (Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Linq.Expressions.ExpressionType operation, Type? context, System.Collections.Generic.IEnumerable<Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo>? argumentInfo);
103 Replies
Would I ever have to type this out in my code ?
Very unlikely, for many reasons
1. those are all fully qualified types. You very rarely fully qualify your types when writing code yourself.
2. Those are types from System.Runtime, hardly stuff a beginner would use.
Are fully qualified types, types made by Microsoft ?
no
System.Runtime.CompilerServices.CallSiteBinder
thats a fully qualified name
if you had to write this code, you'd probably just do
How did you stumble upon this in the first place? it seems either decompiled or something from a stacktrace or something
and as said, its hardly beginner stuffIm looking into
Different namespaces on ms website and looking at their classes up to learn something new
ah
I don’t think I’m smart enough to create my self a project yet
you can save System.Runtime for a lot later 😄
What should I start with if you had to give a recommendation
Im sure you are, if you start small
make a console app that does something. look at $projects for ideas
Collections of application ideas that anyone can solve in any programming language to improve coding skills:
https://github.com/dotnet/dotnet-console-games
https://github.com/karan/Projects
https://github.com/florinpop17/app-ideas
What project template do
You work with the most
webapi
and console
thats 99% of my projectsI really dislike xaml do you ever work with it
hardly ever, its only for GUI apps and I dont do those very often
I handle data
What do you mean by hand data what do you actually code
well I work for a product company that makes various webapps in healthcare
that explains the webapi (I'm a senior backend developer, so I dont do frontends)
Are you a web developer ?
technically, yes
Dammmm senior
and console apps are very useful for everything else - CLI tools, hosted services that just "do stuff" (like run scheduled jobs in the K8 cluster etc)
How long have you been programming for
uh... 30 years
or so
give or take 2 years
I've been doing C# since 2002, and professionally since 2010
before C# I wrote a lot of PHP
Dam nice I’m so frustrated with endless googling of stuff I don’t even know how to put together :/
the googling never stops 🙂
we google stuff too, all the time
if you tell me what you want to do perhaps I can point you in the right direction
I wanted to make a calculator with a login screen to store user names and passwords and have users register with accounts to and I had ChatGPT generate the code so I could study it but when I ran the program it had debugging errors or errors or something and I got all bumbed out
ok so simplify that idea down to its core
lets ignore the calculator for now, as thats its own thing
make a console app that asks the user to login or register. it takes a username and password in either case
and either saves the data safely (perhaps in a database? or a file?)
or looks it up in the stored place
Okay
Do you ever use ChatGPT to learn C sharp or programming ?
Not to learn, no
I don't see how having something /someone else wrote the code for you helps with learning
But it can be useful when trying to be productive
I like taking apart source code
As long as you don't grow reliant on it...
I've seen that a lot
Hmmmm okay
How did you learn ?
Documentation, books
Remember, this was before YouTube or chatgpt existed
Oh dam okay 👍🏻
And most importantly, I learn by doing
Writing code makes you better at writing code. Making errors let's you fix them and learn to not do them again
Seeing what works and what doesnt
Okay ty buddy
So get to work on that signup/login program! Keep it easy so make a console app at first
Okay 🙂
I think
I’m going to go threw each namespace on the site till I learned enough to create a program with that pool of knowledge
I don't think that's a good idea to be honest
It's way too much and too abstract
I feel like googling it’s a dead end no ?
It's like learning a language by only reading the dictionary
Ok imagine you writing this program we just talked about, what would be step 1?
Like everything I search that’s related to my project is like a dead end
Make a UI out of xaml
No
Console app, not a UI
Why not ui ?
Because it's just more complex
Start easy
Once you know how to do it in a console app, you can then learn how to do it in xaml
Baby steps
Hmmmmm okay
A lot of it will carry over
Really from console to wpf ?
Sure. Not in terms of UI, but everything else
How to store user info
How to read it. How to search
How to verify if the password was correct
Etc
Hmmm okay
I’ll try that 😄 ty
Also
When your working on a program and you can’t find your answer on google what do you do ?
Like that’s where I get stuck
I ask a coworker, or I go here
There are some very very smart and experienced people on this discord
Hmmm okay
Purple people open help threads all the time 🙂
It's nothing to be ashamed of, asking help
Okay 🙂 ty buddy you and leo have been really help ful
I love Leo 🙂
He is great. Im the one who nominated him for 🟣
Niceeee!
@leowest we are having a praise party, come join
Lmao
Don’t you think I should do straight wpf ?
No
I think way too many people go big too soon
Start small. Start TINY
You need to build confidence in getting somewhere
Ok
And if you go directly to WPF, you'll get stuck on fixing UI issues when your core functionality isn't even working
UI is a massive task on its own
That's why some people specialise on doing it
I went the other way and specialize on everything except UI
Okay!
what did I do this time?
and yes I totally agree with Pobiega
Yoooo
dont jump into ui framework go from console
build stuff
learn
once you're more comfortable move on
specially UI Frameworks are very catchy
leowest
https://learn.microsoft.com/en-us/shows/csharp-fundamentals-for-absolute-beginners/
I have personally watch those for the sake of suggesting something to people.
they are short but concise videos about specific parts and the person talking is good at explaining what is going on
just keep in mind, learning the language takes a lot of practice and repetition, so u learn 1 thing, open a console project, practice using what u have learned
if u dont understand it, u ask questions
the important is to be able to digest and use what u learned
otherwise it will be as if u only looked thru it to soon forget and when u actually need it u no longer know
the idea is, to not take too much at once, u learned about string manipulation? then go practice it a bit, see it working, see what u dont understand etc
Quoted by
<@1102729783969861782> from #chat (click here)
React with ❌ to remove this embed.
something I said awhile ago
I know you're past that already
but the essence is the same
and same for me when I learned all this we barely had google
documentation on microsoft site was abysmal
now its so much better than it use to be
people learning in this era have it so easy going
not only u have a shit load of content on the internet, you can use chatgpt to search and summarize it for u(not to write code for u)
@Jexs try writing some more complex application using console, for example you could write a ATM/bank app
lookup dependency injection $di, use multiple classes to represent things, have the data stored in a file to start if u dont yet know SQL.
Dependency injection is really just a pretentious way to say 'taking an argument'
See: http://blog.ploeh.dk/2017/01/27/dependency-injection-is-passing-an-argument/
Dependency injection is passing an argument
Is dependency injection really just passing an argument? A brief review.
Okay
dont use static at all people give in because its a console app and think they need to use static everywhere u dont
and if u try to keep the logic of your app separated from the visualization part
you can easily use the same code of your ATM/Bank into a UI app
I’m kinda worried for when I try to transition from console app to wpf
Really
Is that with like every app ?
it will be confusing there is a lot of new concepts u will learn in wpf or w/e ui framework u choose
it can be, it all depends how well u can write the code to separate the concerns
A good example would be DAL(Data Access Layer) they are their own library that gives you access to a database
you can use it from a console app, web app, ui app
its just part the whole code
"a layer"
but don't over think things too much right now
just try to write a complex app with what u know right now
then post your code for review
and people will provide u with feedback on what to improve
Should I ask gpt to provide me some source code learn from it and then ask it to help me evolve the program
no
dont use other people source code
use what u know
this is so you can see where you're lacking knowledge
what u need to practice
if u just copy paste
u wont learn your own shortcomings
the goal of building projects is exactly that
you will build stuff with what u know
preferable without asking for help try to overcome the challanges your self unless you really dont know how
Ok
and take note of the parts u have difficult with
Gotcha
and if you're absolutely stuck and dont know u ask
but u have to thinker
Ty mate 🥹
Also, regarding chatgpt this was JUST posted in chat
https://discord.com/channels/143867839282020352/143867839282020352/1314129983110909952
✧ lumi ✧
tl;dr: i relied too much on GPT to teach me C#, and instead of watching and reading through my teacher's material, I put it all through GPT to have it teach me cuz I thought it would be faster idk.
But you know, if you don't know something... how the hell are you gonna ask what you don't know.
GPT was like giving me what I was asking for, with was like the big concepts I guess? but I was missing all the info in between.
I just read through some of the material and I saw so much i had no idea about.
Really simple stuff too lol
so... big sigh I wasted a lot of time by trying to speed things up
Quoted by
<@105026391237480448> from #chat (click here)
React with ❌ to remove this embed.
and it feels quite relevant to learning from chatgpt
yep there are no shortcuts
so if i do use chatgpt what should i limit it to? as a programmer should i be using it at all??
as an experienced programmer, its great for writing boilerplate or getting things "mostly right" and then tweak the bad parts
but as a beginner, you can't tell the good from the bad as easily
okay ty 🙂
this is what i have so far
is that your desktop leaking through the IDE? that is cursed as hell my man
but hey, good on you for getting started!
its an addon that lets me change the wallpaper of vs 😄
when dealing with an error do you always click this to correct it or just google?
generally google
okay
but honestly, the error message is usually enough
Operator
==
can't be applied to operands of type string
and int
is clear enough to me
Do you understand the error?== is the operand?
i just added "" to the one and it fixed it dont really understand what the error means
==
is the operator
the problem is you are comparing apples to oranges
a string is not a number
and a number is not a string
they cant be deemed equal or not
"5"
and 5
are not the sameokay
so this is what i have so far: and now i guess i need to make a database to store all the passwords and users that register right would this be the correct page to look at? https://stackoverflow.com/questions/12657792/how-to-securely-save-username-password-local
Stack Overflow
How to securely save username/password (local)?
I'm making a Windows application, which you need to log into first.
The account details consist of username and password, and they need to be saved locally.
It's just a matter of security, so other
Also I was wondering should I ask gpt to generate me a project and just google the syntax ? No?
.. huh?
No. Dont gpt stuff.
Don't worry about securely storing it right now, go with just being able to store it for now
Also, learn about methods and how to write them
@Pobiega am i looking at the correct link?
For the next step?
I dont trust chatgpt to be fairly honest with u, I've tried it in multiple occasion and was not satisfied with the results
as a result of it I dont trust it
so using chatgpt for me is literally doubling my work so I just dont use it
Okay 👍🏻
it doesnt always correct it, its telling you what the exact issue is.
You're trying to compare a string against a number (int) which is not possible...
You need to first either convert the string to a number or vice versa to be able to compare it.
Sometimes when you for example forget a
using
it will suggest and add that using
for you
for everything else it will just point you in the right direction of what the issue can be
dont overcomplicate things
just start simple and save it to a text file
once you understand how to save it to a text file and read it back
then try to hash the password so it wont be human readable by anyone
and move from there
taking on database require extra knowledge
you would need to know SQL syntax and more
depending on what kind of database engine u go with
imo https://learn.microsoft.com/en-us/shows/csharp-fundamentals-for-absolute-beginners/ these are the basic topics u need to know
you could watch those videos if u want or just read their titles
these are the absolute must know things to start imo