Notes on MITx: 6.005.1x Software Construction in Java (Week 1)

MITx has released a course titled “Software Construction in Java”. The course is aimed at more experienced Developers and is going to teach a couple of general principles of Software Development.

The course has the goal that you develop good code, which is defined as:

  • Safe from bugs: Correct behavior of the code, now and in the future
  • Easy to understand: Code should be easily understandable by other developers
  • Ready for change: Architectural patterns that allow you to modify the code without major rewrites.

Over the next couple of weeks, I will complete this course and will publish my notes and thoughts on the material. You can also take the course at https://www.edx.org/course/software-construction-java-mitx-6-005-1x

Why am I taking this course?

I have worked with Java in the past. I do not prefer using the language. However in the Python course from MIT was fantastic and thought very interesting concepts that apply to all languages. My hope is that this course will teach broader concepts and the language they are using just happens to be Java.

Lecture 1: Overview + Static Typing

The first lecture i skipped most of the videos, they seemed more like an introduction to Javas static typing, which I was already familiar with.

Lecture 2: Code Review

The second lecture takes a look at good Coding Practices.

Code Review

Lecture notes: The purpose of a code review has two main goals:

  • Improve the code
  • Improve the programmer

Personal notes: In reality on many programming projects the “Code Review”- Phase is cut due to budget constraints, lack of time and personal feelings. Remember when you do a code review you may hurt the feeling of another programmer, who thinks he is infallible. This usually causes that more and more bad code is written. Making the project not maintainable and unreliable. If it is possible for your project to do Code Reviews, you defiantly should do them, and have a very specific action plan that the other developer can learn from his mistakes.

Style Standards

Lecture notes: You can find good style guides at https://github.com/google/styleguide

Personal notes: Every programmer has his personal style how he likes to format and read his code. All university classes (including this one) do not provide a style guide. With the consequence that also no style guide is enforced. In larger projects this would not be possible. The version control systems suddenly cause problems, create merge conflicts etc. Styleguides should never be manually enforced. That would be tedious and create a lot of unnecessary work. The guide should be enforced by your build process. This prevents programmers from using their own style guide, avoids merge issues, is easier to manage, and it is psychologically better for the programmer that the machine rejects code rather than another programmer. The best practice would be that every code commit gets checked prior to be allowed into the repository. This ensures that every developer is playing by the same rules. (To find more information on this subject google for “git hooks” and “java checkstyle”)

Code Smells

  • Don’t Repeat Yourself (DRY)
  • Comments where needed
  • Fail fast
  • Avoid magic numbers
  • One purpose for each variable
  • Use good names
  • No global variables
  • Return results, don’t print them
  • Use whitespace for readability

Personal notes: While the lecture presents various strategies to prevent the most common beginner mistakes. These are just a select few of all the various types of code smells. I prefer to use the IDE IntelliJ, it has a feature called “Code Inspector”. It will scan your code and suggest fixes for a lot of types of code smells. Good code should never have obvious code smells.

Homework

For the “Java Tutor” Homework assignments you must use an Eclipse Plugin.  So sadly you have to use Eclipse with a custom built plugin and as usual I have had a lot of fun with randomly crashing Eclipse, the plugin giving me over and over again the same questions. The “Java Tutor” is overall quite weak. The questions are more like “fill in the blanks” and only accepts a single correct answer. Usually the titles of the links to the related materials give away the correct answer. However if you enter the wrong value, you can simply click “Show Answer”, copy the solution and progress without penalty.

Rise of the MOOCs

Over the last year a lot of new MOOC providers and courses in all fields have been become available. Lets have a look at some of the new MOOC providers.

MOOC Providers

Besides edx.orgcoursera.orgudacity.com a couple of new provides have popped up:

Futurelearn

Futurelearn is a MOOC system based in the UK, thus focusing primarily on UK Universities. https://www.futurelearn.com/

Iversity

Iversity is Europe-centric system. This system is especially interesting for enrolled students, some of the courses provide certificates with ECTS points. These points could theoretically be used to advance your current degree. However most universities are not happy about this development, thus you probably will have to talk with several layers of bureaucracy to get the ECTS points approved. https://iversity.org/

