Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (e.mccormick):

Learning to Code vs. Learning Computer Science Coding, or programming, is a process of telling computers what to do. Computer science is a systematic and scientific method practical applications of computation.

OpenStudy (e.mccormick):

\(\large\textbf{Introduction}\) I have seen many questions on here about learning to program, computer science, etc. Therefore, I am writing this short tutorial on the two topics, where they overlap, and how to get started on them. \(\large\textbf{Code } \ne \textbf{ CS}\) First, coding is not computer science and computer science is far more than just coding. In many ways the terms are like driving and transportation. When you drive, you are not encompassing everything there is in transpiration. Some times of driving don't even have anything to do with transportation, like a bumper car at an amusement park! When you add in the facts that vehicle selection, freight types, and much more go into transportation, you see they are very different. When you program a computer, you may or may not be applying the rules of computer science. When you do computer science, you may just be looking at algorithmic analysis to determine what is most efficient in a given situation, or applying scientific computation to another field, or programming, or many other things. As you can see, coding is a part of computer science, but it is not the whole. \(\large\textbf{Why not just code?}\) There are thousands of free tutorials on programming. Pretty much every computer language is covered in a wide assortment of human languages. So why not just learn to code? Well, for some people, that might be just fine. What are your goals? Do you want to write small utilities to help you with your work? To you want to make games? Is this for a personal web site? Are you trying to become a professional programmer? The more rigorous your goals, the more important is to have a solid, scientific foundation. In a formal Computer Science class they begin to introduce efficiency and concepts like top down vs. bottom up design. There is a lot of talk about functions or methods that are used to break things down into simple, reusable parts. On and on the topics that relate to clean and well debugged code are gone over in a logical way. Even if your goal is to try out the waters before deciding if programming is a good career path, I would still use the assorted, free, university level or professionally developed resources that are out there. These will come at the topic with enough formality to prepare a person for what they need to learn. If your goals are more hobby orientated, well, then the formality does not matter as much. However, this lack of formality can make it harder to learn proper programming later. People tend to fall back on what they know. If what you know is a poorly chosen set of random things that work well enough to get you by, well, it will rarely lead to being able to code properly for a career. Between hobby and pro coder is the person that has a career path that does not require full programming but does need some code knowledge. For example, many people in biology careers end up needing to learn some programming for data evaluation. There are plenty of jobs that can benefit from better information handling. In these cases it can be good to look into a class on information science based programming. This is generally less rigorous than a full CS class set, but it does not conflict with taking CS later. \(\large\textbf{Is a CS degree needed to code for a big company?}\) A few professional coders \(\textbf{without}\) degrees have talked about this. I wish I remembered all the names. Still, I can sum up what they have talked about: Many big companies hire based off of ability to show skill. Others are willing to let a person move around in a company through a similar display of skill, so you might be hired for say a clerk position, get to know the engineers, show the engineers you can code, and get a job in the engineering department. However, both of these rely on your ability to properly code in a way that a CS major would do. So no, a degree is optional. It is just harder to get the interview and you still need to develop the same skill set. This means that even if you do not get the degree it is still best to learn computer science if your goal is to be a working programmer. \(\large\textbf{Are there benefits/disadvantages to learning on my own?}\) When you learn either coding or computer science on your own, you are the source of all your motivation. You must decide to do things or they will not get done. On the other hand, many people have trouble with formal education. Even in a single class, some topics move too fast or too slow. If you do not understand, you may be pushed to move on. If you got things right away, you might be bored. That is a moment to moment thing that happens to us all. However, you can deal with this sort of ebb and flow in understanding if you self study at your own pace. But back in the cons camp is the lack of peers and professors to get help from. There is access to a lot of support when you do formal learning. Now, there are some online classes that have structure that do help deal with this, but some people just flat out need fact to face interaction to really connect with that material. How about another pro? Lets say you do want the degree. You will have less trouble in class if you pre-learn key topics. You can also help keep your GPA high this way. As you can see, there is a bit of both. It comes down to an individual thing. \(\large\textbf{How can I learn on my own?}\) There are tons of legally free books on computer topics. If you search for free computer books you can find several sites. Many of these are prepress previews or open source books. Some are actually university textbooks that have been made available for free! If you do not acre about quality, there are dozens... hundreds... thousands of YouTube videos and sites dedicated to amateur coding skills. Again, these are very easy to find. And if you do care, want formal computer science, and like some added structure, there are a handful of free, university made classes on the topic. These are not as common as the random videos, but the quality of the materials is much higher. Here are some of the sources of these, and it is an incomplete list: First, let me put the one Information Studies based one. This is less intense than CS, but still produced by a university professor who, as a computer professional, has written standards for REGEX, a key part of computing. It includes both a book and videos, all for free, and without any need for advanced math or understanding topics like recursion, which makes it one of the most complete, self paced, quality, low prerequisite courses out there: http://www.pythonlearn.com/ Now, in no particular order, are other sources for free classes/study materials: https://www.coursera.org/ https://www.udacity.com/ http://ocw.mit.edu/index.htm https://www.edx.org/ https://www.class-central.com/ https://www.mooc-list.com/ Many of these suffer from understated prerequisites, so just be ready to have a few things be more confusing than you might expect. However, there are a few real gems in the course lists that are available to any skill level and that do not rely on more math than knowing what PEMDAS means. It is also worth noting that Khan Academy has a simplified computer science curriculum that does not rely on understanding university level math... or much math at all. http://khanacademy.org/ Some other good resources: Code pasting and source repository: https://github.com/ https://bitbucket.org/ http://c9.io/ Run and share code: http://codepad.org/ Run code online: http://writecodeonline.com developers.google.com/apis-explorer http://ideone.com/ Share/Paste code: http://pastebin.com/ http://dpaste.com/ \(\large\textbf{Some End Notes}\) It is a good idea to learn a few languages near the start. This helps give a deeper understanding of things. Taking say a Python based and Java based class at the same time would do this. Or, take a Python class and use a free book on Java to try and do the same things would also work. This will give you a broader base, make concepts more engrained, and make it easier for you to transition to other languages. Use a code past site or the \(\text{```}\) (accents on same key as ~) to make your code more readable and copyable here. For example, this is the code with \(\text{```}\) on a line above and below it: ``` for(int i = 0; i < 10; i++){ cout << "i = " << i << endl; }; ``` And here is Pastebin: http://pastebin.com/P3d0BZMN More technical topics are probably better on stack: http://stackoverflow.com/

