?

Log in

No account? Create an account
penrose orange

stephenw32768


/var/log/stephen

cat /var/log/stephen >/dev/eyes


Ah yes, I remember low-level coding
penrose orange
stephenw32768
I've been doing a porting job at work: porting code from C++ to C#, and porting the data on which the code operates from a stream of structs and strings to C# objects. Quite fun, actually, especially because I've been permitted to stick the C# compiler into "unsafe" mode and have fun with direct memory access, pointers and the like. It's the easiest way of working with the data streams I've been given; just slurp a struct's worth into a byte buffer and cast a pointer to it; the sort of thing that is par for the course for a C coder, but rather frowned upon in the C# world for anything other than interoperability. My C# code looks spookily like C, with stars and indirection operators everywhere. And it's all working. What fun!

The stuff I'll be doing tomorrow involves translation of identifiers. In our new world, object identifiers are allocated by the database. So I'll have to get an ID for an object, then run through the imported data, replacing the old IDs wherever I find them with the new IDs. It'll take more than one pass through the data. It reminds me of the kind of task that a linker/loader has to perform when it resolves symbols and relative offsets into absolute addresses. Who'd have thought that a data mangling job at a data processing company would've given me an insight into the inner workings of a linker?