5 votes

Quickest way to learn C# before placement begins

I am a university student who has just finished (survived is probably a more accurate word) third year and am going to begin a placement year at a programming company at the very start of July. I have been told that I will primarily be coding in C#, and that they will also teach me coding on the job, however I would like to get some form of a head start prior. I've already done some basic C++ beforehand, but I know that C# is slightly different and was wondering if anyone could suggest some resources that would not only teach me C# properly but also quickly. Like I mentioned previously, the place I am working at does not require me to know how to code properly, but it would be nice to have some footing before the placement starts. Additionally, I am also hoping that it will impress them so that my chances of landing a graduate job with them after my fourth year are increased!

20 comments

  1. [12]
    Comment deleted by author
    Link
    1. [11]
      Ark
      Link Parent
      I've done programming before, so I know the basic functionalities and concepts like the ones you listed, however I've never really gone above this level at university as I am studying Mechanical...

      I've done programming before, so I know the basic functionalities and concepts like the ones you listed, however I've never really gone above this level at university as I am studying Mechanical Engineering and so most of the projects over the last few years have not been highly programming focused, or at least when they were they were pretty basic (MatLab, LabVIEW).

      I'm more looking for some guide that explains the C# specific functions, for example to my knowledge C++ has pointers whereas C# does not, those kind of programming language specifics I would be interested to know about.

      I definitely do need to get more practice though writing console based applications as you suggested, any idea on where to find small "test" applications? Something where a task is set and I have to create the code in C# to achieve said task.

      I am not actually sure about the environment they are currently using, from what I can remember from the assessment day I didn't see a single Apple logo so I'll assume they are Windows or possibly Linux based. In this case however I'll definitely take your suggestion to look at WinForms and WPF, I've also heard good things about Jetbrains and their IDEs. I think I can get them for free as well as technically I still count as a student, so I might give those a try, whichever one is built for C# anyway.

      If I start struggling with WinForms though I'll definitely hit you up though, thanks for the support!

      2 votes
      1. [8]
        bme
        Link Parent
        The way to learn anything is by doing. The OPs advice is spot on, you are way too early in your career to be learning anything by comparison because you don't have anything to compare to. Just try...

        The way to learn anything is by doing. The OPs advice is spot on, you are way too early in your career to be learning anything by comparison because you don't have anything to compare to.

        Just try and hack your way through a console app. Learn how to get some code built, even something as stupid as one of those "guess what number I am thinking of" games. Try building a todo web app using MVC (or whatever is cool these days in c#). Trying to solve a problem will provoke better questions, and give better outcomes than anything else you can try.

        I'd recommend trying visual studio to get started with, it's the easiest way to get hacking. .net core and the like on linux is a lot more raw.

        EDIT the other comment about learning git (or other VCS) is also GREAT. Stand out from the crowd by not screwing up everyone elses work by checking in crap by accident. My favourite colleagues have all been people that triple-checked their diffs before pushing.

        3 votes
        1. [7]
          Ark
          Link Parent
          Learn by doing, the old tried and trusted method. I'll have to learn what the cool C# kids are up to these days as well it seems! I'm definitely going to look into Git, I can imagine the company...

          Learn by doing, the old tried and trusted method. I'll have to learn what the cool C# kids are up to these days as well it seems!

          I'm definitely going to look into Git, I can imagine the company will use some form of it and standing out from the crowd is something I'll always try and do (I'm not trying to be an indie coder I swear...)

          1 vote
          1. [6]
            bme
            Link Parent
            :) I just noted that you might be doing some testing. Here is a simple exercise: Write that console app (randomly generate a number, prompt for a guess, tell the user if they were too high or too...

            :)

            I just noted that you might be doing some testing. Here is a simple exercise: Write that console app (randomly generate a number, prompt for a guess, tell the user if they were too high or too low, loop till they guess or hit some bound). Write any old which way. Now see how you can decouple the core from io such that you have a pure object encapsulating a round of the game that takes inputs disconnected from any prompt that is amenable to unit testing.

            If that sounds too easy, try something harder but with the same intent. Almost all development ends up being some kind of variation on this theme.

            1. [5]
              Ark
              Link Parent
              I think I understand. Essentially you are changing up how the game inputs/outputs data, by changing the hardware available?

              I think I understand. Essentially you are changing up how the game inputs/outputs data, by changing the hardware available?

              1. [4]
                bme
                Link Parent
                Eh, kind of. Here is some python. Hopefully this is obvious: random_number = 4 number_str = input("Guess a number: ") number = int(number_str) if (number > random_number): print("guessed too...

                Eh, kind of. Here is some python. Hopefully this is obvious:

                random_number = 4
                number_str = input("Guess a number: ")
                number = int(number_str)
                if (number > random_number):
                  print("guessed too high")
                elif (number < random_number):
                  print("guessed too low")
                else:
                  print("you guessed it")
                

                compare this to:

                random_number = 4
                
                def game(user_input):
                  if (number > random_number):
                    return "guessed too high"
                  elif (number < random_number):
                    return "guessed too low"
                  else:
                    return "you guessed it"
                
                
                number_str = input("Guess a number: ")
                number = int(number_str)
                output = game(number)
                print(game)
                

                which do you think is easier to test? why?

                1 vote
                1. [3]
                  Ark
                  Link Parent
                  Number 2. I get it now, you are separating the core functionality of the game to the inputs and outputs which allows you to mess around with the the latter without having to rewrite any of the...

                  Number 2. I get it now, you are separating the core functionality of the game to the inputs and outputs which allows you to mess around with the the latter without having to rewrite any of the core code, correct?

                  3 votes
                  1. [2]
                    bme
                    Link Parent
                    You got it.

                    You got it.

                    2 votes
                    1. Ark
                      Link Parent
                      Huzzah. Does seem like a very efficient way to test a system, thanks for explaining it to me, you learn something new everyday!

                      Huzzah. Does seem like a very efficient way to test a system, thanks for explaining it to me, you learn something new everyday!

      2. [3]
        Comment deleted by author
        Link Parent
        1. [2]
          Ark
          Link Parent
          Looks good, exactly what I was looking for! I've heard a lot of good things about them too, definitely going to check them out now I've got your endorsement. Do I want a .NET IDE if I'm writing...

          Looks good, exactly what I was looking for! I've heard a lot of good things about them too, definitely going to check them out now I've got your endorsement. Do I want a .NET IDE if I'm writing code in C#?

          1 vote
          1. [2]
            Comment deleted by author
            Link Parent
            1. Ark
              Link Parent
              I see, and yeah I think it'll be easier to decide once I know what tools the company wants me to work with. They might have their own specific ways of doing things so I might not even have the...

              I see, and yeah I think it'll be easier to decide once I know what tools the company wants me to work with. They might have their own specific ways of doing things so I might not even have the freedom to jump around IDEs. Nothing inherently wrong with that I suppose, especially considering I don't have a prior preference, but it would be nice to have the freedom to choose what feels best for me.

  2. [2]
    hightrix
    Link
    To piggy back on the other comments made here, I've a ton of .net, C#, WPF, unity, silverlight, etc... experience, I've been working in c# on and off for the past 10 years or so. Please feel free...

    To piggy back on the other comments made here, I've a ton of .net, C#, WPF, unity, silverlight, etc... experience, I've been working in c# on and off for the past 10 years or so. Please feel free to hit me up if you go that route and have any questions.

    2 votes
    1. Ark
      Link Parent
      Will do, thanks for the offer!

      Will do, thanks for the offer!

  3. [4]
    Social
    Link
    Do you have experience in any other languages? If yes which? Learn X in Y minutes has an overview of C# . It's very basic but you should see at least some concepts you know from C++ and how...

    Do you have experience in any other languages? If yes which?

    Learn X in Y minutes has an overview of C# . It's very basic but you should see at least some concepts you know from C++ and how they're used in C# (arrays, printing and so forth).

    What are your problems going to be doing at your job? Game development? General programming (whatever that might be)? Tell us and someone might be able to give you specific advice. :)

    1 vote
    1. [3]
      Ark
      Link Parent
      Only real experience is in C++, and that was only at basic level. Definitely going to give it a read, exactly what I was looking for! I'm in the automation team that tests the companies products...

      Only real experience is in C++, and that was only at basic level.

      Definitely going to give it a read, exactly what I was looking for!

      I'm in the automation team that tests the companies products which is remote desktop software, not sure if I can release any more information about the company and what I'm doing. I'm probably fine but rather safe than sorry.

      1. [2]
        Social
        Link Parent
        Great that you needed exactly that. You might wanna read up on testing in C#. Testing is a tool which gives developers and companies piece of mind knowing their software works as intended. You...

        Great that you needed exactly that. You might wanna read up on testing in C#. Testing is a tool which gives developers and companies piece of mind knowing their software works as intended. You might want to ask your job which tools they use for testing and look into those tools.

        Since you'll be writing tests I highly encourage you to read Code Complete 2 chapter 22 "developer testing". It gives guidance on how to write better tests. It's the best book on programming techniques I have read.

        Enjoy and have a blast.

        1. Ark
          Link Parent
          Awesome, will see if I can find it on Amazon for cheap. Until I start working and making that dough I'm still on the student budget. Thanks man, I'm really looking forward to it!

          Awesome, will see if I can find it on Amazon for cheap. Until I start working and making that dough I'm still on the student budget.

          Thanks man, I'm really looking forward to it!

  4. [3]
    Social
    Link
    OP! Here's a list of real projects with tutorials and a handfull of them are in C#. Consider having a looksie here. :)

    OP! Here's a list of real projects with tutorials and a handfull of them are in C#. Consider having a looksie here. :)

    1 vote
    1. [2]
      Ark
      Link Parent
      Nice, will definitely check these out. Best way to learn for me I think is by solving problems, so small tasks like these are perfect, thank you.

      Nice, will definitely check these out. Best way to learn for me I think is by solving problems, so small tasks like these are perfect, thank you.

      1. Social
        Link Parent
        You are welcome. And ProjectEuler is great, check it out.

        You are welcome. And ProjectEuler is great, check it out.

        1 vote