Today via Lobsters: Write code that is easy to delete, not easy to extend. I think I like programmingisterrible.com.
Tag Archives: code
Knuth on reusable code
Today via Lobsters: APL Style: Patterns/Anti-patterns:
I also must confess to a strong bias against the fashion for
reusable code. To me, “re-editable code” is much, much better
than an untouchable black box or toolkit. I could go on and on
about this. If you’re totally convinced that reusable code is
wonderful, I probably won’t be able to sway you anyway, but
you’ll never convince me that reusable code isn’t mostly a
menace.— Donald Knuth, Interview with Andrew Binstock
Git Code
Today I read Boost Your Programming Skills by Reading Git’s Code and played along with baby-git. I noticed a rundown on the makefile, Learn Git – Baby Git Makefile, but I didn’t have time to read it.
Four Ways of Writing Thoughtful Code to Think Less
This was good: Four Ways of Writing Thoughtful Code to Think Less.
I particularly like the “Colocate or Barrel things” section with the advice to barrel your app’s features together.
An incomplete list of complaints about real code
Today I read An incomplete list of complaints about real code. I don’t agree with most of her conclusions, but they were interesting to read and consider.
Reasoning about code is a scam
Today I read Reasoning about code is a scam, itself a rather contrarian piece. But I enjoyed it.
The Wrong Abstraction
Read a great article today: The Wrong Abstraction. It talks about when it’s better to duplicate code that maintain an abstraction. Other things mentioned include:
Resetting a WASD Code keyboard
I have a CODE V3 104-Key Mechanical Keyboard with Cherry MX Green switches which I love. But unfortunately it has been my experience that they can be a bit finicky. I had to return one to WASD once because keys started producing “gibberish” if pressed the keys too hard. I know! Crazy!
Anyway I had a similar problem today. My Pause key, when pressed, would simultaneous ‘mute’ my audio *and* turn it either ‘up’ or ‘down’ (with a preference for ‘up’). Friggin weird. Anyway I was able to fix the issue by doing a keyboard reset.
To do a keyboard reset: unplug the keyboard, set SW4 to the “on” position, plug it back in. Wait until the solid green lights emit and then unplug, set SW4 back to the “off” position and then plug the keyboard back in and test. Easy peasy. :)
Code Assistance for C++ in NetBeans: define __cplusplus
See here:
- Go to Tools->Options
- Select C/C++ menu
- Select Code Assistance tab
- Select C++ Compiler tab
- In Macro Definitions list view, locate __cplusplus and change its value from 199711L to 201103L
- Click OK button
Guide to Assembly Language Programming In Linux
Here’s the home page for Guide to Assembly Language Programming In Linux… includes a zip file with assembler source code for examples.