It's UWAweek 48


This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 564 articles.
Currently 4 other people reading this forum.

 UWA week 21 (1st semester, week 12) ↓
SVG not supported

Login to reply

12:07pm Mon 23rd May, Daniel S.

As per title, lab 11 solutions are now online. As I mentioned during the labs, be remember that Makefiles require tabs for indenting! This means you have to use the tab key to indent! I've configured vim in our Docker image to use tabs as normal in Makefiles (tab key inserts a tab, backspace deletes a tab). BONUS READING: TABS V SPACES Most languages (including bash) don't care how (or if) you indent. Whether to use tabs or spaces is the subject of debate (much like whether vim vs emacs). Here are some good guidelines: 1. The MOST important thing is consistency. Never mix tabs and spaces in a project unless you want to cry and/or make people reading your code cry. 2. Most organisations will have a recommended style guide to follow. Follow it 3. 4 spaces seems to be the most common indenting style from what I've seen. In languages like html, xml, and json, where indents can get pretty deep, 2 spaces is acceptable. Besides Make, there are two other common languages that really do care how you indent: - Python uses indents to define control blocks (like the inside of an if statement or a loop - most other languages use { } to enclose control blocks). Python doesn't care if you use tabs or spaces to indent, as long as you are consistent! - golang (a modern, C-like language, developed by google) requires tabs for indenting. Thank you all for your engagement with the labs this semester. Dan

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy