Monday, December 5, 2011

Where I'd like to start heading

A lot of what Bob is doing here is for programs that pretty much just work in the DOS command window. That's nice and all, but I doubt many people plan to create programs that work just in DOS.

I know I'm personally headed (eventually) to Windows Phone development and then hopefully Metro-style apps for Windows 8. I've got an idea for a project that's a bit esoteric, but will be very helpful for the people who could use it. But I've got a lot to learn until I can create that app.

I've already started down the road of learning to develop for Windows Phone, but I've yet to find anything as helpful as Bob's videos. I'm hoping that the folks at Channel 9 will consider putting together a video series that branches off from this and moves in that direction. With Windows 8 coming out and what appears to be a lot of similarity between Win8 and Windows Phone as far as development is concerned, it might be a good idea for Microsoft to do that.

Here's the site I've started learning Windows Phone development from. I see potential, but not being extremely familiar with the Visual Studio IDE, I feel like having videos would be very helpful. It'd also be nice to have someone like Bob "bring the cookies to a lower shelf" as I like to put it.

Lesson #9: Creating Arrays of Values

Video #9

This video gets us introduced to strings. There's one thing Bob does in this video that gets me a bit confused and he doesn't seem to really explain it. At one point he writes:

Console.WriteLine(numbers[i].ToString());

I did it without the ToString() and it worked just fine for me.

