The term hypocritical programming refers to the way of coding where it looks like it is done that way whereas the coder tweaked the code.
Faking the button
From my own personal experience, coding buttons in processing is such an example.
Unless you import a Java gui package, there is no standard / built in button function in the API
What you do is listen for click on area.
if mouseClicked && mouseX>50 && mouseX<100 && mouseY>10 && mouseY<60
this defines the x and y range
now to fake it even more, you actually draw a square in the defined area
now to further fake it / making it look more like a button,
you change colour on mouse over
well let us say that
so you put a condition in the draw function
if (mouseX>50 && mouseX<100 && mouseY>10 && mouseY<60)
don’t forget the else otherwise the on mouse over colour will remain
it’s not bad but it makes the user says oh yes, a nice button hum nice language.
There are other cases where straight-forward principles work not as it is logically correct for it not to work or because of flawed limitations.
let us see the code which continuously asks for input.
you need two inputs, not one.
hum in simulations, you hack here and there tune this and that and try to make things appear as real as possible.
i am talking about the coder who is simulating physics.
ah the value of mass when acceleration is five provided that x remains constant at 10 oh wait ….put mass equals one. dirty solution. well actually no. physisicts also use that one.
though to make things here and there in programming you simplify a bunch of stuffs. well you want effects not accuracy.
the language you are using handles requests for server well or no? sometimes syntax suffices not to tell. it might be a perfect theory abiding syntax but a bit of understanding reveals the ‘pot au rose’. Your language is faking management reality.
i once made tabs in html without loops as wc3 proposed.
i just made buttons, texts appear, disappear and some colour matching poof users thought i had made tabs. well…
The word of the last
Not everything in programming is straight forward, just as you thought it out or just as you expected it out.
You must find a means to go your way.
But if laziness creeps in, no worry as long as it works.
As long as it works . . . risk free