Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Learning C# through exercises

Learning C# through exercises

Scheduled Pinned Locked Moved C#
learninghelptutorialquestioncsharp
17 Posts 10 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Roger Wright

    Programming doesn't really lend itself to exercises. 1.1 Write a program to read a serial port carrying ASCII data and print the data in two columns. Hmmm... How would anyone score the widely varying results in a classroom, let alone a book? When it comes to defining software solutions, there are just too many degrees of freedom. A classroom instructor can assign such problems, then take the time to work through all the individual solutions - one for each student - to find which work and which don't. A textbook author can't do that. Instead, they usually (the better ones, at least) provide lots of real world examples to demonstrate the concepts and how they apply to different challenges. I'd suggest that you grab a good book with lots of sample code, then as you go through the material, set yourself a challenge to write code that does what the chapter is about. Then compare your solution to the worked out examples given by the author(s). The comparison will teach you a lot. One book I found tonight, which I just ordered for myself, by the way, is from Wrox Press. I've owned a number of Wrox books, and never found one that wasn't excellent. You can view it here[^]. Wrox books generally are very well written, easy to understand, and give you access to loads of downloadable code to study and try out.

    Will Rogers never met me.

    J Offline
    J Offline
    jeramyRR
    wrote on last edited by
    #4

    Thanks for the suggestion. I just ordered that book.

    R 1 Reply Last reply
    0
    • J jeramyRR

      Hi all! I've been reading an excelent book on C# called Illustrated C# 2010 and I feel like I this book covers a lot of the topics I need in order to learn how to program.  However, it isn't a textbook so there are no exercises for me to practice what I'm reading.  While I may retain some of what I'm reading, I find it imperative that I actually sit down and write code in order to learn it.  So my problem here is a lack of exercises.  Can anyone suggest a website, or a book that has a suffient amount of exercises that will help me learn the material I am reading?  I've checked out sites like projectelure and spoj, but those sites seem like they are geared for people that understand the syntax of programming languages already and just need to learn how to create algorithms.  What I'm looking for is a resource that has exercises on how to apply what I've read (for example: Write a program that uses delegates to do this... or Write a program that uses Interfaces to do x...)?  Does this make sense to you guys? I feel like I just wrote a lot of stuff to ask what everyone else will think is a simple question.

      V Offline
      V Offline
      VJ Reddy
      wrote on last edited by
      #5

      LINQPad is a free tool to quickly write small programs and test. It can be downloaded from here http://www.linqpad.net/[^] The examples from this book http://shop.oreilly.com/product/9780596800963.do[^] are readily available for LINQPad for running and testing.

      D L 2 Replies Last reply
      0
      • J jeramyRR

        Hi all! I've been reading an excelent book on C# called Illustrated C# 2010 and I feel like I this book covers a lot of the topics I need in order to learn how to program.  However, it isn't a textbook so there are no exercises for me to practice what I'm reading.  While I may retain some of what I'm reading, I find it imperative that I actually sit down and write code in order to learn it.  So my problem here is a lack of exercises.  Can anyone suggest a website, or a book that has a suffient amount of exercises that will help me learn the material I am reading?  I've checked out sites like projectelure and spoj, but those sites seem like they are geared for people that understand the syntax of programming languages already and just need to learn how to create algorithms.  What I'm looking for is a resource that has exercises on how to apply what I've read (for example: Write a program that uses delegates to do this... or Write a program that uses Interfaces to do x...)?  Does this make sense to you guys? I feel like I just wrote a lot of stuff to ask what everyone else will think is a simple question.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #6

        MSDN has some simple tutorials[^], and I can also recommend Charles Petzold's .NET Book Zero[^].

        Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

        1 Reply Last reply
        0
        • J jeramyRR

          Hi all! I've been reading an excelent book on C# called Illustrated C# 2010 and I feel like I this book covers a lot of the topics I need in order to learn how to program.  However, it isn't a textbook so there are no exercises for me to practice what I'm reading.  While I may retain some of what I'm reading, I find it imperative that I actually sit down and write code in order to learn it.  So my problem here is a lack of exercises.  Can anyone suggest a website, or a book that has a suffient amount of exercises that will help me learn the material I am reading?  I've checked out sites like projectelure and spoj, but those sites seem like they are geared for people that understand the syntax of programming languages already and just need to learn how to create algorithms.  What I'm looking for is a resource that has exercises on how to apply what I've read (for example: Write a program that uses delegates to do this... or Write a program that uses Interfaces to do x...)?  Does this make sense to you guys? I feel like I just wrote a lot of stuff to ask what everyone else will think is a simple question.

          V Offline
          V Offline
          V 0
          wrote on last edited by
          #7

          Just a tip, but I found that many (not all of them) sample code in books where wrong in some way or another. Sometimes it was a type-o, sometimes they use a function that doesn't work or often they have a wrong logic, sometimes you need to have done something else and they forgot to mention. Most problems are small, in a rare occasion it is totally wrong. I suspect more or less it is done on purpose to let you think and figure out for yourself, but it could be frustrating if you don't expect errors in samples.

          V.

          1 Reply Last reply
          0
          • J jeramyRR

            Hi all! I've been reading an excelent book on C# called Illustrated C# 2010 and I feel like I this book covers a lot of the topics I need in order to learn how to program.  However, it isn't a textbook so there are no exercises for me to practice what I'm reading.  While I may retain some of what I'm reading, I find it imperative that I actually sit down and write code in order to learn it.  So my problem here is a lack of exercises.  Can anyone suggest a website, or a book that has a suffient amount of exercises that will help me learn the material I am reading?  I've checked out sites like projectelure and spoj, but those sites seem like they are geared for people that understand the syntax of programming languages already and just need to learn how to create algorithms.  What I'm looking for is a resource that has exercises on how to apply what I've read (for example: Write a program that uses delegates to do this... or Write a program that uses Interfaces to do x...)?  Does this make sense to you guys? I feel like I just wrote a lot of stuff to ask what everyone else will think is a simple question.

            B Offline
            B Offline
            BobJanova
            wrote on last edited by
            #8

            Not sure why this was downvoted, gave it a 4 to compensate. Textbooks with exercises seem to be out of fashion these days. K&R (the classic C language guide) has them at the end of every chapter, and that was a good idea (even if I didn't actually do most of them!). But it is a good suggestion to read the description of a problem or a language feature, stop before you get to their worked example, and try to solve it/make use of it yourself, then look at what they prepared. Unfortunately it's so long since I needed non-programmers' introductions that I can't really offer any meaningful advice because my source material is not relevant any more.

            J 1 Reply Last reply
            0
            • B BobJanova

              Not sure why this was downvoted, gave it a 4 to compensate. Textbooks with exercises seem to be out of fashion these days. K&R (the classic C language guide) has them at the end of every chapter, and that was a good idea (even if I didn't actually do most of them!). But it is a good suggestion to read the description of a problem or a language feature, stop before you get to their worked example, and try to solve it/make use of it yourself, then look at what they prepared. Unfortunately it's so long since I needed non-programmers' introductions that I can't really offer any meaningful advice because my source material is not relevant any more.

              J Offline
              J Offline
              jeramyRR
              wrote on last edited by
              #9

              I had a great textbook for learning introductory algorithms like binary searches and stuff like that, and it had exercises at the end of each chapter we read. That helped me learn the material because I was having to create a program based off the exercise that didn't exactly match the samples in the book. Too bad it's "out of fashion."

              1 Reply Last reply
              0
              • J jeramyRR

                Hi all! I've been reading an excelent book on C# called Illustrated C# 2010 and I feel like I this book covers a lot of the topics I need in order to learn how to program.  However, it isn't a textbook so there are no exercises for me to practice what I'm reading.  While I may retain some of what I'm reading, I find it imperative that I actually sit down and write code in order to learn it.  So my problem here is a lack of exercises.  Can anyone suggest a website, or a book that has a suffient amount of exercises that will help me learn the material I am reading?  I've checked out sites like projectelure and spoj, but those sites seem like they are geared for people that understand the syntax of programming languages already and just need to learn how to create algorithms.  What I'm looking for is a resource that has exercises on how to apply what I've read (for example: Write a program that uses delegates to do this... or Write a program that uses Interfaces to do x...)?  Does this make sense to you guys? I feel like I just wrote a lot of stuff to ask what everyone else will think is a simple question.

                T Offline
                T Offline
                Tim Groven
                wrote on last edited by
                #10

                Here are some awesome, and challenging exercises: http://codekata.pragprog.com/2007/01/code_kata_backg.html[^]

                1 Reply Last reply
                0
                • V VJ Reddy

                  LINQPad is a free tool to quickly write small programs and test. It can be downloaded from here http://www.linqpad.net/[^] The examples from this book http://shop.oreilly.com/product/9780596800963.do[^] are readily available for LINQPad for running and testing.

                  D Offline
                  D Offline
                  dybs
                  wrote on last edited by
                  #11

                  LINQPad is great. I use it all the time for testing small snippets, one-time mini-programs, and just playing around to figure out how to use a .NET feature. The Dump() method is particularly useful for getting a feel for the structure of an object you're not familiar with.

                  The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen

                  V 1 Reply Last reply
                  0
                  • D dybs

                    LINQPad is great. I use it all the time for testing small snippets, one-time mini-programs, and just playing around to figure out how to use a .NET feature. The Dump() method is particularly useful for getting a feel for the structure of an object you're not familiar with.

                    The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen

                    V Offline
                    V Offline
                    VJ Reddy
                    wrote on last edited by
                    #12

                    As you said, Dump() method is really a nice feature to visualize.

                    1 Reply Last reply
                    0
                    • V VJ Reddy

                      LINQPad is a free tool to quickly write small programs and test. It can be downloaded from here http://www.linqpad.net/[^] The examples from this book http://shop.oreilly.com/product/9780596800963.do[^] are readily available for LINQPad for running and testing.

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #13

                      Thats GR8 To Work LinqPad.

                      V 1 Reply Last reply
                      0
                      • L Lost User

                        Thats GR8 To Work LinqPad.

                        V Offline
                        V Offline
                        VJ Reddy
                        wrote on last edited by
                        #14

                        Thank you.

                        1 Reply Last reply
                        0
                        • J jeramyRR

                          Hi all! I've been reading an excelent book on C# called Illustrated C# 2010 and I feel like I this book covers a lot of the topics I need in order to learn how to program.  However, it isn't a textbook so there are no exercises for me to practice what I'm reading.  While I may retain some of what I'm reading, I find it imperative that I actually sit down and write code in order to learn it.  So my problem here is a lack of exercises.  Can anyone suggest a website, or a book that has a suffient amount of exercises that will help me learn the material I am reading?  I've checked out sites like projectelure and spoj, but those sites seem like they are geared for people that understand the syntax of programming languages already and just need to learn how to create algorithms.  What I'm looking for is a resource that has exercises on how to apply what I've read (for example: Write a program that uses delegates to do this... or Write a program that uses Interfaces to do x...)?  Does this make sense to you guys? I feel like I just wrote a lot of stuff to ask what everyone else will think is a simple question.

                          C Offline
                          C Offline
                          cjb110
                          wrote on last edited by
                          #15

                          I liked Wrox's Beginning Series, the C# one was structured in a way that encouraged you to code while reading.

                          1 Reply Last reply
                          0
                          • J jeramyRR

                            Thanks for the suggestion. I just ordered that book.

                            R Offline
                            R Offline
                            Roger Wright
                            wrote on last edited by
                            #16

                            Just an update... got my copy Monday, skimmed over it, and it looks excellent. It covers a lot of topics that previous books I've used didn't, some basic things I didn't know, and I learned a few new things in the first 50 pages. But it's got to go back on the pile for a few weeks, at least until I finish this Statistics course... darn. :sigh:

                            Will Rogers never met me.

                            J 1 Reply Last reply
                            0
                            • R Roger Wright

                              Just an update... got my copy Monday, skimmed over it, and it looks excellent. It covers a lot of topics that previous books I've used didn't, some basic things I didn't know, and I learned a few new things in the first 50 pages. But it's got to go back on the pile for a few weeks, at least until I finish this Statistics course... darn. :sigh:

                              Will Rogers never met me.

                              J Offline
                              J Offline
                              jeramyRR
                              wrote on last edited by
                              #17

                              Yeah I got mine Monday also. I've read about the first 100 or so pages and done all the exercises. Haven't learned anything new so far, but I'm reading it in conjunction with PRO C# and .NET 2010 which is explaining a whole lot of things I never even new existed.

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups