I'm sorry, but this post went from bad coding practices to worse coding practices. As the saying goes, there are multiple ways to skin a cat, and there are multiple ways to write code to perform the same function. However, what is the best way? Generally, we will want to consider at LEAST the three main factors speed, length of code, and error proneness. For this, reason,
number_of_columns = n items( dt << Get Column Names());
is really poor programming. What you should use is:
number_of_columns = ncols(dt);
The obvious is it's shorter, but it's also faster. The former has to create a list of all the column names, and then count them. The latter will simply grab the table variable.
Next, column3 = column(dt, 3); should never be used. The first reason is b/c column3 is a poor name. I'm not going to go into why, but you can read this post for clarification What's in a Name? Anti-Patterns to a Hard Problem. The second reason, is b/c of the additional step you are introducing. Why do:
column_nr = Contains(dt << get column names(), Column("height"));
column = column(dt, column_nr);
When you could just:
column = Column(dt, "height");
Again, the latter is shorter and faster.