6
Scanner
5y

Gonna teach someone conpletely new to programming some C#. What are some good exercises I can give them to understand general programming well?

So far I'm thinking FizzBuzz, some progressively more complex math+logic stuff and maybe fibonacci using recursion.

Comments
  • 0
    I get my newbies to create a calculator that can do decimal, hex, oct etc. If we are plc coding a lift simulator is nice logic to work out call patterns etc.
  • 1
    Fibonacci using recursion is the worst way to explain or teach recursion... please don't do it.
  • 0
    @philcr: a calculator could be a good one, thanks

    @kpenc: oh, how come? It's the way I was taught, I thought it would be alright. You reckon something simpler would be better?
  • 0
    @kpenc I'll get them to do something like raising a number to a power.

    Might be better to keep them focused on the recursion stuff.
  • 0
    @uddinstock Yeah, definitely gonna do some sort of sort, at some point. The prime numbers thing sounds intetesting, too.

    Gonna put together a list of things to do and give them out one at a time, or something.

    What they're going into isn't graphical, else I'd definitely do the calculator thing as well.
  • 1
    Interesting. Yeah, you're right. Making a calculator was probably the first time I needed to use switch, too.
  • 0
    @Scanner Yeah that's fine, or factorial.
  • 0
    It depends on your purpose for teaching the new person.

    If you are trying to hook him into the dark side, then something flashy as creating game would do by showing him step by step to creating one.

    If it's going to be purely academic, then go with teaching him/her with C# and OOP concepts as well as data structures.

    If it's for a hobby, I say start with skills necessary to build a website.
  • 0
    A one-liner Fibonacci
  • 0
    On Hackerrank you can find a 30 days of code (or something) section with several interesting problems for beginners.
  • 0
    @uddinstock I do graphical for more complex calculations, parsing brackets etc
Add Comment