โHey, my code just wonโt run correctly. Can you help me?โ
namespace ๐ต = std;
using ๐ข = int;
using ๐ = void;
using ๐ = bool;
#define ๐ก auto;
#define ๐ false;
#define ๐ช ๐ต::make_shared;
#define ๐ท virtual;
#define ๐ป ๐ต::cout;
#define ๐ซ ๐ต::endl;
template<class ๐ฎ>;
using ๐ = ๐ต::vector_ptr<๐ฎ>;
template<class ๐ฎ>;
using ๐ = ๐ต::shared_ptr<๐ฎ>
๐ข ๐ฒ() { return ๐ต::rand(); }
๐ ๐() { return ๐; }
struct ๐ด { ๐ท ๐ ๐() = 0; };
struct ๐ : ๐ด { ๐ท ๐ ๐() { ๐ป<<"๐"<<๐ซ; }; };
struct ๐ : ๐ด { ๐ท ๐ ๐() { ๐ป<<"๐"<<๐ซ; }; };
struct ๐ : ๐ด { ๐ท ๐ ๐() { ๐ป<<"๐"<<๐ซ; }; };
๐ข main()
{
if (๐() == ๐)
๐ป<<"๐ฑ"<<๐ซ;
๐<๐<๐ด>> ๐ = { ๐ช<๐>(), ๐ช<๐>(), ๐ช<๐>() };
for (๐ก ๐: ๐)
๐->๐();
return ๐ฒ();
}
I think many would agree with me that the code is hard to comprehend. Attempt to debug that code would require constant back and forth between the custom variable definitions and the actual code itself.
Most of the programming languages out there follow the simple format of indentation to show nested codes, double โspaceโ to divide code into more digestible pieces. Unlike the past, modern programming is no longer about an individual, but more towards teamwork. Some may even compare coding to writing an essay, as both now would have someone reading it, and both pieces need to deliver its idea clearly. In programming languagesโ case, some may look back at it to get new ideas or simply out looking for bugs.
Of course, we shouldnโt forget the fact that many modern programming languages follow a similar format. Knowing one would allow you to gain little insight into other languages. While itโs not mandatory to follow all the formatting rules down to the tiniest detail, some basic coding standards should be followed so others and maybe yourself in the future can understand the code you wrote in the present.