If you find arrays to be a bit confusing, I think of them as a group of variables in a single bucket. They all have to be the same variable type, though. It's almost like a single column matrix. I don't know if arrays can be expanded to be "multi-column" (if that's even the right term), so for now, I stick to working with them as single column matrix.

It's also good to fiddle around with arrays to help you understand them. I was a tad confused until I played with them a bit more and I started understanding them better.

Sunday, December 4, 2011

Update on the site and my progress

The eagle eyed viewers will have noticed that I've removed the embedded videos from the site. I was running into a problem where every time I opened up the site, I had it asking me a dozen of times for permissions and whatnot. Given how I've never had that on any other blog I've done and the fact that the messages are very similar to what I get when I log into a site using my Microsoft Live ID, I figured that the most likely cause was the Microsoft videos I had embedded. So to try to solve the problem, I've removed the embedded videos and just having a link to the page that has the videos.

As far as learning C# is going, I've been making quite the progress. I'm actually a bit further than what I've got on the site. I find myself taking what I've learned and experimenting with it. I recently completed my first app which converts temperatures from Celsius to Fahrenheit and vice versa. I had to look up and figure out a few things on my own, but it works. I've employed techniques that are used later on in this video series so I'll share the code as we get to those points.

I'm hoping to start work on my first legitimate application in a week or so. And by legitimate, I mean an app that I could put out to the public and there would be interest. I'll give more details on what I plan to do as time goes on. I can say that it will be for Windows Phone.

And the fact that the app is for Windows Phone has gotten me thinking about eventually porting it to Windows 8. From what I've been hearing and reading, it shouldn't be too hard to port it over. I just wish I had a tablet right now that had Windows 8 loaded up already. I've got a copy of Windows 8, but I don't have a spare computer to install it on and I don't have a touch screen to test out that functionality.

Friday, December 2, 2011

Lesson #8: For Iterations

For iterations, or for loops as I call them, are essentially a way of getting a program to do something repeatedly for a certain amount of time (or forever if your heart desires or your code has a flaw).

Lesson #8

This will probably be a very easy concept for people to grasp, it's just important to remember the syntax. Thankfully, it seems that Visual Studio has us covered as Bob demonstrates the whole Tab Tab deal. This is really nice.

I'm getting to the point that I'm thinking that C# is a lot easier than C++. I don't know how much of it is the language and how much of it is the IDE.

Lesson #7: Operators, Expressions, and Statements Durations

This lesson is pretty simple. It does take a level of memorization, but for now, you can create a cheat sheet or just bookmark this post for reference when needed. I felt that a lot of these were what I would have guessed they would be or they're something that just makes sense. >= makes sense for being greater than or equal to. && makes sense for the conjunction "and" because we use that symbol to mean "and" all the time and since we have the double equal sign for the check for equality, it follows form to do the double &.


Lesson #7

This is an important video because there are a lot of cases where we'll need to do these sort of checks. It's the most common thing I imagine programmers do to get a program to interact with the user.

If you have any thoughts or questions, let me know.

Tuesday, November 29, 2011

Lesson #6: Branching with the if Decision Statement and the Conditional Operator

This lesson provides two things that we'll need to learn: 1. How to assign string values a user entered value. 2. How to do if/then statements. After this, I'll have some things for you to try on your own.


Lesson #6

I'm going to present a simple challenge for what we've learned so we can make sure we can do what we've supposedly learned. Create a program that asks for a person's first name and their last name and then says "Hello" and addresses the user. So if it was John Doe, the program would output "Hello John Doe" If you want to get more practice on some techniques, try having the program add a "!" at the end of it. I'll present what I write here, but stop reading now, try it yourself, and come back...

OK, you're back. Here's how I went about it:

            string firstName = "";
            string lastName="";
            Console.WriteLine("First name:");
            firstName = Console.ReadLine();
            Console.WriteLine("Last name:");
            lastName = Console.ReadLine();
            Console.WriteLine("Hello " + firstName + " " + lastName);
            Console.ReadLine();


If I wanted to add the "!" to the end, I would have changed the second to last line to:

Console.WriteLine("Hello " + firstName + " " + lastname + "!");

I also experimented and learned that if you change the "WriteLine" to "Write" it doesn't have the return after it writes what it's told to write. So instead of having the user enter their answer on the next line, they enter it right next to the ":" If I put a space after the ":" within the quote marks it provides a space between the ":" and the users answer. That's all just to make it look a little better.

Monday, November 28, 2011

Lesson #5: Declaring Variables and Assigning Values Duration

We're starting to get to the point where we can actually produce stuff that has value. As important as the "Hello World" program was for our progress, there's not much demand for those kinds of programs. But one important thing we need before we get to where we want to be is the ability to declare variables.


Lesson #5



The two most important things I take from this video are: 1. The type of variable declared is important. Using an int variable for a name just doesn't work. 2. It's important to keep track of the variable name and type it exactly as it is in the variable declaration. Otherwise, it's just not going to work.

And if you aren't already, be sure to follow along with Bob. It's going to be helpful in getting a lot of this stuff in your head so you don't have to go back and look it up later.

Lesson #4: Quick Overview of the Visual C# Express Edition IDE

This video isn't exactly important to learning the C# language, but it is helpful for anyone who actually plans to use the C# language to develop apps. I don't recall the IDE I used when I was learning C++ doing any of this. As I learn the ins and out, it makes programming much easier.

Lesson #4

Lesson #3: Dissecting the First C# Program You Created

If you're still sticking around, I can say that you're showing quite the initiative. Looking at the views for these videos on MS's website, the first video has over 12,000 views, the second video has about 900, and the third has just under 600 (as of this posting).  I'm sure some people watched the first video out of curiosity, but video 3 is a third less than video 2. I'm not sure how much of that is because people found Bob's terminology to be a bit over their head or how much of it is that people just gave up.

If the last lesson was a bit much, the next video breaks down the "Hello World!" app.

It breaks down the various lines of code. I think this video would benefit from some real world comparisons to what he's talking about. He talks about how namespace, class, and Main work. I get the impression that a real-world example to that would be country, state, and city or book, chapter, and page. But I'm just speculating. I do feel that Bob may be giving more information than needed but it sounds like he'll cover that all later. On top of that, Bob talks about projects and solutions, but then goes on to say that it's not too important until we get further along. Because of that fact, I do kind of wish that he waited to talk about that sort of thing until we get to that point.

This video is the beginning of when I can see people getting confused or lost. Let's break down a lot of what Bob covers.

The simplest thing Bob talks about is the role of the semi-colon (;). His example of it being like a period is pretty good. It ends the thought.

Another thing he mentions is the curly braces ({}). He calls them something like containers. I think of them like one might use indentation on a to-do list.. For example:

  • Go to the hardware store
    • Get hammer
    • Get nails
    • Get duct tape
  • Go to the grocery store
    • Get milk
    • Get eggs
    • Get bread

It's clear that one gets the hammer, nails, and duct tape at the hardware store and the milk, eggs, and bread at the grocery store. Without the indentation, it's not so clear. That's especially true for a machine that has no understanding of hammers and eggs. We know the difference because we have a developed understanding. Computers don't have that. Computers are dumb. They have to have everything spelled out for them. If we were to use the curly braces like in C#, the list would look more like this:

Go to the hardware store
{
Get hammer
Get nails
Get duct tape
}
Go to the grocery store
{
Get milk
Get eggs
Get bread
}

The double quotes in this video define the difference between a series of characters compared to a particular letter or number. With C# (and Bob covers this in the future) a variable is like a variable in math. It represents something else. But with C#, a variable doesn't have to be a single letter. A variable can be named X like it is in algebra but can also be named something like initialValue.

So in other words,
Console.WriteLine("initialValue"); 
displays the characters initialValue on the screen. We saw this with the "Hello World" program

Console.WriteLine(initialValue); 
would display the value of the variable initialValue on the screen.

I put the lines of code in italics to differentiate them from anything else. It's not to say that the code in C# will be the same. I'll follow that throughout these posts.

But that breaks down a lot of this video. Once we get into variable declaration (a couple videos from now), we can really start creating real programs that people may find useful. I can't promise that they'll be very pretty.

Lesson #2: Creating Your First C# Program

I know I'm posting these lessons rather quickly. That's partly because the first video was really just an introduction and partly because these first couple videos are rather basic. Trust me, things will slow down as we get deeper into the series.  Even if you don't find these first few lessons to be that easy, remember you can work on this at your pace.

Also, I can't express the importance of what Bob says regarding typing things exactly the same. But if you think about it, it's not terribly hard. In some ways, it reminds me of the game on cereal boxes and children's menus where you have to find the two things that are exactly the same or the one that doesn't match the rest of the bunch. So it could be said that we've all been training in doing this since we weren't even in school. If you run into a problem with this lesson, just play that game with your code and Bob's code. Be sure to look at your "/" and "\" punctuation, and capitalization. I imagine those are the places most people will make a mistake. If you still can't find the error, share your code in a comment and someone will hopefully find your mistake.

Link to download

To expand on this video, I present this following assignment/challenge: Create a similar program to the "Hello World" program without the video assistance. You may need to reference Bob's code every now and then. That's fine at first. Work to get to the point where you can do it without looking at Bob's code. That will help you drill this info into your head.

Lesson #1: Introduction

As I mentioned in the first post, I'm going to start all of this using a series put out by Microsoft for C# rookies. Here's the first video of that series to get the ball rolling. Here's the current link to Visual C# 2010 Express. As Bob says in the video, the location may change over time. I'm currently using Visual Studio 2010 Professional (MS MVP perks FTW!) and I've noticed a few differences. I just have to roll with them. I don't have any experience to back this up, but I'm going to suggest that you get a version close to what he's using. I doubt a program from 10 years ago is going to be very similar to what's demonstrated in these videos.

But the first step we all need to take in this venture is download and install one of these programs. Later on Bob refers to them as IDEs. That throws me off every now and then being a person who builds computers. My first thought when he used this phrase was "I don't use IDEs anymore. It's all SATA". But that's life with acronyms everywhere. There's bound to be overlap. I run into the same thing working with government stuff.

By the way, I'll use the terminology as much as I can as we go but I'll try to do it without being ignorant to the fact that some people may not know what I'm saying. I know a good way to learn terms is to use them yourself. I suggest anyone following along does the same. If someone uses a term incorrectly, don't fret. We're all rookies. We'll do what we can to correct you.


Here's a link to the actual video file (right click on it and select your browsers version of "Save As..."). What I do is I download the video and use Zune to play it. What this does is it allows me to have the video play on one of my displays while I follow along on the other. I also put these videos on my Windows Phone and my Zune HD. That allows me to re-watch videos while I'm eating lunch or something of that sort. If there's interest, I can create a podcast feed for these videos so Zune downloads them automatically and in order. At least I think I can. I've never done a podcast feed with video. But I'm willing to try it if there's interest.

My Background in Technology and Education

I feel like it's important to lay-out my computer and programming background to help people understand what knowledge I have going into this sort of thing. If much of what I present here is well over your head, you should know that going into this.

I grew up around computers. I'm 27 years old and I don't remember a time when there wasn't a computer in my home. So I'm not a stranger to the devices. In 10th grade I started building my own computers. Trust me, that's not nearly as hard as it sounds to many people out there. I'm confident I could teach someone to build their own computers in a week. They make it very easy to do these days. It's pretty much just plugging the pieces together. If something doesn't fit, then the part doesn't go there or needs to be turned around. Other than that, just read the manuals for the parts.

In January 2011, I became a Microsoft MVP for my contributions to the Windows Phone community. While most people who are MVPs have a deep technological background, I can't exactly say the same. Most of the work I did to become an MVP was in answering basic questions from the community about the then upcoming platform. This was stuff like how the OS worked, when it would be available, etc. Any cell phone enthusiast would be able to do the same if they wanted. I wasn't helping developers or anything. I was working with regular people.

As I mentioned in my first post, I do have some experience with programming. I understand concepts such as loops and if/then statements. But I haven't gotten significantly further than what's commonly called a "Hello World" app. That's an app that displays the words "Hello World" on the screen. I get the impression that my knowledge on the subject is similar to if all I knew about football was how the scoring worked and the difference between a pass play and run play. I've got the basics, but I'm not going to get hired as a coach any time soon. This lack of knowledge about programming can be seen in this blog. If I had a better knowledge about programming, I wouldn't be using blogger.com to create and run it.

I've attended a couple of conferences for programmers, but I felt like I was out of my depth most of the time. I saw potential to get where they were and where I was, but there was plenty of ground to cover. I guess the biggest thing I pulled from them was when they said "It's easy to..." I thought "Maybe for you!" However, I just said the same thing about building a computer in this very blog post. Maybe the gap between where I think I could be rather quickly and where they are isn't as big as I first thought.

Having grown up around computers (just about all of them ran either DOS or a version of Windows), I've known a lot of the basics since I was a little kid. I've been creating files, organizing folders, installing programs, and all that jazz since George H.W. Bush was in office. Not to be snooty, but I'm going to assume those following this blog can do the same. If not, you've got stuff you need to learn prior to getting into programming. If I didn't do that, then I'd bore the majority of people I believe would be interested in this with the extreme basics.

As far as my education background, I'm certified in secondary education in political science and speech. These are two fields that are completely different than computer science. So that means I understand the concepts behind teaching, but I don't really have the in-depth knowledge I would need to be certified in teaching computer science. But I'm hoping to leverage that fact to my advantage with this blog.

Well that's that. I'm hoping by understanding my background, you have an idea of what my starting point is on this venture. Where are you starting?

The Syllabus

With the boom of mobile devices and the connected boom in mobile software, combined with an economy that's making if difficult to find work, I've been interested in learning to create programs for some time now. On top of that, I work with a non-profit organization that works with Hungarian orphans (www.hafellowship.com) and one thing we're hoping to do is teach some of them computer programming. Talking to a few people in the industry, it seemed that C# was the programming language to learn.

The problem I ran into was that most tutorials I found went well over my head. It seemed like they were for seasoned programmers who were switching over to C#. I am not a seasoned programmer.
My programming background is extremely basic to say the least. When I was a kid, I fiddled with BASIC, but hardly learned much of anything. In high school, I took a computer science class where we learned some C++. The class wasn't extremely deep and I felt like it was more of an introductory class than anything. In college I took another programming class to avoid the absurdly basic computer class most students were required to take. It felt like a rehash of what I learned in high school.

In fact, that college class may have been the genesis of this whole project. My professor, to say the least, wasn't very good at breaking down the material for someone who was a complete rookie in programming. A number of students struggled and the only reason I passed was, as I said, it was a rehash of what I already learned. I, in fact, tutored a classmate of mine because he was completely lost. He wasn't a dummy either. He just tended to get lost in the big words and the prof just wasn't very good at, as I put it, putting the cookies on the low shelf. Had it not been for my high school class, I would have had no hope in that class.

But I don't blame the prof for those failures. He was very knowledgeable in programming. However, as a teacher, I know it can be a challenge breaking things down and presenting it to someone who doesn't know much about the subject. Part of the reason I'm certified in high school education is because I know I can't do that for kids that are incredibly young.

Well I'm hoping to overcome a lot of these problems my prof had. I'm going to do that with two characteristics of myself. 1. I'm an experienced educator so I have a good idea on how to break stuff down. 2. Since I'm not a very experienced programmer, I can't talk above those who are just getting into this stuff. It's impossible.

So what is this "thing" I'm putting together and how is it going to work? I'm going to take what's presented in the videos and expand on it. I'll also provide practice assignments so people can reinforce the lessons. Nobody's going to learn programming just watching videos or reading about it. After all, nobody became a professional basketball player just by watching the NBA Finals. As the number of people following this grows, I hope that we get people to share their solutions to the assignments.

I'm not promising to have all the answers. I'm just offering the chance for people to expand on this. I'm not looking to be THE teacher. Anyone participating in this can provide challenges to others as well. It's a team effort as we try to learn C# together. And because I'm not THE teacher, I'm not going to fulfill a lot of teacher roles. I'm not going to beat anyone over the head to get them to complete assignments. I'm not going to make anyone join in the discussion. If people seem to disappear, I'm not going to call them and ask them where they've been. One characteristic I've heard a lot of employers in the IT business look for is that people get things done by their own initiative. So I'm going to look for the same from people participating in this. This is rather radical given the current state of education. But I think it's going to be beneficial for a lot of people.The cliche is very true. You get out of this what you put in.

I know some people may stumble upon this blog well after we've started. I hope those people take everything that presented by those involved the first time around and use it. Perhaps they start a small group themselves to do the same thing, using this blog as a starting point. They'll be able to see where we were when we were learning this stuff. Again, a lot of this requires initiative. It's up to those people to take the initiative of learning by using that which is provided.

To aid in the process, I'm going to present this blog to people I've met over the years that know programming or are in the computer industry. I'm asking them to just help clarify things when needed and provide help when the people learning the material are stuck. I ask that they don't take the role of THE teacher more than needed.

To get things rolling, we're going to start with a video series that Microsoft has produced. It will be our starting point. It's labeled as being for "absolute beginners" so I think it's right for the intended audience of this blog. I don't know if they're going to produce any more videos than what they currently have, but for now, we'll take what they have. I'll be sharing what they have as well as some additional stuff shortly.