Elliott_with_grandmother

The Bit That Looks Like A Starship

Screen_shot_2011-04-30_at__3

4 Responses

  1. Elliott_with_grandmother elliottcable

    (UJD: index.xhtml @ e7bfda2, lines 93 ‒ 114)

    Sometimes, when the application of the principle doesn’t conflict with downright readability, it’s okay to just use something “because it feels right.” Here you see some playing with alignment across multiple lines, and indentation; but mostly, it just felt right.

    about 1 year ago

  2. Elliott_with_grandmother elliottcable

    (P.S. I know Dribbble isn’t Forrst. I’m not posting my code as code, I’m posting it as visual art. I consider source code a medium for artistic expression, hence why I’m posting my work here in this way. I’ll be trying to post shots from various languages / markups, in various styles; anything I consider to be visually interesting. I also may be adjusting the hilighting and typography to make the shots more visually appealing.)

    about 1 year ago

  3. Headshot Timothy Armstrong

    You have a very interesting code style. And it seems you really like parentheses: where you wrote

    (((new(Date)()).getTime() / 1000) / 86400).toFixed(9).split('.');

    ... I would have written:

    ((new Date).getTime() / 1000 / 86400).toFixed(9).split('.');

    A few characters shorter and a lot cleaner and easier to read, in my opinion. I don't really like the way you worked hard to line up the "=" later on in your code either, as it seems to nullify the point of using indentation in the first place. I'm a bit of a neat-freak when it comes to code though, making sure everything is clean and lined up and formatted so that it's beautiful :)

    about 1 year ago

  4. Elliott_with_grandmother elliottcable

    Ah, but in this case, lining up the = marks also aligned the repetitive bits of those four lines, which really draws out the differences between them! That’s one of my favorite techniques when it comes to source-code design. I like indentation, but I quite often do away with a given level of indentation entirely when it serves my purposes; indentation is only one way to lead the reader’s eye, and only conveys one piece of information. There are plenty of situations where there is another piece of information you want to convey more strongly than that one; for instance here, the four different kinds of “sols” we’re defining.

    As for parenthesis; just as you’re anal (not intended in a bad way!) about indentation, so I am anal about convention. One of the conventions I adopt within my code is the “new-is-a-currying-function lie” such that every call I make that involves the new keyword appears like this: new(Something)(). Of course, even given that, there’s definitely some extra parenthesis in that line! Your point is well taken. (-:

    about 1 year ago

keyboard shortcuts: previous shot next shot L or F like