Mark Grealish

the life and code of a crazy cat man

2005-era Linuxy desktop goodness

in technology

And by “retro” I mean “cringeworthy,” but that’s part and parcel with haxx0r Mark and his ghetto battlestation. In clockwise order:

  1. Gnome desktop environment on Fedora Linux, Wednesday August 18 2004.
  2. Gnome desktop environment on Gentoo Linux, Thursday February 16 2006.
  3. Fluxbox window manager on Gentoo Linux, Monday November 15 2004.
  4. Gnome desktop environment on Gentoo Linux, Friday July 22 2005.
Gnome desktop environment on Fedora Linux, Wednesday August 18 2004
Gnome desktop environment on Gentoo Linux, Thursday February 16 2006
Fluxbox window manager on Gentoo Linux, Monday November 15 2004
Gnome desktop environment on Gentoo Linux, Friday July 22 2005

Typing right is hard

in me

Something something legacy shoulder injury, proper ten-fingered touch typing is hard. I type fast in a ten-fingered style, but it is weird and left-dominant. Correctly keeping both hands on the home row is hard. Grumble.

Cookie, home from boarding

in animals


Chilled-out Cookie

What I did on my summer holiday

in code

I finished with one programming job on Friday and I start my next Monday. That means it’s time for some good ol’ retrospection.

I used to think I was a special snowflake because I fell into coding, but Stack Overflow says otherwise. I wrote a great sob story about my hard-luck, self-taught career, but I could it out because it wasn’t special.

My job was awesome. Yeah, I gripe about parts of it down below, but my experience was positive. I can be negative at the best of times, but it’s true that my work environment was fantastic. My team lead gave me the room and respect to get my job done. He worked to keep us isolated from politics and drama so that we could focus on code. It allowed me to go in, write code, and leave my job at work at the end of the day.

The office was positive-my team welcomed discussion and sharing. My crazy ideas were at least mooted.

1. Don’t be a Negative

Stop here and read Beware of Developers Who Do Negative Work by @PBeekums. His article is a perfect description of my last job. Last year, we lost months figuring out legacy code well enough that for us to feel safe replacing it. While our application was a Ruby on Rails application, the original developer at our company had two problems:

  1. He was paranoid about his job security.
  2. He had a bent for premature optimisation.

These resulted in pithy, undocumented, interleaved code founded on on raw SQL queries. We sunk whole months into puzzling out his code so we could replace it. That situation grew into a personal frustration:

  • We could not add new features because of immense technical debt. We were unable to make progress until we had a solid understanding of the codebase.
  • We were afraid to touch some pieces of code in case we broke the application. Case in point: he used 600 lines of custom SQL queries to simulate a has_many :through relationship. This was instead of the ~10 lines you need with ActiveRecord.
  • We perpetuated our non-conformity with Ruby and Rails’ best practices. This was because there was too much inertia in the current architecture.
  • Technical debt stymied my desire to work with new features and apply best practices.

Don’t be That Guy.

2. Everyone’s Code is Bad (Even Mine)

I used to bitch at length about the last guy’s code, so I’m sure the next will bitch about mine. As much as I gave out about his spaghetti mess, he had still optimized it to fuck. Hand-in-hand with the fact that replacing the old code made out job easier, was that our replacement code was slower. Sometimes it was a little slower, but sometime the application ground screaming to a halt.

Between that and the fact that his code worked, and sometimes worked well, I came to respect his intelligence. I’m sure the next dev in line will what-the-fuck about my functional approach to UI state (and get an itch to replace it).

All code is transient. All code is cursive hand-writing. Everyone else’s handwriting is awful and unreadable.

That's a paddlin'

3. Document, Document, Document

The total lack of documentation why it was so hard to clear our technical debt. It’s a 100-line function of dense SQL statements, which is great except that the function’s name doesn’t reflect its use. I what-the-fuck about the code I wrote last week, let alone six months ago. What’s that, your code is self-documenting? Don’t lie; nobody likes a liar. Do you write JavaScript? JSDoc. Ruby? YARD. Learn to love them.

Two simple simple:

  1. Make it easy for your team to document.
    • Offer up editor macros that insert block comment templates.
    • Show the benefits of documentation through features such as IDE prompts (RubyMine at least reads JSDoc and YARD blocks).
    • Don’t bother with a wiki. Axiom: The best documentation lives and grows alongside your code.
  2. Make it hard for your team to not document.
    • Make comments part of the standard.
    • Reject uncommented code.

4. Be Humble

Like, fuck, sometimes I’m smart. Other time, I tell myself “Well I know better,” but the truth is that nobody can know eventing. I sure don’t_know everything:

  • I don’t know the totality of business requirements.
  • I am mindblind, which means that other people exist at a surface level to me. It takes focused, conscious effort to figure out what is in your head, and a great deal of communication to bridge the gap.
  • I know a lot about JavaScript and Ruby, but only in comparison to my team. What I know is itself incomplete, and limited to what I make an effort to learn. Which means I don’t know it all, not by a long shot.

At least once a week I used bad information to come to the wrong conclusion. One mistake leads to the next leads to me stepping through my code to find the reversion. Be humble and accept that you aren’t always right. Don’t be too proud to listen and learn.

5. Be Arrogant

Lack of knowledge goes both ways: If intelligence and experiences are a cliff, then we went up it different ways. I know what you don’t. My experiences weren’t yours. This is okay.


in me

There are times when I envy what gods give to their believers: a sense of identity and place in life, and a higher power you can call on in times of need. I grew up with a growing realisation that the godstuff made no sense. I’m logical and literal and limited by my fundamental lack of imagination, so there was never any room in me for angels or demon or gods. It was natural, a deep part of me; all that changed was confidence of expression. There were a series of steps start began with “why do people come here and pray when they don’t follow it for the rest of the week?”

I envy that you can believe there’s someone upstairs who’s there to keep an eye to windward for you. For me, our bodystuffs formed in nucleosynthesis in the hearts of dyeing stars. Then, billions of years later, bits of matter that would up both self-aware and quite unhappy about the fact. That’s me, right now. On some (far off, i hope) day, I’ll keel over dead. And that’s it. The end.

We’re all in the same boat: we gotta muddle through, best we can, between now and then.

Right now, I’m muddling. The Autumn of Autism clued me in to my unconscious emotional currents. There are crippling dissociations deep down inside between my conscious and emotional selves. That disconnect both comes from, and causes, emotional trauma. You grow up a victim, you stay a victim. It’s the easiest thing to spread hurt when you don’t feel hurt yourself. You act shit to friends and family. You perpetuate the cycle and come away with a shiny clean conscience because you always find something or someone else to blame.

Here’s why I’m jealous of you believers: you can drop to your knees, clap your palms together, and ask the woman upstairs for a helping hand. God works in mysterious ways, and probably She has a plan for you. Maybe She’s the happy kind of God who’ll see you through. Me? It’s me who fucked up; I’m the one who hurt my nearest and dearest, then shrugged off the consequences.

Right now, I’m learning to own the fuck out of my guilt. This is fantastic, that I can tune into love and pride for my kids for the first time, but being a balanced human means being able to deal with the full spectrum of emotions.

Whenever there’s a tough moment, I gotta stay checked in. If I fuck up, it falls on me to say “I fucked up,” and not shut down when there are feelings of guilt involved.

Why this is all relevant to my life right now is that I’m sick of carrying around all my unhappiness. A shadow follows along wherever I go, now this time when I got hurt, now a moment when I hurt somebody. It isn’t possible for me to walk away. I’d love to. I can’t because there are other people involved who deserve their own closure.

Yes, people in my past hurt me. Not a one is going to get up someday and exclaim, “oh shit, I hurt Mark and I’m gonna say sorry!” It’s impossible, actually, because some of them are dead.

Stood beside the abusers are everyone I hurt. All the times I turned off emotions, fucked up, and shrugged off the hurt as being the product of circumstance. You can always find something else to blame if you try hard enough. So yeah, it’s on me to step up and start this. You can’t anyone else on my behalf any more than they can absolve me of my wrongs.

Stupid atheism.

I’m 35, and I’m halfway through the only life I get. Parts of my life were shit. I was shit in other peoples lives, and nobody else can fix this. I’m the only person with the power to make my life happy. If I fucked up and hurt you, nobody else is every going to say sorry on my behalf.

Dawn light

in ireland

The view from our room leads to the production of many beautiful dawn photographs, whatever else you might care to say about it.

Dawn light over Dundrum, Ireland