tags:

views:

87

answers:

5
+2  Q: 

How to get started

First off, I really do apologize if this is not appropriate to ask here. I see links that are marked subjective and moved to a wiki but I can't find it.

My question is this:

How do I start to do things?

I love programming languages and trying to think of logical solutions to problems. A lot I have been reading on C# and the underworkings of WPF. (Also Python and PyQt) In all my college courses in programming, I learn absolutely nothing (What a variable is, what an array is, NOT what stack and heap are, NOT what CLR/JVM actually does) I feel I have a very good grasp on the basics and a decent grasp on the more substantial topics

I have been trying to make my own C#/WPF app that is governed by input sensors and output relays for home/shop automation

I am having trouble to just do certain things. For example. make a UserControl to be used by a central control that also controls another UserControl while having a database layer.

I would really like to learn how to structure logically programs and what best design is (for example, I hate having a program filled with if/else statements) The problem is, the books I find only have basic examples that don't really deepen my overall undestanding of how all the pieces need to work together.

Sorry for a long, rambling question. If this doesn't belong here, let me know where to move it or how to delete it.

Thanks for any advice that can be given, I definitely appreciate it

+3  A: 

How do I start to do things?

You find an open-source (or at least "source available at no cost" -- not quite the same thing, but the difference should only matter if you plan to redistribute your results) project that does "something like" (maybe "vaguely" like;-) what you're trying to do, and is coded in a language that you know or want to learn.

You duplicate the source tree for that project to your machine and put the duplicate under a version control system (svn, hg, git, bazaar -- whatever -- there's a bazillion good, free ones) quite independendently from any VCS it might have been in originally -- the point is being able to save your edits all the time, and revert them easily if and when you make mistakes.

Then you start hacking, looking things up in docs and forums, asking on SO, etc, as needed;-).

Alex Martelli
A: 

There is no "one shoe fits all" solution in programming world. But i do recommend you a book. Hope you like it.

Head First Design Patterns (O'Reilly)

chrizyuen
A: 

Honestly... truly... the best answer? Do stuff.

I learned a lot in school. Tons. But as you said, there is a level that schools don't touch. I've got a deeper understanding in my 2 months of programming/data analyst than I got in 2 years getting my AA in programming.

Realize one thing: School is there to teach you a wide range of things - to a minimum level. You won't become an expert from school alone (There are exceptions... as with any rule).

How have I actually started to understand stuff? Programming. Boss gave me a program task and I ran with it.

Personally, I've really liked Apress books. C# 2008 Illustrated (or the soon to be released 2010) has proved invaluable to me. I actually read 95% of the book, double checked examples... and most importantly... put them into practice in my horrible first programming task. I've re-factored at-least 5 times already, and already am seeing things that will make me do it again.

I don't know if you have a job... or a hobby... an open source program you'd like to help with... or a task you'd like to automate. Pick something, learn it inside out, then program it.

Personally, again... I'd say joining an already running open-source project is too much. I tried a few times and it was too much for me. To many things I didn't understand. I plan to try again once I get a little better, but I don't plan on hanging out on NBA courts when I can barely dribble the ball myself... if ya know what I mean.

WernerCD
A: 

How do I start to do things?

Find a problem that needs solving and writing a program to do it. It doesn't have to pretty or efficient. The program just needs to work. As you work with the program you'll begin to learn better techniques for accomplishing the task you set for yourself. Google and SO will be your friends and help you learn those better techniques.

As other have said, jumping straight into controlling hardware with C# may not be a simple task for your first program.

Good luck.

Mike Chess
A: 

Read Martin Fowler's book Refactoring: Improving the Design of Existing Code.

Martin Fowler gives you the building blocks to think about high level design decisions by introducing you to all the low level decisions you may or may not be aware that you are making. He also gives a good introductions to the concept of code smells.

Look at design principles like DRY Do Not Repeat Yourself, KISS Keep It Simple Stupid, and keep it consistent(Pet Peeve). More design principles here http://stackoverflow.com/questions/98695/design-principles.

Practice these principles as often as possible especially in your course work and outside projects..

Get involved in open source

Hard to do but probably will help you the most especially when combined with the first two.

Personal Experience feel free to skip.

After three years of tough undergrad I realized I could solve some really complex proofs but I didn't know how to write anything but spaghetti code. The longest projects I had were 5 months long which was enough time for it really to catch up with me. I was usally very productive for the first 2-3 months but was crawling along from the code debt by month 4. At this point I had the same realization you did.

Everyone says the best way to learn was to practice but I didn't know how to practice. I realized that the problem with thinking about design was I couldn't move one design into another. A professor mentioned Martin Fowler's book Refactoring: Improving the Design of Existing Code and that has made all the difference.

JamesF