|
|
|
|
|
by dr0wsy
2530 days ago
|
|
Thanks for the article and discussion that sprang up around it! The question I'm trying to ask is how I should express (part of) programs on paper using math when I don't see how they are related to math. Example: How could I easily express a function that takes a string as input and outputs the string capitalized using math notation? I understand that the problem you solve in the post should probably be put on paper first before you began writing any code. My problem is to express programs in math when "calculate" isn't part of the problem description, like it is in the example in the blog post. Edit: Changed example question. |
|
If I needed uppercase I would just say:
Writing that down, you and I already have a pretty good idea of how it works, or its included in our libraries, and we can figure out the details when writing the code.This is of course assuming `uppercase` is a minor part of another algorithm. If it was the subject of discussion I might describe it like this:
Perhaps that helps, but I don't think it addresses your question directly. I think you need some experience reading math to know how to describe problems, but I don't think you need to know fancy math. A knowledge of functions, sets, tuples, logic, summations, etc, will get most of what you need.I highly recommend that book I linked in the article: "Introduction to Graph Theory" By: Trudeau