OpenStudy (anonymous):

Thanks for differentiating between the two. I see coding is just one aspect of CS, which is pretty neat. As my knowledge when it comes to such topics is limited, this is a great post for people like me especially who have thought about learning such things but never really had much interest/ motivation in doing so, or thought it was just boring. But over time I've seen the importance in such subjects, and want to learn it on the side to enhance my knowledge and have some fun. I will definitely be going through the links, thanks for sharing this post.

OpenStudy (e.mccormick):

@iambatman One other thing I could have mentioned is that Computer Science is an engineering field. Well, there are a lot of other things I could have said, but that is one of the important ones. It is part of why there is a very analytical aspect to CS. This engineering aspect has some interesting effects. For example, the best schools have specialized accreditation in it: http://www.abet.org/accreditation/ There is a close relationship between the hardware aspects and the software, so you can end up learning a bit of both if you go for some degrees. The IEEE and other professional organizations also exist: https://www.ieee.org/membership-catalog/productdetail/showProductDetailPage.html?product=CMYSE700

OpenStudy (e.mccormick):

I also could have linked some of the book sites if I could have found them. I was at work and did not have my same bookmarks. I am at home now and have more info. Some of the more common open classes have used books from this site: http://greenteapress.com/ The original book was on Java and aimed at keeping dropout rates low. It was released as an open source book. Then a high school teacher took this and revised it into a book on Python. The original author learned Python this way. From there a whole series of things have developed. In fact, if you want to learn Java and Python as starting languages, you could use both books. The similarity of the books should help in the learning process. Let the familiar be familiar while you reinforce it and at the same time pick up the differences. Oh, the Informatics book is a rewrite of this same set. That author restructured the books for informatics and removed some of the more advanced topics. At the same time they added in parts specific to that topic. So they took a solid, trusted set of books and basically changed a couple of chapters form CS specific to Informatics specific. Here is are two books sites http://freecomputerbooks.com/compscCategory.html http://www.onlineprogrammingbooks.com/ I have found a lot of great stuff between them. I am sure that anyone could pick out a lot of references. An easy way to cut it down from the masses is to look for things that are actually used in classes. Those tend to have been reviewed by at least a few people who know about both the learning process and what needs to be covered in an engineering course.

OpenStudy (anonymous):

