Posted by DoctorWelch (2765 posts) -

So, I've been making a walkthrough for those who want to start learning to code but simply don't know where to start. There are many people that already know about CS50, but it's a super helpful, and amazing way to get into programing quickly, while also learning the right way to do things.

I just completed my time with C, and now I'm moving on to web programing and I'm extremely excited to learn how to use HTML, CSS, PHP, and Javascript. Anyway, I posted the first parts of my last two episodes below if anyone want's to check them out, or let me know what they think.

Also, for anyone in this community that actually knows how to code, is there anything fun I can actually do with my knowledge of C know so I don't forget it all?

#1 Posted by DoctorWelch (2765 posts) -

So, I've been making a walkthrough for those who want to start learning to code but simply don't know where to start. There are many people that already know about CS50, but it's a super helpful, and amazing way to get into programing quickly, while also learning the right way to do things.

I just completed my time with C, and now I'm moving on to web programing and I'm extremely excited to learn how to use HTML, CSS, PHP, and Javascript. Anyway, I posted the first parts of my last two episodes below if anyone want's to check them out, or let me know what they think.

Also, for anyone in this community that actually knows how to code, is there anything fun I can actually do with my knowledge of C know so I don't forget it all?

#2 Posted by Chaser324 (6744 posts) -

C is a great language to learn when you're first starting out because it provides you with a very solid baseline to build from. Personally, I think it should be where every university Comp Sci or Comp Eng program starts.

There's certainly a lot that you can do with C, but you're most likely not going to start doing a lot of bigger and more "fun" projects until you unlock the power of object oriented languages like C++ and Java.

Moderator
#3 Posted by DoctorWelch (2765 posts) -

@Chaser324: I always hear or see things online referring to object oriented stuff, but I don't really know what that means.

#4 Posted by Phatmac (5727 posts) -

I'm sure someone will enjoy this

#5 Posted by DriveupLife (919 posts) -

Can you believe it? You've already finished C. You think you can do MatLAB?

#6 Posted by NlGHTCRAWLER (1210 posts) -

Awesome! Will look into this later, thanks.

#7 Posted by Chaser324 (6744 posts) -

@DoctorWelch: I won't go into the details here, but essentially, the power of object-oriented code is that it allows you to do more with less code and to abstract away lower-level problems so that you can focus on the higher-level things that you're trying to achieve.

I'm not sure if that'll make much sense to you now, but trust me when I say that OO is an essential concept that you'll need to learn at some point.

Moderator
#8 Posted by DoctorWelch (2765 posts) -

@Chaser324: Okay, I sort of know what you mean. I've seen some people talk about C being good to learn fist because of learning memory management and such, and how you have to worry a lot about things that other languages worry about for you.

#9 Edited by Grimhild (722 posts) -

@DriveupLife said:

Can you believe it? You've already finished C. You think you can do MatLAB?

/highfive

#10 Edited by zombie2011 (5048 posts) -

@Grimhild said:

@DriveupLife said:

Can you believe it? You've already finished C. You think you can do MatLAB?

/highfive

Oh matLAB, i was actually a TA for a matLAB class when i was at uni. MatLAb is so weird in that students either get it and are great or they don't and just never can pick it up.

#11 Posted by JoxxOr (53 posts) -

@DoctorWelch: There are a lot of things that are more important to learn as a total new beginner than memory managment. In all honesty as a c++ programmer where its my daily life is to remember where memory gets allocated(always pre-runtime, not during) its not fun at all. If you want some advice, pick up c# and make some awesome games in xna, its much more fun then creating whatever binary search tree you're doing there :).

#12 Posted by DriveupLife (919 posts) -

@zombie2011 said:

@Grimhild said:

@DriveupLife said:

Can you believe it? You've already finished C. You think you can do MatLAB?

/highfive

Oh matLAB, i was actually a TA for a matLAB class when i was at uni. MatLAb is so weird in that students either get it and are great or they don't and just never can pick it up.

You just can't make it in modern engineering without MatLAB.

#13 Posted by zombie2011 (5048 posts) -

@DriveupLife said:

@zombie2011 said:

@Grimhild said:

@DriveupLife said:

Can you believe it? You've already finished C. You think you can do MatLAB?

/highfive

