Building a Go Doctor Refactoring
In this post, I’ll give an overview of how to create a new refactoring for the Go Doctor, which refactors Go source code. We’ll build a small command-line tool that adds a copyright header to a Go source file.
256 Lines or Less (Jeff Overbey's Blog)
In this post, I’ll give an overview of how to create a new refactoring for the Go Doctor, which refactors Go source code. We’ll build a small command-line tool that adds a copyright header to a Go source file.
The first stage in a compiler (or interpreter) is called lexical analysis. In this post, I’ll briefly describe what lexical analysis is and why it’s useful.
Every computer science student ends up taking an undergrad statistics course (I think), but for some reason, no one ever mentions that it’s actually useful.
Just-in-time compilers (JITs) have to do something that most application programs never do: generate and execute machine code at runtime. In a previous post, I showed how to build an x86 assembler. Something like that can be used to construct machine code. But how can you execute that code? If you have an array of bytes, and you want the processor to execute them as machine code, how can you do…
In this post, I’ll show how to use the Microsoft Macro Assembler (MASM) and DUMPBIN to figure out the machine language encoding of a particular x86 assembly language instruction.
For the first “real” post in this blog, we’ll build an x86 assembler in less than 256 lines of C code. Obviously, it won’t implement every x86 instruction, but it will implement a surprisingly useful subset: data movement, control flow, integer arithmetic, bitwise operations, and function calls. We won’t be able to run the generated machine code yet (that’s coming in a later blog post), but we’ll…
What can you do with 256 lines of code?