UNIX Shortcuts, C++ Shortcuts, Bools
Today we talked about three things -
A) UNIX shortcuts. We went over how the input tester works, and how through clever use of shell scripting we can automate routine and tedious tasks to make our lives better, as well as various commands and aliases to speed up the development process
The UNIX philosophy is to get maximum results for minimum effort - and it works.
B) C++ shortcuts. We talked about different ways of doing the same thing with less typing, including chaining together multiple cout statements, using the ++ operator instead of x = x + 1, the += operator so you can do x += 7 instead of x = x + 7, and showed some really hideous abuses of the preincrement and postincrement operators to explain why x = x+++ ++x is valid C++, but you should never write it.
It did get me my job, though, so I guess there's that.
At your level of development, don't combine a ++ operator with another command, just write x++; on its own (or ++x; which does the same thing when not combined with another command). By the time you get to second or third semester you should have enough skill to use them in compound commands safely.
C) We talked about the bool type, which is basically an integer that can have only two values: 0 (false) and 1 (true).
In general, C++ uses 0 to mean false, and everything else is true.
Other Videos By Bill Kerney
2021-08-30 | How to Make an Argument and Counterargument - Piracy: For and Against |
2021-08-27 | For and While Loops |
2021-08-27 | Examining Sources |
2021-08-27 | Gaming Psychology and Lerping Materials |
2021-08-27 | Hash Tables |
2021-08-25 | Handling Errors, Cheating, Competency Exams, Chars, Loops |
2021-08-25 | Evaluating Claims |
2021-08-25 | Final Project!!?! |
2021-08-24 | UE4 Material Instances |
2021-08-24 | RSA Encryption Part 2, Computer Security |
2021-08-23 | UNIX Shortcuts, C++ Shortcuts, Bools |
2021-08-23 | Welcome to CSCI 1 @ Fresno State! |
2021-08-20 | Conditionals Part III |
2021-08-20 | Navmesh, Materials, Axis-Aligned Bounding Boxes |
2021-08-19 | Multiplayer Balance and UE4 Materials Pt. 2 |
2021-08-19 | The Optimizer, Bigints, Prime Generation, RSA Encryption, Cryptographic Hashing |
2021-08-18 | Conditionals Part II |
2021-08-17 | Line Rasterization |
2021-08-17 | Game Design Principles and UE4 Materials |
2021-08-17 | Powm, Modular Division, Espionage |
2021-08-16 | Strings, Conditionals, Logical Operators |