When debugging a web app, you can debug the code (and add print statements / breakpoints). Or look at the HTTP queries its making in the inspector. Or debug the server - look at what queries its receiving and returning. Or experiment with different values in the database.
Last year I was trying to track down a memory leak in some wasm code. The tooling for that sort of thing in wasm was/is quite primitive, so I did some work to compile the module natively then ran valgrind on the resulting executable. That didn't work - the C code executed differently from the wasm and didn't exhibit the bug! So I added print statements randomly through the program and ran it both natively and through wasm, then diffed the text output to track down when the execution traces diverged. (It wasn't a compiler bug, fwiw.)
I wanted more information about the memory leak. So I wrapped all the malloc/free calls with a replacement that stored all outstanding allocations in a list, with the stack trace when malloc was called. When the leak happened, I could ask for the stack trace of all outstanding allocated objects[1]. That was fast and effective, and I added a memory leak check in my CI.
At one of my first programming jobs we were using visual source safe (oh god, kill it with fire). I ended up losing some changes I'd made in a ~3000 line java class that we'd already deployed to production. I didn't want to do my work over again (or admit the mistake to my boss!). So I ran a decompiler against the class file we deployed to production - but it was huge and unreadable. To find the changes I'd made I took the current version of the java file, then compiled it and decompiled it again. So then I had two ugly files - but I could diff them, and that highlighted immediately the dozen or so changes I'd made. Then I just manually rewrote each change back into the original source file. Importantly, I had complete confidence that I didn't miss any of my changes.
[1] Its not pretty, but the code looks like this if anyone's curious: https://github.com/josephg/mime-to-jmap/blob/2a7429f7b805cb0...
Did you have merge week too? Often stretching into a second?
Have also used this technique to compare build logs when you have a version of a project which will compile and one which doesn’t (eg when trying to integrate a second project into an existing one, or battling CI issues), useful if you aren’t an expert in that particular tool chain especially.
Personally I use VS Code’s diff these days, since they added support for word wrap recently, it’s the easiest to read.
In other tasks, consider different data structures or representations that fundamentally represent the same data, but in different ways that offer different guarantees. Representing a graph with a matrix may let you answer some questions very quickly, but it may make others harder to answer, for example.
To often we simply reach for our trusty hammer, and it's not always an efficient or usable tool.
Eg in school we learn as kids derivatives, rote routines to solve a type of problem, and we plug and chug, but we are not shown (necessarily) by govt education the underlying theories that may create a solution. This/my opinion is of course dependant on how expert an instructor is ...
The best anecdotal example I can give off the net offhand would be: https://www.google.com/amp/ask.metafilter.com/105309/Tao-thi...
Thanks for your feedback
Edit: Also in the usa we're taught do your own homework for example. In asian cultures often students band together to succeed in classes (I work in higherEd and this is culturally visible in peers in classes). This is another example of this philosophy being different between cultures.
In contrast to eastern education which tends to greatly focus on memorization through repetition.. (i.e https://en.m.wikipedia.org/wiki/Rote_learning)
The quote you have included is based on Taoism. Is that common? I was under the impression that Confucianism has the more dominant influence on values and thought.
Anyways, at least that's one thing we can agree on - Taoism's philosophy encourages an open mind and awareness.
Wouldn't quite say that is true. People use a variety of techniques to get scored higher and there's always a certain percentage who will use such rote learning techniques, be it eastern or western.
I think what what's missing in the discussion is the western focus on individualism as compared to east asian communitarianism. Both have their pros and cons and mutual dislikes.
There was a book by 2 high level western/eastern women managers in Hewlett Packard that highlights this dichotomy. It's a great read.
Again, that's because of a deep rooting in Confucianism. Also, "Communitarianism" is a western (Christian) philosophy. It may have been borrowed from Confucianism? I'm not sure. A lot of religions and philosophies share these kinds of values, so it's not unique to just one region / culture, IMO.
Anyhow, neither is better or worse, and probably a balance between communitarianism and individualism is best. All cultures can learn from each other.
Hm probably a better word would be collectivism
I went to a mix of 7 private and government schools between K through 12th grades in the US, and I don’t remember any of them not having group projects. Some, or most of the homework is individual, but there’s plenty of group work too.
There isn't anything special or insightful, mystical or different or "eastern" about cooperative learning. I'm thoroughly "western" and had plenty of homework groups in both undergrad and grad school. Nor is there anything special about the cooperative cheating I described: "certain groups" applied to plenty of western peer groups I saw in undergrad especially, though they didn't claim what they were doing was some "cultural" thing, as they knew it was simply cheating.
I would certainly add "looking at values vs looking at differences" and "looking at the generator vs looking at what's generated" (which the top level story is an example of).
It may take a little squinting, but we can see the common mathematical practice of reducing one problem to an example of another as an instance of this. There are also tweakier math examples where treating something as topology or something makes it easy to solve.
@Jtsummers puts it as “Map the problem into other domains”; another interpretation (or a variation on the same) is “look at it from a different angle” or “look at it in a different light”. Do both -- move around with your light source, shine a torch/flashlight at your problem, and different shapes will be “projected” onto the wall behind it. Kind of like, if you are familiar with Hofstadter's _Gödel, Escher, Bach_ -- remember that “G,E,B” cube pictured on the cover of many editions? A more or less abstract “thing” or idea can be “projected” into different practical views depending on perspective. In actual practical work talking about “projections” can of course feel a little highfalutin’; to me it's a bit like always talking about your RDBMS tables or views as “relations”.
But in a more philosophical sense it is of course perfectly valid. And AFAICS it's an age-old idea in Western philosophy; what I described above is essentially precisely what is known as _Plato's Cave_. (Which incidentally is why @tenken’s identifying it as “Eastern” feels quite peculiar to me.)