There are not many programmers who understand computer science well. It's sort of like higher math in that it is quickly learned and quickly forgotten during university. Part of the reason is because most computer science problems have already been solved, and those solutions are put inside language features, libraries, frameworks, and other tools that developers use. Most programmers are actually doing fairly straight forward tasks, and when one does need to implement an optimal algorithm, usually it's better to consult one's peers and the internet rather than depending on one's computer science skills alone. Basically, your typical programmer will be happy to simply find a solution to a problem, even if it is an inefficient solution, because efficiency isn't always that important. Your exceptional programmer will research what solutions others have come up with and use their computer science only to understand why certain solutions are better. They don't have a desire to reinvent the wheel. What's more important than even computer science is software engineering. My impression is that university doesn't really teach this that well, and most programmers are made to learn it from the first decent company that employs them. By decent company, I mean a company which had a large code base and a team of developers that have to work together on this code base. Perhaps software engineering just isn't something you can properly learn in an academic environment. Perhaps computer science professors themselves just fail to understand software engineering, because they have been engaged strictly in the study of computer science and have been shielded from the private sector. It's hard to say, but I do think universities could do a better job here. Software engineering is basically the ability: 1. To write code that is readable to fellow developers and doesn't need excessive documentation. 2. To look through an existing code base and to be able both to modify it and to maintain it. 3. To research best practices solutions to all non-trivial problems. 4. To test one's own code thoroughly. 5. To properly organize a team of developers so that they know what is expected of them. There are probably a ton of wizard programmers who understand computer science exhaustively and yet you'd never want to work with them on a team because they just don't understand software engineering.

OpenStudy (immanuelv):

codecademy.com is also a good place to pick up new language :)

OpenStudy (e.mccormick):

Not really. There are several issues with the quality of the tutorials and several of them teach poor practices. If you already know good programming and just want to pick up the basics of a language, code academy can make for some structured, low level assignments. However, it does not have good code checking because it is very easy to spoof and it is lacking in assistance if you do not get the goal of the assignment. All together, code academy does not teach people either programming or computer science. For a better Peer to Peer organized education, look into Peer to Peer University: https://p2pu.org/en/ Still not great, but you can get better help as you go.

OpenStudy (anonymous):

kudos! some people need to understand that cs != only coding

OpenStudy (callisto):

As for coding, what is "maintainable code", and how to write maintainable code?

OpenStudy (e.mccormick):

Code, like most human made things, needs maintenance. For example, when a new version of Windows comes out, it may have new security requirements to try and clean up past problems. So your old program may no longer work. By doing a little maintenance you end up fixing this issue, your own bugs, etc. One of the biggest things in maintainable code is proper naming inside and documentation of the code. For example, if you name a function `double df(int x1, int y1, int x2, int y2)` it is not clear what it is or does. Just that it takes integer arguments and returns a double. But on the other hand, if you name it `double distanceFromula(int x1, int y1, int x2, int y2)` it is much more clear what it is and how it will be used. That is proper naming. When you also add a comment like "// Performs distance formula on two integer values and returns a floating point result as the distance. The integers should represent the x and y coordinates of each point." This sort of comment makes it even more clar what the intent was and makes the code more maintainable because of this.

OpenStudy (callisto):

Though, what does it mean when someone says "it is difficult to write a maintainable code"?

OpenStudy (anonymous):

What is meant is that it is much easier to simply get something to work than it is to get it to work, to make sense to others who will work with it, and not be very difficult to change without introducing a lot of side effects.

OpenStudy (e.mccormick):

I agree with wio. People can write something quick and dirty to get it to work. But slowing down to make names longer and more readable, documenting it all, and taking the time to set it up in a redistributable form as code or a library is something that takes more effort. However, each time you come back to re-work some maintainable code it is easier to pick up where you left off. So in the long run it pays off because you save time later. If everyone wrote perfect code every time there would be less need for maintainable code. Even if you are a perfect programmer, bugs in say the OS code could require you to maintain your code. This makes it beneficial for every programmer to write maintainable code.

OpenStudy (anonymous):

There are few core aspects of maintainable code that you need to keep in mind when developing software: 1. Simplicity. It should be simple for other (and yourself!) to understand what it does. Don't try to cram too much in a single line, or single function or class. Don't try to "show off" by using some esoteric approach or non standard way of doing things unless there is really really good reason to do so. Simpler is better. 2. Document your code. Leave plenty of comments explaining what different parts of the code do. Another good idea is to leave in your code what you know you missed (i.e. leave todo list for future engineers or yourself) 3. Use solid architecture that will allow you and other to change code without breaking the entire system. A lot of such principles outlined by acronym SOLID that includes a lot of things -- http://en.wikipedia.org/wiki/SOLID_%28object-oriented_design%29 You want to write maintainable professional grade code you should really get familiarized with each element of that. 4. Be consistent in how you name things and how you do things. 5. Consider edge cases but do not overengineer things. 6. Ask for help! Ask other people to review your code and reciprocate by helping others. It's hard to follow all of these all the time, but that's the goal :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!