Oh matLAB, i was actually a TA for a matLAB class when i was at uni. MatLAb is so weird in that students either get it and are great or they don't and just never can pick it up.

You just can't make it in modern engineering without MatLAB.

I think you can, depends on what type of engineering you are doing. While i'm great at matLAB i don't think i will ever use it in my life again. In fact i believe 90% of the stuff i learned in uni i will never see again.

#14 Posted by Scrawnto (2466 posts) -

@Chaser324: My school taught C and Java in parallel for most of the early CS courses. We'd do a project in Java to work out the problem at a high level, and then the next project would build on the first, except it was to be written in C. It worked OK for the most part.

The biggest failing at my school was insufficient training in debugging and software development methodology, but I guess that comes from designing a major as Computer Science first and Software Engineering second.

#15 Posted by Butano (1789 posts) -

Yea, I'm taking a web development class using Ruby on Rails this semester. That shit is magical.

#16 Posted by DoctorWelch (2765 posts) -

@JoxxOr said:

@DoctorWelch: There are a lot of things that are more important to learn as a total new beginner than memory managment. In all honesty as a c++ programmer where its my daily life is to remember where memory gets allocated(always pre-runtime, not during) its not fun at all. If you want some advice, pick up c# and make some awesome games in xna, its much more fun then creating whatever binary search tree you're doing there :).

So, basically xna uses c#? Cause I've always wondered what languages are used to make games.

#17 Posted by Labman (288 posts) -

Thanks for posting this! I've always wanted to know how to code and have just started working my way through CS50. I'll be sure to give this a watch.

#18 Edited by TyCobb (1973 posts) -

@DoctorWelch said:

@JoxxOr said:

@DoctorWelch: There are a lot of things that are more important to learn as a total new beginner than memory managment. In all honesty as a c++ programmer where its my daily life is to remember where memory gets allocated(always pre-runtime, not during) its not fun at all. If you want some advice, pick up c# and make some awesome games in xna, its much more fun then creating whatever binary search tree you're doing there :).

So, basically xna uses c#? Cause I've always wondered what languages are used to make games.

Any language can be used to make games. Most games are made using C++, but XNA was based on C# to help get newer people introduced into programming. C# is a very easy and powerful language to learn and is based on .NET so you don't have to worry about cleaning up memory when you are done with things since the garbage collector handles that for you. Also when they introduced XNA, they were really pushing C# because it is one of their newer languages and this was the best way to get people exposed to it.

As for your question on what object oriented programming is, hopefully this will help you:

Say you are making a program to hold information on different people. You would make a Person class.

public class Person
{
public string FirstName {get; set;}
public string MiddileInitial {get; set;}
public string LastName {get; set;}

public string BuildDisplayName()
{
return string.Format("{0} {1}. {2}", FirstName, MiddleInitial, LastName);
}
}

Now this is a very basic class to just hold the name of the person and single method to build me the display name. So if the person's first name was John, middle initial was B, and the last name was Doe, the method would return me "John B. Doe". Because I have this one method, anywhere I want to display or work with the full name, I can just call a single method on the Person object I am working with. This allows me to update the code in 1 place even though I could be displaying the person's name in 50 different locations.

static void Main(string[] args)
{
//To use it, all you have to do is create an instance.
Person person = new Person();

//Now I can start assigning values.
person.FirstName = "John";
person.MiddleInitial = "B";
person.LastName = "Doe";

//If I wanted to print the full name I can just call my Person.BuildDisplayName() method
Console.WriteLine("The persons name is {0}.", person.BuildDisplayName());

//That is a lot cleaner than this. If this code was in 50 other locations, you would have to find those 50 locations and update them.
//For instance, maybe you no longer wanted to show the middle initial.
Console.WriteLine("The persons name is {0} {1}. {2}", person.FirstName, person.MiddleInitial, person.LastName);
}

There's a lot more to object oriented programming, but this was just a very high-level example of one of the things you can do. OOP is all about re-usability and is one of the great things about it. This was C# code (and useable), but you can do the same thing in any OOP language. The syntax and the class will be different, but the concept and goal would be the same. I hope that kind of helps you understand.

EDIT: I am sad... I formatted and spaced that code out perfectly. Damn you GB, stripping out my spaces! Get a damn code block in here!