NovoED

NovoED focuses primarily on business education and on team projects during the courses. This alternative approach tries to encourage more students to actually complete the course by creating an obligation towards the other students in the group. https://novoed.com/

Other

Not strictly a “MOOC” however high quality (free) online Education:

Codeacademy

Codeacademy takes a different approach to teaching how to code. The lessons are delivered in a sidebar and you must actually code a functioning program to continue the lesson. If you are stuck, the program guides you and gives you helpful hints on how to solve the problem. Currently the classes mainly focus on programming beginners. http://www.codeacademy.org MOOC search engines Due to the ever-growing list of available courses, several Search Engines and lists

Mooc List

What can you say, it’s a list of all upcoming courses. http://www.mooc-list.com/

Mooctivity

a list with social/interactive features giving you an instant popularity index of all courses. http://www.mooctivity.com/

Skilledup

A search engine, that lists the free courses as well as paid online courses. http://www.skilledup.com/

Developments to watch for in 2014

Mooc.org

edX is creating a new platform to enable all types of institutions to publish their own MOOC type course. http://mooc.org/

XSeries (Edx.org)

The XSeries is a series of courses, that grant you a special certificate if you complete the entire coursework. One of the Certificates is from MITx Computer Sciences. https://www.edx.org/xseries

Free Computer Science Courses

If you want to get into the field of computer science you got to learn a lot of stuff and you got to learn a lot of new stuff the whole time.

Several american universities have created free online courses (not only for computer science). Upon completion you can get a free certificate to beef up your CV.

edX

edX offers free classes offered by MIT, Berkley, Harvard etc. They are challenging but still designed that you can take them in your spare time. The difficulty is designed for beginners as well as more advanced students.

http://www.edx.org/

CourseRa

A very similar site to edX but offers more courses in various fields.

https://www.coursera.org/

Udacity

To learn about computing you can go to:

http://www.udacity.com/

Note: If you are currently enrolled in a university, it is possible that the certificate can be accredited to your degree in that field. Talk to your student counselor.

EdX: Introduction to Linux

I recently completed the course “Introduction to Linux” by the Linux Foundation on the edX platform. Instead of paying 2500USD for the course you now can pay 250USD for a verified certificate, or simply get an honor certificate.

https://www.edx.org/course/linuxfoundationx/linuxfoundationx-lfs101x-introduction-1621#.U-YKjfmSyyY

Course Structure

The course is self-paced, you can take the exam any time and at the end of the month, the certificate is going to be issued.

Course Materials

Unlike other edX courses, most of the materials are short articles covering the core topics. There are short videos, however, they are mostly useless.

Learning Objectives

Sadly the first couple of Lessons are more like Advertisements that Linux is great and that Linux is used everywhere and being able to use Linux is an important skill. The rest of the course covers the basic operations when interacting with a Linux system. The course briefly takes a look at the graphical interfaces of three major Linux distributions Ubuntu, CentOS and openSUSE. As expected most of the course covers how to interact with the Console covers the basic interaction with the console, file operations, security principles, text manipulation and concluding with bash scripting.

Final Exam

The final exam is a 30 question multiple choice test. Sadly some questions are easier to be answered using Google than the actual course material. People with a basic understanding of Linux could just skip the entire course and just take the exam. It’s rather straightforward.

Conclusion

The course is a great introduction to the Linux System. The course is designed for IT-Specialists (Programmers, Web-Developers, and Administrators etc.) that have not worked with Linux and need a quick introduction how to work with the system. Sadly with the emphasis on using the console most users interested in using Linux as an alternative to Windows/OSX will simply say “Oh god, what a hassle, I’ll stick to my current system.” Once again Linux does not realize that GUIs have been invented to solve an issue where most people find it confusing when they do not see what they are doing. Most users interacting with a computer are not aware that it is possible to interact with a computer without GUI, telling those users that sometimes you simply do not have a GUI confuses them. Most of the success of Linux as the core of Android is the GUI and that users have a simple way installing programs and are not able to access any console/text only mode. Once again the core of Linux is great, however, the presentation and usability are that what is lacking.