PunchedTape: a blog about software stuff.
-
Raytracing Anyone?
There’s not much cooler than Raytracing. Making photoeralistic (or a little too perfect-istic) images on you computer is definitely cool. A bagillion years ago, I dove into raytracing and made my own. It was AP Calculus in high school when I realized that gradients lead to surface normals. Shocker! Anyway, I dug out the old…
-
Hello world!
Welcome to PunchedTape, your friendly corner of the web where we unravel the mysteries of computers and software with a touch of simplicity and a dash of expertise. Whether you’re a beginner or a seasoned pro, our goal is to make technology accessible to all. Step into our digital haven and find a (forthcoming…) treasure…
-
Java and C++, hmmm…
Java can’t do: An unfortunate, in my opinion, consequence of not being able to overload operators is the == operator function with objects. This operator only compares instances of objects as opposed to the content of those objects. Which is confusing in light of the primitive int and Java object Integer class, for example. So…
-
Software Maintainability
Software Maintainability best practices in general: Why maintain code at all? Profit. Profit is revenue less expenses. Expenses include time-based wages. Effort is time. The thought is that it will probably take less effort (lower cost, higher profit) to improve an existing product than to start from scratch. If that’s not true, we should start…
-
Memoization – Python and C++
Dan Bader shows a neat way to implement a simple cache and speed up your Python programs here: https://dbader.org/blog/python-memoization He writes a generic decorator class that wraps any function with a lookup cache for each set of input arguments and uses it for an exponential complexity function — Fibonacci. While I will defer the generic…
-
GCC Default Search Directories
Wondering (again) where gcc searches for includes when no -I include options are specified on the command line. What we really want is some verbose output from the C++ preprocessor which we could get with `-Wp,-v` when compiling some source code. But we don’t want to have to specify some source file just to get…
-
Windows C++ — Simplest Desktop Program
I’m much more of a Linux C++ developer, but here’s a quick start example of a CMake project that opens a window in Windows 10/11, gets keyboard input and is set up to draw something in the window: main.cpp: CMakeLists.txt
-
SFML C++ Quick Start
SFML is a handy little library I’ve used mainly for graphics. I made an OpenGL and Vulkan graphics library myself cause what’s the fun in using some existing library? Suck the fun out of everything. It was interesting to see that SFML had a similar architecture to mine which made it kind of convenient to…
Got any book recommendations?