#19 Posted by TyCobb (1973 posts) -

@Scrawnto said:

@Chaser324: My school taught C and Java in parallel for most of the early CS courses. We'd do a project in Java to work out the problem at a high level, and then the next project would build on the first, except it was to be written in C. It worked OK for the most part.

The biggest failing at my school was insufficient training in debugging and software development methodology, but I guess that comes from designing a major as Computer Science first and Software Engineering second.

Yea... methodologies are nice to learn, but in the real world very few places even use them or do them correctly. I worked at numerous places that all tried to use the Agile project management. It's a great concept, but in the end everything was still "Waterfall". Methodologies are nice, but if you can't commit to them 100%, it all falls apart. In the end it still ends up being, "I need you to work on this. I know we planned for you to work on this other thing and had 50 meetings planning it, but we need this now."

#20 Posted by Scrawnto (2466 posts) -

@TyCobb: I'm not even talking about project management stuff. That's absolutely going to vary by where you work. I did end up learning about that stuff during my senior project anyway. I really just mean learning about debugging, design patterns, software architecture, refactoring, and clean coding practices. That's all stuff I've had to teach myself since getting an actual job in software development.

#21 Posted by TyCobb (1973 posts) -

@Scrawnto said:

@TyCobb: I'm not even talking about project management stuff. That's absolutely going to vary by where you work. I did end up learning about that stuff during my senior project anyway. I really just mean learning about debugging, design patterns, software architecture, refactoring, and clean coding practices. That's all stuff I've had to teach myself since getting an actual job in software development.

Sorry, I got caught up in you saying "software development methodology". Yes, it would be nice for schools to teach Patterns and Practices as well, but there are just so many out there that I understand why they don't. It also depends on what you are working on that would determine the kind of pattern you would use and I think most people would end up getting lost in the minutia and over thinking things. Especially if they are still novice coders. They should have taught refactoring & clean coding practices thought. That's kind of bullshit that they didn't. Another reason I am glad I never wasted my money on college.

#22 Posted by DoctorWelch (2765 posts) -

@TyCobb: Okay, that makes OOP make a little more sense now.

@Scrawnto said:

@TyCobb: I'm not even talking about project management stuff. That's absolutely going to vary by where you work. I did end up learning about that stuff during my senior project anyway. I really just mean learning about debugging, design patterns, software architecture, refactoring, and clean coding practices. That's all stuff I've had to teach myself since getting an actual job in software development.

Specifically speaking to that, I've been wondering how much actual knowledge you need to get a decent job. Like, how much do you simply have to teach yourself or learn as you go once getting out into the job market when you major in something like CS.

#23 Posted by SharkEthic (1063 posts) -

@DoctorWelch said:

@TyCobb: Okay, that makes OOP make a little more sense now.

@Scrawnto said:

@TyCobb: I'm not even talking about project management stuff. That's absolutely going to vary by where you work. I did end up learning about that stuff during my senior project anyway. I really just mean learning about debugging, design patterns, software architecture, refactoring, and clean coding practices. That's all stuff I've had to teach myself since getting an actual job in software development.

Specifically speaking to that, I've been wondering how much actual knowledge you need to get a decent job. Like, how much do you simply have to teach yourself or learn as you go once getting out into the job market when you major in something like CS.

Thinking back, what I learned in school compared to what I learned in my first year as a professional software developer, I expanded and developed my skills an insane amount that first year compared to my skill base going in. Programming every day, surrounded by talented people will give your programming skills a boost like you wouldn't beleive. I felt like a fucking idiot my first year in a real job, though!

Now that I'm in charge of hiring new programmers, there's clear advantages and disadvantages to hiring someone like yourself. You don't have any bad habits yet, and given your current skill set, we'd have the possibility to be highly influential in how you develop software going forward. You're probably also pretty eager to learn and willing to put in the time to do so. On the other hand, you don't really know what you're doing in the grand scheme of things, so there's a lot of hand holding the first year or so, until you learn the ropes and hone your skills.

But get the basics down (and for God sake, get into OOP), get a degree (most people won't even look your application over if you don't have one), and at first, be happy with any job that allows you to program for a living. With a couple of years of experience on your CV, your golden!

