Take for example “Hamiltonian cycle for a large graph”. The proof works by starting with a graph G that contains a hamiltonian cycle, then constructing an isomorphic graph H, and then either showing the mapping between the graphs G and H or releaving the cycle in H.
It is said that we prove that that we know a hamiltonian cycle in G without revealing it.
But this assumes the verifier does not have unlimited computational power. If he had it, he could ask to reveal the cycle in H, and use his unlimited computational power to work out the isomorphism. I understand that if the verifier had unlimited power, he could find the cycle in G directly. But that’s not my point. What I find strange is that we are relying on “hard problems” in the proof itself.
Are there ZKP protocols that do not rely on hard problems? Hard problems are only hard according to the state of the art. It is not proven that NP is not P, therefore, in my mind, this sounds like security through obscurity in some sense.
“Programs must be written for people to read, and only incidentally for machines to execute.”
― Harold Abelson, Structure and Interpretation of Computer Programs
and Donald Knuth said that too:
but very often at work, I just read programs that have lines of lines of them, without saying what it tries to do. For example, I can be reading 17 lines of code, and wonder what the programmer wanted to do, and after a couple of minutes, only to found out it was just to filter out some data into 2 sets and get the intersection. The same thing could be done in 2 or 3 lines. Or if there was a comment at the beginning of the 17, 18 lines
# put data into 2 sets and get the intersection
then I wouldn’t have to follow line by line and find out what it was trying to do.
But at the same time, my coworkers might even say, that he removed every single line of comments — programmers should read code, not read comments.
Should software engineers write code for people to read? I can only think of 2 contrary cases:
If you write code that is easy for human to understand, that means the company can easily fire you. People who write code that are difficult to understand, the company needs them to stay.
If other people “read you like an open book”, they may think you are weak. They may keep themselves hard to understand, to maintain their power.
If you are familiar with iOS devices, you know that the settings application uses the UISwitch control to show that a parameter is enabled or disabled. This control appears as a toggle switch and even has an animated switch motion that tracks the user’s finger as the switch slides from one side to the other.
On my iPad, I did notice an exception to this. A checkbox is used for what I would normally associate a radio button for.
The toggle switch takes up a significant amount of space on an iPhone, which I can put to better use.
I have access to the settings with a user interface from inside my application (and only from my app), and can depart from this practice of using the switch, by replacing it with a checkbox. (This would simply be a custom UIButton.) I am wondering whether there is a downside to doing this from the user experience perspective.
While searching for my keywords in Google videos, SERPs show respective youtube pages rather than landing page of my website for that keyword. However, for other company websites SERPs show their landing pages not youtube page. Why it is and how to show landing pages?
I have a sharepoint blog site where I want to Set Permissions so that normal users can only edit their own blogs rather than managing ‘all blogs’ but users on “owner” group will be able to see everything and edit them.
In Log4J, Slf4J and a couple other logging frameworks in Java, you have two “developper” level for logging:
I understand what DEBUG does, because the explanation is clear:
The DEBUG Level designates fine-grained informational events that are most useful to debug an application.
But the TRACE level is not very specific about its use case:
The TRACE Level designates finer-grained informational events than the DEBUG
(Source: the log4J JavaDoc)
This does not tell me how or when to use TRACE. Interestingly, this is not a severity level defined in the syslog standard. Googling for the difference between TRACE and DEBUG only seem to return “use DEBUG, oh, and there is TRACE too”. I couldn’t find a specific use case for the TRACE level. The best I could find was this old wiki page debating the merit of the existence of the level.
This, as an architect, raises a lot of flags and questions in my head. If a young developer asked me to add TRACE to my architecture, I would bombard him with questions:
What are some examples of information that should be logged with TRACE and not with DEBUG?
What specific problem do I solve by logging that information?
In those examples, what are the properties of the logged information that clearly discriminate between logging at the TRACE level rather than the DEBUG level?
Why must that information go through the log infrastructure?
What are the benefits of persisting that information in a logs journals rather than just using System.out.println ?
Why is it better to use log for this rather than a debugger?
What would be a canonical example of logging at the TRACE level?
What are the specific gains that have been made by logging at the TRACE level instead of DEBUG in the example?
Why are those gains important?
In reverse: What problems did I avoid by logging it at TRACE instead of DEBUG?
How else could I solve those problems? Why is logging at the TRACE level better than those other solutions?
Should TRACE level log statement be left in the production code? Why?
But given that it is present in most major framework, I am guessing it is useful for something? So… what is TRACE for, and what distinguishes it from DEBUG?