Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
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 user control to be used by a central control that also controls another user control 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.
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;-).
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)
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.
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.
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
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.
I have been programming, non professionally for about 23 years and find I am a little stuck in my ways. I find a tool I like, and it stays that way for year after year. Unfortunately this means that I am behind the times in my programming.
I am not directly planning on programming professionally per se, however, it is very handy to be able to develop client side (and lately a desire to move to cloud) apps for use by my clients, and also for myself in my day to day work (hardware, network and Internet support services).
Unfortunately, I find that I am having great difficulty in understanding recent concepts, and because I am trapped in programming styles of the 80's and 90's I am finding myself slow to understand concepts.
What I am looking for is suggestions for online and printed material offering real 'intro to concepts' and (separate material) technical usage for modern programming concepts and their usage in Java and C# (all three of which I have had only minimal exposure to).
I would be most obliged.
--UPDATE--
I just want to add in a big thank you to everyone who left a reply or comment to this question.
I have found some wonderful resources due to your recommendations, and a return of my enthusiasm for programming. No longer does the way forward feel like an uphill struggle, and for the first time in the last year or so, the light at the end of the tunnel doesn't look like an oncoming lorry.
Read developers blog. Try to keep a fair amount of resources in your feed reader and go through them every day (or so). Just pick up the things you like.
Most coders write their opinions, their view, and so on. You can learn A LOT by just reading what others do and filtering what you like or find interesting and what you don't. Books are helpful to, but, with 23 years of experience and just wanting to be up to date... I'd recommend blogs...
Some blogs I read:
Coding Horror
Good Idea
Kirill Osenkov
Joel on software
Jon Skeet
Joe Duffy
Byte Bytes
Stackoverflow is a great resource too. Not just for finding answers to your problems but also for reading answers to other problems. Seriously, I've found myself quoting some answer from stackoverflow a lot of times lately... or applying something I've seen here.
For what is worth, being up to date with the current tendencies (like TDD or Aspect Oriented Programming) is like being up to date with the world itself. You get up in the morning, and read the newspaper, maybe just the headlines and then something specific, for about 5 or 10 minutes. Then you read the articles you find interesting but you're somewhat conscious about the most important things that are happening. This is the same, but those blogs (and some others) are your newspaper for the programming world.
Read some newer programming books like The Pragmatic Programmer. This book talks about programming using modern tools, the idioms and techniques, etc.
I lot of "new" concepts are not actually new. Most "modern" language features are derived from early functional languages, for example.
Techniques such as TDD and Agile are just codifications of things that have been done for a long time, just perhaps not in the mainstream. Nor are they hard to understand per se.
I suspect your biggest obstacles will be terminology. You may be used to hearing buzzwords, but when you look at what they mean you just find them explained in terms of other buzzwords.
My recommendation is to persist. Find your way back to where things are explained in terms you can relate to then work back out. Once you've done that with a few concepts you'll feel a lot more confident in tackling more, and have a better idea of which things you really want to concentrate on.
For language related things this is probably easier because you can go back to, for example, Lisp and find the concepts explained in terms of what was familiar in the 60s and before! (of course you can find more recent coverage too).
For design and process related subjects just reading up on their histories in wikipedia should give you some clues.
Keep your focus narrow enough to not be overwhelmed, but broad enough to take account of the eco-system that a tool or technology exists in.
You will need some alternative approach to the topics. I have found the "Heads on..." series to be both entertaining and technically sound.
Have a look on Heads on Java: http://oreilly.com/catalog/9780596009205
If all you want to do is keep up with times, you should read developer blogs. I am not going to give you the regular blog list cause I don't think it's a good idea to depend on 4-7 bloggers for all your info.
Earlier I used to pool all the bloggers in Google reader and my reading list grew to over 400 blogs. That's definitely not going to help.
Better visit websites like codebix.com, dzone.com, to get the latest articles and a little help of the community in selecting the best articles ;).
Personally, I learned a lot from watching lectures and tech talks posted by google. They have a ton of content about software engineering. Watching videos is obviously a very different learning experience than reading but most of the people are very intelligent and are talented speakers.
http://www.youtube.com/GoogleDevelopers
http://www.youtube.com/GoogleTechTalks
It sounds like your programming logic skills are fine. It seems to me like the best way for you to update your skills is to pick up a copy of C# (Express is free) - Or java (I'm a .net guy) and convert one of your old applications, you will then find real world issues and will be able to solve them (With the help of SO) using the 'Modern' methods.
Good luck.
You might find these lectures on functional programming by Erik Meijer enlightening.
I've been a software developer for 10 years and came all the way from a wild world of assembly language programming, then server side of C++ and COM, and for the last 5 years I was comfortably settled in a quiet world of .NET, C# and development of business applications.
The problem is - the last couple of years was so comfortable and I was also spending almost half of my time doing a BA's work, that I feel like I forgot a good part of low level C# language, Design Pattern and ASP.NET. And after almost 5 years of not using C++ for a big projects my skills in that language are even worse.
That does not mean I can't program - I do it every day and quite successfully - but I feel what I would not be able to pass most of tough job interviews should the need arises, which is very likely in a current recession. And the reasons I think I would not pass - is that I forgot all the standard things what usually people are being asked on the interviews (e.g. I use the design patterns - but if you ask me - which pattern what that - I would probably not give you the correct name, because all he DP for me are just a smart ways of using static functions and virtual functions).
Can someone please point me to a resource or give me an advice (can I have both please?),
how can I quickly (in a week or so) could brush up my knowledge of C#/.NET, DP and ASP.NET to the level of the very good senior dev (whom I was a 2 years ago). As for the C++ - I am willing to spend a month to get my knowledge back again, but this is of less priority.
Please do understand me right - I am not a newbie and all these things I knew before - just want to be back in business 100% again.
Thank you.
For Design Patterns, I would suggest to get a copy of Head First Design Patterns.
Regarding ASP.NET, C# and the usage of some patterns, watching Rob Connerys ASP.NET MVC Storefront Webcasts would be a good start.
What you could also do, is having a look at Scott Hanselmanns interview questions which you can find at his blog. Try to find an answer to all of them and you should be in pretty good shape ;-)
In addition, I'd have a look at the code of some successfull open source projects like subtext, DasBlog, Oxite ...
They are a great learning ressource.
The next step could be to contribute to some of those projects (sending some patches to the project admins), because nothing can replace practice ...
However you should keep in mind, that one week might not be enough time to resharpen your skills.
Good luck anyway
Well, since you knew all this, which I guess means "have used all this" previously,
you could take look back at your own code as a starting point.
Really ask yourself:
why did I do it like this?
when was this, what situation was I in?
can I do it better now?
Take a small tricky and interesting part of the program out, and try to
recode it.
This is all meant to get you mentally back to those times, pick up a few discarded
threads in memory. I find such methods really useful to reactivate knowledge.
Then read up on new developments/best practices on blogs and books and skim through
books that used to be useful to you (maybe there are current editions)
I used scott meyer's "Effective C++..." series to get me back into and
advance my knowledge of c++.
Design Patterns are covered in many books today. The stanard of course is the "Gang of Four" book named "Design Patterns".
Put OO, Agile and Pattern together
Another book is more hands-on and combines Design Patterns with an other new thing -- "Agile Development". The good thing is, that design patterns are presented in live examples and interestingly presented in context. I think Robert C. Martin also brings a lot of insight into many OO development principles. The book is called Agile Software development.
But of course, it depends how far you want to go. Do you really want to brush up your knowledge (then I could maybe give further hints) or do you want to just be upto date for interviews?
I've found that the asp.net videos on www.asp.net/learn are very good for quickly learning about (or remembering) many asp.net topics.
Slides on design patterns in C#
Well if you have some two months to bursh up C++ and design patterns then I would recommend you the following books .
- C++ FAQ Second Edition
- Effective C+++
- Effective STL
I think for C++ this should be sufficient, if you have some more time you can also try
Inside c++ Object Mode
For design Patterns
I think reading complete book at one go is not a good idea.
Try to list down few design patterns from each category creational, structural and behavioral that you have worked on or that you want to talk in interviews.
There are lot of resources on net about each of them and try to completely understand each of them rather than jumping into a book and getting almost lost.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I've been using C# for a while now but haven't really homed in my UI design skills. At the time I design them, I find myself enjoying the design, but later on, I look back on it and see horrible work. An example comes to mind from my project at work where I had to use 127 buttons to represent 127 computers in our lab. :/
I was wondering if anyone could refer me to a site or book that would teach good UI design?
Thanks!
I believe observation and instincts helps tremendously.
Play with applications and dig deep into the functionality they implemented. Especially look at Apple, since they revolve around aesthetics. What worked? What didn't? Why did it work? Start asking yourself questions as you tinker with web sites and software.
Then I would play around and design some concepts. Show these concepts to friends, both technical and non. Ask them questions like, "Add a new drink to the list" or "Find x for me." See how they react and differ from each other. Did someone with a technical background notice buttons faster than the non-techies? Should you combine elements together?
This stuff should be fun. After all, this is like building a complete Lego set and showing it off to your friend. He/she get's to see, touch, and play with your creation.
Joel Spolsky wrote a book called User Interface Design for Programmers, which is a good read, and an abridged version can be found online.
The Design of Everyday Things
by Donald A. Norman
The Humane Interface
by Jef Raskin
The most important to focus on first would be the work flow of things. Try to find the goals the user has and create a model the is as effective as possible in reaching that goal. Also read a lot around this one of the best books to start with is The Inmates are running the asylum
I would suggest lots of sketches here. Make sure you keep it simplistic to focus on what and where things are placed and less on how they look. A tool like balsamiq is great for fast UI mockups. Also go through UI patterns here to come up with concepts that work, Tidwells book Designing Interfaces is great and also Infragistics new patterns site are great resources
Now you have an idea on what you want to do, now is the time to put together the interface. Along the way from the first sketch to the last pixel - always user test.
And don't always follow the UI guidelines, it is OK to break them if you have a good reason. And last, you will only get one free unrelated 3D effect in an interface :)
Building on Vinay's answer, integrating with your target platform is always going to be of paramount importance when designing an interface. If you were developing on Windows, make sure you stay true to the look, feel, and usability expectations of that platform. The interface guidelines are always going to be a jumping off point, though some are better than others. For my money's worth, the GNOME Human Interface Guidelines are a great set of guidelines to designing user-friendly interfaces, even if you aren't using GTK.
On a more general note, learning good design is really learning to recognize good design. Find some applications that are really intuitive and then mimic their layout, style, etc. Then, when you are struggling with how to implement a particular feature, find a suitable analogue in a one of those other applications. You will want to pay particular attention to issues like grouping, tabbing, shortcuts, dialog modality, etc. I think you will find that very few good design principles are dependent on the language you are programming in, except in so far as it may influence the toolkit and platform that you target.
I have read Spolsky's book User Interface Design for Programmers, as well as the classics The Windows Interface Guidelines for Software Design and Windows User Experience. The latter two are/were good reference books. Spolsky's book is a wonderfully entertaining read and teaches you how to think about user interface design.
For my money, though, the best way to design the user interface of a desktop application is to duplicate existing solutions from popular software. And by "duplicating," I'm referring to two distinct facets - the mechanism and the aesthetics.
As far as the mechanism is concerned, make sure your UI works the way people expect it to work. For example, if you have a treeview, make sure the keyboard arrows work for navigation. If your form has a scrollbar, make sure it responds to the scroll wheel on your mouse. By and large, the .NET controls provide the standard behavior by default, but you may have to configure some of the design-time properties to fully achieve this. I had a controls library I was working with a few years back that provided a standard textbox. What I discovered, though, was that the text was not automatically highlighted when I tabbed into the control. I added that behavior because it's the way I (and my users) expected the control to work. Quoting Spolsky, "consistency causes ease of use, which, in turn, causes good feelings..." In other words, if the mechanisms of your UI does not match what your users expect, your UI will be a source of frustration for your users.
As far as the aesthetics is concerned, I have discovered that focusing on things like fonts, icons, spacing between and alignment of controls, selective use of color (I love using gradients), etc. can go a LONG way toward adding that sense of polish to your user interface. I've been known to use bitmap screen captures in Paint to measure the padding between controls in order to mimic the padding in the Microsoft applications. When I divulge that information to co-workers, most of them look at me as though I've lost my mind. But I cannot tell you the number of user interface successes I've had simply by focusing on what everyone else considers insignificant. I chalk that up to simply leveraging all of the research Microsoft has ever done in making their applications visually appealing.
So my recommendation would be to read Spolsky's book and then try to duplicate as much of the Microsoft apps as you can. For desktop applications, it's the surest approach.
Take some time and look at other software products. Every year, companies like Google and Microsoft dump millions of dollars into usability testing. Take what they have learned about user interaction and apply it to your own products/projects.
Infragistics also just created a nice reference for UI Design Patterns, it can be found at http://quince.infragistics.com/.
I think the best idea is to practice. I like designing my windows on paper first (blank or graph paper). Use a ruler and make sure things align and are clean.
An example comes to mind from my project at work where I had to use 127 buttons to represent 127 computers in our lab. :/
Ask questions to yourself here, what didn't I like about it? How can it be improved? Did I need drop down or a list box for the computers?
Also know your GUI widgets.
You can refer to Windows UI guidelines or Mac UI guidelines.
Mac UI guidelines are available at http://developer.apple.com/documentation/userexperience/Conceptual/AppleHIGuidelines/XHIGIntro/chapter_1_section_1.html
Windows UI guidelines are available at
http://msdn.microsoft.com/en-us/library/aa511258.aspx
EDIT:
Everybody likes the Google UI here is the link.
The answers already give some great books on how to specifically design interfaces. I'd like to help with some suggestions to help you improve your nose for design. Some of these might be cheaply available 2nd-hand, or something you can borrow locally (I'm always willing to lend books to people in Perth, Western Australia):
Bill Buxton's Sketching user Experiences - buy it, read the stories and start practicing sketching
Nathaniel Borenstein's (out of print) Programming as if People Mattered - a superb little book of anecdotes
Jeff Johnson's GUI Bloopers which will help you with lots of pragmatic examples of design gone wrong, in both desktop and web application design.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am not that good at programming. I finished my masters degree in electronics. I want to learn C#, the .NET Framework, and SQL. How much time do you think it would take (if I have 5 hours a day to devote to it)? Also, what order do I learn them in? I have Visual Web Developer 2008, is that enough to begin?
Copied from a new question by the same user:
I should have specified that I wish to make a career out .NET Development. I'd like to give myself 2 months to get the 'basics' down. As a developer, what is expected out of you in IT companies? What skillset do they require and what are the responsibilities as a junior or mid-level developer? I don't have any industry experience, will I be able to get a feel of the job duties while at home?
That's like asking how long it would take to learn French:
1 day to learn what it is
1 week to learn it to an infant/elementary level
1 year to be considered a beginner by professionals
Several years to be considered an experienced professional
Plus there's "deep" knowledge of those subjects which a mere mortal such as you or I will never learn
Then again, plenty of people (most normal people, non-programmers) never learn those subjects, so if you're like "most" people then the answer would be "it would take forever" or "it will never happen".
Dive right it, make it a hobby, and have fun :)
Coming from an electronics background myself I can tell you that you should pick it up pretty quickly. And having an electronics background will give you a deeper understanding of the underlying hardware.
IMHO the root of information technology is electronics.
For example..
Think of objects as components.
The .NET framework is essentially drawers full of standard components.
For example you know what a 7400 (NAND gate) is capable of doing. You have a data sheet showing the pin outs and sample configurations. You don't typically care about the circuitry inside. Software objects are the same way. We have inputs and we have methods that do something to the inputs to produce predictable outputs. As developers we typically don't care how the object was written... just that it does what it says it will do.
You also know that you can build additional logic circuits by using two or more NAND gates. This of this as instantiation.
You also know that you can take a NAND gate and place it inside a circuit where you can modify the input signals coming in so the outputs have different behaviors. This is a crude example but you can think of this as inheritance.
I have also learned it helps to have a project to work on. It could be a hobbyist project or a work project. Start small, get something very basic working, and work up from there.
To answer your specific question on "what should I learn first".
1) Take your project you have in mind and break it into steps. For example... get a number from the user, add one to the number, display the result. Think of this as your design.
2) Learn basic C#. Write a simple console application that does something. Learn what an if statement is (this is all boolean logic so it should be somewhat familiar), learn about loops, learn about mathematical operations, learn about functions (subroutines). Play with simple file i/o (reading and writing text files). The basic C# can be thought of as your wiring and discrete components (resistors, caps, transistors, etc) to your chips (object).
3) Learn how to instantiate and use objects from the framework. You have already been doing this but now it's time to delve in further. For example... play with System.Console some more... try making the speaker beep. Also start looking for objects that you may want to use for database work.
4) Learn basic SQL. Lots of help and examples online. Pick a database you want to work with. I personally think MS Access is a great beginners database. I would not use it for multi-user or cross platform desktop applications... but it is a great single user database for Windows users... and it is a great way to learn the basics of SQL. There are other simple free databases available (Open Office has one for example) if you don't want to shell out $ for Access.
5) Expand your app to do something with a database.
Just do it! Don't sweat the details.
Well, it will take you forever. There is so much to learn about programming that 10 years are not enough.
http://norvig.com/21-days.html
Don't get me wrong, you will learn the basics quickly enough, but to become good at it will take much longer.
You should focus on an area and try to make some examples, if you choose web development, start with an hello world web page, then add some code to it. Learn about postbacks, viewstate and Sessions. Try to master ifs, cycles and functions, you really have a lot to cover, it's not easy to say "this is the best way to learn".
I guess in the end you will learn on a need to do basis.
The best thing about C# is that it is very catchy. Easy to pick up, and you'll also have fun doing it.
But .Net framework is a very big library full of wonderful things to discover, and yet again due to the nature of .Net you'll also have fun learning it. It's a coherent, object oriented, well documented library, and C# makes it so simple to work with it that you can simply discover your way through it while coding.
The vast majority of articles, books or resources about .Net and C# simply concentrate on explaining functionality and the framework and far less about how to avoid quirks, workarounds or exceptional cases, like it happens with other languages I don't want to name (*cough C++*) so in the end the experience of learning C# and .Net is very enjoyable from start to finish, and the things you can accomplish using .Net also makes it very rewarding.
You picked a good language to start with, in my opinion, and finally to answer your question, it will take you about:
2 to 3 months to learn the basics
1 to 2 years to become a versed developer
5 years or more to become a expert or, depending on your dedication, a "guru".
But then again, beating the numbers and breaking the limits lies inside human nature. Can you do it faster than this? ;-)
How long is a piece of string? I think this is subjective. I know programmers that have learned an extraordinary amount in a very short time based on the experience that they've exposed themselves to.
Basically, get your hands dirty and you're bound to learn more.
It really depends on what you mean by "learn". You could probably spend a week and get a couple of pages up on the web that had some minimal level of interactivity to save information entered by the user in some database, and then have some other pages for querying and displaying the information. You could then spend the next 10 years of your life learning all the intricacies of the .Net framework, SQL, and mastering using the IDE.
The period of which you are capable of learning really depends on your ability to grasp the logic behind programming while where to learn from depends on your learning style.
If you are a learn-by-a-book type of guy, just jump on Amazon.com and perform a quick search, pick up the book with the best reviews or wait for someone here to recommend a book (I'm not a programming by book guy)
If you prefer screencasts (video feeds demonstrating what to do) or tutorials, then go straight to the source: http://www.asp.net/learn/. There are tons of videos and tutorials explaining everything you need to get started.
Visual Web Developer 2008 Express should be all you need to get started. Basically, the express editions are Visual Studio chopped down to a precise set of functionality to accomplish one thing. They don't have some of the bells and whistles needed for large scale development, but everything you should need.
Can't tell how long it would take, it really depends on your existing knowlege. I managed to learn the C#/.NET 2.0 core basics in about 2 months.
My suggestion to you: Try to learn towards exams, they make sure your learning covers all important parts and also guide you through this new technology. See Microsoft Learning.
If you have any programming experience, you can probably learn the C# syntax in a few hours, and be comfortable with it within a week or so. However, you will not be writing complex structures unless you write a lot of code with it. It's really the same as learning any language: you can learn all the words and grammer fairly quickly, but it takes a while to be fluent.
EDIT
A book you may want to pick up for learning C# is C# in a Nutshell (3.0) which I found to be very useful, and has been recommended by several people here.
If you want to learn, REALLY want to learn, then time is not of consequence. Just move forward everyday. Let your passion for this stuff drive you forward. And one day you'll see that you are good at C#/.NET.
You'll pick up c# fairly quickly (the language syntax is not that complicated). It will take you a long time to really learn the .NET framework, but you'll pick up the heavily used parts of the framework fairly quickly, and you should start seeing patterns in the framework.
My advice to you: don't just learn from a book or website. They will teach you the language and framework, but they will not teach you how to program anything useful.
Writing little code snippets will teach you how to do a very specific tasks, but they do not teach you how to write applications. My suggestion is that you think of an app that might be fun to work on (and doable... e.g. don't think that you're going to write an operating system or crysis or something in a month or two). Personally, when I was learning, wrote my own full featured IRC app, complete with rich text, personal messaging, etc.
The answer in my view is related to whether you have a tangible problem to solve or if you just want to learn for example to be prepared for a possible new job. If you have a problem then you are in better shape. You can start by looking around and seeing how other people went about solving that problem. Languages in general you should be able to pick up fairly quickly (after all you hold an MS in EE, no small feat IMO).
What you need to be on the lookout for is good programming practices. You'll probably see yourself asking "why is this method so small", "why is this method empty and what the heck is this abstract word doing here". That will give you perspective beyond syntax towards good writing.
When I switched careers out of Finance, I took 9 months off to study C++ full-time out of a book by Ivor Horton. I had a lot of support from my best friend, who is a guru, and I had been programming as a hobby since high school (I was 36 at the time).
It's not just the syntax that's an issue. The idea of things like pointers, passing by reference, multi-tiered architectures, struct's vs classes, etc., these all take time to understand and learn to use. And you're adding to that the .Net framework, which is huge and constantly evolving, and SQL, which is a totally different skill set than C#. You also haven't mentioned various subsets of the framework that are becoming more widely used, like WPF, WCF, WF, etc.
You're an academic so you can definitely do it, but it's going to take serious effort for a long time, and you definitely will need some projects to work on and learn from. Good luck to you.
According to Malcolm Gladwell, it will take you 10,000 hours to get really good. So get cracking.
Simple answer: a lot longer than two months. Learning to program competently will take longer than that, no matter what. It took me years to learn to be a competent object-oriented programmer, and I'm good at this stuff.
More detailed answers: it doesn't really matter whether you learn C# or SQL first, as they're very different. I'd probably suggest SQL, as it's easier to learn and more independently useful.
You will have a hard time getting used to the on-the-job realities at home, much as if you were studying plumbing or quantitative finance.
You're going to have a hard time putting all the information together without one or more projects you try to do. You're going to need to have other people to tell you when you're being stupid, when you're being overclever and will pay for it later, and when you're actually getting it.
Try to find an open source project you find vaguely interesting. Study their code. Figure out why they do what they do. Look at the bug list, and try to find something as trivial as possible to fix. Work from there. Learning to contribute is going to teach you things that are useful in the work world, and it will give you something to point at. It will be far easier to get your first job if you have some experience to point to.
All "relativity" aside, not fast. Based on the fact that you said you never programmed before...to become a basic programmer, a few years.
And to become a good to outstanding (using design patterns and industry recognized standards that relate to common standards as defined by ISO/IEC 9126 Standard such as testability, maintainability, etc.) programmer, it takes years of experience and coding often.. you do not become "Sr." or an "Architect" overnight and the same thing is true for a mid-level developer who doesn't code slop.
It's always a process where you improve. So learning is relative. But to learn the basics, seems simple until you start to design classes and interfaces. And even Leads stumble on the basics..doing things wrong. Everyone does. There is so much to be aware of.
If you're just going to be adding features (using classes your Lead or Architect has stubbed out for the team) and not really adding new classes, etc. it's easier....but you should take care in coding using standards and you still have to know complex areas of OOP. But that's not really OOP. When you start to creating classes, interfaces and knowing about inheritance, heap, references, etc. yada yada...and REALLY understanding it takes time no matter how smart you are or think you may be.
So, for a new programmer. Not easy. Be prepared to code a lot. And if you are not, find a job where you are. It's all about coding as much possible so you can get better.
Read these books FIRST. Do not dive into any others out there because they are not geared toward teaching you the language in a way you can get up to speed fast:
http://www.amazon.com/Head-First-Object-Oriented-Analysis-Design/dp/0596008678/ref=pd_bbs_sr_4?ie=UTF8&s=books&qid=1231280335&sr=8-4
http://www.amazon.com/Head-First-SQL-Brain-Learners/dp/0596526849/ref=pd_bbs_sr_7?ie=UTF8&s=books&qid=1231280335&sr=8-7
http://www.amazon.com/Head-First-C-Brain-Friendly-Guides/dp/0596514824/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1231280393&sr=8-1
http://www.amazon.com/First-Design-Patterns-Elisabeth-Freeman/dp/0596007124/ref=pd_bbs_sr_3?ie=UTF8&s=books&qid=1231280393&sr=8-3
they will get you the fasted jump start into understanding, better than any books out there.
Also for these lame type of responses, ignore them:
"Then again, plenty of people (most normal people, non-programmers) never learn those subjects, so if you're like "most" people then the answer would be "it would take forever" or "it will never happen"."
Those come from developers (typically leads) who have some Ego trip that DON'T want you to learn. Everyone learns differently and at different paces and eventually you will become "fast". I get very tired of hearing Sr. developers say statements like this when their sh** also stinks many times no matter how good they are. Instead they should be helping the team to succeed and learn as long as their team is working hard to keep abreast and doing what they can on their own as well (not leachers).
Make sure you try to get a Jr. Level Developer position first...
2-3 months to learn the basics...no way. Unless you're gonna code spaghetti sure. Same goes for the 1-2 years. Spaghetti it is then..
Build on what you already know and have a look at lot of job adverts. E.g I have seen jobs asking for WinForms/WPF AND electronics for the writing of a UI to control a custom bit of hardware.
You may find the “robotics” .net toolkit interesting.
.Net is now too big for anyone to learn both WEB and Desktop so you have to decide the way you are going to go. Web has lots more jobs, but there are very few people with good desktop stills.