#24 Posted by DoctorWelch (2765 posts) -

@SharkEthic: Cool, thanks for the info/advice. I have a question about the degree though, what if I'm majoring in something unrelated to CS like communications or english. Secondly, I've heard that experience is almost always looked at as more valuable than a degree when it comes to CS related fields. Obviously, it's hard to start out getting the job needed to gain the experience at first, but regardless.

#25 Posted by EXTomar (4943 posts) -

I actually think C is not a good language to try as a "first language". There are a lot of idiosyncracies that are more legacy and obscure fundamental computer science ideas. Learning a language syntax is fine but learning theory and concepts actually solve problems.

#26 Posted by TyCobb (1973 posts) -

@DoctorWelch said:

@SharkEthic: Cool, thanks for the info/advice. I have a question about the degree though, what if I'm majoring in something unrelated to CS like communications or english. Secondly, I've heard that experience is almost always looked at as more valuable than a degree when it comes to CS related fields. Obviously, it's hard to start out getting the job needed to gain the experience at first, but regardless.

5 years work experience is the minimum to trump a degree usually. But it all depends on your resume at that point. When looking for a developer position you rarely fill out an application. That's something that you do for McDonald's. You always send in your resume with what technologies you have worked with, what you did at prior jobs and what skills you have. That is the basis for getting a call back. I have never filled out an application until I actually went in for the first interview. The problem with not having a degree to start out with is that you may know your stuff and be a whiz when it comes to programming, but you will struggle to find those first couple of programming jobs.

You have to keep on your toes, program as much as you can on your free time and continue to learn. Programming isn't something that you just learn syntax and call it good. It is something that you must continue to develop and try to create real world applications. My last job was maintaining and adding new features in ASP.NET web sites, continuing to develop new features in a few Java applications, and making random C# applications that the company needed. All using a SQL backend. It's good to know the ins and outs of a particular language, but it also pays to be diverse. You should stick with a language and learn as much as you can about it. Once you find a job that needed that skill set, you can then start doing other things in your free time to build your skills and knowledge even more.

There are always places looking for Junior Developers and they understand that you are green and will need some hand holding, but the fact that they are only paying you $12/hour makes up for it. You are basically getting paid to go to school ;)

#27 Posted by NickL (2247 posts) -

@TyCobb: Whenever a coding topic comes up I have come to always count on a well thought out post from you.

High five!

#28 Posted by TyCobb (1973 posts) -

@NickL said:

@TyCobb: Whenever a coding topic comes up I have come to always count on a well thought out post from you.

High five!

Thanks, now here is some high five etiquette.

#29 Posted by Chaser324 (6744 posts) -

@EXTomar said:

I actually think C is not a good language to try as a "first language". There are a lot of idiosyncracies that are more legacy and obscure fundamental computer science ideas. Learning a language syntax is fine but learning theory and concepts actually solve problems.

I understand where you're coming from, but after being out in the working world for a little while, I'm pretty convinced that C/C++ is the starting point for most solid software engineers.

Every great software engineer I've ever worked with started with C and C++, and I've never met someone that's well versed in those languages that can't pick up the basics of something like Java or C# very quickly. On the other side of the coin, I've seen a lot of kids coming out of so called "Java Schools", where all they learn is Java, that really struggle to handle real world programming and can't adapt when asked to use tools or languages they've never used before. The fact of the matter is, Java is a much easier language to learn...and for better or worse (and this is a controversial point of view), that allows kids who simply wouldn't have been bright enough to get through a C/C++ program to make it through to graduation. I'm not saying you can't get a great software guy out of a "Java School" program, but it's just going to be a far lower percentage of the graduating class.

Moderator
#30 Posted by DoctorTran (1575 posts) -

I'm really disappointed. I thought this was about cocaine.

#31 Edited by Tru3_Blu3 (3243 posts) -

As a guy who got an F in an intro class to C which contained a teacher who got agitated by my asking of questions, this will be incredibly useful in my self-teaching endeavors.

*Subbed*

#32 Posted by DoctorWelch (2765 posts) -

@TyCobb: Thanks for the awesome info/advice :) I think I'm probably going to try learning C++ or C# after I finish with the web based stuff that encompasses the end of CS50.