These are some of the responses to Software Friction. Blogs on a similar topic Laurie Tratt wrote What Factors Explain the Nature of Software? which touches on the topic of friction, too. Emails and Comments I’m an Infantry Officer in the US Marine Corps, we talk quite a bit about friction. One book you may be interested in if you’re reading Clausewitz is Marine Corps Doctrinal Publication 1 (MCDP 1) Warfighting (link to PDF at bottom). It’s a pretty quick read. We approach it largely i...| Hillel Wayne
I got a lot of responses to The Hunt For the Missing Data Type. I’ve included some of the most interesting ones below. Response Blogs The “missing” graph datatype already exists. It was invented in the ‘70s, about datalog. Emails and Comments Everything in quotes is verbatim. GraphBLAS My name is Michel Pelletier, I’m one of the contributors to the GraphBLAS API standard and python bindings.| Hillel Wayne
Posted on | Hillel Wayne
Good UI is necessary to making correct software. If people have trouble using the product, they’re more likely to do the wrong thing. Personally, though, I can’t stand UI work. I don’t think it’s “beneath me” or anything, it just doesn’t quite mesh with my brain. Visuals and interfaces give me anxiety. Mad respect for the people who can handle it. I love formal methods. Recently my friend Kevin Lynagh released Sketch.| Hillel Wayne
Powertoys is “a set of utilities for power users” that Microsoft keeps separate from Windows so they can get away with less testing. My favorite one is “Text Extractor”, which lets you OCR capture anything on the screen. Win-Shift-T: Text in the selected field is stored to your clipboard. It doesn’t work well with photographs or non-computer fonts, though.| Hillel Wayne
q: gets the history of all commands. From there, it’s just :%g/pattern/yank A %g runs on all lines matching pattern. yank A appends to register A. If you do yank a instead, it will only save the last matching line.| Hillel Wayne
gitk . git-gui . Both of these come default with git.| Hillel Wayne
A small helper I use to debug some python programs: fromcontextlibimportcontextmanager@contextmanagerdefdebug_error():try:yieldexceptExceptionase:breakpoint()quit()### usagewithdebug_error():x=1y=0x/y# x and y will be avail in pdb You can also put things before the yield (which will run before the with block), and after it (to run at the end of the block.) Anything put after it will run at the end of the block. See @contextmanager for more info. Notes| Hillel Wayne
Python 3.4 added path objects, but most people still don’t know about them. They simplify a lot of file operations: ### Without pathlibpath="path/to/file"# parent diros.path.dirname(path)# file suffixos.path.splitext(path)[1]# read filewithopen(path)asf:x=f.read()### With pathlibpath=pathlib.Path("path/to/file")# parent dirpath.parent# file suffixpath.suffix# read filex=path.read_text() Paths are also OS-independent, so the same code will generally work on both Windows and Unix.| Hillel Wayne
This one’s in Lua because I use Neovim, but it should be directly translatable to VimScript. I often need to rerun the same commands in a specific buffer. For example, I might regularly run one command to expand an XML metafile, and then another to run one of the expanded outputs. functionLoadLocal(local_cmd)vim.b.local_cmd=local_cmdendfunctionRunLocal()vim.cmd(vim.b.local_cmd)endvim.cmd[[command! -nargs=1 LoadLocal call v:lua.LoadLocal(<f-args>)]]vim.keymap.set('n','gxl',RunLocal,{silent=t...| Hillel Wayne
For my StrangeLoop workshop I had to do a lot of powerpoint work. To streamline this, I made over 20 AutoHotKey shortcuts to run various ribbon commands. To avoid polluting my keyboard I built them all into a general-purpose system. All shortcuts started by clicking the thumb mouse button and then quickly pressing 1-2 keys in sequence. #IfWinActive ahk_exe POWERPNT.EXE pp_func() { pp_cmd := Map("a2", {cmd: "{alt}adu.2", info: "Set animation time to .2 seconds"} , "fh", {cmd: "{alt}hgoh", info...| Hillel Wayne
Contact me here. Services: Workshops Talks Spec pairing and review Retainer services Workshops If you’re building complex, expensive systems, my workshops on software modeling can help you save hundreds of thousands in saved developer time and maintenance work. With my training you’ll learn how to Catch complex bugs that would take weeks or months to fix, and fix them before you start writing code. Build complicated systems quickly and with confidence.| Hillel Wayne
Back in 2007 Python added Abstract Base Classes, which were intended to be used as interfaces: from abc import ABC class AbstractIterable(ABC): @abstractmethod def __iter__(self): while False: yield None def get_iterator(self): return self.__iter__() ABCs were added to strengthen the duck typing a little. If you inherited AbstractIterable, then everybody knew you had an implemented __iter__ method, and could handle that appropriately. Unsurprisingly, this idea never caught on. People instead ...| Hillel Wayne
Many bugs are implementation errors: there is a mistake in the code that makes it not do what you wanted it to do. For example, you may have accidentally left out the “list is empty” case, or written a nonterminating function. You can identify it as “definitely wrong” for a given input. Most testing, in fact most writing on software correctness, deals primarily with implementation errors. Above that we have specification errors.| Hillel Wayne
In January I start EMT Training and maybe make at least one of my childhood dreams come true. I’ve been saving for years for this: while the program is cheap, I’m effectively losing my monthly salary. I found it really easy to calculate my burn rate in J. I’ve talked about J before so I’ll assume you know the basics and we can skip all of that. Note: Just to be absolutely clear, the numbers below are made up.| Hillel Wayne
I think by hand. It’s easier for me to write my first drafts on a tablet and type them up afterwards. I can’t do this with code, though. Here’s me scrawling out a python function as fast as possible: That took three times longer to write than type. Something about code being optimized for legibility and IDE usage and lame stuff like that. I still like the idea of writing code, though, so I looked for a language that wasn’t just easy to write, but benefited from being hand-written.| Hillel Wayne