Cholesterol, with and without Statins

So I've been entering medical info into a database for a good chunk of the afternoon. The cool thing is that by changing my diet, I've been able to get my cholesterol levels trending down to today, where they're nearly where they were when I was on a statin (which I reacted incredibly poorly to).


How did I do this?


#cholesterol, #diet, #paleo, #low-carb
This entry was posted under Me, Medicine. Bookmark the permalink.

Screenwriting update: Brixton vs. Compton

So I’m happy to say that I’ve finished writing the first draft of the pilot episode of my reality mockumentary comedy tv pilot (wow, that’s a mouthful), Brixton vs Compton. It’s in the hands of my read-through crew now, which is a nice place in the process to be in.

Of course, it’s also only episode 1 of 12. (Which means I need to get my skates on and write at least another 3 episodes sharpish).


C!! – Data Tables and value maps in C bang bang (kind of)

One of the things that I passionately hate about software development is defining the same data in multiple places. The reason for this is that it massively increases the chances of getting an annoying, hard to solve bug for no good reason.

The easiest way to explain this is with error codes. For error codes, you need:

  • An enum type of some kind, so that you can pass the error around (unless, of course, you’re using something like an HRESULT, but that has its own thorny class of problems akin to 4CC-registration on ye olde Mac OS).
  • A unique numeric value.
  • A text string that can be used to show the user.
  • A text string for the enum value so that you’re not guessing which error you’re actually dealing with.

    One way we could do this is to give enums (and other types) a string representation. (And we should probably do that anyway – we can generate that data on the fly when we first use it in code). But that only solves for the error-message case, and it doesn’t really help with the human readable text string lookup.


  • C!! – Redefining the native types of C++ for C bang bang

    This article is going to be a lot simpler than the other articles on C!! (which hopefully are still percolating a bit). Mainly because I want to handle something simple before I dive into deeper waters – like generators.

    So if you were going to redefine C++’s type system, how would you do it?

    My goals are to make the types explicit sizes where possible, and obvious where not. And some of these are (as with everything else in C!! at this point) up for debate.

    By the way, simple doesn’t mean short, sadly. This is a long one.


    C!! — Handling Endianness in the C bang bang programming language

    One of the more annoying things that you have to deal with when writing code that targets a variety of different platforms is endianness. You see, like in Gulliver’s Travels, there’s two camps in the computing world – those who break numbers up into clusters of 8-bits, starting at the least-significant part of the number and laying it out a byte at a time that way in memory (little endian) and those who start at the most significant 8-bits, and lay them out a byte at a time in memory until they get to the smallest part (big endian).

    (Actually most chips these days seem to let you strap a pin to signal or ground to flip the default order, or set a bit in the BIOS to change it to whichever order you want, but most people use the default).

    This is really annoying if you’re a game developer. PCs are little-endian. Old-school Macs? Xbox 360? Wii? PS3? Yeah, they’re big-endian. Network developers too; port numbers are always big-endian. And you need to remember that, or you’ll have problems.

    This means that you end up littering your PC-based editor code (your development environment) with code to swap the byte order during serialization – which is harder to read than it should be. And if you forget, the bugs can be difficult to find. And if you take stock code written for one platform and move it to another, you often have to go in and change all kinds of things.

    Let’s fix that.


    subscribe via RSS