Morning hack completed

Nothing like an hour-long morning hacking session to get your brain working. I grabbed my cup of coffee, sat down and started fiddling with the new code I’ve been working on for the cable grapher. I cut a lot of corners to make it work, but it does work. I need to go back and clean up some of the not-so-pretty things I did, because right now the code is very brittle and it will break if you feed it bad input.

Garbage in, garbage out. AKA a “gigo” system.

I’d much rather have a garbage-in, nice-clean-data-out system, but that’s going to take a few more hours.

So, what I have now is a system that will take this:


    <stitch name="purl">
        <name>purl</name>
        <abbreviation>p</abbreviation>
        <length>1</length>
        <ws>p</ws>
        <graph>
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////AAAAAAD/
////////////////AAAAAAAAAAAA//////////////8AAAAAAAAAAAD/////////////AAAAAAAA
AAAAAAD///////////8AAAAAAAAAAAAAAP///////////wAAAAAAAAAAAAAA////////////AAAA
AAAAAAAAAAD/////////////AAAAAAAAAAAA//////////////8AAAAAAAAAAAD/////////////
////AAAAAAD/////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
/w==
        </graph>
        <width>20</width>
        <height>20</height>
    </stitch>

and translate that into a stitch that can be used both for parsing text instructions and for printing out the resulting graph.

The big block of ugly slashes and letters in the GRAPH section above is an encoded image. One of the changes I plan to make in the near future is to add multiple images to each stitch. This would let me change the cable grapher program to display its output using different graphing conventions.

Enough personal hacking. Time for me to go to work and hack for the man.

Speaking of The Man – if you live in the New York area, please go check out StaceyJoy’s blog today. Let your representatives know that a nice shiny sports stadium is not worth wrecking people’s lives, okay?

No Responses to “Morning hack completed”

  1. Gay Sex Says:

    http://www.gay-sex-web.com/ Gay Sex http://www.gay-sex-web.com/gaydating.html Gay Dating http://www.gay-sex-web.com/gaysingles.html Gay Singles http://www.gay-sex-web.com/gayporn.html Gay Porn http://www.gay-sex-web.com/gaypersonals.html Gay Personals

  2. Gay Sex Says:

    Gay Sex Gay Dating Gay Singles Gay Porn Gay Personals